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_htcontent_new.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/ht/ft_htcontent_new.c (limited to 'src/ht/ft_htcontent_new.c') diff --git a/src/ht/ft_htcontent_new.c b/src/ht/ft_htcontent_new.c deleted file mode 100644 index 7dd4f20..0000000 --- a/src/ht/ft_htcontent_new.c +++ /dev/null @@ -1,37 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* ft_htcontent_new.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: cacharle +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2020/01/30 08:45:36 by cacharle #+# #+# */ -/* Updated: 2020/02/17 04:09:50 by cacharle ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include "libft.h" -#include "libft_ht.h" - -/* -** Create a new hash table key/value pair. -** `key` is always duplicated. -** Return a pointer to the created content or NULL is an allocation failed. -*/ - -t_ftht_content *ft_htcontent_new(char *key, void *value) -{ - t_ftht_content *content; - - if (key == NULL) - return (NULL); - if ((content = (t_ftht_content*)malloc(sizeof(t_ftht_content))) == NULL) - return (NULL); - if ((content->key = ft_strdup(key)) == NULL) - { - free(content); - return (NULL); - } - content->value = value; - return (content); -} -- cgit