version 1.9, 2002/02/16 21:27:48 |
version 1.10, 2002/04/26 16:15:16 |
|
|
|
|
static void freent(ndptr); |
static void freent(ndptr); |
|
|
unsigned |
unsigned int |
hash(name) |
hash(const char *name) |
const char *name; |
|
{ |
{ |
unsigned int h = 0; |
unsigned int h = 0; |
while (*name) |
while (*name) |
|
|
* find name in the hash table |
* find name in the hash table |
*/ |
*/ |
ndptr |
ndptr |
lookup(name) |
lookup(const char *name) |
const char *name; |
|
{ |
{ |
ndptr p; |
ndptr p; |
unsigned int h; |
unsigned int h; |
|
|
* The new entry is added in front of a hash bucket. |
* The new entry is added in front of a hash bucket. |
*/ |
*/ |
ndptr |
ndptr |
addent(name) |
addent(const char *name) |
const char *name; |
|
{ |
{ |
unsigned int h; |
unsigned int h; |
ndptr p; |
ndptr p; |
|
|
} |
} |
|
|
static void |
static void |
freent(p) |
freent(ndptr p) |
ndptr p; |
|
{ |
{ |
free((char *) p->name); |
free((char *) p->name); |
if (p->defn != null) |
if (p->defn != null) |
|
|
* remove an entry from the hashtable |
* remove an entry from the hashtable |
*/ |
*/ |
void |
void |
remhash(name, all) |
remhash(const char *name, int all) |
const char *name; |
|
int all; |
|
{ |
{ |
unsigned int h; |
unsigned int h; |
ndptr xp, tp, mp; |
ndptr xp, tp, mp; |