Sun, 15 Jan 2012 14:20:25 +0100
added ucx_list_remove
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(UcxList *l1, UcxList *l2, cmp_func fnc, void *data);
24 void ucx_list_free(UcxList *l);
25 UcxList *ucx_list_append(UcxList *l, void *data);
26 UcxList *ucx_list_prepend(UcxList *l, void *data);
27 UcxList *ucx_list_concat(UcxList *l1, UcxList *l2);
28 UcxList *ucx_list_last(UcxList *l);
29 UcxList *ucx_list_get(UcxList *l, int index);
30 size_t ucx_list_size(UcxList *l);
31 void ucx_list_foreach(UcxList *l, ucx_callback fnc, void *data);
33 /* list specific functions */
34 UcxList *ucx_list_remove(UcxList *l, UcxList *e);
36 #ifdef __cplusplus
37 }
38 #endif
40 #endif /* LIST_H */