40 #define icl_list_foreach(list, ptr) \
41 for (ptr = icl_list_first(list); ptr != NULL; ptr = icl_list_next(list, ptr))
icl_list_t * icl_list_search(icl_list_t *head, void *data, int(*compare)(void *, void *))
Finds a data item in the specified linked list.
icl_list_t * icl_list_prepend(icl_list_t *head, void *data)
Insert a node at the beginning of this list.
icl_list_t * icl_list_new()
Create new linked list.
int icl_list_size(icl_list_t *head)
Get the number of items in this linked list.
int icl_list_destroy(icl_list_t *head, void(*free_function)(void *))
Frees the resources associated with this linked list.
icl_list_t * icl_list_append(icl_list_t *head, void *data)
Insert a node at the end of this list.
icl_list_t * icl_list_last(icl_list_t *head)
Get the last item in this linked list.
icl_list_t * icl_list_first(icl_list_t *head)
Get the first item in this linked list.
icl_list_t * icl_list_prev(icl_list_t *head, icl_list_t *pos)
Get the node preceding the specified node.
icl_list_t * icl_list_concat(icl_list_t *head1, icl_list_t *head2)
Concatenate two linked lists.
int icl_list_delete(icl_list_t *head, icl_list_t *pos, void(*free_function)(void *))
Delete the specified node.
icl_list_t * icl_list_insert(icl_list_t *head, icl_list_t *pos, void *data)
Insert a new node after the specified node.
struct icl_list_s * blink
struct icl_list_s * flink
struct icl_list_s icl_list_t
icl_list_t * icl_list_next(icl_list_t *head, icl_list_t *pos)
Get the node following the specified node.