diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/sdktools/masm/hash.c | |
download | NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2 NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip |
Diffstat (limited to 'private/sdktools/masm/hash.c')
-rw-r--r-- | private/sdktools/masm/hash.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/private/sdktools/masm/hash.c b/private/sdktools/masm/hash.c new file mode 100644 index 000000000..1698ca539 --- /dev/null +++ b/private/sdktools/masm/hash.c @@ -0,0 +1,16 @@ +/* +** 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 ); + } |