--- ray/src/rt/mx_func.c 1998/08/10 18:35:14 2.4 +++ ray/src/rt/mx_func.c 2014/07/08 18:25:00 2.9 @@ -1,18 +1,15 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: mx_func.c,v 2.9 2014/07/08 18:25:00 greg Exp $"; #endif - /* * mx_func.c - routine for mixture functions. - * - * 11/2/88 */ -#include "ray.h" +#include "copyright.h" +#include "ray.h" #include "func.h" +#include "rtotypes.h" /* * A mixture function is specified: @@ -29,15 +26,17 @@ static char SCCSid[] = "$SunId$ SGI"; */ -mx_func(m, r) /* compute mixture function */ -register OBJREC *m; -RAY *r; +int +mx_func( /* compute mixture function */ + OBJREC *m, + RAY *r +) { OBJECT obj; - register int i; + int i; double coef; OBJECT mod[2]; - register MFUNC *mf; + MFUNC *mf; if (m->oargs.nsargs < 4) objerror(m, USER, "bad # arguments"); @@ -54,7 +53,7 @@ RAY *r; setfunc(m, r); errno = 0; coef = evalue(mf->ep[0]); - if (errno) { + if (errno == EDOM || errno == ERANGE) { objerror(m, WARNING, "compute error"); return(0); }