Sat, 31 Dec 2011 19:10:29 +0100
Added list tests2
1 /*
2 *
3 */
5 #ifndef LIST_H
6 #define LIST_H
8 #include "ucx.h"
9 #include <stddef.h>
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
15 typedef struct UcxList UcxList;
16 struct UcxList {
17 void *data;
18 UcxList *next;
19 };
21 void ucx_list_free(UcxList *l);
22 UcxList *ucx_list_append(UcxList *l, void *data);
23 UcxList *ucx_list_prepend(UcxList *l, void *data);
24 UcxList *ucx_list_concat(UcxList *l1, UcxList *l2);
25 UcxList *ucx_list_last(UcxList *l);
26 UcxList *ucx_list_get(UcxList *l, int index);
27 size_t ucx_list_size(UcxList *l);
28 void ucx_list_foreach(UcxList *l, ucx_callback fnc, void *data);
31 #ifdef __cplusplus
32 }
33 #endif
35 #endif /* LIST_H */