From 69b235531eb5be1d0eb92d83452475e7cfd84fb6 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sun, 7 Aug 2016 18:19:07 +0200 Subject: [PATCH] sharedspice.c, introduce csh variable "sharedmode" to reflect whether running as shared library --- src/sharedspice.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sharedspice.c b/src/sharedspice.c index 77c0a5824..736b553cd 100644 --- a/src/sharedspice.c +++ b/src/sharedspice.c @@ -583,6 +583,10 @@ ngSpice_Init(SendChar* printfcn, SendStat* statusfcn, ControlledExit* ngspiceexi srand((unsigned int) getpid()); TausSeed(); + /* 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;