Handle .if ... .else ... .endif before .csparam is executed,

thus allowing parameter entry to .control section being dependent
on .if
This commit is contained in:
Holger Vogt 2022-07-24 15:54:29 +02:00
parent 09e48350eb
commit 0b3383546c
1 changed files with 4 additions and 3 deletions

View File

@ -882,6 +882,10 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
else
fprintf(stderr, "Warning: Cannot open file debug-out2.txt for saving debug info\n");
}
/* handle .if ... .elseif ... .else ... .endif statements. */
dotifeval(deck);
for (dd = deck; dd; dd = dd->nextcard) {
/* get csparams and create vectors, being
available in .control section, in plot 'const' */
@ -902,9 +906,6 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
}
}
/* handle .if ... .elseif ... .else ... .endif statements. */
dotifeval(deck);
/* merge the two option line structs
com_options (comfile == TRUE, filled in from spinit, .spiceinit, and *ng_sript), and
options (comfile == FALSE, filled in from circuit with .OPTIONS)