Wed, 27 Feb 2013 11:37:27 +0100
removed brain-afk code
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 UcxList *ucx_list_clone(UcxList *l, copy_func fnc, void *data);
22 int ucx_list_equals(const UcxList *l1, const UcxList *l2,
23 cmp_func fnc, void *data);
25 void ucx_list_free(UcxList *l);
26 UcxList *ucx_list_append(UcxList *l, void *data);
27 UcxList *ucx_list_prepend(UcxList *l, void *data);
28 UcxList *ucx_list_concat(UcxList *l1, UcxList *l2);
29 UcxList *ucx_list_last(const UcxList *l);
30 UcxList *ucx_list_get(const UcxList *l, int index);
31 size_t ucx_list_size(const UcxList *l);
32 int ucx_list_contains(UcxList *l, void *elem, cmp_func fnc, void *cmpdata);
34 UcxList *ucx_list_sort(UcxList *l, cmp_func fnc, void *data);
36 /* list specific functions */
37 UcxList *ucx_list_remove(UcxList *l, UcxList *e);
39 #ifdef __cplusplus
40 }
41 #endif
43 #endif /* LIST_H */