From 040060604e2dc08d17d900825072aad88206ae3b Mon Sep 17 00:00:00 2001 From: hackbard Date: Sat, 26 Jun 2004 07:21:02 +0000 Subject: [PATCH] begin list api --- CHANGELOG | 4 ++++ list/list.c | 12 ++++++++++++ list/list.h | 17 +++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 list/list.c create mode 100644 list/list.h diff --git a/CHANGELOG b/CHANGELOG index b243c39..2aacf06 100644 --- 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 index 0000000..681db53 --- /dev/null +++ b/list/list.c @@ -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 index 0000000..c500c1a --- /dev/null +++ b/list/list.h @@ -0,0 +1,17 @@ +/* list.h -- list headers */ + +#include + + +#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; -- 2.39.2