aboutsummaryrefslogtreecommitdiff
path: root/storage.h
diff options
context:
space:
mode:
authorSoikk2022-04-27 22:23:59 +0200
committerSoikk2022-04-27 22:23:59 +0200
commit8a2981d9137357d4b2c86e8037e4f2ca9cea5578 (patch)
tree8410987af957afc9ced113c521c07cba92b3d302 /storage.h
downloadsoikk-DB-8a2981d9137357d4b2c86e8037e4f2ca9cea5578.tar.xz
soikk-DB-8a2981d9137357d4b2c86e8037e4f2ca9cea5578.tar.zst
Initial commit
Diffstat (limited to 'storage.h')
-rw-r--r--storage.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/storage.h b/storage.h
new file mode 100644
index 0000000..20cb329
--- /dev/null
+++ b/storage.h
@@ -0,0 +1,24 @@
+#ifndef STORAGE_H
+#define STORAGE_H
+
+#include "db.h"
+
+#define MAXPATH 4096
+#define MAXTAGS 4096
+
+
+typedef struct{
+ char path[MAXPATH];
+ char tags[MAXTAGS];
+} row;
+
+
+void split(const char *src, char sep, char ***arr, int *len);
+
+void swapWords(char ***arr, int a, int b);
+
+char *normalizeTag(char *tag);
+
+void insertTag(row *r, char *tag);
+
+#endif \ No newline at end of file