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.
This commit is contained in:
Holger Vogt 2019-01-10 07:52:11 +01:00
parent ac0a67eba1
commit 50045f00af
1 changed files with 3 additions and 0 deletions

View File

@ -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))