--- ray/src/rt/t_func.c 1994/01/12 16:46:54 2.3 +++ ray/src/rt/t_func.c 2004/03/30 16:13:01 2.7 @@ -1,18 +1,15 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: t_func.c,v 2.7 2004/03/30 16:13:01 schorsch Exp $"; #endif - /* * t_func.c - routine for procedural textures. - * - * 4/8/86 */ -#include "ray.h" +#include "copyright.h" +#include "ray.h" #include "func.h" +#include "rtotypes.h" /* * A procedural texture perturbs the surface normal @@ -31,9 +28,11 @@ static char SCCSid[] = "$SunId$ LBL"; */ -t_func(m, r) /* compute texture for ray */ -register OBJREC *m; -register RAY *r; +extern int +t_func( /* compute texture for ray */ + register OBJREC *m, + register RAY *r +) { FVECT disp; double d; @@ -47,7 +46,7 @@ register RAY *r; errno = 0; for (i = 0; i < 3; i++) { disp[i] = evalue(mf->ep[i]); - if (errno) { + if (errno == EDOM || errno == ERANGE) { objerror(m, WARNING, "compute error"); return(0); }