42 |
|
|
43 |
|
static double dvalue(); |
44 |
|
|
45 |
< |
long eclock = -1; /* value storage timer */ |
45 |
> |
unsigned long eclock = 0; /* value storage timer */ |
46 |
|
|
47 |
|
static char context[MAXWORD+1]; /* current context path */ |
48 |
|
|
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)); |
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 |
640 |
|
ep1->sibling->type != NUM) { |
641 |
|
ep1 = newnode(); |
642 |
|
ep1->type = TICK; |
643 |
< |
ep1->v.tick = -1; |
643 |
> |
ep1->v.tick = 0; |
644 |
|
addekid(ep2, ep1); |
645 |
|
ep1 = newnode(); |
646 |
|
ep1->type = NUM; |
701 |
|
if (ep1->type == NUM) |
702 |
|
return(ep1->v.num); /* return if number */ |
703 |
|
ep2 = ep1->sibling; /* check time */ |
704 |
< |
if (ep2->v.tick < 0 || ep2->v.tick < eclock) { |
705 |
< |
ep2->v.tick = d->type == ':' ? 1L<<30 : eclock; |
704 |
> |
if (ep2->v.tick == 0 || ep2->v.tick < eclock) { |
705 |
> |
ep2->v.tick = d->type == ':' ? ~0L : eclock; |
706 |
|
ep2 = ep2->sibling; |
707 |
|
ep2->v.num = evalue(ep1); /* needs new value */ |
708 |
|
} else |