#include #include #ifndef HASHTABLE_H #define HASHTABLE_H typedef struct { bool exists; size_t sizet; } size_t_optional; typedef struct { size_t size; char* name; void* data; } HashTable_item; typedef struct { size_t capacity; size_t filled; HashTable_item* items; } HashTable; bool hashtable_recreate(HashTable* table); HashTable* hashtable_create(void); void hashtable_destroy(HashTable*); size_t_optional hashtable_key(HashTable*, char*, size_t); size_t_optional hashtable_insert(HashTable*, char*, size_t); void* hashtable_get(HashTable* table, char* name, size_t); void hashtable_set(HashTable* table, char* name, size_t, void* data); bool hashtable_delete(HashTable*, char*, size_t); void hashtable_forall(HashTable*, void (*)(char*, size_t, void*, void*), void*); #endif