--- ray/src/common/lookup.h 2003/02/25 02:47:21 2.7 +++ ray/src/common/lookup.h 2003/07/14 22:23:59 2.10 @@ -1,10 +1,16 @@ -/* RCSid $Id: lookup.h,v 2.7 2003/02/25 02:47:21 greg Exp $ */ +/* RCSid $Id: lookup.h,v 2.10 2003/07/14 22:23:59 schorsch Exp $ */ /* * Header file for general associative table lookup routines */ +#ifndef _RAD_LOOKUP_H_ +#define _RAD_LOOKUP_H_ -#include "copyright.h" +#include /* strcmp() */ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { char *key; /* key name */ unsigned long hval; /* key hash value (for efficiency) */ @@ -72,19 +78,6 @@ typedef struct { * allocated table itself. */ -extern int strcmp(); - -#ifdef NOPROTO - -extern int lu_init(); -extern LUENT *lu_find(); -extern void lu_delete(); -extern int lu_doall(); -extern void lu_done(); -extern unsigned long lu_shash(); - -#else - extern int lu_init(LUTAB *tbl, int nel); extern unsigned long lu_shash(char *s); extern LUENT *lu_find(LUTAB *tbl, char *key); @@ -92,4 +85,9 @@ extern void lu_delete(LUTAB *tbl, char *key); extern int lu_doall(LUTAB *tbl, int (*f)()); extern void lu_done(LUTAB *tbl); + +#ifdef __cplusplus +} #endif +#endif /* _RAD_LOOKUP_H_ */ +