--- ray/src/common/lookup.c 1998/09/03 14:22:23 2.5 +++ ray/src/common/lookup.c 2003/02/25 02:47:21 2.7 @@ -1,14 +1,14 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: lookup.c,v 2.7 2003/02/25 02:47:21 greg Exp $"; #endif - /* * Table lookup routines */ +#include "copyright.h" + #include +#include #include "lookup.h" #ifdef NOSTRUCTASS @@ -17,11 +17,7 @@ static char SCCSid[] = "$SunId$ SGI"; #define copystruct(d,s) (*(d) = *(s)) #endif -#define MEM_PTR char * -extern MEM_PTR calloc(); - - int lu_init(tbl, nel) /* initialize tbl for at least nel elements */ register LUTAB *tbl; @@ -138,7 +134,7 @@ tryagain: copystruct(lu_find(tbl,le[ndx].key), &le[ndx]); else if (tbl->freek != NULL) (*tbl->freek)(le[ndx].key); - free((MEM_PTR)le); + free((void *)le); goto tryagain; /* should happen only once! */ } @@ -194,7 +190,7 @@ register LUTAB *tbl; if (tp->data != NULL && tbl->freed != NULL) (*tbl->freed)(tp->data); } - free((MEM_PTR)tbl->tabl); + free((void *)tbl->tabl); tbl->tabl = NULL; tbl->tsiz = 0; tbl->ndel = 0;