1 |
< |
/* Copyright (c) 1988 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1990 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
66 |
|
error(SYSTEM, "out of memory in getinstance"); |
67 |
|
if (o->oargs.nsargs < 1) |
68 |
|
objerror(o, USER, "bad # of arguments"); |
69 |
< |
if (xf(in->f.xfm, &in->f.sca, o->oargs.nsargs-1, |
69 |
> |
if (fullxf(&in->x, o->oargs.nsargs-1, |
70 |
|
o->oargs.sarg+1) != o->oargs.nsargs-1) |
71 |
|
objerror(o, USER, "bad transform"); |
72 |
< |
if (in->f.sca < 0.0) |
73 |
< |
in->f.sca = -in->f.sca; |
74 |
< |
invxf(in->b.xfm, &in->b.sca,o->oargs.nsargs-1,o->oargs.sarg+1); |
75 |
< |
if (in->b.sca < 0.0) |
76 |
< |
in->b.sca = -in->b.sca; |
72 |
> |
if (in->x.f.sca < 0.0) |
73 |
> |
in->x.f.sca = -in->x.f.sca; |
74 |
> |
if (in->x.b.sca < 0.0) |
75 |
> |
in->x.b.sca = -in->x.b.sca; |
76 |
|
in->obj = NULL; |
77 |
|
o->os = (char *)in; |
78 |
|
} |
79 |
|
if (in->obj == NULL || (in->obj->ldflags & flags) != flags) |
80 |
|
in->obj = getscene(o->oargs.sarg[0], flags); |
81 |
|
return(in); |
82 |
+ |
} |
83 |
+ |
|
84 |
+ |
|
85 |
+ |
freeinstance(o) /* free memory associated with instance */ |
86 |
+ |
OBJREC *o; |
87 |
+ |
{ |
88 |
+ |
if (o->os == NULL) |
89 |
+ |
return; |
90 |
+ |
free(o->os); |
91 |
+ |
o->os = NULL; |
92 |
|
} |