ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/lookup.c
(Generate patch)

Comparing ray/src/common/lookup.c (file contents):
Revision 2.5 by gwlarson, Thu Sep 3 14:22:23 1998 UTC vs.
Revision 2.7 by greg, Tue Feb 25 02:47:21 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Table lookup routines
6   */
7  
8 + #include "copyright.h"
9 +
10   #include <stdio.h>
11 + #include <stdlib.h>
12   #include "lookup.h"
13  
14   #ifdef  NOSTRUCTASS
# Line 17 | Line 17 | static char SCCSid[] = "$SunId$ SGI";
17   #define  copystruct(d,s)        (*(d) = *(s))
18   #endif
19  
20 #define MEM_PTR         char *
20  
22 extern MEM_PTR  calloc();
23
24
21   int
22   lu_init(tbl, nel)               /* initialize tbl for at least nel elements */
23   register LUTAB  *tbl;
# Line 138 | Line 134 | tryagain:
134                                  copystruct(lu_find(tbl,le[ndx].key), &le[ndx]);
135                          else if (tbl->freek != NULL)
136                                  (*tbl->freek)(le[ndx].key);
137 <        free((MEM_PTR)le);
137 >        free((void *)le);
138          goto tryagain;                  /* should happen only once! */
139   }
140  
# Line 194 | Line 190 | register LUTAB *tbl;
190                          if (tp->data != NULL && tbl->freed != NULL)
191                                  (*tbl->freed)(tp->data);
192                  }
193 <        free((MEM_PTR)tbl->tabl);
193 >        free((void *)tbl->tabl);
194          tbl->tabl = NULL;
195          tbl->tsiz = 0;
196          tbl->ndel = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines