blob: b37bdb86dfc4f2673cb97bc19d30abaca5aace6e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef STORAGE_H
#define STORAGE_H
#include "db.h"
#define MAXPATH 4096
#define MAXTAGS 4096
typedef struct{
char path[MAXPATH];
char tags[MAXTAGS];
int numTags;
} row;
row *newRow(const char *path);
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);
void removeTag(row *r, char *tag);
#endif
|