75 #define LIST_INIT(list) { .head.prev = &(list).head, .head.next = &(list).head } int list_is_empty(struct list *list, bool *is_empty)
checks if a list is empty
Definition: list.c:55
int list_clear(struct list *list)
removes all elments from a list
Definition: list.c:110
bool list_contains(struct list *list, struct list_element *element)
checks if an element is contained in a list
Definition: list.c:99
int list_prepend(struct list *list, struct list_element *element)
prepends an element to a list
Definition: list.c:61
int list_init(struct list *list)
initialize a list
Definition: list.c:48
int list_element_insert_after(struct list_element *after, struct list_element *element)
insert an element after another
Definition: list.c:16
list iterator state
Definition: list.h:120
int list_iterator_previous(struct list_iterator *it, struct list_element **element)
gets the previous element from an iterator
Definition: list.c:91
int list_element_init(struct list_element *element)
initialize a list_element
Definition: list.c:3
struct list_element * next
pointer to next element
Definition: list.h:19
int list_element_in_list(struct list_element *element, bool *in_list)
checks if an element is in a list
Definition: list.c:10
int list_iterator_init(struct list_iterator *it, struct list *list)
initialize a list iterator
Definition: list.c:76
int list_iterator_next(struct list_iterator *it, struct list_element **element)
gets the next element from an iterator
Definition: list.c:83
int list_element_insert_before(struct list_element *before, struct list_element *element)
insert an element before another
Definition: list.c:27
int list_element_remove(struct list_element *element)
removes element from a list
Definition: list.c:38
struct list_element * current
the current element
Definition: list.h:124
list element state
Definition: list.h:15
struct list_element head
pseudo head list_element
Definition: list.h:65
list state
Definition: list.h:63
struct list * list
the list which this iterator points to
Definition: list.h:122
int list_append(struct list *list, struct list_element *element)
appends an element to a list
Definition: list.c:66
int list_remove(struct list *list, struct list_element *element)
removes an element from a list
Definition: list.c:71
struct list_element * prev
pointer to last element
Definition: list.h:17