From 50045f00af757b81edc5e896c1421c85a8ad3de7 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Thu, 10 Jan 2019 07:52:11 +0100 Subject: [PATCH] add a variable 'nosavecurrents'. If set by 'set nosavecurrents' and followed by 'reset', the setting of internal current vectors is suppressed. This is useful in ac simulation which does not support 'options savecurrents' and you have a mix of several simulations in a script. --- src/frontend/inp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontend/inp.c b/src/frontend/inp.c index e55d3b978..4140070c1 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -1984,6 +1984,9 @@ inp_savecurrents(struct card *deck, struct card *options, wordlist *wl, wordlist if (!options) return wl; + if (cp_getvar("nosavecurrents", CP_BOOL, NULL, 0)) + return wl; + /* search for 'save' command in the .control section */ for (p = controls; p; p = p->wl_next) if(prefix("save", p->wl_word))