82 #define LIST_CONCAT(s1, s2) s1##s2
84 #define LIST_STRUCT(name) \
85 void *LIST_CONCAT(name, _list); \
88 #define LIST_STRUCT_INIT(struct_ptr, name) { \
89 (struct_ptr)->name = &((struct_ptr)->LIST_CONCAT(name,_list)); \
90 (struct_ptr)->LIST_CONCAT(name,_list) = NULL; \
118 l = (
struct list*)*the_list;
127 if(previtem == NULL) {
130 ((
struct list *)newitem)->next = ((
struct list *)previtem)->next;
131 ((
struct list *)previtem)->next = (
struct list*)newitem;
138 return item == NULL? NULL: ((
struct list *)item)->next;
#define LL_PREPEND(head, add)
static void * list_item_next(void *item)
static void list_add(list_t the_list, void *item)
static void list_remove(list_t the_list, void *item)
#define LL_APPEND(head, add)
static void * list_pop(list_t the_list)
static void * list_head(list_t the_list)
#define LL_DELETE(head, del)
static void list_push(list_t the_list, void *item)
static void list_insert(list_t the_list, void *previtem, void *newitem)