--- ray/src/common/lookup.h 1998/09/02 18:42:11 2.5 +++ ray/src/common/lookup.h 2003/07/14 22:23:59 2.10 @@ -1,11 +1,16 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - -/* SCCSid "$SunId$ SGI" */ - +/* 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 /* strcmp() */ + +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { char *key; /* key name */ unsigned long hval; /* key hash value (for efficiency) */ @@ -73,11 +78,16 @@ typedef struct { * allocated table itself. */ -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(); +extern int lu_init(LUTAB *tbl, int nel); +extern unsigned long lu_shash(char *s); +extern LUENT *lu_find(LUTAB *tbl, char *key); +extern void lu_delete(LUTAB *tbl, char *key); +extern int lu_doall(LUTAB *tbl, int (*f)()); +extern void lu_done(LUTAB *tbl); -extern int strcmp(); + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_LOOKUP_H_ */ +