Linked list manipulation routines.
Macros | |
#define | LIST(name) |
Declare a linked list. More... | |
#define | LIST_CONCAT(s1, s2) LIST_CONCAT2(s1, s2) |
#define | LIST_CONCAT2(s1, s2) s1##s2 |
#define | LIST_STRUCT(name) |
Declare a linked list inside a structure declaraction. More... | |
#define | LIST_STRUCT_INIT(struct_ptr, name) |
Initialize a linked list that is part of a structure. More... | |
Typedefs | |
typedef void ** | list_t |
The linked list type. More... | |
Functions | |
void | list_add (list_t list, void *item) |
Add an item at the end of a list. More... | |
void * | list_chop (list_t list) |
Remove the last object on the list. More... | |
void | list_copy (list_t dest, list_t src) |
Duplicate a list. More... | |
void * | list_head (list_t list) |
Get a pointer to the first element of a list. More... | |
void | list_init (list_t list) |
Initialize a list. More... | |
void | list_insert (list_t list, void *previtem, void *newitem) |
Insert an item after a specified item on the list. More... | |
void * | list_item_next (void *item) |
Get the next item following this item. More... | |
int | list_length (list_t list) |
Get the length of a list. More... | |
void * | list_pop (list_t list) |
Remove the first object on a list. More... | |
void | list_push (list_t list, void *item) |
Add an item to the start of the list. More... | |
void | list_remove (list_t list, void *item) |
Remove a specific element from a list. More... | |
void * | list_tail (list_t list) |
Get the tail of a list. More... | |