14 typedef void (*free_list_item_f)(
void *);
node_t * list_sort(node_t *lst, int(*compare)(const void *a, const void *b))
sort a list
Definition: llist.c:53
size_t list_length(node_t *lst)
find the length of a linked list
Definition: llist.c:12
A linked list node.
Definition: llist.h:19
void free_list(node_t *n, free_list_item_f free_fn)
free a list, freeing all elements along the way
Definition: llist.c:65
node_t * list_reverse(node_t *lst)
reverse a list
Definition: llist.c:21
node_t * new_node(void *val, node_t *next)
create a new node, and add it to the start of a list
Definition: llist.c:5
void * val
the current element value
Definition: llist.h:21
node_t * next
the next node in the linked list, or NULL if there are no more elements
Definition: llist.h:23