2 |
|
/* |
3 |
|
* Header file for general associative table lookup routines |
4 |
|
*/ |
5 |
+ |
#ifndef _RAD_LOOKUP_H_ |
6 |
+ |
#define _RAD_LOOKUP_H_ |
7 |
+ |
#ifdef __cplusplus |
8 |
+ |
extern "C" { |
9 |
+ |
#endif |
10 |
|
|
6 |
– |
#include "copyright.h" |
7 |
– |
|
11 |
|
typedef struct { |
12 |
|
char *key; /* key name */ |
13 |
|
unsigned long hval; /* key hash value (for efficiency) */ |
75 |
|
* allocated table itself. |
76 |
|
*/ |
77 |
|
|
78 |
< |
extern int strcmp(); |
78 |
> |
#include <string.h> /* strcmp() */ |
79 |
|
|
77 |
– |
#ifdef NOPROTO |
78 |
– |
|
79 |
– |
extern int lu_init(); |
80 |
– |
extern LUENT *lu_find(); |
81 |
– |
extern void lu_delete(); |
82 |
– |
extern int lu_doall(); |
83 |
– |
extern void lu_done(); |
84 |
– |
extern unsigned long lu_shash(); |
85 |
– |
|
86 |
– |
#else |
87 |
– |
|
80 |
|
extern int lu_init(LUTAB *tbl, int nel); |
81 |
|
extern unsigned long lu_shash(char *s); |
82 |
|
extern LUENT *lu_find(LUTAB *tbl, char *key); |
84 |
|
extern int lu_doall(LUTAB *tbl, int (*f)()); |
85 |
|
extern void lu_done(LUTAB *tbl); |
86 |
|
|
87 |
+ |
|
88 |
+ |
#ifdef __cplusplus |
89 |
+ |
} |
90 |
|
#endif |
91 |
+ |
#endif /* _RAD_LOOKUP_H_ */ |
92 |
+ |
|