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

Comparing ray/src/rt/p_data.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:41:33 1989 UTC vs.
Revision 1.5 by greg, Thu Aug 8 11:30:04 1991 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1991 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 66 | Line 66 | RAY  *r;
66  
67          if (m->oargs.nsargs < 4)
68                  objerror(m, USER, "bad # arguments");
69 <        if (!vardefined(sa[3]))
70 <                loadfunc(sa[2]);
69 >        funcfile(sa[2]);
70 >        errno = 0;
71          for (nv = 0; nv+3 < m->oargs.nsargs &&
72                          sa[nv+3][0] != '-'; nv++) {
73                  if (nv >= MAXDIM)
74                          goto dimerr;
75                errno = 0;
75                  pt[nv] = varvalue(sa[nv+3]);
77                if (errno)
78                        goto computerr;
76          }
77 +        if (errno)
78 +                goto computerr;
79          dp = getdata(sa[1]);
80          if (dp->nd != nv)
81                  goto dimerr;
# Line 116 | Line 115 | RAY  *r;
115  
116          if (m->oargs.nsargs < 8)
117                  objerror(m, USER, "bad # arguments");
118 <        if (!vardefined(sa[7]))
120 <                loadfunc(sa[6]);
118 >        funcfile(sa[6]);
119          for (nv = 0; nv+7 < m->oargs.nsargs &&
120                          sa[nv+7][0] != '-'; nv++) {
121                  if (nv >= MAXDIM)
# Line 170 | Line 168 | RAY  *r;
168  
169          if (m->oargs.nsargs < 7)
170                  objerror(m, USER, "bad # arguments");
171 <        if (!vardefined(sa[5]))
172 <                loadfunc(sa[4]);
173 <        for (i = 0; i < 2; i++) {
174 <                errno = 0;
175 <                pt[i] = varvalue(sa[i+5]);
176 <                if (errno)
179 <                        goto computerr;
180 <        }
171 >        funcfile(sa[4]);
172 >        errno = 0;
173 >        pt[1] = varvalue(sa[5]);        /* y major ordering */
174 >        pt[0] = varvalue(sa[6]);
175 >        if (errno)
176 >                goto computerr;
177          dp = getpict(sa[3]);
178          for (i = 0; i < 3; i++)
179                  col[i] = datavalue(dp+i, pt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines