ft_lstdel

This commit is contained in:
Tanguy MAZE
2018-04-08 19:20:40 +02:00
parent 4a751e7f3c
commit d46b4304ae
3 changed files with 24 additions and 3 deletions

21
ft_lstdel.c Normal file
View File

@@ -0,0 +1,21 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdel.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/08 17:19:32 by tmaze #+# #+# */
/* Updated: 2018/04/08 19:20:07 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include <stdio.h>
void ft_lstdel(t_list **alst, void (*del)(void*, size_t))
{
if ((*alst)->next != NULL)
ft_lstdel(&((*alst)->next), del);
ft_lstdelone(alst, del);
}