1 /* list.h -- list headers */
10 #define L_NO_NEXT_ELEMENT -2
11 #define L_NO_SUCH_ELEMENT -3
12 #define L_INVALID_ELEMENT -4
13 #define L_EMPTY_LIST -5
14 #define L_ELEMENT_IN_LIST -6
17 typedef struct s_list_element {
18 struct s_list_element *prev;
19 struct s_list_element *next;
24 typedef struct s_list {
26 t_list_element *start;
27 t_list_element *current;
30 /* function prototypes */
31 int list_init(t_list *list,int outfd);
32 int list_shutdown(t_list *list);
33 int list_reset(t_list *list);
34 int list_next(t_list *list);
35 int list_del_element(t_list *list,t_list_element *element);
36 int list_del_current(t_list *list);
37 int list_destroy(t_list *list);
38 int list_search_data(t_list *list,void *data,int first_bytes);
39 int list_add_element(t_list *list,void *data,int data_len);
40 int list_count(t_list *list);