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

Comparing ray/src/common/caldefn.c (file contents):
Revision 1.8 by greg, Tue Apr 23 12:59:33 1991 UTC vs.
Revision 1.9 by greg, Wed Apr 24 08:17:22 1991 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1991 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 185 | Line 185 | int  (*cs)();
185   #endif
186  
187  
188 < dclearall()                     /* clear all definitions */
188 > dcleanup(cons, ochans)          /* clear definitions */
189 > int  cons, ochans;
190   {
191      register int  i;
192      register VARDEF  *vp;
# Line 193 | Line 194 | dclearall()                    /* clear all definitions */
194  
195      for (i = 0; i < NHASH; i++)
196          for (vp = hashtbl[i]; vp != NULL; vp = vp->next)
197 <            dremove(vp->name);
197 >            if (cons)
198 >                dremove(vp->name);
199 >            else
200 >                dclear(vp->name);
201   #ifdef  OUTCHAN
202 <    for (ep = outchan; ep != NULL; ep = ep->sibling)
203 <        epfree(ep);
204 <    outchan = NULL;
202 >    if (ochans) {
203 >        for (ep = outchan; ep != NULL; ep = ep->sibling)
204 >            epfree(ep);
205 >        outchan = NULL;
206 >    }
207   #endif
208   }
209  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines