Go to the documentation of this file.
121 new_node->
next = new_node;
123 list->
next = new_node;
142 new_node->
next = new_node;
143 list->
next = new_node;
159 if (list->
next == first) {
265 if (pos->
next == node) {
268 }
while (pos != list->
next);
320 if (node == list->
next) {
355 if (func(node, arg)) {
358 }
while (node != list->
next);
447 }
while (node != list->
next);
static clist_node_t * clist_lpeek(const clist_node_t *list)
Returns first element in list.
static void clist_sort(clist_node_t *list, clist_cmp_func_t cmp)
Sort a list.
static clist_node_t * clist_foreach(clist_node_t *list, int(*func)(clist_node_t *, void *), void *arg)
Traverse clist, call function for each member.
list_node_t clist_node_t
List node structure.
static clist_node_t * clist_lpop(clist_node_t *list)
Removes and returns first element from list.
static clist_node_t * clist_find(const clist_node_t *list, const clist_node_t *node)
Finds and returns node.
static clist_node_t * clist_rpop(clist_node_t *list)
Removes and returns last element from list.
static void clist_lpoprpush(clist_node_t *list)
Advances the circle list.
static clist_node_t * clist_find_before(const clist_node_t *list, const clist_node_t *node)
Finds node and returns its predecessor.
struct list_node * next
pointer to next list entry
clist_node_t * _clist_sort(clist_node_t *list_head, clist_cmp_func_t cmp)
List sorting helper function.
static void clist_rpush(clist_node_t *list, clist_node_t *new_node)
Appends new_node at the end of *list.
static size_t clist_count(clist_node_t *list)
Count the number of items in the given list.
static void clist_lpush(clist_node_t *list, clist_node_t *new_node)
Inserts new_node at the beginning of *list.
int(* clist_cmp_func_t)(clist_node_t *a, clist_node_t *b)
Typedef for comparison function used by clist_sort()
static clist_node_t * clist_remove(clist_node_t *list, clist_node_t *node)
Finds and removes node.
static clist_node_t * clist_rpeek(const clist_node_t *list)
Returns last element in list.