shithub: scc

ref: 34e18c0eb51afa1b33b0db768be7ddef2a02ca63
dir: /src/libscc/genhash.c/

View raw version
unsigned
genhash(char *name)
{
	unsigned h;
	char c;

	for (h = 0; c = *name; ++name)
		h = h*33 ^ c;

	return h;
}