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.8 by greg, Mon Mar 8 12:37:23 1993 UTC

# Line 23 | Line 23 | static char SCCSid[] = "$SunId$ LBL";
23   #define  LCALSUF        4
24  
25   XF  unitxf = {                  /* identity transform */
26 <        1.0, 0.0, 0.0, 0.0,
27 <        0.0, 1.0, 0.0, 0.0,
28 <        0.0, 0.0, 1.0, 0.0,
29 <        0.0, 0.0, 0.0, 1.0,
26 >        {{1.0, 0.0, 0.0, 0.0},
27 >        {0.0, 1.0, 0.0, 0.0},
28 >        {0.0, 0.0, 1.0, 0.0},
29 >        {0.0, 0.0, 0.0, 1.0}},
30          1.0
31   };
32  
# 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