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

Comparing ray/src/common/face.c (file contents):
Revision 1.2 by greg, Tue Feb 21 14:39:54 1989 UTC vs.
Revision 1.4 by greg, Wed Jul 17 14:10:13 1991 UTC

# Line 51 | Line 51 | OBJREC  *o;
51          if (o->oargs.nfargs < 9 || o->oargs.nfargs % 3)
52                  objerror(o, USER, "bad # arguments");
53  
54 +        o->os = (char *)f;                      /* save face */
55 +
56          f->va = o->oargs.farg;
57          f->nv = o->oargs.nfargs / 3;
58                                                  /* compute area and normal */
# Line 90 | Line 92 | OBJREC  *o;
92          if (fabs(f->norm[2]) > fabs(f->norm[f->ax]))
93                  f->ax = 2;
94  
93        o->os = (char *)f;                      /* save face */
95          return(f);
96   }
97  
# Line 98 | Line 99 | OBJREC  *o;
99   freeface(o)                     /* free memory associated with face */
100   OBJREC  *o;
101   {
102 +        if (o->os == NULL)
103 +                return;
104          free(o->os);
105          o->os = NULL;
106   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines