diff options
Diffstat (limited to 'mbbsd/toolkit.c')
-rw-r--r-- | mbbsd/toolkit.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mbbsd/toolkit.c b/mbbsd/toolkit.c new file mode 100644 index 00000000..81a0d6f0 --- /dev/null +++ b/mbbsd/toolkit.c @@ -0,0 +1,14 @@ +/* $Id: toolkit.c,v 1.1 2002/03/07 15:13:48 in2 Exp $ */ +#include <ctype.h> +#include <sys/types.h> +#include "config.h" +#include "pttstruct.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); +} |