-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_ldcditer.c
executable file
·28 lines (25 loc) · 1.14 KB
/
ft_ldcditer.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ldcditer.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tseguier <tseguier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/12/03 04:08:00 by tseguier #+# #+# */
/* Updated: 2014/03/27 18:38:34 by jcoignet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include "ft_ldcd_cell.h"
void ft_ldcditer(t_ldcd ldcd, void (*f)(void *elem, size_t elemsize))
{
t_ldcd_cell iter;
if (!ldcd || !f)
return ;
iter = ldcd->head;
while (iter)
{
(*f)(iter->content, iter->content_size);
iter = iter->next;
}
}