Simple C Expat Wrapper (SCEW)
1.1.7
|
Traverse list items. More...
Files | |
file | list.h |
SCEW general list implementation. | |
Functions | |
SCEW_API scew_list * | scew_list_first (scew_list *list) |
Finds the first item of the given list. More... | |
SCEW_API scew_list * | scew_list_last (scew_list *list) |
Finds the last item of the given list. More... | |
SCEW_API scew_list * | scew_list_next (scew_list *list) |
Obtains the next item of the given list item. More... | |
SCEW_API scew_list * | scew_list_previous (scew_list *list) |
Obtains the previous item of the given list item. More... | |
SCEW_API void | scew_list_foreach (scew_list *list, scew_list_hook hook, void *user_data) |
Traverses all list items and executes the given hook for each item found. More... | |
Traverse list items.
Finds the first item of the given list.
This function traverses all the list backwards until it finds an item whose previous item is NULL.
Finds the last item of the given list.
This function traverses all the list forwards until it finds an item whose next item is NULL.
Obtains the next item of the given list item.
Obtains the previous item of the given list item.
SCEW_API void scew_list_foreach | ( | scew_list * | list, |
scew_list_hook | hook, | ||
void * | user_data | ||
) |
Traverses all list items and executes the given hook for each item found.
The hook takes an extra paramter, user_data, which might be NULL.
list | the list to traverse. |
hook | the action to be executed for every traversed item. |
user_data | an optional user data pointer (might be NULL). |