Skip to content

cf_list_end

Category: list
GitHub: cute_doubly_list.h


Returns a pointer to one passed the end of the list (to the dummy node).

CF_ListNode* cf_list_end(CF_List* list)
Parameters Description
List The list.

Code Example

Looping over a list with a for loop.

for (CF_Node n = cf_list_begin(list); n != cf_list_end(list); n = n->next) {
    do_stuff(n);
}

Remarks

Since the list is circular with a single dummy node it can be confusing to loop over. To help make this simpler, use cf_list_begin and cf_list_end to perform a loop over the list.

CF_ListNode
CF_List
CF_LIST_NODE
CF_LIST_HOST
cf_list_init_node
cf_list_init
cf_list_push_front
cf_list_push_back
cf_list_remove
cf_list_pop_front
cf_list_pop_back
cf_list_empty
cf_list_begin
cf_list_back
cf_list_front