From 19471275dfd6a8df336612c219d2fa91051003d6 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 9 Feb 2021 09:30:27 -0500 Subject: [PATCH] Added handling of control blocks (.CONTROL ... .ENDC) in ngspice- format files to the SPICE parser, so that netgen can be run directly on a testbench file and not generate errors due to statements in the control block. --- base/spice.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/base/spice.c b/base/spice.c index 0209ded..9f46fdc 100644 --- a/base/spice.c +++ b/base/spice.c @@ -865,6 +865,17 @@ skip_ends: } } + /* Ignore anything in a .CONTROL ... .ENDC block */ + else if (matchnocase(nexttok, ".CONTROL")) { + while (1) { + SpiceSkipNewLine(); + SkipTok(NULL); + if (EndParseFile()) break; + if (matchnocase(nexttok, ".ENDC")) + break; + } + } + // Blackbox (library) mode---parse only subcircuits and models; // ignore all components.