--- ray/src/common/lookup.h 1998/09/02 18:42:11 2.5 +++ ray/src/common/lookup.h 2003/06/27 06:53:21 2.9 @@ -1,10 +1,12 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - -/* SCCSid "$SunId$ SGI" */ - +/* RCSid $Id: lookup.h,v 2.9 2003/06/27 06:53:21 greg Exp $ */ /* * Header file for general associative table lookup routines */ +#ifndef _RAD_LOOKUP_H_ +#define _RAD_LOOKUP_H_ +#ifdef __cplusplus +extern "C" { +#endif typedef struct { char *key; /* key name */ @@ -73,11 +75,18 @@ 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(); +#include /* strcmp() */ -extern int strcmp(); +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); + + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_LOOKUP_H_ */ +