Nilorea Library
C utilities for networking, threading, graphics
|
Pointer list functions definitions. More...
#include "nilorea/n_common.h"
#include <pthread.h>
#include "nilorea/n_log.h"
#include "nilorea/n_list.h"
Go to the source code of this file.
Functions | |
int | list_destroy (LIST **list) |
Empty and Free a list container. More... | |
int | list_empty (LIST *list) |
Empty a LIST list of pointers. More... | |
int | list_empty_with_f (LIST *list, void(*free_fnct)(void *ptr)) |
Empty a LIST list of pointers. More... | |
LIST_NODE * | list_node_pop (LIST *list) |
Get a LIST_NODE pointer from the end of the list. More... | |
int | list_node_push (LIST *list, LIST_NODE *node) |
Add a filled node to the end of the list. More... | |
LIST_NODE * | list_node_shift (LIST *list) |
Get a LIST_NODE pointer from the start of the list. More... | |
int | list_node_unshift (LIST *list, LIST_NODE *node) |
Add a pointer at the start of the list. More... | |
void * | list_pop_f (LIST *list) |
Get a pointer from the end of the list. More... | |
int | list_push (LIST *list, void *ptr, void(*destructor)(void *ptr)) |
Add a pointer to the end of the list. More... | |
int | list_push_sorted (LIST *list, void *ptr, int(*comparator)(const void *a, const void *b), void(*destructor)(void *ptr)) |
Add a pointer sorted in the list , starting by the end of the list. More... | |
LIST_NODE * | list_search (LIST *list, void *ptr) |
search ptr in list More... | |
LIST_NODE * | list_search_with_f (LIST *list, int(*checkfunk)(void *ptr)) |
search ptr in list More... | |
void * | list_shift_f (LIST *list) |
Get a pointer from the start of the list. More... | |
int | list_unshift (LIST *list, void *ptr, void(*destructor)(void *ptr)) |
Add a pointer at the start of the list. More... | |
int | list_unshift_sorted (LIST *list, void *ptr, int(*comparator)(const void *a, const void *b), void(*destructor)(void *ptr)) |
Add a pointer sorted in the list , starting by the start of the list. More... | |
LIST * | new_generic_list (int max_items) |
Initialiaze a generic list container to max_items pointers. More... | |
LIST_NODE * | new_list_node (void *ptr, void(*destructor)(void *ptr)) |
Allocate a new node to link in a list. More... | |
void * | remove_list_node_f (LIST *list, LIST_NODE *node) |
Internal function called each time we need to get a node out of a list. More... | |