blob: 2955f0403f3a5f6e9e98f15a750f2f5ad7dab769 (
plain) (
tree)
|
|
/* $Id: toolkit.c,v 1.2 2002/06/04 13:08:34 in2 Exp $ */
#include "bbs.h"
unsigned StringHash(unsigned char *s) {
unsigned int v=0;
while(*s) {
v = (v << 8) | (v >> 24);
v ^= toupper(*s++); /* note this is case insensitive */
}
return (v * 2654435769UL) >> (32 - HASH_BITS);
}
|