1 |
– |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* p_func.c - routine for procedural patterns. |
9 |
– |
* |
10 |
– |
* 4/8/86 |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#include "copyright.h" |
9 |
+ |
|
10 |
|
#include "ray.h" |
11 |
|
|
12 |
|
#include "func.h" |
47 |
|
setfunc(m, r); |
48 |
|
errno = 0; |
49 |
|
bval = evalue(mf->ep[0]); |
50 |
< |
if (errno) { |
50 |
> |
if (errno == EDOM || errno == ERANGE) { |
51 |
|
objerror(m, WARNING, "compute error"); |
52 |
< |
return; |
52 |
> |
return(0); |
53 |
|
} |
54 |
|
scalecolor(r->pcol, bval); |
55 |
+ |
return(0); |
56 |
|
} |
57 |
|
|
58 |
|
|
71 |
|
setcolor(cval, evalue(mf->ep[0]), |
72 |
|
evalue(mf->ep[1]), |
73 |
|
evalue(mf->ep[2])); |
74 |
< |
if (errno) { |
74 |
> |
if (errno == EDOM || errno == ERANGE) { |
75 |
|
objerror(m, WARNING, "compute error"); |
76 |
< |
return; |
76 |
> |
return(0); |
77 |
|
} |
78 |
|
multcolor(r->pcol, cval); |
79 |
+ |
return(0); |
80 |
|
} |