diff options
Diffstat (limited to 'src/include/engine/engine.h')
-rw-r--r-- | src/include/engine/engine.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/include/engine/engine.h b/src/include/engine/engine.h index d233bdd..5d9a3ea 100644 --- a/src/include/engine/engine.h +++ b/src/include/engine/engine.h @@ -4,18 +4,18 @@ #define TABLEN 1024 typedef struct { - char *key; - int flag; - union { - char *str; - double num; - unsigned int boolean : 1; - } value; + char *key; + int flag; + union { + char *str; + double num; + unsigned int boolean : 1; + } value; } tabidx_t; typedef struct { - int len; - tabidx_t tab[TABLEN]; + int len; + tabidx_t tab[TABLEN]; } tablist_t; /* getkeys: gets the provided keys from the provided id, @@ -32,6 +32,11 @@ int setkeys(tablist_t **list, int id, char **pairs, int len); * if keys is NULL it, will delete every key. */ int delkeys(tablist_t *list, int id, char **keys, int len); +// TODO: make readdb and writedb rely on helpers +// to make them both more private + +// TODO: reimplement binary formatting, again + /* readdb: reads the provided db file, * if the filename is NULL, it will return an empty table list, * if the file format is invalid, it will return NULL. */ |