From 39c0dfbc9c4279e519841afae5c7413b1bdf56d8 Mon Sep 17 00:00:00 2001 From: Soikk Date: Thu, 5 May 2022 18:45:45 +0200 Subject: More quality of life changes --- include/storage.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/storage.h (limited to 'include/storage.h') diff --git a/include/storage.h b/include/storage.h new file mode 100644 index 0000000..507c733 --- /dev/null +++ b/include/storage.h @@ -0,0 +1,26 @@ +#ifndef STORAGE_H +#define STORAGE_H + +#include "db.h" + +#define MAXPATH 4096 +#define MAXTAGS 4096 + + +// When intializing the struct, it is recommended +// to also initialize numTags and lenTags +typedef struct{ + char path[MAXPATH]; + char tags[MAXTAGS]; + uint16_t numTags; + uint16_t lenTags; +} row; + + +row *newRow(const char *path); + +void insertTag(row *r, char *tag); + +void removeTag(row *r, char *tag); + +#endif \ No newline at end of file -- cgit v1.2.3