| iMatix home page | << | < | > | >> |
![]() Version 1.91 |
#include "sflsymb.h" int sym_hash ( const char *name)
Computes the hash value for a null-delimited string. The algorithm used is a simple 8-bit checksum of the characters in the string. The hash is within the range 0 .. SYM_HASH_SIZE - 1.
{ int hash; /* Computed hash value */ for (hash = 0; *name; name++) hash += *name; return (hash & (SYM_HASH_SIZE - 1)); }
| << | < | > | >> |
![]() |