20 #include "mysys_priv.h"
29 DBUG_ENTER(
"list_add");
30 DBUG_PRINT(
"enter",(
"root: 0x%lx element: 0x%lx", (
long) root, (
long) element));
34 root->prev->next= element;
35 element->prev=root->prev;
48 element->prev->next=element->next;
52 element->next->prev=element->prev;
57 void list_free(
LIST *root, uint free_data)
71 LIST *list_cons(
void *data,
LIST *list)
73 LIST *new_charset=(
LIST*) my_malloc(
sizeof(
LIST),MYF(MY_FAE));
76 new_charset->data=data;
77 return list_add(list,new_charset);
90 last->next=last->prev;
96 uint list_length(
LIST *list)
99 for (count=0 ; list ; list=list->next, count++) ;
104 int list_walk(
LIST *list, list_walk_action action, uchar* argument)
109 if ((error = (*action)(list->data,argument)))
111 list=list_rest(list);