Browse Source

re-number the lines during copying,

required by nupa_copy()
pre-master-46
Holger Vogt 8 years ago
parent
commit
2dfdf984d6
  1. 5
      src/frontend/subckt.c

5
src/frontend/subckt.c

@ -728,7 +728,7 @@ struct card *
inp_deckcopy_oc(struct card *deck) inp_deckcopy_oc(struct card *deck)
{ {
struct card *d = NULL, *nd = NULL; struct card *d = NULL, *nd = NULL;
int skip_control = 0;
int skip_control = 0, i = 0;
while (deck) { while (deck) {
/* exclude any command inside .control ... .endc */ /* exclude any command inside .control ... .endc */
@ -753,7 +753,8 @@ inp_deckcopy_oc(struct card *deck)
else { else {
nd = d = TMALLOC(struct card, 1); nd = d = TMALLOC(struct card, 1);
} }
d->linenum = deck->linenum;
d->linenum_orig = deck->linenum;
d->linenum = i++;
d->line = copy(deck->line); d->line = copy(deck->line);
if (deck->error) if (deck->error)
d->error = copy(deck->error); d->error = copy(deck->error);

Loading…
Cancel
Save