aboutsummaryrefslogtreecommitdiff
path: root/include/libft_ht.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libft_ht.h')
-rw-r--r--include/libft_ht.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/libft_ht.h b/include/libft_ht.h
index b890316..8dff87a 100644
--- a/include/libft_ht.h
+++ b/include/libft_ht.h
@@ -1,8 +1,9 @@
-#ifndef FT_HT
-# define FT_HT
+#ifndef LIBFT_HT
+# define LIBFT_HT
# include "libft.h"
+# include "libft_lst.h"
typedef struct
{
@@ -10,7 +11,7 @@ typedef struct
void *value;
} t_ftht_content;
-typedef t_list* t_ftht_entry;
+typedef t_ftlst* t_ftht_entry;
typedef struct
{
@@ -21,11 +22,12 @@ typedef struct
typedef t_ftuint t_ftht_digest;
+t_ftht_digest ft_hthash(t_ftht *ht, char *key);
+
t_ftht *ft_htnew(t_ftsize size);
void ft_htdestroy(t_ftht *ht, void (*del)(t_ftht_content*));
void ft_htdestroy_all(t_ftht *ht);
void ft_htdestroy_key(t_ftht *ht);
-void ft_htdestroy_value(t_ftht *ht);
t_ftht_content *ft_htget(t_ftht *ht, char *key);
t_ftht_content *ft_htset(t_ftht *ht, char *key, void *value);
void ft_htdelone(t_ftht *ht, char *key, void (*del)(t_ftht_content*));