added list specification

Sat, 31 Dec 2011 17:54:52 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 31 Dec 2011 17:54:52 +0100
changeset 5
a1740117e2b7
parent 4
dbc31727b38e
child 6
50b5fe7c577f

added list specification

ucx/list.h file | annotate | diff | comparison | revisions
ucx/ucx.h file | annotate | diff | comparison | revisions
     1.1 --- a/ucx/list.h	Sat Dec 31 17:52:26 2011 +0100
     1.2 +++ b/ucx/list.h	Sat Dec 31 17:54:52 2011 +0100
     1.3 @@ -9,7 +9,18 @@
     1.4  extern "C" {
     1.5  #endif
     1.6  
     1.7 +typedef struct UcxList UcxList;
     1.8 +struct UcxList {
     1.9 +    void    *data;
    1.10 +    UcxList *next;
    1.11 +};
    1.12  
    1.13 +UcxList *ucx_dlist_append(UcxList *l, void *data);
    1.14 +UcxList *ucx_dlist_prepend(UcxList *l, void *data);
    1.15 +UcxList *ucx_dlist_concat(UcxList *l1, UcxDlist *l2);
    1.16 +UcxList *ucx_dlist_last(UcxList *l);
    1.17 +UcxList *ucx_dlist_get(UcxList *l, int index);
    1.18 +size_t *ucx_dlist_size(UcxList *l);
    1.19  
    1.20  
    1.21  #ifdef	__cplusplus
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/ucx/ucx.h	Sat Dec 31 17:54:52 2011 +0100
     2.3 @@ -0,0 +1,24 @@
     2.4 +/* 
     2.5 + * File:   ucx.h
     2.6 + * Author: olaf
     2.7 + *
     2.8 + * Created on 31. Dezember 2011, 17:17
     2.9 + */
    2.10 +
    2.11 +#ifndef UCX_H
    2.12 +#define	UCX_H
    2.13 +
    2.14 +#include <stdlib.h>
    2.15 +
    2.16 +#ifdef	__cplusplus
    2.17 +extern "C" {
    2.18 +#endif
    2.19 +
    2.20 +typedef int(*ucx_callback)(void*,void*);
    2.21 +
    2.22 +#ifdef	__cplusplus
    2.23 +}
    2.24 +#endif
    2.25 +
    2.26 +#endif	/* UCX_H */
    2.27 +

mercurial