From 13d31ea7425a070d444e814ff0a708b4dbbe369a Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sun, 7 Aug 2016 18:19:07 +0200 Subject: [PATCH] sharedspice.c, add variable sharedmode, to be used in scripts. Is set active when shared spice is running. --- src/sharedspice.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sharedspice.c b/src/sharedspice.c index d6b73a372..4544f2acc 100644 --- a/src/sharedspice.c +++ b/src/sharedspice.c @@ -587,6 +587,10 @@ ngSpice_Init(SendChar* printfcn, SendStat* statusfcn, ControlledExit* ngspiceexi cp_vset("rndseed", CP_NUM, &ii); com_sseed(NULL); + /* set a boolean variable to be used in .control sections */ + bool sm = TRUE; + cp_vset("sharedmode", CP_BOOL, &sm); + /*parameter fetcher, used in show, alter, altermod */ if_getparam = spif_getparam_special;