79
int hashtab_generate_c(const struct hashtable *s,const char* name);
80
struct element* hashtab_find(const struct hashtable *s, const char* key, const size_t len);
81
int hashtab_init(struct hashtable *s,size_t capacity);
82
const struct element* hashtab_insert(struct hashtable *s, const char* key, const size_t len, const element_data data);
83
void hashtab_delete(struct hashtable *s,const char* key,const size_t len);
84
void hashtab_clear(struct hashtable *s);
85
void hashtab_free(struct hashtable *s);
86
int hashtab_load(FILE* in, struct hashtable *s);
87
int hashtab_store(const struct hashtable *s,FILE* out);
79
int cli_hashtab_generate_c(const struct cli_hashtable *s,const char* name);
80
struct cli_element* cli_hashtab_find(const struct cli_hashtable *s, const char* key, const size_t len);
81
int cli_hashtab_init(struct cli_hashtable *s,size_t capacity);
82
const struct cli_element* cli_hashtab_insert(struct cli_hashtable *s, const char* key, const size_t len, const cli_element_data data);
83
void cli_hashtab_delete(struct cli_hashtable *s,const char* key,const size_t len);
84
void cli_hashtab_clear(struct cli_hashtable *s);
85
void cli_hashtab_free(struct cli_hashtable *s);
86
int cli_hashtab_load(FILE* in, struct cli_hashtable *s);
87
int cli_hashtab_store(const struct cli_hashtable *s,FILE* out);
89
89
/* A set of unique keys. */
99
int hashset_init(struct hashset* hs, size_t initial_capacity, uint8_t load_factor);
100
int hashset_addkey(struct hashset* hs, const uint32_t key);
101
int hashset_removekey(struct hashset* hs, const uint32_t key);
102
int hashset_contains(const struct hashset* hs, const uint32_t key);
103
int hashset_clear(struct hashset* hs);
104
void hashset_destroy(struct hashset* hs);
105
ssize_t hashset_toarray(const struct hashset* hs, uint32_t** array);
99
int cli_hashset_init(struct cli_hashset* hs, size_t initial_capacity, uint8_t load_factor);
100
int cli_hashset_addkey(struct cli_hashset* hs, const uint32_t key);
101
int cli_hashset_removekey(struct cli_hashset* hs, const uint32_t key);
102
int cli_hashset_contains(const struct cli_hashset* hs, const uint32_t key);
103
int cli_hashset_clear(struct cli_hashset* hs);
104
void cli_hashset_destroy(struct cli_hashset* hs);
105
ssize_t cli_hashset_toarray(const struct cli_hashset* hs, uint32_t** array);