From aa25ec7f7c8caea83a6fdc692457597515cfe561 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 26 Sep 2020 11:31:19 +0200 Subject: [PATCH] Improve on commit d6aa22e5 from 09.09.2020 Warning message only when 'set ngdebug' and instance or model line vectors read in do not have enclosing parens. Both vectors with or without enclosing parens are allowed. --- src/spicelib/parser/inpgval.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/spicelib/parser/inpgval.c b/src/spicelib/parser/inpgval.c index 3f1a22854..249020719 100644 --- a/src/spicelib/parser/inpgval.c +++ b/src/spicelib/parser/inpgval.c @@ -51,8 +51,8 @@ INPgetValue(CKTcircuit *ckt, char **line, int type, INPtables *tab) list[temp.v.numValue - 1] = tmp; tmp = INPevaluate(line, &error, 1); } - if (error && !eq(*line, "") && !prefix(")", *line)) { - fprintf(stderr, "\nWarning: Could not read parameter from \n%s\nat\n", compline); + if (error && ft_ngdebug && !eq(*line, "") && !prefix(")", *line)) { + fprintf(stderr, "\nWarning: Reading a vector without limiting parens may be dangerous\n%s\nat\n", compline); fprintf(stderr, "%*s%s\n", *line - compline," ", *line); } temp.v.vec.rVec = list; @@ -74,8 +74,8 @@ INPgetValue(CKTcircuit *ckt, char **line, int type, INPtables *tab) ilist[temp.v.numValue - 1] = (int) floor(0.5 + tmp); tmp = INPevaluate(line, &error, 1); } - if (error && !eq(*line, "") && !prefix(")", *line)) { - fprintf(stderr, "\nWarning: Could not read parameter from \n%s\nat\n", compline); + if (error && ft_ngdebug && !eq(*line, "") && !prefix(")", *line)) { + fprintf(stderr, "\nWarning: Reading a vector without limiting parens may be dangerous\n%s\nat\n", compline); fprintf(stderr, "%*s%s\n", *line - compline, " ", *line); } temp.v.vec.iVec = ilist;