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

Comparing ray/src/util/radcompare.c (file contents):
Revision 2.23 by greg, Tue Jun 30 01:17:54 2020 UTC vs.
Revision 2.24 by greg, Tue Jun 30 22:53:05 2020 UTC

# Line 317 | Line 317 | equiv_string(char *s1, char *s2)
317   static int
318   setheadvar(char *val, void *p)
319   {
320 +        char    newval[128];
321          LUTAB   *htp = (LUTAB *)p;
322          LUENT   *tep;
323          char    *key;
# Line 359 | Line 360 | setheadvar(char *val, void *p)
360                  return(-1);     /* memory allocation error */
361          if (!tep->key)
362                  tep->key = strcpy(malloc(kln+1), key);
363 <        if (tep->data)
363 >        if (tep->data) {        /* check for special cases */
364 >                if (!strcmp(key, "EXPOSURE")) {
365 >                        sprintf(newval, "%f", atof(tep->data)*atof(val));
366 >                        vln = strlen(val = newval);
367 >                }
368                  free(tep->data);
369 +        }
370          tep->data = strcpy(malloc(vln+1), val);
371          return(1);
372   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines