37 static int true_func (
void *key,
void *value);
84 error = (*assign_func) (new_node, add_key, add_val);
113 int (*val_cmp_func) (
void *,
void *))
120 if (key_cmp_func ==
NULL)
122 if (val_cmp_func ==
NULL)
128 if ((*key_cmp_func) (tmp->
key, key) && (*val_cmp_func) (tmp->
value, val))
169 *cur_head = head = tmp;
198 int (*val_cmp_func) (
void *,
void *),
void (*node_dealloc) (
T_LIST *))
204 del =
link_list_find (head, key, value, key_cmp_func, val_cmp_func);
255 result = (*traverse_func) (tmp, result);
288 if (del_node->
next == head)
290 if (del_node == head)
292 free_node = del_node;
297 free_node = del_node->
next;
304 free_node = del_node->
next;
int link_list_node_delete(T_LIST **cur_head, void *key, int(*cmp_func)(void *, void *), void(*node_dealloc)(T_LIST *))
int link_list_add(T_LIST **cur_head, void *add_key, void *add_val, int(*assign_func)(T_LIST *, void *, void *))
static T_LIST * delete_node(T_LIST *head, T_LIST *del_node, void(*node_dealloc)(T_LIST *))
T_LIST * link_list_find(T_LIST *head, void *key, void *val, int(*key_cmp_func)(void *, void *), int(*val_cmp_func)(void *, void *))
static int true_func(void *key, void *value)
static void swap_node(T_LIST *node1, T_LIST *node2)
int link_list_delete(T_LIST **cur_head, void(*node_dealloc)(T_LIST *))
int link_list_node_delete2(T_LIST **cur_head, void *key, void *value, int(*key_cmp_func)(void *, void *), int(*val_cmp_func)(void *, void *), void(*node_dealloc)(T_LIST *))
static void error(const char *msg)
int link_list_default_compare_func(void *key, void *value)
static void free_node(T_NODE_INFO *node)
void * link_list_traverse(T_LIST *head, void *(*traverse_func)(T_LIST *, void *))
int link_list_default_assign_func(T_LIST *node, void *key, void *value)