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

Comparing ray/src/rt/renderopts.c (file contents):
Revision 2.23 by greg, Fri Nov 17 20:02:07 2023 UTC vs.
Revision 2.27 by greg, Tue Apr 22 17:12:25 2025 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10   #include "copyright.h"
11  
12   #include  "ray.h"
13 + #include  "func.h"
14   #include  "paths.h"
15   #include  "pmapopt.h"
16  
# Line 75 | Line 76 | match_subfeatures(     /* check if subfeatures are support
76                  while (*reqs && (*cp = *reqs++) != ',')
77                          cp++;
78                  *cp = '\0';
79 <                n = cp - subfeat;
80 <                if (!(cp = strstr(mysublist, subfeat)) ||
81 <                                (cp[-1] != ',') & (cp[-1] != '=') ||
82 <                                (cp[n] != ',') & (cp[n] != '\n'))
79 >                if (!(n = cp - subfeat))
80 >                        continue;       /* empty subfeature */
81 >                for (cp = mysublist; (cp = strstr(cp, subfeat)) != NULL; cp++)
82 >                        if ((cp[-1] == ',') | (cp[-1] == '=') &&
83 >                                        (cp[n] == ',') | (cp[n] == '\n'))
84 >                                break;  /* match */
85 >                if (!cp)
86                          return(0);      /* missing this one! */
87          }
88          return(1);                      /* matched them all */
# Line 310 | Line 314 | getrenderopt(          /* get next render option */
314                          return(1);
315                  }
316                  break;
317 +        case 'f':                               /* .cal file */
318 +                if (av[0][2])
319 +                        break;
320 +                check(2,"s");
321 +                loadfunc(av[1]);
322 +                return(1);
323 +        case 'e':                               /* .cal expression */
324 +                if (av[0][2])
325 +                        break;
326 +                check(2,"s");
327 +                if (!strchr(av[1], '=') && !strchr(av[1], ':'))
328 +                        break;
329 +                scompile(av[1], NULL, 0);
330 +                return(1);
331   #if MAXCSAMP>3
332          case 'c':                               /* spectral sampling */
333                  switch (av[0][2]) {
# Line 321 | Line 339 | getrenderopt(          /* get next render option */
339                          check(3,"ff");
340                          WLPART[0] = atof(av[1]);
341                          WLPART[3] = atof(av[2]);
342 <                        return(1);
342 >                        return(2);
343                  }
344                  break;
345   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines