ucx/list.h

Sat, 18 Feb 2012 18:36:30 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 18 Feb 2012 18:36:30 +0100
changeset 27
22644e2572bc
parent 26
59f147baea31
child 35
fdabd1240b69
permissions
-rw-r--r--

removed old foreach + refactored list tests

     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);
    32 /* list specific functions */
    33 UcxList *ucx_list_remove(UcxList *l, UcxList *e);
    35 #ifdef	__cplusplus
    36 }
    37 #endif
    39 #endif	/* LIST_H */

mercurial