1 |
|
#ifndef lint |
2 |
< |
static const char RCSid[] = "$Id$"; |
2 |
> |
static const char RCSid[] = "$Id"; |
3 |
|
#endif |
4 |
|
/* |
5 |
|
* Mist volumetric material. |
7 |
|
|
8 |
|
#include "copyright.h" |
9 |
|
|
10 |
< |
#include "ray.h" |
10 |
> |
#include <string.h> |
11 |
|
|
12 |
+ |
#include "ray.h" |
13 |
|
#include "source.h" |
14 |
|
|
15 |
|
/* |
70 |
|
register SRCREC *sp; |
71 |
|
register char *id; |
72 |
|
{ |
72 |
– |
extern char *index(); |
73 |
|
register char *cp; |
74 |
|
/* check for relay sources */ |
75 |
< |
while ((cp = index(id, RELAYDELIM)) != NULL) { |
75 |
> |
while ((cp = strchr(id, RELAYDELIM)) != NULL) { |
76 |
|
if (!(sp->sflags & SVIRTUAL) || sp->so == NULL) |
77 |
|
return(0); |
78 |
|
if (strncmp(id, sp->so->oname, cp-id) || sp->so->oname[cp-id]) |
176 |
|
} else { /* leaving ray */ |
177 |
|
if (myslist != NULL) { /* delete from list */ |
178 |
|
for (j = myslist[0]; j > 0; j--) |
179 |
< |
if (i = inslist(p.slights, myslist[j])) |
179 |
> |
if ( (i = inslist(p.slights, myslist[j])) ) |
180 |
|
p.slights[i] = -1; |
181 |
|
for (i = 0, j = 1; j <= p.slights[0]; j++) |
182 |
|
if (p.slights[j] != -1) |