]> hackdaworld.org Git - my-code/api.git/commitdiff
begin list api
authorhackbard <hackbard>
Sat, 26 Jun 2004 07:21:02 +0000 (07:21 +0000)
committerhackbard <hackbard>
Sat, 26 Jun 2004 07:21:02 +0000 (07:21 +0000)
CHANGELOG
list/list.c [new file with mode: 0644]
list/list.h [new file with mode: 0644]

index b243c39cd610923b849ef22b28bb79bc4285b356..2aacf064d134d2e126854ea57c9091c9a488d7f0 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+*) 2004-06-26
+
+ - begin list api
+
 *) 2004-06-24
 
  - initial checkin: audio, display, event, input, network
diff --git a/list/list.c b/list/list.c
new file mode 100644 (file)
index 0000000..681db53
--- /dev/null
@@ -0,0 +1,12 @@
+/* list.c -- list management szuff
+ *
+ * author: hackbard@hackdaworld.dyndns.org
+ *
+ */
+
+#include "list.h"
+
+int list_init(t_list *list) {
+
+  if(list->type==SINGLE) {
+    list->start
diff --git a/list/list.h b/list/list.h
new file mode 100644 (file)
index 0000000..c500c1a
--- /dev/null
@@ -0,0 +1,17 @@
+/* list.h -- list headers */
+
+#include <stdio.h>
+
+
+#define SINGLE 'S'
+#define DOUBLE 'D'
+
+typedef struct s_list_element {
+       struct s_list_element *next;
+       void *data;
+       int number;
+} t_list_element;
+
+typedef struct s_list {
+       t_list_element start;
+} t_list;