llist.h |
| #ifndef LLIST_H #define LLIST_H typedef struct llistrec *llist; typedef struct kdpair { int key; void *data; } kdpair; struct llistrec { struct list_node *first; struct list_node *last; int length; }; typedef struct list_node { struct list_node *next; kdpair item; } list_node; extern void llist_delete(llist l, int key); extern llist llist_new(); extern kdpair *llist_search(llist l, int key); extern void llist_iterate(llist l, void f(kdpair k)); extern void llist_insert(llist l, kdpair k); extern void llist_print(llist l); #endif |
James Little |