Use case-sensitive hashing for dedup and translation hash tables.

This commit is contained in:
Dianne Skoll
2024-12-09 18:36:53 -05:00
parent 6b05d772f0
commit e50d583659
6 changed files with 41 additions and 41 deletions
+4 -4
View File
@@ -40,7 +40,7 @@ static hash_table VHashTbl;
static unsigned int VarHashFunc(void *x)
{
Var *v = (Var *) x;
return HashVal(v->name);
return HashVal_ignorecase(v->name);
}
static int VarCompareFunc(void *a, void *b)
@@ -477,11 +477,11 @@ static int time_sep_func(int do_set, Value *val)
/***************************************************************/
/* */
/* HashVal */
/* Given a string, compute the hash value. */
/* HashVal_ignorecase */
/* Given a string, compute the hash value case-insensitively */
/* */
/***************************************************************/
unsigned int HashVal(char const *str)
unsigned int HashVal_ignorecase(char const *str)
{
unsigned int h = 0, high;
while(*str) {