Go to the source code of this file.
Data Structures | |
struct | list_node |
Functions | |
void | delete_list (struct list_node *list, void(*delete_data)(void *)) |
void | add_list_node (struct list_node **list, void *data) |
void * | remove_list_node (struct list_node *node, void(*delete_data)(void *)) |
list_node * | find_list_node (struct list_node *list, void *data, int(*cmp_func)(void *, void *)) |
unsigned int | count_list_nodes (struct list_node *list) |
|
adds a new node to the list, containing the data pointer specified at the second argument |
|
counts and returns the number of elements in the list. |
|
delete the whole list, calling a custom deallocation function on the generic data pointers, if one is provided. |
|
finds the specified data item on the list, the provided comparison function is used to compare each element of the list with the second argument. Returns the node if it finds a match, NULL otherwise |
|
removes the specified node from the list, optionally calling a custom deallocation function provided at the second argument, on the data of that node. Returns the data pointer if no deallocation function is specified, NULL otherwise |