Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: djb/1.01
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (17 sloc) 0.279 kB
/* Public domain. */
#include "cdb.h"
uint32 cdb_hashadd(uint32 h,unsigned char c)
{
h += (h << 5);
return h ^ c;
}
uint32 cdb_hash(char *buf,unsigned int len)
{
uint32 h;
h = CDB_HASHSTART;
while (len) {
h = cdb_hashadd(h,*buf++);
--len;
}
return h;
}
Jump to Line
Something went wrong with that request. Please try again.