Remove the unused calchash djb2 hash function

Note that hashmap.c uses its own FNV-1a hash function
This commit is contained in:
Rangi
2021-04-09 14:27:36 -04:00
committed by Eldred Habert
parent a2f52867ad
commit c278a361da
2 changed files with 1 additions and 16 deletions

View File

@@ -15,21 +15,6 @@
#include "extern/utf8decoder.h"
/*
* Calculate the hash value for a string.
* Uses the djb2 algorithm (xor version).
* http://www.cse.yorku.ca/~oz/hash.html
*/
uint32_t calchash(const char *s)
{
uint32_t hash = 5381;
while (*s != 0)
hash = (hash * 33) ^ (*s++);
return hash;
}
char const *printChar(int c)
{
// "'A'" + '\0': 4 bytes