scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

genhash.c (116B)


      1 unsigned
      2 genhash(char *name)
      3 {
      4 	unsigned h;
      5 	char c;
      6 
      7 	for (h = 0; c = *name; ++name)
      8 		h = h*33 ^ c;
      9 
     10 	return h;
     11 }