161 #include "ispell_checker.h"
170 #ifdef NO_CAPITALIZATION_SUPPORT
171 #define HASHUPPER(c) c
173 #define HASHUPPER(c) mytoupper(c)
180 int ISpellChecker::hash (ichar_t *s,
int hashtblsize)
186 for (i = 4; i-- && *s != 0; )
187 h = (h << 8) | HASHUPPER (*s++);
189 for (i = 2; i-- && *s != 0; )
190 h = (h << 16) | HASHUPPER (*s++);
199 | ((h >> (32 - HASHSHIFT)) & ((1 << HASHSHIFT) - 1));
200 h ^= HASHUPPER (*s++);
202 return static_cast<unsigned long>(h) % hashtblsize;