diff --git a/src/frontend/device.c b/src/frontend/device.c index 2711b2e94..e7cb99282 100644 --- a/src/frontend/device.c +++ b/src/frontend/device.c @@ -638,7 +638,7 @@ param_forall(dgen *dg, int flags) for (i = 0; i < xcount; i++) if ((plist[i].dataType & IF_ASK) && !(plist[i].dataType & IF_REDUNDANT) - && ((plist[i].dataType & IF_SET) || ((CKTcircuit *) (dg->ckt))->CKTrhsOld) + && ((plist[i].dataType & IF_SET) || dg->ckt->CKTrhsOld) && (!(plist[i].dataType & IF_UNINTERESTING) || (flags == DGEN_ALLPARAMS))) { j = 0; @@ -672,7 +672,7 @@ param_forall_old(dgen *dg, int flags) for (i = 0; i < xcount; i++) if ((plist[i].dataType & IF_ASK) && !(plist[i].dataType & IF_REDUNDANT) - && ((plist[i].dataType & IF_SET) || ((CKTcircuit *) (dg->ckt))->CKTrhsOld) + && ((plist[i].dataType & IF_SET) || dg->ckt->CKTrhsOld) && (!(plist[i].dataType & IF_UNINTERESTING) || (flags == DGEN_ALLPARAMS))) { j = 0; @@ -714,8 +714,8 @@ listparam(wordlist *p, dgen *dg) } if (found) { - if ((((CKTcircuit *) (dg->ckt))->CKTrhsOld || - (plist[i].dataType & IF_SET))) + if (dg->ckt->CKTrhsOld || + (plist[i].dataType & IF_SET)) { j = 0; do { diff --git a/src/frontend/gens.c b/src/frontend/gens.c index 128d0721e..959da2241 100644 --- a/src/frontend/gens.c +++ b/src/frontend/gens.c @@ -24,7 +24,7 @@ wl_forall(wordlist *wl, void (*fn)(wordlist*, dgen*), dgen *data) dgen * -dgen_init(GENcircuit *ckt, wordlist *wl, int nomix, int flag, int model) +dgen_init(CKTcircuit *ckt, wordlist *wl, int nomix, int flag, int model) { dgen *dg, *dg_save; @@ -142,7 +142,7 @@ dgen_next(dgen **dgx) } else if (dg->dev_type_no < DEVmaxnum) { dg->dev_type_no += 1; if (dg->dev_type_no < DEVmaxnum) { - dg->model = ((CKTcircuit *)(dg->ckt))->CKThead[dg->dev_type_no]; + dg->model = dg->ckt->CKThead[dg->dev_type_no]; if (dg->model) dg->instance = dg->model->GENinstances; } else { diff --git a/src/include/ngspice/dgen.h b/src/include/ngspice/dgen.h index 43290bbc3..93186ac2b 100644 --- a/src/include/ngspice/dgen.h +++ b/src/include/ngspice/dgen.h @@ -4,7 +4,7 @@ typedef struct st_dgen dgen; struct st_dgen { - GENcircuit *ckt; + CKTcircuit *ckt; wordlist *dev_list; int flags; int dev_type_no; @@ -26,6 +26,6 @@ struct st_dgen { #define DGEN_DEFPARAMS 0x001 #define DGEN_ALLPARAMS 0x002 -extern dgen *dgen_init(GENcircuit *ckt, wordlist *wl, int nomix, int flag, int model); +extern dgen *dgen_init(CKTcircuit *ckt, wordlist *wl, int nomix, int flag, int model); #endif diff --git a/src/include/ngspice/gendefs.h b/src/include/ngspice/gendefs.h index f3eab5dd2..8bc1546cc 100644 --- a/src/include/ngspice/gendefs.h +++ b/src/include/ngspice/gendefs.h @@ -31,11 +31,6 @@ struct GENinstance { }; -/* Generic circuit data */ - -typedef void GENcircuit; - - /* per model data */ struct GENmodel { /* model structure for a resistor */