From 6500b1ca9ce911d3db7c94ee3f4ee38489b8861a Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 30 Jan 2020 20:24:32 +0100 Subject: Renaming t_list -> t_ftlst, changing feature adding by header --- src/lst/ft_lstremove_if.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lst/ft_lstremove_if.c') diff --git a/src/lst/ft_lstremove_if.c b/src/lst/ft_lstremove_if.c index 2fa06a3..a597c2e 100644 --- a/src/lst/ft_lstremove_if.c +++ b/src/lst/ft_lstremove_if.c @@ -11,16 +11,17 @@ /* ************************************************************************** */ #include "libft.h" +#include "libft_lst.h" -void ft_lstremove_if(t_list **lst, +void ft_lstremove_if(t_ftlst **lst, t_ftbool (*equal)(void *ref, void *content), void *ref, void (*del)(void *content)) { - t_list *saved_next; + t_ftlst *saved_next; if (lst == NULL || *lst == NULL) return ; - if (!equal(ref, &(*lst)->val)) + if (!equal(ref, &(*lst)->content)) { ft_lstremove_if(&(*lst)->next, equal, ref, del); return ; @@ -28,5 +29,5 @@ void ft_lstremove_if(t_list **lst, saved_next = (*lst)->next; ft_lstdelone(*lst, del); *lst = saved_next; - ref_ft_list_remove_if(lst, equal, ref, del); + ft_lstremove_if(lst, equal, ref, del); } -- cgit