--- ray/src/rt/p_data.c 1991/11/25 09:50:53 2.2 +++ ray/src/rt/p_data.c 1994/01/12 16:46:48 2.4 @@ -1,4 +1,4 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Copyright (c) 1992 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -78,10 +78,10 @@ RAY *r; if (errno) goto computerr; scalecolor(r->pcol, bval); - return; + return(0); computerr: objerror(m, WARNING, "compute error"); - return; + return(0); } @@ -117,16 +117,18 @@ RAY *r; col[i] = datavalue(dp, pt); } errno = 0; - setcolor(cval, funvalue(m->oargs.sarg[0], 3, col), - funvalue(m->oargs.sarg[1], 3, col), - funvalue(m->oargs.sarg[2], 3, col)); + for (i = 0; i < 3; i++) + if (fundefined(m->oargs.sarg[i]) < 3) + colval(cval,i) = funvalue(m->oargs.sarg[i], 1, col+i); + else + colval(cval,i) = funvalue(m->oargs.sarg[i], 3, col); if (errno) goto computerr; multcolor(r->pcol, cval); - return; + return(0); computerr: objerror(m, WARNING, "compute error"); - return; + return(0); } @@ -154,15 +156,17 @@ RAY *r; for (i = 0; i < 3; i++) col[i] = datavalue(dp+i, pt); errno = 0; - setcolor(cval, funvalue(m->oargs.sarg[0], 3, col), - funvalue(m->oargs.sarg[1], 3, col), - funvalue(m->oargs.sarg[2], 3, col)); + for (i = 0; i < 3; i++) + if (fundefined(m->oargs.sarg[i]) < 3) + colval(cval,i) = funvalue(m->oargs.sarg[i], 1, col+i); + else + colval(cval,i) = funvalue(m->oargs.sarg[i], 3, col); if (errno) goto computerr; multcolor(r->pcol, cval); - return; + return(0); computerr: objerror(m, WARNING, "compute error"); - return; + return(0); }