From 8131a5d26441c5152ab151b4bb49b561e5ca6e81 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 31 Jan 2020 10:44:30 +0100 Subject: hash table unit testing, norming --- src/lst/ft_lstremove_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 5221ae4..03643fa 100644 --- a/src/lst/ft_lstremove_if.c +++ b/src/lst/ft_lstremove_if.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/30 09:36:49 by cacharle #+# #+# */ -/* Updated: 2020/02/19 02:06:22 by cacharle ### ########.fr */ +/* Updated: 2020/02/28 12:20:51 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ -- cgit From 901402c99018422c994bdb297e3ba404969c88ea Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 30 Mar 2020 22:26:36 +0200 Subject: Added documentation for ht and lst --- src/lst/ft_lstremove_if.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 03643fa..fdac710 100644 --- a/src/lst/ft_lstremove_if.c +++ b/src/lst/ft_lstremove_if.c @@ -10,9 +10,15 @@ /* */ /* ************************************************************************** */ -#include "libft.h" #include "libft_lst.h" +/** +** \brief Remove node on some condition +** \param cmp Comparison function, return 0 if equal +** \param ref Reference data passed has the first arg of `cmp` +** \param del Delete function to free removed node data +*/ + void ft_lstremove_if(t_ftlst **lst, t_ftcompar_func cmp, const void *ref, t_ftdel_func del) { @@ -20,7 +26,7 @@ void ft_lstremove_if(t_ftlst **lst, t_ftcompar_func cmp, if (lst == NULL || *lst == NULL) return ; - if (cmp(ref, (*lst)->content) == 0) + if (cmp(ref, (*lst)->data) == 0) { saved_next = (*lst)->next; ft_lstdelone(*lst, del); -- cgit From 9316f2063255bd4a0abd5c38d4c065969a8980bb Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 1 Apr 2020 18:10:36 +0200 Subject: Norm compliant comment format, dirty script for doxygen comments --- src/lst/ft_lstremove_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 fdac710..4070355 100644 --- a/src/lst/ft_lstremove_if.c +++ b/src/lst/ft_lstremove_if.c @@ -12,7 +12,7 @@ #include "libft_lst.h" -/** +/* ** \brief Remove node on some condition ** \param cmp Comparison function, return 0 if equal ** \param ref Reference data passed has the first arg of `cmp` -- cgit