From 61e9962939c5c3909f0cb2f9dab755e141e2b603 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 9 Jul 2024 10:10:36 +0200 Subject: [PATCH] Shift evaluation of .four to a position after numparam expansion. --- src/frontend/dotcards.c | 2 +- src/frontend/inp.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontend/dotcards.c b/src/frontend/dotcards.c index 15d1af3ac..cf38028b0 100644 --- a/src/frontend/dotcards.c +++ b/src/frontend/dotcards.c @@ -48,7 +48,7 @@ setcplot(char *name) } -/* All lines with .width, .plot, .print, .save, .op, .meas, .tf +/* All lines with .width, .plot, .print, .save, .op, .meas, .tf, .four have been assembled into a wordlist (wl_first) in inp.c:inp_spsource(), and then stored to ci_commands in inp.c:inp_dodeck(). The .save lines are selected, com_save will put the commands into dbs. diff --git a/src/frontend/inp.c b/src/frontend/inp.c index 0df4e6eaa..bc4cb7025 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -809,7 +809,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile) if (!eq(s, ".plot") && !eq(s, ".print")) inp_casefix(dd->line); if (eq(s, ".width") || - ciprefix(".four", s) || +/* ciprefix(".four", s) || */ eq(s, ".plot") || eq(s, ".print") || /* eq(s, ".save") || add .save only after subcircuit expansion */ @@ -940,7 +940,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile) /* Scan the deck again, now also adding .save commands to wl_first */ for (dd = deck->nextcard; dd; dd = dd->nextcard) { char* curr_line = dd->line; - if (ciprefix(".save", curr_line)) { + if (ciprefix(".save", curr_line) || ciprefix(".four", curr_line)) { wl_append_word(&wl_first, &end, copy(dd->line)); *curr_line = '*'; } @@ -1284,7 +1284,7 @@ int inp_dodeck( struct card *deck, /*in: the spice deck */ char *tt, /*in: the title of the deck */ - wordlist *end, /*in: all lines with .width, .plot, .print, .save, .op, .meas, .tf */ + wordlist *end, /*in: all lines with .width, .plot, .print, .save, .op, .meas, .tf, .four */ bool reuse, /*in: TRUE if called from runcoms2.c com_rset, FALSE if called from inp_spsource() */ struct card *options, /*in: all .option lines from deck */