2 struct list_node *next;
7 struct list_node *first, *last;
10 /* allocates and initialises list structure; returns NULL if malloc fails */
11 struct list *list_create();
13 /* frees all memory associated with the list */
14 void list_destroy(struct list *list);
16 /* appends entry to list; returns 1 if ok, 0 if malloc fails */
17 int list_push(struct list *list, void *data);
19 /* removes first entry from list and returns data */
20 void *list_shift(struct list *list);
22 /* removes first entry with matching data pointer */
23 void list_removedata(struct list *list, void *data);
25 /* returns first node */
26 struct list_node *list_first(struct list *list);
28 /* returns the next node after the argument */
29 struct list_node *list_next(struct list_node *node);