From d165329dca204e48b3af6b8cd800208b1c97fbbc Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 10 May 2025 23:07:38 +0200 Subject: [PATCH] Enable parsing of the G poly source with extra parameters (e.g. m=2) by just cutting them off. FIXME: to be added later, probaly in the code model. --- src/xspice/enh/enhtrans.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/xspice/enh/enhtrans.c b/src/xspice/enh/enhtrans.c index 5e2bf8339..4cb1e7fe8 100644 --- a/src/xspice/enh/enhtrans.c +++ b/src/xspice/enh/enhtrans.c @@ -298,6 +298,7 @@ static char *two2three_translate( char **out_conn; char **in_conn; char **coef; + char* multibeg, *multiend, *val; char *card; @@ -310,6 +311,20 @@ static char *two2three_translate( /* Put the first character into local storage for checking type */ type = *orig_card; + /* There may be a multiplier m=val + Remove it here, add it later */ + multibeg = strstr(orig_card, " m="); + if (multibeg) { + *multibeg = '\0'; + /* + multiend = multibeg + 3; + while (*multiend == ' ') + multiend++; + while (*multiend && *multiend != ' ') + multiend++; + */ + } + /* Count the number of tokens for use in parsing */ num_tokens = count_tokens(orig_card);