From 621918f2893c7f30e5cbbd3742c08764d2d834d1 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 18 May 2024 23:08:13 +0200 Subject: [PATCH] Transform nested braces {{}} into {()} also in .param statements (See TI PSPICE model for LMR33630). --- src/frontend/inpcompat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/inpcompat.c b/src/frontend/inpcompat.c index 503d190d1..bbdc2a9fa 100644 --- a/src/frontend/inpcompat.c +++ b/src/frontend/inpcompat.c @@ -377,7 +377,7 @@ static bool del_models(struct vsmodels *vsmodel) } /* Check for double '{', replace the inner '{', '}' by '(', ')' - in .subckt or .model (which both may stem from external sources) */ + in .subckt, .model, or .param (which all three may stem from external sources) */ static void rem_double_braces(struct card* newcard) { struct card* card; @@ -389,7 +389,7 @@ static void rem_double_braces(struct card* newcard) slevel++; else if (ciprefix(".ends", cut_line)) slevel--; - if (ciprefix(".model", cut_line) || slevel > 0) { + if (ciprefix(".model", cut_line) || slevel > 0 || ciprefix(".param", cut_line)) { cut_line = strchr(cut_line, '{'); if (cut_line) { int level = 1;