diff options
| author | Cabergs Charles <cacharle@w-r5-p6.s19.be> | 2019-10-09 09:12:43 +0200 |
|---|---|---|
| committer | Cabergs Charles <cacharle@w-r5-p6.s19.be> | 2019-10-09 09:12:43 +0200 |
| commit | 840957aee277e7c426647cc133b2a41e7cecd9a9 (patch) | |
| tree | 96eaae76f3586e9fa141cd94b95e92b7a6db3d09 /ft_lstiter_bonus.c | |
| parent | f723389e5143c9ee0bc3d9774bb523b1c752b74c (diff) | |
| download | libft-840957aee277e7c426647cc133b2a41e7cecd9a9.tar.gz libft-840957aee277e7c426647cc133b2a41e7cecd9a9.tar.bz2 libft-840957aee277e7c426647cc133b2a41e7cecd9a9.zip | |
Normed, Makefile bonus rule
- bonus rule to add the *_bonus files to libft.a
- normed memmove, calloc and bonus
Diffstat (limited to 'ft_lstiter_bonus.c')
| -rw-r--r-- | ft_lstiter_bonus.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ft_lstiter_bonus.c b/ft_lstiter_bonus.c new file mode 100644 index 0000000..132e223 --- /dev/null +++ b/ft_lstiter_bonus.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstiter_bonus.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/09 09:03:22 by cacharle #+# #+# */ +/* Updated: 2019/10/09 09:08:56 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include <stdlib.h> +#include "libft_bonus.h" + +void ft_lstiter(t_list *lst, void (*f)(t_list *)) +{ + while (lst != NULL) + { + (*f)(lst); + lst = lst->next; + } +} |
