ULONGLONG SectorNumber;
} DISKCONTEXT;
-static CHAR Hex[] = "0123456789abcdef";
+static const CHAR Hex[] = "0123456789abcdef";
/* Data cache for BIOS disks pre-enumeration */
UCHAR PcBiosDiskCount = 0;
void *Address;
} FRAME;
-char *i386ExceptionDescriptionText[] =
+static const char *i386ExceptionDescriptionText[] =
{
"Exception 00: DIVIDE BY ZERO\n\n",
"Exception 01: DEBUG EXCEPTION\n\n",
#include "compat.h"
extern void BootMain( LPSTR CmdLine );
-extern PCHAR GetFreeLoaderVersionString();
+extern const PCSTR GetFreeLoaderVersionString(VOID);
extern ULONG CacheSizeLimit;
of_proxy ofproxy;
void *PageDirectoryStart, *PageDirectoryEnd;
#define IMAGE_FILE_HEADER_SIZE 20
#define IMAGE_OPTIONAL_HEADER_AddressOfEntryPoint 16
-
.code16
/* fat helper code */
mov gs,ax
mov ss,ax
- /* Safe current stack pointer */
+ /* Save current stack pointer */
mov word ptr ds:[stack16], sp
/* Set PAE and PGE: 10100000b */
/* Enable A20 address line */
call EnableA20
- /* Safe real mode entry point in shared memory */
+ /* Save real mode entry point in shared memory */
mov dword ptr ds:[BSS_RealModeEntry], offset switch_to_real16
/* Address the image with es segment */
cli
- /* Safe current stack pointer */
+ /* Save current stack pointer */
mov word ptr ds:[stack16], sp
/* Load the GDT */
(*OS_LOADING_METHOD)(IN OperatingSystemItem* OperatingSystem,
IN USHORT OperatingSystemVersion);
-struct
+static const struct
{
- CHAR BootType[80];
+ PCHAR BootType;
USHORT OperatingSystemVersion;
OS_LOADING_METHOD Load;
} OSLoadingMethods[] =
#endif
"ReactOS"
};
- ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]);
ULONG SelectedMenuItem;
if (!UiDisplayMenu("Please choose a boot method:", "",
FALSE,
CustomBootMenuList,
- CustomBootMenuCount,
+ sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]),
0, -1,
&SelectedMenuItem,
TRUE,
#define FREELOADER_MINOR_VERSION 0
#define FREELOADER_PATCH_VERSION 0
-PCHAR GetFreeLoaderVersionString(VOID);
+const PCSTR GetFreeLoaderVersionString(VOID);
extern ULONG LoaderPagesSpanned;
-PCHAR MemTypeDesc[] = {
+static const PCSTR MemTypeDesc[] = {
"ExceptionBlock ", // ?
"SystemBlock ", // ?
"Free ",
#endif
};
+const
PCSTR FrldrDbgMsg = "Enable FreeLdr debug channels\n"
"Acceptable syntax: [level1]#channel1[,[level2]#channel2]\n"
"level can be one of: trace,warn,fixme,err\n"
DIRECTORY_SERVICES_RESTORE_MODE,
};
-ULONG OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]);
-
static enum BootOption BootOptionChoice = NO_OPTION;
static BOOLEAN BootLogging = FALSE;
static BOOLEAN VgaMode = FALSE;
if (!UiDisplayMenu("Select an option:", "",
TRUE,
OptionsMenuList,
- OptionsMenuItemCount,
+ sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]),
11, // Use "Start ReactOS normally" as default; see the switch below.
-1,
&SelectedMenuItem,
#include <freeldr.h>
-CHAR FreeLoaderVersionString[80];
+#define TOSTRING_(X) #X
+#define TOSTRING(X) TOSTRING_(X)
-PCHAR GetFreeLoaderVersionString(VOID)
-{
+static const PCSTR FreeLoaderVersionString =
#if (FREELOADER_PATCH_VERSION == 0)
- sprintf(FreeLoaderVersionString, "FreeLoader v%d.%d", FREELOADER_MAJOR_VERSION, FREELOADER_MINOR_VERSION);
+ "FreeLoader v" TOSTRING(FREELOADER_MAJOR_VERSION) "." TOSTRING(FREELOADER_MINOR_VERSION);
#else
- sprintf(FreeLoaderVersionString, "FreeLoader v%d.%d.%d", FREELOADER_MAJOR_VERSION, FREELOADER_MINOR_VERSION, FREELOADER_PATCH_VERSION);
+ "FreeLoader v" TOSTRING(FREELOADER_MAJOR_VERSION) "." TOSTRING(FREELOADER_MINOR_VERSION) "." TOSTRING(FREELOADER_PATCH_VERSION);
#endif
+const PCSTR GetFreeLoaderVersionString(VOID)
+{
return FreeLoaderVersionString;
}