Windows2003-3790/sdktools/masm/hash.c

17 lines
261 B
C
Raw Permalink Normal View History

2001-01-01 00:00:00 +01:00
/*
** 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 );
}