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

Comparing ray/src/common/calfunc.c (file contents):
Revision 2.29 by greg, Sun Feb 25 18:36:27 2024 UTC vs.
Revision 2.30 by greg, Mon Feb 26 18:16:35 2024 UTC

# Line 15 | Line 15 | static const char      RCSid[] = "$Id$";
15   #include  <stdio.h>
16   #include  <string.h>
17   #include  <errno.h>
18 + #include  <stdlib.h>
19   #include  <math.h>
20  
21   #include  "rterror.h"
# Line 200 | Line 201 | double
201   argument(int n)                 /* return nth argument for active function */
202   {
203      ACTIVATION  *actp = curact;
204 <    EPNODE  *ep = NULL;
204 >    EPNODE  *ep;
205      double  aval;
206  
207      if (!actp | (--n < 0)) {
# Line 294 | Line 295 | efunc(EPNODE *ep)                      /* evaluate a function */
295      
296      curact = act.prev;                  /* pop environment */
297      return(rval);
298 + }
299 +
300 +
301 + double
302 + eargument(                              /* evaluate an argument */
303 +    EPNODE      *ep
304 + )
305 + {
306 +    if ((ep->v.chan < AFLAGSIZ) & curact->an >> ep->v.chan)
307 +        return(curact->ap[ep->v.chan]);
308 +
309 +    return(argument(ep->v.chan));
310   }
311  
312  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines