From 13bb4cac77db1c16c9801586aacabe15a93c915e Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 10 Mar 2018 13:50:20 +0100 Subject: [PATCH] spicelib/devices/{sw,csw}, #9/, cleanup, rename missleading zero_stateGiven --- src/spicelib/devices/csw/cswdefs.h | 2 +- src/spicelib/devices/csw/cswload.c | 2 +- src/spicelib/devices/csw/cswparam.c | 4 ++-- src/spicelib/devices/sw/swdefs.h | 2 +- src/spicelib/devices/sw/swload.c | 2 +- src/spicelib/devices/sw/swparam.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/spicelib/devices/csw/cswdefs.h b/src/spicelib/devices/csw/cswdefs.h index d48bc622d..2fdf0a5fd 100644 --- a/src/spicelib/devices/csw/cswdefs.h +++ b/src/spicelib/devices/csw/cswdefs.h @@ -44,7 +44,7 @@ typedef struct sCSWinstance { double CSWcond; /* current conductance of switch */ - unsigned CSWzero_stateGiven : 1; /* flag to indicate initial state */ + unsigned CSWzero_state : 1; /* flag to indicate initial state */ #ifndef NONOISE double CSWnVar[NSTATVARS]; #else diff --git a/src/spicelib/devices/csw/cswload.c b/src/spicelib/devices/csw/cswload.c index 83343d081..3e7969394 100644 --- a/src/spicelib/devices/csw/cswload.c +++ b/src/spicelib/devices/csw/cswload.c @@ -47,7 +47,7 @@ CSWload(GENmodel *inModel, CKTcircuit *ckt) if (ckt->CKTmode & (MODEINITFIX | MODEINITJCT)) { - if (here->CSWzero_stateGiven) { + if (here->CSWzero_state) { /* switch specified "on" */ if (i_ctrl > model->CSWiThreshold + fabs(model->CSWiHysteresis)) current_state = REALLY_ON; diff --git a/src/spicelib/devices/csw/cswparam.c b/src/spicelib/devices/csw/cswparam.c index b52f1419c..287deac2b 100644 --- a/src/spicelib/devices/csw/cswparam.c +++ b/src/spicelib/devices/csw/cswparam.c @@ -23,11 +23,11 @@ CSWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) break; case CSW_IC_ON: if (value->iValue) - here->CSWzero_stateGiven = TRUE; + here->CSWzero_state = TRUE; break; case CSW_IC_OFF: if (value->iValue) - here->CSWzero_stateGiven = FALSE; + here->CSWzero_state = FALSE; break; default: return E_BADPARM; diff --git a/src/spicelib/devices/sw/swdefs.h b/src/spicelib/devices/sw/swdefs.h index 38d865431..f9829912d 100644 --- a/src/spicelib/devices/sw/swdefs.h +++ b/src/spicelib/devices/sw/swdefs.h @@ -43,7 +43,7 @@ typedef struct sSWinstance { double SWcond; /* conductance of the switch now */ - unsigned SWzero_stateGiven : 1; /* flag to indicate initial state */ + unsigned SWzero_state : 1; /* flag to indicate initial state */ #ifndef NONOISE double SWnVar[NSTATVARS]; #else diff --git a/src/spicelib/devices/sw/swload.c b/src/spicelib/devices/sw/swload.c index c4f9ec047..db208cc5d 100644 --- a/src/spicelib/devices/sw/swload.c +++ b/src/spicelib/devices/sw/swload.c @@ -49,7 +49,7 @@ SWload(GENmodel *inModel, CKTcircuit *ckt) if (ckt->CKTmode & (MODEINITFIX | MODEINITJCT)) { - if (here->SWzero_stateGiven) { + if (here->SWzero_state) { /* switch specified "on" */ if (v_ctrl > model->SWvThreshold + fabs(model->SWvHysteresis)) current_state = REALLY_ON; diff --git a/src/spicelib/devices/sw/swparam.c b/src/spicelib/devices/sw/swparam.c index dd1bd9d0c..b9dcb5cd1 100644 --- a/src/spicelib/devices/sw/swparam.c +++ b/src/spicelib/devices/sw/swparam.c @@ -20,11 +20,11 @@ SWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) switch (param) { case SW_IC_ON: if (value->iValue) - here->SWzero_stateGiven = TRUE; + here->SWzero_state = TRUE; break; case SW_IC_OFF: if (value->iValue) - here->SWzero_stateGiven = FALSE; + here->SWzero_state = FALSE; break; default: return E_BADPARM;