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 |
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 |
|
|
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 |
|
} |