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

Comparing ray/src/common/rglinst.c (file contents):
Revision 3.14 by greg, Tue May 25 06:30:46 2004 UTC vs.
Revision 3.18 by greg, Sat Jun 7 05:09:45 2025 UTC

# Line 12 | Line 12 | static const char      RCSid[] = "$Id$";
12   #include <time.h>
13  
14   #include "platform.h"
15 #include "paths.h"
15   #include "resolu.h"
16   #include "radogl.h"
17   #include "octree.h"
# Line 39 | Line 38 | static FILE  *infp;                    /* input file stream */
38   static int  objsize;                    /* size of stored OBJECT's */
39   static short  otypmap[NUMOTYPE+8];      /* object type map */
40  
41 < static unsigned long    imhash(mod) char *mod; {return((unsigned long)mod);}
41 > static unsigned long    imhash(const char *mod) {return((unsigned long)mod);}
42   static LUTAB    imtab = {imhash,NULL,NULL,NULL,0,NULL,0};
43  
44   static LUTAB    ottab = LU_SINIT(free,free);
# Line 90 | Line 89 | register OBJREC        *o;
89  
90   static int
91   buildoctlist(lp, p)                     /* build octree list */
92 < LUENT   *lp;
92 > const LUENT     *lp;
93   void    *p;
94   {
95          int     old_dolights = dolights, old_domats = domats;
# Line 147 | Line 146 | char   *name;
146                  path = getpath(name, getrlibpath(), R_OK);
147                  if (path == NULL) {
148                          sprintf(errmsg, "cannot find octree \"%s\"", name);
149 <                        error(USER, errmsg);
149 >                        error(SYSTEM, errmsg);
150                  }
151                  op = (OCTINST *)(lp->data = (char *)malloc(sizeof(OCTINST)));
152                  strcpy(op->octfile, path);
# Line 376 | Line 375 | loadobj()                              /* get next object */
375          (*ofun[ob.otype].funp)(&ob);
376                                          /* record material if modifier */
377          if (ismodifier(ob.otype)) {
378 <                if ((lep = lu_find(&imtab, (char *)nobjects)) == NULL)
378 >                if ((lep = lu_find(&imtab, (char *)(size_t)nobjects)) == NULL)
379                          goto memerr;
380 <                lep->key = (char *)nobjects;
380 >                lep->key = (char *)(size_t)nobjects;
381                  lep->data = (char *)getmatp(ob.oname);
382          }
383          freefargs(&ob.oargs);           /* free arguments */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines