Browse Source

Write message only once.

pre-master-46
Holger Vogt 2 years ago
parent
commit
1db8eff25c
  1. 9
      src/frontend/inpcom.c

9
src/frontend/inpcom.c

@ -8351,6 +8351,7 @@ static void inp_check_syntax(struct card *deck)
bool mwarn = FALSE; bool mwarn = FALSE;
char* subs[10]; /* store subckt lines */ char* subs[10]; /* store subckt lines */
int ends = 0; /* store .ends line numbers */ int ends = 0; /* store .ends line numbers */
static bool nesting_once = TRUE;
/* prevent crash in inp.c, fcn inp_spsource: */ /* prevent crash in inp.c, fcn inp_spsource: */
if (ciprefix(".param", deck->line) || ciprefix(".meas", deck->line)) { if (ciprefix(".param", deck->line) || ciprefix(".meas", deck->line)) {
@ -8423,10 +8424,12 @@ static void inp_check_syntax(struct card *deck)
} }
} }
// nesting may be critical if params are involved // nesting may be critical if params are involved
if (check_subs > 0 && strchr(cut_line, '='))
if (nesting_once && check_subs > 0 && strchr(cut_line, '=')) {
fprintf(cp_err, fprintf(cp_err,
"\nWarning: Nesting of subcircuits with parameters "
"is only marginally supported!\n\n");
"\nWarning: Nesting of subcircuits with parameters "
"is only marginally supported!\n\n");
nesting_once = FALSE;
}
if (check_subs < 10) if (check_subs < 10)
subs[check_subs] = cut_line; subs[check_subs] = cut_line;
else else

Loading…
Cancel
Save