Go to the source code of this file.
Data Structures | |
| struct | list_s |
| the list More... | |
Typedefs | |
| typedef list_s | list_t |
| the list | |
Functions | |
| list_t * | list_add (list_t *l, void *data) |
| add an element, O(n) | |
| list_t * | list_add_fast (list_t *l, list_t **tl, void *data) |
| add an element, O(1) [the user must provide a temp pointer to the tail] | |
| list_t * | list_remove (list_t *l, list_t *elem) |
| remove the element (freed by the caller) | |
| list_t * | list_sort (list_t *l, int(*compare)(void *data1, void *data2)) |
| sorts the list | |
| list_t * | list_find (list_t *l, void *x, int(*is_equal)(void *x, void *data2)) |
| returns the handler of the node in wich x is | |
| list_t * | list_duplicate (list_t *l, void *(*copyer)(void *data1)) |
| makes a copy | |
| list_t * | list_free (list_t *l, void(*destructor)(void *data1)) |
| deletes all | |
| void | list_visit (list_t *l, void(*action)(void *)) |
| for each element | |
| int | list_getpos (list_t *l, void *x, int(*compare)(void *data1, void *data2)) |
| return where x is | |
| int | list_len (list_t *l) |
| lenght | |
| list_t * | list_concat (list_t *l1, list_t *l2) |
| concatenates l1 and l2 | |
| list_t * | list_pop (list_t *l) |
| uses the list as a stack, removing the head | |
| list_t * | list_push (list_t *l, void *data) |
| uses the list as a stack, adding a head | |
| void * | list_head (list_t *l) |
| uses the list as a stack, getting the head [may call a pop after that] | |
>Definition in file list.h.
|
|
the list
|
|
||||||||||||
|
add an element, O(n)
|
|
||||||||||||||||
|
add an element, O(1) [the user must provide a temp pointer to the tail]
|
|
||||||||||||
|
concatenates l1 and l2
|
|
||||||||||||
|
makes a copy
|
|
||||||||||||||||
|
returns the handler of the node in wich x is
|
|
||||||||||||
|
deletes all
|
|
||||||||||||||||
|
return where x is
|
|
|
uses the list as a stack, getting the head [may call a pop after that]
|
|
|
lenght
|
|
|
uses the list as a stack, removing the head
|
|
||||||||||||
|
uses the list as a stack, adding a head
|
|
||||||||||||
|
remove the element (freed by the caller)
|
|
||||||||||||
|
sorts the list
|
|
||||||||||||
|
for each element
|
1.3.6-20040222