1 |
– |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ SGI"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* mx_data.c - routine for stored mixtures. |
9 |
– |
* |
10 |
– |
* 11/2/88 |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#include "copyright.h" |
9 |
+ |
|
10 |
|
#include "ray.h" |
11 |
|
|
12 |
|
#include "data.h" |
72 |
|
errno = 0; |
73 |
|
for (i = 0; i < dp->nd; i++) { |
74 |
|
pt[i] = evalue(mf->ep[i]); |
75 |
< |
if (errno) |
75 |
> |
if (errno == EDOM || errno == ERANGE) |
76 |
|
goto computerr; |
77 |
|
} |
78 |
|
coef = datavalue(dp, pt); |
79 |
|
errno = 0; |
80 |
|
coef = funvalue(m->oargs.sarg[2], 1, &coef); |
81 |
< |
if (errno) |
81 |
> |
if (errno == EDOM || errno == ERANGE) |
82 |
|
goto computerr; |
83 |
|
if (raymixture(r, mod[0], mod[1], coef)) { |
84 |
|
if (m->omod != OVOID) |
121 |
|
errno = 0; |
122 |
|
pt[1] = evalue(mf->ep[0]); /* y major ordering */ |
123 |
|
pt[0] = evalue(mf->ep[1]); |
124 |
< |
if (errno) |
124 |
> |
if (errno == EDOM || errno == ERANGE) |
125 |
|
goto computerr; |
126 |
|
for (i = 0; i < 3; i++) /* get pixel from picture */ |
127 |
|
col[i] = datavalue(dp+i, pt); |
128 |
|
errno = 0; /* evaluate function on pixel */ |
129 |
|
coef = funvalue(m->oargs.sarg[2], 3, col); |
130 |
< |
if (errno) |
130 |
> |
if (errno == EDOM || errno == ERANGE) |
131 |
|
goto computerr; |
132 |
|
if (raymixture(r, mod[0], mod[1], coef)) { |
133 |
|
if (m->omod != OVOID) |