summaryrefslogtreecommitdiff
path: root/library/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'library/base.h')
-rw-r--r--library/base.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/library/base.h b/library/base.h
new file mode 100644
index 0000000..74b6303
--- /dev/null
+++ b/library/base.h
@@ -0,0 +1,42 @@
1#ifndef BASE_H
2#define BASE_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7#define OK 0
8#define ERR_IO 1
9#define ERR_PARSE 2
10#define ERR_PERM 3
11#define ERR_INVALID 4
12
13enum {
14 BUFFER_SIZE_SMALL = 128,
15 BUFFER_SIZE_DEFAULT = 256,
16 BUFFER_SIZE_LARGE = 512,
17 PATH_MAX_LEN = 4096
18};
19
20typedef uint64_t u64;
21typedef uint32_t u32;
22typedef uint16_t u16;
23typedef uint8_t u8;
24
25typedef int8_t i8;
26typedef int16_t i16;
27typedef int32_t i32;
28typedef int64_t i64;
29
30typedef float f32;
31typedef double f64;
32
33typedef i32 b32;
34typedef i16 b16;
35typedef u8 b8;
36
37#define TRUE 1
38#define FALSE 0
39
40
41
42#endif