diff -r 000000000000 -r 26edeea5c95a types.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/types.h Thu Feb 07 09:58:48 2008 -0500 @@ -0,0 +1,27 @@ +#ifndef _RAZOR_TYPES_H_ +#define _RAZOR_TYPES_H_ + +#include + +struct array { + void *data; + int size, alloc; +}; + +void array_init(struct array *array); +void array_release(struct array *array); +void *array_add(struct array *array, int size); + + +struct hashtable { + struct array buckets; + struct array *pool; +}; + +void hashtable_init(struct hashtable *table, struct array *pool); +void hashtable_release(struct hashtable *table); +uint32_t hashtable_insert(struct hashtable *table, const char *key); +uint32_t hashtable_lookup(struct hashtable *table, const char *key); +uint32_t hashtable_tokenize(struct hashtable *table, const char *string); + +#endif /* _RAZOR_TYPES_H_ */