Started from buttom go to the sky

This commit is contained in:
Raphaël 2024-04-28 19:59:01 +02:00
parent 96215449bd
commit f811e55dea
4781 changed files with 10121 additions and 1743 deletions

View file

@ -0,0 +1,30 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* list_free_all.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/09 21:35:20 by maiboyer #+# #+# */
/* Updated: 2023/12/09 15:03:34 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/list/list_free_all.h"
#include <stdlib.h>
void list_free_all(t_list **lst, void (*del)(void *))
{
t_list *tmp;
if (lst == NULL || del == NULL)
return ;
while (*lst)
{
del((*lst)->content);
tmp = *lst;
*lst = (*lst)->next;
free(tmp);
}
*lst = NULL;
}