ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/m_mist.c
(Generate patch)

Comparing ray/src/rt/m_mist.c (file contents):
Revision 2.11 by greg, Tue Feb 25 02:47:22 2003 UTC vs.
Revision 2.14 by schorsch, Sun Jul 27 22:12:03 2003 UTC

# Line 1 | Line 1
1   #ifndef lint
2 < static const char       RCSid[] = "$Id$";
2 > static const char RCSid[] = "$Id";
3   #endif
4   /*
5   * Mist volumetric material.
# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
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   /*
# Line 69 | Line 70 | srcmatch(sp, id)       /* check for an id match on a light s
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])
# Line 176 | Line 176 | register RAY  *r;
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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines