This is hash.c in view mode; [Download] [Up]
hash(k, siz) char *k; int siz; { register s, i; for (s = i = 0; k[i] != '\0'; i++) s = s*12345 + k[i] + 1; if (s < 0) s = -s; return(s %= siz); }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.