aboutsummaryrefslogtreecommitdiff
path: root/test_mini/libft/src/ht/ft_htnew.c
diff options
context:
space:
mode:
authornass1pro <nass1pro@gmail.com>2020-06-12 13:52:58 +0200
committernass1pro <nass1pro@gmail.com>2020-06-13 11:45:50 +0200
commitd971bd8d16608f316396aba7a579d0b1f1af5aeb (patch)
tree98ec558582ed20a120e13b4a376fd206fb620da0 /test_mini/libft/src/ht/ft_htnew.c
parent3136f59540a8dd29e2f096be5a8943e2ddd28431 (diff)
downloadminishell-d971bd8d16608f316396aba7a579d0b1f1af5aeb.tar.gz
minishell-d971bd8d16608f316396aba7a579d0b1f1af5aeb.tar.bz2
minishell-d971bd8d16608f316396aba7a579d0b1f1af5aeb.zip
Added e_token enum
Diffstat (limited to 'test_mini/libft/src/ht/ft_htnew.c')
-rw-r--r--test_mini/libft/src/ht/ft_htnew.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/test_mini/libft/src/ht/ft_htnew.c b/test_mini/libft/src/ht/ft_htnew.c
deleted file mode 100644
index e5335d2..0000000
--- a/test_mini/libft/src/ht/ft_htnew.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* ************************************************************************** */
-/* */
-/* ::: :::::::: */
-/* ft_htnew.c :+: :+: :+: */
-/* +:+ +:+ +:+ */
-/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
-/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/01/30 08:19:16 by cacharle #+# #+# */
-/* Updated: 2020/02/28 12:23:43 by cacharle ### ########.fr */
-/* */
-/* ************************************************************************** */
-
-#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
-*/
-
-t_ftht *ft_htnew(t_ftsize size)
-{
- t_ftht *ht;
-
- if (size == 0)
- return (NULL);
- if ((ht = (t_ftht*)malloc(sizeof(t_ftht))) == NULL)
- return (NULL);
- ht->buckets = (t_ftht_bucket*)ft_calloc(size, sizeof(t_ftht_entry));
- if (ht->buckets == NULL)
- {
- free(ht);
- return (NULL);
- }
- ht->size = size;
- return (ht);
-}