--- ray/src/rt/m_mist.c 2003/02/25 02:47:22 2.11 +++ ray/src/rt/m_mist.c 2003/07/27 22:12:03 2.14 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: m_mist.c,v 2.11 2003/02/25 02:47:22 greg Exp $"; +static const char RCSid[] = "$Id"; #endif /* * Mist volumetric material. @@ -7,8 +7,9 @@ static const char RCSid[] = "$Id: m_mist.c,v 2.11 2003 #include "copyright.h" -#include "ray.h" +#include +#include "ray.h" #include "source.h" /* @@ -69,10 +70,9 @@ srcmatch(sp, id) /* check for an id match on a light s register SRCREC *sp; register char *id; { - extern char *index(); register char *cp; /* check for relay sources */ - while ((cp = index(id, RELAYDELIM)) != NULL) { + while ((cp = strchr(id, RELAYDELIM)) != NULL) { if (!(sp->sflags & SVIRTUAL) || sp->so == NULL) return(0); if (strncmp(id, sp->so->oname, cp-id) || sp->so->oname[cp-id]) @@ -176,7 +176,7 @@ register RAY *r; } else { /* leaving ray */ if (myslist != NULL) { /* delete from list */ for (j = myslist[0]; j > 0; j--) - if (i = inslist(p.slights, myslist[j])) + if ( (i = inslist(p.slights, myslist[j])) ) p.slights[i] = -1; for (i = 0, j = 1; j <= p.slights[0]; j++) if (p.slights[j] != -1)