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_htnew.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ht/ft_htnew.c') diff --git a/src/ht/ft_htnew.c b/src/ht/ft_htnew.c index d98a724..f77398f 100644 --- a/src/ht/ft_htnew.c +++ b/src/ht/ft_htnew.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/30 08:19:16 by cacharle #+# #+# */ -/* Updated: 2020/02/10 02:16:20 by cacharle ### ########.fr */ +/* Updated: 2020/02/28 12:10:51 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ -- cgit From 915f1b888cf9c05e4b61321f84ac045eacd8ddd1 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 27 Feb 2020 18:07:57 +0100 Subject: Added ft_lstlfind,ft_lstlsearch and ft_split_destroy --- src/ht/ft_htnew.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ht/ft_htnew.c') diff --git a/src/ht/ft_htnew.c b/src/ht/ft_htnew.c index f77398f..6827c36 100644 --- a/src/ht/ft_htnew.c +++ b/src/ht/ft_htnew.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/30 08:19:16 by cacharle #+# #+# */ -/* Updated: 2020/02/28 12:10:51 by cacharle ### ########.fr */ +/* Updated: 2020/02/28 12:23:43 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_htnew.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ht/ft_htnew.c') diff --git a/src/ht/ft_htnew.c b/src/ht/ft_htnew.c index 6827c36..465eabf 100644 --- a/src/ht/ft_htnew.c +++ b/src/ht/ft_htnew.c @@ -13,6 +13,12 @@ #include "libft.h" #include "libft_ht.h" +/* +** Create a new hash table. +** `size` is the size of the underlying array of linked list (buckets) +** Return NULL is an allocation failed. +*/ + t_ftht *ft_htnew(t_ftsize size) { t_ftht *ht; -- 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_htnew.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ht/ft_htnew.c') diff --git a/src/ht/ft_htnew.c b/src/ht/ft_htnew.c index 465eabf..e28b544 100644 --- a/src/ht/ft_htnew.c +++ b/src/ht/ft_htnew.c @@ -13,10 +13,10 @@ #include "libft.h" #include "libft_ht.h" -/* -** Create a new hash table. -** `size` is the size of the underlying array of linked list (buckets) -** Return NULL is an allocation failed. +/** +** \brief Create a new hash table. +** \param size Size of the underlying array of linked list (buckets) +** \return Created hash table or NULL is an allocation failed */ t_ftht *ft_htnew(t_ftsize size) @@ -27,8 +27,8 @@ t_ftht *ft_htnew(t_ftsize size) return (NULL); if ((ht = (t_ftht*)malloc(sizeof(t_ftht))) == NULL) return (NULL); - ht->entries = (t_ftht_entry*)ft_calloc(size, sizeof(t_ftht_entry)); - if (ht->entries == NULL) + ht->buckets = (t_ftht_bucket*)ft_calloc(size, sizeof(t_ftht_entry)); + if (ht->buckets == NULL) { free(ht); return (NULL); -- 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_htnew.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ht/ft_htnew.c') diff --git a/src/ht/ft_htnew.c b/src/ht/ft_htnew.c index e28b544..e5335d2 100644 --- a/src/ht/ft_htnew.c +++ b/src/ht/ft_htnew.c @@ -13,7 +13,7 @@ #include "libft.h" #include "libft_ht.h" -/** +/* ** \brief Create a new hash table. ** \param size Size of the underlying array of linked list (buckets) ** \return Created hash table or NULL is an allocation failed -- cgit