From c25aea68151d0445645cd321996c4e904aa10154 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 11 Feb 2018 11:33:29 +0100 Subject: [PATCH] GENmodel, GENinstance, change layout, #2/4, complete the change fix the .xml files too --- src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml | 4 ++-- src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml | 4 ++-- src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml | 4 ++-- src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml | 4 ++-- src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml | 8 ++++---- src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml | 4 ++-- src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml index 71d85cf65..f4e890a22 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml @@ -51,10 +51,10 @@ int $(module)acLoad(GENmodel *inModel, CKTcircuit *ckt) { $(module)model *model = ($(module)model*)inModel; $(module)instance *here; - for ( ; model != NULL; model = model->$(module)nextModel ) + for ( ; model != NULL; model = $(module)nextModel(model) ) { /* loop through all the instances of the model */ - for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) + for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here)) { diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml index 687ac4768..815e08aec 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml @@ -194,10 +194,10 @@ int $(module)load(GENmodel *inModel, CKTcircuit *ckt) ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; - for ( ; model != NULL; model = model->$(module)nextModel ) + for ( ; model != NULL; model = $(module)nextModel(model) ) { /* loop through all the instances of the model */ - for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) + for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here)) { { diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml index a2c809d64..bdadeeceb 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml @@ -48,9 +48,9 @@ $(module)noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Nd $(module)model *firstModel = ($(module)model *) genmodel; $(module)model *model; $(module)instance *inst; - for (model=firstModel; model != NULL; model=model->$(module)nextModel) + for (model=firstModel; model != NULL; model=$(module)nextModel(model)) { - for (inst=model->$(module)instances; inst != NULL; inst=inst->$(module)nextInstance) + for (inst=$(module)instances(model); inst != NULL; inst=$(module)nextInstance(inst)) { switch (operation) { diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml index b7fdcceef..950003beb 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml @@ -53,10 +53,10 @@ int $(module)pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) $(module)model *model = ($(module)model*)inModel; $(module)instance *here; NG_IGNOREABLE(ckt); - for ( ; model != NULL; model = model->$(module)nextModel ) + for ( ; model != NULL; model = $(module)nextModel(model) ) { /* loop through all the instances of the model */ - for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) + for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here)) { diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml index 4c5a2cfcb..c2d5aa11f 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml @@ -59,7 +59,7 @@ int $(module)setup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int * $(module)instance *here; /* loop through all the $(module) device models */ - for ( ;model != NULL ;model = model->$(module)nextModel ) + for ( ;model != NULL ;model = $(module)nextModel(model) ) { @@ -79,7 +79,7 @@ int $(module)setup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int * - for ( here = model->$(module)instances ;here != NULL ; here = here->$(module)nextInstance ) + for ( here = $(module)instances(model) ;here != NULL ; here = $(module)nextInstance(here) ) { @@ -174,9 +174,9 @@ $(module)unsetup(GENmodel *inModel, CKTcircuit *ckt) $(module)instance *here; /* loop through all the $(module) device models */ - for ( ;model != NULL ;model = model->$(module)nextModel ) + for ( ;model != NULL ;model = $(module)nextModel(model) ) { - for ( here = model->$(module)instances ;here != NULL ; here = here->$(module)nextInstance ) + for ( here = $(module)instances(model) ;here != NULL ; here = $(module)nextInstance(here) ) { diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml index a9f73f141..b4c756360 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml @@ -58,12 +58,12 @@ int $(module)temp(GENmodel *inModel, CKTcircuit *ckt) $(module)model *model = ($(module)model*)inModel; $(module)instance *here; NG_IGNOREABLE(ckt); - for ( ; model != NULL; model = model->$(module)nextModel ) + for ( ; model != NULL; model = $(module)nextModel(model) ) { /* loop through all the instances of the model */ - for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) + for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here)) { diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml index c3523b973..cf69c31d8 100644 --- a/src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml +++ b/src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml @@ -56,10 +56,10 @@ int $(module)trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) double debugtemp; #endif /* STEPDEBUG */ - for ( ; model != NULL; model = model->$(module)nextModel ) + for ( ; model != NULL; model = $(module)nextModel(model) ) { /* loop through all the instances of the model */ - for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) + for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here)) { #ifdef STEPDEBUG debugtemp = *timeStep;