ReactOS  0.4.13-dev-247-g0f29b3f
freeldr.c File Reference
#include <freeldr.h>
#include <debug.h>
Include dependency graph for freeldr.c:

Go to the source code of this file.

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)
 

Function Documentation

◆ BootMain()

VOID __cdecl BootMain ( IN PCCH  CmdLine)

Definition at line 29 of file freeldr.c.

30 {
32 
33  /* Debugger pre-initialization */
35 
36  TRACE("BootMain() called.\n");
37 
39 
40  /* Check if the CPU is new enough */
41  FrLdrCheckCpuCompatibility(); // FIXME: Should be done inside MachInit!
42 
43  /* UI pre-initialization */
44  if (!UiInitialize(FALSE))
45  {
46  UiMessageBoxCritical("Unable to initialize UI.");
47  goto Quit;
48  }
49 
50  /* Initialize memory manager */
52  {
53  UiMessageBoxCritical("Unable to initialize memory manager.");
54  goto Quit;
55  }
56 
57  /* Initialize I/O subsystem */
58  FsInit();
59 
60  RunLoader();
61 
62 Quit:
63  /* If we reach this point, something went wrong before, therefore reboot */
64 #if defined(__i386__) || defined(_M_AMD64)
66 #endif
67  Reboot();
68 }
#define DebugInit(init)
Definition: debug.h:116
VOID FsInit(VOID)
Definition: fs.c:488
char CmdLine[0x100]
Definition: mach.c:35
VOID RunLoader(VOID)
Definition: bootmgr.c:176
BOOLEAN MmInitializeMemoryManager(VOID)
Definition: meminit.c:313
BOOLEAN UiInitialize(BOOLEAN ShowGui)
Definition: ui.c:84
Definition: bl.h:892
#define TRACE(s)
Definition: solgame.cpp:4
VOID FrLdrCheckCpuCompatibility(VOID)
Definition: macharm.c:67
VOID CmdLineParse(IN PCCH CmdLine)
Definition: cmdline.c:29
VOID UiMessageBoxCritical(PCSTR MessageText)
Definition: ui.c:358
#define MachInit
Definition: amd64.h:42
VOID DiskStopFloppyMotor(VOID)
Definition: macharm.c:62

◆ DBG_DEFAULT_CHANNEL()

DBG_DEFAULT_CHANNEL ( WARNING  )

◆ iswctype()

int __cdecl iswctype ( wint_t  wc,
wctype_t  wctypeFlags 
)

Definition at line 86 of file freeldr.c.

87 {
88  return _isctype((char)wc, wctypeFlags);
89 }
_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 79 of file freeldr.c.

80 {
81  *wchar = (wchar_t)*mbchar;
82  return 1;
83 }
#define wchar_t
Definition: wchar.h:102

◆ wctomb()

int __cdecl wctomb ( char mbchar,
wchar_t  wchar 
)

Definition at line 73 of file freeldr.c.

74 {
75  *mbchar = (char)wchar;
76  return 1;
77 }
unsigned char
Definition: typeof.h:29