10 #define LIST_FOREACH(p,list) for(p=(void*)(list)->head.next; (struct node*)p!=&(list)->head; p=(void*)((struct node*) p)->next)
11 void list_init(struct list* l);
12 int list_is_empty(struct list* l);
13 void* list_first(struct list* l);
14 void* list_last(struct list* l);
15 void* list_prev(struct list* l, struct node* n);
16 void* list_next(struct list* l, struct node* n);
17 void list_add_first(struct list* l, struct node* new);
18 void list_add_last(struct list* l, struct node* new);
19 void list_add_after(struct node* orig, struct node* new);
20 void list_add_before(struct node* orig, struct node* new);
21 void list_del_node(struct node* n);
22 void* list_del_first(struct list* l);
23 void* list_del_last(struct list* l);