+ dprintf(outfd,"[list] list initialization ...\n");
+
+ list->outfd=outfd;
+ list->start=NULL;
+ list_reset(list);
+
+ return L_SUCCESS;
+}
+
+int list_shutdown(t_list *list) {
+
+ if(list->start!=NULL) list_destroy(list);
+
+ dprintf(list->outfd,"[list] shutdown\n");
+
+ return L_SUCCESS;
+}
+
+int list_next(t_list *list) {
+
+ if(list->current->next==NULL) return L_NO_NEXT_ELEMENT;
+
+ list->current=list->current->next;
+
+ return L_SUCCESS;
+}
+
+int list_reset(t_list *list) {
+
+ list->current=list->start;
+
+ return L_SUCCESS;
+}
+
+int list_del_element(t_list *list,t_list_element *element) {
+
+ if(element==NULL) {
+ dprintf(list->outfd,"[list] empty element\n");
+ return L_INVALID_ELEMENT;
+ }
+
+ if(element->next!=NULL) element->next->prev=element->prev;
+ if(element->prev!=NULL) element->prev->next=element->next;
+ if(element==list->start) list->start=element->next;
+ list_reset(list);
+ if(element->data!=NULL) free(element->data);
+ free(element);
+ dprintf(list->outfd,"[list] element deleted\n");
+
+ return L_SUCCESS;
+}
+
+int list_del_current(t_list *list) {
+
+ return(list_del_element(list,list->current));
+}
+
+int list_destroy(t_list *list) {
+
+ if(list->start==NULL) {
+ dprintf(list->outfd,"[list] empty list\n");
+ return L_EMPTY_LIST;
+ }
+
+ list_reset(list);
+
+ while(list->current!=NULL) list_del_element(list,list->current);