From 7fe0958b915770470f8ed7ca2e28fe734db392ad Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 21 Aug 2011 13:35:36 +0000 Subject: [PATCH] The ...Entry functions from the hashtab module have been renamed. git-svn-id: svn://svn.cc65.org/cc65/trunk@5245 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/filetab.c | 6 +++--- src/ca65/lineinfo.c | 4 ++-- src/ca65/macro.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ca65/filetab.c b/src/ca65/filetab.c index 84282296b..82e20ee70 100644 --- a/src/ca65/filetab.c +++ b/src/ca65/filetab.c @@ -134,7 +134,7 @@ static int HT_Compare (const void* Key1, const void* Key2) /* Compare two keys. The function must return a value less than zero if * Key1 is smaller than Key2, zero if both are equal, and a value greater * than zero if Key1 is greater then Key2. - */ + */ { return (int)*(const unsigned*)Key1 - (int)*(const unsigned*)Key2; } @@ -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) { diff --git a/src/ca65/lineinfo.c b/src/ca65/lineinfo.c index f4867fff2..50419c60e 100644 --- a/src/ca65/lineinfo.c +++ b/src/ca65/lineinfo.c @@ -187,7 +187,7 @@ static LineInfo* NewLineInfo (const LineInfoKey* Key) InitCollection (&LI->OpenSpans); /* Add it to the hash table, so we will find it if necessary */ - HT_InsertEntry (&LineInfoTab, LI); + HT_Insert (&LineInfoTab, LI); /* Return the new struct */ return LI; @@ -301,7 +301,7 @@ LineInfo* StartLine (const FilePos* Pos, unsigned Type, unsigned Count) /* Try to find a line info with this position and type in the hash table. * If so, reuse it. Otherwise create a new one. */ - LI = HT_FindEntry (&LineInfoTab, &Key); + LI = HT_Find (&LineInfoTab, &Key); if (LI == 0) { /* Allocate a new LineInfo */ LI = NewLineInfo (&Key); diff --git a/src/ca65/macro.c b/src/ca65/macro.c index b2fdaeaf7..c9715578d 100644 --- a/src/ca65/macro.c +++ b/src/ca65/macro.c @@ -597,7 +597,7 @@ void MacUndef (const StrBuf* Name, unsigned char Style) */ { /* Search for the macro */ - Macro* M = HT_FindEntry (&MacroTab, Name); + Macro* M = HT_Find (&MacroTab, Name); /* Don't let the user kid with us */ if (M == 0 || M->Style != Style) { @@ -610,7 +610,7 @@ void MacUndef (const StrBuf* Name, unsigned char Style) } /* Remove the macro from the macro table */ - HT_RemoveEntry (&MacroTab, M); + HT_Remove (&MacroTab, M); /* Free the macro structure */ FreeMacro (M); @@ -983,7 +983,7 @@ Macro* FindMacro (const StrBuf* Name) * this name was found, return NULL. */ { - Macro* M = HT_FindEntry (&MacroTab, Name); + Macro* M = HT_Find (&MacroTab, Name); return (M != 0 && M->Style == MAC_STYLE_CLASSIC)? M : 0; } @@ -1002,7 +1002,7 @@ Macro* FindDefine (const StrBuf* Name) } /* Check if we have such a macro */ - M = HT_FindEntry (&MacroTab, Name); + M = HT_Find (&MacroTab, Name); return (M != 0 && M->Style == MAC_STYLE_DEFINE)? M : 0; } -- 2.39.5