2 * Hic Est Leo -- Universal Dictionaries
4 * (c) 2014--2015 Martin Mares <mj@ucw.cz>
13 const char **names; // Growing array of names
14 struct kv_map_table *hash; // Hash table mapping name -> ID
18 void dict_init(struct dict *dict, const char * const * init);
20 static inline const char *dict_decode(struct dict *d, u32 id)
22 ASSERT(id < GARY_SIZE(d->names));
26 u32 dict_encode(struct dict *d, const char *key);
27 u32 dict_encode_if_exists(struct dict *d, const char *key);
29 static inline u32 dict_size(struct dict *d)
31 return GARY_SIZE(d->names);