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.26 by greg, Thu Jul 24 15:41:13 2014 UTC vs.
Revision 2.29 by greg, Mon Aug 31 15:06:20 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 639 | Line 637 | getdefn(void)
637              ep2 = newnode();
638              ep2->type = SYM;
639              ep2->v.name = savestr(getname());
640 +            if (strchr(ep2->v.name, CNTXMARK) != NULL)
641 +                syntax("illegal parameter name");
642              addekid(ep1, ep2);
643          } while (nextc == ',');
644          if (nextc != ')')
# Line 704 | Line 704 | getchan(void)                  /* A -> $N = E1 */
704  
705  
706   static double                   /* evaluate a variable */
707 < dvalue(char  *name, EPNODE      *d)
707 > dvalue(char *name, EPNODE *d)
708   {
709      EPNODE  *ep1, *ep2;
710      
# Line 716 | Line 716 | dvalue(char  *name, EPNODE     *d)
716      ep1 = d->v.kid->sibling;                    /* get expression */
717      if (ep1->type == NUM)
718          return(ep1->v.num);                     /* return if number */
719 +    if (esupport&E_RCONST && d->type == ':') {
720 +        wputs(name);
721 +        wputs(": assigned non-constant value\n");
722 +    }
723      ep2 = ep1->sibling;                         /* check time */
724      if (eclock >= MAXCLOCK)
725          eclock = 1;                             /* wrap clock counter */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines