diff --git a/ChangeLog b/ChangeLog index 9250c3ebb..caf190c5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,52 @@ +2010-07-08 Robert Larice + * src/tclspice.c , + * src/frontend/outitf.h , + * src/frontend/spiceif.c , + * src/include/cktdefs.h , + * src/include/ifsim.h , + * src/include/inpdefs.h , + * src/spicelib/analysis/ckt.h , + * src/spicelib/analysis/cktfndm.c , + * src/spicelib/analysis/cktmask.c , + * src/spicelib/analysis/cktmcrt.c , + * src/spicelib/analysis/cktmpar.c , + * src/spicelib/analysis/cktpmnam.c , + * src/spicelib/analysis/noisean.c , + * src/spicelib/analysis/tfanal.c , + * src/spicelib/devices/cktask.c , + * src/spicelib/devices/cktcrte.c , + * src/spicelib/devices/cktfinddev.c , + * src/spicelib/devices/ind/mutsetup.c , + * src/spicelib/devices/urc/urcsetup.c , + * src/spicelib/parser/inp.h , + * src/spicelib/parser/inp2b.c , + * src/spicelib/parser/inp2c.c , + * src/spicelib/parser/inp2d.c , + * src/spicelib/parser/inp2e.c , + * src/spicelib/parser/inp2f.c , + * src/spicelib/parser/inp2g.c , + * src/spicelib/parser/inp2h.c , + * src/spicelib/parser/inp2i.c , + * src/spicelib/parser/inp2j.c , + * src/spicelib/parser/inp2k.c , + * src/spicelib/parser/inp2l.c , + * src/spicelib/parser/inp2m.c , + * src/spicelib/parser/inp2n.c , + * src/spicelib/parser/inp2o.c , + * src/spicelib/parser/inp2p.c , + * src/spicelib/parser/inp2q.c , + * src/spicelib/parser/inp2r.c , + * src/spicelib/parser/inp2s.c , + * src/spicelib/parser/inp2t.c , + * src/spicelib/parser/inp2u.c , + * src/spicelib/parser/inp2v.c , + * src/spicelib/parser/inp2w.c , + * src/spicelib/parser/inp2y.c , + * src/spicelib/parser/inp2z.c , + * src/spicelib/parser/inpaname.c , + * src/spicelib/parser/inppname.c : + use the GENmodel and GENinstance type instead of void* + 2010-07-07 Robert Larice * src/include/dllitf.h , * src/include/mifproto.h , diff --git a/src/frontend/outitf.h b/src/frontend/outitf.h index 561674621..0940501ec 100644 --- a/src/frontend/outitf.h +++ b/src/frontend/outitf.h @@ -15,7 +15,7 @@ typedef struct dataDesc { char *specParamName; /* The parameter name if special. */ int specIndex; /* For sensitivity, if special. */ int specType; - void *specFast; + GENinstance *specFast; int refIndex; /* The index of our ref vector. */ struct dvec *vec; } dataDesc; diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index 8af0f5300..e72f43604 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -618,7 +618,7 @@ spif_getparam_special(CKTcircuit *ckt,char **name,char *param,int ind,int do_mod if (!param || (param && eq(param, "all"))) { INPretrieve(name,(INPtables *)ft_curckt->ci_symtab); - typecode = finddev_special(ckt, *name, (void**)&dev, (void**)&mod,&modelo_dispositivo); + typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo); if (typecode == -1) { fprintf(cp_err,"Error: no such device or model name %s\n",*name); @@ -710,7 +710,7 @@ spif_getparam_special(CKTcircuit *ckt,char **name,char *param,int ind,int do_mod else if (param) { INPretrieve(name,(INPtables *)ft_curckt->ci_symtab); - typecode = finddev_special(ckt, *name, (void**)&dev, (void**)&mod,&modelo_dispositivo); + typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo); if (typecode == -1) { fprintf(cp_err,"Error: no such device or model name %s\n",*name); @@ -756,7 +756,7 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model) /* MW. My "special routine here" */ INPretrieve(name,(INPtables *)ft_curckt->ci_symtab); - typecode = finddev(ckt, *name,(void**) &dev,(void **) &mod); + typecode = finddev(ckt, *name, &dev, &mod); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", @@ -786,7 +786,7 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model) /* MW. */ INPretrieve(name,(INPtables *)ft_curckt->ci_symtab); - typecode = finddev(ckt, *name, (void**)&dev, (void **)&mod); + typecode = finddev(ckt, *name, &dev, &mod); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", @@ -824,7 +824,7 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val ) /* retrieve device name from symbol table */ INPretrieve(name,(INPtables *)ft_curckt->ci_symtab); /* find the specified device */ - typecode = finddev(ckt, *name, (void**)&dev, (void **)&curMod); + typecode = finddev(ckt, *name, &dev, &curMod); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", *name); return; @@ -900,7 +900,7 @@ if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_ /* PN */ INPretrieve(name,(INPtables *)ft_curckt->ci_symtab); - typecode = finddev(ckt, *name, (void**)&dev, (void **)&mod); + typecode = finddev(ckt, *name, &dev, &mod); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", *name); return; @@ -1052,10 +1052,10 @@ doask(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op /* fprintf(cp_err, "Calling doask(%d, %x, %x, %x)\n", typecode, dev, mod, opt); */ if (dev) - err = (*(ft_sim->askInstanceQuest))(ckt, (void *)dev, + err = (*(ft_sim->askInstanceQuest))(ckt, dev, opt->id, &pv, (IFvalue *)NULL); else - err = (*(ft_sim->askModelQuest))(ckt, (void *) mod, + err = (*(ft_sim->askModelQuest))(ckt, mod, opt->id, &pv, (IFvalue *)NULL); if (err != OK) { ft_sperror(err, "if_getparam"); @@ -1135,10 +1135,10 @@ doset(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op typecode, dev, mod, opt); */ if (dev) - err = (*(ft_sim->setInstanceParm))(ckt, (void *)dev, + err = (*(ft_sim->setInstanceParm))(ckt, dev, opt->id, &nval, (IFvalue *)NULL); else - err = (*(ft_sim->setModelParm))(ckt, (void *) mod, + err = (*(ft_sim->setModelParm))(ckt, mod, opt->id, &nval, (IFvalue *)NULL); return err; diff --git a/src/include/cktdefs.h b/src/include/cktdefs.h index 529ff994a..b1bcfe754 100644 --- a/src/include/cktdefs.h +++ b/src/include/cktdefs.h @@ -276,14 +276,14 @@ extern int CKTacDump(CKTcircuit *, double , void *); extern int CKTacLoad(CKTcircuit *); extern int CKTaccept(CKTcircuit *); extern int CKTacct(CKTcircuit *, void *, int , IFvalue *); -extern int CKTask(CKTcircuit *, void *, int , IFvalue *, IFvalue *); +extern int CKTask(CKTcircuit *, GENinstance *, int , IFvalue *, IFvalue *); extern int CKTaskAnalQ(CKTcircuit *, void *, int , IFvalue *, IFvalue *); extern int CKTaskNodQst(CKTcircuit *, void *, int , IFvalue *, IFvalue *); extern int CKTbindNode(CKTcircuit *, void *, int , void *); extern void CKTbreakDump(CKTcircuit *); extern int CKTclrBreak(CKTcircuit *); extern int CKTconvTest(CKTcircuit *); -extern int CKTcrtElt(CKTcircuit *, void *, void **, IFuid); +extern int CKTcrtElt(CKTcircuit *, GENmodel *, GENinstance **, IFuid); extern int CKTdelTask(CKTcircuit *, void *); extern int CKTdestroy(CKTcircuit *); extern int CKTdltAnal(void *, void *, void *); @@ -299,8 +299,8 @@ extern void NDEVacct(CKTcircuit *ckt, FILE *file); extern void CKTncDump(CKTcircuit *); extern int CKTfndAnal(CKTcircuit *, int *, void **, IFuid , void *, IFuid); extern int CKTfndBranch(CKTcircuit *, IFuid); -extern int CKTfndDev(CKTcircuit *, int *, void **, IFuid , void *, IFuid); -extern int CKTfndMod(CKTcircuit *, int *, void **, IFuid); +extern int CKTfndDev(CKTcircuit *, int *, GENinstance **, IFuid , GENmodel *, IFuid); +extern int CKTfndMod(CKTcircuit *, int *, GENmodel **, IFuid); extern int CKTfndNode(CKTcircuit *, void **, IFuid); extern int CKTfndTask(CKTcircuit *, void **, IFuid ); extern int CKTground(CKTcircuit *, void **, IFuid); @@ -313,9 +313,9 @@ extern int CKTmapNode(CKTcircuit *, void **, IFuid); extern int CKTmkCur(CKTcircuit *, CKTnode **, IFuid , char *); extern int CKTmkNode(CKTcircuit *, CKTnode **); extern int CKTmkVolt(CKTcircuit *, CKTnode **, IFuid , char *); -extern int CKTmodAsk(CKTcircuit *, void *, int , IFvalue *, IFvalue *); -extern int CKTmodCrt(CKTcircuit *, int , void **, IFuid); -extern int CKTmodParam(CKTcircuit *, void *, int , IFvalue *, IFvalue *); +extern int CKTmodAsk(CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *); +extern int CKTmodCrt(CKTcircuit *, int , GENmodel **, IFuid); +extern int CKTmodParam(CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *); extern int CKTnames(CKTcircuit *, int *, IFuid **); extern int CKTnewAnal(CKTcircuit *, int , IFuid , void **, void *); extern int CKTnewEq(CKTcircuit *, void **, IFuid); diff --git a/src/include/ifsim.h b/src/include/ifsim.h index 80d542d74..c46119a7e 100644 --- a/src/include/ifsim.h +++ b/src/include/ifsim.h @@ -367,24 +367,24 @@ struct IFsimulator { int (*deleteNode) (CKTcircuit *, void *); /* delete a node from the circuit */ - int (*newInstance) (CKTcircuit *, void *, void **, IFuid); + int (*newInstance) (CKTcircuit *, GENmodel *, GENinstance **, IFuid); /* create new instance */ int (*setInstanceParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *); /* set a parameter on an instance */ - int (*askInstanceQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *); + int (*askInstanceQuest) (CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); /* ask a question about an instance */ - int (*findInstance) (CKTcircuit *, int *, void **, IFuid, void *, IFuid); + int (*findInstance) (CKTcircuit *, int *, GENinstance **, IFuid, GENmodel *, IFuid); /* find a specific instance */ int (*deleteInstance) (CKTcircuit *, void *); /* delete an instance from the circuit */ - int (*newModel) (CKTcircuit *, int, void **, IFuid); + int (*newModel) (CKTcircuit *, int, GENmodel **, IFuid); /* create new model */ - int (*setModelParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *); + int (*setModelParm) (CKTcircuit *, GENmodel *, int, IFvalue *, IFvalue *); /* set a parameter on a model */ - int (*askModelQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *); + int (*askModelQuest) (CKTcircuit *, GENmodel *, int, IFvalue *, IFvalue *); /* ask a questions about a model */ - int (*findModel) (CKTcircuit *, int *, void **, IFuid); + int (*findModel) (CKTcircuit *, int *, GENmodel **, IFuid); /* find a specific model */ int (*deleteModel) (CKTcircuit *, void *); /* delete a model from the circuit*/ diff --git a/src/include/inpdefs.h b/src/include/inpdefs.h index 2fcd0e7bf..ee78f139d 100644 --- a/src/include/inpdefs.h +++ b/src/include/inpdefs.h @@ -34,31 +34,31 @@ struct INPtables{ struct INPnTab **INPtermsymtab; int INPsize; int INPtermsize; - void *defAmod; - void *defBmod; - void *defCmod; - void *defDmod; - void *defEmod; - void *defFmod; - void *defGmod; - void *defHmod; - void *defImod; - void *defJmod; - void *defKmod; - void *defLmod; - void *defMmod; - void *defNmod; - void *defOmod; - void *defPmod; - void *defQmod; - void *defRmod; - void *defSmod; - void *defTmod; - void *defUmod; - void *defVmod; - void *defWmod; - void *defYmod; - void *defZmod; + GENmodel *defAmod; + GENmodel *defBmod; + GENmodel *defCmod; + GENmodel *defDmod; + GENmodel *defEmod; + GENmodel *defFmod; + GENmodel *defGmod; + GENmodel *defHmod; + GENmodel *defImod; + GENmodel *defJmod; + GENmodel *defKmod; + GENmodel *defLmod; + GENmodel *defMmod; + GENmodel *defNmod; + GENmodel *defOmod; + GENmodel *defPmod; + GENmodel *defQmod; + GENmodel *defRmod; + GENmodel *defSmod; + GENmodel *defTmod; + GENmodel *defUmod; + GENmodel *defVmod; + GENmodel *defWmod; + GENmodel *defYmod; + GENmodel *defZmod; }; struct card{ @@ -77,7 +77,7 @@ struct INPmodel{ INPmodel *INPnextModel; /* link to next model */ int INPmodUsed; /* flag to indicate it has already been used */ card *INPmodLine; /* pointer to line describing model */ - void *INPmodfast; /* high speed pointer to model for access */ + GENmodel *INPmodfast; /* high speed pointer to model for access */ }; @@ -88,7 +88,7 @@ struct INPmodel{ int IFnewUid(CKTcircuit *, IFuid *, IFuid, char *, int, void **); int IFdelUid(CKTcircuit *, IFuid, int); -int INPaName(char *, IFvalue *, CKTcircuit *, int *, char *, void **, IFsimulator *, int *, +int INPaName(char *, IFvalue *, CKTcircuit *, int *, char *, GENinstance **, IFsimulator *, int *, IFvalue *); int INPapName(CKTcircuit *, int, void *, char *, IFvalue *); void INPcaseFix(char *); @@ -116,7 +116,7 @@ char *INPmkTemp(char *); void INPpas1(CKTcircuit *, card *, INPtables *); void INPpas2(CKTcircuit *, card *, INPtables *, void *); void INPpas3(CKTcircuit *, card *, INPtables *, void *, IFparm *, int); -int INPpName(char *, IFvalue *, CKTcircuit *, int, void *); +int INPpName(char *, IFvalue *, CKTcircuit *, int, GENinstance *); int INPtermInsert(CKTcircuit *, char **, INPtables *, void **); int INPmkTerm(CKTcircuit *, char **, INPtables *, void **); int INPtypelook(char *); diff --git a/src/spicelib/analysis/ckt.h b/src/spicelib/analysis/ckt.h index 515b76a86..99d908d47 100644 --- a/src/spicelib/analysis/ckt.h +++ b/src/spicelib/analysis/ckt.h @@ -18,14 +18,14 @@ int CKTacDump( CKTcircuit *, double , void *); int CKTacLoad( CKTcircuit *); int CKTaccept( CKTcircuit *); int CKTacct( CKTcircuit *, void *, int , IFvalue *); -int CKTask( CKTcircuit *, void *, int , IFvalue *, IFvalue *); +int CKTask( CKTcircuit *, GENinstance *, int , IFvalue *, IFvalue *); int CKTaskAnalQ( CKTcircuit *, void *, int , IFvalue *, IFvalue *); int CKTaskNodQst( CKTcircuit *, void *, int , IFvalue *, IFvalue *); int CKTbindNode( CKTcircuit *, void *, int , void *); void CKTbreakDump( CKTcircuit *); int CKTclrBreak( CKTcircuit *); int CKTconvTest( CKTcircuit *); -int CKTcrtElt( CKTcircuit *, void *, void **, IFuid ); +int CKTcrtElt( CKTcircuit *, GENmodel *, GENinstance **, IFuid ); int CKTdelTask( CKTcircuit *, void *); int CKTdestroy( CKTcircuit *); int CKTdltAnal( void *, void *, void *); @@ -36,8 +36,8 @@ int CKTdoJob( CKTcircuit *, int , void *); void CKTdump( CKTcircuit *, double, void *); int CKTfndAnal( CKTcircuit *, int *, void **, IFuid , void *, IFuid ); int CKTfndBranch( CKTcircuit *, IFuid); -int CKTfndDev( CKTcircuit *, int *, void **, IFuid , void *, IFuid ); -int CKTfndMod( CKTcircuit *, int *, void **, IFuid ); +int CKTfndDev( CKTcircuit *, int *, GENinstance **, IFuid , GENmodel *, IFuid ); +int CKTfndMod( CKTcircuit *, int *, GENmodel **, IFuid ); int CKTfndNode( CKTcircuit *, void **, IFuid ); int CKTfndTask( CKTcircuit *, void **, IFuid ); int CKTground( CKTcircuit *, void **, IFuid ); @@ -50,9 +50,9 @@ int CKTmapNode( CKTcircuit *, void **, IFuid ); int CKTmkCur( CKTcircuit *, CKTnode **, IFuid , char *); int CKTmkNode(CKTcircuit*,CKTnode**); int CKTmkVolt( CKTcircuit *, CKTnode **, IFuid , char *); -int CKTmodAsk( CKTcircuit *, void *, int , IFvalue *, IFvalue *); -int CKTmodCrt( CKTcircuit *, int , void **, IFuid ); -int CKTmodParam( CKTcircuit *, void *, int , IFvalue *, IFvalue *); +int CKTmodAsk( CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *); +int CKTmodCrt( CKTcircuit *, int , GENmodel **, IFuid ); +int CKTmodParam( CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *); int CKTnames(CKTcircuit *, int *, IFuid **); int CKTnewAnal( CKTcircuit *, int , IFuid , void **, void *); int CKTnewEq( CKTcircuit *, void **, IFuid ); diff --git a/src/spicelib/analysis/cktfndm.c b/src/spicelib/analysis/cktfndm.c index f3339c52d..a51ae015d 100644 --- a/src/spicelib/analysis/cktfndm.c +++ b/src/spicelib/analysis/cktfndm.c @@ -13,13 +13,13 @@ Author: 1985 Thomas L. Quarles int -CKTfndMod(CKTcircuit *ckt, int *type, void **modfast, IFuid modname) +CKTfndMod(CKTcircuit *ckt, int *type, GENmodel **modfast, IFuid modname) { GENmodel *mods; - if(modfast != NULL && *(GENmodel **)modfast != NULL) { + if(modfast != NULL && *modfast != NULL) { /* already have modfast, so nothing to do */ - if(type) *type = (*(GENmodel **)modfast)->GENmodType; + if(type) *type = (*modfast)->GENmodType; return(OK); } if(*type >=0 && *type < DEVmaxnum) { @@ -28,7 +28,7 @@ CKTfndMod(CKTcircuit *ckt, int *type, void **modfast, IFuid modname) for(mods=ckt->CKThead[*type]; mods != NULL ; mods = mods->GENnextModel) { if(mods->GENmodName == modname) { - *modfast = (char *)mods; + *modfast = mods; return(OK); } } @@ -41,7 +41,7 @@ CKTfndMod(CKTcircuit *ckt, int *type, void **modfast, IFuid modname) for(mods=ckt->CKThead[*type];mods!=NULL; mods = mods->GENnextModel) { if(mods->GENmodName == modname) { - *modfast = (char *)mods; + *modfast = mods; return(OK); } } diff --git a/src/spicelib/analysis/cktmask.c b/src/spicelib/analysis/cktmask.c index 99835addf..302c77990 100644 --- a/src/spicelib/analysis/cktmask.c +++ b/src/spicelib/analysis/cktmask.c @@ -20,7 +20,7 @@ extern SPICEdev **DEVices; /* ARGSUSED */ int -CKTmodAsk(CKTcircuit *ckt, void *modfast, int which, IFvalue *value, IFvalue *selector) +CKTmodAsk(CKTcircuit *ckt, GENmodel *modfast, int which, IFvalue *value, IFvalue *selector) { int type = ((GENmodel *)modfast)->GENmodType; if((*DEVices[type]).DEVmodAsk) { diff --git a/src/spicelib/analysis/cktmcrt.c b/src/spicelib/analysis/cktmcrt.c index 20861925e..0047a24b0 100644 --- a/src/spicelib/analysis/cktmcrt.c +++ b/src/spicelib/analysis/cktmcrt.c @@ -18,13 +18,13 @@ Author: 1985 Thomas L. Quarles int -CKTmodCrt(CKTcircuit *ckt, int type, void **modfast, IFuid name) +CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name) { extern SPICEdev **DEVices; GENmodel *mymodfast = NULL; int error; - error = CKTfndMod(ckt,&type,(void**)&mymodfast,name); + error = CKTfndMod(ckt, &type, &mymodfast, name); if(error == E_NOMOD) { mymodfast = (GENmodel *)MALLOC(*(DEVices[type]->DEVmodSize)); if(mymodfast == (GENmodel *)NULL) return(E_NOMEM); @@ -32,10 +32,10 @@ CKTmodCrt(CKTcircuit *ckt, int type, void **modfast, IFuid name) mymodfast->GENmodName = name; mymodfast->GENnextModel =(GENmodel *)(ckt->CKThead[type]); ckt->CKThead[type]=(GENmodel *)mymodfast; - if(modfast) *modfast=(void *)mymodfast; + if(modfast) *modfast=mymodfast; return(OK); } else if (error==0) { - if(modfast) *modfast=(void *)mymodfast; + if(modfast) *modfast=mymodfast; return(E_EXISTS); } else { return(error); diff --git a/src/spicelib/analysis/cktmpar.c b/src/spicelib/analysis/cktmpar.c index 47c8dee9c..24da1c7c5 100644 --- a/src/spicelib/analysis/cktmpar.c +++ b/src/spicelib/analysis/cktmpar.c @@ -21,13 +21,13 @@ extern SPICEdev **DEVices; /* ARGSUSED */ int -CKTmodParam(CKTcircuit *ckt, void *modfast, int param, IFvalue *val, IFvalue *selector) +CKTmodParam(CKTcircuit *ckt, GENmodel *modfast, int param, IFvalue *val, IFvalue *selector) { - int type = ((GENmodel *)modfast)->GENmodType; + int type = modfast->GENmodType; if (((*DEVices[type]).DEVmodParam)) { return(((*((*DEVices[type]).DEVmodParam)) (param,val, - (GENmodel *)modfast))); + modfast))); } else { return(E_BADPARM); } diff --git a/src/spicelib/analysis/cktpmnam.c b/src/spicelib/analysis/cktpmnam.c index 5c6b9fa8a..df02f1701 100644 --- a/src/spicelib/analysis/cktpmnam.c +++ b/src/spicelib/analysis/cktpmnam.c @@ -36,7 +36,7 @@ CKTpModName(char *parm, IFvalue *val, CKTcircuit *ckt, int type, IFuid name, GEN for(i=0;i<(*(*DEVices[type]).DEVpublic.numModelParms);i++) { if(strcmp(parm,((*DEVices[type]).DEVpublic.modelParms[i].keyword))==0){ - error = CKTmodParam(ckt,(void *)*modfast, + error = CKTmodParam(ckt, *modfast, (*DEVices[type]).DEVpublic.modelParms[i].id,val, (IFvalue*)NULL); if(error) return(error); diff --git a/src/spicelib/analysis/noisean.c b/src/spicelib/analysis/noisean.c index ec29c68d1..af6755642 100644 --- a/src/spicelib/analysis/noisean.c +++ b/src/spicelib/analysis/noisean.c @@ -37,7 +37,7 @@ NOISEan (CKTcircuit *ckt, int restart) int code; int step; IFuid freqUid; - char *inst; + GENinstance *inst; double freqTol; /* tolerence parameter for finding final frequency; hack */ NOISEAN *job = (NOISEAN*) (ckt->CKTcurJob); @@ -50,8 +50,8 @@ NOISEan (CKTcircuit *ckt, int restart) inst = NULL; code = CKTtypelook("Vsource"); if (code != -1) { - error = CKTfndDev(ckt,&code,(void **)&inst, - job->input, (void *)NULL, (IFuid)NULL); + error = CKTfndDev(ckt, &code, &inst, + job->input, (GENmodel *)NULL, (IFuid)NULL); if (!error && !((VSRCinstance *)inst)->VSRCacGiven) { errMsg = (char*) MALLOC(strlen(noacinput)+1); strcpy(errMsg,noacinput); @@ -61,8 +61,8 @@ NOISEan (CKTcircuit *ckt, int restart) code = CKTtypelook("Isource"); if (code != -1 && inst==NULL) { - error = CKTfndDev(ckt,&code, (void **)&inst, - job->input, (void *)NULL,(IFuid)NULL); + error = CKTfndDev(ckt, &code, &inst, + job->input, (GENmodel *)NULL, (IFuid)NULL); if (error) { /* XXX ??? */ (*(SPfrontEnd->IFerror))(ERR_WARNING, diff --git a/src/spicelib/analysis/tfanal.c b/src/spicelib/analysis/tfanal.c index 15c924c5d..19f2744cd 100644 --- a/src/spicelib/analysis/tfanal.c +++ b/src/spicelib/analysis/tfanal.c @@ -29,7 +29,7 @@ TFanal(CKTcircuit *ckt, int restart) int converged; int i; void *plotptr = NULL; /* pointer to out plot */ - void *ptr = NULL; + GENinstance *ptr = NULL; IFuid uids[3]; int Itype; int Vtype; diff --git a/src/spicelib/devices/cktask.c b/src/spicelib/devices/cktask.c index c8ad319a4..1ad840697 100644 --- a/src/spicelib/devices/cktask.c +++ b/src/spicelib/devices/cktask.c @@ -15,7 +15,7 @@ Author: 1985 Thomas L. Quarles int -CKTask(CKTcircuit *ckt, void *fast, int which, IFvalue *value, IFvalue *selector) +CKTask(CKTcircuit *ckt, GENinstance *fast, int which, IFvalue *value, IFvalue *selector) { GENinstance *instance = (GENinstance *) fast; int type = instance->GENmodPtr->GENmodType; diff --git a/src/spicelib/devices/cktcrte.c b/src/spicelib/devices/cktcrte.c index ef380a14b..be72721d5 100644 --- a/src/spicelib/devices/cktcrte.c +++ b/src/spicelib/devices/cktcrte.c @@ -16,7 +16,7 @@ Author: 1985 Thomas L. Quarles #include "memory.h" int -CKTcrtElt(CKTcircuit *ckt, void *inModPtr, void **inInstPtr, IFuid name) +CKTcrtElt(CKTcircuit *ckt, GENmodel *inModPtr, GENinstance **inInstPtr, IFuid name) { GENinstance *instPtr = NULL; /* instPtr points to the data struct for per-instance data */ GENmodel *modPtr = (GENmodel*)inModPtr; /* modPtr points to the data struct for per-model data */ @@ -32,11 +32,11 @@ CKTcrtElt(CKTcircuit *ckt, void *inModPtr, void **inInstPtr, IFuid name) type = ((GENmodel*)modPtr)->GENmodType; - error = CKTfndDev(ckt, &type, (void**)&instPtr, name, inModPtr, + error = CKTfndDev(ckt, &type, &instPtr, name, inModPtr, (char *)NULL ); if (error == OK) { if (inInstPtr) - *inInstPtr=(void *)instPtr; + *inInstPtr = instPtr; return E_EXISTS; } else if (error != E_NODEV) return error; @@ -59,7 +59,7 @@ CKTcrtElt(CKTcircuit *ckt, void *inModPtr, void **inInstPtr, IFuid name) modPtr->GENinstances = instPtr; if(inInstPtr != NULL) - *inInstPtr = (void *)instPtr; + *inInstPtr = instPtr; return OK; } diff --git a/src/spicelib/devices/cktfinddev.c b/src/spicelib/devices/cktfinddev.c index a9cd4991d..3f76843d2 100644 --- a/src/spicelib/devices/cktfinddev.c +++ b/src/spicelib/devices/cktfinddev.c @@ -10,28 +10,28 @@ Author: 1985 Thomas L. Quarles int -CKTfndDev(CKTcircuit *Ckt, int *type, void **fast, IFuid name, void *modfast, IFuid modname) +CKTfndDev(CKTcircuit *Ckt, int *type, GENinstance **fast, IFuid name, GENmodel *modfast, IFuid modname) { CKTcircuit *ckt= /* fixme, drop that */ Ckt; GENinstance *here; GENmodel *mods; - if((GENinstance **)fast != (GENinstance **)NULL && - *(GENinstance **)fast != (GENinstance *)NULL) + if(fast != NULL && + *fast != NULL) { /* already have fast, so nothing much to do just get & set type */ if (type) - *type = (*((GENinstance**)fast))->GENmodPtr->GENmodType; + *type = (*fast)->GENmodPtr->GENmodType; return(OK); } if(modfast) { /* have model, just need device */ - mods = (GENmodel*)modfast; + mods = modfast; for (here = mods->GENinstances; here != NULL; here = here->GENnextInstance) { if (here->GENname == name) { if (fast != NULL) - *(GENinstance **)fast = here; + *fast = here; if (type) *type = mods->GENmodType; @@ -57,7 +57,7 @@ CKTfndDev(CKTcircuit *Ckt, int *type, void **fast, IFuid name, void *modfast, IF { if (here->GENname == name) { if (fast != 0) - *(GENinstance **)fast = here; + *fast = here; return OK; } } @@ -83,7 +83,7 @@ CKTfndDev(CKTcircuit *Ckt, int *type, void **fast, IFuid name, void *modfast, IF { if (here->GENname == name) { if(fast != 0) - *(GENinstance **)fast = here; + *fast = here; return OK; } } diff --git a/src/spicelib/devices/ind/mutsetup.c b/src/spicelib/devices/ind/mutsetup.c index 7e4f7f447..579398f05 100644 --- a/src/spicelib/devices/ind/mutsetup.c +++ b/src/spicelib/devices/ind/mutsetup.c @@ -41,8 +41,8 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) return(E_INTERN); } - error = CKTfndDev(ckt,&ktype,(void **)&(here->MUTind1), - here->MUTindName1, (void *)NULL,(char *)NULL); + error = CKTfndDev(ckt,&ktype,(GENinstance **)&(here->MUTind1), + here->MUTindName1, (GENmodel *)NULL, (char *)NULL); if(error && error!= E_NODEV && error != E_NOMOD) return(error); if(error) { IFuid namarray[2]; @@ -52,8 +52,8 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) "%s: coupling to non-existant inductor %s.", namarray); } - error = CKTfndDev(ckt,&ktype,(void **)&(here->MUTind2), - here->MUTindName2,(void *)NULL,(char *)NULL); + error = CKTfndDev(ckt,&ktype,(GENinstance **)&(here->MUTind2), + here->MUTindName2, (GENmodel *)NULL, (char *)NULL); if(error && error!= E_NODEV && error != E_NOMOD) return(error); if(error) { IFuid namarray[2]; diff --git a/src/spicelib/devices/urc/urcsetup.c b/src/spicelib/devices/urc/urcsetup.c index 948238123..8611bb154 100644 --- a/src/spicelib/devices/urc/urcsetup.c +++ b/src/spicelib/devices/urc/urcsetup.c @@ -96,7 +96,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) "diodemod",UID_MODEL,(void **)NULL); if(error) return(error); modfast = (GENmodel *)NULL; - error = CKTmodCrt(ckt,dtype,(void **)&modfast, + error = CKTmodCrt(ckt,dtype,&modfast, dioUid); if(error) return(error); ptemp.rValue = c1; @@ -113,7 +113,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) here->URCname, "capmod",UID_MODEL,(void **)NULL); if(error) return(error); modfast = (GENmodel *)NULL; - error = CKTmodCrt(ckt,ctype,(void **)&modfast, + error = CKTmodCrt(ckt,ctype,&modfast, capUid); if(error) return(error); } @@ -122,7 +122,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) "resmod",UID_MODEL,(void **)NULL); if(error) return(error); rmodfast = (GENmodel *)NULL; - error = CKTmodCrt(ckt,rtype,(void **)&rmodfast,resUid); + error = CKTmodCrt(ckt,rtype,&rmodfast,resUid); if(error) return(error); lowl = CKTnum2nod(ckt,here->URCposNode); hir = CKTnum2nod(ckt,here->URCnegNode); @@ -150,8 +150,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = (*(SPfrontEnd->IFnewUid))(ckt,&eltUid,here->URCname, nameelt,UID_INSTANCE, (void **)NULL); if(error) return(error); - error = CKTcrtElt(ckt,(void *)rmodfast, - (void **)&fast,eltUid); + error = CKTcrtElt(ckt,rmodfast, + &fast,eltUid); if(error) return(error); error = CKTbindNode(ckt,(void *)fast,1,lowl); if(error) return(error); @@ -167,8 +167,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = (*(SPfrontEnd->IFnewUid))(ckt,&eltUid,here->URCname, nameelt,UID_INSTANCE, (void **)NULL); if(error) return(error); - error = CKTcrtElt(ckt,(void *)rmodfast, - (void **)&fast,eltUid); + error = CKTcrtElt(ckt,rmodfast, + &fast,eltUid); if(error) return(error); error = CKTbindNode(ckt,(void *)fast,1,hil); if(error) return(error); @@ -187,8 +187,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) here->URCname,nameelt,UID_INSTANCE, (void **)NULL); if(error) return(error); - error = CKTcrtElt(ckt,(void *)modfast, - (void **)&fast, eltUid); + error = CKTcrtElt(ckt,modfast, + &fast, eltUid); if(error) return(error); error = CKTbindNode(ckt,(void *)fast,1,lowr); if(error) return(error); @@ -206,8 +206,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = (*(SPfrontEnd->IFnewUid))(ckt,&eltUid,here->URCname ,nameelt,UID_INSTANCE, (void **)NULL); if(error) return(error); - error = CKTcrtElt(ckt,(void *)modfast, - (void **)&fast, eltUid); + error = CKTcrtElt(ckt,modfast, + &fast, eltUid); if(error) return(error); error = CKTbindNode(ckt,(void *)fast,1,lowr); if(error) return(error); @@ -230,8 +230,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) here->URCname,nameelt,UID_INSTANCE, (void **)NULL); if(error) return(error); - error = CKTcrtElt(ckt,(void *)modfast, - (void **) &fast,eltUid); + error = CKTcrtElt(ckt,modfast, + &fast,eltUid); if(error) return(error); error = CKTbindNode(ckt,(void *)fast,1,hil); if(error) return(error); @@ -250,8 +250,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) here->URCname,nameelt,UID_INSTANCE, (void **)NULL); if(error) return(error); - error = CKTcrtElt(ckt,(void *)modfast, - (void **)&fast,eltUid); + error = CKTcrtElt(ckt,modfast, + &fast,eltUid); if(error) return(error); error = CKTbindNode(ckt,(void *)fast,1,hil); if(error) return(error); @@ -311,7 +311,7 @@ URCunsetup(GENmodel *inModel, CKTcircuit *ckt) modfast = NULL; type = -1; - error = CKTfndMod(ckt, &type, (void **) &modfast, varUid); + error = CKTfndMod(ckt, &type, &modfast, varUid); if (error) return error; @@ -328,7 +328,7 @@ URCunsetup(GENmodel *inModel, CKTcircuit *ckt) modfast = NULL; type = -1; - error = CKTfndMod(ckt, &type, (void **) &modfast, varUid); + error = CKTfndMod(ckt, &type, &modfast, varUid); if (error) return error; diff --git a/src/spicelib/parser/inp.h b/src/spicelib/parser/inp.h index c4de3c7d6..82c8fd672 100644 --- a/src/spicelib/parser/inp.h +++ b/src/spicelib/parser/inp.h @@ -47,7 +47,7 @@ int INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gn /* inpxxxx.c */ int INPaName(char *parm, IFvalue *val, CKTcircuit *ckt, int *dev, char *devnam, - void **fast, IFsimulator *sim, int *dataType, IFvalue *selector); + GENinstance **fast, IFsimulator *sim, int *dataType, IFvalue *selector); int INPapName(CKTcircuit *ckt, int type, void *analPtr, char *parmname, IFvalue *value); void INPcaseFix(register char *string); char * INPdomodel(CKTcircuit *ckt, card *image, INPtables *tab); @@ -72,7 +72,7 @@ int INPmakeMod(char *token, int type, card *line); char * INPmkTemp(char *string); void INPpas1(CKTcircuit *ckt, card *deck, INPtables *tab); void INPpas2(CKTcircuit *ckt, card *data, INPtables *tab, void *task); -int INPpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, void *fast); +int INPpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, GENinstance *fast); /* inpptree.c */ diff --git a/src/spicelib/parser/inp2b.c b/src/spicelib/parser/inp2b.c index 7e77f93d5..3230d5c35 100644 --- a/src/spicelib/parser/inp2b.c +++ b/src/spicelib/parser/inp2b.c @@ -25,7 +25,7 @@ void INP2B(CKTcircuit *ckt, INPtables * tab, card * current) void *node1; /* the first node's node pointer */ void *node2; /* the second node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model name */ diff --git a/src/spicelib/parser/inp2c.c b/src/spicelib/parser/inp2c.c index a3116a714..a7725f022 100644 --- a/src/spicelib/parser/inp2c.c +++ b/src/spicelib/parser/inp2c.c @@ -30,8 +30,8 @@ void INP2C(CKTcircuit *ckt, INPtables * tab, card * current) int error; /* error code temporary */ int error1; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ - void *mdfast = NULL; /* pointer to the actual model */ - void *fast; /* pointer to the actual instance */ + GENmodel *mdfast = NULL; /* pointer to the actual model */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ diff --git a/src/spicelib/parser/inp2d.c b/src/spicelib/parser/inp2d.c index 6ea7da0d3..d10a77238 100644 --- a/src/spicelib/parser/inp2d.c +++ b/src/spicelib/parser/inp2d.c @@ -26,13 +26,13 @@ void INP2D(CKTcircuit *ckt, INPtables * tab, card * current) void *node1; /* the first node's node pointer */ void *node2; /* the second node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ - void *mdfast; /* pointer to the actual model */ + GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid of default model */ mytype = INPtypelook("Diode"); diff --git a/src/spicelib/parser/inp2e.c b/src/spicelib/parser/inp2e.c index ebd1f15a8..93abef03f 100644 --- a/src/spicelib/parser/inp2e.c +++ b/src/spicelib/parser/inp2e.c @@ -28,7 +28,7 @@ void INP2E(CKTcircuit *ckt, INPtables * tab, card * current) void *node3; /* the third node's node pointer */ void *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ diff --git a/src/spicelib/parser/inp2f.c b/src/spicelib/parser/inp2f.c index cf87d9be8..4b6d1d32b 100644 --- a/src/spicelib/parser/inp2f.c +++ b/src/spicelib/parser/inp2f.c @@ -24,7 +24,7 @@ void INP2F(CKTcircuit *ckt, INPtables * tab, card * current) void *node1; /* the first node's node pointer */ void *node2; /* the second node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* pointer to a value structure for functions which return one */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2g.c b/src/spicelib/parser/inp2g.c index 79f3d3af5..696f03864 100644 --- a/src/spicelib/parser/inp2g.c +++ b/src/spicelib/parser/inp2g.c @@ -28,7 +28,7 @@ void INP2G(CKTcircuit *ckt, INPtables * tab, card * current) void *node3; /* the third node's node pointer */ void *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ diff --git a/src/spicelib/parser/inp2h.c b/src/spicelib/parser/inp2h.c index a3e9d66e4..69e386120 100644 --- a/src/spicelib/parser/inp2h.c +++ b/src/spicelib/parser/inp2h.c @@ -24,7 +24,7 @@ void INP2H(CKTcircuit *ckt, INPtables * tab, card * current) void *node1; /* the first node's node pointer */ void *node2; /* the second node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* pointer to a value structure for functions which return one */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2i.c b/src/spicelib/parser/inp2i.c index 0058c5cfd..f0d61219e 100644 --- a/src/spicelib/parser/inp2i.c +++ b/src/spicelib/parser/inp2i.c @@ -25,7 +25,7 @@ void INP2I(CKTcircuit *ckt, INPtables * tab, card * current) void *node1; /* the first node's node pointer */ void *node2; /* the second node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ diff --git a/src/spicelib/parser/inp2j.c b/src/spicelib/parser/inp2j.c index 4ea27a4fc..7e382c72a 100644 --- a/src/spicelib/parser/inp2j.c +++ b/src/spicelib/parser/inp2j.c @@ -26,13 +26,13 @@ void INP2J(CKTcircuit *ckt, INPtables * tab, card * current) void *node2; /* the second node's node pointer */ void *node3; /* the third node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ - void *mdfast; /* pointer to the actual model */ + GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid of default model */ line = current->line; diff --git a/src/spicelib/parser/inp2k.c b/src/spicelib/parser/inp2k.c index 18d88b7db..33f006d2c 100644 --- a/src/spicelib/parser/inp2k.c +++ b/src/spicelib/parser/inp2k.c @@ -20,7 +20,7 @@ void INP2K(CKTcircuit *ckt, INPtables * tab, card * current) char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* ptr to a value structure for function return values */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2l.c b/src/spicelib/parser/inp2l.c index b3e37916a..f2323817b 100644 --- a/src/spicelib/parser/inp2l.c +++ b/src/spicelib/parser/inp2l.c @@ -30,8 +30,8 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, card * current) int error; /* error code temporary */ int error1; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ - void *mdfast = NULL; /* pointer to the actual model */ - void *fast; /* pointer to the actual instance */ + GENmodel *mdfast = NULL; /* pointer to the actual model */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package inductance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index 777131675..fe2997ec4 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -43,12 +43,12 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current) void *node7; /* the seventh node's node pointer */ int error; /* error code temporary */ int nodeflag; /* flag indicating 4 or 5 (or 6 or 7) nodes */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ - void *mdfast; /* pointer to the actual model */ + GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid for default model */ char* err_msg; diff --git a/src/spicelib/parser/inp2n.c b/src/spicelib/parser/inp2n.c index a22af8bf6..7fa1d6ee6 100644 --- a/src/spicelib/parser/inp2n.c +++ b/src/spicelib/parser/inp2n.c @@ -41,7 +41,7 @@ void INP2N(CKTcircuit *ckt, INPtables * tab, card * current) int i; INPmodel *thismodel; /* pointer to model structure describing our model */ void *mdfast = NULL; /* pointer to the actual model */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ NDEVinstance *pinst; IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2o.c b/src/spicelib/parser/inp2o.c index d6a58126a..56e6ea03a 100644 --- a/src/spicelib/parser/inp2o.c +++ b/src/spicelib/parser/inp2o.c @@ -29,12 +29,12 @@ void INP2O(CKTcircuit *ckt, INPtables * tab, card * current) void *node3; /* the third node's node pointer */ void *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ - void *mdfast; /* pointer to the actual model */ + GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid for default model */ diff --git a/src/spicelib/parser/inp2p.c b/src/spicelib/parser/inp2p.c index 5daf5a425..927d10147 100644 --- a/src/spicelib/parser/inp2p.c +++ b/src/spicelib/parser/inp2p.c @@ -33,8 +33,8 @@ void *groundnode; int error; /* error code temporary */ int error1=0; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ -void *mdfast; /* pointer to the actual model */ -void *fast; /* pointer to the actual instance */ +GENmodel *mdfast; /* pointer to the actual model */ +GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package cpl into */ IFuid uid; /* uid for default model */ double lenval = 0; diff --git a/src/spicelib/parser/inp2q.c b/src/spicelib/parser/inp2q.c index b713f6f78..6fb94592b 100644 --- a/src/spicelib/parser/inp2q.c +++ b/src/spicelib/parser/inp2q.c @@ -36,13 +36,13 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, void *gnode) #endif int error; /* error code temporary */ int nodeflag; /* flag indicating 4 or 5 nodes */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ - void *mdfast; /* pointer to the actual model */ + GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid of default model */ #ifdef TRACE diff --git a/src/spicelib/parser/inp2r.c b/src/spicelib/parser/inp2r.c index 0e7965d1f..23c4cdb00 100644 --- a/src/spicelib/parser/inp2r.c +++ b/src/spicelib/parser/inp2r.c @@ -36,8 +36,8 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current) int error; /* error code temporary */ int error1; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ - void *mdfast = NULL; /* pointer to the actual model */ - void *fast; /* pointer to the actual instance */ + GENmodel *mdfast = NULL; /* pointer to the actual model */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ diff --git a/src/spicelib/parser/inp2s.c b/src/spicelib/parser/inp2s.c index 1b5d06f51..22aa60a08 100644 --- a/src/spicelib/parser/inp2s.c +++ b/src/spicelib/parser/inp2s.c @@ -32,8 +32,8 @@ void INP2S(CKTcircuit *ckt, INPtables * tab, card * current) void *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ - void *mdfast; /* pointer to the actual model */ - void *fast; /* pointer to the actual instance */ + GENmodel *mdfast; /* pointer to the actual model */ + GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid of default model */ diff --git a/src/spicelib/parser/inp2t.c b/src/spicelib/parser/inp2t.c index e8b470302..8daa97ebc 100644 --- a/src/spicelib/parser/inp2t.c +++ b/src/spicelib/parser/inp2t.c @@ -29,7 +29,7 @@ void INP2T(CKTcircuit *ckt, INPtables * tab, card * current) void *node3; /* the third node's node pointer */ void *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model */ diff --git a/src/spicelib/parser/inp2u.c b/src/spicelib/parser/inp2u.c index d12ac3ca3..fdcd8e965 100644 --- a/src/spicelib/parser/inp2u.c +++ b/src/spicelib/parser/inp2u.c @@ -27,12 +27,12 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current) void *node2; /* the second node's node pointer */ void *node3; /* the third node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* name of the model */ INPmodel *thismodel; /* pointer to our model descriptor */ - void *mdfast; /* pointer to the actual model */ + GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid for default model */ mytype = INPtypelook("URC"); diff --git a/src/spicelib/parser/inp2v.c b/src/spicelib/parser/inp2v.c index 55d434df5..aeb3d4b0d 100644 --- a/src/spicelib/parser/inp2v.c +++ b/src/spicelib/parser/inp2v.c @@ -25,7 +25,7 @@ void INP2V(CKTcircuit *ckt, INPtables * tab, card * current) void *node1; /* the first node's node pointer */ void *node2; /* the second node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ diff --git a/src/spicelib/parser/inp2w.c b/src/spicelib/parser/inp2w.c index d0840be8a..b9dfeeaab 100644 --- a/src/spicelib/parser/inp2w.c +++ b/src/spicelib/parser/inp2w.c @@ -28,8 +28,8 @@ void INP2W(CKTcircuit *ckt, INPtables * tab, card * current) void *node2; /* the second node's node pointer */ int error; /* error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ - void *mdfast; /* pointer to the actual model */ - void *fast; /* pointer to the actual instance */ + GENmodel *mdfast; /* pointer to the actual model */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* pointer to a value structure for functions to return */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2y.c b/src/spicelib/parser/inp2y.c index 3c358ee02..a3759cedf 100644 --- a/src/spicelib/parser/inp2y.c +++ b/src/spicelib/parser/inp2y.c @@ -40,10 +40,10 @@ void *gnode1, *gnode2, *inode1, *inode2; int error; /* error code temporary */ int error1=0; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ -void *mdfast; /* pointer to the actual model */ -void *fast; /* pointer to the actual instance */ -void *mdfast2, *mdfast3, *mdfast4, *mdfast5, *mdfast6; -void *fast2, *fast3, *fast4, *fast5, *fast6; +GENmodel *mdfast; /* pointer to the actual model */ +GENinstance *fast; /* pointer to the actual instance */ +GENmodel *mdfast2, *mdfast3, *mdfast4, *mdfast5, *mdfast6; +GENinstance *fast2, *fast3, *fast4, *fast5, *fast6; IFuid uid; /* uid for default model */ GENinstance *txl; IFvalue ptemp; /* a value structure to package into */ diff --git a/src/spicelib/parser/inp2z.c b/src/spicelib/parser/inp2z.c index abedec148..15f99a6d4 100644 --- a/src/spicelib/parser/inp2z.c +++ b/src/spicelib/parser/inp2z.c @@ -33,13 +33,13 @@ void INP2Z(CKTcircuit *ckt, INPtables * tab, card * current) void *node2; /* the second node's node pointer */ void *node3; /* the third node's node pointer */ int error; /* error code temporary */ - void *fast; /* pointer to the actual instance */ + GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ - void *mdfast; /* pointer to the actual model */ + GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid for default model */ diff --git a/src/spicelib/parser/inpaname.c b/src/spicelib/parser/inpaname.c index 5e294e745..5fa7a1a97 100644 --- a/src/spicelib/parser/inpaname.c +++ b/src/spicelib/parser/inpaname.c @@ -21,7 +21,7 @@ Author: 1985 Thomas L. Quarles int INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam, - void **fast, IFsimulator * sim, int *dataType, IFvalue * selector) + GENinstance **fast, IFsimulator * sim, int *dataType, IFvalue * selector) /* the name of the parameter to set */ /* the parameter union containing the value to set */ /* the circuit this device is a member of */ diff --git a/src/spicelib/parser/inppname.c b/src/spicelib/parser/inppname.c index 98bd255aa..994fd181f 100644 --- a/src/spicelib/parser/inppname.c +++ b/src/spicelib/parser/inppname.c @@ -17,7 +17,7 @@ Author: 1985 Thomas L. Quarles #include "iferrmsg.h" #include "inp.h" -int INPpName(char *parm, IFvalue * val, CKTcircuit *ckt, int dev, void *fast) +int INPpName(char *parm, IFvalue * val, CKTcircuit *ckt, int dev, GENinstance *fast) /* the name of the parameter to set */ /* the parameter union containing the value to set */ /* the circuit this device is a member of */ diff --git a/src/tclspice.c b/src/tclspice.c index 8ac540a57..b3484c56a 100755 --- a/src/tclspice.c +++ b/src/tclspice.c @@ -1255,10 +1255,10 @@ int get_mod_param TCL_CMDPROCARGS(clientData,interp,argc,argv) { found=TRUE; } else if (strcmp(paramname,opt->keyword)==0) { if (devptr) - err = (*(ft_sim->askInstanceQuest))(ft_curckt->ci_ckt, devptr, + err = (*(ft_sim->askInstanceQuest))(ft_curckt->ci_ckt, (GENinstance*) devptr, opt->id, &pv, (IFvalue *)NULL); else - err = (*(ft_sim->askModelQuest))(ft_curckt->ci_ckt, modptr, + err = (*(ft_sim->askModelQuest))(ft_curckt->ci_ckt, (GENmodel*) modptr, opt->id, &pv, (IFvalue *)NULL); if (err==OK) { sprintf(buf,"%g",pv.rValue); /* dataType is here always real */