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 2.36 by greg, Tue Sep 26 18:33:14 2023 UTC vs.
Revision 2.37 by greg, Sun Oct 1 18:02:23 2023 UTC

# Line 175 | Line 175 | dclear(                        /* delete variable definitions of name */
175          char  *name
176   )
177   {
178 <    EPNODE  *ep;
178 >    VARDEF  *vp;
179 >    EPNODE  *dp;
180  
181 <    while ((ep = dpop(name)) != NULL) {
182 <        if (ep->type == ':') {
183 <            dpush(name, ep);            /* don't clear constants */
184 <            return;
185 <        }
185 <        epfree(ep);
181 >    while ((vp = varlookup(name)) != NULL &&
182 >                (dp = vp->def) != NULL && dp->type == '=') {
183 >        vp->def = dp->sibling;
184 >        epfree(dp);
185 >        varfree(vp);
186      }
187   }
188  
# Line 318 | Line 318 | qualname(              /* get qualified name */
318          while (*++cpp && *cpp != CNTXMARK)
319              ;
320      }
321 <    while (*cpp) {              /* copy context to static buffer */
321 >    while (*cpp) {              /* add remaining context to name */
322          if (cp >= nambuf+RMAXWORD)
323              goto toolong;
324          *cp++ = *cpp++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines