| 16 struct UcxList { |
16 struct UcxList { |
| 17 void *data; |
17 void *data; |
| 18 UcxList *next; |
18 UcxList *next; |
| 19 }; |
19 }; |
| 20 |
20 |
| 21 UcxList *restrict ucx_list_clone(UcxList *restrict l, |
21 UcxList *ucx_list_clone(UcxList *l, copy_func fnc, void *data); |
| 22 copy_func fnc, void *data); |
|
| 23 int ucx_list_equals(const UcxList *l1, const UcxList *l2, |
22 int ucx_list_equals(const UcxList *l1, const UcxList *l2, |
| 24 cmp_func fnc, void *data); |
23 cmp_func fnc, void *data); |
| 25 |
24 |
| 26 void ucx_list_free(UcxList *l); |
25 void ucx_list_free(UcxList *l); |
| 27 UcxList *ucx_list_append(UcxList *l, void *data); |
26 UcxList *ucx_list_append(UcxList *l, void *data); |
| 28 UcxList *ucx_list_prepend(UcxList *l, void *data); |
27 UcxList *ucx_list_prepend(UcxList *l, void *data); |
| 29 UcxList *ucx_list_concat(UcxList *restrict l1, UcxList *restrict l2); |
28 UcxList *ucx_list_concat(UcxList *restrict l1, UcxList *restrict l2); |
| 30 UcxList *ucx_list_last(const UcxList *l); |
29 UcxList *ucx_list_last(const UcxList *l); |
| 31 UcxList *ucx_list_get(const UcxList *l, int index); |
30 UcxList *ucx_list_get(const UcxList *l, int index); |
| 32 size_t ucx_list_size(const UcxList *l); |
31 size_t ucx_list_size(const UcxList *l); |
| |
32 int ucx_list_contains(UcxList *l, void *elem, cmp_func fnc, void *cmpdata); |
| 33 |
33 |
| 34 UcxList *ucx_list_sort(UcxList *l, cmp_func fnc, void *data); |
34 UcxList *ucx_list_sort(UcxList *l, cmp_func fnc, void *data); |
| 35 |
35 |
| 36 /* list specific functions */ |
36 /* list specific functions */ |
| 37 UcxList *ucx_list_remove(UcxList *l, UcxList *e); |
37 UcxList *ucx_list_remove(UcxList *l, UcxList *e); |