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

Comparing ray/src/rt/mx_data.c (file contents):
Revision 2.9 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.12 by greg, Tue Dec 3 19:36:58 2024 UTC

# Line 41 | Line 41 | static const char      RCSid[] = "$Id$";
41   */
42  
43  
44 < extern int
44 > int
45   mx_data(                        /* interpolate mixture data */
46 <        register OBJREC  *m,
46 >        OBJREC  *m,
47          RAY  *r
48   )
49   {
50          OBJECT  obj;
51          double  coef;
52 <        double  pt[MAXDIM];
52 >        double  pt[MAXDDIM];
53          DATARRAY  *dp;
54          OBJECT  mod[2];
55 <        register MFUNC  *mf;
56 <        register int  i;
55 >        MFUNC  *mf;
56 >        int  i;
57  
58          if (m->oargs.nsargs < 6)
59                  objerror(m, USER, "bad # arguments");
# Line 73 | Line 73 | mx_data(                       /* interpolate mixture data */
73          errno = 0;
74          for (i = 0; i < dp->nd; i++) {
75                  pt[i] = evalue(mf->ep[i]);
76 <                if (errno == EDOM || errno == ERANGE)
76 >                if ((errno == EDOM) | (errno == ERANGE))
77                          goto computerr;
78          }
79          coef = datavalue(dp, pt);
80          errno = 0;
81          coef = funvalue(m->oargs.sarg[2], 1, &coef);
82 <        if (errno == EDOM || errno == ERANGE)
82 >        if ((errno == EDOM) | (errno == ERANGE))
83                  goto computerr;
84          if (raymixture(r, mod[0], mod[1], coef)) {
85                  if (m->omod != OVOID)
# Line 93 | Line 93 | computerr:
93   }
94  
95  
96 < extern int
96 > int
97   mx_pdata(                       /* interpolate mixture picture */
98 <        register OBJREC  *m,
98 >        OBJREC  *m,
99          RAY  *r
100   )
101   {
102          OBJECT  obj;
103          double  col[3], coef;
104 <        double  pt[MAXDIM];
104 >        double  pt[MAXDDIM];
105          DATARRAY  *dp;
106          OBJECT  mod[2];
107 <        register MFUNC  *mf;
108 <        register int  i;
107 >        MFUNC  *mf;
108 >        int  i;
109  
110          if (m->oargs.nsargs < 7)
111                  objerror(m, USER, "bad # arguments");
# Line 124 | Line 124 | mx_pdata(                      /* interpolate mixture picture */
124          errno = 0;
125          pt[1] = evalue(mf->ep[0]);      /* y major ordering */
126          pt[0] = evalue(mf->ep[1]);
127 <        if (errno == EDOM || errno == ERANGE)
127 >        if ((errno == EDOM) | (errno == ERANGE))
128                  goto computerr;
129          for (i = 0; i < 3; i++)         /* get pixel from picture */
130                  col[i] = datavalue(dp+i, pt);
131          errno = 0;                      /* evaluate function on pixel */
132          coef = funvalue(m->oargs.sarg[2], 3, col);
133 <        if (errno == EDOM || errno == ERANGE)
133 >        if ((errno == EDOM) | (errno == ERANGE))
134                  goto computerr;
135          if (raymixture(r, mod[0], mod[1], coef)) {
136                  if (m->omod != OVOID)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines