Initial import of libucore
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
unsigned long
|
||||
sdbmhash(const unsigned char *str)
|
||||
{
|
||||
unsigned long hash = 0;
|
||||
unsigned int c;
|
||||
|
||||
while ((c = *str++))
|
||||
hash = c + (hash << 6) + (hash << 16) - hash;
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user