# HG changeset patch # User Mike Becker # Date 1325350346 -3600 # Node ID dbc31727b38ed259aacc6c6e6fbd78665d7cf37f # Parent b1044ee0fd880b95b848c911450b90d25b8f0712 added dlist specification diff -r b1044ee0fd88 -r dbc31727b38e ucx/dlist.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ucx/dlist.c Sat Dec 31 17:52:26 2011 +0100 @@ -0,0 +1,2 @@ +#include "dlist.h" + diff -r b1044ee0fd88 -r dbc31727b38e ucx/dlist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ucx/dlist.h Sat Dec 31 17:52:26 2011 +0100 @@ -0,0 +1,36 @@ +/* + * + */ + +#include + +#ifndef DLIST_H +#define DLIST_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct UcxDlist UcxDlist; +struct UcxDlist { + void *data; + UcxDlist *next; + UcxDlist *prev; +}; + +UcxDlist *ucx_dlist_append(UcxDlist *l, void *data); +UcxDlist *ucx_dlist_prepend(UcxDlist *l, void *data); +UcxDlist *ucx_dlist_concat(UcxDlist *l1, UcxDlist *l2); +UcxDlist *ucx_dlist_last(UcxDlist *l); +UcxDlist *ucx_dlist_get(UcxDlist *l, int index); +size_t *ucx_dlist_size(UcxDlist *l); + +/* dlist specific functions */ +UcxDlist *ucx_dlist_first(UcxDlist *l); + +#ifdef __cplusplus +} +#endif + +#endif /* DLIST_H */ +