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

Comparing ray/src/common/cone.c (file contents):
Revision 2.2 by greg, Sun Sep 6 11:53:47 1992 UTC vs.
Revision 2.6 by greg, Tue Feb 25 02:47:21 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  cone.c - routines for making cones
9 *
10 *     2/12/86
6   */
7  
8 + #include "copyright.h"
9 +
10   #include  "standard.h"
11  
12   #include  "object.h"
# Line 48 | Line 45 | getcone(o, getxf)                      /* get cone structure */
45   register OBJREC  *o;
46   int  getxf;
47   {
51        extern double  sqrt();
48          int  sgn0, sgn1;
49          register CONE  *co;
50  
# Line 150 | Line 146 | raderr:
146   }
147  
148  
149 + void
150   freecone(o)                     /* free memory associated with cone */
151   OBJREC  *o;
152   {
153          register CONE  *co = (CONE *)o->os;
154  
155 <        if (o->os == NULL)
155 >        if (co == NULL)
156                  return;
157          if (co->tm != NULL)
158 <                free((char *)co->tm);
159 <        free(o->os);
158 >                free((void *)co->tm);
159 >        free((void *)co);
160          o->os = NULL;
161   }
162  
163  
164 + void
165   conexform(co)                   /* get cone transformation matrix */
166   register CONE  *co;
167   {
170        extern double  sqrt();
168          MAT4  m4;
169          register double  d;
170          register int  i;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines