hash.c
ds2.10/fluffos-2.16-ds05/hash.c · 260 B
From the archive ds2.10.zip
Download the archive « Back to the archive contents
#define EDIT_SOURCE
#define NO_SOCKETS
#define NO_OPCODES
#include "std.h"
#include "hash.h"
unsigned int whashstr (const char * s)
{
int i = 0;
unsigned long __h = 0;
for ( ; *s && i++ <1000 ; ++s)
__h = 37 * __h + *s;
return __h;
}