1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 17:29:50 +00:00

Adjust to recent changes in the hash modules.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5160 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2011-08-12 16:22:28 +00:00
parent 6b79f5bbb1
commit 27964254dc
3 changed files with 4 additions and 28 deletions

View File

@ -64,9 +64,6 @@ static unsigned HT_GenHash (const void* Key);
static const void* HT_GetKey (void* Entry);
/* Given a pointer to the user entry data, return a pointer to the key. */
static HashNode* HT_GetHashNode (void* Entry);
/* Given a pointer to the user entry data, return a pointer to the hash node */
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
@ -103,7 +100,6 @@ static Collection FileTab = STATIC_COLLECTION_INITIALIZER;
static const HashFunctions HashFunc = {
HT_GenHash,
HT_GetKey,
HT_GetHashNode,
HT_Compare
};
@ -134,14 +130,6 @@ static const void* HT_GetKey (void* Entry)
static HashNode* HT_GetHashNode (void* Entry)
/* Given a pointer to the user entry data, return a pointer to the hash node */
{
return &((FileEntry*) Entry)->Node;
}
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
@ -167,7 +155,7 @@ static FileEntry* NewFileEntry (unsigned Name, FileType Type,
FileEntry* F = xmalloc (sizeof (FileEntry));
/* Initialize the fields */
InitHashNode (&F->Node, F);
InitHashNode (&F->Node);
F->Name = Name;
F->Index = CollCount (&FileTab) + 1; /* First file has index #1 */
F->Type = Type;

View File

@ -38,7 +38,7 @@
/* common */
#include "check.h"
#include "hashstr.h"
#include "hashfunc.h"
#include "hashtab.h"
#include "xmalloc.h"
@ -68,9 +68,6 @@ static unsigned HT_GenHash (const void* Key);
static const void* HT_GetKey (void* Entry);
/* Given a pointer to the user entry data, return a pointer to the key */
static HashNode* HT_GetHashNode (void* Entry);
/* Given a pointer to the user entry data, return a pointer to the hash node */
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
@ -115,7 +112,6 @@ struct Macro {
static const HashFunctions HashFunc = {
HT_GenHash,
HT_GetKey,
HT_GetHashNode,
HT_Compare
};
@ -176,14 +172,6 @@ static const void* HT_GetKey (void* Entry)
static HashNode* HT_GetHashNode (void* Entry)
/* Given a pointer to the user entry data, return a pointer to the hash node */
{
return &((Macro*) Entry)->Node;
}
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
@ -249,7 +237,7 @@ static Macro* NewMacro (const StrBuf* Name, unsigned char Style)
Macro* M = xmalloc (sizeof (Macro));
/* Initialize the macro struct */
InitHashNode (&M->Node, M);
InitHashNode (&M->Node);
M->LocalCount = 0;
M->Locals = 0;
M->ParamCount = 0;

View File

@ -38,7 +38,7 @@
/* common */
#include "addrsize.h"
#include "check.h"
#include "hashstr.h"
#include "hashfunc.h"
#include "mmodel.h"
#include "scopedefs.h"
#include "symdefs.h"