]> git.sur5r.net Git - cc65/blobdiff - src/ca65/filetab.c
Reverted r5835 because of Olivers changes to the asm includes.
[cc65] / src / ca65 / filetab.c
index ad760988f09c94eb7bab40137a160306659d4c0d..82e20ee70ecf1576123fb31a06d34cde673e4264 100644 (file)
@@ -61,7 +61,7 @@
 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);
@@ -122,7 +122,7 @@ static unsigned HT_GenHash (const void* 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 index */
 {
     return &((FileEntry*) Entry)->Name;
@@ -166,7 +166,7 @@ static FileEntry* NewFileEntry (unsigned Name, FileType Type,
     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;
@@ -207,7 +207,7 @@ unsigned GetFileIndex (const StrBuf* Name)
     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) {