From bf76b8c582ed9c541438ebe90fc6415fb82f2ed3 Mon Sep 17 00:00:00 2001 From: bpc2003 Date: Tue, 20 May 2025 14:40:47 -0400 Subject: Add Formatting --- src/include/engine/engine.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/include/engine/engine.h') 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. */ -- cgit v1.2.3