diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-30 20:57:29 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-30 20:57:29 +0100 |
| commit | 3b884e3836c70b1a19eb7778308fadbc608b0384 (patch) | |
| tree | e57b327c39e4c16fbd8ad1b1a1511f143df71cdd /include/libft_ht.h | |
| parent | 6500b1ca9ce911d3db7c94ee3f4ee38489b8861a (diff) | |
| download | libft-3b884e3836c70b1a19eb7778308fadbc608b0384.tar.gz libft-3b884e3836c70b1a19eb7778308fadbc608b0384.tar.bz2 libft-3b884e3836c70b1a19eb7778308fadbc608b0384.zip | |
making hashtable compile
Diffstat (limited to 'include/libft_ht.h')
| -rw-r--r-- | include/libft_ht.h | 10 |
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*)); |
