fixed some warnings with gcc4 (mostly assignment differs in signedness warnings)

svn path=/trunk/; revision=14919
This commit is contained in:
Thomas Bluemel 2005-05-01 19:30:06 +00:00
parent 832cfa1af7
commit 722d9a84e4
95 changed files with 576 additions and 529 deletions

View file

@ -101,9 +101,9 @@ typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA
typedef struct _CM_PNP_BIOS_DEVICE_NODE
{
USHORT Size;
UCHAR Node;
CHAR Node;
ULONG ProductId;
UCHAR DeviceType[3];
CHAR DeviceType[3];
USHORT DeviceAttributes;
} __attribute__((packed)) CM_PNP_BIOS_DEVICE_NODE, *PCM_PNP_BIOS_DEVICE_NODE;
@ -258,7 +258,7 @@ SetComponentInformation(FRLDRHKEY ComponentKey,
Error = RegSetValue(ComponentKey,
"Component Information",
REG_BINARY,
(PUCHAR)&CompInfo,
(PCHAR)&CompInfo,
sizeof(CM_COMPONENT_INFORMATION));
if (Error != ERROR_SUCCESS)
{
@ -287,7 +287,7 @@ DetectPnpBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
LONG Error;
InstData = (PCM_PNP_BIOS_INSTALLATION_CHECK)PnpBiosSupported();
if (InstData == NULL || strncmp(InstData->Signature, "$PnP", 4))
if (InstData == NULL || strncmp((CHAR*)InstData->Signature, "$PnP", 4))
{
DbgPrint((DPRINT_HWDETECT, "PnP-BIOS not supported\n"));
return;
@ -335,7 +335,7 @@ DetectPnpBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
Error = RegSetValue(BusKey,
"Identifier",
REG_SZ,
(PUCHAR)"PNP BIOS",
"PNP BIOS",
9);
if (Error != ERROR_SUCCESS)
{
@ -413,7 +413,7 @@ DetectPnpBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
Error = RegSetValue(BusKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -495,7 +495,7 @@ SetHarddiskConfigurationData(FRLDRHKEY DiskKey,
Error = RegSetValue(DiskKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -516,7 +516,7 @@ SetHarddiskIdentifier(FRLDRHKEY DiskKey,
ULONG i;
ULONG Checksum;
ULONG Signature;
char Identifier[20];
CHAR Identifier[20];
LONG Error;
/* Read the MBR */
@ -568,7 +568,7 @@ SetHarddiskIdentifier(FRLDRHKEY DiskKey,
Error = RegSetValue(DiskKey,
"Identifier",
REG_SZ,
(PUCHAR) Identifier,
Identifier,
20);
if (Error != ERROR_SUCCESS)
{
@ -673,7 +673,7 @@ DetectBiosDisks(FRLDRHKEY SystemKey,
Error = RegSetValue(SystemKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -829,7 +829,7 @@ DetectBiosFloppyPeripheral(FRLDRHKEY ControllerKey)
Error = RegSetValue(PeripheralKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -845,7 +845,7 @@ DetectBiosFloppyPeripheral(FRLDRHKEY ControllerKey)
Error = RegSetValue(PeripheralKey,
"Identifier",
REG_SZ,
(PUCHAR)Identifier,
(PCHAR)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
@ -939,7 +939,7 @@ DetectBiosFloppyController(FRLDRHKEY SystemKey,
Error = RegSetValue(ControllerKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -1280,7 +1280,7 @@ DetectSerialPointerPeripheral(FRLDRHKEY ControllerKey,
Error = RegSetValue(PeripheralKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR)&FullResourceDescriptor,
(PCHAR)&FullResourceDescriptor,
sizeof(CM_FULL_RESOURCE_DESCRIPTOR) -
sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
if (Error != ERROR_SUCCESS)
@ -1294,7 +1294,7 @@ DetectSerialPointerPeripheral(FRLDRHKEY ControllerKey,
Error = RegSetValue(PeripheralKey,
"Identifier",
REG_SZ,
(PUCHAR)Identifier,
Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
@ -1409,7 +1409,7 @@ DetectSerialPorts(FRLDRHKEY BusKey)
Error = RegSetValue(ControllerKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -1426,7 +1426,7 @@ DetectSerialPorts(FRLDRHKEY BusKey)
Error = RegSetValue(ControllerKey,
"Identifier",
REG_SZ,
(PUCHAR)Buffer,
Buffer,
strlen(Buffer) + 1);
if (Error != ERROR_SUCCESS)
{
@ -1542,7 +1542,7 @@ DetectParallelPorts(FRLDRHKEY BusKey)
Error = RegSetValue(ControllerKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -1559,7 +1559,7 @@ DetectParallelPorts(FRLDRHKEY BusKey)
Error = RegSetValue(ControllerKey,
"Identifier",
REG_SZ,
(PUCHAR)Buffer,
Buffer,
strlen(Buffer) + 1);
if (Error != ERROR_SUCCESS)
{
@ -1702,7 +1702,7 @@ DetectKeyboardPeripheral(FRLDRHKEY ControllerKey)
Error = RegSetValue(PeripheralKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR)FullResourceDescriptor,
(PCHAR)FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -1718,7 +1718,7 @@ DetectKeyboardPeripheral(FRLDRHKEY ControllerKey)
Error = RegSetValue(ControllerKey,
"Identifier",
REG_SZ,
(PUCHAR)Buffer,
Buffer,
strlen(Buffer) + 1);
if (Error != ERROR_SUCCESS)
{
@ -1804,7 +1804,7 @@ DetectKeyboardController(FRLDRHKEY BusKey)
Error = RegSetValue(ControllerKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR)FullResourceDescriptor,
(PCHAR)FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -1972,7 +1972,7 @@ DetectPS2Mouse(FRLDRHKEY BusKey)
Error = RegSetValue(ControllerKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR)&FullResourceDescriptor,
(PCHAR)&FullResourceDescriptor,
sizeof(CM_FULL_RESOURCE_DESCRIPTOR));
if (Error != ERROR_SUCCESS)
{
@ -2014,7 +2014,7 @@ DetectPS2Mouse(FRLDRHKEY BusKey)
Error = RegSetValue(PeripheralKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR)&FullResourceDescriptor,
(PCHAR)&FullResourceDescriptor,
sizeof(CM_FULL_RESOURCE_DESCRIPTOR) -
sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
if (Error != ERROR_SUCCESS)
@ -2029,7 +2029,7 @@ DetectPS2Mouse(FRLDRHKEY BusKey)
Error = RegSetValue(PeripheralKey,
"Identifier",
REG_SZ,
(PUCHAR)"MICROSOFT PS2 MOUSE",
"MICROSOFT PS2 MOUSE",
20);
if (Error != ERROR_SUCCESS)
{
@ -2098,7 +2098,7 @@ DetectDisplayController(FRLDRHKEY BusKey)
Error = RegSetValue(ControllerKey,
"Identifier",
REG_SZ,
(PUCHAR)Buffer,
Buffer,
strlen(Buffer) + 1);
if (Error != ERROR_SUCCESS)
{
@ -2146,7 +2146,7 @@ DetectIsaBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
Error = RegSetValue(BusKey,
"Identifier",
REG_SZ,
(PUCHAR)"ISA",
"ISA",
4);
if (Error != ERROR_SUCCESS)
{
@ -2175,7 +2175,7 @@ DetectIsaBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
Error = RegSetValue(BusKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)

View file

@ -92,7 +92,7 @@ DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
Error = RegSetValue(BiosKey,
"Identifier",
REG_SZ,
(PUCHAR)"ACPI BIOS",
"ACPI BIOS",
10);
if (Error != ERROR_SUCCESS)
{

View file

@ -95,7 +95,7 @@ DetectApmBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
Error = RegSetValue(BiosKey,
"Identifier",
REG_SZ,
(PUCHAR)"APM",
"APM",
4);
if (Error != ERROR_SUCCESS)
{

View file

@ -111,8 +111,8 @@ static VOID
DetectCPU(FRLDRHKEY CpuKey,
FRLDRHKEY FpuKey)
{
char VendorIdentifier[13];
char Identifier[64];
CHAR VendorIdentifier[13];
CHAR Identifier[64];
ULONG FeatureSet;
FRLDRHKEY CpuInstKey;
FRLDRHKEY FpuInstKey;
@ -195,7 +195,7 @@ DetectCPU(FRLDRHKEY CpuKey,
Error = RegSetValue(CpuInstKey,
"FeatureSet",
REG_DWORD,
(PUCHAR)&FeatureSet,
(PCHAR)&FeatureSet,
sizeof(ULONG));
if (Error != ERROR_SUCCESS)
{
@ -208,7 +208,7 @@ DetectCPU(FRLDRHKEY CpuKey,
Error = RegSetValue(CpuInstKey,
"Identifier",
REG_SZ,
(PUCHAR)Identifier,
Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
@ -218,7 +218,7 @@ DetectCPU(FRLDRHKEY CpuKey,
Error = RegSetValue(FpuInstKey,
"Identifier",
REG_SZ,
(PUCHAR)Identifier,
Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
@ -231,7 +231,7 @@ DetectCPU(FRLDRHKEY CpuKey,
Error = RegSetValue(CpuInstKey,
"VendorIdentifier",
REG_SZ,
(PUCHAR)VendorIdentifier,
VendorIdentifier,
strlen(VendorIdentifier) + 1);
if (Error != ERROR_SUCCESS)
{
@ -250,7 +250,7 @@ DetectCPU(FRLDRHKEY CpuKey,
Error = RegSetValue(CpuInstKey,
"~MHz",
REG_DWORD,
(PUCHAR)&CpuSpeed,
(PCHAR)&CpuSpeed,
sizeof(ULONG));
if (Error != ERROR_SUCCESS)
{
@ -339,7 +339,7 @@ SetMpsProcessor(FRLDRHKEY CpuKey,
Error = RegSetValue(CpuInstKey,
"FeatureSet",
REG_DWORD,
(PUCHAR)&FeatureSet,
(PCHAR)&FeatureSet,
sizeof(ULONG));
if (Error != ERROR_SUCCESS)
{
@ -352,7 +352,7 @@ SetMpsProcessor(FRLDRHKEY CpuKey,
Error = RegSetValue(CpuInstKey,
"Identifier",
REG_SZ,
(PUCHAR)Identifier,
Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
@ -362,7 +362,7 @@ SetMpsProcessor(FRLDRHKEY CpuKey,
Error = RegSetValue(FpuInstKey,
"Identifier",
REG_SZ,
(PUCHAR)Identifier,
Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
@ -375,7 +375,7 @@ SetMpsProcessor(FRLDRHKEY CpuKey,
Error = RegSetValue(CpuInstKey,
"VendorIdentifier",
REG_SZ,
(PUCHAR)VendorIdentifier,
VendorIdentifier,
strlen(VendorIdentifier) + 1);
if (Error != ERROR_SUCCESS)
{
@ -394,7 +394,7 @@ SetMpsProcessor(FRLDRHKEY CpuKey,
Error = RegSetValue(CpuInstKey,
"~MHz",
REG_DWORD,
(PUCHAR)&CpuSpeed,
(PCHAR)&CpuSpeed,
sizeof(ULONG));
if (Error != ERROR_SUCCESS)
{

View file

@ -178,7 +178,7 @@ DetectPciIrqRoutingTable(FRLDRHKEY BusKey)
Error = RegSetValue(TableKey,
"Identifier",
REG_SZ,
(PUCHAR)"PCI Real-mode IRQ Routing Table",
"PCI Real-mode IRQ Routing Table",
32);
if (Error != ERROR_SUCCESS)
{
@ -216,7 +216,7 @@ DetectPciIrqRoutingTable(FRLDRHKEY BusKey)
Error = RegSetValue(TableKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)
@ -272,7 +272,7 @@ DetectPciBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
Error = RegSetValue(BiosKey,
"Identifier",
REG_SZ,
(PUCHAR)"PCI BIOS",
"PCI BIOS",
9);
if (Error != ERROR_SUCCESS)
{
@ -301,7 +301,7 @@ DetectPciBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
Error = RegSetValue(BiosKey,
"Configuration Data",
REG_FULL_RESOURCE_DESCRIPTOR,
(PUCHAR) FullResourceDescriptor,
(PCHAR) FullResourceDescriptor,
Size);
MmFreeMemory(FullResourceDescriptor);
if (Error != ERROR_SUCCESS)

View file

@ -39,12 +39,12 @@
VOID RunLoader(VOID)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
CHAR SettingName[80];
CHAR SettingValue[80];
ULONG SectionId;
ULONG OperatingSystemCount;
PUCHAR *OperatingSystemSectionNames;
PUCHAR *OperatingSystemDisplayNames;
PCHAR *OperatingSystemSectionNames;
PCHAR *OperatingSystemDisplayNames;
ULONG DefaultOperatingSystem;
LONG TimeOut;
ULONG SelectedOperatingSystem;
@ -166,10 +166,10 @@ reboot:
return;
}
ULONG GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], ULONG OperatingSystemCount)
ULONG GetDefaultOperatingSystem(PCHAR OperatingSystemList[], ULONG OperatingSystemCount)
{
UCHAR DefaultOSText[80];
char* DefaultOSName;
CHAR DefaultOSText[80];
PCHAR DefaultOSName;
ULONG SectionId;
ULONG DefaultOS = 0;
ULONG Idx;
@ -205,7 +205,7 @@ ULONG GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], ULONG OperatingS
LONG GetTimeOut(VOID)
{
UCHAR TimeOutText[20];
CHAR TimeOutText[20];
LONG TimeOut;
ULONG SectionId;

View file

@ -32,20 +32,20 @@
#include <machine.h>
UCHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive";
UCHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition.";
UCHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos";
UCHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18";
UCHAR LinuxInitrdPrompt[] = "Enter the initrd image path.\n\nExamples:\n/initrd.gz\n/boot/root.img.gz\n\nLeave blank for no initial ram disk.";
UCHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init";
UCHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS";
UCHAR ReactOSOptionsPrompt[] = "Enter the options you want passed to the kernel.\n\nExamples:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n/FASTDETECT /SOS /NOGUIBOOT\n/BASEVIDEO /MAXMEM=64\n/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL";
CHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive";
CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition.";
CHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos";
CHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18";
CHAR LinuxInitrdPrompt[] = "Enter the initrd image path.\n\nExamples:\n/initrd.gz\n/boot/root.img.gz\n\nLeave blank for no initial ram disk.";
CHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init";
CHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS";
CHAR ReactOSOptionsPrompt[] = "Enter the options you want passed to the kernel.\n\nExamples:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n/FASTDETECT /SOS /NOGUIBOOT\n/BASEVIDEO /MAXMEM=64\n/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL";
UCHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup.";
CHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup.";
VOID OptionMenuCustomBoot(VOID)
{
PUCHAR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" };
PCHAR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" };
ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]);
ULONG SelectedMenuItem;
@ -77,8 +77,8 @@ VOID OptionMenuCustomBoot(VOID)
VOID OptionMenuCustomBootDisk(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
CHAR SectionName[100];
CHAR BootDriveString[20];
ULONG SectionId;
ULONG Year, Month, Day, Hour, Minute, Second;
@ -119,9 +119,9 @@ VOID OptionMenuCustomBootDisk(VOID)
VOID OptionMenuCustomBootPartition(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
CHAR SectionName[100];
CHAR BootDriveString[20];
CHAR BootPartitionString[20];
ULONG SectionId;
ULONG Year, Month, Day, Hour, Minute, Second;
@ -174,10 +174,10 @@ VOID OptionMenuCustomBootPartition(VOID)
VOID OptionMenuCustomBootBootSectorFile(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR BootSectorFileString[200];
CHAR SectionName[100];
CHAR BootDriveString[20];
CHAR BootPartitionString[20];
CHAR BootSectorFileString[200];
ULONG SectionId;
ULONG Year, Month, Day, Hour, Minute, Second;
@ -242,12 +242,12 @@ VOID OptionMenuCustomBootBootSectorFile(VOID)
VOID OptionMenuCustomBootReactOS(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR ReactOSSystemPath[200];
UCHAR ReactOSARCPath[200];
UCHAR ReactOSOptions[200];
CHAR SectionName[100];
CHAR BootDriveString[20];
CHAR BootPartitionString[20];
CHAR ReactOSSystemPath[200];
CHAR ReactOSARCPath[200];
CHAR ReactOSOptions[200];
ULONG SectionId;
ULONG Year, Month, Day, Hour, Minute, Second;
@ -315,12 +315,12 @@ VOID OptionMenuCustomBootReactOS(VOID)
VOID OptionMenuCustomBootLinux(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR LinuxKernelString[200];
UCHAR LinuxInitrdString[200];
UCHAR LinuxCommandLineString[200];
CHAR SectionName[100];
CHAR BootDriveString[20];
CHAR BootPartitionString[20];
CHAR LinuxKernelString[200];
CHAR LinuxInitrdString[200];
CHAR LinuxCommandLineString[200];
ULONG SectionId;
ULONG Year, Month, Day, Hour, Minute, Second;

View file

@ -39,9 +39,9 @@ VOID DiskReportError (BOOL bError)
bReportError = bError;
}
VOID DiskError(PUCHAR ErrorString, ULONG ErrorCode)
VOID DiskError(PCHAR ErrorString, ULONG ErrorCode)
{
UCHAR ErrorCodeString[200];
CHAR ErrorCodeString[200];
if (bReportError == FALSE)
return;
@ -53,7 +53,7 @@ VOID DiskError(PUCHAR ErrorString, ULONG ErrorCode)
UiMessageBox(ErrorCodeString);
}
PUCHAR DiskGetErrorCodeString(ULONG ErrorCode)
PCHAR DiskGetErrorCodeString(ULONG ErrorCode)
{
switch (ErrorCode)
{

View file

@ -30,13 +30,13 @@ ULONG OldInt13HandlerAddress = 0; // Address of BIOS int 13h handler
ULONG DriveMapHandlerAddress = 0; // Linear address of our drive map handler
ULONG DriveMapHandlerSegOff = 0; // Segment:offset style address of our drive map handler
VOID DriveMapMapDrivesInSection(PUCHAR SectionName)
VOID DriveMapMapDrivesInSection(PCHAR SectionName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
UCHAR ErrorText[260];
UCHAR Drive1[80];
UCHAR Drive2[80];
CHAR SettingName[80];
CHAR SettingValue[80];
CHAR ErrorText[260];
CHAR Drive1[80];
CHAR Drive2[80];
ULONG SectionId;
ULONG SectionItemCount;
ULONG Index;
@ -117,7 +117,7 @@ VOID DriveMapMapDrivesInSection(PUCHAR SectionName)
}
}
BOOL DriveMapIsValidDriveString(PUCHAR DriveString)
BOOL DriveMapIsValidDriveString(PCHAR DriveString)
{
ULONG Index;
@ -147,7 +147,7 @@ BOOL DriveMapIsValidDriveString(PUCHAR DriveString)
return TRUE;
}
ULONG DriveMapGetBiosDriveNumber(PUCHAR DeviceName)
ULONG DriveMapGetBiosDriveNumber(PCHAR DeviceName)
{
ULONG BiosDriveNumber = 0;

View file

@ -87,12 +87,12 @@ BOOL Ext2OpenVolume(UCHAR DriveNumber, ULONGLONG VolumeStartSector)
* Tries to open the file 'name' and returns true or false
* for success and failure respectively
*/
FILE* Ext2OpenFile(PUCHAR FileName)
FILE* Ext2OpenFile(PCHAR FileName)
{
EXT2_FILE_INFO TempExt2FileInfo;
PEXT2_FILE_INFO FileHandle;
UCHAR SymLinkPath[EXT3_NAME_LEN];
UCHAR FullPath[EXT3_NAME_LEN * 2];
CHAR SymLinkPath[EXT3_NAME_LEN];
CHAR FullPath[EXT3_NAME_LEN * 2];
ULONG Index;
DbgPrint((DPRINT_FILESYSTEM, "Ext2OpenFile() FileName = %s\n", FileName));
@ -190,11 +190,11 @@ FILE* Ext2OpenFile(PUCHAR FileName)
* with info describing the file, etc. returns true
* if the file exists or false otherwise
*/
BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer)
BOOL Ext2LookupFile(PCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer)
{
int i;
ULONG NumberOfPathParts;
UCHAR PathPart[261];
CHAR PathPart[261];
PVOID DirectoryBuffer;
ULONG DirectoryInode = EXT3_ROOT_INO;
EXT2_INODE InodeData;
@ -289,7 +289,7 @@ BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer)
return TRUE;
}
BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PUCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry)
BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry)
{
ULONG CurrentOffset;
PEXT2_DIR_ENTRY CurrentDirectoryEntry;
@ -839,7 +839,7 @@ BOOL Ext2ReadDirectory(ULONG Inode, PVOID* DirectoryBuffer, PEXT2_INODE InodePoi
BOOL Ext2ReadBlock(ULONG BlockNumber, PVOID Buffer)
{
UCHAR ErrorString[80];
CHAR ErrorString[80];
DbgPrint((DPRINT_FILESYSTEM, "Ext2ReadBlock() BlockNumber = %d Buffer = 0x%x\n", BlockNumber, Buffer));
@ -913,7 +913,7 @@ BOOL Ext2ReadInode(ULONG Inode, PEXT2_INODE InodeBuffer)
ULONG InodeGroupNumber;
ULONG InodeBlockNumber;
ULONG InodeOffsetInBlock;
UCHAR ErrorString[80];
CHAR ErrorString[80];
EXT2_GROUP_DESC GroupDescriptor;
DbgPrint((DPRINT_FILESYSTEM, "Ext2ReadInode() Inode = %d\n", Inode));

View file

@ -558,7 +558,7 @@ struct ext3_dir_entry {
ULONG inode; /* Inode number */
USHORT rec_len; /* Directory entry length */
USHORT name_len; /* Name length */
char name[EXT3_NAME_LEN]; /* File name */
CHAR name[EXT3_NAME_LEN]; /* File name */
};
/*
@ -572,7 +572,7 @@ struct ext3_dir_entry_2 {
USHORT rec_len; /* Directory entry length */
UCHAR name_len; /* Name length */
UCHAR file_type;
char name[EXT3_NAME_LEN]; /* File name */
CHAR name[EXT3_NAME_LEN]; /* File name */
};
/*
@ -667,9 +667,9 @@ typedef struct
BOOL Ext2OpenVolume(UCHAR DriveNumber, ULONGLONG VolumeStartSector);
FILE* Ext2OpenFile(PUCHAR FileName);
BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer);
BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PUCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry);
FILE* Ext2OpenFile(PCHAR FileName);
BOOL Ext2LookupFile(PCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer);
BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry);
BOOL Ext2ReadFile(FILE *FileHandle, ULONGLONG BytesToRead, ULONGLONG* BytesRead, PVOID Buffer);
ULONGLONG Ext2GetFileSize(FILE *FileHandle);
VOID Ext2SetFilePointer(FILE *FileHandle, ULONGLONG NewFilePointer);

View file

@ -405,22 +405,22 @@ PVOID FatBufferDirectory(ULONG DirectoryStartCluster, ULONG *DirectorySize, BOOL
return DirectoryBuffer;
}
BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer)
BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer)
{
ULONG EntryCount;
ULONG CurrentEntry;
PDIRENTRY DirEntry;
PLFN_DIRENTRY LfnDirEntry;
UCHAR LfnNameBuffer[265];
UCHAR ShortNameBuffer[20];
CHAR LfnNameBuffer[265];
CHAR ShortNameBuffer[20];
ULONG StartCluster;
EntryCount = DirectorySize / sizeof(DIRENTRY);
DbgPrint((DPRINT_FILESYSTEM, "FatSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x EntryCount = %d FileName = %s\n", DirectoryBuffer, EntryCount, FileName));
memset(ShortNameBuffer, 0, 13 * sizeof(UCHAR));
memset(LfnNameBuffer, 0, 261 * sizeof(UCHAR));
memset(ShortNameBuffer, 0, 13 * sizeof(CHAR));
memset(LfnNameBuffer, 0, 261 * sizeof(CHAR));
DirEntry = (PDIRENTRY) DirectoryBuffer;
for (CurrentEntry=0; CurrentEntry<EntryCount; CurrentEntry++, DirEntry++)
@ -436,7 +436,7 @@ BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize,
// entries after this one are unused. If this is the
// last entry then we didn't find the file in this directory.
//
if (DirEntry->FileName[0] == 0x00)
if (DirEntry->FileName[0] == '\0')
{
return FALSE;
}
@ -444,10 +444,10 @@ BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize,
//
// Check if this is a deleted entry or not
//
if (DirEntry->FileName[0] == 0xE5)
if (DirEntry->FileName[0] == '\xE5')
{
memset(ShortNameBuffer, 0, 13 * sizeof(UCHAR));
memset(LfnNameBuffer, 0, 261 * sizeof(UCHAR));
memset(ShortNameBuffer, 0, 13 * sizeof(CHAR));
memset(LfnNameBuffer, 0, 261 * sizeof(CHAR));
continue;
}
@ -616,7 +616,7 @@ BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize,
return FALSE;
}
BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer)
BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer)
{
ULONG EntryCount;
ULONG CurrentEntry;
@ -687,11 +687,11 @@ BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize
* with info describing the file, etc. returns true
* if the file exists or false otherwise
*/
BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer)
BOOL FatLookupFile(PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer)
{
int i;
ULONG NumberOfPathParts;
UCHAR PathPart[261];
CHAR PathPart[261];
PVOID DirectoryBuffer;
ULONG DirectoryStartCluster = 0;
ULONG DirectorySize;
@ -777,7 +777,7 @@ BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer)
* is in the form of "FILE EXT" and puts it in Buffer
* in the form of "file.ext"
*/
void FatParseShortFileName(PUCHAR Buffer, PDIRENTRY DirEntry)
void FatParseShortFileName(PCHAR Buffer, PDIRENTRY DirEntry)
{
ULONG Idx;
@ -915,7 +915,7 @@ BOOL FatGetFatEntry(ULONG Cluster, ULONG* ClusterPointer)
* Tries to open the file 'name' and returns true or false
* for success and failure respectively
*/
FILE* FatOpenFile(PUCHAR FileName)
FILE* FatOpenFile(PCHAR FileName)
{
FAT_FILE_INFO TempFatFileInfo;
PFAT_FILE_INFO FileHandle;

View file

@ -23,7 +23,7 @@
typedef struct _FAT_BOOTSECTOR
{
UCHAR JumpBoot[3]; // Jump instruction to boot code
UCHAR OemName[8]; // "MSWIN4.1" for MS formatted volumes
CHAR OemName[8]; // "MSWIN4.1" for MS formatted volumes
USHORT BytesPerSector; // Bytes per sector
UCHAR SectorsPerCluster; // Number of sectors in a cluster
USHORT ReservedSectors; // Reserved sectors, usually 1 (the bootsector)
@ -40,8 +40,8 @@ typedef struct _FAT_BOOTSECTOR
UCHAR Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0.
UCHAR BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present.
ULONG VolumeSerialNumber; // Volume serial number
UCHAR VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
UCHAR FileSystemType[8]; // One of the strings "FAT12 ", "FAT16 ", or "FAT "
CHAR VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
CHAR FileSystemType[8]; // One of the strings "FAT12 ", "FAT16 ", or "FAT "
UCHAR BootCodeAndData[448]; // The remainder of the boot sector
@ -52,7 +52,7 @@ typedef struct _FAT_BOOTSECTOR
typedef struct _FAT32_BOOTSECTOR
{
UCHAR JumpBoot[3]; // Jump instruction to boot code
UCHAR OemName[8]; // "MSWIN4.1" for MS formatted volumes
CHAR OemName[8]; // "MSWIN4.1" for MS formatted volumes
USHORT BytesPerSector; // Bytes per sector
UCHAR SectorsPerCluster; // Number of sectors in a cluster
USHORT ReservedSectors; // Reserved sectors, usually 1 (the bootsector)
@ -76,8 +76,8 @@ typedef struct _FAT32_BOOTSECTOR
UCHAR Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0.
UCHAR BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present.
ULONG VolumeSerialNumber; // Volume serial number
UCHAR VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
UCHAR FileSystemType[8]; // Always set to the string "FAT32 "
CHAR VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
CHAR FileSystemType[8]; // Always set to the string "FAT32 "
UCHAR BootCodeAndData[420]; // The remainder of the boot sector
@ -87,7 +87,7 @@ typedef struct _FAT32_BOOTSECTOR
typedef struct _FATX_BOOTSECTOR
{
UCHAR FileSystemType[4]; /* String "FATX" */
CHAR FileSystemType[4]; /* String "FATX" */
ULONG VolumeSerialNumber; /* Volume serial number */
ULONG SectorsPerCluster; /* Number of sectors in a cluster */
USHORT NumberOfFats; /* Number of FAT tables */
@ -101,7 +101,7 @@ typedef struct _FATX_BOOTSECTOR
*/
typedef struct //_DIRENTRY
{
UCHAR FileName[11]; /* Filename + extension */
CHAR FileName[11]; /* Filename + extension */
UCHAR Attr; /* File attributes */
UCHAR ReservedNT; /* Reserved for use by Windows NT */
UCHAR TimeInTenths; /* Millisecond stamp at file creation */
@ -131,7 +131,7 @@ typedef struct
{
UCHAR FileNameSize; /* Size of filename (max 42) */
UCHAR Attr; /* File attributes */
UCHAR FileName[42]; /* Filename in ASCII, padded with 0xff (not zero-terminated) */
CHAR FileName[42]; /* Filename in ASCII, padded with 0xff (not zero-terminated) */
ULONG StartCluster; /* Starting cluster number */
ULONG Size; /* File size */
USHORT Time; /* Time last modified */
@ -155,11 +155,11 @@ typedef struct
BOOL FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector, ULONG PartitionSectorCount);
ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCount);
PVOID FatBufferDirectory(ULONG DirectoryStartCluster, ULONG* EntryCountPointer, BOOL RootDirectory);
BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG EntryCount, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
void FatParseShortFileName(PUCHAR Buffer, PDIRENTRY DirEntry);
BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG EntryCount, PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
BOOL FatLookupFile(PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
void FatParseShortFileName(PCHAR Buffer, PDIRENTRY DirEntry);
BOOL FatGetFatEntry(ULONG Cluster, ULONG* ClusterPointer);
FILE* FatOpenFile(PUCHAR FileName);
FILE* FatOpenFile(PCHAR FileName);
ULONG FatCountClustersInChain(ULONG StartCluster);
ULONG* FatGetClusterChainArray(ULONG StartCluster);
BOOL FatReadCluster(ULONG ClusterNumber, PVOID Buffer);

View file

@ -42,7 +42,7 @@ ULONG FsType = 0; // Type of filesystem on boot device, set by FsOpenVolume()
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
VOID FileSystemError(PUCHAR ErrorString)
VOID FileSystemError(PCHAR ErrorString)
{
DbgPrint((DPRINT_FILESYSTEM, "%s\n", ErrorString));
@ -59,7 +59,7 @@ VOID FileSystemError(PUCHAR ErrorString)
*/
static BOOL FsOpenVolume(ULONG DriveNumber, ULONGLONG StartSector, ULONGLONG SectorCount, int Type)
{
UCHAR ErrorText[80];
CHAR ErrorText[80];
FsType = Type;
@ -123,7 +123,7 @@ BOOL FsOpenSystemVolume(char *SystemPath, char *RemainingPath, PULONG Device)
}
PFILE FsOpenFile(PUCHAR FileName)
PFILE FsOpenFile(PCHAR FileName)
{
PFILE FileHandle = NULL;
@ -337,7 +337,7 @@ BOOL FsIsEndOfFile(PFILE FileHandle)
* This function parses a path in the form of dir1\dir2\file1.ext
* and returns the number of parts it has (i.e. 3 - dir1,dir2,file1.ext)
*/
ULONG FsGetNumPathParts(PUCHAR Path)
ULONG FsGetNumPathParts(PCHAR Path)
{
ULONG i;
ULONG num;
@ -362,7 +362,7 @@ ULONG FsGetNumPathParts(PUCHAR Path)
* and puts the first name of the path (e.g. "dir1") in buffer
* compatible with the MSDOS directory structure
*/
VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path)
VOID FsGetFirstNameFromPath(PCHAR Buffer, PCHAR Path)
{
ULONG i;

View file

@ -65,12 +65,12 @@ BOOL IsoOpenVolume(ULONG DriveNumber)
}
static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectoryLength, PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectoryLength, PCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
{
PDIR_RECORD Record;
ULONG Offset;
ULONG i;
UCHAR Name[32];
CHAR Name[32];
DbgPrint((DPRINT_FILESYSTEM, "IsoSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectoryLength = %d FileName = %s\n", DirectoryBuffer, DirectoryLength, FileName));
@ -180,11 +180,11 @@ static PVOID IsoBufferDirectory(ULONG DirectoryStartSector, ULONG DirectoryLengt
* with info describing the file, etc. returns true
* if the file exists or false otherwise
*/
static BOOL IsoLookupFile(PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
static BOOL IsoLookupFile(PCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
{
int i;
ULONG NumberOfPathParts;
UCHAR PathPart[261];
CHAR PathPart[261];
PVOID DirectoryBuffer;
ULONG DirectorySector;
ULONG DirectoryLength;
@ -263,7 +263,7 @@ static BOOL IsoLookupFile(PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
* Tries to open the file 'name' and returns true or false
* for success and failure respectively
*/
FILE* IsoOpenFile(PUCHAR FileName)
FILE* IsoOpenFile(PCHAR FileName)
{
ISO_FILE_INFO TempFileInfo;
PISO_FILE_INFO FileHandle;

View file

@ -65,11 +65,11 @@ typedef struct _VD_HEADER VD_HEADER, *PVD_HEADER;
struct _PVD
{
UCHAR VdType; // 1
UCHAR StandardId[5]; // 2-6
CHAR StandardId[5]; // 2-6
UCHAR VdVersion; // 7
UCHAR unused0; // 8
UCHAR SystemId[32]; // 9-40
UCHAR VolumeId[32]; // 41-72
CHAR SystemId[32]; // 9-40
CHAR VolumeId[32]; // 41-72
UCHAR unused1[8]; // 73-80
ULONG VolumeSpaceSizeL; // 81-84
ULONG VolumeSpaceSizeM; // 85-88
@ -84,8 +84,8 @@ struct _PVD
ULONG MPathTablePos; // 149-152
ULONG MOptPathTablePos; // 153-156
DIR_RECORD RootDirRecord; // 157-190
UCHAR VolumeSetIdentifier[128]; // 191-318
UCHAR PublisherIdentifier[128]; // 319-446
CHAR VolumeSetIdentifier[128]; // 191-318
CHAR PublisherIdentifier[128]; // 319-446
/* more data ... */
@ -106,7 +106,7 @@ typedef struct
BOOL IsoOpenVolume(ULONG DriveNumber);
FILE* IsoOpenFile(PUCHAR FileName);
FILE* IsoOpenFile(PCHAR FileName);
BOOL IsoReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer);
ULONG IsoGetFileSize(FILE *FileHandle);
VOID IsoSetFilePointer(FILE *FileHandle, ULONG NewFilePointer);

View file

@ -563,10 +563,10 @@ BOOL NtfsFindMftRecord(ULONG MFTIndex, PCHAR FileName, ULONG *OutMFTIndex)
return FALSE;
}
BOOL NtfsLookupFile(PUCHAR FileName, PNTFS_MFT_RECORD MftRecord, PNTFS_ATTR_CONTEXT DataContext)
BOOL NtfsLookupFile(PCHAR FileName, PNTFS_MFT_RECORD MftRecord, PNTFS_ATTR_CONTEXT DataContext)
{
ULONG NumberOfPathParts;
UCHAR PathPart[261];
CHAR PathPart[261];
ULONG CurrentMFTIndex;
UCHAR i;
@ -680,7 +680,7 @@ BOOL NtfsOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector)
return TRUE;
}
FILE* NtfsOpenFile(PUCHAR FileName)
FILE* NtfsOpenFile(PCHAR FileName)
{
PNTFS_FILE_HANDLE FileHandle;
PNTFS_MFT_RECORD MftRecord;

View file

@ -62,7 +62,7 @@
typedef struct
{
UCHAR JumpBoot[3]; // Jump to the boot loader routine
UCHAR SystemId[8]; // System Id ("NTFS ")
CHAR SystemId[8]; // System Id ("NTFS ")
USHORT BytesPerSector; // Bytes per sector
UCHAR SectorsPerCluster; // Number of sectors in a cluster
UCHAR Unused1[7];
@ -219,7 +219,7 @@ typedef struct
} PACKED NTFS_FILE_HANDLE, *PNTFS_FILE_HANDLE;
BOOL NtfsOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector);
FILE* NtfsOpenFile(PUCHAR FileName);
FILE* NtfsOpenFile(PCHAR FileName);
BOOL NtfsReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer);
ULONG NtfsGetFileSize(FILE *FileHandle);
VOID NtfsSetFilePointer(FILE *FileHandle, ULONG NewFilePointer);

View file

@ -21,7 +21,7 @@
#define __BOOTMGR_H
ULONG GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], ULONG OperatingSystemCount);
ULONG GetDefaultOperatingSystem(PCHAR OperatingSystemList[], ULONG OperatingSystemCount);
LONG GetTimeOut(VOID);
BOOL MainBootMenuKeyPressFilter(ULONG KeyPress);

View file

@ -119,8 +119,8 @@ BOOL DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT Buff
//
///////////////////////////////////////////////////////////////////////////////////////
VOID DiskReportError (BOOL bError);
VOID DiskError(PUCHAR ErrorString, ULONG ErrorCode);
PUCHAR DiskGetErrorCodeString(ULONG ErrorCode);
VOID DiskError(PCHAR ErrorString, ULONG ErrorCode);
PCHAR DiskGetErrorCodeString(ULONG ErrorCode);
BOOL DiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); // Implemented in i386disk.c
BOOL DiskIsDriveRemovable(ULONG DriveNumber);
VOID DiskStopFloppyMotor(VOID); // Implemented in i386disk.c

View file

@ -25,13 +25,13 @@ typedef struct
{
UCHAR DriveMapCount; // Count of drives currently mapped
UCHAR DriveMap[8]; // Map of BIOS drives
CHAR DriveMap[8]; // Map of BIOS drives
} PACKED DRIVE_MAP_LIST, *PDRIVE_MAP_LIST;
VOID DriveMapMapDrivesInSection(PUCHAR SectionName);
BOOL DriveMapIsValidDriveString(PUCHAR DriveString); // Checks the drive string ("hd0") for validity
ULONG DriveMapGetBiosDriveNumber(PUCHAR DeviceName); // Returns a BIOS drive number for any given device name (e.g. 0x80 for 'hd0')
VOID DriveMapMapDrivesInSection(PCHAR SectionName);
BOOL DriveMapIsValidDriveString(PCHAR DriveString); // Checks the drive string ("hd0") for validity
ULONG DriveMapGetBiosDriveNumber(PCHAR DeviceName); // Returns a BIOS drive number for any given device name (e.g. 0x80 for 'hd0')
VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap); // Installs the int 13h handler for the drive mapper
VOID DriveMapRemoveInt13Handler(VOID); // Removes a previously installed int 13h drive map handler

View file

@ -32,17 +32,17 @@
#define FILE VOID
#define PFILE FILE *
VOID FileSystemError(PUCHAR ErrorString);
VOID FileSystemError(PCHAR ErrorString);
BOOL FsOpenBootVolume();
BOOL FsOpenSystemVolume(char *SystemPath, char *RemainingPath, PULONG BootDevice);
PFILE FsOpenFile(PUCHAR FileName);
BOOL FsOpenSystemVolume(PCHAR SystemPath, PCHAR RemainingPath, PULONG BootDevice);
PFILE FsOpenFile(PCHAR FileName);
VOID FsCloseFile(PFILE FileHandle);
BOOL FsReadFile(PFILE FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer);
ULONG FsGetFileSize(PFILE FileHandle);
VOID FsSetFilePointer(PFILE FileHandle, ULONG NewFilePointer);
ULONG FsGetFilePointer(PFILE FileHandle);
BOOL FsIsEndOfFile(PFILE FileHandle);
ULONG FsGetNumPathParts(PUCHAR Path);
VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path);
ULONG FsGetNumPathParts(PCHAR Path);
VOID FsGetFirstNameFromPath(PCHAR Buffer, PCHAR Path);
#endif // #defined __FS_H

View file

@ -22,14 +22,14 @@
BOOL IniFileInitialize(VOID);
BOOL IniOpenSection(PUCHAR SectionName, ULONG* SectionId);
BOOL IniOpenSection(PCHAR SectionName, ULONG* SectionId);
ULONG IniGetNumSectionItems(ULONG SectionId);
ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex);
ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex);
BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PUCHAR SettingName, ULONG NameSize, PUCHAR SettingValue, ULONG ValueSize);
BOOL IniReadSettingByName(ULONG SectionId, PUCHAR SettingName, PUCHAR Buffer, ULONG BufferSize);
BOOL IniAddSection(PUCHAR SectionName, ULONG* SectionId);
BOOL IniAddSettingValueToSection(ULONG SectionId, PUCHAR SettingName, PUCHAR SettingValue);
BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize);
BOOL IniReadSettingByName(ULONG SectionId, PCHAR SettingName, PCHAR Buffer, ULONG BufferSize);
BOOL IniAddSection(PCHAR SectionName, ULONG* SectionId);
BOOL IniAddSettingValueToSection(ULONG SectionId, PCHAR SettingName, PCHAR SettingValue);
#endif // defined __PARSEINI_H

View file

@ -127,9 +127,9 @@ typedef struct
VOID BootNewLinuxKernel(VOID); // Implemented in linux.S
VOID BootOldLinuxKernel(ULONG KernelSize); // Implemented in linux.S
VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description);
VOID LoadAndBootLinux(PCHAR OperatingSystemName, PCHAR Description);
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName);
BOOL LinuxParseIniSection(PCHAR OperatingSystemName);
BOOL LinuxReadBootSector(PFILE LinuxKernelFile);
BOOL LinuxReadSetupSector(PFILE LinuxKernelFile);
BOOL LinuxReadKernel(PFILE LinuxKernelFile);

View file

@ -20,8 +20,8 @@
#ifndef __BOOT_H
#define __BOOT_H
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName);
VOID LoadAndBootPartition(PUCHAR OperatingSystemName);
VOID LoadAndBootDrive(PUCHAR OperatingSystemName);
VOID LoadAndBootBootSector(PCHAR OperatingSystemName);
VOID LoadAndBootPartition(PCHAR OperatingSystemName);
VOID LoadAndBootDrive(PCHAR OperatingSystemName);
#endif // defined __BOOT_H

View file

@ -210,7 +210,7 @@ FASTCALL
FrLdrSetupPageDirectory(VOID);
VOID
LoadAndBootReactOS(PUCHAR OperatingSystemName);
LoadAndBootReactOS(PCHAR OperatingSystemName);
VOID FASTCALL AsmCode(VOID);
typedef VOID (FASTCALL *ASMCODE)(ULONG Magic,

View file

@ -20,9 +20,9 @@
#ifndef __OSLIST_H
#define __OSLIST_H
BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer);
BOOL InitOperatingSystemList(PCHAR **SectionNamesPointer, PCHAR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer);
ULONG CountOperatingSystems(ULONG SectionId);
BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG OperatingSystemCount);
BOOL RemoveQuotes(PUCHAR QuotedString);
BOOL AllocateListMemory(PCHAR **SectionNamesPointer, PCHAR **DisplayNamesPointer, ULONG OperatingSystemCount);
BOOL RemoveQuotes(PCHAR QuotedString);
#endif // #defined __OSLIST_H

View file

@ -26,7 +26,7 @@
// ReactOS Loading Functions
//
///////////////////////////////////////////////////////////////////////////////////////
VOID LoadAndBootReactOS(PUCHAR OperatingSystemName);
VOID LoadAndBootReactOS(PCHAR OperatingSystemName);
///////////////////////////////////////////////////////////////////////////////////////
//
@ -40,9 +40,9 @@ VOID ReactOSRunSetupLoader(VOID);
// ARC Path Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL DissectArcPath(LPSTR ArcPath, LPSTR BootPath, PULONG BootDrive, PULONG BootPartition);
VOID ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, ULONG Disk, ULONG Partition);
ULONG ConvertArcNameToBiosDriveNumber(PUCHAR ArcPath);
BOOL DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* BootPartition);
VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, ULONG Disk, ULONG Partition);
ULONG ConvertArcNameToBiosDriveNumber(PCHAR ArcPath);
#endif // defined __REACTOS_H

View file

@ -41,13 +41,13 @@ extern UCHAR UiSelectedTextBgColor; // Selected text background color
extern UCHAR UiEditBoxTextColor; // Edit box text color
extern UCHAR UiEditBoxBgColor; // Edit box text background color
extern UCHAR UiTitleBoxTitleText[260]; // Title box's title text
extern CHAR UiTitleBoxTitleText[260]; // Title box's title text
extern BOOL UserInterfaceUp; // Tells us if the user interface is displayed
extern BOOL UiUseSpecialEffects; // Tells us if we should use fade effects
extern UCHAR UiMonthNames[12][15];
extern CHAR UiMonthNames[12][15];
///////////////////////////////////////////////////////////////////////////////////////
//
@ -55,28 +55,28 @@ extern UCHAR UiMonthNames[12][15];
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL UiInitialize(BOOLEAN ShowGui); // Initialize User-Interface
VOID UiUnInitialize(PUCHAR BootText); // Un-initialize User-Interface
VOID UiUnInitialize(PCHAR BootText); // Un-initialize User-Interface
VOID UiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
VOID UiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified
VOID UiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHAR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges
VOID UiDrawStatusText(PUCHAR StatusText); // Draws text at the very bottom line on the screen
VOID UiDrawText(ULONG X, ULONG Y, PCHAR Text, UCHAR Attr); // Draws text at coordinates specified
VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCHAR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges
VOID UiDrawStatusText(PCHAR StatusText); // Draws text at the very bottom line on the screen
VOID UiUpdateDateTime(VOID); // Updates the date and time
VOID UiInfoBox(PUCHAR MessageText); // Displays a info box on the screen
VOID UiMessageBox(PUCHAR MessageText); // Displays a message box on the screen with an ok button
VOID UiMessageBoxCritical(PUCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources
VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiShowMessageBoxesInSection(PUCHAR SectionName); // Displays all the message boxes in a given section
VOID UiEscapeString(PUCHAR String); // Processes a string and changes all occurances of "\n" to '\n'
BOOL UiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, ULONG Length);
VOID UiInfoBox(PCHAR MessageText); // Displays a info box on the screen
VOID UiMessageBox(PCHAR MessageText); // Displays a message box on the screen with an ok button
VOID UiMessageBoxCritical(PCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources
VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiShowMessageBoxesInSection(PCHAR SectionName); // Displays all the message boxes in a given section
VOID UiEscapeString(PCHAR String); // Processes a string and changes all occurances of "\n" to '\n'
BOOL UiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length);
UCHAR UiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value
UCHAR UiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill into it's equivalent fill value
UCHAR UiTextToColor(PCHAR ColorText); // Converts the text color into it's equivalent color value
UCHAR UiTextToFillStyle(PCHAR FillStyleText); // Converts the text fill into it's equivalent fill value
VOID UiTruncateStringEllipsis(PUCHAR StringText, ULONG MaxChars); // Truncates a string to MaxChars by adding an ellipsis on the end '...'
VOID UiTruncateStringEllipsis(PCHAR StringText, ULONG MaxChars); // Truncates a string to MaxChars by adding an ellipsis on the end '...'
VOID UiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in
VOID UiFadeOut(VOID); // Fades the screen out
@ -88,7 +88,7 @@ VOID UiFadeOut(VOID); // Fades the screen out
///////////////////////////////////////////////////////////////////////////////////////
typedef BOOL (*UiMenuKeyPressFilterCallback)(ULONG KeyPress);
BOOL UiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
BOOL UiDisplayMenu(PCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);

View file

@ -41,7 +41,7 @@
#ifndef ASM
PUCHAR GetFreeLoaderVersionString(VOID);
PCHAR GetFreeLoaderVersionString(VOID);
#endif // ASM

View file

@ -34,8 +34,8 @@
typedef struct
{
LIST_ITEM ListEntry;
PUCHAR ItemName;
PUCHAR ItemValue;
PCHAR ItemName;
PCHAR ItemValue;
} INI_SECTION_ITEM, *PINI_SECTION_ITEM;
@ -47,7 +47,7 @@ typedef struct
typedef struct
{
LIST_ITEM ListEntry;
PUCHAR SectionName;
PCHAR SectionName;
ULONG SectionItemCount;
PINI_SECTION_ITEM SectionItemList;
@ -59,18 +59,18 @@ extern ULONG IniFileSettingCount;
PFILE IniOpenIniFile();
BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize);
ULONG IniGetNextLineSize(PUCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset);
ULONG IniGetNextLine(PUCHAR IniFileData, ULONG IniFileSize, PUCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset);
BOOL IniIsLineEmpty(PUCHAR LineOfText, ULONG TextLength);
BOOL IniIsCommentLine(PUCHAR LineOfText, ULONG TextLength);
BOOL IniIsSectionName(PUCHAR LineOfText, ULONG TextLength);
ULONG IniGetSectionNameSize(PUCHAR SectionNameLine, ULONG LineLength);
VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, ULONG LineLength);
BOOL IniIsSetting(PUCHAR LineOfText, ULONG TextLength);
ULONG IniGetSettingNameSize(PUCHAR SettingNameLine, ULONG LineLength);
ULONG IniGetSettingValueSize(PUCHAR SettingValueLine, ULONG LineLength);
VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, ULONG LineLength);
VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, ULONG LineLength);
BOOL IniParseFile(PCHAR IniFileData, ULONG IniFileSize);
ULONG IniGetNextLineSize(PCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset);
ULONG IniGetNextLine(PCHAR IniFileData, ULONG IniFileSize, PCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset);
BOOL IniIsLineEmpty(PCHAR LineOfText, ULONG TextLength);
BOOL IniIsCommentLine(PCHAR LineOfText, ULONG TextLength);
BOOL IniIsSectionName(PCHAR LineOfText, ULONG TextLength);
ULONG IniGetSectionNameSize(PCHAR SectionNameLine, ULONG LineLength);
VOID IniExtractSectionName(PCHAR SectionName, PCHAR SectionNameLine, ULONG LineLength);
BOOL IniIsSetting(PCHAR LineOfText, ULONG TextLength);
ULONG IniGetSettingNameSize(PCHAR SettingNameLine, ULONG LineLength);
ULONG IniGetSettingValueSize(PCHAR SettingValueLine, ULONG LineLength);
VOID IniExtractSettingName(PCHAR SettingName, PCHAR SettingNameLine, ULONG LineLength);
VOID IniExtractSettingValue(PCHAR SettingValue, PCHAR SettingValueLine, ULONG LineLength);
#endif // defined __INI_H

View file

@ -28,7 +28,7 @@
BOOL IniFileInitialize(VOID)
{
PFILE Freeldr_Ini; // File handle for freeldr.ini
PUCHAR FreeLoaderIniFileData;
PCHAR FreeLoaderIniFileData;
ULONG FreeLoaderIniFileSize;
BOOL Success;

View file

@ -24,7 +24,7 @@
#include <debug.h>
#include <mm.h>
BOOL IniOpenSection(PUCHAR SectionName, ULONG* SectionId)
BOOL IniOpenSection(PCHAR SectionName, ULONG* SectionId)
{
PINI_SECTION Section;
@ -81,7 +81,7 @@ ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex)
return (strlen(Section->SectionItemList[SettingIndex].ItemValue) + 1);
}
BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PUCHAR SettingName, ULONG NameSize, PUCHAR SettingValue, ULONG ValueSize)
BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
@ -131,7 +131,7 @@ BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PUCHAR Setting
return FALSE;
}
BOOL IniReadSettingByName(ULONG SectionId, PUCHAR SettingName, PUCHAR Buffer, ULONG BufferSize)
BOOL IniReadSettingByName(ULONG SectionId, PCHAR SettingName, PCHAR Buffer, ULONG BufferSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
@ -163,7 +163,7 @@ BOOL IniReadSettingByName(ULONG SectionId, PUCHAR SettingName, PUCHAR Buffer, UL
return FALSE;
}
BOOL IniAddSection(PUCHAR SectionName, ULONG* SectionId)
BOOL IniAddSection(PCHAR SectionName, ULONG* SectionId)
{
PINI_SECTION Section;
@ -203,7 +203,7 @@ BOOL IniAddSection(PUCHAR SectionName, ULONG* SectionId)
return TRUE;
}
BOOL IniAddSettingValueToSection(ULONG SectionId, PUCHAR SettingName, PUCHAR SettingValue)
BOOL IniAddSettingValueToSection(ULONG SectionId, PCHAR SettingName, PCHAR SettingValue)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;

View file

@ -30,11 +30,11 @@ ULONG IniFileSectionCount = 0;
ULONG IniFileSettingCount = 0;
BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize)
BOOL IniParseFile(PCHAR IniFileData, ULONG IniFileSize)
{
ULONG CurrentOffset;
ULONG CurrentLineNumber;
PUCHAR IniFileLine;
PCHAR IniFileLine;
ULONG IniFileLineSize;
ULONG LineLength;
PINI_SECTION CurrentSection = NULL;
@ -189,7 +189,7 @@ BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize)
return TRUE;
}
ULONG IniGetNextLineSize(PUCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset)
ULONG IniGetNextLineSize(PCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset)
{
ULONG Idx;
ULONG LineCharCount = 0;
@ -216,7 +216,7 @@ ULONG IniGetNextLineSize(PUCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOff
return LineCharCount;
}
ULONG IniGetNextLine(PUCHAR IniFileData, ULONG IniFileSize, PUCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset)
ULONG IniGetNextLine(PCHAR IniFileData, ULONG IniFileSize, PCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset)
{
ULONG Idx;
@ -252,7 +252,7 @@ ULONG IniGetNextLine(PUCHAR IniFileData, ULONG IniFileSize, PUCHAR Buffer, ULONG
return CurrentOffset;
}
BOOL IniIsLineEmpty(PUCHAR LineOfText, ULONG TextLength)
BOOL IniIsLineEmpty(PCHAR LineOfText, ULONG TextLength)
{
ULONG Idx;
@ -275,7 +275,7 @@ BOOL IniIsLineEmpty(PUCHAR LineOfText, ULONG TextLength)
return TRUE;
}
BOOL IniIsCommentLine(PUCHAR LineOfText, ULONG TextLength)
BOOL IniIsCommentLine(PCHAR LineOfText, ULONG TextLength)
{
ULONG Idx;
@ -301,7 +301,7 @@ BOOL IniIsCommentLine(PUCHAR LineOfText, ULONG TextLength)
return FALSE;
}
BOOL IniIsSectionName(PUCHAR LineOfText, ULONG TextLength)
BOOL IniIsSectionName(PCHAR LineOfText, ULONG TextLength)
{
ULONG Idx;
@ -327,7 +327,7 @@ BOOL IniIsSectionName(PUCHAR LineOfText, ULONG TextLength)
return FALSE;
}
ULONG IniGetSectionNameSize(PUCHAR SectionNameLine, ULONG LineLength)
ULONG IniGetSectionNameSize(PCHAR SectionNameLine, ULONG LineLength)
{
ULONG Idx;
ULONG NameSize;
@ -368,7 +368,7 @@ ULONG IniGetSectionNameSize(PUCHAR SectionNameLine, ULONG LineLength)
return NameSize;
}
VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, ULONG LineLength)
VOID IniExtractSectionName(PCHAR SectionName, PCHAR SectionNameLine, ULONG LineLength)
{
ULONG Idx;
ULONG DestIdx;
@ -408,7 +408,7 @@ VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, ULONG Lin
SectionName[DestIdx] = '\0';
}
BOOL IniIsSetting(PUCHAR LineOfText, ULONG TextLength)
BOOL IniIsSetting(PCHAR LineOfText, ULONG TextLength)
{
ULONG Idx;
@ -424,7 +424,7 @@ BOOL IniIsSetting(PUCHAR LineOfText, ULONG TextLength)
return FALSE;
}
ULONG IniGetSettingNameSize(PUCHAR SettingNameLine, ULONG LineLength)
ULONG IniGetSettingNameSize(PCHAR SettingNameLine, ULONG LineLength)
{
ULONG Idx;
ULONG NameSize;
@ -462,7 +462,7 @@ ULONG IniGetSettingNameSize(PUCHAR SettingNameLine, ULONG LineLength)
return NameSize;
}
ULONG IniGetSettingValueSize(PUCHAR SettingValueLine, ULONG LineLength)
ULONG IniGetSettingValueSize(PCHAR SettingValueLine, ULONG LineLength)
{
ULONG Idx;
ULONG ValueSize;
@ -515,7 +515,7 @@ ULONG IniGetSettingValueSize(PUCHAR SettingValueLine, ULONG LineLength)
return ValueSize;
}
VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, ULONG LineLength)
VOID IniExtractSettingName(PCHAR SettingName, PCHAR SettingNameLine, ULONG LineLength)
{
ULONG Idx;
ULONG DestIdx;
@ -552,7 +552,7 @@ VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, ULONG Lin
SettingName[DestIdx] = '\0';
}
VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, ULONG LineLength)
VOID IniExtractSettingValue(PCHAR SettingValue, PCHAR SettingValueLine, ULONG LineLength)
{
ULONG Idx;
ULONG DestIdx;

View file

@ -44,21 +44,21 @@ ULONG SetupSectorSize = 0;
BOOL NewStyleLinuxKernel = FALSE;
ULONG LinuxKernelSize = 0;
ULONG LinuxInitrdSize = 0;
UCHAR LinuxKernelName[260];
UCHAR LinuxInitrdName[260];
CHAR LinuxKernelName[260];
CHAR LinuxInitrdName[260];
BOOL LinuxHasInitrd = FALSE;
UCHAR LinuxCommandLine[260] = "";
CHAR LinuxCommandLine[260] = "";
ULONG LinuxCommandLineSize = 0;
PVOID LinuxKernelLoadAddress = NULL;
PVOID LinuxInitrdLoadAddress = NULL;
UCHAR LinuxBootDescription[80];
UCHAR LinuxBootPath[260] = "";
CHAR LinuxBootDescription[80];
CHAR LinuxBootPath[260] = "";
VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description)
VOID LoadAndBootLinux(PCHAR OperatingSystemName, PCHAR Description)
{
PFILE LinuxKernel = NULL;
PFILE LinuxInitrdFile = NULL;
UCHAR TempString[260];
CHAR TempString[260];
UiDrawBackdrop();
@ -224,9 +224,9 @@ LinuxBootFailed:
LinuxCommandLineSize = 0;
}
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName)
BOOL LinuxParseIniSection(PCHAR OperatingSystemName)
{
UCHAR SettingName[260];
CHAR SettingName[260];
ULONG SectionId;
// Find all the message box settings and run them
@ -375,7 +375,7 @@ BOOL LinuxReadSetupSector(PFILE LinuxKernelFile)
BOOL LinuxReadKernel(PFILE LinuxKernelFile)
{
ULONG BytesLoaded;
UCHAR StatusText[260];
CHAR StatusText[260];
PVOID LoadAddress;
sprintf(StatusText, "Loading %s", LinuxKernelName);
@ -448,7 +448,7 @@ BOOL LinuxCheckKernelVersion(VOID)
BOOL LinuxReadInitrd(PFILE LinuxInitrdFile)
{
ULONG BytesLoaded;
UCHAR StatusText[260];
CHAR StatusText[260];
sprintf(StatusText, "Loading %s", LinuxInitrdName);
UiDrawStatusText(StatusText);

View file

@ -29,12 +29,12 @@
#include <drivemap.h>
#include <machine.h>
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
VOID LoadAndBootBootSector(PCHAR OperatingSystemName)
{
PFILE FilePointer;
UCHAR SettingName[80];
CHAR SettingName[80];
ULONG SectionId;
UCHAR FileName[260];
CHAR FileName[260];
ULONG BytesRead;
// Find all the message box settings and run them
@ -94,10 +94,10 @@ VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
ChainLoadBiosBootSectorCode();
}
VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
VOID LoadAndBootPartition(PCHAR OperatingSystemName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
CHAR SettingName[80];
CHAR SettingValue[80];
ULONG SectionId;
PARTITION_TABLE_ENTRY PartitionTableEntry;
ULONG DriveNumber;
@ -165,10 +165,10 @@ VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
ChainLoadBiosBootSectorCode();
}
VOID LoadAndBootDrive(PUCHAR OperatingSystemName)
VOID LoadAndBootDrive(PCHAR OperatingSystemName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
CHAR SettingName[80];
CHAR SettingValue[80];
ULONG SectionId;
ULONG DriveNumber;

View file

@ -27,7 +27,7 @@
#include <arch.h>
PUCHAR OptionsMenuList[] =
PCHAR OptionsMenuList[] =
{
"Safe Mode",
"Safe Mode with Networking",

View file

@ -24,18 +24,18 @@
#include <mm.h>
#include <ui.h>
BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer)
BOOL InitOperatingSystemList(PCHAR **SectionNamesPointer, PCHAR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer)
{
ULONG Idx;
ULONG CurrentOperatingSystemIndex;
UCHAR SettingName[260];
UCHAR SettingValue[260];
CHAR SettingName[260];
CHAR SettingValue[260];
ULONG OperatingSystemCount;
ULONG SectionId;
ULONG OperatingSystemSectionId;
ULONG SectionSettingCount;
PUCHAR *OperatingSystemSectionNames;
PUCHAR *OperatingSystemDisplayNames;
PCHAR *OperatingSystemSectionNames;
PCHAR *OperatingSystemDisplayNames;
//
// Open the [FreeLoader] section
@ -88,8 +88,8 @@ BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNames
ULONG CountOperatingSystems(ULONG SectionId)
{
ULONG Idx;
UCHAR SettingName[260];
UCHAR SettingValue[260];
CHAR SettingName[260];
CHAR SettingValue[260];
ULONG OperatingSystemCount = 0;
ULONG SectionSettingCount;
@ -115,17 +115,17 @@ ULONG CountOperatingSystems(ULONG SectionId)
return OperatingSystemCount;
}
BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG OperatingSystemCount)
BOOL AllocateListMemory(PCHAR **SectionNamesPointer, PCHAR **DisplayNamesPointer, ULONG OperatingSystemCount)
{
ULONG Idx;
PUCHAR *OperatingSystemSectionNames = NULL;
PUCHAR *OperatingSystemDisplayNames = NULL;
PCHAR *OperatingSystemSectionNames = NULL;
PCHAR *OperatingSystemDisplayNames = NULL;
//
// Allocate memory to hold operating system list arrays
//
OperatingSystemSectionNames = (PUCHAR*) MmAllocateMemory( sizeof(PUCHAR) * OperatingSystemCount);
OperatingSystemDisplayNames = (PUCHAR*) MmAllocateMemory( sizeof(PUCHAR) * OperatingSystemCount);
OperatingSystemSectionNames = MmAllocateMemory( sizeof(PCHAR) * OperatingSystemCount);
OperatingSystemDisplayNames = MmAllocateMemory( sizeof(PCHAR) * OperatingSystemCount);
//
// If either allocation failed then return FALSE
@ -148,16 +148,16 @@ BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPoint
//
// Clear our newly allocated memory
//
memset(OperatingSystemSectionNames, 0, sizeof(PUCHAR) * OperatingSystemCount);
memset(OperatingSystemDisplayNames, 0, sizeof(PUCHAR) * OperatingSystemCount);
memset(OperatingSystemSectionNames, 0, sizeof(PCHAR) * OperatingSystemCount);
memset(OperatingSystemDisplayNames, 0, sizeof(PCHAR) * OperatingSystemCount);
//
// Loop through each array element and allocate it's string memory
//
for (Idx=0; Idx<OperatingSystemCount; Idx++)
{
OperatingSystemSectionNames[Idx] = (PUCHAR) MmAllocateMemory(80);
OperatingSystemDisplayNames[Idx] = (PUCHAR) MmAllocateMemory(80);
OperatingSystemSectionNames[Idx] = MmAllocateMemory(80);
OperatingSystemDisplayNames[Idx] = MmAllocateMemory(80);
//
// If it failed then jump to the cleanup code
@ -200,9 +200,9 @@ AllocateListMemoryFailed:
return FALSE;
}
BOOL RemoveQuotes(PUCHAR QuotedString)
BOOL RemoveQuotes(PCHAR QuotedString)
{
UCHAR TempString[200];
CHAR TempString[200];
//
// If this string is not quoted then return FALSE

View file

@ -23,7 +23,7 @@
#include <rtl.h>
BOOL DissectArcPath(char *ArcPath, char *BootPath, ULONG* BootDrive, ULONG* BootPartition)
BOOL DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* BootPartition)
{
char *p;
@ -87,7 +87,7 @@ BOOL DissectArcPath(char *ArcPath, char *BootPath, ULONG* BootDrive, ULONG* Boot
return TRUE;
}
void ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, ULONG Disk, ULONG Partition)
VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, ULONG Disk, ULONG Partition)
{
char tmp[50];
@ -123,7 +123,7 @@ void ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, ULONG Disk, ULONG Par
}
}
ULONG ConvertArcNameToBiosDriveNumber(PUCHAR ArcPath)
ULONG ConvertArcNameToBiosDriveNumber(PCHAR ArcPath)
{
char * p;
ULONG DriveNumber = 0;

View file

@ -178,7 +178,7 @@ typedef struct _KEY_CELL
USHORT ClassSize;
/* Name of key (not zero terminated) */
UCHAR Name[0];
CHAR Name[0];
} __attribute__((packed)) KEY_CELL, *PKEY_CELL;
@ -223,7 +223,7 @@ typedef struct _VALUE_CELL
ULONG DataType;
USHORT Flags;
USHORT Unused1;
UCHAR Name[0]; /* warning : not zero terminated */
CHAR Name[0]; /* warning : not zero terminated */
} __attribute__((packed)) VALUE_CELL, *PVALUE_CELL;
/* VALUE_CELL.Flags constants */
@ -237,7 +237,7 @@ typedef struct _VALUE_CELL
typedef struct _DATA_CELL
{
LONG CellSize;
UCHAR Data[0];
CHAR Data[0];
} __attribute__((packed)) DATA_CELL, *PDATA_CELL;
@ -1018,7 +1018,7 @@ CmiExportValue (PREGISTRY_HIVE Hive,
ULONG SrcDataSize;
ULONG DstDataSize;
ULONG DataType;
PUCHAR Data;
PCHAR Data;
BOOL Expand = FALSE;
DbgPrint((DPRINT_REGISTRY, "CmiExportValue('%s') called\n",
@ -1398,7 +1398,7 @@ RegImportValue (PHBIN RootBin,
Error = RegSetValue(Key,
cName,
ValueCell->DataType,
(PUCHAR)&ValueCell->DataOffset,
(PCHAR)&ValueCell->DataOffset,
DataSize);
if (Error != ERROR_SUCCESS)
{
@ -1441,7 +1441,7 @@ RegImportValue (PHBIN RootBin,
Error = RegSetValue (Key,
cName,
ValueCell->DataType,
(PUCHAR)DataCell->Data,
DataCell->Data,
DataSize);
}
if (Error != ERROR_SUCCESS)

View file

@ -343,11 +343,11 @@ FrLdrLoadBootDrivers(PCHAR szSystemRoot,
ULONG ValueType;
ULONG StartValue;
ULONG TagValue;
UCHAR DriverGroup[256];
CHAR DriverGroup[256];
ULONG DriverGroupSize;
UCHAR ImagePath[256];
UCHAR TempImagePath[256];
CHAR ImagePath[256];
CHAR TempImagePath[256];
/* get 'service group order' key */
rc = RegOpenKey(NULL,
@ -549,7 +549,7 @@ FrLdrLoadBootDrivers(PCHAR szSystemRoot,
}
VOID
LoadAndBootReactOS(PUCHAR OperatingSystemName)
LoadAndBootReactOS(PCHAR OperatingSystemName)
{
PFILE FilePointer;
CHAR name[1024];

View file

@ -47,7 +47,7 @@ RegInitializeRegistry (VOID)
RootKey->ValueCount = 0;
RootKey->NameSize = 2;
RootKey->Name = (PUCHAR)MmAllocateMemory (2);
RootKey->Name = MmAllocateMemory (2);
strcpy (RootKey->Name, "\\");
RootKey->DataType = 0;
@ -192,7 +192,7 @@ RegInitCurrentControlSet(BOOL LastKnownGood)
Error = RegSetValue(LinkKey,
NULL,
REG_LINK,
(PUCHAR)&ControlSetKey,
(PCHAR)&ControlSetKey,
sizeof(PVOID));
if (Error != ERROR_SUCCESS)
{
@ -486,7 +486,7 @@ LONG
RegSetValue(FRLDRHKEY Key,
PCHAR ValueName,
ULONG Type,
PUCHAR Data,
PCHAR Data,
ULONG DataSize)
{
PLIST_ENTRY Ptr;
@ -511,7 +511,7 @@ RegSetValue(FRLDRHKEY Key,
}
else
{
Key->Data = (PUCHAR)MmAllocateMemory(DataSize);
Key->Data = MmAllocateMemory(DataSize);
Key->DataSize = DataSize;
Key->DataType = Type;
memcpy(Key->Data, Data, DataSize);
@ -571,7 +571,7 @@ RegSetValue(FRLDRHKEY Key,
}
else
{
Value->Data = (PUCHAR)MmAllocateMemory(DataSize);
Value->Data = MmAllocateMemory(DataSize);
if (Value->Data == NULL)
return(ERROR_OUTOFMEMORY);
Value->DataType = Type;

View file

@ -34,12 +34,12 @@ typedef struct _REG_KEY
ULONG ValueCount;
ULONG NameSize;
PUCHAR Name;
PCHAR Name;
/* default data */
ULONG DataType;
ULONG DataSize;
PUCHAR Data;
PCHAR Data;
} KEY, *FRLDRHKEY, **PFRLDRHKEY;
@ -49,12 +49,12 @@ typedef struct _REG_VALUE
/* value name */
ULONG NameSize;
PUCHAR Name;
PCHAR Name;
/* value data */
ULONG DataType;
ULONG DataSize;
PUCHAR Data;
PCHAR Data;
} VALUE, *PVALUE;
@ -217,7 +217,7 @@ LONG
RegSetValue(FRLDRHKEY Key,
PCHAR ValueName,
ULONG Type,
PUCHAR Data,
PCHAR Data,
ULONG DataSize);
LONG

View file

@ -136,7 +136,7 @@ VOID TuiDrawBackdrop(VOID)
* FillArea()
* This function assumes coordinates are zero-based
*/
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */)
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */)
{
PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer;
ULONG i, j;
@ -162,7 +162,7 @@ VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillCha
// Loop through each character (column) in the line and fill it in
for (j=Left; j<=Right; j++)
{
ScreenMemory[((i*2)*UiScreenWidth)+(j*2)] = FillChar;
ScreenMemory[((i*2)*UiScreenWidth)+(j*2)] = (UCHAR)FillChar;
ScreenMemory[((i*2)*UiScreenWidth)+(j*2)+1] = Attr;
}
}
@ -304,7 +304,7 @@ VOID TuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyl
* DrawText()
* This function assumes coordinates are zero-based
*/
VOID TuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr)
VOID TuiDrawText(ULONG X, ULONG Y, PCHAR Text, UCHAR Attr)
{
PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer;
ULONG i, j;
@ -312,12 +312,12 @@ VOID TuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr)
// Draw the text
for (i=X, j=0; Text[j] && i<UiScreenWidth; i++,j++)
{
ScreenMemory[((Y*2)*UiScreenWidth)+(i*2)] = Text[j];
ScreenMemory[((Y*2)*UiScreenWidth)+(i*2)] = (UCHAR)Text[j];
ScreenMemory[((Y*2)*UiScreenWidth)+(i*2)+1] = Attr;
}
}
VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHAR TextString, UCHAR Attr)
VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCHAR TextString, UCHAR Attr)
{
ULONG TextLength;
ULONG BoxWidth;
@ -329,7 +329,7 @@ VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHA
ULONG RealTop;
ULONG X;
ULONG Y;
UCHAR Temp[2];
CHAR Temp[2];
TextLength = strlen(TextString);
@ -378,7 +378,7 @@ VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHA
}
}
VOID TuiDrawStatusText(PUCHAR StatusText)
VOID TuiDrawStatusText(PCHAR StatusText)
{
ULONG i;
@ -397,9 +397,9 @@ VOID TuiUpdateDateTime(VOID)
{
ULONG Year, Month, Day;
ULONG Hour, Minute, Second;
UCHAR DateString[40];
UCHAR TimeString[40];
UCHAR TempString[20];
CHAR DateString[40];
CHAR TimeString[40];
CHAR TempString[20];
BOOL PMHour = FALSE;
MachRTCGetCurrentDateTime(&Year, &Month, &Day, &Hour, &Minute, &Second);
@ -498,7 +498,7 @@ VOID TuiRestoreScreen(PUCHAR Buffer)
}
}
VOID TuiMessageBox(PUCHAR MessageText)
VOID TuiMessageBox(PCHAR MessageText)
{
PVOID ScreenBuffer;
@ -514,7 +514,7 @@ VOID TuiMessageBox(PUCHAR MessageText)
MmFreeMemory(ScreenBuffer);
}
VOID TuiMessageBoxCritical(PUCHAR MessageText)
VOID TuiMessageBoxCritical(PCHAR MessageText)
{
int width = 8;
int height = 1;
@ -603,7 +603,7 @@ VOID TuiMessageBoxCritical(PUCHAR MessageText)
}
VOID TuiDrawProgressBarCenter(ULONG Position, ULONG Range, PUCHAR ProgressText)
VOID TuiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText)
{
ULONG Left, Top, Right, Bottom;
ULONG Width = 50; // Allow for 50 "bars"
@ -618,7 +618,7 @@ VOID TuiDrawProgressBarCenter(ULONG Position, ULONG Range, PUCHAR ProgressText)
TuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range, ProgressText);
}
VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PUCHAR ProgressText)
VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
{
ULONG i;
ULONG ProgressBarWidth = (Right - Left) - 3;
@ -655,7 +655,7 @@ VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG
VideoCopyOffScreenBufferToVRAM();
}
UCHAR TuiTextToColor(PUCHAR ColorText)
UCHAR TuiTextToColor(PCHAR ColorText)
{
if (stricmp(ColorText, "Black") == 0)
return COLOR_BLACK;
@ -693,7 +693,7 @@ UCHAR TuiTextToColor(PUCHAR ColorText)
return COLOR_BLACK;
}
UCHAR TuiTextToFillStyle(PUCHAR FillStyleText)
UCHAR TuiTextToFillStyle(PCHAR FillStyleText)
{
if (stricmp(FillStyleText, "Light") == 0)
{
@ -765,7 +765,7 @@ VOID TuiFadeOut(VOID)
}
BOOL TuiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, ULONG Length)
BOOL TuiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length)
{
int width = 8;
int height = 1;

View file

@ -32,23 +32,23 @@ BOOL TuiInitialize(VOID); // Initialize User-Interface
VOID TuiUnInitialize(VOID); // Un-initialize User-Interface
VOID TuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
VOID TuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
VOID TuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified
VOID TuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHAR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges
VOID TuiDrawStatusText(PUCHAR StatusText); // Draws text at the very bottom line on the screen
VOID TuiDrawText(ULONG X, ULONG Y, PCHAR Text, UCHAR Attr); // Draws text at coordinates specified
VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCHAR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges
VOID TuiDrawStatusText(PCHAR StatusText); // Draws text at the very bottom line on the screen
VOID TuiUpdateDateTime(VOID); // Updates the date and time
VOID TuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later
VOID TuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save
VOID TuiMessageBox(PUCHAR MessageText); // Displays a message box on the screen with an ok button
VOID TuiMessageBoxCritical(PUCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources
VOID TuiDrawProgressBarCenter(ULONG Position, ULONG Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
BOOL TuiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, ULONG Length);
VOID TuiMessageBox(PCHAR MessageText); // Displays a message box on the screen with an ok button
VOID TuiMessageBoxCritical(PCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources
VOID TuiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
BOOL TuiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length);
UCHAR TuiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value
UCHAR TuiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill into it's equivalent fill value
UCHAR TuiTextToColor(PCHAR ColorText); // Converts the text color into it's equivalent color value
UCHAR TuiTextToFillStyle(PCHAR FillStyleText); // Converts the text fill into it's equivalent fill value
VOID TuiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in
VOID TuiFadeOut(VOID); // Fades the screen out
@ -61,7 +61,7 @@ VOID TuiFadeOut(VOID); // Fades the screen out
typedef struct
{
PUCHAR *MenuItemList;
PCHAR *MenuItemList;
ULONG MenuItemCount;
LONG MenuTimeRemaining;
ULONG SelectedMenuItem;
@ -78,7 +78,7 @@ VOID TuiDrawMenu(PTUI_MENU_INFO MenuInfo);
VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo);
VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, ULONG MenuItemNumber);
ULONG TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, UiMenuKeyPressFilterCallback KeyPressFilter);
BOOL TuiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
BOOL TuiDisplayMenu(PCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
/*

View file

@ -28,7 +28,7 @@
#include <video.h>
BOOL TuiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
BOOL TuiDisplayMenu(PCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
{
TUI_MENU_INFO MenuInformation;
ULONG LastClockSecond;
@ -216,8 +216,8 @@ VOID TuiDrawMenu(PTUI_MENU_INFO MenuInfo)
VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo)
{
UCHAR MenuLineText[80];
UCHAR TempString[80];
CHAR MenuLineText[80];
CHAR TempString[80];
ULONG Idx;
//
@ -265,7 +265,7 @@ VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo)
VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, ULONG MenuItemNumber)
{
ULONG Idx;
UCHAR MenuLineText[80];
CHAR MenuLineText[80];
ULONG SpaceTotal;
ULONG SpaceLeft;
ULONG SpaceRight;

View file

@ -48,7 +48,7 @@ UCHAR UiSelectedTextBgColor = COLOR_GRAY; // Selected text background color
UCHAR UiEditBoxTextColor = COLOR_WHITE; // Edit box text color
UCHAR UiEditBoxBgColor = COLOR_BLACK; // Edit box text background color
UCHAR UiTitleBoxTitleText[260] = "Boot Menu"; // Title box's title text
CHAR UiTitleBoxTitleText[260] = "Boot Menu"; // Title box's title text
BOOL UserInterfaceUp = FALSE; // Tells us if the user interface is displayed
@ -56,14 +56,14 @@ VIDEODISPLAYMODE UiDisplayMode = VideoTextMode; // Tells us if we are in text
BOOL UiUseSpecialEffects = FALSE; // Tells us if we should use fade effects
UCHAR UiMonthNames[12][15] = { "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December " };
CHAR UiMonthNames[12][15] = { "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December " };
BOOL UiInitialize(BOOLEAN ShowGui)
{
ULONG SectionId;
UCHAR DisplayModeText[260];
UCHAR SettingText[260];
CHAR DisplayModeText[260];
CHAR SettingText[260];
ULONG Depth;
if (!ShowGui) {
@ -201,7 +201,7 @@ BOOL UiInitialize(BOOLEAN ShowGui)
return TRUE;
}
VOID UiUnInitialize(PUCHAR BootText)
VOID UiUnInitialize(PCHAR BootText)
{
UiDrawBackdrop();
UiDrawStatusText("Booting...");
@ -233,7 +233,7 @@ VOID UiDrawBackdrop(VOID)
}
}
VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */)
VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */)
{
if (VideoTextMode == UiDisplayMode)
{
@ -272,7 +272,7 @@ VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle
}
}
VOID UiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr)
VOID UiDrawText(ULONG X, ULONG Y, PCHAR Text, UCHAR Attr)
{
if (VideoTextMode == UiDisplayMode)
{
@ -285,7 +285,7 @@ VOID UiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr)
}
}
VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHAR TextString, UCHAR Attr)
VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCHAR TextString, UCHAR Attr)
{
if (VideoTextMode == UiDisplayMode)
{
@ -298,7 +298,7 @@ VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHAR
}
}
VOID UiDrawStatusText(PUCHAR StatusText)
VOID UiDrawStatusText(PCHAR StatusText)
{
if (!UserInterfaceUp) return;
@ -326,7 +326,7 @@ VOID UiUpdateDateTime(VOID)
}
}
VOID UiInfoBox(PUCHAR MessageText)
VOID UiInfoBox(PCHAR MessageText)
{
ULONG TextLength;
ULONG BoxWidth;
@ -387,7 +387,7 @@ VOID UiInfoBox(PUCHAR MessageText)
UiDrawCenteredText(Left, Top, Right, Bottom, MessageText, ATTR(UiTextColor, UiMenuBgColor));
}
VOID UiMessageBox(PUCHAR MessageText)
VOID UiMessageBox(PCHAR MessageText)
{
// We have not yet displayed the user interface
// We are probably still reading the .ini file
@ -412,7 +412,7 @@ VOID UiMessageBox(PUCHAR MessageText)
}
}
VOID UiMessageBoxCritical(PUCHAR MessageText)
VOID UiMessageBoxCritical(PCHAR MessageText)
{
// We have not yet displayed the user interface
// We are probably still reading the .ini file
@ -437,7 +437,7 @@ VOID UiMessageBoxCritical(PUCHAR MessageText)
}
}
UCHAR UiTextToColor(PUCHAR ColorText)
UCHAR UiTextToColor(PCHAR ColorText)
{
if (VideoTextMode == UiDisplayMode)
{
@ -451,7 +451,7 @@ UCHAR UiTextToColor(PUCHAR ColorText)
}
}
UCHAR UiTextToFillStyle(PUCHAR FillStyleText)
UCHAR UiTextToFillStyle(PCHAR FillStyleText)
{
if (VideoTextMode == UiDisplayMode)
{
@ -465,7 +465,7 @@ UCHAR UiTextToFillStyle(PUCHAR FillStyleText)
}
}
VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PUCHAR ProgressText)
VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText)
{
if (!UserInterfaceUp) return;
@ -480,7 +480,7 @@ VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PUCHAR ProgressText)
}
}
VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PUCHAR ProgressText)
VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
{
if (VideoTextMode == UiDisplayMode)
{
@ -493,12 +493,12 @@ VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG P
}
}
VOID UiShowMessageBoxesInSection(PUCHAR SectionName)
VOID UiShowMessageBoxesInSection(PCHAR SectionName)
{
ULONG Idx;
UCHAR SettingName[80];
UCHAR SettingValue[80];
PUCHAR MessageBoxText;
CHAR SettingName[80];
CHAR SettingValue[80];
PCHAR MessageBoxText;
ULONG MessageBoxTextSize;
ULONG SectionId;
@ -524,7 +524,7 @@ VOID UiShowMessageBoxesInSection(PUCHAR SectionName)
//if (MessageBoxTextSize > 0)
{
// Allocate enough memory to hold the text
MessageBoxText = (PUCHAR)MmAllocateMemory(MessageBoxTextSize);
MessageBoxText = MmAllocateMemory(MessageBoxTextSize);
if (MessageBoxText)
{
@ -545,7 +545,7 @@ VOID UiShowMessageBoxesInSection(PUCHAR SectionName)
}
}
VOID UiEscapeString(PUCHAR String)
VOID UiEscapeString(PCHAR String)
{
ULONG Idx;
@ -563,7 +563,7 @@ VOID UiEscapeString(PUCHAR String)
}
}
VOID UiTruncateStringEllipsis(PUCHAR StringText, ULONG MaxChars)
VOID UiTruncateStringEllipsis(PCHAR StringText, ULONG MaxChars)
{
if (strlen(StringText) > MaxChars)
{
@ -571,7 +571,7 @@ VOID UiTruncateStringEllipsis(PUCHAR StringText, ULONG MaxChars)
}
}
BOOL UiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
BOOL UiDisplayMenu(PCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
{
if (VideoTextMode == UiDisplayMode)
{
@ -611,7 +611,7 @@ VOID UiFadeOut(VOID)
}
}
BOOL UiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, ULONG Length)
BOOL UiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length)
{
if (VideoTextMode == UiDisplayMode)
{

View file

@ -21,9 +21,9 @@
#include <version.h>
#include <rtl.h>
UCHAR FreeLoaderVersionString[80];
CHAR FreeLoaderVersionString[80];
PUCHAR GetFreeLoaderVersionString(VOID)
PCHAR GetFreeLoaderVersionString(VOID)
{
if (FREELOADER_PATCH_VERSION == 0)
{

View file

@ -157,7 +157,7 @@ SerenumPdoPnp(
}
case TargetDeviceRelation:
{
PDEVICE_RELATIONS DeviceRelations;
PDEVICE_RELATIONS DeviceRelations = NULL;
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / TargetDeviceRelation\n");
Status = SerenumPdoQueryDeviceRelations(DeviceObject, &DeviceRelations);
Information = (ULONG_PTR)DeviceRelations;

View file

@ -84,7 +84,7 @@ typedef struct __attribute__((packed)) _MP_CONFIGURATION_BUS
{
UCHAR Type; /* 1 */
UCHAR BusId; /* Bus ID */
UCHAR BusType[6]; /* Bus type */
CHAR BusType[6]; /* Bus type */
} __attribute__((packed)) MP_CONFIGURATION_BUS, *PMP_CONFIGURATION_BUS;
#define MAX_BUS 32

View file

@ -297,7 +297,7 @@ typedef struct _RTL_MESSAGE_RESOURCE_ENTRY
{
USHORT Length;
USHORT Flags;
UCHAR Text[1];
CHAR Text[1];
} RTL_MESSAGE_RESOURCE_ENTRY, *PRTL_MESSAGE_RESOURCE_ENTRY;
typedef struct _RTL_MESSAGE_RESOURCE_BLOCK

View file

@ -394,7 +394,7 @@ int adns_processreadable(adns_state ads, ADNS_SOCKET fd, const struct timeval *n
for (;;) {
udpaddrlen= sizeof(udpaddr);
ADNS_CLEAR_ERRNO;
r= recvfrom(ads->udpsocket,udpbuf,sizeof(udpbuf),0,
r= recvfrom(ads->udpsocket,(char*)udpbuf,sizeof(udpbuf),0,
(struct sockaddr*)&udpaddr,&udpaddrlen);
ADNS_CAPTURE_ERRNO;
if (r<0) {

View file

@ -149,7 +149,7 @@ int adns__vbuf_append(vbuf *vb, const byte *data, int len) {
int adns__vbuf_appendstr(vbuf *vb, const char *data) {
int l;
l= strlen(data);
return adns__vbuf_append(vb,data,l);
return adns__vbuf_append(vb,(byte*)data,l);
}
void adns__vbuf_free(vbuf *vb) {
@ -172,15 +172,15 @@ const char *adns__diag_domain(adns_state ads, int serv, adns_query qu,
if (!(adns__vbuf_appendstr(vb,"<bad format... ") &&
adns__vbuf_appendstr(vb,adns_strerror(st)) &&
adns__vbuf_appendstr(vb,">") &&
adns__vbuf_append(vb,"",1))) {
adns__vbuf_append(vb,(byte*)"",1))) {
return "<cannot report bad format... out of memory>";
}
}
if (!vb->used) {
adns__vbuf_appendstr(vb,"<truncated ...>");
adns__vbuf_append(vb,"",1);
adns__vbuf_append(vb,(byte*)"",1);
}
return vb->buf;
return (char*)vb->buf;
}
adns_status adns_rr_info(adns_rrtype type,
@ -203,10 +203,10 @@ adns_status adns_rr_info(adns_rrtype type,
adns__vbuf_init(&vb);
st= typei->convstring(&vb,datap);
if (st) goto x_freevb;
if (!adns__vbuf_append(&vb,"",1)) { st= adns_s_nomemory; goto x_freevb; }
assert((int)strlen(vb.buf) == vb.used-1);
if (!adns__vbuf_append(&vb,(byte*)"",1)) { st= adns_s_nomemory; goto x_freevb; }
assert((int)strlen((char*)vb.buf) == vb.used-1);
*data_r= realloc(vb.buf, (size_t) vb.used);
if (!*data_r) *data_r= vb.buf;
if (!*data_r) *data_r= (char*)vb.buf;
return adns_s_ok;
x_freevb:

View file

@ -47,7 +47,7 @@ int vbuf__append_quoted1035(vbuf *vb, const byte *buf, int len) {
break;
}
}
if (!adns__vbuf_append(vb,buf,i) || !adns__vbuf_append(vb,qbuf,(int) strlen(qbuf)))
if (!adns__vbuf_append(vb,buf,i) || !adns__vbuf_append(vb,(byte*)qbuf,(int) strlen(qbuf)))
return 0;
if (i<len) i++;
buf+= i;
@ -76,7 +76,7 @@ adns_status adns__findlabel_next(findlabel_state *fls,
int lablen, jumpto;
const char *dgram;
dgram= fls->dgram;
dgram= (char*)fls->dgram;
for (;;) {
if (fls->cbyte >= fls->dglen) goto x_truncated;
if (fls->cbyte >= fls->max) goto x_badresponse;
@ -139,7 +139,7 @@ adns_status adns__parse_domain_more(findlabel_state *fls, adns_state ads,
if (first) {
first= 0;
} else {
if (!adns__vbuf_append(vb,".",1)) return adns_s_nomemory;
if (!adns__vbuf_append(vb,(byte*)".",1)) return adns_s_nomemory;
}
if (flags & pdf_quoteok) {
if (!vbuf__append_quoted1035(vb,dgram+labstart,lablen))
@ -156,7 +156,7 @@ adns_status adns__parse_domain_more(findlabel_state *fls, adns_state ads,
return adns_s_nomemory;
}
}
if (!adns__vbuf_append(vb,"",1)) return adns_s_nomemory;
if (!adns__vbuf_append(vb,(byte*)"",1)) return adns_s_nomemory;
return adns_s_ok;
}

View file

@ -171,7 +171,7 @@ void adns__search_next(adns_state ads, adns_query qu, struct timeval now) {
qu->search_vb.used= qu->search_origlen;
if (nextentry) {
if (!adns__vbuf_append(&qu->search_vb,".",1) ||
if (!adns__vbuf_append(&qu->search_vb,(byte*)".",1) ||
!adns__vbuf_appendstr(&qu->search_vb,nextentry)) {
stat= adns_s_nomemory; goto x_fail;
}
@ -180,7 +180,7 @@ void adns__search_next(adns_state ads, adns_query qu, struct timeval now) {
free(qu->query_dgram);
qu->query_dgram= 0; qu->query_dglen= 0;
query_simple(ads,qu, qu->search_vb.buf, qu->search_vb.used, qu->typei, qu->flags, now);
query_simple(ads,qu, (char*)qu->search_vb.buf, qu->search_vb.used, qu->typei, qu->flags, now);
return;
x_fail:
@ -239,7 +239,7 @@ int adns_submit(adns_state ads,
}
if (flags & adns_qf_search) {
r= adns__vbuf_append(&qu->search_vb,owner,ol);
r= adns__vbuf_append(&qu->search_vb,(byte*)owner,ol);
if (!r) { stat= adns_s_nomemory; goto x_adnsfail; }
for (ndots=0, p=owner; (p= strchr(p,'.')); p++, ndots++);
@ -511,7 +511,7 @@ void adns__query_done(adns_query qu) {
if (qu->flags & adns_qf_owner && qu->flags & adns_qf_search &&
ans->status != adns_s_nomemory) {
if (!save_owner(qu, qu->search_vb.buf, qu->search_vb.used)) {
if (!save_owner(qu, (char*)qu->search_vb.buf, qu->search_vb.used)) {
adns__query_fail(qu,adns_s_nomemory);
return;
}

View file

@ -206,7 +206,7 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
dgram,dglen, &rdstart,rdstart+rdlength);
if (!qu->vb.used) goto x_truncated;
if (st) { adns__query_fail(qu,st); return; }
l= strlen(qu->vb.buf)+1;
l= strlen((char*)qu->vb.buf)+1;
qu->answer->cname= adns__alloc_preserved(qu,(size_t) l);
if (!qu->answer->cname) { adns__query_fail(qu,adns_s_nomemory); return; }

View file

@ -189,9 +189,9 @@ void adns__querysend_tcp(adns_query qu, struct timeval now) {
if (ads->tcpsend.used) {
wr= 0;
} else {
iov[0].iov_base= length;
iov[0].iov_base= (char*)length;
iov[0].iov_len= 2;
iov[1].iov_base= qu->query_dgram;
iov[1].iov_base= (char*)qu->query_dgram;
iov[1].iov_len= qu->query_dglen;
adns__sigpipe_protect(qu->ads);
wr= writev(qu->ads->tcpsocket,iov,2);
@ -251,7 +251,7 @@ void adns__query_send(adns_query qu, struct timeval now) {
servaddr.sin_port= htons(DNS_PORT);
ADNS_CLEAR_ERRNO;
r= sendto(ads->udpsocket,qu->query_dgram,qu->query_dglen,0,
r= sendto(ads->udpsocket,(char*)qu->query_dgram,qu->query_dglen,0,
(const struct sockaddr*)&servaddr,sizeof(servaddr));
ADNS_CAPTURE_ERRNO;
if (r<0 && errno == EMSGSIZE) { qu->retries= 0; query_usetcp(qu,now); return; }

View file

@ -860,13 +860,13 @@ static adns_status pap_mailbox822(const parseinfo *pai, int *cbyte_io, int max,
if (needquote || neednorm) {
r= adns__vbuf_ensure(vb, lablen+needquote+4); if (!r) R_NOMEM;
adns__vbuf_appendq(vb,"\"",1);
adns__vbuf_appendq(vb,(byte*)"\"",1);
for (i=0, needquote=0, p= pai->dgram+labstart; i<lablen; i++, p++) {
c= *p;
if (c == '"' || c=='\\') adns__vbuf_appendq(vb,"\\",1);
if (c == '"' || c=='\\') adns__vbuf_appendq(vb,(byte*)"\\",1);
adns__vbuf_appendq(vb,p,1);
}
adns__vbuf_appendq(vb,"\"",1);
adns__vbuf_appendq(vb,(byte*)"\"",1);
} else {
r= adns__vbuf_append(vb, pai->dgram+labstart, lablen); if (!r) R_NOMEM;
}

View file

@ -76,6 +76,37 @@ BOOL WINAPI cdtDraw(HDC hdc, INT x, INT y, INT card, INT type, COLORREF color)
return cdtDrawExt(hdc, x, y, CARD_WIDTH, CARD_HEIGHT, card, type, color);
}
/*
* internal
*/
inline VOID BltCard(HDC hdc, INT x, INT y, INT dx, INT dy, HDC hdcCard, DWORD dwRasterOp, BOOL bStretch)
{
if (bStretch)
{
StretchBlt(hdc, x, y, dx, dy, hdcCard, 0, 0, CARD_WIDTH, CARD_HEIGHT, dwRasterOp);
} else
{
BitBlt(hdc, x, y, dx, dy, hdcCard, 0, 0, dwRasterOp);
/*
* This is need when using Microsoft images, because they use two-color red/white images for
* red cards and thus needs fix-up of the edge to black color.
*/
#if 0
if (ISREDCARD(card))
{
PatBlt(hdc, x, y + 2, 1, dy - 4, BLACKNESS);
PatBlt(hdc, x + dx - 1, y + 2, 1, dy - 4, BLACKNESS);
PatBlt(hdc, x + 2, y, dx - 4, 1, BLACKNESS);
PatBlt(hdc, x + 2, y + dy - 1, dx - 4, 1, BLACKNESS);
SetPixel(hdc, x + 1, y + 1, 0);
SetPixel(hdc, x + dx - 2, y + 1, 0);
SetPixel(hdc, x + 1, y + dy - 2, 0);
SetPixel(hdc, x + dx - 2, y + dy - 2, 0);
}
#endif
}
}
/*
* Render card
*
@ -92,7 +123,6 @@ BOOL WINAPI cdtDraw(HDC hdc, INT x, INT y, INT card, INT type, COLORREF color)
BOOL WINAPI cdtDrawExt(HDC hdc, INT x, INT y, INT dx, INT dy, INT card, INT type, COLORREF color)
{
HDC hdcCard;
COLORREF SavedPixels[12];
DWORD dwRasterOp = SRCCOPY, OldBkColor;
BOOL bSaveEdges = TRUE;
BOOL bStretch = FALSE;
@ -154,6 +184,7 @@ BOOL WINAPI cdtDrawExt(HDC hdc, INT x, INT y, INT dx, INT dy, INT card, INT type
OldBkColor = SetBkColor(hdc, (type == ectFACES) ? 0xFFFFFF : color);
if (bSaveEdges)
{
COLORREF SavedPixels[12];
SavedPixels[0] = GetPixel(hdc, x, y);
SavedPixels[1] = GetPixel(hdc, x + 1, y);
SavedPixels[2] = GetPixel(hdc, x, y + 1);
@ -165,35 +196,11 @@ BOOL WINAPI cdtDrawExt(HDC hdc, INT x, INT y, INT dx, INT dy, INT card, INT type
SavedPixels[8] = GetPixel(hdc, x, y + dy - 2);
SavedPixels[9] = GetPixel(hdc, x + dx - 1, y + dy - 1);
SavedPixels[10] = GetPixel(hdc, x + dx - 2, y + dy - 1);
SavedPixels[11] = GetPixel(hdc, x + dx - 1, y + dy - 2);
}
if (bStretch)
{
StretchBlt(hdc, x, y, dx, dy, hdcCard, 0, 0, CARD_WIDTH, CARD_HEIGHT, dwRasterOp);
} else
{
BitBlt(hdc, x, y, dx, dy, hdcCard, 0, 0, dwRasterOp);
/*
* This is need when using Microsoft images, because they use two-color red/white images for
* red cards and thus needs fix-up of the edge to black color.
*/
#if 0
if (ISREDCARD(card))
{
PatBlt(hdc, x, y + 2, 1, dy - 4, BLACKNESS);
PatBlt(hdc, x + dx - 1, y + 2, 1, dy - 4, BLACKNESS);
PatBlt(hdc, x + 2, y, dx - 4, 1, BLACKNESS);
PatBlt(hdc, x + 2, y + dy - 1, dx - 4, 1, BLACKNESS);
SetPixel(hdc, x + 1, y + 1, 0);
SetPixel(hdc, x + dx - 2, y + 1, 0);
SetPixel(hdc, x + 1, y + dy - 2, 0);
SetPixel(hdc, x + dx - 2, y + dy - 2, 0);
}
#endif
}
if (bSaveEdges)
{
SetPixel(hdc, x, y, SavedPixels[0]);
SavedPixels[11] = GetPixel(hdc, x + dx - 1, y + dy - 2);
BltCard(hdc, x, y, dx, dy, hdcCard, dwRasterOp, bStretch);
SetPixel(hdc, x, y, SavedPixels[0]);
SetPixel(hdc, x + 1, y, SavedPixels[1]);
SetPixel(hdc, x, y + 1, SavedPixels[2]);
SetPixel(hdc, x + dx - 1, y, SavedPixels[3]);
@ -205,7 +212,11 @@ BOOL WINAPI cdtDrawExt(HDC hdc, INT x, INT y, INT dx, INT dy, INT card, INT type
SetPixel(hdc, x + dx - 1, y + dy - 1, SavedPixels[9]);
SetPixel(hdc, x + dx - 2, y + dy - 1, SavedPixels[10]);
SetPixel(hdc, x + dx - 1, y + dy - 2, SavedPixels[11]);
}
}
else
{
BltCard(hdc, x, y, dx, dy, hdcCard, dwRasterOp, bStretch);
}
SetBkColor(hdc, OldBkColor);
DeleteDC(hdcCard);
}

View file

@ -1114,8 +1114,8 @@ CreateToolhelp32Snapshot(DWORD dwFlags, DWORD th32ProcessID)
PDEBUG_BUFFER HeapDebug, ModuleDebug;
PVOID ProcThrdInfo;
ULONG ProcThrdInfoSize;
HANDLE hSnapShotSection;
NTSTATUS Status;
HANDLE hSnapShotSection = NULL;
if(th32ProcessID == 0)
{

View file

@ -404,7 +404,7 @@ GI_create_app(app_para *p)
Style = IntMapWindowStyle(p->ulStyle, &ExStyle);
/* convert the window caption to unicode */
MultiByteToWideChar(CP_UTF8, 0, p->cpName, -1, WindowName,
MultiByteToWideChar(CP_UTF8, 0, (char*)p->cpName, -1, WindowName,
sizeof(WindowName) / sizeof(WindowName[0]));
skw->Window.win_func = p->win_func;
@ -1076,7 +1076,7 @@ GI_create_menu_item(unsigned char *Text,
DBG("GI_create_menu_item(0x%x, 0x%x, 0x%x, 0x%x)\n",
Text, Id, Flags, Enabled);
TextLength = MultiByteToWideChar(CP_UTF8, 0, Text, -1, NULL, 0);
TextLength = MultiByteToWideChar(CP_UTF8, 0, (char*)Text, -1, NULL, 0);
MenuItem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(SKY_MENUITEM) + TextLength * sizeof(WCHAR));
if (MenuItem == NULL)
@ -1084,7 +1084,7 @@ GI_create_menu_item(unsigned char *Text,
return NULL;
}
lstrcpyA(MenuItem->MenuItem.text, Text);
lstrcpyA((char*)MenuItem->MenuItem.text, (char*)Text);
MenuItem->MenuItem.ID = Id;
MenuItem->MenuItem.flags = Flags;
MenuItem->MenuItem.enabled = Enabled;
@ -1099,7 +1099,7 @@ GI_create_menu_item(unsigned char *Text,
MenuItem->MenuItemInfo.wID = Id;
MenuItem->MenuItemInfo.dwTypeData = (LPWSTR)(MenuItem + 1);
MenuItem->MenuItemInfo.cch = TextLength;
MultiByteToWideChar(CP_UTF8, 0, Text, TextLength, (LPWSTR)(MenuItem + 1),
MultiByteToWideChar(CP_UTF8, 0, (char*)Text, TextLength, (LPWSTR)(MenuItem + 1),
TextLength);
return (widget_menu_item *)MenuItem;

View file

@ -315,6 +315,7 @@ DefWndStartSizeMove(HWND hWnd, WPARAM wParam, POINT *capturePoint)
}
else /* SC_SIZE */
{
pt.x = pt.y = 0;
while(!hittest)
{
if (GetMessageW(&msg, NULL, 0, 0) <= 0)

View file

@ -632,6 +632,13 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
result->faceName = (LPCWSTR)p;
p += wcslen( result->faceName ) + 1;
}
else
{
result->pointSize = 0;
result->weight = FW_DONTCARE;
result->italic = FALSE;
result->faceName = NULL;
}
/* First control is on dword boundary */
return (LPCSTR)((((int)p) + 3) & ~3);

View file

@ -459,9 +459,9 @@ InterlockedPopEntrySList(IN PSLIST_HEADER ListHead)
newslh.Sequence = oldslh.Sequence + 1;
newslh.Depth = oldslh.Depth - 1;
newslh.Next.Next = MmSafeReadPtr(&le->Next);
} while(ExfInterlockedCompareExchange64(&ListHead->Alignment,
&newslh.Alignment,
&oldslh.Alignment) != oldslh.Alignment);
} while(ExfInterlockedCompareExchange64((PLONGLONG)&ListHead->Alignment,
(PLONGLONG)&newslh.Alignment,
(PLONGLONG)&oldslh.Alignment) != oldslh.Alignment);
return le;
}
@ -485,9 +485,9 @@ InterlockedPushEntrySList(IN PSLIST_HEADER ListHead,
newslh.Depth = oldslh.Depth + 1;
newslh.Sequence = oldslh.Sequence + 1;
ListEntry->Next = oldslh.Next.Next;
} while(ExfInterlockedCompareExchange64(&ListHead->Alignment,
&newslh.Alignment,
&oldslh.Alignment) != oldslh.Alignment);
} while(ExfInterlockedCompareExchange64((PLONGLONG)&ListHead->Alignment,
(PLONGLONG)&newslh.Alignment,
(PLONGLONG)&oldslh.Alignment) != oldslh.Alignment);
return oldslh.Next.Next;
}

View file

@ -952,6 +952,7 @@ QSI_DEF(SystemPageFileInformation)
}
UNICODE_STRING FileName; /* FIXME */
RtlInitUnicodeString(&FileName, NULL); /* FIXME */
/* FIXME */
Spfi->NextEntryOffset = 0;

View file

@ -67,7 +67,7 @@ ExpWorkerThreadEntryPoint(IN PVOID Context)
ASSERT((NTSTATUS)QueueEntry != STATUS_TIMEOUT);
/* Increment Processed Work Items */
InterlockedIncrement(&WorkQueue->WorkItemsProcessed);
InterlockedIncrement((PLONG)&WorkQueue->WorkItemsProcessed);
/* Get the Work Item */
WorkItem = CONTAINING_RECORD(QueueEntry, WORK_QUEUE_ITEM, List);

View file

@ -185,7 +185,7 @@ typedef struct _KPRCB {
LONG MmMappedPagesWriteCount;
LONG MmMappedWriteIoCount;
ULONG SpareFields0[1];
UCHAR VendorString[13];
CHAR VendorString[13];
UCHAR InitialApicId;
UCHAR LogicalProcessorsPerPhysicalProcessor;
ULONG MHz;

View file

@ -159,16 +159,23 @@ IoBuildAsynchronousFsdRequest(ULONG MajorFunction,
IoFreeIrp(Irp);
return EXCEPTION_CONTINUE_SEARCH;
}
_SEH_TRY_FILTER(FreeAndGoOn)
_SEH_TRY
{
/* Do the probe */
MmProbeAndLockPages(Irp->MdlAddress, KernelMode, AccessType);
}
_SEH_HANDLE
{
return NULL;
/* Free the IRP and its MDL */
IoFreeMdl(Irp->MdlAddress);
IoFreeIrp(Irp);
/* FIXME - pass the exception to the caller? */
Irp = NULL;
}
_SEH_END;
if (!Irp)
return NULL;
}
else
{
@ -197,6 +204,7 @@ IoBuildAsynchronousFsdRequest(ULONG MajorFunction,
return Irp;
}
/*
* @implemented
*
@ -216,9 +224,9 @@ IoBuildAsynchronousFsdRequest(ULONG MajorFunction,
* RETURNS: The IRP allocated on success, or
* NULL on failure
*/
PIRP
PIRP
STDCALL
IoBuildDeviceIoControlRequest(ULONG IoControlCode,
IoBuildDeviceIoControlRequest (ULONG IoControlCode,
PDEVICE_OBJECT DeviceObject,
PVOID InputBuffer,
ULONG InputBufferLength,
@ -239,17 +247,17 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
"Event %x, IoStatusBlock %x\n",IoControlCode,DeviceObject,
InputBuffer,InputBufferLength,OutputBuffer,OutputBufferLength,
InternalDeviceIoControl,Event,IoStatusBlock);
/* Allocate IRP */
if (!(Irp = IoAllocateIrp(DeviceObject->StackSize,TRUE))) return Irp;
/* Get the Stack */
StackPtr = IoGetNextIrpStackLocation(Irp);
/* Set the DevCtl Type */
StackPtr->MajorFunction = InternalDeviceIoControl ?
StackPtr->MajorFunction = InternalDeviceIoControl ?
IRP_MJ_INTERNAL_DEVICE_CONTROL : IRP_MJ_DEVICE_CONTROL;
/* Set the IOCTL Data */
StackPtr->Parameters.DeviceIoControl.IoControlCode = IoControlCode;
StackPtr->Parameters.DeviceIoControl.InputBufferLength = InputBufferLength;
@ -260,16 +268,16 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
{
case METHOD_BUFFERED:
DPRINT("Using METHOD_BUFFERED!\n");
/* Select the right Buffer Length */
BufferLength = InputBufferLength > OutputBufferLength ? InputBufferLength : OutputBufferLength;
/* Make sure there is one */
if (BufferLength)
{
/* Allocate the System Buffer */
Irp->AssociatedIrp.SystemBuffer = ExAllocatePoolWithTag(NonPagedPool,
BufferLength,
Irp->AssociatedIrp.SystemBuffer = ExAllocatePoolWithTag(NonPagedPool,
BufferLength,
TAG_SYS_BUF);
/* Fail if we couldn't */
@ -278,20 +286,20 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
IoFreeIrp(Irp);
return(NULL);
}
/* Check if we got a buffer */
if (InputBuffer)
{
/* Copy into the System Buffer */
RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,
InputBuffer,
RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,
InputBuffer,
InputBufferLength);
}
/* Write the flags */
Irp->Flags = IRP_BUFFERED_IO | IRP_DEALLOCATE_BUFFER;
if (OutputBuffer) Irp->Flags |= IRP_INPUT_OPERATION;
/* Save the Buffer */
Irp->UserBuffer = OutputBuffer;
}
@ -311,8 +319,8 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
if (InputBuffer)
{
/* Allocate the System Buffer */
Irp->AssociatedIrp.SystemBuffer = ExAllocatePoolWithTag(NonPagedPool,
InputBufferLength,
Irp->AssociatedIrp.SystemBuffer = ExAllocatePoolWithTag(NonPagedPool,
InputBufferLength,
TAG_SYS_BUF);
/* Fail if we couldn't */
@ -321,12 +329,12 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
IoFreeIrp(Irp);
return(NULL);
}
/* Copy into the System Buffer */
RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,
InputBuffer,
RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,
InputBuffer,
InputBufferLength);
/* Write the flags */
Irp->Flags = IRP_BUFFERED_IO | IRP_DEALLOCATE_BUFFER;
}
@ -334,7 +342,7 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
{
Irp->Flags = 0;
}
/* Check if we got an output buffer */
if (OutputBuffer)
{
@ -351,16 +359,9 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
IoFreeIrp(Irp);
return NULL;
}
/* Probe and Lock */
_SEH_FILTER(FreeAndGoOn)
{
/* Free the MDL and IRP */
IoFreeMdl(Irp->MdlAddress);
IoFreeIrp(Irp);
return EXCEPTION_CONTINUE_SEARCH;
}
_SEH_TRY_FILTER(FreeAndGoOn)
_SEH_TRY
{
/* Use the right Access Type */
if (IO_METHOD_FROM_CTL_CODE(IoControlCode) == METHOD_IN_DIRECT)
@ -371,15 +372,22 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
{
AccessType = IoWriteAccess;
}
/* Do the probe */
MmProbeAndLockPages(Irp->MdlAddress, KernelMode, AccessType);
}
_SEH_HANDLE
{
return NULL;
/* Free the MDL and IRP */
IoFreeMdl(Irp->MdlAddress);
IoFreeIrp(Irp);
/* FIXME - pass the exception to the caller? */
Irp = NULL;
}
_SEH_END;
if (!Irp)
return NULL;
}
break;
@ -390,7 +398,7 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
StackPtr->Parameters.DeviceIoControl.Type3InputBuffer = InputBuffer;
break;
}
/* Now write the Event and IoSB */
if (!IoStatusBlock) KEBUGCHECK(0); /* Temporary to catch illegal ROS Drivers */
Irp->UserIosb = IoStatusBlock;
@ -399,7 +407,7 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
/* Sync IRPs are queued to requestor thread's irp cancel/cleanup list */
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
IoQueueThreadIrp(Irp);
/* Return the IRP */
return Irp;
}

View file

@ -376,7 +376,7 @@ KeBugCheckWithTf(ULONG BugCheckCode,
}
/* There can only be one Bugcheck per Bootup */
if (!InterlockedDecrement(&KeBugCheckCount)) {
if (!InterlockedDecrement((PLONG)&KeBugCheckCount)) {
#ifdef CONFIG_SMP
ULONG i;

View file

@ -86,7 +86,7 @@ KiAcquireGuardedMutexContented(PKGUARDED_MUTEX GuardedMutex)
LONG OldValue;
/* Increase the contention count */
InterlockedIncrement(&GuardedMutex->Contention);
InterlockedIncrement((PLONG)&GuardedMutex->Contention);
/* Start by unlocking the Guarded Mutex */
BitsToRemove = GM_LOCK_BIT;

View file

@ -367,7 +367,7 @@ Elf64FmtCreateSection
PMM_SECTION_SEGMENT pssSegments;
Elf_Addr nImageBase = 0;
Elf_Addr nEntryPoint;
ULONG32 nPrevVirtualEndOfSegment;
ULONG32 nPrevVirtualEndOfSegment = 0;
ULONG i;
ULONG j;

View file

@ -2011,7 +2011,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
{
KEBUGCHECK(0);
}
InterlockedExchange(Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY)));
InterlockedExchange((PLONG)Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY)));
MiFlushTlb(Pt, Address);
}
}
@ -2201,7 +2201,7 @@ MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
else
{
ULONG Entry;
Entry = InterlockedExchange(ADDR_TO_PTE(Address), PFN_TO_PTE(NewPage) | PA_PRESENT | PA_READWRITE);
Entry = InterlockedExchange((PLONG)ADDR_TO_PTE(Address), PFN_TO_PTE(NewPage) | PA_PRESENT | PA_READWRITE);
Pfn = PTE_TO_PFN(Entry);
}
FLUSH_TLB_ONE(Address);
@ -2222,7 +2222,7 @@ MmDeleteHyperspaceMapping(PVOID Address)
else
{
ULONG Entry;
Entry = InterlockedExchange(ADDR_TO_PTE(Address), 0);
Entry = InterlockedExchange((PLONG)ADDR_TO_PTE(Address), 0);
Pfn = PTE_TO_PFN(Entry);
}
FLUSH_TLB_ONE(Address);

View file

@ -47,6 +47,8 @@ ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
if(AccessMode != KernelMode)
{
RtlZeroMemory(&AttributesCopy, sizeof(AttributesCopy));
_SEH_TRY
{
ProbeForRead(ObjectAttributes,
@ -140,6 +142,8 @@ ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
if(AttributesCopy.SecurityQualityOfService != NULL)
{
SECURITY_QUALITY_OF_SERVICE SafeQoS;
RtlZeroMemory(&SafeQoS, sizeof(SafeQoS));
_SEH_TRY
{
@ -193,6 +197,8 @@ ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
if(AccessMode != KernelMode)
{
RtlZeroMemory(&OriginalCopy, sizeof(OriginalCopy));
_SEH_TRY
{
/* probe the ObjectName structure and make a local stack copy of it */

View file

@ -466,6 +466,8 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
else
{
PWSTR StrSource = NULL;
RtlZeroMemory(&LocalDest, sizeof(LocalDest));
/* create a DstPath structure on the stack */
_SEH_TRY
@ -805,6 +807,8 @@ NtSetInformationProcess(IN HANDLE ProcessHandle,
PROCESS_SESSION_INFORMATION SessionInfo;
Status = STATUS_SUCCESS;
RtlZeroMemory(&SessionInfo, sizeof(SessionInfo));
_SEH_TRY
{
/* copy the structure to the stack */

View file

@ -34,6 +34,8 @@ RtlCaptureUnicodeString(OUT PUNICODE_STRING Dest,
if(CurrentMode == UserMode)
{
RtlZeroMemory(&Src, sizeof(Src));
_SEH_TRY
{
ProbeForRead(UnsafeSrc,

View file

@ -301,6 +301,8 @@ SeCaptureSecurityDescriptor(
{
if(CurrentMode != KernelMode)
{
RtlZeroMemory(&DescriptorCopy, sizeof(DescriptorCopy));
_SEH_TRY
{
/* first only probe and copy until the control field of the descriptor

View file

@ -1212,7 +1212,7 @@ DirPrintWideList(LPWIN32_FIND_DATA ptrFiles[], /* [IN] Files' Info */
TCHAR *szCurPath, /* [IN] Full path of current directory */
LPDIRSWITCHFLAGS lpFlags) /* [IN] The flags used */
{
USHORT iScreenWidth;
SHORT iScreenWidth;
USHORT iColumns;
USHORT iLines;
INT iLongestName;

View file

@ -68,7 +68,7 @@ PCHAR RegReadString( HKEY Root, PCHAR Subkey, PCHAR Value ) {
DH_DbgPrint(MID_TRACE,("Got Key %x\n", ValueKey));
if( (Error = RegQueryValueEx( ValueKey, Value, NULL, NULL,
SubOut, &SubOutLen )) != ERROR_SUCCESS )
(LPBYTE)SubOut, &SubOutLen )) != ERROR_SUCCESS )
goto regerror;
DH_DbgPrint(MID_TRACE,("Value %s has size %d\n", Value, SubOutLen));
@ -77,7 +77,7 @@ PCHAR RegReadString( HKEY Root, PCHAR Subkey, PCHAR Value ) {
goto regerror;
if( (Error = RegQueryValueEx( ValueKey, Value, NULL, NULL,
SubOut, &SubOutLen )) != ERROR_SUCCESS )
(LPBYTE)SubOut, &SubOutLen )) != ERROR_SUCCESS )
goto regerror;
DH_DbgPrint(MID_TRACE,("Value %s is %s\n", Value, SubOut));
@ -159,7 +159,7 @@ BOOL PrepareAdapterForService( PDHCP_ADAPTER Adapter ) {
MIB_IPFORWARDROW DefGatewayRow;
Adapter->DhclientState.config = &Adapter->DhclientConfig;
strncpy(Adapter->DhclientInfo.name, Adapter->IfMib.bDescr,
strncpy(Adapter->DhclientInfo.name, (char*)Adapter->IfMib.bDescr,
sizeof(Adapter->DhclientInfo.name));
AdapterKey = FindAdapterKey( Adapter );

View file

@ -474,7 +474,7 @@ void set_name_servers( struct client_lease *new_lease ) {
* Recheck the +1 below.
*/
RegSetValueEx( RegKey, "NameServer", 0, REG_SZ,
nsbuf, strlen(nsbuf) + 1 );
(LPBYTE)nsbuf, strlen(nsbuf) + 1 );
free( nsbuf );
}

View file

@ -49,7 +49,7 @@ typedef struct _DHCP_ADAPTER {
struct client_config DhclientConfig;
struct sockaddr_in ListenAddr;
unsigned int BindStatus;
char recv_buf[1];
unsigned char recv_buf[1];
} DHCP_ADAPTER, *PDHCP_ADAPTER;
#include <rosdhcp_public.h>

View file

@ -310,6 +310,7 @@ IntUserMapSharedSection(IN PSHARED_SECTION_POOL SharedSectionPool,
ASSERT(SharedSectionPool && Process && SystemMappedBase && UserMappedBase);
SectionObject = NULL;
SharedSection = NULL;
ExAcquireFastMutex(&SharedSectionPool->Lock);

View file

@ -241,7 +241,7 @@ IntGdiCreateDIBBrush(
ULONG_PTR DataPtr;
UINT PaletteEntryCount;
PBITMAPOBJ BitmapObject;
UINT PaletteType;
INT PaletteType;
if (BitmapInfo->bmiHeader.biSize < sizeof(BITMAPINFOHEADER))
{

View file

@ -611,8 +611,10 @@ int write_nls_files()
static WORD *to_upper_org = NULL, *to_lower_org = NULL;
#if 0
static WORD diffs[256];
static int number_of_diffs;
#endif
static WORD number_of_subtables_with_diffs;
/* pointers to subtables with 16 elements in each to the main table */
@ -624,7 +626,7 @@ static WORD subtables_with_offsets[4096 * 16];
static void test_packed_table(WCHAR *table)
{
WCHAR test_str[] = L"This is an English text. Ïî-ðóññêè ÿ ïèñàòü óìåþ íåìíîæêî. 1234567890";
WCHAR test_str[] = L"This is an English text. \x0CF\x0EE-\x0F0\x0F3\x0F1\x0F1\x0EA\x0E8 \x0FF \x0EF\x0E8\x0F1\x0E0\x0F2\x0FC \x0F3\x0EC\x0E5\x0FE \x0ED\x0E5\x0EC\x0ED\x0EE\x0E6\x0EA\x0EE. 1234567890";
//WORD diff, off;
//WORD *sub_table;
DWORD i, len;
@ -805,6 +807,7 @@ static BOOL CreateCaseDiff(char *table_name)
return TRUE;
}
#if 0
static int find_diff(WORD diff)
{
int i;
@ -816,6 +819,7 @@ static int find_diff(WORD diff)
return -1;
}
#endif
static WORD find_subtable_with_diffs(WORD *table, WORD *subtable)
{

View file

@ -196,7 +196,7 @@ typedef struct _KEY_CELL
USHORT ClassSize;
/* Name of key (not zero terminated) */
UCHAR Name[0];
CHAR Name[0];
} GCC_PACKED KEY_CELL, *PKEY_CELL;
/* KEY_CELL.Type constants */
@ -237,7 +237,7 @@ typedef struct _VALUE_CELL
ULONG DataType;
USHORT Flags;
USHORT Unused1;
UCHAR Name[0]; /* warning : not zero terminated */
CHAR Name[0]; /* warning : not zero terminated */
} GCC_PACKED VALUE_CELL, *PVALUE_CELL;
/* VALUE_CELL.Flags constants */
@ -250,7 +250,7 @@ typedef struct _VALUE_CELL
typedef struct _DATA_CELL
{
LONG CellSize;
UCHAR Data[0];
CHAR Data[0];
} GCC_PACKED DATA_CELL, *PDATA_CELL;
#ifdef _MSC_VER
@ -1028,7 +1028,7 @@ CmiExportValue (PREGISTRY_HIVE Hive,
ULONG SrcDataSize;
ULONG DstDataSize;
ULONG DataType;
PUCHAR Data;
PCHAR Data;
BOOL Expand = FALSE;
DPRINT ("CmiExportValue('%s') called\n", (Value == NULL) ? "<default>" : (PCHAR)Value->Name);

View file

@ -1192,7 +1192,7 @@ InfGetFieldCount(PINFCONTEXT Context)
BOOL
InfGetBinaryField (PINFCONTEXT Context,
ULONG FieldIndex,
PUCHAR ReturnBuffer,
PCHAR ReturnBuffer,
ULONG ReturnBufferSize,
PULONG RequiredSize)
{
@ -1200,7 +1200,7 @@ InfGetBinaryField (PINFCONTEXT Context,
PINFCACHEFIELD CacheField;
ULONG Index;
ULONG Size;
PUCHAR Ptr;
PCHAR Ptr;
if (Context == NULL || Context->Line == NULL || FieldIndex == 0)
{
@ -1234,7 +1234,7 @@ InfGetBinaryField (PINFCONTEXT Context,
Ptr = ReturnBuffer;
while (CacheField != NULL)
{
*Ptr = (UCHAR)strtoul (CacheField->Data, NULL, 16);
*Ptr = (CHAR)strtoul (CacheField->Data, NULL, 16);
Ptr++;
CacheField = CacheField->Next;

View file

@ -92,7 +92,7 @@ InfGetFieldCount (PINFCONTEXT Context);
BOOL
InfGetBinaryField (PINFCONTEXT Context,
ULONG FieldIndex,
PUCHAR ReturnBuffer,
PCHAR ReturnBuffer,
ULONG ReturnBufferSize,
PULONG RequiredSize);

View file

@ -124,7 +124,7 @@ AppendMultiSzValue (HKEY KeyHandle,
Error = RegQueryValue (KeyHandle,
ValueName,
NULL,
(PUCHAR)Buffer,
(PCHAR)Buffer,
&Size);
if (Error != ERROR_SUCCESS)
goto done;
@ -154,7 +154,7 @@ AppendMultiSzValue (HKEY KeyHandle,
RegSetValue (KeyHandle,
ValueName,
REG_MULTI_SZ,
(PUCHAR)Buffer,
(PCHAR)Buffer,
Total);
}
@ -331,7 +331,7 @@ do_reg_operation(HKEY KeyHandle,
}
else /* get the binary data */
{
PUCHAR Data = NULL;
PCHAR Data = NULL;
if (!InfGetBinaryField (Context, 5, NULL, 0, &Size))
Size = 0;

View file

@ -58,7 +58,7 @@ RegInitializeRegistry(VOID)
RootKey->ValueCount = 0;
RootKey->NameSize = 2;
RootKey->Name = (PUCHAR)malloc(2);
RootKey->Name = (PCHAR)malloc(2);
strcpy(RootKey->Name, "\\");
RootKey->DataType = 0;
@ -82,7 +82,7 @@ RegInitializeRegistry(VOID)
RegSetValue(LinkKey,
NULL,
REG_LINK,
(PUCHAR)&ControlSetKey,
(PCHAR)&ControlSetKey,
sizeof(PVOID));
/* Create HARDWARE key */
@ -392,7 +392,7 @@ LONG
RegSetValue(HKEY Key,
PCHAR ValueName,
ULONG Type,
PUCHAR Data,
PCHAR Data,
ULONG DataSize)
{
PLIST_ENTRY Ptr;
@ -404,12 +404,12 @@ RegSetValue(HKEY Key,
if ((ValueName == NULL) || (*ValueName == 0))
{
/* set default value */
if ((Key->Data != NULL) && (Key->DataSize > sizeof(PUCHAR)))
if ((Key->Data != NULL) && (Key->DataSize > sizeof(PCHAR)))
{
free(Key->Data);
}
if (DataSize <= sizeof(PUCHAR))
if (DataSize <= sizeof(PCHAR))
{
Key->DataSize = DataSize;
Key->DataType = Type;
@ -417,7 +417,7 @@ RegSetValue(HKEY Key,
}
else
{
Key->Data = (PUCHAR)malloc(DataSize);
Key->Data = (PCHAR)malloc(DataSize);
Key->DataSize = DataSize;
Key->DataType = Type;
memcpy(Key->Data, Data, DataSize);
@ -462,12 +462,12 @@ RegSetValue(HKEY Key,
}
/* set new value */
if ((Value->Data != NULL) && (Value->DataSize > sizeof(PUCHAR)))
if ((Value->Data != NULL) && (Value->DataSize > sizeof(PCHAR)))
{
free(Value->Data);
}
if (DataSize <= sizeof(PUCHAR))
if (DataSize <= sizeof(PCHAR))
{
Value->DataSize = DataSize;
Value->DataType = Type;
@ -475,7 +475,7 @@ RegSetValue(HKEY Key,
}
else
{
Value->Data = (PUCHAR)malloc(DataSize);
Value->Data = (PCHAR)malloc(DataSize);
if (Value->Data == NULL)
return(ERROR_OUTOFMEMORY);
Value->DataType = Type;
@ -491,7 +491,7 @@ LONG
RegQueryValue(HKEY Key,
PCHAR ValueName,
PULONG Type,
PUCHAR Data,
PCHAR Data,
PULONG DataSize)
{
ULONG Size;
@ -508,7 +508,7 @@ RegQueryValue(HKEY Key,
*Type = Key->DataType;
if ((Data != NULL) && (DataSize != NULL))
{
if (Key->DataSize <= sizeof(PUCHAR))
if (Key->DataSize <= sizeof(PCHAR))
{
Size = min(Key->DataSize, *DataSize);
memcpy(Data, &Key->Data, Size);
@ -551,7 +551,7 @@ RegQueryValue(HKEY Key,
*Type = Value->DataType;
if ((Data != NULL) && (DataSize != NULL))
{
if (Value->DataSize <= sizeof(PUCHAR))
if (Value->DataSize <= sizeof(PCHAR))
{
Size = min(Value->DataSize, *DataSize);
memcpy(Data, &Value->Data, Size);
@ -615,7 +615,7 @@ RegDeleteValue(HKEY Key,
Value->Name = NULL;
Value->NameSize = 0;
if (Value->DataSize > sizeof(PUCHAR))
if (Value->DataSize > sizeof(PCHAR))
{
if (Value->Data != NULL)
free(Value->Data);
@ -637,7 +637,7 @@ RegEnumValue(HKEY Key,
PCHAR ValueName,
PULONG NameSize,
PULONG Type,
PUCHAR Data,
PCHAR Data,
PULONG DataSize)
{
PLIST_ENTRY Ptr;

View file

@ -47,12 +47,12 @@ typedef struct _REG_KEY
ULONG ValueCount;
USHORT NameSize;
PUCHAR Name;
PCHAR Name;
/* default data */
ULONG DataType;
ULONG DataSize;
PUCHAR Data;
PCHAR Data;
} KEY, *HKEY, **PHKEY;
@ -62,12 +62,12 @@ typedef struct _REG_VALUE
/* value name */
ULONG NameSize;
PUCHAR Name;
PCHAR Name;
/* value data */
ULONG DataType;
ULONG DataSize;
PUCHAR Data;
PCHAR Data;
} VALUE, *PVALUE;
@ -260,14 +260,14 @@ LONG
RegSetValue(HKEY Key,
PCHAR ValueName,
ULONG Type,
PUCHAR Data,
PCHAR Data,
ULONG DataSize);
LONG
RegQueryValue(HKEY Key,
PCHAR ValueName,
PULONG Type,
PUCHAR Data,
PCHAR Data,
PULONG DataSize);
LONG
@ -280,7 +280,7 @@ RegEnumValue(HKEY Key,
PCHAR ValueName,
PULONG NameSize,
PULONG Type,
PUCHAR Data,
PCHAR Data,
PULONG DataSize);
USHORT

View file

@ -297,7 +297,7 @@ static int ctl2_encode_name(
converted_name[1] = 0x00;
value = lhash_val_of_name_sys(typelib->typelib_header.varflags & 0x0f, typelib->typelib_header.lcid, converted_name + 4);
value = lhash_val_of_name_sys(typelib->typelib_header.varflags & 0x0f, typelib->typelib_header.lcid, (LPCSTR)converted_name + 4);
converted_name[2] = value;
converted_name[3] = value >> 8;

View file

@ -142,7 +142,7 @@ static void get_string( struct string_id *str )
}
else
{
char *p = xmalloc( (strlen(file_pos) + 1) );
char *p = xmalloc( (strlen((char*)file_pos) + 1) );
str->str = p;
str->id = 0;
while ((*p++ = get_byte()));

View file

@ -205,7 +205,7 @@ static void load_next_resource( DLLSPEC *spec )
get_dword(); /* skip version */
get_dword(); /* skip characteristics */
file_pos = (const char *)res->data + res->data_size;
file_pos = (const unsigned char *)res->data + res->data_size;
if (file_pos > file_end) fatal_error( "%s is a truncated file\n", file_name );
}

View file

@ -78,13 +78,13 @@ const char *get_typename(const resource_t* r)
* Remarks : No codepage translation is done.
*****************************************************************************
*/
static char *strncpyWtoA(char *cs, const short *ws, int maxlen)
static char *strncpyWtoA(char *cs, WCHAR *ws, int maxlen)
{
char *cptr = cs;
const short *wsMax = ws + maxlen - 1;
WCHAR *wsMax = ws + maxlen - 1;
while(*ws && ws < wsMax)
{
if(*ws < -128 || *ws > 127)
if((short)*ws < -128 || (short)*ws > 127)
fprintf(stderr, "***Warning: Unicode string contains non-printable chars***\n");
*cptr++ = (char)*ws++;
}

View file

@ -1755,7 +1755,7 @@ char *prep_nid_for_label(const name_id_t *nid)
if(nid->type == name_str && nid->name.s_name->type == str_unicode)
{
short *sptr;
WCHAR *sptr;
int i;
sptr = nid->name.s_name->str.wstr;
buf[0] = '\0';

View file

@ -232,7 +232,7 @@ static resource_t *read_res32(FILE *fp)
str = new_string();
str->type = str_unicode;
str->size = (idx - tag) / 2;
str->str.wstr = (short *)xmalloc(idx-tag+2);
str->str.wstr = (WCHAR *)xmalloc(idx-tag+2);
memcpy(str->str.wstr, &res->data[tag], idx-tag);
str->str.wstr[str->size] = 0;
type = new_name_id();
@ -266,7 +266,7 @@ static resource_t *read_res32(FILE *fp)
str = new_string();
str->type = str_unicode;
str->size = (idx - tag) / 2;
str->str.wstr = (short *)xmalloc(idx-tag+2);
str->str.wstr = (WCHAR *)xmalloc(idx-tag+2);
memcpy(str->str.wstr, &res->data[tag], idx-tag);
str->str.wstr[str->size] = 0;
name = new_name_id();