scc

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

genhash.c (111B)


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