Initial revision

This commit is contained in:
Akinori Ito
2001-11-08 05:14:08 +00:00
commit 68a07bf03b
305 changed files with 104639 additions and 0 deletions

26
hash.c Normal file
View File

@@ -0,0 +1,26 @@
#include <string.h>
#include "hash.h"
#include "gc.h"
static unsigned int
hashfunc(char *s)
{
unsigned int h = 0;
while (*s) {
if (h & 0x80000000) {
h <<= 1;
h |= 1;
}
else
h <<= 1;
h += *s;
s++;
}
return h;
}
#define keycomp(x,y) !strcmp(x,y)
defhashfunc(char *, int, si)
defhashfunc(char *, char *, ss)
defhashfunc(char *, void *, hist)