72#define LIST_CONCAT2(s1, s2) s1##s2
73#define LIST_CONCAT(s1, s2) LIST_CONCAT2(s1, s2)
90 static void *LIST_CONCAT(name,_list) = NULL; \
91 static list_t name = (list_t)&LIST_CONCAT(name,_list)
111#define LIST_STRUCT(name) \
112 void *LIST_CONCAT(name,_list); \
125#define LIST_STRUCT_INIT(struct_ptr, name) \
127 (struct_ptr)->name = &((struct_ptr)->LIST_CONCAT(name,_list)); \
128 (struct_ptr)->LIST_CONCAT(name,_list) = NULL; \
129 list_init((struct_ptr)->name); \
void list_init(list_t list)
Definition: list.c:66
void * list_chop(list_t list)
Definition: list.c:186
int list_contains(list_t list, void *item)
Definition: list.c:340
void list_remove(list_t list, void *item)
Definition: list.c:240
void * list_tail(list_t list)
Definition: list.c:118
void list_add(list_t list, void *item)
Definition: list.c:143
void * list_pop(list_t list)
Definition: list.c:218
void list_copy(list_t dest, list_t src)
Definition: list.c:101
int list_length(list_t list)
Definition: list.c:275
void ** list_t
Definition: list.h:136
void list_push(list_t list, void *item)
Definition: list.c:165
void * list_head(list_t list)
Definition: list.c:83
void list_insert(list_t list, void *previtem, void *newitem)
Insert an item after a specified item on the list.
Definition: list.c:303
void * list_item_next(void *item)
Get the next item following this item.
Definition: list.c:325