From f9a7d9cd8a7e603c89d4cc5d98d7f694cc217d85 Mon Sep 17 00:00:00 2001 From: Soikk Date: Sat, 6 Aug 2022 21:46:45 +0200 Subject: Refactored database. Replaced htable with ctable (same thing different name). Introduced AVL tree for hashes. --- include/database.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/database.h') diff --git a/include/database.h b/include/database.h index bcade34..5f2d99d 100644 --- a/include/database.h +++ b/include/database.h @@ -7,8 +7,8 @@ typedef struct database{ char name[32]; ltable *lfiles, *ltags; - htable *hfiles, *htags; - htable *fcount, *tcount; + ctable *cfiles, *ctags; + tree hfiles, htags; mtable *map; } database; @@ -33,6 +33,8 @@ int searchTag(database *db, char *tag, uint64_t n, uint64_t **r, uint64_t *rl); void printDatabase(database *db); +void debugAVLtree(node *n); + void debugDatabase(database *db); #endif -- cgit v1.2.3