37 int (*match)(
const void *key1,
const void *key2);
38 void (*destroy)(
void *data);
53 clist->destroy = destroy;
65 if (
CSLISTremnext(clist, clist->head, (
void **)&data) == 0 && clist->destroy !=
80 newnode->data = (
void *)data;
85 newnode->next = newnode;
86 clist->head = newnode;
91 newnode->next = node->next;
107 if (clist->size == 0)
111 *data = node->next->data;
113 if (node->next == node)
116 oldnode = node->next;
122 oldnode = node->next;
123 node->next = node->next->next;
125 if (oldnode == clist->head)
126 clist->head = oldnode->next;
150 return clist->head==node ? 1 : 0;
169 if (clist->match == NULL || clist->size == 0)
172 member = clist->head;
179 if (member == clist->head)
183 member = member->next;
184 }
while (member != clist->head);
186 if (member == clist->head && !head_hit)
194 clist->match = match;
203 if (clist->match == NULL)
212 while (prev->next != clist->head)
215 member = clist->head;
222 if (member == clist->head)
227 member = member->next;
228 }
while (member != clist->head);
231 if (member == clist->head && !head_hit)
235 if (clist->size == 1)
237 *data = clist->head->data;
257 callback(curr->data);
259 }
while (curr != clist->head);