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.8 by greg, Fri Feb 17 18:34:42 1995 UTC vs.
Revision 2.10 by greg, Wed Jan 8 17:10:24 1997 UTC

# Line 55 | Line 55 | static EPNODE  *outchan;
55   #endif
56  
57   #ifdef  FUNCTION
58 < EPNODE  *curfunc;
58 > EPNODE  *curfunc = NULL;
59   #define  dname(ep)      ((ep)->v.kid->type == SYM ? \
60                          (ep)->v.kid->v.name : \
61                          (ep)->v.kid->v.kid->v.name)
# Line 299 | Line 299 | toolong:
299   incontext(qn)                   /* is qualified name in current context? */
300   register char  *qn;
301   {
302 +    if (!context[0])                    /* global context accepts all */
303 +        return(1);
304      while (*qn && *qn != CNTXMARK)      /* find context mark */
305          qn++;
306      return(!strcmp(qn, context));
# Line 327 | Line 329 | int  lvl;
329                                  /* if context is global, clear all */
330      for (i = 0; i < NHASH; i++)
331          for (vp = hashtbl[i]; vp != NULL; vp = vp->next)
332 <            if (!context[0] || incontext(vp->name))
332 >            if (incontext(vp->name))
333                  if (lvl >= 2)
334                      dremove(vp->name);
335                  else
# Line 618 | Line 620 | getdefn()                      /* A -> SYM = E1 */
620              syntax("')' expected");
621          scan();
622          curfunc = ep1;
623 <    } else
622 <        curfunc = NULL;
623 >    }
624   #endif
625  
626      if (nextc != '=' && nextc != ':')
# Line 644 | Line 645 | getdefn()                      /* A -> SYM = E1 */
645          ep1->type = NUM;
646          addekid(ep2, ep1);
647      }
648 +
649 + #ifdef  FUNCTION
650 +    curfunc = NULL;
651 + #endif
652  
653      return(ep2);
654   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines