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
b415f90
..
467e751
100644
(file)
--- a/
list/list.h
+++ b/
list/list.h
@@
-4,18
+4,23
@@
#define L_SUCCESS 1
#define L_ERROR -1
#define L_SUCCESS 1
#define L_ERROR -1
-
-#define C_NUMBER (1<<0)
-#define C_DATA (1<<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;
- unsigned char method;
- t_list_element *current;
+ t_list_element *start;
+ t_list_element *current;
} t_list;
} t_list;
+
+/* function prototypes */
+int list_init(t_list *list);
+