32 |
|
#include <ctype.h> |
33 |
|
|
34 |
|
#include "rterror.h" |
35 |
+ |
#include "rtmisc.h" |
36 |
|
#include "calcomp.h" |
37 |
|
|
38 |
|
#ifndef NHASH |
260 |
|
while (*++cp2 && *cp2 != CNTXMARK) |
261 |
|
; |
262 |
|
cp1 = context; /* copy tail to front */ |
263 |
< |
while (*cp1++ = *cp2++) |
263 |
> |
while ( (*cp1++ = *cp2++) ) |
264 |
|
; |
265 |
|
return(context); |
266 |
|
} |
350 |
|
/* if context is global, clear all */ |
351 |
|
for (i = 0; i < NHASH; i++) |
352 |
|
for (vp = hashtbl[i]; vp != NULL; vp = vp->next) |
353 |
< |
if (incontext(vp->name)) |
353 |
> |
if (incontext(vp->name)) { |
354 |
|
if (lvl >= 2) |
355 |
|
dremove(vp->name); |
356 |
|
else |
357 |
|
dclear(vp->name); |
358 |
+ |
} |
359 |
|
if (lvl >= 1) { |
360 |
|
for (ep = outchan; ep != NULL; ep = ep->sibling) |
361 |
|
epfree(ep); |
573 |
|
} else { /* ordinary definition */ |
574 |
|
ep = getdefn(); |
575 |
|
qname = qualname(dname(ep), 0); |
576 |
< |
if (esupport&E_REDEFW && (vdef = varlookup(qname)) != NULL) |
576 |
> |
if (esupport&E_REDEFW && (vdef = varlookup(qname)) != NULL) { |
577 |
|
if (vdef->def != NULL && epcmp(ep, vdef->def)) { |
578 |
|
wputs(qname); |
579 |
|
if (vdef->def->type == ':') |
584 |
|
wputs(qname); |
585 |
|
wputs(": definition hides library function\n"); |
586 |
|
} |
587 |
+ |
} |
588 |
|
if (ep->type == ':') |
589 |
|
dremove(qname); |
590 |
|
else |
708 |
|
if (eclock >= MAXCLOCK) |
709 |
|
eclock = 1; /* wrap clock counter */ |
710 |
|
if (ep2->v.tick < MAXCLOCK && |
711 |
< |
ep2->v.tick == 0 | ep2->v.tick != eclock) { |
711 |
> |
(ep2->v.tick == 0) | (ep2->v.tick != eclock)) { |
712 |
|
ep2->v.tick = d->type == ':' ? MAXCLOCK : eclock; |
713 |
|
ep2 = ep2->sibling; |
714 |
|
ep2->v.num = evalue(ep1); /* needs new value */ |