projects
/
my-code
/
api.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new list stuff (still in work)
[my-code/api.git]
/
list
/
list.h
diff --git
a/list/list.h
b/list/list.h
index
c500c1a
..
467e751
100644
(file)
--- a/
list/list.h
+++ b/
list/list.h
@@
-2,16
+2,25
@@
#include <stdio.h>
#include <stdio.h>
-
-#define SINGLE 'S'
-#define DOUBLE 'D'
+#define L_SUCCESS 1
+#define L_ERROR -1
+#define L_NO_NEXT_ELEMENT -2
+#define L_NO_SUCH_ELEMENT -3
+#define L_INVALID_ELEMENT -4
+#define L_EMPTY_LIST -5
typedef struct s_list_element {
typedef struct s_list_element {
- struct s_list_element *next;
- void *data;
- int number;
+ struct s_list_element *next;
+ void *data;
+ int data_len;
+ int number;
} t_list_element;
typedef struct s_list {
} t_list_element;
typedef struct s_list {
- t_list_element start;
+ t_list_element *start;
+ t_list_element *current;
} t_list;
} t_list;
+
+/* function prototypes */
+int list_init(t_list *list);
+