162 #include "ispell_checker.h" 171 #ifdef NO_CAPITALIZATION_SUPPORT 172 #define HASHUPPER(c) c 174 #define HASHUPPER(c) mytoupper(c) 181 int ISpellChecker::hash (ichar_t *s,
int hashtblsize)
187 for (i = 4; i-- && *s != 0; )
188 h = (h << 8) | HASHUPPER (*s++);
190 for (i = 2; i-- && *s != 0; )
191 h = (h << 16) | HASHUPPER (*s++);
200 | ((h >> (32 - HASHSHIFT)) & ((1 << HASHSHIFT) - 1));
201 h ^= HASHUPPER (*s++);
203 return static_cast<unsigned long>(h) % hashtblsize;