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

Comparing ray/src/rt/srcsupp.c (file contents):
Revision 1.1 by greg, Thu Jun 20 13:44:36 1991 UTC vs.
Revision 1.2 by greg, Thu Jun 20 16:36:46 1991 UTC

# Line 44 | Line 44 | initstypes()                   /* initialize source dispatch table */
44   }
45  
46  
47 < SRCREC *
47 > int
48   newsource()                     /* allocate new source in our array */
49   {
50          if (nsources == 0)
# Line 53 | Line 53 | newsource()                    /* allocate new source in our array */
53                  source = (SRCREC *)realloc((char *)source,
54                                  (unsigned)(nsources+1)*sizeof(SRCREC));
55          if (source == NULL)
56 <                return(NULL);
56 >                return(-1);
57          source[nsources].sflags = 0;
58          source[nsources].nhits = 1;
59          source[nsources].ntests = 2;    /* initial hit probability = 1/2 */
60 <        return(&source[nsources++]);
60 >        return(nsources++);
61   }
62  
63  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines