Browse Source

subckt.c, cleanup `doit()'

pre-master-46
rlar 12 years ago
parent
commit
650352e3e8
  1. 12
      src/frontend/subckt.c

12
src/frontend/subckt.c

@ -458,11 +458,6 @@ doit(struct line *deck, wordlist *modnames) {
/* c points to the opening .subckt card */ /* c points to the opening .subckt card */
/* ends points to the terminating .ends card */ /* ends points to the terminating .ends card */
/* cut the whole .subckt ... .ends sequence from the deck chain */
if (prev_of_c)
prev_of_c->li_next = ends->li_next;
else
deck = ends->li_next;
/* Now put the .subckt definition found into sss */ /* Now put the .subckt definition found into sss */
@ -494,9 +489,16 @@ doit(struct line *deck, wordlist *modnames) {
sss->su_next = subs; sss->su_next = subs;
subs = sss; subs = sss;
/* cut the whole .subckt ... .ends sequence from the deck chain */
line_free_x(c, FALSE); line_free_x(c, FALSE);
c = ends->li_next; c = ends->li_next;
if (prev_of_c)
prev_of_c->li_next = ends->li_next;
else
deck = ends->li_next;
if (use_numparams == FALSE) { if (use_numparams == FALSE) {
line_free_x(ends, FALSE); /* drop the .ends card */ line_free_x(ends, FALSE); /* drop the .ends card */
prev_of_ends->li_next = NULL; prev_of_ends->li_next = NULL;

Loading…
Cancel
Save