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.13 by schorsch, Fri Nov 14 17:22:06 2003 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 89 | Line 88 | register OBJREC        *o;
88  
89  
90   static int
91 < buildoctlist(lp)                        /* build octree list */
92 < LUENT   *lp;
91 > buildoctlist(lp, p)                     /* build octree list */
92 > const LUENT     *lp;
93 > void    *p;
94   {
95          int     old_dolights = dolights, old_domats = domats;
96          register OCTINST        *op = (OCTINST *)lp->data;
# Line 119 | Line 119 | loadoctrees()                          /* load octrees we've saved up */
119                          error(USER, "too many octree levels -- instance loop?");
120                  looptab = ottab;
121                  ottab.tsiz = 0;
122 <                nocts += lu_doall(&looptab, buildoctlist);
122 >                nocts += lu_doall(&looptab, buildoctlist, NULL);
123                  lu_done(&looptab);
124          }
125          return(nocts);
# Line 146 | 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 375 | 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