Don't say 'issue in line no. 0', as this 'info' does not tell

where the line with position 0 really is in the input deck.
This commit is contained in:
Holger Vogt 2023-10-09 23:19:30 +02:00
parent 7c3cb8169c
commit 9edf34495e
1 changed files with 8 additions and 2 deletions

View File

@ -1353,8 +1353,14 @@ inp_dodeck(
if (p == dd->error) {
if (strstr(dd->line, ".model"))
fprintf(stderr, "Warning: Model issue on line %d :\n %.*s ...\n%s\n",
dd->linenum_orig, 72, dd->line, dd->error);
if (dd->linenum_orig == 0) { /* new line, e.g. in subcircuit */
fprintf(stderr, "Warning: Model issue on line:\n %.*s ...\n%s\n",
72, dd->line, dd->error);
}
else {
fprintf(stderr, "Warning: Model issue on line %d :\n %.*s ...\n%s\n",
dd->linenum_orig, 72, dd->line, dd->error);
}
else if (dd->linenum_orig == 0) {
fprintf(stderr, "Error on line:\n %s\n%s\n",
dd->line, dd->error);