Go to the documentation of this file.
22 #ifndef CLUSTALO_LIST_H
23 #define CLUSTALO_LIST_H
36 void (*destroy)(
void *
data);
47 #define LIST_APPEND(prList, data) ListInsertNext((prList), LIST_TAIL(prList), (data))
49 #define LIST_PREPEND(prList, data) ListInsertNext((prList), CLUSTALO_LIST_HEAD(prList), (data))
53 #define LIST_SIZE(prList) ((prList)->size)
55 #define CLUSTALO_LIST_HEAD(prList) ((prList)->head)
57 #define LIST_TAIL(prList) ((prList)->tail)
59 #define LIST_IS_HEAD(prList, prElement) ((prElement) == (prList)->head ? 1 : 0)
61 #define LIST_IS_TAIL(prElement) ((prElement)->next == NULL ? 1 : 0)
63 #define LIST_DATA(prElement) ((prElement)->data)
65 #define LIST_NEXT(prElement) ((prElement)->next)
78 #define INT_LIST_INIT(prList) ListInit((prList), free)
80 #define INT_LIST_DESTROY(prList) ListDestroy((prList));
84 #define INT_LIST_APPEND(prList, data) IntListInsertNext((prList), LIST_TAIL(prList), (data))
86 #define INT_LIST_PREPEND(prList, data) IntListInsertNext((prList), CLUSTALO_LIST_HEAD(prList), (data))
90 #define INT_LIST_SIZE(prList) LIST_SIZE(prList)
92 #define INT_CLUSTALO_LIST_HEAD(prList) CLUSTALO_LIST_HEAD_INT((prList))
94 #define INT_LIST_TAIL(prList) LIST_TAIL_INT((prList) )
96 #define INT_LIST_IS_HEAD(prList, prElement) LIST_IS_HEAD(prList, prElement)
98 #define INT_LIST_IS_TAIL(prElement) LIST_IS_TAIL((prElement))
100 #define INT_LIST_DATA(prElement) LIST_DATA((prElement))
102 #define INT_LIST_NEXT(prElement) LIST_NEXT((prElement))