shithub: scc

ref: ef9e03046d35d4d0a3a73316e4675470228ebc98
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;
}