================ KeywordHash_Key ================ */
| 1219 | ================ |
| 1220 | */ |
| 1221 | int KeywordHash_Key(const char *keyword) |
| 1222 | { |
| 1223 | int hash, i; |
| 1224 | |
| 1225 | hash = 0; |
| 1226 | for (i = 0; keyword[i] != '\0'; i++) { |
| 1227 | if (keyword[i] >= 'A' && keyword[i] <= 'Z') |
| 1228 | hash += (keyword[i] + ('a' - 'A')) * (119 + i); |
| 1229 | else |
| 1230 | hash += keyword[i] * (119 + i); |
| 1231 | } |
| 1232 | hash = (hash ^ (hash >> 10) ^ (hash >> 20)) & (KEYWORDHASH_SIZE-1); |
| 1233 | return hash; |
| 1234 | } |
| 1235 | |
| 1236 | /* |
| 1237 | ================ |
no outgoing calls
no test coverage detected