Sat, 31 Dec 2011 17:54:52 +0100
added list specification
olaf@2 | 1 | /* |
olaf@2 | 2 | * |
olaf@2 | 3 | */ |
olaf@2 | 4 | |
olaf@2 | 5 | #ifndef LIST_H |
olaf@2 | 6 | #define LIST_H |
olaf@2 | 7 | |
olaf@2 | 8 | #ifdef __cplusplus |
olaf@2 | 9 | extern "C" { |
olaf@2 | 10 | #endif |
olaf@2 | 11 | |
olaf@5 | 12 | typedef struct UcxList UcxList; |
olaf@5 | 13 | struct UcxList { |
olaf@5 | 14 | void *data; |
olaf@5 | 15 | UcxList *next; |
olaf@5 | 16 | }; |
olaf@2 | 17 | |
olaf@5 | 18 | UcxList *ucx_dlist_append(UcxList *l, void *data); |
olaf@5 | 19 | UcxList *ucx_dlist_prepend(UcxList *l, void *data); |
olaf@5 | 20 | UcxList *ucx_dlist_concat(UcxList *l1, UcxDlist *l2); |
olaf@5 | 21 | UcxList *ucx_dlist_last(UcxList *l); |
olaf@5 | 22 | UcxList *ucx_dlist_get(UcxList *l, int index); |
olaf@5 | 23 | size_t *ucx_dlist_size(UcxList *l); |
olaf@2 | 24 | |
olaf@2 | 25 | |
olaf@2 | 26 | #ifdef __cplusplus |
olaf@2 | 27 | } |
olaf@2 | 28 | #endif |
olaf@2 | 29 | |
olaf@2 | 30 | #endif /* LIST_H */ |
olaf@2 | 31 |