void ft_del_tree(t_btree **current) { if ((*current)->left) ft_del_tree(&(*current)->left); if ((*current)->right) ft_del_tree(&(*current)->right); ft_del_node(current); }
void ft_add_quote_to_list(t_quote **alist, char c) { if (!*alist && (c == ')' || c == '}')) return ; if (!*alist) ft_create_first_node(alist, c); else { if ((c == ')' && (*alist)->c == '(') || (c == '}' && (*alist)->c == '{')) ft_del_node(alist); else if (c == '(' || c == '{') ft_add_new_node(alist, c); } }
void ft_del_all_node(Dlist *list, int data) { struct Node *tmp = list->p_head; while(tmp->p_next != NULL) { printf("debit"); if(tmp->data == data) { printf("coucou"); /*J'en suis la je pense que la chaine n'est plus disponible il va peut faloir refaire la fonction */ ft_del_node(list, data); ft_show_(list); } fflush(stdout); printf("passage"); tmp = tmp->p_next; } }