1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
< |
|
3 |
< |
/* SCCSid "$SunId$ SGI" */ |
4 |
< |
|
1 |
> |
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
* Header file for general associative table lookup routines |
4 |
|
*/ |
5 |
+ |
#ifndef _RAD_LOOKUP_H_ |
6 |
+ |
#define _RAD_LOOKUP_H_ |
7 |
|
|
8 |
+ |
#include <string.h> /* strcmp() */ |
9 |
+ |
|
10 |
+ |
#ifdef __cplusplus |
11 |
+ |
extern "C" { |
12 |
+ |
#endif |
13 |
+ |
|
14 |
|
typedef struct { |
15 |
|
char *key; /* key name */ |
16 |
|
unsigned long hval; /* key hash value (for efficiency) */ |
78 |
|
* allocated table itself. |
79 |
|
*/ |
80 |
|
|
81 |
< |
extern int lu_init(); |
82 |
< |
extern LUENT *lu_find(); |
83 |
< |
extern void lu_delete(); |
84 |
< |
extern int lu_doall(); |
85 |
< |
extern void lu_done(); |
86 |
< |
extern unsigned long lu_shash(); |
81 |
> |
extern int lu_init(LUTAB *tbl, int nel); |
82 |
> |
extern unsigned long lu_shash(char *s); |
83 |
> |
extern LUENT *lu_find(LUTAB *tbl, char *key); |
84 |
> |
extern void lu_delete(LUTAB *tbl, char *key); |
85 |
> |
extern int lu_doall(LUTAB *tbl, int (*f)()); |
86 |
> |
extern void lu_done(LUTAB *tbl); |
87 |
|
|
88 |
< |
extern int strcmp(); |
88 |
> |
|
89 |
> |
#ifdef __cplusplus |
90 |
> |
} |
91 |
> |
#endif |
92 |
> |
#endif /* _RAD_LOOKUP_H_ */ |
93 |
> |
|