X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fapi.git;a=blobdiff_plain;f=list%2Flist.h;fp=list%2Flist.h;h=467e751c021d6b1264ca504e02eb3a3672f33b20;hp=b415f90ddc284e23fd624080920b994619a922ec;hb=40946b581d43a81ef427115bc284a4240c389e8f;hpb=a21023e93104fb6e96b57afa23ab4628c8e5e055 diff --git a/list/list.h b/list/list.h index b415f90..467e751 100644 --- a/list/list.h +++ b/list/list.h @@ -4,18 +4,23 @@ #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 { - 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 start; - unsigned char method; - t_list_element *current; + t_list_element *start; + t_list_element *current; } t_list; + +/* function prototypes */ +int list_init(t_list *list); +