16 #define MALLOC gmalloc
17 #define REALLOC grealloc
33 data = malloc(
sizeof(
int));
45 if (head->
data) linklist_deallocator(head->
data);
61 data = malloc(
sizeof(
int));
77 if (head->
data) linkedlist_print(head->
data);
99 if (head->
data) linklist_deallocator(head->
data);
100 if (head)
FREE(head);
128 if (head->
data) linkedlist_print(head->
data);
142 if (l->
data) linklist_deallocator(l->
data);
146 if (next) next->
prev = prev;
147 if (prev) prev->
next = next;
148 if (!prev) *head = next;
void DoubleLinkedList_delete(DoubleLinkedList head, void(*linklist_deallocator)(void *))
SingleLinkedList SingleLinkedList_new(void *data)
DoubleLinkedList DoubleLinkedList_get_next(DoubleLinkedList l)
void DoubleLinkedList_delete_element(DoubleLinkedList l, void(*linklist_deallocator)(void *), DoubleLinkedList *head)
DoubleLinkedList DoubleLinkedList_new(void *data)
SingleLinkedList SingleLinkedList_get_next(SingleLinkedList l)
SingleLinkedList SingleLinkedList_prepend(SingleLinkedList l, void *data)
DoubleLinkedList DoubleLinkedList_prepend(DoubleLinkedList l, void *data)
void * SingleLinkedList_get_data(SingleLinkedList l)
void SingleLinkedList_delete(SingleLinkedList head, void(*linklist_deallocator)(void *))
SingleLinkedList SingleLinkedList_prepend_int(SingleLinkedList l, int i)
SingleLinkedList SingleLinkedList_new_int(int i)
void SingleLinkedList_print(SingleLinkedList head, void(*linkedlist_print)(void *))
void DoubleLinkedList_print(DoubleLinkedList head, void(*linkedlist_print)(void *))
void * DoubleLinkedList_get_data(DoubleLinkedList l)