-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_ldcddel.c
executable file
·31 lines (28 loc) · 1.16 KB
/
ft_ldcddel.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ldcddel.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tseguier <tseguier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/12/04 02:05:00 by tseguier #+# #+# */
/* Updated: 2014/03/27 18:38:26 by jcoignet ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include "libft.h"
void ft_ldcddel(t_ldcd *ldcd, void (*del)(void **))
{
t_ldcd_cell iter;
t_ldcd_cell temp;
if (!ldcd)
return ;
iter = (*ldcd)->head;
while (iter)
{
temp = iter->next;
ft_ldcd_celldel(&iter, del);
iter = temp;
}
ft_memdel((void **)ldcd);
}