olaf@2: /* olaf@2: * olaf@2: */ olaf@2: olaf@2: #ifndef LIST_H olaf@2: #define LIST_H olaf@2: olaf@6: #include "ucx.h" olaf@6: #include olaf@6: olaf@2: #ifdef __cplusplus olaf@2: extern "C" { olaf@2: #endif olaf@2: olaf@5: typedef struct UcxList UcxList; olaf@5: struct UcxList { olaf@5: void *data; olaf@5: UcxList *next; olaf@5: }; olaf@2: olaf@12: void ucx_list_free(UcxList *l); olaf@6: UcxList *ucx_list_append(UcxList *l, void *data); olaf@6: UcxList *ucx_list_prepend(UcxList *l, void *data); olaf@9: UcxList *ucx_list_concat(UcxList *l1, UcxList *l2); olaf@6: UcxList *ucx_list_last(UcxList *l); olaf@6: UcxList *ucx_list_get(UcxList *l, int index); olaf@6: size_t ucx_list_size(UcxList *l); olaf@6: void ucx_list_foreach(UcxList *l, ucx_callback fnc, void *data); olaf@2: olaf@2: olaf@2: #ifdef __cplusplus olaf@2: } olaf@2: #endif olaf@2: olaf@2: #endif /* LIST_H */ olaf@2: