ucx/list.h

Sat, 31 Dec 2011 19:10:29 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 31 Dec 2011 19:10:29 +0100
changeset 12
fe50a85e69e7
parent 9
013c5c4b7e44
child 18
69636f81db31
permissions
-rw-r--r--

Added list tests2

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@6 8 #include "ucx.h"
olaf@6 9 #include <stddef.h>
olaf@6 10
olaf@2 11 #ifdef __cplusplus
olaf@2 12 extern "C" {
olaf@2 13 #endif
olaf@2 14
olaf@5 15 typedef struct UcxList UcxList;
olaf@5 16 struct UcxList {
olaf@5 17 void *data;
olaf@5 18 UcxList *next;
olaf@5 19 };
olaf@2 20
olaf@12 21 void ucx_list_free(UcxList *l);
olaf@6 22 UcxList *ucx_list_append(UcxList *l, void *data);
olaf@6 23 UcxList *ucx_list_prepend(UcxList *l, void *data);
olaf@9 24 UcxList *ucx_list_concat(UcxList *l1, UcxList *l2);
olaf@6 25 UcxList *ucx_list_last(UcxList *l);
olaf@6 26 UcxList *ucx_list_get(UcxList *l, int index);
olaf@6 27 size_t ucx_list_size(UcxList *l);
olaf@6 28 void ucx_list_foreach(UcxList *l, ucx_callback fnc, void *data);
olaf@2 29
olaf@2 30
olaf@2 31 #ifdef __cplusplus
olaf@2 32 }
olaf@2 33 #endif
olaf@2 34
olaf@2 35 #endif /* LIST_H */
olaf@2 36

mercurial