ReactOS  0.4.14-dev-114-gc8cbd56
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)
 

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 {
46 
47  /* Debugger pre-initialization */
48  DebugInit(0);
49 
50  TRACE("BootMain() called.\n");
51 
53 
54  /* Check if the CPU is new enough */
55  FrLdrCheckCpuCompatibility(); // FIXME: Should be done inside MachInit!
56 
57  /* UI pre-initialization */
58  if (!UiInitialize(FALSE))
59  {
60  UiMessageBoxCritical("Unable to initialize UI.");
61  goto Quit;
62  }
63 
64  /* Initialize memory manager */
66  {
67  UiMessageBoxCritical("Unable to initialize memory manager.");
68  goto Quit;
69  }
70 
71  /* Initialize I/O subsystem */
72  FsInit();
73 
74  RunLoader();
75 
76 Quit:
77  /* If we reach this point, something went wrong before, therefore reboot */
78  Reboot();
79 }
VOID FsInit(VOID)
Definition: fs.c:430
VOID RunLoader(VOID)
Definition: bootmgr.c:299
BOOLEAN MmInitializeMemoryManager(VOID)
Definition: meminit.c:313
BOOLEAN UiInitialize(BOOLEAN ShowGui)
Definition: ui.c:84
#define DebugInit(FrLdrSectionId)
Definition: debug.h:116
VOID CmdLineParse(IN PCSTR CmdLine)
Definition: cmdline.c:29
Definition: bl.h:892
#define TRACE(s)
Definition: solgame.cpp:4
VOID FrLdrCheckCpuCompatibility(VOID)
Definition: macharm.c:63
CHAR CmdLine[MAX_PATH]
Definition: mach.c:34
VOID UiMessageBoxCritical(PCSTR MessageText)
Definition: ui.c:331
#define MachInit
Definition: amd64.h:42

◆ DBG_DEFAULT_CHANNEL()

DBG_DEFAULT_CHANNEL ( WARNING  )

◆ iswctype()

int __cdecl iswctype ( wint_t  wc,
wctype_t  wctypeFlags 
)

Definition at line 97 of file freeldr.c.

98 {
99  return _isctype((char)wc, wctypeFlags);
100 }
_Check_return_ _CRTIMP int __cdecl _isctype(_In_ int _C, _In_ int _Type)

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

◆ mbtowc()

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

Definition at line 90 of file freeldr.c.

91 {
92  *wchar = (wchar_t)*mbchar;
93  return 1;
94 }
#define wchar_t
Definition: wchar.h:102

◆ wctomb()

int __cdecl wctomb ( char mbchar,
wchar_t  wchar 
)

Definition at line 84 of file freeldr.c.

85 {
86  *mbchar = (char)wchar;
87  return 1;
88 }
unsigned char
Definition: typeof.h:29

Variable Documentation

◆ FrLdrBootPath

CCHAR FrLdrBootPath[MAX_PATH] = ""

Definition at line 39 of file freeldr.c.

◆ FrLdrVersionString

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

Definition at line 32 of file freeldr.c.

Referenced by PpcOfwInit(), PpcPrepInit(), and TuiDrawBackdrop().