diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-15 18:07:02 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-15 18:07:02 +0200 |
commit | 3efd96ff79f4f5669c3422a1f592f09176c77121 (patch) | |
tree | 0efd426765206625fdbf64e4c9cab4cce83010da /word.h | |
parent | 62b45cb26d7868b21ba4b854d2d3b8befeee9327 (diff) |
Added a hash table to keep track of words.
Moved the sdbm hash function into sdbm.c.
Init and free users and words inside the channel loop.
Increased the size of the user hash table to 1000.
Diffstat (limited to 'word.h')
-rw-r--r-- | word.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#ifndef _WORD_H_ +#define _WORD_H_ + +#define WORDS_MAX 10000 + +struct word_t { + unsigned long hash; + char *name; + unsigned long count; + struct word_t *next; +}; + +void word_init(); +struct word_t *word_get(char *name); +void word_free(); + +#endif |