fixed some warnings with gcc4 (mostly assignment differs in signedness warnings)
authorThomas Bluemel <thomas@reactsoft.com>
Sun, 1 May 2005 19:30:06 +0000 (19:30 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Sun, 1 May 2005 19:30:06 +0000 (19:30 +0000)
svn path=/trunk/; revision=14919

95 files changed:
reactos/boot/freeldr/freeldr/arch/i386/hardware.c
reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c
reactos/boot/freeldr/freeldr/arch/i386/hwapm.c
reactos/boot/freeldr/freeldr/arch/i386/hwcpu.c
reactos/boot/freeldr/freeldr/arch/i386/hwpci.c
reactos/boot/freeldr/freeldr/bootmgr.c
reactos/boot/freeldr/freeldr/custom.c
reactos/boot/freeldr/freeldr/disk/disk.c
reactos/boot/freeldr/freeldr/drivemap.c
reactos/boot/freeldr/freeldr/fs/ext2.c
reactos/boot/freeldr/freeldr/fs/ext2.h
reactos/boot/freeldr/freeldr/fs/fat.c
reactos/boot/freeldr/freeldr/fs/fat.h
reactos/boot/freeldr/freeldr/fs/fs.c
reactos/boot/freeldr/freeldr/fs/iso.c
reactos/boot/freeldr/freeldr/fs/iso.h
reactos/boot/freeldr/freeldr/fs/ntfs.c
reactos/boot/freeldr/freeldr/fs/ntfs.h
reactos/boot/freeldr/freeldr/include/bootmgr.h
reactos/boot/freeldr/freeldr/include/disk.h
reactos/boot/freeldr/freeldr/include/drivemap.h
reactos/boot/freeldr/freeldr/include/fs.h
reactos/boot/freeldr/freeldr/include/inifile.h
reactos/boot/freeldr/freeldr/include/linux.h
reactos/boot/freeldr/freeldr/include/miscboot.h
reactos/boot/freeldr/freeldr/include/multiboot.h
reactos/boot/freeldr/freeldr/include/oslist.h
reactos/boot/freeldr/freeldr/include/reactos.h
reactos/boot/freeldr/freeldr/include/ui.h
reactos/boot/freeldr/freeldr/include/version.h
reactos/boot/freeldr/freeldr/inifile/ini.h
reactos/boot/freeldr/freeldr/inifile/ini_init.c
reactos/boot/freeldr/freeldr/inifile/inifile.c
reactos/boot/freeldr/freeldr/inifile/parse.c
reactos/boot/freeldr/freeldr/linuxboot.c
reactos/boot/freeldr/freeldr/miscboot.c
reactos/boot/freeldr/freeldr/options.c
reactos/boot/freeldr/freeldr/oslist.c
reactos/boot/freeldr/freeldr/reactos/arcname.c
reactos/boot/freeldr/freeldr/reactos/binhive.c
reactos/boot/freeldr/freeldr/reactos/reactos.c
reactos/boot/freeldr/freeldr/reactos/registry.c
reactos/boot/freeldr/freeldr/reactos/registry.h
reactos/boot/freeldr/freeldr/ui/tui.c
reactos/boot/freeldr/freeldr/ui/tui.h
reactos/boot/freeldr/freeldr/ui/tuimenu.c
reactos/boot/freeldr/freeldr/ui/ui.c
reactos/boot/freeldr/freeldr/version.c
reactos/drivers/bus/serenum/pdo.c
reactos/hal/halx86/include/mps.h
reactos/include/ntos/rtltypes.h
reactos/lib/adns/src/event.c
reactos/lib/adns/src/general.c
reactos/lib/adns/src/parse.c
reactos/lib/adns/src/query.c
reactos/lib/adns/src/reply.c
reactos/lib/adns/src/transmit.c
reactos/lib/adns/src/types.c
reactos/lib/cards/cards.c
reactos/lib/kernel32/misc/toolhelp.c
reactos/lib/rosky/libskygi/libskygi.c
reactos/lib/user32/windows/defwnd.c
reactos/lib/user32/windows/dialog.c
reactos/ntoskrnl/ex/list.c
reactos/ntoskrnl/ex/sysinfo.c
reactos/ntoskrnl/ex/work.c
reactos/ntoskrnl/include/internal/i386/ps.h
reactos/ntoskrnl/io/irp.c
reactos/ntoskrnl/ke/bug.c
reactos/ntoskrnl/ke/gmutex.c
reactos/ntoskrnl/mm/elf.inc.h
reactos/ntoskrnl/mm/i386/page.c
reactos/ntoskrnl/ob/object.c
reactos/ntoskrnl/ps/query.c
reactos/ntoskrnl/rtl/capture.c
reactos/ntoskrnl/se/sd.c
reactos/subsys/system/cmd/dir.c
reactos/subsys/system/dhcp/adapter.c
reactos/subsys/system/dhcp/dhclient.c
reactos/subsys/system/dhcp/include/rosdhcp.h
reactos/subsys/win32k/misc/ssec.c
reactos/subsys/win32k/objects/brush.c
reactos/tools/create_nls/create_nls.c
reactos/tools/mkhive/binhive.c
reactos/tools/mkhive/infcache.c
reactos/tools/mkhive/infcache.h
reactos/tools/mkhive/reginf.c
reactos/tools/mkhive/registry.c
reactos/tools/mkhive/registry.h
reactos/tools/widl/write_msft.c
reactos/tools/winebuild/res16.c
reactos/tools/winebuild/res32.c
reactos/tools/wrc/dumpres.c
reactos/tools/wrc/genres.c
reactos/tools/wrc/readres.c

index 71876f1..c70b6de 100644 (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)
index f7c7fd8..ce935c0 100644 (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)
        {
index a4c43b1..ccb17bd 100644 (file)
@@ -95,7 +95,7 @@ DetectApmBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
       Error = RegSetValue(BiosKey,
                          "Identifier",
                          REG_SZ,
-                         (PUCHAR)"APM",
+                         "APM",
                          4);
       if (Error != ERROR_SUCCESS)
        {
index 072d60d..c3a3f90 100644 (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)
        {
index c4cba0a..066a65a 100644 (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)
index fa7f3a4..fad99cc 100644 (file)
 
 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;
 
index da0da41..a3f0da0 100644 (file)
 #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;
 
index 9a3e683..600cff3 100644 (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)
        {
index 5a5ff3d..f7b4266 100644 (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;
 
index 8825c87..7f5cffa 100644 (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));
index 5f3f02d..84d1a21 100644 (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);
index 973cf55..53aa976 100644 (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;
index d697e48..96af689 100644 (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);
index 7bb4488..fedf30e 100644 (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;
 
index 58e881b..e02af6c 100644 (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;
index db549a4..e0be69b 100644 (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);
index fc8505a..992865c 100644 (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;
index 5c99fb9..ae64c37 100644 (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);
index 9d61a17..2a3e3e9 100644 (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);
 
index dc5abcb..120289a 100644 (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
index 2aeaf66..e2d19cb 100644 (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
 
index 2af910e..4b2bb6e 100644 (file)
 #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
index 4b21836..6c03574 100644 (file)
 
 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
index dc19f97..6de9e6d 100644 (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);
index bbd4110..51eb9ed 100644 (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
index 0e50e08..30af11d 100644 (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,
index 3376df9..ea67c67 100644 (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
index c553754..b64c823 100644 (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
index 997b1e6..fcae957 100644 (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);
 
 
 
index b51df4a..7f78733 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef ASM
 
-PUCHAR GetFreeLoaderVersionString(VOID);
+PCHAR  GetFreeLoaderVersionString(VOID);
 
 #endif // ASM
 
index 64bd038..c80930a 100644 (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
index b145c11..84ba9ed 100644 (file)
@@ -28,7 +28,7 @@
 BOOL IniFileInitialize(VOID)
 {
        PFILE   Freeldr_Ini;    // File handle for freeldr.ini
-       PUCHAR  FreeLoaderIniFileData;
+       PCHAR   FreeLoaderIniFileData;
        ULONG           FreeLoaderIniFileSize;
        BOOL    Success;
 
index 9f8c19b..feb05bc 100644 (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;
index 87f6bbd..48ce81c 100644 (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;
index 255c9ea..1f1ab1b 100644 (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);
index 3d592fd..0df75e3 100644 (file)
 #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;
 
index 4260283..70051ed 100644 (file)
@@ -27,7 +27,7 @@
 #include <arch.h>
 
 
-PUCHAR OptionsMenuList[] =
+PCHAR  OptionsMenuList[] =
 {
        "Safe Mode",
        "Safe Mode with Networking",
index 4dbe7ed..6454b09 100644 (file)
 #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
index f65ca5b..973b7e6 100644 (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;
index 8a94e81..e34ff86 100644 (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)
index df45612..813eea9 100644 (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];
index ffc0f1a..c9c19db 100644 (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;
index 6876301..497d3f7 100644 (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
index c88f665..a125ef7 100644 (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;
index 8aeb842..09d61eb 100644 (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);
 
 
 /*
index cb3c173..0ede705 100644 (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;
index 0b11262..5358ff5 100644 (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)
        {
index d532eec..f280d2d 100644 (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)
        {
index 02d6c4c..615f051 100644 (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;
index b25a415..bcd6a33 100644 (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
index 7674f09..71d1628 100755 (executable)
@@ -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
index d07a201..4dd61f5 100644 (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) {
index 832e69e..4d24fda 100644 (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:
index 78154b6..3d54638 100644 (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;
 }
        
index ea73518..f8b8bf4 100644 (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;
     }
index d264e29..9aae6fe 100644 (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; }
 
index 62df41f..6b25adb 100644 (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; }
index b0948a0..d200c22 100644 (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;
   }
index 9c78feb..f8b1d42 100644 (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);
        }
index 0ccb5f6..e818a53 100644 (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)
   {
index 5f7c433..b0f50cc 100644 (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;
index 70632b9..19a803c 100644 (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)
index 53775c1..9209b80 100644 (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);
index 5909597..24746a0 100644 (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;
 }
index 4546b75..9351c3c 100644 (file)
@@ -952,6 +952,7 @@ QSI_DEF(SystemPageFileInformation)
        }
 
        UNICODE_STRING FileName; /* FIXME */
+       RtlInitUnicodeString(&FileName, NULL); /* FIXME */
 
        /* FIXME */
        Spfi->NextEntryOffset = 0;
index 0a5f82f..844c5a3 100644 (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);
index 0180868..9882d69 100644 (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;
index ed84e50..6ea7516 100644 (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;
 }
index 72ad4e3..a22b8a0 100644 (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;
index 62130ce..f0df282 100644 (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;
index 70e3e97..03ef00c 100644 (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;
 
index 484b2e6..25dc1ca 100644 (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);
index d2e686d..99a6d5d 100644 (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 */
index ab7d5a0..3e6034c 100644 (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 */
index 8eb7529..aebacaf 100644 (file)
@@ -34,6 +34,8 @@ RtlCaptureUnicodeString(OUT PUNICODE_STRING Dest,
   
   if(CurrentMode == UserMode)
   {
+    RtlZeroMemory(&Src, sizeof(Src));
+    
     _SEH_TRY
     {
       ProbeForRead(UnsafeSrc,
index 3e12f80..9f55266 100644 (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
index efab42b..b956934 100644 (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;
index 713a7f7..ff3f80c 100644 (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 );
index 0fd87f4..1976130 100644 (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 );
         }
index bf2a43f..70b0bf8 100644 (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>
index 8dd28a8..b62e3d4 100644 (file)
@@ -310,6 +310,7 @@ IntUserMapSharedSection(IN PSHARED_SECTION_POOL SharedSectionPool,
   ASSERT(SharedSectionPool && Process && SystemMappedBase && UserMappedBase);
 
   SectionObject = NULL;
+  SharedSection = NULL;
 
   ExAcquireFastMutex(&SharedSectionPool->Lock);
 
index 9dee1e9..91e5011 100644 (file)
@@ -241,7 +241,7 @@ IntGdiCreateDIBBrush(
    ULONG_PTR DataPtr;
    UINT PaletteEntryCount;
    PBITMAPOBJ BitmapObject;
-   UINT PaletteType;
+   INT PaletteType;
 
    if (BitmapInfo->bmiHeader.biSize < sizeof(BITMAPINFOHEADER))
    {
index c3c31ba..47b675e 100644 (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)
 {
index d9788cc..ddf3a47 100644 (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);
index a10d2b6..f274a08 100644 (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;
index 40403b3..848e375 100644 (file)
@@ -92,7 +92,7 @@ InfGetFieldCount (PINFCONTEXT Context);
 BOOL
 InfGetBinaryField (PINFCONTEXT Context,
                   ULONG FieldIndex,
-                  PUCHAR ReturnBuffer,
+                  PCHAR ReturnBuffer,
                   ULONG ReturnBufferSize,
                   PULONG RequiredSize);
 
index 73cfd41..120069f 100644 (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;
index 9ea4751..105f897 100644 (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;
index 4ff26f3..3105eb4 100644 (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
index c9ae86a..e59e454 100644 (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;
index 92dca83..a5fd584 100644 (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()));
index 8513863..6fb12ad 100644 (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 );
 }
 
index 53cc64e..914b10d 100644 (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++;
        }
index 7a33e92..88a9ce1 100644 (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';
index ae80cf2..993e1d3 100644 (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();