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/ht/ft_htdelone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ht/ft_htdelone.c') diff --git a/src/ht/ft_htdelone.c b/src/ht/ft_htdelone.c index 2c54721..77eae58 100644 --- a/src/ht/ft_htdelone.c +++ b/src/ht/ft_htdelone.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/30 09:27:18 by cacharle #+# #+# */ -/* Updated: 2020/02/19 02:35:06 by cacharle ### ########.fr */ +/* Updated: 2020/02/28 12:10:16 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ -- cgit From 2a9133a87109f9430e4827a858ff86596c5f98d5 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 4 Mar 2020 12:49:31 +0100 Subject: Added hash table documentation --- src/ht/ft_htdelone.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ht/ft_htdelone.c') diff --git a/src/ht/ft_htdelone.c b/src/ht/ft_htdelone.c index 77eae58..e3bb355 100644 --- a/src/ht/ft_htdelone.c +++ b/src/ht/ft_htdelone.c @@ -13,6 +13,10 @@ #include "libft.h" #include "libft_ht.h" +/* +** Delete one hash table entry at `key`. +*/ + void ft_htdelone(t_ftht *ht, char *key, void (*del)(t_ftht_content*)) { ft_lstremove_if(ht->entries + ft_hthash(ht, key), -- 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/ht/ft_htdelone.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ht/ft_htdelone.c') diff --git a/src/ht/ft_htdelone.c b/src/ht/ft_htdelone.c index e3bb355..3672b23 100644 --- a/src/ht/ft_htdelone.c +++ b/src/ht/ft_htdelone.c @@ -13,13 +13,17 @@ #include "libft.h" #include "libft_ht.h" -/* -** Delete one hash table entry at `key`. +/** +** \brief Delete one hash table entry +** \param key Key of entry to delete +** \param del Function to destroy the entry +** \warning The del function HAS to free the key +** \note Do nothing if their is to entry which correspond to key */ -void ft_htdelone(t_ftht *ht, char *key, void (*del)(t_ftht_content*)) +void ft_htdelone(t_ftht *ht, char *key, void (*del)(t_ftht_entry*)) { - ft_lstremove_if(ht->entries + ft_hthash(ht, key), + ft_lstremove_if(ht->buckets + ft_hthash(ht, key), ft_inter_htkey_cmp, key, (void (*)(void*))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/ht/ft_htdelone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ht/ft_htdelone.c') diff --git a/src/ht/ft_htdelone.c b/src/ht/ft_htdelone.c index 3672b23..7374a44 100644 --- a/src/ht/ft_htdelone.c +++ b/src/ht/ft_htdelone.c @@ -13,7 +13,7 @@ #include "libft.h" #include "libft_ht.h" -/** +/* ** \brief Delete one hash table entry ** \param key Key of entry to delete ** \param del Function to destroy the entry -- cgit