danw@115: #ifndef _RAZOR_TYPES_H_ danw@115: #define _RAZOR_TYPES_H_ danw@115: danw@115: #include danw@115: danw@115: struct array { danw@115: void *data; danw@115: int size, alloc; danw@115: }; danw@115: danw@115: void array_init(struct array *array); danw@115: void array_release(struct array *array); danw@115: void *array_add(struct array *array, int size); danw@115: danw@115: danw@115: struct hashtable { danw@115: struct array buckets; danw@115: struct array *pool; danw@115: }; danw@115: danw@115: void hashtable_init(struct hashtable *table, struct array *pool); danw@115: void hashtable_release(struct hashtable *table); danw@115: uint32_t hashtable_insert(struct hashtable *table, const char *key); danw@115: uint32_t hashtable_lookup(struct hashtable *table, const char *key); danw@115: uint32_t hashtable_tokenize(struct hashtable *table, const char *string); danw@115: danw@115: #endif /* _RAZOR_TYPES_H_ */