From 44930ebcb1e26eda8509ab8e797c57e00880f95c Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 24 Jul 2022 12:17:29 +0200 Subject: [PATCH] Function guess_type may yield the wrong type, because it does not cover all of the the many, many options possible. This commit fixes bug597, where [current] was interpreted as capacitance. --- src/frontend/outitf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontend/outitf.c b/src/frontend/outitf.c index 1c778e123..9fbd0b550 100644 --- a/src/frontend/outitf.c +++ b/src/frontend/outitf.c @@ -927,7 +927,9 @@ fileInit(runDesc *run) printf("No. of Data Columns : %d \n", run->numData); } - +/* Trying to guess the type of a vector, using either their special names + or special parameter names for @ vecors. FIXME This guessing may fail + due to the many options, especially for the @ vectors. */ static int guess_type(const char *name) { @@ -951,6 +953,9 @@ guess_type(const char *name) type = SV_RES; else if (cieq(name, "i-sweep")) type = SV_CURRENT; + /* current source ISRC parameters for current */ + else if (substring("@i", name) && (substring("[c]", name) || substring("[dc]", name) || substring("[current]", name))) + type = SV_CURRENT; else if ((*name == '@') && substring("[g", name)) /* token starting with [g */ type = SV_ADMITTANCE; else if ((*name == '@') && substring("[c", name))