shithub: scc

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