diff --git a/reactos/boot/freeldr/freeldr/arch/i386/archmach.c b/reactos/boot/freeldr/freeldr/arch/i386/archmach.c index c8171b0208c..d09f1dde2bb 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/archmach.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/archmach.c @@ -27,7 +27,7 @@ #include "rtl.h" VOID -MachInit(char *CmdLine) +MachInit(const char *CmdLine) { ULONG PciId; diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machpc.c b/reactos/boot/freeldr/freeldr/arch/i386/machpc.c index eae1bb06995..dce27b27f83 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machpc.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/machpc.c @@ -26,7 +26,7 @@ #include "i386.h" VOID -PcMachInit(char *CmdLine) +PcMachInit(const char *CmdLine) { EnableA20(); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machpc.h b/reactos/boot/freeldr/freeldr/arch/i386/machpc.h index 7a2a6eb58b8..85c9ca850d1 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machpc.h +++ b/reactos/boot/freeldr/freeldr/arch/i386/machpc.h @@ -26,7 +26,7 @@ #include "mm.h" #endif -VOID PcMachInit(char *CmdLine); +VOID PcMachInit(const char *CmdLine); VOID PcConsPutChar(int Ch); BOOL PcConsKbHit(); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c index fe3c6dbccd7..bf4df218a75 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c @@ -24,7 +24,7 @@ #include "i386.h" VOID -XboxMachInit(char *CmdLine) +XboxMachInit(const char *CmdLine) { /* Initialize our stuff */ XboxMemInit(); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.h b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.h index d82cdc8f246..641852e02a4 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.h +++ b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.h @@ -26,7 +26,7 @@ UCHAR XboxFont8x16[256 * 16]; -VOID XboxMachInit(char *CmdLine); +VOID XboxMachInit(const char *CmdLine); VOID XboxConsPutChar(int Ch); BOOL XboxConsKbHit(); diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c b/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c index fcdd6fa2728..efd6addc775 100644 --- a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c +++ b/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c @@ -279,7 +279,7 @@ void PpcInit( of_proxy the_ofproxy ) { BootMain("freeldr-ppc"); } -void MachInit(char *CmdLine) { +void MachInit(const char *CmdLine) { int len; printf( "Determining boot device:\n" ); len = ofw_getprop(chosen_package, "bootpath", diff --git a/reactos/boot/freeldr/freeldr/bootmgr.c b/reactos/boot/freeldr/freeldr/bootmgr.c index fad99cc42af..896f7a6fe13 100644 --- a/reactos/boot/freeldr/freeldr/bootmgr.c +++ b/reactos/boot/freeldr/freeldr/bootmgr.c @@ -43,8 +43,8 @@ VOID RunLoader(VOID) CHAR SettingValue[80]; ULONG SectionId; ULONG OperatingSystemCount; - PCHAR *OperatingSystemSectionNames; - PCHAR *OperatingSystemDisplayNames; + PCSTR *OperatingSystemSectionNames; + PCSTR *OperatingSystemDisplayNames; ULONG DefaultOperatingSystem; LONG TimeOut; ULONG SelectedOperatingSystem; @@ -166,10 +166,10 @@ reboot: return; } -ULONG GetDefaultOperatingSystem(PCHAR OperatingSystemList[], ULONG OperatingSystemCount) +ULONG GetDefaultOperatingSystem(PCSTR OperatingSystemList[], ULONG OperatingSystemCount) { CHAR DefaultOSText[80]; - PCHAR DefaultOSName; + PCSTR DefaultOSName; ULONG SectionId; ULONG DefaultOS = 0; ULONG Idx; diff --git a/reactos/boot/freeldr/freeldr/cmdline.c b/reactos/boot/freeldr/freeldr/cmdline.c index 66a28b6caf2..b6f42937936 100644 --- a/reactos/boot/freeldr/freeldr/cmdline.c +++ b/reactos/boot/freeldr/freeldr/cmdline.c @@ -106,7 +106,7 @@ CmdLineParse(char *CmdLine) } } -char * +const char * CmdLineGetDefaultOS(void) { return CmdLineInfo.DefaultOperatingSystem; diff --git a/reactos/boot/freeldr/freeldr/custom.c b/reactos/boot/freeldr/freeldr/custom.c index 09938baeecb..190d2c82ed7 100644 --- a/reactos/boot/freeldr/freeldr/custom.c +++ b/reactos/boot/freeldr/freeldr/custom.c @@ -32,20 +32,20 @@ #include -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"; +const 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"; +const CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition."; +const CHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos"; +const CHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18"; +const 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."; +const CHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init"; +const CHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS"; +const 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"; -CHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup."; +const CHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup."; VOID OptionMenuCustomBoot(VOID) { - PCHAR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" }; + PCSTR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" }; ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); ULONG SelectedMenuItem; diff --git a/reactos/boot/freeldr/freeldr/disk/disk.c b/reactos/boot/freeldr/freeldr/disk/disk.c index 600cff3e73c..d3e79c38118 100644 --- a/reactos/boot/freeldr/freeldr/disk/disk.c +++ b/reactos/boot/freeldr/freeldr/disk/disk.c @@ -39,7 +39,7 @@ VOID DiskReportError (BOOL bError) bReportError = bError; } -VOID DiskError(PCHAR ErrorString, ULONG ErrorCode) +VOID DiskError(PCSTR ErrorString, ULONG ErrorCode) { CHAR ErrorCodeString[200]; @@ -53,7 +53,7 @@ VOID DiskError(PCHAR ErrorString, ULONG ErrorCode) UiMessageBox(ErrorCodeString); } -PCHAR DiskGetErrorCodeString(ULONG ErrorCode) +PCSTR DiskGetErrorCodeString(ULONG ErrorCode) { switch (ErrorCode) { diff --git a/reactos/boot/freeldr/freeldr/drivemap.c b/reactos/boot/freeldr/freeldr/drivemap.c index 0486ca3e16a..e889024ce03 100644 --- a/reactos/boot/freeldr/freeldr/drivemap.c +++ b/reactos/boot/freeldr/freeldr/drivemap.c @@ -30,7 +30,7 @@ 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(PCHAR SectionName) +VOID DriveMapMapDrivesInSection(PCSTR SectionName) { CHAR SettingName[80]; CHAR SettingValue[80]; @@ -117,7 +117,7 @@ VOID DriveMapMapDrivesInSection(PCHAR SectionName) } } -BOOL DriveMapIsValidDriveString(PCHAR DriveString) +BOOL DriveMapIsValidDriveString(PCSTR DriveString) { ULONG Index; @@ -147,7 +147,7 @@ BOOL DriveMapIsValidDriveString(PCHAR DriveString) return TRUE; } -ULONG DriveMapGetBiosDriveNumber(PCHAR DeviceName) +ULONG DriveMapGetBiosDriveNumber(PCSTR DeviceName) { ULONG BiosDriveNumber = 0; diff --git a/reactos/boot/freeldr/freeldr/freeldr.c b/reactos/boot/freeldr/freeldr/freeldr.c index 54e8638bbef..407b709c0f8 100644 --- a/reactos/boot/freeldr/freeldr/freeldr.c +++ b/reactos/boot/freeldr/freeldr/freeldr.c @@ -27,7 +27,7 @@ #include #include -VOID BootMain(char *CmdLine) +VOID BootMain(LPSTR CmdLine) { CmdLineParse(CmdLine); diff --git a/reactos/boot/freeldr/freeldr/fs/ext2.c b/reactos/boot/freeldr/freeldr/fs/ext2.c index b8ff14f935c..5473c54ff3a 100644 --- a/reactos/boot/freeldr/freeldr/fs/ext2.c +++ b/reactos/boot/freeldr/freeldr/fs/ext2.c @@ -87,7 +87,7 @@ BOOL Ext2OpenVolume(UCHAR DriveNumber, ULONGLONG VolumeStartSector) * Tries to open the file 'name' and returns true or false * for success and failure respectively */ -FILE* Ext2OpenFile(PCHAR FileName) +FILE* Ext2OpenFile(PCSTR FileName) { EXT2_FILE_INFO TempExt2FileInfo; PEXT2_FILE_INFO FileHandle; @@ -190,7 +190,7 @@ FILE* Ext2OpenFile(PCHAR FileName) * with info describing the file, etc. returns true * if the file exists or false otherwise */ -BOOL Ext2LookupFile(PCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer) +BOOL Ext2LookupFile(PCSTR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer) { UINT i; ULONG NumberOfPathParts; diff --git a/reactos/boot/freeldr/freeldr/fs/ext2.h b/reactos/boot/freeldr/freeldr/fs/ext2.h index 84d1a21818a..5d033b7280a 100644 --- a/reactos/boot/freeldr/freeldr/fs/ext2.h +++ b/reactos/boot/freeldr/freeldr/fs/ext2.h @@ -667,8 +667,8 @@ typedef struct BOOL Ext2OpenVolume(UCHAR DriveNumber, ULONGLONG VolumeStartSector); -FILE* Ext2OpenFile(PCHAR FileName); -BOOL Ext2LookupFile(PCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer); +FILE* Ext2OpenFile(PCSTR FileName); +BOOL Ext2LookupFile(PCSTR 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); diff --git a/reactos/boot/freeldr/freeldr/fs/fat.c b/reactos/boot/freeldr/freeldr/fs/fat.c index 278f664716b..714fa8668ef 100644 --- a/reactos/boot/freeldr/freeldr/fs/fat.c +++ b/reactos/boot/freeldr/freeldr/fs/fat.c @@ -687,7 +687,7 @@ static BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG Direct * with info describing the file, etc. returns true * if the file exists or false otherwise */ -BOOL FatLookupFile(PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) +BOOL FatLookupFile(PCSTR FileName, PFAT_FILE_INFO FatFileInfoPointer) { UINT i; ULONG NumberOfPathParts; @@ -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(PCHAR FileName) +FILE* FatOpenFile(PCSTR FileName) { FAT_FILE_INFO TempFatFileInfo; PFAT_FILE_INFO FileHandle; diff --git a/reactos/boot/freeldr/freeldr/fs/fat.h b/reactos/boot/freeldr/freeldr/fs/fat.h index 6a24bbfdbc4..a57ed0b4158 100644 --- a/reactos/boot/freeldr/freeldr/fs/fat.h +++ b/reactos/boot/freeldr/freeldr/fs/fat.h @@ -156,10 +156,10 @@ BOOL FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector, ULONG PartitionSe ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCount); PVOID FatBufferDirectory(ULONG DirectoryStartCluster, ULONG* EntryCountPointer, BOOL RootDirectory); BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG EntryCount, PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer); -BOOL FatLookupFile(PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer); +BOOL FatLookupFile(PCSTR FileName, PFAT_FILE_INFO FatFileInfoPointer); void FatParseShortFileName(PCHAR Buffer, PDIRENTRY DirEntry); BOOL FatGetFatEntry(ULONG Cluster, ULONG* ClusterPointer); -FILE* FatOpenFile(PCHAR FileName); +FILE* FatOpenFile(PCSTR FileName); ULONG FatCountClustersInChain(ULONG StartCluster); ULONG* FatGetClusterChainArray(ULONG StartCluster); BOOL FatReadCluster(ULONG ClusterNumber, PVOID Buffer); diff --git a/reactos/boot/freeldr/freeldr/fs/fs.c b/reactos/boot/freeldr/freeldr/fs/fs.c index b197d840a7d..f2aabe257cd 100644 --- a/reactos/boot/freeldr/freeldr/fs/fs.c +++ b/reactos/boot/freeldr/freeldr/fs/fs.c @@ -42,7 +42,7 @@ ULONG FsType = 0; // Type of filesystem on boot device, set by FsOpenVolume() // FUNCTIONS ///////////////////////////////////////////////////////////////////////////////////////////// -VOID FileSystemError(PCHAR ErrorString) +VOID FileSystemError(PCSTR ErrorString) { DbgPrint((DPRINT_FILESYSTEM, "%s\n", ErrorString)); @@ -123,7 +123,7 @@ BOOL FsOpenSystemVolume(char *SystemPath, char *RemainingPath, PULONG Device) } -PFILE FsOpenFile(PCHAR FileName) +PFILE FsOpenFile(PCSTR 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(PCHAR Path) +ULONG FsGetNumPathParts(PCSTR Path) { size_t i; ULONG num; @@ -362,7 +362,7 @@ ULONG FsGetNumPathParts(PCHAR Path) * and puts the first name of the path (e.g. "dir1") in buffer * compatible with the MSDOS directory structure */ -VOID FsGetFirstNameFromPath(PCHAR Buffer, PCHAR Path) +VOID FsGetFirstNameFromPath(PCHAR Buffer, PCSTR Path) { size_t i; diff --git a/reactos/boot/freeldr/freeldr/fs/iso.c b/reactos/boot/freeldr/freeldr/fs/iso.c index 81ddecfa7ac..157e81f41d5 100644 --- a/reactos/boot/freeldr/freeldr/fs/iso.c +++ b/reactos/boot/freeldr/freeldr/fs/iso.c @@ -180,7 +180,7 @@ 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(PCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer) +static BOOL IsoLookupFile(PCSTR FileName, PISO_FILE_INFO IsoFileInfoPointer) { UINT i; ULONG NumberOfPathParts; @@ -263,7 +263,7 @@ static BOOL IsoLookupFile(PCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer) * Tries to open the file 'name' and returns true or false * for success and failure respectively */ -FILE* IsoOpenFile(PCHAR FileName) +FILE* IsoOpenFile(PCSTR FileName) { ISO_FILE_INFO TempFileInfo; PISO_FILE_INFO FileHandle; diff --git a/reactos/boot/freeldr/freeldr/fs/iso.h b/reactos/boot/freeldr/freeldr/fs/iso.h index e0be69bcaad..9cde9a8c9d5 100644 --- a/reactos/boot/freeldr/freeldr/fs/iso.h +++ b/reactos/boot/freeldr/freeldr/fs/iso.h @@ -106,7 +106,7 @@ typedef struct BOOL IsoOpenVolume(ULONG DriveNumber); -FILE* IsoOpenFile(PCHAR FileName); +FILE* IsoOpenFile(PCSTR FileName); BOOL IsoReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer); ULONG IsoGetFileSize(FILE *FileHandle); VOID IsoSetFilePointer(FILE *FileHandle, ULONG NewFilePointer); diff --git a/reactos/boot/freeldr/freeldr/fs/ntfs.c b/reactos/boot/freeldr/freeldr/fs/ntfs.c index 4861d6c86ef..555738ecea2 100644 --- a/reactos/boot/freeldr/freeldr/fs/ntfs.c +++ b/reactos/boot/freeldr/freeldr/fs/ntfs.c @@ -87,7 +87,7 @@ static PUCHAR NtfsDecodeRun(PUCHAR DataRun, LONGLONG *DataRunOffset, ULONGLONG * } /* FIXME: Add support for attribute lists! */ -static BOOL NtfsFindAttribute(PNTFS_ATTR_CONTEXT Context, PNTFS_MFT_RECORD MftRecord, ULONG Type, PWCHAR Name) +static BOOL NtfsFindAttribute(PNTFS_ATTR_CONTEXT Context, PNTFS_MFT_RECORD MftRecord, ULONG Type, const WCHAR *Name) { PNTFS_ATTR_RECORD AttrRecord; PNTFS_ATTR_RECORD AttrRecordEnd; @@ -563,7 +563,7 @@ static BOOL NtfsFindMftRecord(ULONG MFTIndex, PCHAR FileName, ULONG *OutMFTIndex return FALSE; } -static BOOL NtfsLookupFile(PCHAR FileName, PNTFS_MFT_RECORD MftRecord, PNTFS_ATTR_CONTEXT DataContext) +static BOOL NtfsLookupFile(PCSTR FileName, PNTFS_MFT_RECORD MftRecord, PNTFS_ATTR_CONTEXT DataContext) { ULONG NumberOfPathParts; CHAR PathPart[261]; @@ -680,7 +680,7 @@ BOOL NtfsOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector) return TRUE; } -FILE* NtfsOpenFile(PCHAR FileName) +FILE* NtfsOpenFile(PCSTR FileName) { PNTFS_FILE_HANDLE FileHandle; PNTFS_MFT_RECORD MftRecord; diff --git a/reactos/boot/freeldr/freeldr/fs/ntfs.h b/reactos/boot/freeldr/freeldr/fs/ntfs.h index 870ac857228..fe04ac7ea29 100644 --- a/reactos/boot/freeldr/freeldr/fs/ntfs.h +++ b/reactos/boot/freeldr/freeldr/fs/ntfs.h @@ -219,7 +219,7 @@ typedef struct } PACKED NTFS_FILE_HANDLE, *PNTFS_FILE_HANDLE; BOOL NtfsOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector); -FILE* NtfsOpenFile(PCHAR FileName); +FILE* NtfsOpenFile(PCSTR FileName); BOOL NtfsReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer); ULONG NtfsGetFileSize(FILE *FileHandle); VOID NtfsSetFilePointer(FILE *FileHandle, ULONG NewFilePointer); diff --git a/reactos/boot/freeldr/freeldr/include/bootmgr.h b/reactos/boot/freeldr/freeldr/include/bootmgr.h index 2a3e3e9a7b7..9945c9fdf82 100644 --- a/reactos/boot/freeldr/freeldr/include/bootmgr.h +++ b/reactos/boot/freeldr/freeldr/include/bootmgr.h @@ -21,7 +21,7 @@ #define __BOOTMGR_H -ULONG GetDefaultOperatingSystem(PCHAR OperatingSystemList[], ULONG OperatingSystemCount); +ULONG GetDefaultOperatingSystem(PCSTR OperatingSystemList[], ULONG OperatingSystemCount); LONG GetTimeOut(VOID); BOOL MainBootMenuKeyPressFilter(ULONG KeyPress); diff --git a/reactos/boot/freeldr/freeldr/include/cmdline.h b/reactos/boot/freeldr/freeldr/include/cmdline.h index 5bfc3ff84bf..36849a4a786 100644 --- a/reactos/boot/freeldr/freeldr/include/cmdline.h +++ b/reactos/boot/freeldr/freeldr/include/cmdline.h @@ -23,14 +23,14 @@ typedef struct tagCMDLINEINFO { - char *DefaultOperatingSystem; + const char *DefaultOperatingSystem; LONG TimeOut; } CMDLINEINFO, *PCMDLINEINFO; -extern void CmdLineParse(char *CmdLine); +void CmdLineParse(char *CmdLine); -extern char *CmdLineGetDefaultOS(void); -extern LONG CmdLineGetTimeOut(void); +const char *CmdLineGetDefaultOS(void); +LONG CmdLineGetTimeOut(void); #endif /* __CMDLINE_H__ */ diff --git a/reactos/boot/freeldr/freeldr/include/disk.h b/reactos/boot/freeldr/freeldr/include/disk.h index 254d70f2903..a1aee258215 100644 --- a/reactos/boot/freeldr/freeldr/include/disk.h +++ b/reactos/boot/freeldr/freeldr/include/disk.h @@ -119,8 +119,8 @@ BOOL DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT Buff // /////////////////////////////////////////////////////////////////////////////////////// VOID DiskReportError (BOOL bError); -VOID DiskError(PCHAR ErrorString, ULONG ErrorCode); -PCHAR DiskGetErrorCodeString(ULONG ErrorCode); +VOID DiskError(PCSTR ErrorString, ULONG ErrorCode); +PCSTR 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 diff --git a/reactos/boot/freeldr/freeldr/include/drivemap.h b/reactos/boot/freeldr/freeldr/include/drivemap.h index e2d19cbad75..11d6a1b03cb 100644 --- a/reactos/boot/freeldr/freeldr/include/drivemap.h +++ b/reactos/boot/freeldr/freeldr/include/drivemap.h @@ -29,9 +29,9 @@ typedef struct } PACKED DRIVE_MAP_LIST, *PDRIVE_MAP_LIST; -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 DriveMapMapDrivesInSection(PCSTR SectionName); +BOOL DriveMapIsValidDriveString(PCSTR DriveString); // Checks the drive string ("hd0") for validity +ULONG DriveMapGetBiosDriveNumber(PCSTR 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 diff --git a/reactos/boot/freeldr/freeldr/include/fs.h b/reactos/boot/freeldr/freeldr/include/fs.h index 4b2bb6ee37c..4f368f28311 100644 --- a/reactos/boot/freeldr/freeldr/include/fs.h +++ b/reactos/boot/freeldr/freeldr/include/fs.h @@ -32,17 +32,17 @@ #define FILE VOID #define PFILE FILE * -VOID FileSystemError(PCHAR ErrorString); +VOID FileSystemError(PCSTR ErrorString); BOOL FsOpenBootVolume(); BOOL FsOpenSystemVolume(PCHAR SystemPath, PCHAR RemainingPath, PULONG BootDevice); -PFILE FsOpenFile(PCHAR FileName); +PFILE FsOpenFile(PCSTR 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(PCHAR Path); -VOID FsGetFirstNameFromPath(PCHAR Buffer, PCHAR Path); +ULONG FsGetNumPathParts(PCSTR Path); +VOID FsGetFirstNameFromPath(PCHAR Buffer, PCSTR Path); #endif // #defined __FS_H diff --git a/reactos/boot/freeldr/freeldr/include/inifile.h b/reactos/boot/freeldr/freeldr/include/inifile.h index 6c03574737b..2fd46235786 100644 --- a/reactos/boot/freeldr/freeldr/include/inifile.h +++ b/reactos/boot/freeldr/freeldr/include/inifile.h @@ -22,14 +22,14 @@ BOOL IniFileInitialize(VOID); -BOOL IniOpenSection(PCHAR SectionName, ULONG* SectionId); +BOOL IniOpenSection(PCSTR 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, 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); +BOOL IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize); +BOOL IniAddSection(PCSTR SectionName, ULONG* SectionId); +BOOL IniAddSettingValueToSection(ULONG SectionId, PCSTR SettingName, PCSTR SettingValue); #endif // defined __PARSEINI_H diff --git a/reactos/boot/freeldr/freeldr/include/linux.h b/reactos/boot/freeldr/freeldr/include/linux.h index 2d12a54e205..c518933bb9b 100644 --- a/reactos/boot/freeldr/freeldr/include/linux.h +++ b/reactos/boot/freeldr/freeldr/include/linux.h @@ -127,9 +127,9 @@ typedef struct VOID BootNewLinuxKernel(VOID); // Implemented in linux.S VOID BootOldLinuxKernel(ULONG KernelSize); // Implemented in linux.S -VOID LoadAndBootLinux(PCHAR OperatingSystemName, PCHAR Description); +VOID LoadAndBootLinux(PCSTR OperatingSystemName, PCSTR Description); -BOOL LinuxParseIniSection(PCHAR OperatingSystemName); +BOOL LinuxParseIniSection(PCSTR OperatingSystemName); BOOL LinuxReadBootSector(PFILE LinuxKernelFile); BOOL LinuxReadSetupSector(PFILE LinuxKernelFile); BOOL LinuxReadKernel(PFILE LinuxKernelFile); diff --git a/reactos/boot/freeldr/freeldr/include/machine.h b/reactos/boot/freeldr/freeldr/include/machine.h index 60c08dc3c2e..a1033689ab3 100644 --- a/reactos/boot/freeldr/freeldr/include/machine.h +++ b/reactos/boot/freeldr/freeldr/include/machine.h @@ -72,7 +72,7 @@ typedef struct tagMACHVTBL VOID (*HwDetect)(VOID); } MACHVTBL, *PMACHVTBL; -VOID MachInit(char *CmdLine); +VOID MachInit(const char *CmdLine); extern MACHVTBL MachVtbl; diff --git a/reactos/boot/freeldr/freeldr/include/miscboot.h b/reactos/boot/freeldr/freeldr/include/miscboot.h index 51eb9ed3562..e274c9ae2af 100644 --- a/reactos/boot/freeldr/freeldr/include/miscboot.h +++ b/reactos/boot/freeldr/freeldr/include/miscboot.h @@ -20,8 +20,8 @@ #ifndef __BOOT_H #define __BOOT_H -VOID LoadAndBootBootSector(PCHAR OperatingSystemName); -VOID LoadAndBootPartition(PCHAR OperatingSystemName); -VOID LoadAndBootDrive(PCHAR OperatingSystemName); +VOID LoadAndBootBootSector(PCSTR OperatingSystemName); +VOID LoadAndBootPartition(PCSTR OperatingSystemName); +VOID LoadAndBootDrive(PCSTR OperatingSystemName); #endif // defined __BOOT_H diff --git a/reactos/boot/freeldr/freeldr/include/oslist.h b/reactos/boot/freeldr/freeldr/include/oslist.h index ea67c672e13..9996b8267bc 100644 --- a/reactos/boot/freeldr/freeldr/include/oslist.h +++ b/reactos/boot/freeldr/freeldr/include/oslist.h @@ -20,7 +20,7 @@ #ifndef __OSLIST_H #define __OSLIST_H -BOOL InitOperatingSystemList(PCHAR **SectionNamesPointer, PCHAR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer); +BOOL InitOperatingSystemList(PCSTR **SectionNamesPointer, PCSTR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer); ULONG CountOperatingSystems(ULONG SectionId); BOOL AllocateListMemory(PCHAR **SectionNamesPointer, PCHAR **DisplayNamesPointer, ULONG OperatingSystemCount); BOOL RemoveQuotes(PCHAR QuotedString); diff --git a/reactos/boot/freeldr/freeldr/include/reactos.h b/reactos/boot/freeldr/freeldr/include/reactos.h index fdb3585d4af..80de92bcbf8 100644 --- a/reactos/boot/freeldr/freeldr/include/reactos.h +++ b/reactos/boot/freeldr/freeldr/include/reactos.h @@ -26,7 +26,7 @@ // ReactOS Loading Functions // /////////////////////////////////////////////////////////////////////////////////////// -VOID LoadAndBootReactOS(PCHAR OperatingSystemName); +VOID LoadAndBootReactOS(PCSTR OperatingSystemName); /////////////////////////////////////////////////////////////////////////////////////// // @@ -61,8 +61,8 @@ VOID FASTCALL FrLdrSetupPae(ULONG Magic); VOID FASTCALL FrLdrSetupPageDirectory(VOID); VOID FASTCALL FrLdrGetPaeMode(VOID); BOOL STDCALL FrLdrMapKernel(FILE *KernelImage); -ULONG_PTR STDCALL FrLdrCreateModule(LPSTR ModuleName); -ULONG_PTR STDCALL FrLdrLoadModule(FILE *ModuleImage, LPSTR ModuleName, PULONG ModuleSize); +ULONG_PTR STDCALL FrLdrCreateModule(LPCSTR ModuleName); +ULONG_PTR STDCALL FrLdrLoadModule(FILE *ModuleImage, LPCSTR ModuleName, PULONG ModuleSize); BOOL STDCALL FrLdrCloseModule(ULONG_PTR ModuleBase, ULONG dwModuleSize); VOID STDCALL FrLdrStartup(ULONG Magic); typedef VOID (FASTCALL *ASMCODE)(ULONG Magic, PLOADER_PARAMETER_BLOCK LoaderBlock); diff --git a/reactos/boot/freeldr/freeldr/include/rtl.h b/reactos/boot/freeldr/freeldr/include/rtl.h index d34db55b40f..088e72d13c7 100644 --- a/reactos/boot/freeldr/freeldr/include/rtl.h +++ b/reactos/boot/freeldr/freeldr/include/rtl.h @@ -63,7 +63,6 @@ void sound(int freq); #define min(a, b) (((a) < (b)) ? (a) : (b)) #endif -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #define UINT64_C(val) val##ULL /////////////////////////////////////////////////////////////////////////////////////// diff --git a/reactos/boot/freeldr/freeldr/include/ui.h b/reactos/boot/freeldr/freeldr/include/ui.h index 64b4d6aa93b..307f06830f8 100644 --- a/reactos/boot/freeldr/freeldr/include/ui.h +++ b/reactos/boot/freeldr/freeldr/include/ui.h @@ -47,7 +47,7 @@ extern BOOL UserInterfaceUp; // Tells us if the user interface is display extern BOOL UiUseSpecialEffects; // Tells us if we should use fade effects -extern CHAR UiMonthNames[12][15]; +extern const CHAR UiMonthNames[12][15]; /////////////////////////////////////////////////////////////////////////////////////// // @@ -56,26 +56,26 @@ extern CHAR UiMonthNames[12][15]; /////////////////////////////////////////////////////////////////////////////////////// BOOL UiInitialize(BOOLEAN ShowGui); // Initialize User-Interface BOOL SetupUiInitialize(VOID); // Initialize User-Interface -VOID UiUnInitialize(PCHAR BootText); // Un-initialize User-Interface +VOID UiUnInitialize(PCSTR 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, 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, 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 UiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr); // Draws text at coordinates specified +VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges +VOID UiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen VOID UiUpdateDateTime(VOID); // Updates the date and time -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 UiInfoBox(PCSTR MessageText); // Displays a info box on the screen +VOID UiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button +VOID UiMessageBoxCritical(PCSTR 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 UiShowMessageBoxesInSection(PCSTR 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); +BOOL UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length); -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 +UCHAR UiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value +UCHAR UiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value VOID UiTruncateStringEllipsis(PCHAR StringText, ULONG MaxChars); // Truncates a string to MaxChars by adding an ellipsis on the end '...' @@ -89,7 +89,7 @@ VOID UiFadeOut(VOID); // Fades the screen out /////////////////////////////////////////////////////////////////////////////////////// typedef BOOL (*UiMenuKeyPressFilterCallback)(ULONG KeyPress); -BOOL UiDisplayMenu(PCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter); +BOOL UiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter); diff --git a/reactos/boot/freeldr/freeldr/inifile/inifile.c b/reactos/boot/freeldr/freeldr/inifile/inifile.c index ab20274b1f3..ecbb8a08e5e 100644 --- a/reactos/boot/freeldr/freeldr/inifile/inifile.c +++ b/reactos/boot/freeldr/freeldr/inifile/inifile.c @@ -24,7 +24,7 @@ #include #include -BOOL IniOpenSection(PCHAR SectionName, ULONG* SectionId) +BOOL IniOpenSection(PCSTR SectionName, ULONG* SectionId) { PINI_SECTION Section; @@ -131,7 +131,7 @@ BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingN return FALSE; } -BOOL IniReadSettingByName(ULONG SectionId, PCHAR SettingName, PCHAR Buffer, ULONG BufferSize) +BOOL IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize) { PINI_SECTION Section = (PINI_SECTION)SectionId; PINI_SECTION_ITEM SectionItem; @@ -163,7 +163,7 @@ BOOL IniReadSettingByName(ULONG SectionId, PCHAR SettingName, PCHAR Buffer, ULON return FALSE; } -BOOL IniAddSection(PCHAR SectionName, ULONG* SectionId) +BOOL IniAddSection(PCSTR SectionName, ULONG* SectionId) { PINI_SECTION Section; @@ -203,7 +203,7 @@ BOOL IniAddSection(PCHAR SectionName, ULONG* SectionId) return TRUE; } -BOOL IniAddSettingValueToSection(ULONG SectionId, PCHAR SettingName, PCHAR SettingValue) +BOOL IniAddSettingValueToSection(ULONG SectionId, PCSTR SettingName, PCSTR SettingValue) { PINI_SECTION Section = (PINI_SECTION)SectionId; PINI_SECTION_ITEM SectionItem; diff --git a/reactos/boot/freeldr/freeldr/linuxboot.c b/reactos/boot/freeldr/freeldr/linuxboot.c index e2bc48d70ec..d98e9166c58 100644 --- a/reactos/boot/freeldr/freeldr/linuxboot.c +++ b/reactos/boot/freeldr/freeldr/linuxboot.c @@ -54,7 +54,7 @@ PVOID LinuxInitrdLoadAddress = NULL; CHAR LinuxBootDescription[80]; CHAR LinuxBootPath[260] = ""; -VOID LoadAndBootLinux(PCHAR OperatingSystemName, PCHAR Description) +VOID LoadAndBootLinux(PCSTR OperatingSystemName, PCSTR Description) { PFILE LinuxKernel = NULL; PFILE LinuxInitrdFile = NULL; @@ -229,7 +229,7 @@ LinuxBootFailed: LinuxCommandLineSize = 0; } -BOOL LinuxParseIniSection(PCHAR OperatingSystemName) +BOOL LinuxParseIniSection(PCSTR OperatingSystemName) { CHAR SettingName[260]; ULONG SectionId; diff --git a/reactos/boot/freeldr/freeldr/miscboot.c b/reactos/boot/freeldr/freeldr/miscboot.c index ff2cfe6b29f..5a45bfa154c 100644 --- a/reactos/boot/freeldr/freeldr/miscboot.c +++ b/reactos/boot/freeldr/freeldr/miscboot.c @@ -29,7 +29,7 @@ #include #include -VOID LoadAndBootBootSector(PCHAR OperatingSystemName) +VOID LoadAndBootBootSector(PCSTR OperatingSystemName) { PFILE FilePointer; CHAR SettingName[80]; @@ -100,7 +100,7 @@ VOID LoadAndBootBootSector(PCHAR OperatingSystemName) ChainLoadBiosBootSectorCode(); } -VOID LoadAndBootPartition(PCHAR OperatingSystemName) +VOID LoadAndBootPartition(PCSTR OperatingSystemName) { CHAR SettingName[80]; CHAR SettingValue[80]; @@ -171,7 +171,7 @@ VOID LoadAndBootPartition(PCHAR OperatingSystemName) ChainLoadBiosBootSectorCode(); } -VOID LoadAndBootDrive(PCHAR OperatingSystemName) +VOID LoadAndBootDrive(PCSTR OperatingSystemName) { CHAR SettingName[80]; CHAR SettingValue[80]; diff --git a/reactos/boot/freeldr/freeldr/options.c b/reactos/boot/freeldr/freeldr/options.c index c07144c020c..31d9e57ea08 100644 --- a/reactos/boot/freeldr/freeldr/options.c +++ b/reactos/boot/freeldr/freeldr/options.c @@ -27,7 +27,7 @@ #include -PCHAR OptionsMenuList[] = +PCSTR OptionsMenuList[] = { "Safe Mode", "Safe Mode with Networking", diff --git a/reactos/boot/freeldr/freeldr/oslist.c b/reactos/boot/freeldr/freeldr/oslist.c index eb4fe24200f..fb001f53c73 100644 --- a/reactos/boot/freeldr/freeldr/oslist.c +++ b/reactos/boot/freeldr/freeldr/oslist.c @@ -24,7 +24,7 @@ #include #include -BOOL InitOperatingSystemList(PCHAR **SectionNamesPointer, PCHAR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer) +BOOL InitOperatingSystemList(PCSTR **SectionNamesPointer, PCSTR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer) { ULONG Idx; ULONG CurrentOperatingSystemIndex; @@ -79,8 +79,8 @@ BOOL InitOperatingSystemList(PCHAR **SectionNamesPointer, PCHAR **DisplayNamesPo } *OperatingSystemCountPointer = OperatingSystemCount; - *SectionNamesPointer = OperatingSystemSectionNames; - *DisplayNamesPointer = OperatingSystemDisplayNames; + *SectionNamesPointer = (PCSTR*)OperatingSystemSectionNames; + *DisplayNamesPointer = (PCSTR*)OperatingSystemDisplayNames; return TRUE; } diff --git a/reactos/boot/freeldr/freeldr/reactos/binhive.c b/reactos/boot/freeldr/freeldr/reactos/binhive.c index 2fa61c9a156..8c3edb61c85 100644 --- a/reactos/boot/freeldr/freeldr/reactos/binhive.c +++ b/reactos/boot/freeldr/freeldr/reactos/binhive.c @@ -326,7 +326,7 @@ CmiCreateDefaultBinCell (PHBIN BinCell) static VOID -CmiCreateDefaultRootKeyCell (PKEY_CELL RootKeyCell, PCHAR KeyName) +CmiCreateDefaultRootKeyCell (PKEY_CELL RootKeyCell, PCSTR KeyName) { PCHAR BaseKeyName; ULONG NameSize; @@ -357,7 +357,7 @@ CmiCreateDefaultRootKeyCell (PKEY_CELL RootKeyCell, PCHAR KeyName) static PREGISTRY_HIVE -CmiCreateHive (PCHAR KeyName) +CmiCreateHive (PCSTR KeyName) { PREGISTRY_HIVE Hive; PCELL_HEADER FreeCell; @@ -1258,7 +1258,7 @@ CmiCalcHiveChecksum (PREGISTRY_HIVE Hive) static BOOL CmiExportHive (PREGISTRY_HIVE Hive, - PCHAR KeyName) + PCSTR KeyName) { PKEY_CELL KeyCell; FRLDRHKEY Key; @@ -1624,7 +1624,7 @@ RegImportBinaryHive(PCHAR ChunkBase, BOOL -RegExportBinaryHive(PCHAR KeyName, +RegExportBinaryHive(PCSTR KeyName, PCHAR ChunkBase, ULONG* ChunkSize) { diff --git a/reactos/boot/freeldr/freeldr/reactos/loader.c b/reactos/boot/freeldr/freeldr/reactos/loader.c index 79b7ecb7b91..9ba450e9eca 100644 --- a/reactos/boot/freeldr/freeldr/reactos/loader.c +++ b/reactos/boot/freeldr/freeldr/reactos/loader.c @@ -706,7 +706,7 @@ FrLdrMapKernel(FILE *KernelImage) ULONG_PTR STDCALL FrLdrLoadModule(FILE *ModuleImage, - LPSTR ModuleName, + LPCSTR ModuleName, PULONG ModuleSize) { ULONG LocalModuleSize; @@ -757,7 +757,7 @@ FrLdrLoadModule(FILE *ModuleImage, ULONG_PTR STDCALL -FrLdrCreateModule(LPSTR ModuleName) +FrLdrCreateModule(LPCSTR ModuleName) { PLOADER_MODULE ModuleData; LPSTR NameBuffer; diff --git a/reactos/boot/freeldr/freeldr/reactos/reactos.c b/reactos/boot/freeldr/freeldr/reactos/reactos.c index f3c37d82692..2ced6268452 100644 --- a/reactos/boot/freeldr/freeldr/reactos/reactos.c +++ b/reactos/boot/freeldr/freeldr/reactos/reactos.c @@ -78,7 +78,7 @@ FrLdrLoadKernel(PCHAR szFileName, FrLdrMapKernel(FilePointer); /* Update Processbar and return success */ - UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS..."); + UiDrawProgressBarCenter(nPos, 100, (PCHAR)"Loading ReactOS..."); return(TRUE); } @@ -145,8 +145,8 @@ LoadKernelSymbols(PCHAR szKernelName, int nPos) } static BOOL -FrLdrLoadNlsFile(PCHAR szFileName, - PCHAR szModuleName) +FrLdrLoadNlsFile(PCSTR szFileName, + PCSTR szModuleName) { PFILE FilePointer; CHAR value[256]; @@ -340,7 +340,7 @@ FrLdrLoadDriver(PCHAR szFileName, FrLdrLoadModule(FilePointer, szFileName, NULL); /* Update status and return */ - UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS..."); + UiDrawProgressBarCenter(nPos, 100, (PCHAR)"Loading ReactOS..."); return(TRUE); } @@ -570,7 +570,7 @@ FrLdrLoadBootDrivers(PCHAR szSystemRoot, } VOID -LoadAndBootReactOS(PCHAR OperatingSystemName) +LoadAndBootReactOS(PCSTR OperatingSystemName) { PFILE FilePointer; CHAR name[1024]; @@ -704,7 +704,7 @@ LoadAndBootReactOS(PCHAR OperatingSystemName) if (AcpiPresent) LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE; UiDrawStatusText("Loading..."); - UiDrawProgressBarCenter(0, 100, "Loading ReactOS..."); + UiDrawProgressBarCenter(0, 100, (PCHAR)"Loading ReactOS..."); /* * Try to open system drive @@ -838,7 +838,7 @@ LoadAndBootReactOS(PCHAR OperatingSystemName) */ RegInitCurrentControlSet(FALSE); - UiDrawProgressBarCenter(15, 100, "Loading ReactOS..."); + UiDrawProgressBarCenter(15, 100, (PCHAR)"Loading ReactOS..."); /* * Export the hardware hive @@ -847,7 +847,7 @@ LoadAndBootReactOS(PCHAR OperatingSystemName) RegExportBinaryHive ("\\Registry\\Machine\\HARDWARE", (PCHAR)Base, &Size); FrLdrCloseModule (Base, Size); - UiDrawProgressBarCenter(20, 100, "Loading ReactOS..."); + UiDrawProgressBarCenter(20, 100, (PCHAR)"Loading ReactOS..."); /* * Load NLS files @@ -857,13 +857,13 @@ LoadAndBootReactOS(PCHAR OperatingSystemName) UiMessageBox(MsgBuffer); return; } - UiDrawProgressBarCenter(30, 100, "Loading ReactOS..."); + UiDrawProgressBarCenter(30, 100, (PCHAR)"Loading ReactOS..."); /* * Load kernel symbols */ LoadKernelSymbols(szKernelName, 30); - UiDrawProgressBarCenter(40, 100, "Loading ReactOS..."); + UiDrawProgressBarCenter(40, 100, (PCHAR)"Loading ReactOS..."); /* * Load boot drivers diff --git a/reactos/boot/freeldr/freeldr/reactos/registry.c b/reactos/boot/freeldr/freeldr/reactos/registry.c index b488ff2fed7..c00ae732c5e 100644 --- a/reactos/boot/freeldr/freeldr/reactos/registry.c +++ b/reactos/boot/freeldr/freeldr/reactos/registry.c @@ -206,7 +206,7 @@ RegInitCurrentControlSet(BOOL LastKnownGood) LONG RegCreateKey(FRLDRHKEY ParentKey, - PCHAR KeyName, + PCSTR KeyName, PFRLDRHKEY Key) { PLIST_ENTRY Ptr; @@ -214,7 +214,7 @@ RegCreateKey(FRLDRHKEY ParentKey, FRLDRHKEY CurrentKey; FRLDRHKEY NewKey; PCHAR p; - PCHAR name; + PCSTR name; int subkeyLength; int stringLength; @@ -331,7 +331,7 @@ RegCreateKey(FRLDRHKEY ParentKey, LONG RegDeleteKey(FRLDRHKEY Key, - PCHAR Name) + PCSTR Name) { @@ -384,14 +384,14 @@ RegEnumKey(FRLDRHKEY Key, LONG RegOpenKey(FRLDRHKEY ParentKey, - PCHAR KeyName, + PCSTR KeyName, PFRLDRHKEY Key) { PLIST_ENTRY Ptr; FRLDRHKEY SearchKey = NULL; FRLDRHKEY CurrentKey; PCHAR p; - PCHAR name; + PCSTR name; int subkeyLength; int stringLength; @@ -484,9 +484,9 @@ RegOpenKey(FRLDRHKEY ParentKey, LONG RegSetValue(FRLDRHKEY Key, - PCHAR ValueName, + PCSTR ValueName, ULONG Type, - PCHAR Data, + PCSTR Data, ULONG DataSize) { PLIST_ENTRY Ptr; @@ -585,7 +585,7 @@ RegSetValue(FRLDRHKEY Key, LONG RegQueryValue(FRLDRHKEY Key, - PCHAR ValueName, + PCSTR ValueName, ULONG* Type, PUCHAR Data, ULONG* DataSize) @@ -672,7 +672,7 @@ RegQueryValue(FRLDRHKEY Key, LONG RegDeleteValue(FRLDRHKEY Key, - PCHAR ValueName) + PCSTR ValueName) { PLIST_ENTRY Ptr; PVALUE Value = NULL; diff --git a/reactos/boot/freeldr/freeldr/reactos/registry.h b/reactos/boot/freeldr/freeldr/reactos/registry.h index b5b9493ce88..e2894f0d9dc 100644 --- a/reactos/boot/freeldr/freeldr/reactos/registry.h +++ b/reactos/boot/freeldr/freeldr/reactos/registry.h @@ -72,12 +72,12 @@ RegInitCurrentControlSet(BOOL LastKnownGood); LONG RegCreateKey(FRLDRHKEY ParentKey, - PCHAR KeyName, + PCSTR KeyName, PFRLDRHKEY Key); LONG RegDeleteKey(FRLDRHKEY Key, - PCHAR Name); + PCSTR Name); LONG RegEnumKey(FRLDRHKEY Key, @@ -87,27 +87,27 @@ RegEnumKey(FRLDRHKEY Key, LONG RegOpenKey(FRLDRHKEY ParentKey, - PCHAR KeyName, + PCSTR KeyName, PFRLDRHKEY Key); LONG RegSetValue(FRLDRHKEY Key, - PCHAR ValueName, + PCSTR ValueName, ULONG Type, - PCHAR Data, + PCSTR Data, ULONG DataSize); LONG RegQueryValue(FRLDRHKEY Key, - PCHAR ValueName, + PCSTR ValueName, ULONG* Type, PUCHAR Data, ULONG* DataSize); LONG RegDeleteValue(FRLDRHKEY Key, - PCHAR ValueName); + PCSTR ValueName); LONG RegEnumValue(FRLDRHKEY Key, @@ -130,7 +130,7 @@ RegImportBinaryHive (PCHAR ChunkBase, ULONG ChunkSize); BOOL -RegExportBinaryHive (PCHAR KeyName, +RegExportBinaryHive (PCSTR KeyName, PCHAR ChunkBase, ULONG* ChunkSize); diff --git a/reactos/boot/freeldr/freeldr/ui/gui.c b/reactos/boot/freeldr/freeldr/ui/gui.c index 36e050c54cc..2339ce94671 100644 --- a/reactos/boot/freeldr/freeldr/ui/gui.c +++ b/reactos/boot/freeldr/freeldr/ui/gui.c @@ -46,7 +46,7 @@ VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr) { } -VOID GuiDrawStatusText(PUCHAR StatusText) +VOID GuiDrawStatusText(PCSTR StatusText) { } @@ -62,11 +62,11 @@ VOID GuiRestoreScreen(PUCHAR Buffer) { } -VOID GuiMessageBox(PUCHAR MessageText) +VOID GuiMessageBox(PCSTR MessageText) { } -VOID GuiMessageBoxCritical(PUCHAR MessageText) +VOID GuiMessageBoxCritical(PCSTR MessageText) { } @@ -74,12 +74,12 @@ VOID GuiDrawProgressBar(ULONG Position, ULONG Range) { } -UCHAR GuiTextToColor(PUCHAR ColorText) +UCHAR GuiTextToColor(PCSTR ColorText) { return 0; } -UCHAR GuiTextToFillStyle(PUCHAR FillStyleText) +UCHAR GuiTextToFillStyle(PCSTR FillStyleText) { return 0; } diff --git a/reactos/boot/freeldr/freeldr/ui/gui.h b/reactos/boot/freeldr/freeldr/ui/gui.h index ad1e031440f..0b431488ebc 100644 --- a/reactos/boot/freeldr/freeldr/ui/gui.h +++ b/reactos/boot/freeldr/freeldr/ui/gui.h @@ -33,23 +33,23 @@ VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillCha VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified VOID GuiDrawBox(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 GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified -VOID GuiDrawStatusText(PUCHAR StatusText); // Draws text at the very bottom line on the screen +VOID GuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen VOID GuiUpdateDateTime(VOID); // Updates the date and time VOID GuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later VOID GuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save -VOID GuiMessageBox(PUCHAR MessageText); // Displays a message box on the screen with an ok button -VOID GuiMessageBoxCritical(PUCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources +VOID GuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button +VOID GuiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources VOID GuiDrawProgressBar(ULONG Position, ULONG Range); // Draws the progress bar showing nPos percent filled -UCHAR GuiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value -UCHAR GuiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill into it's equivalent fill value +UCHAR GuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value +UCHAR GuiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value /////////////////////////////////////////////////////////////////////////////////////// // // Menu Functions // /////////////////////////////////////////////////////////////////////////////////////// -BOOL GuiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem); +BOOL GuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem); diff --git a/reactos/boot/freeldr/freeldr/ui/tui.c b/reactos/boot/freeldr/freeldr/ui/tui.c index 6cd5397a79e..3c0874adb2d 100644 --- a/reactos/boot/freeldr/freeldr/ui/tui.c +++ b/reactos/boot/freeldr/freeldr/ui/tui.c @@ -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, PCHAR Text, UCHAR Attr) +VOID TuiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr) { PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer; ULONG i, j; @@ -317,7 +317,7 @@ VOID TuiDrawText(ULONG X, ULONG Y, PCHAR Text, UCHAR Attr) } } -VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCHAR TextString, UCHAR Attr) +VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr) { ULONG TextLength; ULONG BoxWidth; @@ -378,7 +378,7 @@ VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCHAR } } -VOID TuiDrawStatusText(PCHAR StatusText) +VOID TuiDrawStatusText(PCSTR StatusText) { ULONG i; @@ -504,7 +504,7 @@ VOID TuiRestoreScreen(PUCHAR Buffer) } } -VOID TuiMessageBox(PCHAR MessageText) +VOID TuiMessageBox(PCSTR MessageText) { PVOID ScreenBuffer; @@ -520,7 +520,7 @@ VOID TuiMessageBox(PCHAR MessageText) MmFreeMemory(ScreenBuffer); } -VOID TuiMessageBoxCritical(PCHAR MessageText) +VOID TuiMessageBoxCritical(PCSTR MessageText) { int width = 8; unsigned int height = 1; @@ -662,7 +662,7 @@ VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG VideoCopyOffScreenBufferToVRAM(); } -UCHAR TuiTextToColor(PCHAR ColorText) +UCHAR TuiTextToColor(PCSTR ColorText) { if (stricmp(ColorText, "Black") == 0) return COLOR_BLACK; @@ -700,7 +700,7 @@ UCHAR TuiTextToColor(PCHAR ColorText) return COLOR_BLACK; } -UCHAR TuiTextToFillStyle(PCHAR FillStyleText) +UCHAR TuiTextToFillStyle(PCSTR FillStyleText) { if (stricmp(FillStyleText, "Light") == 0) { @@ -772,7 +772,7 @@ VOID TuiFadeOut(VOID) } -BOOL TuiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length) +BOOL TuiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length) { int width = 8; unsigned int height = 1; diff --git a/reactos/boot/freeldr/freeldr/ui/tui.h b/reactos/boot/freeldr/freeldr/ui/tui.h index 09d61eb65e2..c014930100e 100644 --- a/reactos/boot/freeldr/freeldr/ui/tui.h +++ b/reactos/boot/freeldr/freeldr/ui/tui.h @@ -35,20 +35,20 @@ VOID TuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop 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, 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 TuiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr); // Draws text at coordinates specified +VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges +VOID TuiDrawStatusText(PCSTR 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(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 TuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button +VOID TuiMessageBoxCritical(PCSTR 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); +BOOL TuiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length); -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 +UCHAR TuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value +UCHAR TuiTextToFillStyle(PCSTR 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 { - PCHAR *MenuItemList; + PCSTR *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(PCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter); +BOOL TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter); /* diff --git a/reactos/boot/freeldr/freeldr/ui/tuimenu.c b/reactos/boot/freeldr/freeldr/ui/tuimenu.c index 7a26126b869..923612da3dd 100644 --- a/reactos/boot/freeldr/freeldr/ui/tuimenu.c +++ b/reactos/boot/freeldr/freeldr/ui/tuimenu.c @@ -28,7 +28,7 @@ #include -BOOL TuiDisplayMenu(PCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) +BOOL TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) { TUI_MENU_INFO MenuInformation; ULONG LastClockSecond; diff --git a/reactos/boot/freeldr/freeldr/ui/ui.c b/reactos/boot/freeldr/freeldr/ui/ui.c index 8e976135e8b..f2056c6ae0f 100644 --- a/reactos/boot/freeldr/freeldr/ui/ui.c +++ b/reactos/boot/freeldr/freeldr/ui/ui.c @@ -57,7 +57,7 @@ VIDEODISPLAYMODE UiDisplayMode = VideoTextMode; // Tells us if we are in text BOOL UiUseSpecialEffects = FALSE; // Tells us if we should use fade effects -CHAR UiMonthNames[12][15] = { "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December " }; +const CHAR UiMonthNames[12][15] = { "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December " }; BOOL UiInitialize(BOOLEAN ShowGui) @@ -235,7 +235,7 @@ BOOL SetupUiInitialize(VOID) return TRUE; } -VOID UiUnInitialize(PCHAR BootText) +VOID UiUnInitialize(PCSTR BootText) { UiDrawBackdrop(); UiDrawStatusText("Booting..."); @@ -306,7 +306,7 @@ VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle } } -VOID UiDrawText(ULONG X, ULONG Y, PCHAR Text, UCHAR Attr) +VOID UiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr) { if (VideoTextMode == UiDisplayMode) { @@ -319,7 +319,7 @@ VOID UiDrawText(ULONG X, ULONG Y, PCHAR Text, UCHAR Attr) } } -VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCHAR TextString, UCHAR Attr) +VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr) { if (VideoTextMode == UiDisplayMode) { @@ -332,7 +332,7 @@ VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCHAR } } -VOID UiDrawStatusText(PCHAR StatusText) +VOID UiDrawStatusText(PCSTR StatusText) { if (!UserInterfaceUp) return; @@ -360,7 +360,7 @@ VOID UiUpdateDateTime(VOID) } } -VOID UiInfoBox(PCHAR MessageText) +VOID UiInfoBox(PCSTR MessageText) { ULONG TextLength; ULONG BoxWidth; @@ -421,7 +421,7 @@ VOID UiInfoBox(PCHAR MessageText) UiDrawCenteredText(Left, Top, Right, Bottom, MessageText, ATTR(UiTextColor, UiMenuBgColor)); } -VOID UiMessageBox(PCHAR MessageText) +VOID UiMessageBox(PCSTR MessageText) { // We have not yet displayed the user interface // We are probably still reading the .ini file @@ -446,7 +446,7 @@ VOID UiMessageBox(PCHAR MessageText) } } -VOID UiMessageBoxCritical(PCHAR MessageText) +VOID UiMessageBoxCritical(PCSTR MessageText) { // We have not yet displayed the user interface // We are probably still reading the .ini file @@ -471,7 +471,7 @@ VOID UiMessageBoxCritical(PCHAR MessageText) } } -UCHAR UiTextToColor(PCHAR ColorText) +UCHAR UiTextToColor(PCSTR ColorText) { if (VideoTextMode == UiDisplayMode) { @@ -485,7 +485,7 @@ UCHAR UiTextToColor(PCHAR ColorText) } } -UCHAR UiTextToFillStyle(PCHAR FillStyleText) +UCHAR UiTextToFillStyle(PCSTR FillStyleText) { if (VideoTextMode == UiDisplayMode) { @@ -527,7 +527,7 @@ VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG P } } -VOID UiShowMessageBoxesInSection(PCHAR SectionName) +VOID UiShowMessageBoxesInSection(PCSTR SectionName) { ULONG Idx; CHAR SettingName[80]; @@ -605,7 +605,7 @@ VOID UiTruncateStringEllipsis(PCHAR StringText, ULONG MaxChars) } } -BOOL UiDisplayMenu(PCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) +BOOL UiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) { if (VideoTextMode == UiDisplayMode) { @@ -645,7 +645,7 @@ VOID UiFadeOut(VOID) } } -BOOL UiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length) +BOOL UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length) { if (VideoTextMode == UiDisplayMode) {