X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fca65%2Ffiletab.c;h=82e20ee70ecf1576123fb31a06d34cde673e4264;hb=93249045352c2949461e89d2c602600beb72d87d;hp=ad760988f09c94eb7bab40137a160306659d4c0d;hpb=27964254dc0171b838370984981c1e068c47e76d;p=cc65 diff --git a/src/ca65/filetab.c b/src/ca65/filetab.c index ad760988f..82e20ee70 100644 --- a/src/ca65/filetab.c +++ b/src/ca65/filetab.c @@ -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) {