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

Comparing ray/src/rt/rcontrib.c (file contents):
Revision 2.40 by greg, Tue Feb 16 20:06:06 2021 UTC vs.
Revision 2.42 by greg, Mon Feb 6 22:40:21 2023 UTC

# Line 74 | Line 74 | LUTAB  modconttab = LU_SINIT(NULL,mcfree);     /* modifier
74  
75   /************************** INITIALIZATION ROUTINES ***********************/
76  
77 < char *
77 > const char *
78   formstr(                                /* return format identifier */
79          int  f
80   )
# Line 107 | Line 107 | addmodifier(char *modn, char *outf, char *prms, char *
107                  error(USER, errmsg);
108          }
109          if (nmods >= modasiz) {         /* need bigger modifier array */
110 <                modasiz += modasiz/3 + 64;
110 >                modasiz += modasiz/2 + 64;
111                  if (modname == NULL)
112                          modname = (char **)malloc(modasiz*sizeof(char *));
113                  else
# Line 164 | Line 164 | addmodfile(char *fname, char *outf, char *prms, char *
164          FILE    *fp;
165  
166          if (path == NULL || (fp = fopen(path, "r")) == NULL) {
167 <                sprintf(errmsg, "cannot load modifier file '%s'",
168 <                                path != NULL ? path : fname);
167 >                if (path == NULL)
168 >                        sprintf(errmsg, "cannot find modifier file '%s'", fname);
169 >                else
170 >                        sprintf(errmsg, "cannot load modifier file '%s'", path);
171                  error(SYSTEM, errmsg);
172          }
173          while (fgetword(mod, sizeof(mod), fp) != NULL)
174 <                addmodifier(mod, outf, prms, binv, bincnt);
174 >                addmodifier(savqstr(mod), outf, prms, binv, bincnt);
175          fclose(fp);
176   }
177  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines