#include "rtl.h"
VOID
-MachInit(char *CmdLine)
+MachInit(const char *CmdLine)
{
ULONG PciId;
#include "i386.h"
VOID
-PcMachInit(char *CmdLine)
+PcMachInit(const char *CmdLine)
{
EnableA20();
#include "mm.h"
#endif
-VOID PcMachInit(char *CmdLine);
+VOID PcMachInit(const char *CmdLine);
VOID PcConsPutChar(int Ch);
BOOL PcConsKbHit();
#include "i386.h"
VOID
-XboxMachInit(char *CmdLine)
+XboxMachInit(const char *CmdLine)
{
/* Initialize our stuff */
XboxMemInit();
UCHAR XboxFont8x16[256 * 16];
-VOID XboxMachInit(char *CmdLine);
+VOID XboxMachInit(const char *CmdLine);
VOID XboxConsPutChar(int Ch);
BOOL XboxConsKbHit();
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",
CHAR SettingValue[80];
ULONG SectionId;
ULONG OperatingSystemCount;
- PCHAR *OperatingSystemSectionNames;
- PCHAR *OperatingSystemDisplayNames;
+ PCSTR *OperatingSystemSectionNames;
+ PCSTR *OperatingSystemDisplayNames;
ULONG DefaultOperatingSystem;
LONG TimeOut;
ULONG SelectedOperatingSystem;
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;
}
}
-char *
+const char *
CmdLineGetDefaultOS(void)
{
return CmdLineInfo.DefaultOperatingSystem;
#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;
bReportError = bError;
}
-VOID DiskError(PCHAR ErrorString, ULONG ErrorCode)
+VOID DiskError(PCSTR ErrorString, ULONG ErrorCode)
{
CHAR ErrorCodeString[200];
UiMessageBox(ErrorCodeString);
}
-PCHAR DiskGetErrorCodeString(ULONG ErrorCode)
+PCSTR DiskGetErrorCodeString(ULONG ErrorCode)
{
switch (ErrorCode)
{
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];
}
}
-BOOL DriveMapIsValidDriveString(PCHAR DriveString)
+BOOL DriveMapIsValidDriveString(PCSTR DriveString)
{
ULONG Index;
return TRUE;
}
-ULONG DriveMapGetBiosDriveNumber(PCHAR DeviceName)
+ULONG DriveMapGetBiosDriveNumber(PCSTR DeviceName)
{
ULONG BiosDriveNumber = 0;
#include <fs.h>
#include <cmdline.h>
-VOID BootMain(char *CmdLine)
+VOID BootMain(LPSTR CmdLine)
{
CmdLineParse(CmdLine);
* 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;
* 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;
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);
* 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;
* 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;
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);
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
-VOID FileSystemError(PCHAR ErrorString)
+VOID FileSystemError(PCSTR ErrorString)
{
DbgPrint((DPRINT_FILESYSTEM, "%s\n", ErrorString));
}
-PFILE FsOpenFile(PCHAR FileName)
+PFILE FsOpenFile(PCSTR FileName)
{
PFILE FileHandle = NULL;
* 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;
* 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;
* 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;
* 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;
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);
}
/* 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;
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];
return TRUE;
}
-FILE* NtfsOpenFile(PCHAR FileName)
+FILE* NtfsOpenFile(PCSTR FileName)
{
PNTFS_FILE_HANDLE FileHandle;
PNTFS_MFT_RECORD MftRecord;
} 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);
#define __BOOTMGR_H
-ULONG GetDefaultOperatingSystem(PCHAR OperatingSystemList[], ULONG OperatingSystemCount);
+ULONG GetDefaultOperatingSystem(PCSTR OperatingSystemList[], ULONG OperatingSystemCount);
LONG GetTimeOut(VOID);
BOOL MainBootMenuKeyPressFilter(ULONG KeyPress);
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__ */
//
///////////////////////////////////////////////////////////////////////////////////////
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
} 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
#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
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
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);
VOID (*HwDetect)(VOID);
} MACHVTBL, *PMACHVTBL;
-VOID MachInit(char *CmdLine);
+VOID MachInit(const char *CmdLine);
extern MACHVTBL MachVtbl;
#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
#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);
// ReactOS Loading Functions
//
///////////////////////////////////////////////////////////////////////////////////////
-VOID LoadAndBootReactOS(PCHAR OperatingSystemName);
+VOID LoadAndBootReactOS(PCSTR OperatingSystemName);
///////////////////////////////////////////////////////////////////////////////////////
//
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);
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#define UINT64_C(val) val##ULL
///////////////////////////////////////////////////////////////////////////////////////
extern BOOL UiUseSpecialEffects; // Tells us if we should use fade effects
-extern CHAR UiMonthNames[12][15];
+extern const 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 '...'
///////////////////////////////////////////////////////////////////////////////////////
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);
#include <debug.h>
#include <mm.h>
-BOOL IniOpenSection(PCHAR SectionName, ULONG* SectionId)
+BOOL IniOpenSection(PCSTR SectionName, ULONG* SectionId)
{
PINI_SECTION Section;
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;
return FALSE;
}
-BOOL IniAddSection(PCHAR SectionName, ULONG* SectionId)
+BOOL IniAddSection(PCSTR SectionName, ULONG* SectionId)
{
PINI_SECTION Section;
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;
CHAR LinuxBootDescription[80];
CHAR LinuxBootPath[260] = "";
-VOID LoadAndBootLinux(PCHAR OperatingSystemName, PCHAR Description)
+VOID LoadAndBootLinux(PCSTR OperatingSystemName, PCSTR Description)
{
PFILE LinuxKernel = NULL;
PFILE LinuxInitrdFile = NULL;
LinuxCommandLineSize = 0;
}
-BOOL LinuxParseIniSection(PCHAR OperatingSystemName)
+BOOL LinuxParseIniSection(PCSTR OperatingSystemName)
{
CHAR SettingName[260];
ULONG SectionId;
#include <drivemap.h>
#include <machine.h>
-VOID LoadAndBootBootSector(PCHAR OperatingSystemName)
+VOID LoadAndBootBootSector(PCSTR OperatingSystemName)
{
PFILE FilePointer;
CHAR SettingName[80];
ChainLoadBiosBootSectorCode();
}
-VOID LoadAndBootPartition(PCHAR OperatingSystemName)
+VOID LoadAndBootPartition(PCSTR OperatingSystemName)
{
CHAR SettingName[80];
CHAR SettingValue[80];
ChainLoadBiosBootSectorCode();
}
-VOID LoadAndBootDrive(PCHAR OperatingSystemName)
+VOID LoadAndBootDrive(PCSTR OperatingSystemName)
{
CHAR SettingName[80];
CHAR SettingValue[80];
#include <arch.h>
-PCHAR OptionsMenuList[] =
+PCSTR OptionsMenuList[] =
{
"Safe Mode",
"Safe Mode with Networking",
#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;
}
*OperatingSystemCountPointer = OperatingSystemCount;
- *SectionNamesPointer = OperatingSystemSectionNames;
- *DisplayNamesPointer = OperatingSystemDisplayNames;
+ *SectionNamesPointer = (PCSTR*)OperatingSystemSectionNames;
+ *DisplayNamesPointer = (PCSTR*)OperatingSystemDisplayNames;
return TRUE;
}
static VOID
-CmiCreateDefaultRootKeyCell (PKEY_CELL RootKeyCell, PCHAR KeyName)
+CmiCreateDefaultRootKeyCell (PKEY_CELL RootKeyCell, PCSTR KeyName)
{
PCHAR BaseKeyName;
ULONG NameSize;
static PREGISTRY_HIVE
-CmiCreateHive (PCHAR KeyName)
+CmiCreateHive (PCSTR KeyName)
{
PREGISTRY_HIVE Hive;
PCELL_HEADER FreeCell;
static BOOL
CmiExportHive (PREGISTRY_HIVE Hive,
- PCHAR KeyName)
+ PCSTR KeyName)
{
PKEY_CELL KeyCell;
FRLDRHKEY Key;
BOOL
-RegExportBinaryHive(PCHAR KeyName,
+RegExportBinaryHive(PCSTR KeyName,
PCHAR ChunkBase,
ULONG* ChunkSize)
{
ULONG_PTR
STDCALL
FrLdrLoadModule(FILE *ModuleImage,
- LPSTR ModuleName,
+ LPCSTR ModuleName,
PULONG ModuleSize)
{
ULONG LocalModuleSize;
ULONG_PTR
STDCALL
-FrLdrCreateModule(LPSTR ModuleName)
+FrLdrCreateModule(LPCSTR ModuleName)
{
PLOADER_MODULE ModuleData;
LPSTR NameBuffer;
FrLdrMapKernel(FilePointer);
/* Update Processbar and return success */
- UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS...");
+ UiDrawProgressBarCenter(nPos, 100, (PCHAR)"Loading ReactOS...");
return(TRUE);
}
}
static BOOL
-FrLdrLoadNlsFile(PCHAR szFileName,
- PCHAR szModuleName)
+FrLdrLoadNlsFile(PCSTR szFileName,
+ PCSTR szModuleName)
{
PFILE FilePointer;
CHAR value[256];
FrLdrLoadModule(FilePointer, szFileName, NULL);
/* Update status and return */
- UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS...");
+ UiDrawProgressBarCenter(nPos, 100, (PCHAR)"Loading ReactOS...");
return(TRUE);
}
}
VOID
-LoadAndBootReactOS(PCHAR OperatingSystemName)
+LoadAndBootReactOS(PCSTR OperatingSystemName)
{
PFILE FilePointer;
CHAR name[1024];
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
*/
RegInitCurrentControlSet(FALSE);
- UiDrawProgressBarCenter(15, 100, "Loading ReactOS...");
+ UiDrawProgressBarCenter(15, 100, (PCHAR)"Loading ReactOS...");
/*
* Export the hardware hive
RegExportBinaryHive ("\\Registry\\Machine\\HARDWARE", (PCHAR)Base, &Size);
FrLdrCloseModule (Base, Size);
- UiDrawProgressBarCenter(20, 100, "Loading ReactOS...");
+ UiDrawProgressBarCenter(20, 100, (PCHAR)"Loading ReactOS...");
/*
* Load NLS files
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
LONG
RegCreateKey(FRLDRHKEY ParentKey,
- PCHAR KeyName,
+ PCSTR KeyName,
PFRLDRHKEY Key)
{
PLIST_ENTRY Ptr;
FRLDRHKEY CurrentKey;
FRLDRHKEY NewKey;
PCHAR p;
- PCHAR name;
+ PCSTR name;
int subkeyLength;
int stringLength;
LONG
RegDeleteKey(FRLDRHKEY Key,
- PCHAR Name)
+ PCSTR Name)
{
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;
LONG
RegSetValue(FRLDRHKEY Key,
- PCHAR ValueName,
+ PCSTR ValueName,
ULONG Type,
- PCHAR Data,
+ PCSTR Data,
ULONG DataSize)
{
PLIST_ENTRY Ptr;
LONG
RegQueryValue(FRLDRHKEY Key,
- PCHAR ValueName,
+ PCSTR ValueName,
ULONG* Type,
PUCHAR Data,
ULONG* DataSize)
LONG
RegDeleteValue(FRLDRHKEY Key,
- PCHAR ValueName)
+ PCSTR ValueName)
{
PLIST_ENTRY Ptr;
PVALUE Value = NULL;
LONG
RegCreateKey(FRLDRHKEY ParentKey,
- PCHAR KeyName,
+ PCSTR KeyName,
PFRLDRHKEY Key);
LONG
RegDeleteKey(FRLDRHKEY Key,
- PCHAR Name);
+ PCSTR Name);
LONG
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,
ULONG ChunkSize);
BOOL
-RegExportBinaryHive (PCHAR KeyName,
+RegExportBinaryHive (PCSTR KeyName,
PCHAR ChunkBase,
ULONG* ChunkSize);
{
}
-VOID GuiDrawStatusText(PUCHAR StatusText)
+VOID GuiDrawStatusText(PCSTR StatusText)
{
}
{
}
-VOID GuiMessageBox(PUCHAR MessageText)
+VOID GuiMessageBox(PCSTR MessageText)
{
}
-VOID GuiMessageBoxCritical(PUCHAR MessageText)
+VOID GuiMessageBoxCritical(PCSTR MessageText)
{
}
{
}
-UCHAR GuiTextToColor(PUCHAR ColorText)
+UCHAR GuiTextToColor(PCSTR ColorText)
{
return 0;
}
-UCHAR GuiTextToFillStyle(PUCHAR FillStyleText)
+UCHAR GuiTextToFillStyle(PCSTR FillStyleText)
{
return 0;
}
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);
* 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;
}
}
-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;
}
}
-VOID TuiDrawStatusText(PCHAR StatusText)
+VOID TuiDrawStatusText(PCSTR StatusText)
{
ULONG i;
}
}
-VOID TuiMessageBox(PCHAR MessageText)
+VOID TuiMessageBox(PCSTR MessageText)
{
PVOID ScreenBuffer;
MmFreeMemory(ScreenBuffer);
}
-VOID TuiMessageBoxCritical(PCHAR MessageText)
+VOID TuiMessageBoxCritical(PCSTR MessageText)
{
int width = 8;
unsigned int height = 1;
VideoCopyOffScreenBufferToVRAM();
}
-UCHAR TuiTextToColor(PCHAR ColorText)
+UCHAR TuiTextToColor(PCSTR ColorText)
{
if (stricmp(ColorText, "Black") == 0)
return COLOR_BLACK;
return COLOR_BLACK;
}
-UCHAR TuiTextToFillStyle(PCHAR FillStyleText)
+UCHAR TuiTextToFillStyle(PCSTR FillStyleText)
{
if (stricmp(FillStyleText, "Light") == 0)
{
}
-BOOL TuiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length)
+BOOL TuiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
{
int width = 8;
unsigned int height = 1;
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
typedef struct
{
- PCHAR *MenuItemList;
+ PCSTR *MenuItemList;
ULONG MenuItemCount;
LONG MenuTimeRemaining;
ULONG SelectedMenuItem;
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);
/*
#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;
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)
return TRUE;
}
-VOID UiUnInitialize(PCHAR BootText)
+VOID UiUnInitialize(PCSTR BootText)
{
UiDrawBackdrop();
UiDrawStatusText("Booting...");
}
}
-VOID UiDrawText(ULONG X, ULONG Y, PCHAR Text, UCHAR Attr)
+VOID UiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
{
if (VideoTextMode == UiDisplayMode)
{
}
}
-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)
{
}
}
-VOID UiDrawStatusText(PCHAR StatusText)
+VOID UiDrawStatusText(PCSTR StatusText)
{
if (!UserInterfaceUp) return;
}
}
-VOID UiInfoBox(PCHAR MessageText)
+VOID UiInfoBox(PCSTR MessageText)
{
ULONG TextLength;
ULONG BoxWidth;
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
}
}
-VOID UiMessageBoxCritical(PCHAR MessageText)
+VOID UiMessageBoxCritical(PCSTR MessageText)
{
// We have not yet displayed the user interface
// We are probably still reading the .ini file
}
}
-UCHAR UiTextToColor(PCHAR ColorText)
+UCHAR UiTextToColor(PCSTR ColorText)
{
if (VideoTextMode == UiDisplayMode)
{
}
}
-UCHAR UiTextToFillStyle(PCHAR FillStyleText)
+UCHAR UiTextToFillStyle(PCSTR FillStyleText)
{
if (VideoTextMode == UiDisplayMode)
{
}
}
-VOID UiShowMessageBoxesInSection(PCHAR SectionName)
+VOID UiShowMessageBoxesInSection(PCSTR SectionName)
{
ULONG Idx;
CHAR SettingName[80];
}
}
-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)
{
}
}
-BOOL UiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length)
+BOOL UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
{
if (VideoTextMode == UiDisplayMode)
{