summaryrefslogtreecommitdiff
path: root/src/ll.h
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2024-06-18 18:51:36 -0500
committer@syxhe <https://t.me/syxhe>2024-06-18 18:51:36 -0500
commitc92b4f7cf884cde740d2c5986d6f88be7dcafcc2 (patch)
treea586ac66e2c8de61b6e412e53949e28ccbbc7271 /src/ll.h
parent1e9915d2ce9baa31506a8c04929d6e44a29f106b (diff)
Almost make scanning folders work
Diffstat (limited to 'src/ll.h')
-rw-r--r--src/ll.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ll.h b/src/ll.h
new file mode 100644
index 0000000..9470ea6
--- /dev/null
+++ b/src/ll.h
@@ -0,0 +1,25 @@
1#ifndef __SLOTS__LL_C__12752409230707
2#define __SLOTS__LL_C__12752409230707
3
4#define NODELIST_TYPE__UNDEF -1
5#define NODELIST_TYPE__FILE 0
6#define NODELIST_TYPE__FOLDER 1
7struct nodelist {
8 struct nodelist *next;
9 char *fullpath;
10 int type;
11};
12
13// Initializes a nodelist object. Returns a pointer to START on success, and NULL on error. If START is null, malloc is called to populate it
14struct nodelist* nodelist_init(struct nodelist *start);
15
16// Prepend a new nodelist object to an already existing nodelist
17struct nodelist* nodelist_prepend(struct nodelist *new, struct nodelist *list);
18
19// Append a nodelist object to the end of an already existing nodelist
20struct nodelist* nodelist_append(struct nodelist *list, struct nodelist *append);
21
22// Delete a nodelist allocated by malloc
23int nodelist_delete(struct nodelist *list);
24
25#endif \ No newline at end of file