diff options
| author | Soikk | 2022-04-27 22:23:59 +0200 |
|---|---|---|
| committer | Soikk | 2022-04-27 22:23:59 +0200 |
| commit | 8a2981d9137357d4b2c86e8037e4f2ca9cea5578 (patch) | |
| tree | 8410987af957afc9ced113c521c07cba92b3d302 /storage.h | |
| download | soikk-DB-8a2981d9137357d4b2c86e8037e4f2ca9cea5578.tar.xz soikk-DB-8a2981d9137357d4b2c86e8037e4f2ca9cea5578.tar.zst | |
Initial commit
Diffstat (limited to 'storage.h')
| -rw-r--r-- | storage.h | 24 |
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 |
