12 |
|
char *data; /* pointer to client data */ |
13 |
|
} LUENT; |
14 |
|
|
15 |
+ |
#ifdef NOPROTO |
16 |
|
typedef struct { |
17 |
|
long (*hashf)(); /* key hash function */ |
18 |
|
int (*keycmp)(); /* key comparison function */ |
22 |
|
LUENT *tabl; /* table, if allocated */ |
23 |
|
int ndel; /* number of deleted entries */ |
24 |
|
} LUTAB; |
25 |
+ |
#else |
26 |
+ |
typedef struct { |
27 |
+ |
long (*hashf)(); /* key hash function */ |
28 |
+ |
int (*keycmp)(const char *, const char *); /* key comparison function */ |
29 |
+ |
void (*freek)(char *); /* free a key */ |
30 |
+ |
void (*freed)(char *); /* free the data */ |
31 |
+ |
int tsiz; /* current table size */ |
32 |
+ |
LUENT *tabl; /* table, if allocated */ |
33 |
+ |
int ndel; /* number of deleted entries */ |
34 |
+ |
} LUTAB; |
35 |
+ |
#endif |
36 |
|
|
37 |
|
#define LU_SINIT(fk,fd) {lu_shash,strcmp,(void (*)())(fk),\ |
38 |
|
(void (*)())(fd),0,NULL,0} |
91 |
|
extern void lu_done(LUTAB *); |
92 |
|
extern long lu_shash(char *); |
93 |
|
#endif |
82 |
– |
|
83 |
– |
extern int strcmp(); |