#ifndef _M_HASH_H_
#define _M_HASH_H_

struct hash {
	unsigned int h_hashsize;
	struct hash_node *h_hash[1];
};

struct hash_node {
	struct hash_node *h_next;
	long h_key;
	void *h_data;
};

struct hash *hash_alloc(int);
int hash_insert_str(struct hash *, const char *, void *);
int hash_delete_str(struct hash *h, const char *key);
void *hash_lookup_str(struct hash *, const char *);
void * hash_lookup_str2(struct hash *h, const char *key, unsigned int *found, struct hash_node **hn2);
void hash_dealloc(struct hash *);

#endif /* _M_HASH_H_ */


syntax highlighted by Code2HTML, v. 0.9.1