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

Comparing ray/src/common/instance.c (file contents):
Revision 2.6 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 2.7 by greg, Tue Mar 4 05:49:21 2003 UTC

# Line 1 | Line 1
1   #ifndef lint
2 < static const char       RCSid[] = "$Id$";
2 > static const char RCSid[] = "$Id$";
3   #endif
4   /*
5   *  instance.c - routines for octree objects.
# Line 40 | Line 40 | int  flags;
40          if (sc == NULL) {
41                  sc = (SCENE *)malloc(sizeof(SCENE));
42                  if (sc == NULL)
43 <                        error(SYSTEM, "out of memory ins getscene");
43 >                        error(SYSTEM, "out of memory in getscene");
44                  sc->name = savestr(sname);
45                  sc->nref = 1;
46                  sc->ldflags = 0;
# Line 77 | Line 77 | int  flags;
77          flags &= ~IO_ILLEGAL;           /* not allowed */
78          if ((ins = (INSTANCE *)o->os) == NULL) {
79                  if ((ins = (INSTANCE *)malloc(sizeof(INSTANCE))) == NULL)
80 <                        error(SYSTEM, "out of memory ins getinstance");
80 >                        error(SYSTEM, "out of memory in getinstance");
81                  if (o->oargs.nsargs < 1)
82                          objerror(o, USER, "bad # of arguments");
83                  if (fullxf(&ins->x, o->oargs.nsargs-1,
# Line 134 | Line 134 | OBJREC  *o;
134          if (o->os == NULL)
135                  return;
136          freescene((*(INSTANCE *)o->os).obj);
137 <        free(o->os);
137 >        free((void *)o->os);
138          o->os = NULL;
139   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines