-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGlobals.c
43 lines (32 loc) · 774 Bytes
/
Globals.c
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "Globals.h"
#include <stdlib.h>
char* dirToParse;
Size parseDirLen;
i32 orderTodoBy;
i32 orderFileBy;
Size maxLineMem;
Config config;
Size skipDirCount;
LenStr skipDirs[CONF_STORAGE_COUNT];
Size whiteExtCount;
LenStr whiteExt[CONF_STORAGE_COUNT];
Size blackExtCount;
LenStr blackExt[CONF_STORAGE_COUNT];
Size todoFileCount;
char* filePaths[MAX_TODOS];
Size todoCount;
TodoEntry foundTodos[MAX_TODOS];
void cleanupGlobals() {
for(Size i = 0; i < todoFileCount; i++) {
free(filePaths[i]);
}
for(Size i = 0; i < todoCount; i++) {
free(foundTodos[i].text);
}
for(Size i = 0; i < blackExtCount; i++) {
free(blackExt[i].str);
}
for(Size i = 0; i < whiteExtCount; i++) {
free(whiteExt[i].str);
}
}