forked from traildb/reel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreel.h
More file actions
56 lines (42 loc) · 1004 Bytes
/
reel.h
File metadata and controls
56 lines (42 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef REEL_H
#define REEL_H
#include <stdint.h>
#include <traildb.h>
typedef enum {
REEL_UINT = 1,
REEL_ITEM = 2,
REEL_UINTTABLE = 3
} reel_var_type;
typedef enum {
REEL_MERGE_ADD = 1,
REEL_MERGE_OVERWRITE = 2
} reel_merge_mode;
typedef enum {
REEL_OUT_OF_MEMORY = -1,
REEL_FORK_FAILED = -2,
REEL_SETPOS_OUT_OF_BOUNDS = -3,
REEL_TABLE_MISMATCH = -200,
REEL_MERGE_NOT_PARENT = -800,
} reel_error;
typedef enum {
REEL_PARSE_OK = 0,
REEL_PARSE_UNKNOWN_VARIABLE = -1,
REEL_PARSE_INVALID_VALUE = -2,
REEL_PARSE_UNKNOWN_FIELD = 1,
REEL_PARSE_EMPTY_TABLE = 2,
REEL_PARSE_VALUE_UNKNOWN = 3,
REEL_PARSE_SOME_VALUES_UNKNOWN = 4
} reel_parse_error;
typedef enum {
REEL_FLAG_IS_CONST = 1
} reel_flags;
typedef struct {
reel_var_type type;
const char *name;
uintptr_t value;
uint64_t table_length;
tdb_field table_field;
reel_var_type table_value_type;
uint64_t flags;
} reel_var;
#endif /* REEL_H */