Compare commits

..

No commits in common. "3034e4d1864e008a28f870ac2688053bcb6a9ce8" and "972f244ae554fa0ca22d22c3b43224cb9e6047aa" have entirely different histories.

4 changed files with 5 additions and 11 deletions

View File

@ -15,9 +15,3 @@ C library with collections, strings, exceptions, io...
```
## Usage
Include `tlibc/tlibc.h` and put this code at the beginning of `main()`.
```
Deferral(32);
try_fatal_void(tlibc_init());
Defer(tlibc_deinit());
```

View File

@ -36,11 +36,11 @@ void Error_printAndExit(Error* e) ATTRIBUTE_NORETURN;
void _ErrorCodePage_register(u16* error_code_page_ptr);
#define ErrorCodePage_register(name) _ErrorCodePage_register(&ErrorCodePage_name(name));
typedef enum TlibcError {
typedef enum TLIBC_ERROR {
TLIBC_ERROR_UNKNOWN
} TlibcError;
} TLIBC_ERROR;
#define ErrorCodePage_NONE 0
ErrorCodePage_declare(TLIBC);
ErrorCodePage_declare(TLIBC_ERROR);
ErrorCodePage_declare(LIBC_ERRNO);
typedef struct Result_ {

View File

@ -56,7 +56,7 @@ void Error_printAndExit(Error* e){
exit(111);
}
ErrorCodePage_define(TLIBC);
ErrorCodePage_define(TLIBC_ERROR);
ErrorCodePage_define(LIBC_ERRNO);
static u16 _error_code_page_last = 0;

View File

@ -3,7 +3,7 @@
Result(void) tlibc_init(){
Deferral(8);
ErrorCodePage_register(TLIBC);
ErrorCodePage_register(TLIBC_ERROR);
ErrorCodePage_register(LIBC_ERRNO);
Return RESULT_VOID;