From 8a2981d9137357d4b2c86e8037e4f2ca9cea5578 Mon Sep 17 00:00:00 2001 From: Soikk Date: Wed, 27 Apr 2022 22:23:59 +0200 Subject: Initial commit --- storage.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 storage.h (limited to 'storage.h') 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 -- cgit v1.2.3