26 lines
1.0 KiB
C
26 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_lstdel.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: gbrochar <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2015/11/30 21:34:50 by gbrochar #+# #+# */
|
||
|
/* Updated: 2015/12/05 15:10:37 by gbrochar ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
void ft_lstdel(t_list **alst, void (*del)(void *, size_t))
|
||
|
{
|
||
|
t_list *tmp;
|
||
|
|
||
|
while (*alst)
|
||
|
{
|
||
|
tmp = *alst;
|
||
|
ft_lstdelone(alst, del);
|
||
|
*alst = tmp->next;
|
||
|
}
|
||
|
}
|