| 1 |
< |
/* Copyright (c) 1994 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
| 2 |
|
|
| 3 |
< |
/* SCCSid "$SunId$ LBL" */ |
| 3 |
> |
/* SCCSid "$SunId$ SGI" */ |
| 4 |
|
|
| 5 |
|
/* |
| 6 |
|
* Header file for general associative table lookup routines |
| 7 |
|
*/ |
| 8 |
|
|
| 9 |
|
typedef struct { |
| 10 |
< |
char *key; /* key name */ |
| 11 |
< |
long hval; /* key hash value (for efficiency) */ |
| 12 |
< |
char *data; /* pointer to client data */ |
| 10 |
> |
char *key; /* key name */ |
| 11 |
> |
unsigned long hval; /* key hash value (for efficiency) */ |
| 12 |
> |
char *data; /* pointer to client data */ |
| 13 |
|
} LUENT; |
| 14 |
|
|
| 15 |
|
typedef struct { |
| 16 |
< |
long (*hashf)(); /* key hash function */ |
| 17 |
< |
int (*keycmp)(); /* key comparison function */ |
| 18 |
< |
void (*freek)(); /* free a key */ |
| 19 |
< |
void (*freed)(); /* free the data */ |
| 20 |
< |
int tsiz; /* current table size */ |
| 21 |
< |
LUENT *tabl; /* table, if allocated */ |
| 22 |
< |
int ndel; /* number of deleted entries */ |
| 16 |
> |
unsigned long (*hashf)(); /* key hash function */ |
| 17 |
> |
int (*keycmp)(); /* key comparison function */ |
| 18 |
> |
void (*freek)(); /* free a key */ |
| 19 |
> |
void (*freed)(); /* free the data */ |
| 20 |
> |
int tsiz; /* current table size */ |
| 21 |
> |
LUENT *tabl; /* table, if allocated */ |
| 22 |
> |
int ndel; /* number of deleted entries */ |
| 23 |
|
} LUTAB; |
| 24 |
|
|
| 25 |
|
#undef strcmp |
| 78 |
|
extern void lu_delete(); |
| 79 |
|
extern int lu_doall(); |
| 80 |
|
extern void lu_done(); |
| 81 |
< |
extern long lu_shash(); |
| 81 |
> |
extern unsigned long lu_shash(); |
| 82 |
|
|
| 83 |
|
extern int strcmp(); |