cleanup rem_tlist()
This commit is contained in:
parent
709512f733
commit
9b80badbd0
|
|
@ -1833,19 +1833,9 @@ inp_parse_temper_trees(struct circ *circ)
|
|||
|
||||
/* remove the actual modtlist and devtlist */
|
||||
void
|
||||
rem_tlist(struct circ *circ)
|
||||
rem_tlist(struct pt_temper *p)
|
||||
{
|
||||
struct pt_temper *p;
|
||||
|
||||
for (p = circ->devtlist; p;) {
|
||||
struct pt_temper *next_p = p->next;
|
||||
tfree(p->expression);
|
||||
wl_free(p->wl);
|
||||
INPfreeTree((IFparseTree *) p->pt);
|
||||
tfree(p);
|
||||
p = next_p;
|
||||
}
|
||||
for (p = circ->modtlist; p;) {
|
||||
while (p) {
|
||||
struct pt_temper *next_p = p->next;
|
||||
tfree(p->expression);
|
||||
wl_free(p->wl);
|
||||
|
|
|
|||
|
|
@ -259,7 +259,8 @@ com_remcirc(wordlist *wl)
|
|||
tfree(ft_curckt->ci_name);
|
||||
if (ft_curckt->ci_filename)
|
||||
tfree(ft_curckt->ci_filename);
|
||||
rem_tlist(ft_curckt);
|
||||
rem_tlist(ft_curckt->devtlist);
|
||||
rem_tlist(ft_curckt->modtlist);
|
||||
|
||||
/* delete the actual circuit entry from ft_circuits */
|
||||
for (p = ft_circuits; p; p = p->ci_next) {
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ extern void mc_free(void);
|
|||
void eval_seed_opt(struct line *deck);
|
||||
|
||||
extern char** circarray;
|
||||
extern void rem_tlist(struct circ *curckt);
|
||||
extern void rem_tlist(struct pt_temper *p);
|
||||
|
||||
/* nutinp.c */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue