/* * hash.h * SDBM Hash function * * Created by Sunrise Telephone Systems Ltd. * * This file ("hash.h") is hereby placed into the public domain. * */ // -------------------------------------------------------------------------- // function: calc_hash(string) // -------------------------------------------------------------------------- // // Returns the hash value of the null terminated C string 'string' using the // SDBM hash algorithm. The number of significant characters for which the // hash value will be calculated is limited to MAXIMUM_LENGTH_FOR_STRINGS. unsigned int calc_hash(const char *string); // -------------------------------------------------------------------------- // function: calc_hash_with_limit(string, limit) // -------------------------------------------------------------------------- // // Returns the hash value of the null terminated C string 'string' using the // SDBM hash algorithm. The number of significant characters for which the // hash value will be calculated is limited to 'limit'. unsigned int calc_hash_with_limit(const char *string, unsigned int limit); // END OF FILE