Lines Matching refs:hash
3 #define FICL_ASSERT_PHASH(hash, expression) FICL_ASSERT(NULL, expression)
7 * Unlink all words in the hash that have addresses greater than or
12 ficlHashForget(ficlHash *hash, void *where)
17 FICL_ASSERT_PHASH(hash, hash);
18 FICL_ASSERT_PHASH(hash, where);
20 for (i = 0; i < hash->size; i++) {
21 pWord = hash->table[i];
27 hash->table[i] = pWord;
66 * Put a word into the hash table using the word's hashcode as
70 ficlHashInsertWord(ficlHash *hash, ficlWord *word)
74 FICL_ASSERT_PHASH(hash, hash);
75 FICL_ASSERT_PHASH(hash, word);
77 if (hash->size == 1) {
78 pList = hash->table;
80 pList = hash->table + (word->hash % hash->size);
89 * Find a name in the hash table given the hashcode and text of the name.
97 ficlHashLookup(ficlHash *hash, ficlString name, ficlUnsigned16 hashCode)
106 for (; hash != NULL; hash = hash->link) {
107 if (hash->size > 1)
108 hashIdx = (ficlUnsigned16)(hashCode % hash->size);
112 for (word = hash->table[hashIdx]; word; word = word->link) {
117 FICL_ASSERT_PHASH(hash, word != word->link);
130 ficlHashReset(ficlHash *hash)
134 FICL_ASSERT_PHASH(hash, hash);
136 for (i = 0; i < hash->size; i++) {
137 hash->table[i] = NULL;
140 hash->link = NULL;
141 hash->name = NULL;