1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
248 |
|
freetext(m) /* free text structures associated with m */ |
249 |
|
OBJREC *m; |
250 |
|
{ |
251 |
< |
TEXT *tp; |
252 |
< |
register TLINE *tlp, *tln; |
251 |
> |
register TEXT *tp; |
252 |
> |
register TLINE *tlp; |
253 |
|
|
254 |
|
tp = (TEXT *)m->os; |
255 |
|
if (tp == NULL) |
256 |
|
return; |
257 |
< |
for (tlp = tp->tl.next; tlp != NULL; tlp = tln) { |
258 |
< |
tln = tlp->next; |
257 |
> |
while ((tlp = tp->tl.next) != NULL) { |
258 |
> |
tp->tl.next = tlp->next; |
259 |
|
free((char *)tlp->spc); |
260 |
|
free((char *)tlp); |
261 |
|
} |