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

Comparing ray/src/rt/func.c (file contents):
Revision 2.6 by greg, Tue Mar 3 13:58:12 1992 UTC vs.
Revision 2.7 by greg, Sat Sep 26 08:10:41 1992 UTC

# Line 54 | Line 54 | int  dofwd;
54                                          /* check to see if done already */
55          if ((f = (MFUNC *)m->os) != NULL)
56                  return(f);
57 +        fobj = NULL; fray = NULL;
58          if (initfile[0]) {              /* initialize on first call */
59                  setcontext("");
60                  scompile("Dx=$1;Dy=$2;Dz=$3;", NULL, 0);
# Line 211 | Line 212 | l_arg()                                /* return nth real argument */
212          extern double  argument();
213          register int  n;
214  
215 +        if (fobj == NULL)
216 +                syntax("arg(n) used in constant expression");
217 +
218          n = argument(1) + .5;           /* round to integer */
219  
220          if (n < 1)
# Line 248 | Line 252 | register int  n;
252   {
253          double  sum;
254          register RAY  *r;
255 +
256 +        if (fray == NULL)
257 +                syntax("ray parameter used in constant expression");
258  
259          if (--n < 0)
260                  goto badchan;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines