windows-nt/Source/XPSP1/NT/sdktools/masm/hash.c
2020-09-26 16:20:57 +08:00

17 lines
245 B
C

/*
** hash : hashes the given string by adding all the chars in the string.
*/
unsigned short
hash ( name )
register char *name;
{
register unsigned short i = 0;
register unsigned short c;
while (c = *name++)
i += c;
return( i );
}