diff options
Diffstat (limited to 'src/ll.h')
| -rw-r--r-- | src/ll.h | 25 |
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 | ||
| 7 | struct 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 | ||
| 14 | struct nodelist* nodelist_init(struct nodelist *start); | ||
| 15 | |||
| 16 | // Prepend a new nodelist object to an already existing nodelist | ||
| 17 | struct nodelist* nodelist_prepend(struct nodelist *new, struct nodelist *list); | ||
| 18 | |||
| 19 | // Append a nodelist object to the end of an already existing nodelist | ||
| 20 | struct nodelist* nodelist_append(struct nodelist *list, struct nodelist *append); | ||
| 21 | |||
| 22 | // Delete a nodelist allocated by malloc | ||
| 23 | int nodelist_delete(struct nodelist *list); | ||
| 24 | |||
| 25 | #endif \ No newline at end of file | ||
