Browse Source

inpcom.c, introduce rem_tlist()

pre-master-46
rlar 9 years ago
parent
commit
e35429a222
  1. 14
      src/frontend/inp.c
  2. 2
      src/frontend/runcoms2.c
  3. 1
      src/include/ngspice/fteext.h

14
src/frontend/inp.c

@ -1589,6 +1589,20 @@ inp_parse_temper_trees(struct circ *circ)
} }
void
rem_tlist(struct pt_temper *p)
{
while (p) {
struct pt_temper *next_p = p->next;
tfree(p->expression);
wl_free(p->wl);
INPfreeTree((IFparseTree *) p->pt);
tfree(p);
p = next_p;
}
}
void void
inp_evaluate_temper(struct circ *circ) inp_evaluate_temper(struct circ *circ)
{ {

2
src/frontend/runcoms2.c

@ -257,6 +257,8 @@ com_remcirc(wordlist *wl)
tfree(ft_curckt->ci_name); tfree(ft_curckt->ci_name);
if (ft_curckt->ci_filename) if (ft_curckt->ci_filename)
tfree(ft_curckt->ci_filename); tfree(ft_curckt->ci_filename);
rem_tlist(ft_curckt->devtlist);
rem_tlist(ft_curckt->modtlist);
/* delete the actual circuit entry from ft_circuits */ /* delete the actual circuit entry from ft_circuits */
for (p = ft_circuits; p; p = p->ci_next) { for (p = ft_circuits; p; p = p->ci_next) {

1
src/include/ngspice/fteext.h

@ -219,6 +219,7 @@ extern struct line *line_nconc(struct line *head, struct line *rest);
extern struct line *line_reverse(struct line *head); extern struct line *line_reverse(struct line *head);
extern char **circarray; extern char **circarray;
extern void rem_tlist(struct pt_temper *p);
/* nutinp.c */ /* nutinp.c */

Loading…
Cancel
Save