int list_init(t_list *list) {
- if(list->type==SINGLE) {
- list->start
+ list->
+ list->current=&(list->start);
+
+ return L_SUCCESS;
+}
+
+int list_add_element(t_list *list,int nr,void *data,int len) {
+
+ if(list->method&C_NUMBER) {
+ while(list->current->next!=NULL) {
+ if(list->current->number==nr) return L_EXISTS;
+ else list->current=list->current->next;
+ }
+ if(list->current->number==nr) return L_EXISTS;
+
+ /* new element */
+ if((list->current->next=(t_list *)malloc(sizeof(t_list)))==NULL) {
+ fprintf(stderr,"[list]