blob: 9470ea62a2c858d23629e540ce5dde837071203b (
plain)
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
|
#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
|