| 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"; |
| 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; |
| 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 |
|
|