fixed warnings when compiled with -Wwrite-strings

svn path=/trunk/; revision=19135
This commit is contained in:
Thomas Bluemel 2005-11-11 18:11:17 +00:00
parent b260dcdb81
commit 3a4e051af1
50 changed files with 176 additions and 177 deletions

View file

@ -27,7 +27,7 @@
#include "rtl.h"
VOID
MachInit(char *CmdLine)
MachInit(const char *CmdLine)
{
ULONG PciId;

View file

@ -26,7 +26,7 @@
#include "i386.h"
VOID
PcMachInit(char *CmdLine)
PcMachInit(const char *CmdLine)
{
EnableA20();

View file

@ -26,7 +26,7 @@
#include "mm.h"
#endif
VOID PcMachInit(char *CmdLine);
VOID PcMachInit(const char *CmdLine);
VOID PcConsPutChar(int Ch);
BOOL PcConsKbHit();

View file

@ -24,7 +24,7 @@
#include "i386.h"
VOID
XboxMachInit(char *CmdLine)
XboxMachInit(const char *CmdLine)
{
/* Initialize our stuff */
XboxMemInit();

View file

@ -26,7 +26,7 @@
UCHAR XboxFont8x16[256 * 16];
VOID XboxMachInit(char *CmdLine);
VOID XboxMachInit(const char *CmdLine);
VOID XboxConsPutChar(int Ch);
BOOL XboxConsKbHit();

View file

@ -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",

View file

@ -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;

View file

@ -106,7 +106,7 @@ CmdLineParse(char *CmdLine)
}
}
char *
const char *
CmdLineGetDefaultOS(void)
{
return CmdLineInfo.DefaultOperatingSystem;

View file

@ -32,20 +32,20 @@
#include <machine.h>
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;

View file

@ -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)
{

View file

@ -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;

View file

@ -27,7 +27,7 @@
#include <fs.h>
#include <cmdline.h>
VOID BootMain(char *CmdLine)
VOID BootMain(LPSTR CmdLine)
{
CmdLineParse(CmdLine);

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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);

View file

@ -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__ */

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -127,9 +127,9 @@ typedef struct
VOID BootNewLinuxKernel(VOID); // Implemented in linux.S
VOID BootOldLinuxKernel(ULONG KernelSize); // Implemented in linux.S
VOID LoadAndBootLinux(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);

View file

@ -72,7 +72,7 @@ typedef struct tagMACHVTBL
VOID (*HwDetect)(VOID);
} MACHVTBL, *PMACHVTBL;
VOID MachInit(char *CmdLine);
VOID MachInit(const char *CmdLine);
extern MACHVTBL MachVtbl;

View file

@ -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

View file

@ -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);

View file

@ -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);

View file

@ -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
///////////////////////////////////////////////////////////////////////////////////////

View file

@ -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);

View file

@ -24,7 +24,7 @@
#include <debug.h>
#include <mm.h>
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;

View file

@ -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;

View file

@ -29,7 +29,7 @@
#include <drivemap.h>
#include <machine.h>
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];

View file

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

View file

@ -24,7 +24,7 @@
#include <mm.h>
#include <ui.h>
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;
}

View file

@ -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)
{

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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);

View file

@ -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;
}

View file

@ -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);

View file

@ -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;

View file

@ -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);
/*

View file

@ -28,7 +28,7 @@
#include <video.h>
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;

View file

@ -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)
{