diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-03-30 22:26:36 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-03-30 22:26:36 +0200 |
| commit | 901402c99018422c994bdb297e3ba404969c88ea (patch) | |
| tree | 98602c73a00af57fb7efcb36e4e3cbae2c0ce3a8 /src/ht/ft_htcontent_new.c | |
| parent | 40ed37c023627726a5c9c6928284e9f042dc0fa4 (diff) | |
| download | libft-901402c99018422c994bdb297e3ba404969c88ea.tar.gz libft-901402c99018422c994bdb297e3ba404969c88ea.tar.bz2 libft-901402c99018422c994bdb297e3ba404969c88ea.zip | |
Added documentation for ht and lst
Diffstat (limited to 'src/ht/ft_htcontent_new.c')
| -rw-r--r-- | src/ht/ft_htcontent_new.c | 37 |
1 files changed, 0 insertions, 37 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* 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); -} |
