ReactOS 0.4.15-dev-8417-gb6b82fe
freeldr.c File Reference
#include <freeldr.h>
#include <debug.h>
Include dependency graph for freeldr.c:

Go to the source code of this file.

Macros

#define TOSTRING_(X)   #X
 
#define TOSTRING(X)   TOSTRING_(X)
 

Functions

 DBG_DEFAULT_CHANNEL (WARNING)
 
VOID __cdecl BootMain (IN PCCH CmdLine)
 
int __cdecl wctomb (char *mbchar, wchar_t wchar)
 
int __cdecl mbtowc (wchar_t *wchar, const char *mbchar, size_t count)
 
int __cdecl iswctype (wint_t wc, wctype_t wctypeFlags)
 
double pow (double x, double y)
 
double log (double x)
 
double log10 (double x)
 

Variables

const PCSTR FrLdrVersionString
 
CCHAR FrLdrBootPath [MAX_PATH] = ""
 

Macro Definition Documentation

◆ TOSTRING

#define TOSTRING (   X)    TOSTRING_(X)

Definition at line 30 of file freeldr.c.

◆ TOSTRING_

#define TOSTRING_ (   X)    #X

Definition at line 29 of file freeldr.c.

Function Documentation

◆ BootMain()

VOID __cdecl BootMain ( IN PCCH  CmdLine)

Definition at line 43 of file freeldr.c.

44{
45 /* Load the default settings from the command-line */
47
48 /* Debugger pre-initialization */
50
52
53 TRACE("BootMain() called.\n");
54
55#ifndef UEFIBOOT
56 /* Check if the CPU is new enough */
57 FrLdrCheckCpuCompatibility(); // FIXME: Should be done inside MachInit!
58#endif
59
60 /* UI pre-initialization */
61 if (!UiInitialize(FALSE))
62 {
63 UiMessageBoxCritical("Unable to initialize UI.");
64 goto Quit;
65 }
66
67 /* Initialize memory manager */
69 {
70 UiMessageBoxCritical("Unable to initialize memory manager.");
71 goto Quit;
72 }
73
74 /* Initialize I/O subsystem */
75 FsInit();
76
77 RunLoader();
78
79Quit:
80 /* If we reach this point, something went wrong before, therefore reboot */
81 Reboot();
82}
void LoadSettings(void)
Definition: settings.c:53
@ Reboot
Definition: bl.h:891
#define DebugInit(DebugString)
Definition: debug.h:120
VOID FsInit(VOID)
Definition: fs.c:432
BOOLEAN MmInitializeMemoryManager(VOID)
Definition: meminit.c:315
BOOTMGRINFO BootMgrInfo
Definition: settings.c:18
VOID UiMessageBoxCritical(_In_ PCSTR MessageText)
Definition: ui.c:372
BOOLEAN UiInitialize(BOOLEAN ShowUi)
Definition: ui.c:92
#define FALSE
Definition: types.h:117
static const WCHAR CmdLine[]
Definition: install.c:48
VOID RunLoader(VOID)
Definition: bootmgr.c:356
VOID FrLdrCheckCpuCompatibility(VOID)
Definition: macharm.c:65
VOID MachInit(IN PCCH CommandLine)
Definition: macharm.c:182
#define TRACE(s)
Definition: solgame.cpp:4
PCSTR DebugString
Definition: settings.h:12

Referenced by ArmInit(), and RealEntryPoint().

◆ DBG_DEFAULT_CHANNEL()

DBG_DEFAULT_CHANNEL ( WARNING  )

◆ iswctype()

int __cdecl iswctype ( wint_t  wc,
wctype_t  wctypeFlags 
)

Definition at line 100 of file freeldr.c.

101{
102 return _isctype((char)wc, wctypeFlags);
103}
_Check_return_ _CRTIMP int __cdecl _isctype(_In_ int _C, _In_ int _Type)

Referenced by _wcstoi64_l(), _wcstoui64_l(), _wtoi64_l(), _wtol(), iswalnum(), iswalpha(), iswblank(), iswcntrl(), iswdigit(), iswgraph(), iswlower(), iswprint(), iswpunct(), iswspace(), iswupper(), iswxdigit(), rangematch(), towlower(), towupper(), wcstol(), and wcstoul().

◆ log()

double log ( double  x)

Definition at line 119 of file freeldr.c.

120{
121 __debugbreak();
122 return 0.0;
123}
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698

◆ log10()

◆ mbtowc()

int __cdecl mbtowc ( wchar_t wchar,
const char mbchar,
size_t  count 
)

Definition at line 93 of file freeldr.c.

94{
95 *wchar = (wchar_t)*mbchar;
96 return 1;
97}
#define wchar_t
Definition: wchar.h:102

◆ pow()

◆ wctomb()

int __cdecl wctomb ( char mbchar,
wchar_t  wchar 
)

Definition at line 87 of file freeldr.c.

88{
89 *mbchar = (char)wchar;
90 return 1;
91}
unsigned char
Definition: typeof.h:29

Variable Documentation

◆ FrLdrBootPath

◆ FrLdrVersionString

const PCSTR FrLdrVersionString
Initial value:
=
#define TOSTRING(X)
Definition: freeldr.c:30
#define FREELOADER_MINOR_VERSION
Definition: ver.h:36
#define FREELOADER_MAJOR_VERSION
Definition: ver.h:35

Definition at line 32 of file freeldr.c.

Referenced by TuiDrawBackdrop().