1 #ifndef _RAZOR_TYPES_H_
2 #define _RAZOR_TYPES_H_
11 void array_init(struct array *array);
12 void array_release(struct array *array);
13 void *array_add(struct array *array, int size);
16 void list_init(uint32_t *list);
17 void list_set(uint32_t *list, struct array *pool, struct array *items);
18 uint32_t *list_first(uint32_t *list, struct array *pool);
19 uint32_t *list_next(uint32_t *list);
20 void list_remap_pool(struct array *pool, uint32_t *map);
21 void list_remap_if_immediate(uint32_t *list, uint32_t *map);
22 #define LIST_VALUE(list) (*(list) & RAZOR_ENTRY_MASK)
23 #define LIST_FLAGS(list) (*(list) & ~RAZOR_ENTRY_MASK)
30 void hashtable_init(struct hashtable *table, struct array *pool);
31 void hashtable_release(struct hashtable *table);
32 uint32_t hashtable_insert(struct hashtable *table, const char *key);
33 uint32_t hashtable_lookup(struct hashtable *table, const char *key);
34 uint32_t hashtable_tokenize(struct hashtable *table, const char *string);
36 #endif /* _RAZOR_TYPES_H_ */