Go to the source code of this file.
Data Structures | |
| struct | Linkable |
| element used to link structures each others More... | |
| struct | LIST |
| definition of a list of linked structures More... | |
| struct | LinkablePtr |
Defines | |
| #define | listEmptyListInitializer() {{NULL,NULL},{NULL,NULL}} |
| this is a zero-ed LIST data | |
| #define | listForEach(type, i, list) |
| usefull macro to parse all elements of a list. | |
| #define | listRewind(list) &((list)->head) |
| return the very first LINKABLE object of the list (before the first element linked) | |
| #define | listEnd(list) &((list)->tail) |
| return the very last LINKABLE object of the list (after the last element linked) | |
| #define | listNext(iter) ((!((LINKABLE*)iter)->next->next) ? NULL : (((LINKABLE*)iter)->next)) |
| return the next element on list. | |
| #define | listPrev(iter) ((!((LINKABLE*)iter)->prev->prev) ? NULL : (((LINKABLE*)iter)->prev)) |
| return the previous element on list. | |
| #define | listIsEmpty(list) ( ((list)->head.next) == (&(list)->tail)) |
| return if the list is empty or not | |
| #define | listFirst(list) ( ((list)->head.next) == (&(list)->tail) ? NULL : ((list)->head.next)) |
| return the first linked element of the list (the LINKABLE object right after listRewind), or NULL if the list is empty | |
| #define | listLast(list) ( ((list)->tail.prev) == (&(list)->head) ? NULL : ((list)->tail.prev)) |
Typedefs | |
| typedef Linkable | LINKABLE |
| element used to link structures each others | |
| typedef LinkablePtr | LINKABLEPTR |
Functions | |
| LIST * | createList (void) |
| create an empty list | |
| LIST * | listSplice (LIST *list, LINKABLE *first, LINKABLE *pastLast) |
| splice a list (extract a part of a list) | |
1.4.6