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

Comparing ray/src/rt/freeobjmem.c (file contents):
Revision 2.2 by greg, Wed Feb 10 12:51:40 1993 UTC vs.
Revision 2.5 by greg, Tue Feb 25 02:47:22 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   * Free memory associated with object(s)
6 + *
7 + * External symbols declared in ray.h
8   */
9  
10 < #include "standard.h"
11 < #include "object.h"
10 > #include "copyright.h"
11 >
12 > #include "ray.h"
13   #include "otypes.h"
14 + #include "face.h"
15 + #include "cone.h"
16 + #include "instance.h"
17 + #include "data.h"
18 + #include "font.h"
19  
20  
21   int
# Line 43 | Line 48 | register OBJREC        *op;
48                  freetext(op);
49                  return(1);
50          case MAT_CLIP:          /* clipping surface */
51 <                free(op->os);
51 >        case MAT_SPOT:          /* spot light source */
52 >                free((void *)op->os);
53                  op->os = NULL;
54                  return(1);
55 <        case MAT_SPOT:          /* spot light source */
50 <                return(0);
51 <        default:
55 >        }
56   #ifdef DEBUG
57 <                objerror(op, WARNING, "cannot free structure");
57 >        objerror(op, WARNING, "cannot free structure");
58   #endif
59 <                return(0);
56 <        }
59 >        return(0);
60   }
61  
62  
# Line 74 | Line 77 | OBJECT no;
77   }
78  
79  
80 + void
81   free_objmem()                   /* free all object cache memory */
82   {
83          free_objs(0, nobjects);
84          freedata(NULL);
81        freepict(NULL);
85          freefont(NULL);
86   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines