diff options
| author | nasr <nsrddyn@gmail.com> | 2026-04-17 17:49:10 +0200 |
|---|---|---|
| committer | nasr <nsrddyn@gmail.com> | 2026-04-17 17:50:28 +0200 |
| commit | 078e21a1feb811f9ef7797ce3ee5d2e8ffcccfce (patch) | |
| tree | c1121bed141fb536be6b21a6fc54ccd2b5ac7302 /source/base/base.h | |
| parent | 9d09d66a273f68fae7efb71504bf40c664b91983 (diff) | |
feature(main): during my work on other projects I improved the base library a bit.
this is a drag and drop of that in the project. the next steps exit out of implementing
lineair regression and attempting to calcualte what the value would be of a key in the btree...
Signed-off-by: nasr <nsrddyn@gmail.com>
feature(main): during my work on other projects I improved the base library a bit.
this is a drag and drop of that in the project. the next steps exit out
of implementing
lineair regression and attempting to calcualte what the value would be
of a key in the btree...
Signed-off-by: nasr <nsrddyn@gmail.com>
Diffstat (limited to 'source/base/base.h')
| -rwxr-xr-x | source/base/base.h | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/source/base/base.h b/source/base/base.h index b9e317a..3fe9dca 100755 --- a/source/base/base.h +++ b/source/base/base.h | |||
| @@ -2,28 +2,11 @@ | |||
| 2 | #define BASE_H | 2 | #define BASE_H |
| 3 | 3 | ||
| 4 | /* assert an expression and output the file and the line */ | 4 | /* assert an expression and output the file and the line */ |
| 5 | 5 | #define internal static | |
| 6 | #define internal static | ||
| 7 | #define global_variable static | 6 | #define global_variable static |
| 8 | #define local_persist static | 7 | #define local_persist static |
| 9 | |||
| 10 | #define ERR_OK 0 | ||
| 11 | #define ERR_IO 1 | ||
| 12 | #define ERR_PARSE 2 | ||
| 13 | #define ERR_PERM 3 | ||
| 14 | #define ERR_INVALID 4 | ||
| 15 | |||
| 16 | #define KiB(n) (((u64)(n)) << 10) | ||
| 17 | #define MiB(n) (((u64)(n)) << 20) | ||
| 18 | #define GiB(n) (((u64)(n)) << 30) | ||
| 19 | 8 | ||
| 20 | #define unused(x) (void)(x) | 9 | #define unused(x) (void)(x) |
| 21 | |||
| 22 | #define PATH_MAX_LEN 128 | ||
| 23 | #define BUFF_SMALL 128 | ||
| 24 | #define BUFF_DEFAULT 256 | ||
| 25 | #define BUFF_LARGE 512 | ||
| 26 | |||
| 27 | #define NIL 0 | 10 | #define NIL 0 |
| 28 | 11 | ||
| 29 | #define DEPRECATED __attribute__((__deprecated__)) | 12 | #define DEPRECATED __attribute__((__deprecated__)) |
| @@ -67,15 +50,15 @@ typedef s8 b8; | |||
| 67 | typedef uintptr_t umm; | 50 | typedef uintptr_t umm; |
| 68 | typedef intptr_t smm; | 51 | typedef intptr_t smm; |
| 69 | 52 | ||
| 70 | #define TRUE (1 == 1) | 53 | #define True (1 == 1) |
| 71 | #define FALSE (1 != 1) | 54 | #define False (1 != 1) |
| 72 | 55 | ||
| 73 | #define RED "\x1b[31m" | 56 | #define Red "\x1b[31m" |
| 74 | #define GREEN "\x1b[32m" | 57 | #define Green "\x1b[32m" |
| 75 | #define RESET "\x1b[0m" | 58 | #define Reset "\x1b[0m" |
| 76 | #define BLUE "\x1b[34m" | 59 | #define Blue "\x1b[34m" |
| 77 | #define YELLOW "\x1b[33m" | 60 | #define Yellow "\x1b[33m" |
| 78 | 61 | ||
| 79 | #define LEN(s) (sizeof(s) - 1) | 62 | #define Len(s) (sizeof(s) - 1) |
| 80 | 63 | ||
| 81 | #endif | 64 | #endif |
