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

Comparing ray/src/common/caldefn.c (file contents):
Revision 2.25 by greg, Sun Jul 29 22:10:45 2012 UTC vs.
Revision 2.28 by greg, Thu Apr 2 18:00:34 2020 UTC

# Line 27 | Line 27 | static const char      RCSid[] = "$Id$";
27  
28   #include "copyright.h"
29  
30 #include  <stdio.h>
31 #include  <string.h>
30   #include  <ctype.h>
31  
32   #include  "rterror.h"
# Line 142 | Line 140 | varset(                /* set a variable's value */
140              return;
141          }
142      }
143 +    if (ep1 != NULL && esupport&E_REDEFW) {
144 +        wputs(qname);
145 +        if (ep1->type == ':')
146 +            wputs(": reset constant expression\n");
147 +        else
148 +            wputs(": reset expression\n");
149 +    }
150                                          /* hand build definition */
151      ep1 = newnode();
152      ep1->type = assign;
# Line 697 | Line 702 | getchan(void)                  /* A -> $N = E1 */
702  
703  
704   static double                   /* evaluate a variable */
705 < dvalue(char  *name, EPNODE      *d)
705 > dvalue(char *name, EPNODE *d)
706   {
707      EPNODE  *ep1, *ep2;
708      
# Line 709 | Line 714 | dvalue(char  *name, EPNODE     *d)
714      ep1 = d->v.kid->sibling;                    /* get expression */
715      if (ep1->type == NUM)
716          return(ep1->v.num);                     /* return if number */
717 +    if (esupport&E_RCONST && d->type == ':') {
718 +        wputs(name);
719 +        wputs(": assigned non-constant value\n");
720 +    }
721      ep2 = ep1->sibling;                         /* check time */
722      if (eclock >= MAXCLOCK)
723          eclock = 1;                             /* wrap clock counter */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines