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
--- a/ucx/list.h	Sat Dec 31 17:52:26 2011 +0100
+++ b/ucx/list.h	Sat Dec 31 17:54:52 2011 +0100
@@ -9,7 +9,18 @@
 extern "C" {
 #endif
 
+typedef struct UcxList UcxList;
+struct UcxList {
+    void    *data;
+    UcxList *next;
+};
 
+UcxList *ucx_dlist_append(UcxList *l, void *data);
+UcxList *ucx_dlist_prepend(UcxList *l, void *data);
+UcxList *ucx_dlist_concat(UcxList *l1, UcxDlist *l2);
+UcxList *ucx_dlist_last(UcxList *l);
+UcxList *ucx_dlist_get(UcxList *l, int index);
+size_t *ucx_dlist_size(UcxList *l);
 
 
 #ifdef	__cplusplus
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ucx/ucx.h	Sat Dec 31 17:54:52 2011 +0100
@@ -0,0 +1,24 @@
+/* 
+ * File:   ucx.h
+ * Author: olaf
+ *
+ * Created on 31. Dezember 2011, 17:17
+ */
+
+#ifndef UCX_H
+#define	UCX_H
+
+#include <stdlib.h>
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+typedef int(*ucx_callback)(void*,void*);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* UCX_H */
+

mercurial