mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Reformat libmaxsi init.cpp.
This commit is contained in:
parent
6f08593801
commit
83ecf895d7
1 changed files with 18 additions and 21 deletions
|
@ -26,30 +26,27 @@
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
namespace Maxsi
|
extern "C" { char program_invocation_name_data[256] = ""; }
|
||||||
|
extern "C" { char* program_invocation_name = program_invocation_name_data; }
|
||||||
|
|
||||||
|
extern "C" void init_error_functions();
|
||||||
|
extern "C" void init_stdio();
|
||||||
|
extern "C" void init_signal();
|
||||||
|
|
||||||
|
extern "C" void initialize_standard_library(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
extern "C" { char program_invocation_name_data[256] = ""; }
|
if ( argc )
|
||||||
extern "C" { char* program_invocation_name = program_invocation_name_data; }
|
strcpy(program_invocation_name, argv[0]);
|
||||||
|
|
||||||
extern "C" void init_error_functions();
|
// Initialize stuff such as errno.
|
||||||
extern "C" void init_stdio();
|
init_error_functions();
|
||||||
extern "C" void init_signal();
|
|
||||||
|
|
||||||
extern "C" void initialize_standard_library(int argc, char* argv[])
|
// It's probably best to initialize the Unix signals early on.
|
||||||
{
|
init_signal();
|
||||||
if ( argc )
|
|
||||||
strcpy(program_invocation_name, argv[0]);
|
|
||||||
|
|
||||||
// Initialize stuff such as errno.
|
// Initialize the dynamic heap.
|
||||||
init_error_functions();
|
_init_heap();
|
||||||
|
|
||||||
// It's probably best to initialize the Unix signals early on.
|
// Initialize stdio.
|
||||||
init_signal();
|
init_stdio();
|
||||||
|
|
||||||
// Initialize the dynamic heap.
|
|
||||||
_init_heap();
|
|
||||||
|
|
||||||
// Initialize stdio.
|
|
||||||
init_stdio();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue