static unsigned HT_GenHash (const void* Key);
/* Generate the hash over a key. */
-static const void* HT_GetKey (void* Entry);
+static const void* HT_GetKey (const void* Entry);
/* Given a pointer to the user entry data, return a pointer to the key. */
static int HT_Compare (const void* Key1, const void* Key2);
-static const void* HT_GetKey (void* Entry)
+static const void* HT_GetKey (const void* Entry)
/* Given a pointer to the user entry data, return a pointer to the index */
{
return &((FileEntry*) Entry)->Name;
CollAppend (&FileTab, F);
/* Insert the entry into the hash table */
- HT_Insert (&HashTab, &F->Node);
+ HT_Insert (&HashTab, F);
/* Return the new entry */
return F;
unsigned NameIdx = GetStrBufId (Name);
/* Search in the hash table for the name */
- FileEntry* F = HT_FindEntry (&HashTab, &NameIdx);
+ const FileEntry* F = HT_Find (&HashTab, &NameIdx);
/* If we don't have this index, print a diagnostic and use the main file */
if (F == 0) {