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.14 by greg, Tue May 25 06:30:46 2004 UTC vs.
Revision 2.15 by greg, Tue May 25 22:04:13 2004 UTC

# Line 48 | Line 48 | lu_init(               /* initialize tbl for at least nel elements
48  
49   extern unsigned long
50   lu_shash(                       /* hash a nul-terminated string */
51 <        void    *s
51 >        const void      *s
52   )
53   {
54          static unsigned char shuffle[256] = {
# Line 79 | Line 79 | lu_shash(                      /* hash a nul-terminated string */
79          };
80          register int    i = 0;
81          register unsigned long  h = 0;
82 <        register unsigned char *t = (unsigned char *)s;
82 >        register unsigned const char *t = (unsigned const char *)s;
83  
84          while (*t)
85                  h ^= (unsigned long)shuffle[*t++] << ((i+=11) & 0xf);
# Line 91 | Line 91 | lu_shash(                      /* hash a nul-terminated string */
91   extern LUENT *
92   lu_find(                /* find a table entry */
93          register LUTAB  *tbl,
94 <        char    *key
94 >        const char      *key
95   )
96   {
97          unsigned long   hval;
# Line 147 | Line 147 | tryagain:
147   extern void
148   lu_delete(              /* delete a table entry */
149          register LUTAB  *tbl,
150 <        char    *key
150 >        const char      *key
151   )
152   {
153          register LUENT  *le;
# Line 165 | Line 165 | lu_delete(             /* delete a table entry */
165  
166   extern int
167   lu_doall(               /* loop through all valid table entries */
168 <        register LUTAB  *tbl,
169 <        //int   (*f)(LUENT *)
168 >        register const LUTAB    *tbl,
169 >        //int   (*f)(const LUENT *)
170          lut_doallf_t *f,
171          void *p
172   )
173   {
174          int     rval = 0;
175 <        register LUENT  *tp;
175 >        register const LUENT    *tp;
176  
177          for (tp = tbl->tabl + tbl->tsiz; tp-- > tbl->tabl; )
178                  if (tp->data != NULL) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines