diff options
Diffstat (limited to 'src/ht/ft_htget.c')
| -rw-r--r-- | src/ht/ft_htget.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ht/ft_htget.c b/src/ht/ft_htget.c new file mode 100644 index 0000000..0002249 --- /dev/null +++ b/src/ht/ft_htget.c @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_htget.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/01/30 08:33:21 by cacharle #+# #+# */ +/* Updated: 2020/01/31 10:40:57 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" +#include "libft_ht.h" + +t_ftht_content *ft_htget(t_ftht *ht, char *key) +{ + + t_ftht_digest digest; + + return (NULL); // lstbsearch breaking + if (ht == NULL || key == NULL) + return (NULL); + digest = ft_hthash(ht, key); + return (ft_lstbsearch(ht->entries[digest], + (t_ftbool (*)(void*, void*))ft_inter_htkey_equal, + key)->content); +} |
