From c92b4f7cf884cde740d2c5986d6f88be7dcafcc2 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Tue, 18 Jun 2024 18:51:36 -0500 Subject: Almost make scanning folders work --- src/ll.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/ll.h (limited to 'src/ll.h') 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 @@ +#ifndef __SLOTS__LL_C__12752409230707 +#define __SLOTS__LL_C__12752409230707 + +#define NODELIST_TYPE__UNDEF -1 +#define NODELIST_TYPE__FILE 0 +#define NODELIST_TYPE__FOLDER 1 +struct nodelist { + struct nodelist *next; + char *fullpath; + int type; +}; + +// 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 +struct nodelist* nodelist_init(struct nodelist *start); + +// Prepend a new nodelist object to an already existing nodelist +struct nodelist* nodelist_prepend(struct nodelist *new, struct nodelist *list); + +// Append a nodelist object to the end of an already existing nodelist +struct nodelist* nodelist_append(struct nodelist *list, struct nodelist *append); + +// Delete a nodelist allocated by malloc +int nodelist_delete(struct nodelist *list); + +#endif \ No newline at end of file -- cgit v1.2.3