diff --git a/ChangeLog b/ChangeLog index 15d5267e1..3ddafda04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,65 @@ +2010-08-11 Robert Larice + * src/include/cktdefs.h , + * src/include/ifsim.h , + * src/include/inpdefs.h , + * src/include/noisedef.h , + * src/spicelib/analysis/ckt.h , + * src/spicelib/analysis/cktasknq.c , + * src/spicelib/analysis/cktdltn.c , + * src/spicelib/analysis/cktfnode.c , + * src/spicelib/analysis/cktgrnd.c , + * src/spicelib/analysis/cktmapn.c , + * src/spicelib/analysis/cktmkcur.c , + * src/spicelib/analysis/cktmkvol.c , + * src/spicelib/analysis/cktneweq.c , + * src/spicelib/analysis/cktnewn.c , + * src/spicelib/analysis/cktsetnp.c , + * src/spicelib/analysis/noisean.c , + * src/spicelib/analysis/pzaskq.c , + * src/spicelib/analysis/pzsetp.c , + * src/spicelib/analysis/senssetp.c , + * src/spicelib/analysis/tfsetp.c , + * src/spicelib/devices/asrc/asrcconv.c , + * src/spicelib/devices/asrc/asrcload.c , + * src/spicelib/devices/asrc/asrcpzld.c , + * src/spicelib/devices/asrc/asrcset.c , + * src/spicelib/devices/cktbindnode.c , + * src/spicelib/devices/ndev/ndevdefs.h , + * src/spicelib/devices/ndev/ndevset.c , + * src/spicelib/devices/urc/urcsetup.c , + * src/spicelib/parser/ifnewuid.c , + * src/spicelib/parser/inp.h , + * src/spicelib/parser/inp2b.c , + * src/spicelib/parser/inp2c.c , + * src/spicelib/parser/inp2d.c , + * src/spicelib/parser/inp2dot.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/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/inppas2.c , + * src/spicelib/parser/inppas3.c , + * src/spicelib/parser/inpptree.c , + * src/spicelib/parser/inpsymt.c , + * src/xspice/mif/mif_inp2.c : + use the type CKTnode instead of void* + 2010-08-11 Robert Larice * src/spicelib/devices/cktinit.c , * src/spicelib/parser/inp2b.c : diff --git a/src/include/cktdefs.h b/src/include/cktdefs.h index e3f32e92a..a30f80a3e 100644 --- a/src/include/cktdefs.h +++ b/src/include/cktdefs.h @@ -277,8 +277,8 @@ extern int CKTaccept(CKTcircuit *); extern int CKTacct(CKTcircuit *, void *, int , 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 *, GENinstance *, int , void *); +extern int CKTaskNodQst(CKTcircuit *, CKTnode *, int , IFvalue *, IFvalue *); +extern int CKTbindNode(CKTcircuit *, GENinstance *, int , CKTnode *); extern void CKTbreakDump(CKTcircuit *); extern int CKTclrBreak(CKTcircuit *); extern int CKTconvTest(CKTcircuit *); @@ -289,7 +289,7 @@ extern int CKTdltAnal(void *, void *, void *); extern int CKTdltInst(CKTcircuit *, void *); extern int CKTdltMod(CKTcircuit *, GENmodel *); extern int CKTdltNNum(CKTcircuit *, int); -extern int CKTdltNod(CKTcircuit *, void *); +extern int CKTdltNod(CKTcircuit *, CKTnode *); extern int CKTdoJob(CKTcircuit *, int , void *); extern void CKTdump(CKTcircuit *, double, void *); #ifdef CIDER @@ -300,15 +300,15 @@ extern int CKTfndAnal(CKTcircuit *, int *, void **, IFuid , void *, IFuid); extern int CKTfndBranch(CKTcircuit *, 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 CKTfndNode(CKTcircuit *, CKTnode **, IFuid); extern int CKTfndTask(CKTcircuit *, void **, IFuid ); -extern int CKTground(CKTcircuit *, void **, IFuid); +extern int CKTground(CKTcircuit *, CKTnode **, IFuid); extern int CKTic(CKTcircuit *); extern int CKTinit(CKTcircuit **); extern int CKTinst2Node(CKTcircuit *, void *, int , CKTnode **, IFuid *); extern int CKTlinkEq(CKTcircuit *, CKTnode *); extern int CKTload(CKTcircuit *); -extern int CKTmapNode(CKTcircuit *, void **, IFuid); +extern int CKTmapNode(CKTcircuit *, CKTnode **, IFuid); extern int CKTmkCur(CKTcircuit *, CKTnode **, IFuid , char *); extern int CKTmkNode(CKTcircuit *, CKTnode **); extern int CKTmkVolt(CKTcircuit *, CKTnode **, IFuid , char *); @@ -317,8 +317,8 @@ 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); -extern int CKTnewNode(CKTcircuit *, void **, IFuid); +extern int CKTnewEq(CKTcircuit *, CKTnode **, IFuid); +extern int CKTnewNode(CKTcircuit *, CKTnode **, IFuid); extern int CKTnewTask(CKTcircuit *, void **, IFuid, void **); extern int CKTnoise (CKTcircuit *ckt, int mode, int operation, Ndata *data); extern IFuid CKTnodName(CKTcircuit *, int); @@ -341,7 +341,7 @@ extern int CKTsenSetup(CKTcircuit *); extern int CKTsenUpdate(CKTcircuit *); extern int CKTsetAnalPm(CKTcircuit *, void *, int , IFvalue *, IFvalue *); extern int CKTsetBreak(CKTcircuit *, double); -extern int CKTsetNodPm(CKTcircuit *, void *, int , IFvalue *, IFvalue *); +extern int CKTsetNodPm(CKTcircuit *, CKTnode *, int , IFvalue *, IFvalue *); extern int CKTsetOpt(CKTcircuit *, void *, int , IFvalue *); extern int CKTsetup(CKTcircuit *); extern int CKTunsetup(CKTcircuit *); diff --git a/src/include/ifsim.h b/src/include/ifsim.h index 9ddd6333a..91f058d0c 100644 --- a/src/include/ifsim.h +++ b/src/include/ifsim.h @@ -236,7 +236,7 @@ union IFvalue { IFcomplex cValue; /* complex valued data */ char *sValue; /* string valued data */ IFuid uValue; /* UID valued data */ - IFnode nValue; /* node valued data */ + CKTnode *nValue; /* node valued data */ IFparseTree *tValue; /* parse tree */ struct { int numValue; /* length of vector */ @@ -347,21 +347,21 @@ struct IFsimulator { int (*deleteCircuit) (CKTcircuit *); /* destroy old circuit's data structures*/ - int (*newNode) (CKTcircuit *, void **, IFuid); + int (*newNode) (CKTcircuit *, CKTnode **, IFuid); /* create new node */ - int (*groundNode) (CKTcircuit *, void **, IFuid); + int (*groundNode) (CKTcircuit *, CKTnode **, IFuid); /* create ground node */ - int (*bindNode) (CKTcircuit *, GENinstance *, int, void *); + int (*bindNode) (CKTcircuit *, GENinstance *, int, CKTnode *); /* bind a node to a terminal */ - int (*findNode) (CKTcircuit *, void **, IFuid); + int (*findNode) (CKTcircuit *, CKTnode **, IFuid); /* find a node by name */ int (*instToNode) (CKTcircuit *, void *, int, void **, IFuid *); /* find the node attached to a terminal */ - int (*setNodeParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *); + int (*setNodeParm) (CKTcircuit *, CKTnode *, int, IFvalue *, IFvalue *); /* set a parameter on a node */ - int (*askNodeQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *); + int (*askNodeQuest) (CKTcircuit *, CKTnode *, int, IFvalue *, IFvalue *); /* ask a question about a node */ - int (*deleteNode) (CKTcircuit *, void *); + int (*deleteNode) (CKTcircuit *, CKTnode *); /* delete a node from the circuit */ int (*newInstance) (CKTcircuit *, GENmodel *, GENinstance **, IFuid); @@ -429,7 +429,7 @@ struct IFsimulator { */ struct IFfrontEnd { - int (*IFnewUid) (CKTcircuit *, IFuid *, IFuid, char *, int, void **); + int (*IFnewUid) (CKTcircuit *, IFuid *, IFuid, char *, int, CKTnode **); /* create a new UID in the circuit */ int (*IFdelUid) (CKTcircuit *, IFuid, int); /* create a new UID in the circuit */ diff --git a/src/include/inpdefs.h b/src/include/inpdefs.h index 08377e206..edffe3c80 100644 --- a/src/include/inpdefs.h +++ b/src/include/inpdefs.h @@ -25,7 +25,7 @@ struct INPtab { struct INPnTab { char *t_ent; - void *t_node; + CKTnode *t_node; struct INPnTab *t_next; }; @@ -86,7 +86,7 @@ struct INPmodel{ #define LOGICAL 1 #define PHYSICAL 2 -int IFnewUid(CKTcircuit *, IFuid *, IFuid, char *, int, void **); +int IFnewUid(CKTcircuit *, IFuid *, IFuid, char *, int, CKTnode **); int IFdelUid(CKTcircuit *, IFuid, int); int INPaName(char *, IFvalue *, CKTcircuit *, int *, char *, GENinstance **, IFsimulator *, int *, IFvalue *); @@ -105,7 +105,7 @@ int INPgetTok(char **, char **, int); int INPgetNetTok(char **, char **, int); void INPgetTree(char **, INPparseTree **, CKTcircuit *, INPtables *); IFvalue *INPgetValue(CKTcircuit *, char **, int, INPtables *); -int INPgndInsert(CKTcircuit *, char **, INPtables *, void **); +int INPgndInsert(CKTcircuit *, char **, INPtables *, CKTnode **); int INPinsertNofree(char **token, INPtables *tab); int INPinsert(char **, INPtables *); int INPretrieve(char **, INPtables *); @@ -117,8 +117,8 @@ 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, GENinstance *); -int INPtermInsert(CKTcircuit *, char **, INPtables *, void **); -int INPmkTerm(CKTcircuit *, char **, INPtables *, void **); +int INPtermInsert(CKTcircuit *, char **, INPtables *, CKTnode **); +int INPmkTerm(CKTcircuit *, char **, INPtables *, CKTnode **); int INPtypelook(char *); void INP2B(CKTcircuit *, INPtables *, card *); void INP2C(CKTcircuit *, INPtables *, card *); @@ -135,7 +135,7 @@ void INP2M(CKTcircuit *, INPtables *, card *); void INP2N(CKTcircuit *, INPtables *, card *); void INP2O(CKTcircuit *, INPtables *, card *); void INP2P(CKTcircuit *, INPtables *, card *); -void INP2Q(CKTcircuit *, INPtables *, card *, void *); +void INP2Q(CKTcircuit *, INPtables *, card *, CKTnode *); void INP2R(CKTcircuit *, INPtables *, card *); void INP2S(CKTcircuit *, INPtables *, card *); void INP2T(CKTcircuit *, INPtables *, card *); @@ -144,7 +144,7 @@ void INP2V(CKTcircuit *, INPtables *, card *); void INP2W(CKTcircuit *, INPtables *, card *); void INP2Y(CKTcircuit *, INPtables *, card *); void INP2Z(CKTcircuit *, INPtables *, card *); -int INP2dot(CKTcircuit *, INPtables *, card *, void *, void *); +int INP2dot(CKTcircuit *, INPtables *, card *, void *, CKTnode *); INPtables *INPtabInit(int); void INPkillMods(void); void INPtabEnd(INPtables *); diff --git a/src/include/noisedef.h b/src/include/noisedef.h index 793fe584d..c7fe5c1ed 100644 --- a/src/include/noisedef.h +++ b/src/include/noisedef.h @@ -14,8 +14,8 @@ typedef struct { int JOBtype; JOB *JOBnextJob; /* pointer to next thing to do */ char *JOBname; /* name of this job */ - IFnode output; /* noise output summation node */ - IFnode outputRef; /* noise output reference node */ + CKTnode *output; /* noise output summation node */ + CKTnode *outputRef; /* noise output reference node */ IFuid input; /* name of the AC source used as input reference */ double NstartFreq; double NstopFreq; diff --git a/src/spicelib/analysis/ckt.h b/src/spicelib/analysis/ckt.h index 0dd03c862..e0511844f 100644 --- a/src/spicelib/analysis/ckt.h +++ b/src/spicelib/analysis/ckt.h @@ -20,8 +20,8 @@ int CKTaccept( CKTcircuit *); int CKTacct( CKTcircuit *, void *, int , 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 *, GENinstance *, int , void *); +int CKTaskNodQst( CKTcircuit *, CKTnode *, int , IFvalue *, IFvalue *); +int CKTbindNode( CKTcircuit *, GENinstance *, int , CKTnode *); void CKTbreakDump( CKTcircuit *); int CKTclrBreak( CKTcircuit *); int CKTconvTest( CKTcircuit *); @@ -31,22 +31,22 @@ int CKTdestroy( CKTcircuit *); int CKTdltAnal( void *, void *, void *); int CKTdltInst( CKTcircuit *, void *); int CKTdltMod( CKTcircuit *, GENmodel *); -int CKTdltNod( CKTcircuit *, void *); +int CKTdltNod( CKTcircuit *, CKTnode *); 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 *, GENinstance **, IFuid , GENmodel *, IFuid ); int CKTfndMod( CKTcircuit *, int *, GENmodel **, IFuid ); -int CKTfndNode( CKTcircuit *, void **, IFuid ); +int CKTfndNode( CKTcircuit *, CKTnode **, IFuid ); int CKTfndTask( CKTcircuit *, void **, IFuid ); -int CKTground( CKTcircuit *, void **, IFuid ); +int CKTground( CKTcircuit *, CKTnode **, IFuid ); int CKTic( CKTcircuit *); int CKTinit( CKTcircuit **); int CKTinst2Node( CKTcircuit *, void *, int , CKTnode **, IFuid *); int CKTlinkEq(CKTcircuit*,CKTnode*); int CKTload( CKTcircuit *); -int CKTmapNode( CKTcircuit *, void **, IFuid ); +int CKTmapNode( CKTcircuit *, CKTnode **, IFuid ); int CKTmkCur( CKTcircuit *, CKTnode **, IFuid , char *); int CKTmkNode(CKTcircuit*,CKTnode**); int CKTmkVolt( CKTcircuit *, CKTnode **, IFuid , char *); @@ -55,8 +55,8 @@ 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 ); -int CKTnewNode( CKTcircuit *, void **, IFuid ); +int CKTnewEq( CKTcircuit *, CKTnode **, IFuid ); +int CKTnewNode( CKTcircuit *, CKTnode **, IFuid ); int CKTnewTask( CKTcircuit *, void **, IFuid ); IFuid CKTnodName( CKTcircuit *, int ); void CKTnodOut( CKTcircuit *); @@ -77,7 +77,7 @@ int CKTsenSetup( CKTcircuit *); int CKTsenUpdate( CKTcircuit *); int CKTsetAnalPm( CKTcircuit *, void *, int , IFvalue *, IFvalue *); int CKTsetBreak( CKTcircuit *, double ); -int CKTsetNodPm( CKTcircuit *, void *, int , IFvalue *, IFvalue *); +int CKTsetNodPm( CKTcircuit *, CKTnode *, int , IFvalue *, IFvalue *); int CKTsetOpt( CKTcircuit *, void *, int , IFvalue *); int CKTsetup( CKTcircuit *); int CKTunsetup(CKTcircuit *ckt); diff --git a/src/spicelib/analysis/cktasknq.c b/src/spicelib/analysis/cktasknq.c index d17fbb07f..28fc9bf27 100644 --- a/src/spicelib/analysis/cktasknq.c +++ b/src/spicelib/analysis/cktasknq.c @@ -19,21 +19,21 @@ Author: 1985 Thomas L. Quarles /* ARGSUSED */ int -CKTaskNodQst(CKTcircuit *ckt, void *node, int parm, IFvalue *value, IFvalue *selector) +CKTaskNodQst(CKTcircuit *ckt, CKTnode *node, int parm, IFvalue *value, IFvalue *selector) { if(!node) return(E_BADPARM); switch(parm) { case PARM_NS: - value->rValue = ((CKTnode *)node)->nodeset; + value->rValue = node->nodeset; break; case PARM_IC: - value->rValue = ((CKTnode *)node)->ic; + value->rValue = node->ic; break; case PARM_NODETYPE: - value->iValue = ((CKTnode *)node)->type; + value->iValue = node->type; break; default: diff --git a/src/spicelib/analysis/cktdltn.c b/src/spicelib/analysis/cktdltn.c index cb934edb9..787c477ab 100644 --- a/src/spicelib/analysis/cktdltn.c +++ b/src/spicelib/analysis/cktdltn.c @@ -14,9 +14,9 @@ int CKTdltNNum(CKTcircuit *cktp, int num); /* ARGSUSED */ int -CKTdltNod(CKTcircuit *ckt, void *node) +CKTdltNod(CKTcircuit *ckt, CKTnode *node) { - return CKTdltNNum(ckt, ((CKTnode *) node)->number); + return CKTdltNNum(ckt, node->number); } int diff --git a/src/spicelib/analysis/cktfnode.c b/src/spicelib/analysis/cktfnode.c index 5b9390b99..8f1b683d6 100644 --- a/src/spicelib/analysis/cktfnode.c +++ b/src/spicelib/analysis/cktfnode.c @@ -18,13 +18,13 @@ Author: 1985 Thomas L. Quarles /* ARGSUSED */ int -CKTfndNode(CKTcircuit *ckt, void **node, IFuid name) +CKTfndNode(CKTcircuit *ckt, CKTnode **node, IFuid name) { CKTnode *here; for (here = ckt->CKTnodes; here; here = here->next) { if(here->name == name) { - if(node) *node = (char *)here; + if(node) *node = here; return(OK); } } diff --git a/src/spicelib/analysis/cktgrnd.c b/src/spicelib/analysis/cktgrnd.c index 8c3d24c6e..062379636 100644 --- a/src/spicelib/analysis/cktgrnd.c +++ b/src/spicelib/analysis/cktgrnd.c @@ -17,14 +17,14 @@ Author: 1985 Thomas L. Quarles int -CKTground(CKTcircuit *inCkt, void **node, IFuid name) +CKTground(CKTcircuit *inCkt, CKTnode **node, IFuid name) { CKTcircuit *ckt = /* fixme, drop that */ inCkt; if(ckt->CKTnodes) { if(ckt->CKTnodes->name) { /*already exists - keep old name, but return it */ - if(node)*node = (char *)ckt->CKTnodes; + if(node) *node = ckt->CKTnodes; return(E_EXISTS); } ckt->CKTnodes->name = name; @@ -39,7 +39,7 @@ CKTground(CKTcircuit *inCkt, void **node, IFuid name) ckt->CKTnodes->next = (CKTnode *)NULL; ckt->CKTlastNode = ckt->CKTnodes; } - if(node)*node = (char *)ckt->CKTnodes; + if(node) *node = ckt->CKTnodes; return(OK); } diff --git a/src/spicelib/analysis/cktmapn.c b/src/spicelib/analysis/cktmapn.c index fd09ab8b7..b93282f95 100644 --- a/src/spicelib/analysis/cktmapn.c +++ b/src/spicelib/analysis/cktmapn.c @@ -19,7 +19,7 @@ Author: 1985 Thomas L. Quarles /* ARGSUSED *//* fixme abandoned */ int -CKTmapNode(CKTcircuit *ckt, void **node, IFuid name) +CKTmapNode(CKTcircuit *ckt, CKTnode **node, IFuid name) { CKTnode *here; int error; @@ -28,7 +28,7 @@ CKTmapNode(CKTcircuit *ckt, void **node, IFuid name) for (here = ckt->CKTnodes; here; here = here->next) { if(here->name == name) { - if(node) *node = (char *)here; + if(node) *node = here; return(E_EXISTS); } } @@ -40,11 +40,11 @@ CKTmapNode(CKTcircuit *ckt, void **node, IFuid name) (IFuid) NULL, name, UID_SIGNAL, - (void**)&mynode); /* get a uid for it */ + &mynode); /* get a uid for it */ if(error) return(error); mynode->name = uid; /* set the info we have */ mynode->type = SP_VOLTAGE; error = CKTlinkEq(ckt,mynode); /* and link it in */ - if(node) *node = (void *)mynode; /* and finally, return it */ + if(node) *node = mynode; /* and finally, return it */ return(OK); } diff --git a/src/spicelib/analysis/cktmkcur.c b/src/spicelib/analysis/cktmkcur.c index 4195f3454..7c015dbec 100644 --- a/src/spicelib/analysis/cktmkcur.c +++ b/src/spicelib/analysis/cktmkcur.c @@ -30,7 +30,7 @@ CKTmkCur(CKTcircuit *ckt, CKTnode **node, IFuid basename, char *suffix) if(error) return(error); checknode = mynode; error = (*(SPfrontEnd->IFnewUid))(ckt,&uid,basename, - suffix,UID_SIGNAL,(void**)&checknode); + suffix, UID_SIGNAL, &checknode); if(error) { FREE(mynode); if(node) *node = checknode; diff --git a/src/spicelib/analysis/cktmkvol.c b/src/spicelib/analysis/cktmkvol.c index f140395a0..c5bf80cd4 100644 --- a/src/spicelib/analysis/cktmkvol.c +++ b/src/spicelib/analysis/cktmkvol.c @@ -28,7 +28,7 @@ CKTmkVolt(CKTcircuit *ckt, CKTnode **node, IFuid basename, char *suffix) if(error) return(error); checknode = mynode; error = (*(SPfrontEnd->IFnewUid))(ckt,&uid,basename, - suffix,UID_SIGNAL,(void**)&checknode); + suffix, UID_SIGNAL, &checknode); if(error) { FREE(mynode); if(node) *node = checknode; diff --git a/src/spicelib/analysis/cktneweq.c b/src/spicelib/analysis/cktneweq.c index 5b9a7f65d..02b72f683 100644 --- a/src/spicelib/analysis/cktneweq.c +++ b/src/spicelib/analysis/cktneweq.c @@ -19,7 +19,7 @@ Author: 1985 Thomas L. Quarles int -CKTnewEq(CKTcircuit *inCkt, void **node, IFuid name) +CKTnewEq(CKTcircuit *inCkt, CKTnode **node, IFuid name) { CKTnode *mynode; CKTcircuit *ckt = /* fixme, drop that */ inCkt; @@ -28,7 +28,7 @@ CKTnewEq(CKTcircuit *inCkt, void **node, IFuid name) error = CKTmkNode(ckt,&mynode); if(error) return(error); - if(node) *node = (void *)mynode; + if(node) *node = mynode; mynode->name = name; error = CKTlinkEq(ckt,mynode); diff --git a/src/spicelib/analysis/cktnewn.c b/src/spicelib/analysis/cktnewn.c index b59e87624..f0ee91a2e 100644 --- a/src/spicelib/analysis/cktnewn.c +++ b/src/spicelib/analysis/cktnewn.c @@ -20,7 +20,7 @@ Author: 1985 Thomas L. Quarles /* should just call CKTnewEQ and set node type afterwards */ int -CKTnewNode(CKTcircuit *inCkt, void **node, IFuid name) +CKTnewNode(CKTcircuit *inCkt, CKTnode **node, IFuid name) { CKTcircuit *ckt = /* fixme, drop that */ inCkt; if(!(ckt->CKTnodes)) { /* starting the list - allocate both ground and 1 */ @@ -39,6 +39,6 @@ CKTnewNode(CKTcircuit *inCkt, void **node, IFuid name) ckt->CKTlastNode->type = SP_VOLTAGE; ckt->CKTlastNode->next = (CKTnode *)NULL; - if(node) *node = (void *)ckt->CKTlastNode; + if(node) *node = ckt->CKTlastNode; return(OK); } diff --git a/src/spicelib/analysis/cktsetnp.c b/src/spicelib/analysis/cktsetnp.c index 53856f6ea..affd68570 100644 --- a/src/spicelib/analysis/cktsetnp.c +++ b/src/spicelib/analysis/cktsetnp.c @@ -18,23 +18,23 @@ Author: 1985 Thomas L. Quarles /* ARGSUSED */ int -CKTsetNodPm(CKTcircuit *ckt, void *node, int parm, IFvalue *value, IFvalue *selector) +CKTsetNodPm(CKTcircuit *ckt, CKTnode *node, int parm, IFvalue *value, IFvalue *selector) { if(!node) return(E_BADPARM); switch(parm) { case PARM_NS: - ((CKTnode *)node)->nodeset = value->rValue; - ((CKTnode *)node)->nsGiven = 1; + node->nodeset = value->rValue; + node->nsGiven = 1; break; case PARM_IC: - ((CKTnode *)node)->ic = value->rValue; - ((CKTnode *)node)->icGiven = 1; + node->ic = value->rValue; + node->icGiven = 1; break; case PARM_NODETYPE: - ((CKTnode *)node)->type = value->iValue; + node->type = value->iValue; break; default: diff --git a/src/spicelib/analysis/noisean.c b/src/spicelib/analysis/noisean.c index e63f80ac5..ce62e43a6 100644 --- a/src/spicelib/analysis/noisean.c +++ b/src/spicelib/analysis/noisean.c @@ -43,8 +43,8 @@ NOISEan (CKTcircuit *ckt, int restart) NOISEAN *job = (NOISEAN*) (ckt->CKTcurJob); static char *noacinput = "noise input source has no AC value"; - posOutNode = ((CKTnode*) (job->output))->number; - negOutNode = ((CKTnode*) (job->outputRef))->number; + posOutNode = (job->output) -> number; + negOutNode = (job->outputRef) -> number; /* see if the source specified is AC */ inst = NULL; diff --git a/src/spicelib/analysis/pzaskq.c b/src/spicelib/analysis/pzaskq.c index c44fb44c3..a7c50b875 100644 --- a/src/spicelib/analysis/pzaskq.c +++ b/src/spicelib/analysis/pzaskq.c @@ -18,19 +18,19 @@ PZaskQuest(CKTcircuit *ckt, void *anal, int which, IFvalue *value) switch(which) { case PZ_NODEI: - value->nValue = (IFnode)CKTnum2nod(ckt,((PZAN*)anal)->PZin_pos); + value->nValue = CKTnum2nod(ckt, ((PZAN*)anal)->PZin_pos); break; case PZ_NODEG: - value->nValue = (IFnode)CKTnum2nod(ckt,((PZAN*)anal)->PZin_neg); + value->nValue = CKTnum2nod(ckt, ((PZAN*)anal)->PZin_neg); break; case PZ_NODEJ: - value->nValue = (IFnode)CKTnum2nod(ckt,((PZAN*)anal)->PZout_pos); + value->nValue = CKTnum2nod(ckt, ((PZAN*)anal)->PZout_pos); break; case PZ_NODEK: - value->nValue = (IFnode)CKTnum2nod(ckt,((PZAN*)anal)->PZout_neg); + value->nValue = CKTnum2nod(ckt, ((PZAN*)anal)->PZout_neg); break; case PZ_V: diff --git a/src/spicelib/analysis/pzsetp.c b/src/spicelib/analysis/pzsetp.c index c5d27c192..858189e4b 100644 --- a/src/spicelib/analysis/pzsetp.c +++ b/src/spicelib/analysis/pzsetp.c @@ -19,19 +19,19 @@ PZsetParm(CKTcircuit *ckt, void *anal, int which, IFvalue *value) switch(which) { case PZ_NODEI: - ((PZAN*)anal)->PZin_pos = ((CKTnode*)value->nValue)->number; + ((PZAN*)anal)->PZin_pos = (value->nValue)->number; break; case PZ_NODEG: - ((PZAN*)anal)->PZin_neg = ((CKTnode*)value->nValue)->number; + ((PZAN*)anal)->PZin_neg = (value->nValue)->number; break; case PZ_NODEJ: - ((PZAN*)anal)->PZout_pos = ((CKTnode*)value->nValue)->number; + ((PZAN*)anal)->PZout_pos = (value->nValue)->number; break; case PZ_NODEK: - ((PZAN*)anal)->PZout_neg = ((CKTnode*)value->nValue)->number; + ((PZAN*)anal)->PZout_neg = (value->nValue)->number; break; case PZ_V: diff --git a/src/spicelib/analysis/senssetp.c b/src/spicelib/analysis/senssetp.c index cbcf92d03..cd1bcbc39 100644 --- a/src/spicelib/analysis/senssetp.c +++ b/src/spicelib/analysis/senssetp.c @@ -19,14 +19,14 @@ SENSsetParam(CKTcircuit *ckt, void *anal, int which, IFvalue *value) switch(which) { case SENS_POS: - sinfo->output_pos = (CKTnode *) value->nValue; + sinfo->output_pos = value->nValue; sinfo->output_neg = NULL; sinfo->output_volt = 1; sinfo->step_type = SENS_DC; break; case SENS_NEG: - sinfo->output_neg = (CKTnode *) value->nValue; + sinfo->output_neg = value->nValue; break; case SENS_SRC: diff --git a/src/spicelib/analysis/tfsetp.c b/src/spicelib/analysis/tfsetp.c index 329460386..41ba004c1 100644 --- a/src/spicelib/analysis/tfsetp.c +++ b/src/spicelib/analysis/tfsetp.c @@ -18,12 +18,12 @@ TFsetParm(CKTcircuit *ckt, void *anal, int which, IFvalue *value) switch(which) { case TF_OUTPOS: - ((TFan *)anal)->TFoutPos = (CKTnode *)value->nValue; + ((TFan *)anal)->TFoutPos = value->nValue; ((TFan *)anal)->TFoutIsV = TRUE; ((TFan *)anal)->TFoutIsI = FALSE; break; case TF_OUTNEG: - ((TFan *)anal)->TFoutNeg = (CKTnode *)value->nValue; + ((TFan *)anal)->TFoutNeg = value->nValue; ((TFan *)anal)->TFoutIsV = TRUE; ((TFan *)anal)->TFoutIsI = FALSE; break; diff --git a/src/spicelib/devices/asrc/asrcconv.c b/src/spicelib/devices/asrc/asrcconv.c index 8cbf01d44..81a9abc76 100644 --- a/src/spicelib/devices/asrc/asrcconv.c +++ b/src/spicelib/devices/asrc/asrcconv.c @@ -41,7 +41,7 @@ ASRCconvTest(GENmodel *inModel, CKTcircuit *ckt) branch = CKTfndBranch(ckt,here->ASRCtree->vars[i].uValue); asrc_vals[i] = *(ckt->CKTrhsOld+branch); } else { - node_num = ((CKTnode *)(here->ASRCtree->vars[i].nValue)) + node_num = (here->ASRCtree->vars[i].nValue) ->number; asrc_vals[i] = *(ckt->CKTrhsOld+node_num); } diff --git a/src/spicelib/devices/asrc/asrcload.c b/src/spicelib/devices/asrc/asrcload.c index 61732195c..8c97bbf64 100644 --- a/src/spicelib/devices/asrc/asrcload.c +++ b/src/spicelib/devices/asrc/asrcload.c @@ -63,7 +63,7 @@ ASRCload(GENmodel *inModel, CKTcircuit *ckt) int branch = CKTfndBranch(ckt, here->ASRCtree->vars[i].uValue); asrc_vals[i] = *(ckt->CKTrhsOld + branch); } else { - int node_num = ((CKTnode *)(here->ASRCtree->vars[i]. nValue))->number; + int node_num = (here->ASRCtree->vars[i].nValue) -> number; asrc_vals[i] = *(ckt->CKTrhsOld + node_num); } diff --git a/src/spicelib/devices/asrc/asrcpzld.c b/src/spicelib/devices/asrc/asrcpzld.c index 16769f282..5cbe93a23 100644 --- a/src/spicelib/devices/asrc/asrcpzld.c +++ b/src/spicelib/devices/asrc/asrcpzld.c @@ -53,7 +53,7 @@ ASRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) int branch = CKTfndBranch(ckt,here->ASRCtree->vars[i].uValue); asrc_vals[i] = *(ckt->CKTrhsOld + branch); } else { - int node_num = ((CKTnode *)(here->ASRCtree->vars[i].nValue)) -> number; + int node_num = (here->ASRCtree->vars[i].nValue) -> number; asrc_vals[i] = *(ckt->CKTrhsOld + node_num); } } diff --git a/src/spicelib/devices/asrc/asrcset.c b/src/spicelib/devices/asrc/asrcset.c index a764bf7ae..0444141f3 100644 --- a/src/spicelib/devices/asrc/asrcset.c +++ b/src/spicelib/devices/asrc/asrcset.c @@ -53,7 +53,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ } #define MY_TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,((CKTnode*)(second))->number))\ +if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number))\ ==(double *)NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/cktbindnode.c b/src/spicelib/devices/cktbindnode.c index af08f1bdb..87ae46d6c 100644 --- a/src/spicelib/devices/cktbindnode.c +++ b/src/spicelib/devices/cktbindnode.c @@ -16,7 +16,7 @@ Author: 1985 Thomas L. Quarles #include "dev.h" int -CKTbindNode(CKTcircuit *ckt, GENinstance *fast, int term, void *node) +CKTbindNode(CKTcircuit *ckt, GENinstance *fast, int term, CKTnode *node) { int mappednode; SPICEdev **devs; @@ -24,7 +24,7 @@ CKTbindNode(CKTcircuit *ckt, GENinstance *fast, int term, void *node) int type = instance->GENmodPtr->GENmodType; devs = devices(); - mappednode = ((CKTnode *)node)->number; + mappednode = node->number; if (*((*devs[type]).DEVpublic.terms) >= term && term >0 ) { switch(term) { diff --git a/src/spicelib/devices/ndev/ndevdefs.h b/src/spicelib/devices/ndev/ndevdefs.h index 0a17c00bd..b758426a1 100644 --- a/src/spicelib/devices/ndev/ndevdefs.h +++ b/src/spicelib/devices/ndev/ndevdefs.h @@ -33,7 +33,7 @@ typedef struct sNDEVinstance { int NDEVstate; /* pointer to start of state vector for diode */ int pin[7]; /* max 7 terminals are allowed */ int term; /* the real number of terminals */ - void *node[7]; /* the array of CKT node's node pointer */ + CKTnode *node[7]; /* the array of CKT node's node pointer */ char *bname[7]; /* the electrode boundary label for numerical solver */ sCKTinfo CKTInfo; sDeviceinfo Ndevinfo; diff --git a/src/spicelib/devices/ndev/ndevset.c b/src/spicelib/devices/ndev/ndevset.c index d847a93b2..0a1c25780 100644 --- a/src/spicelib/devices/ndev/ndevset.c +++ b/src/spicelib/devices/ndev/ndevset.c @@ -60,7 +60,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ for(i=0;iterm;i++) { - node = (CKTnode *)here->node[i]; + node = here->node[i]; here->PINinfos[i].pin=node->number; strncpy(here->PINinfos[i].name,here->bname[i],32); here->PINinfos[i].V = 0.0; diff --git a/src/spicelib/devices/urc/urcsetup.c b/src/spicelib/devices/urc/urcsetup.c index 4f61b6f80..74611f790 100644 --- a/src/spicelib/devices/urc/urcsetup.c +++ b/src/spicelib/devices/urc/urcsetup.c @@ -193,7 +193,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = CKTbindNode(ckt,fast,1,lowr); if(error) return(error); error = CKTbindNode(ckt,fast,2, - (void *)CKTnum2nod(ckt, here->URCgndNode)); + CKTnum2nod(ckt, here->URCgndNode)); if(error) return(error); ptemp.rValue = prop; error = CKTpName("area",&ptemp,ckt,dtype,nameelt,&fast); @@ -212,7 +212,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = CKTbindNode(ckt,fast,1,lowr); if(error) return(error); error = CKTbindNode(ckt,fast,2, - (void *)CKTnum2nod(ckt, here->URCgndNode)); + CKTnum2nod(ckt, here->URCgndNode)); if(error) return(error); ptemp.rValue = c; error = CKTpName("capacitance",&ptemp,ckt,ctype,nameelt, @@ -236,7 +236,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = CKTbindNode(ckt,fast,1,hil); if(error) return(error); error = CKTbindNode(ckt,fast,2, - (void *)CKTnum2nod(ckt, here->URCgndNode)); + CKTnum2nod(ckt, here->URCgndNode)); if(error) return(error); ptemp.rValue = prop; error=CKTpName("area",&ptemp,ckt,dtype,nameelt,&fast); @@ -256,7 +256,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = CKTbindNode(ckt,fast,1,hil); if(error) return(error); error = CKTbindNode(ckt,fast,2, - (void *)CKTnum2nod(ckt, here->URCgndNode)); + CKTnum2nod(ckt, here->URCgndNode)); if(error) return(error); ptemp.rValue = c; error =CKTpName("capacitance",&ptemp,ckt,ctype,nameelt, diff --git a/src/spicelib/parser/ifnewuid.c b/src/spicelib/parser/ifnewuid.c index d7e5a24c1..182b37f09 100644 --- a/src/spicelib/parser/ifnewuid.c +++ b/src/spicelib/parser/ifnewuid.c @@ -25,7 +25,7 @@ Author: 1988 Thomas L. Quarles /* va: we should use tmalloc, whith also makes failure test */ int IFnewUid(CKTcircuit *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type, - void **nodedata) + CKTnode **nodedata) { char *newname; int error; diff --git a/src/spicelib/parser/inp.h b/src/spicelib/parser/inp.h index 8e45de439..d86f9ebf8 100644 --- a/src/spicelib/parser/inp.h +++ b/src/spicelib/parser/inp.h @@ -14,7 +14,7 @@ int IFeval(IFparseTree *tree, double gmin, double *result, double *vals, /* ifnewuid.c */ int IFnewUid(CKTcircuit *ckt, IFuid *newuid, IFuid olduid, char *suffix, int type, - void **nodedata); + CKTnode **nodedata); int IFdelUid(CKTcircuit *ckt, IFuid uid, int type); /* inp2xx.c */ @@ -33,7 +33,7 @@ void INP2L(CKTcircuit *ckt, INPtables *tab, card *current); void INP2M(CKTcircuit *ckt, INPtables *tab, card *current); void INP2O(CKTcircuit *ckt, INPtables *tab, card *current); void INP2P(CKTcircuit *ckt, INPtables *tab, card *current); -void INP2Q(CKTcircuit *ckt, INPtables *tab, card *current, void *gnode); +void INP2Q(CKTcircuit *ckt, INPtables *tab, card *current, CKTnode *gnode); void INP2R(CKTcircuit *ckt, INPtables *tab, card *current); void INP2S(CKTcircuit *ckt, INPtables *tab, card *current); void INP2T(CKTcircuit *ckt, INPtables *tab, card *current); @@ -42,7 +42,7 @@ void INP2V(CKTcircuit *ckt, INPtables *tab, card *current); void INP2W(CKTcircuit *ckt, INPtables *tab, card *current); void INP2Y(CKTcircuit *ckt, INPtables *tab, card *current); void INP2Z(CKTcircuit *ckt, INPtables *tab, card *current); -int INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode); +int INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, CKTnode *gnode); /* inpxxxx.c */ @@ -82,9 +82,9 @@ void INPgetTree(char **line, INPparseTree **pt, CKTcircuit *ckt, INPtables *tab) /* inpsymt.c */ INPtables * INPtabInit(int numlines); -int INPtermInsert(CKTcircuit *ckt, char **token, INPtables *tab, void **node); -int INPmkTerm(CKTcircuit *ckt, char **token, INPtables *tab, void **node); -int INPgndInsert(CKTcircuit *ckt, char **token, INPtables *tab, void **node); +int INPtermInsert(CKTcircuit *ckt, char **token, INPtables *tab, CKTnode **node); +int INPmkTerm(CKTcircuit *ckt, char **token, INPtables *tab, CKTnode **node); +int INPgndInsert(CKTcircuit *ckt, char **token, INPtables *tab, CKTnode **node); int INPretrieve(char **token, INPtables *tab); int INPinsert(char **token, INPtables *tab); int INPinsertNofree(char **token, INPtables *tab); diff --git a/src/spicelib/parser/inp2b.c b/src/spicelib/parser/inp2b.c index 3fae48b2d..d6302ef8b 100644 --- a/src/spicelib/parser/inp2b.c +++ b/src/spicelib/parser/inp2b.c @@ -22,8 +22,8 @@ void INP2B(CKTcircuit *ckt, INPtables * tab, card * current) char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2c.c b/src/spicelib/parser/inp2c.c index 50017e08c..6c45fcec8 100644 --- a/src/spicelib/parser/inp2c.c +++ b/src/spicelib/parser/inp2c.c @@ -24,8 +24,8 @@ void INP2C(CKTcircuit *ckt, INPtables * tab, card * current) char *model; /* the name of the capacitor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ double val; /* temp to held resistance */ int error; /* error code temporary */ int error1; /* secondary error code temporary */ diff --git a/src/spicelib/parser/inp2d.c b/src/spicelib/parser/inp2d.c index 53fe8fbee..0af73d8b8 100644 --- a/src/spicelib/parser/inp2d.c +++ b/src/spicelib/parser/inp2d.c @@ -23,8 +23,8 @@ void INP2D(CKTcircuit *ckt, INPtables * tab, card * current) char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inp2dot.c b/src/spicelib/parser/inp2dot.c index abee0859a..056f64d8f 100644 --- a/src/spicelib/parser/inp2dot.c +++ b/src/spicelib/parser/inp2dot.c @@ -16,7 +16,7 @@ Modified: 2000 AlansFixes static int dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, card *current, - void *task, void *gnode, void *foo) + void *task, CKTnode *gnode, void *foo) { int which; /* which analysis we are performing */ int i; /* generic loop variable */ @@ -24,8 +24,8 @@ dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, card *current, char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ char *steptype; /* ac analysis, type of stepping function */ @@ -59,15 +59,15 @@ dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, card *current, INPgetNetTok(&line, &nname1, 0); INPtermInsert(ckt, &nname1, tab, &node1); - ptemp.nValue = (IFnode) node1; + ptemp.nValue = node1; GCA(INPapName, (ckt, which, foo, "output", &ptemp)) if (*line != ')') { INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); - ptemp.nValue = (IFnode) node2; + ptemp.nValue = node2; } else { - ptemp.nValue = (IFnode) gnode; + ptemp.nValue = gnode; } GCA(INPapName, (ckt, which, foo, "outputref", &ptemp)) @@ -320,7 +320,7 @@ dot_dc(char *line, CKTcircuit *ckt, INPtables *tab, card *current, static int dot_tf(char *line, CKTcircuit *ckt, INPtables *tab, card *current, - void *task, void *gnode, void *foo) + void *task, CKTnode *gnode, void *foo) { char *name; /* the resistor's name */ int error; /* error code temporary */ @@ -329,8 +329,8 @@ dot_tf(char *line, CKTcircuit *ckt, INPtables *tab, card *current, int i; /* generic loop variable */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ /* .tf v( node1, node2 ) src */ /* .tf vsrc2 src */ @@ -354,12 +354,12 @@ dot_tf(char *line, CKTcircuit *ckt, INPtables *tab, card *current, } INPgetNetTok(&line, &nname1, 0); INPtermInsert(ckt, &nname1, tab, &node1); - ptemp.nValue = (IFnode) node1; + ptemp.nValue = node1; GCA(INPapName, (ckt, which, foo, "outpos", &ptemp)); if (*line != ')') { INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); - ptemp.nValue = (IFnode) node2; + ptemp.nValue = node2; GCA(INPapName, (ckt, which, foo, "outneg", &ptemp)); ptemp.sValue = (char *) MALLOC(sizeof(char) * @@ -367,7 +367,7 @@ dot_tf(char *line, CKTcircuit *ckt, INPtables *tab, card *current, (void) sprintf(ptemp.sValue, "V(%s,%s)", nname1, nname2); GCA(INPapName, (ckt, which, foo, "outname", &ptemp)); } else { - ptemp.nValue = (IFnode) gnode; + ptemp.nValue = gnode; GCA(INPapName, (ckt, which, foo, "outneg", &ptemp)); ptemp.sValue = (char *) MALLOC(sizeof(char) * (4 + strlen(nname1))); @@ -447,7 +447,7 @@ dot_tran(char *line, CKTcircuit *ckt, INPtables *tab, card *current, static int dot_sens(char *line, CKTcircuit *ckt, INPtables *tab, card *current, - void *task, void *gnode, void *foo) + void *task, CKTnode *gnode, void *foo) { char *name; /* the resistor's name */ int error; /* error code temporary */ @@ -457,8 +457,8 @@ dot_sens(char *line, CKTcircuit *ckt, INPtables *tab, card *current, int i; /* generic loop variable */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ char *steptype; /* ac analysis, type of stepping function */ which = -1; /* Bug fix from Glao Dezai */ @@ -489,13 +489,13 @@ dot_sens(char *line, CKTcircuit *ckt, INPtables *tab, card *current, } INPgetNetTok(&line, &nname1, 0); INPtermInsert(ckt, &nname1, tab, &node1); - ptemp.nValue = (IFnode) node1; + ptemp.nValue = node1; GCA(INPapName, (ckt, which, foo, "outpos", &ptemp)) if (*line != ')') { INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); - ptemp.nValue = (IFnode) node2; + ptemp.nValue = node2; GCA(INPapName, (ckt, which, foo, "outneg", &ptemp)); ptemp.sValue = (char *) MALLOC(sizeof(char) * @@ -503,7 +503,7 @@ dot_sens(char *line, CKTcircuit *ckt, INPtables *tab, card *current, (void) sprintf(ptemp.sValue, "V(%s,%s)", nname1, nname2); GCA(INPapName, (ckt, which, foo, "outname", &ptemp)); } else { - ptemp.nValue = (IFnode) gnode; + ptemp.nValue = gnode; GCA(INPapName, (ckt, which, foo, "outneg", &ptemp)); ptemp.sValue = (char *) MALLOC(sizeof(char) * (4 + strlen(nname1))); @@ -633,7 +633,7 @@ dot_options(char *line, CKTcircuit *ckt, INPtables *tab, card *current, int -INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode) +INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, CKTnode *gnode) { /* . Many possibilities */ diff --git a/src/spicelib/parser/inp2e.c b/src/spicelib/parser/inp2e.c index 837f83b59..f861ef358 100644 --- a/src/spicelib/parser/inp2e.c +++ b/src/spicelib/parser/inp2e.c @@ -23,10 +23,10 @@ void INP2E(CKTcircuit *ckt, INPtables * tab, card * current) char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ - void *node4; /* the fourth node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ + CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inp2f.c b/src/spicelib/parser/inp2f.c index 023ce0a34..83abb7426 100644 --- a/src/spicelib/parser/inp2f.c +++ b/src/spicelib/parser/inp2f.c @@ -21,8 +21,8 @@ void INP2F(CKTcircuit *ckt, INPtables * tab, card * current) char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inp2g.c b/src/spicelib/parser/inp2g.c index bdade3501..2b07f8e4b 100644 --- a/src/spicelib/parser/inp2g.c +++ b/src/spicelib/parser/inp2g.c @@ -23,10 +23,10 @@ void INP2G(CKTcircuit *ckt, INPtables * tab, card * current) char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ - void *node4; /* the fourth node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ + CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inp2h.c b/src/spicelib/parser/inp2h.c index c7be88e17..7cd514007 100644 --- a/src/spicelib/parser/inp2h.c +++ b/src/spicelib/parser/inp2h.c @@ -21,8 +21,8 @@ void INP2H(CKTcircuit *ckt, INPtables * tab, card * current) char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inp2i.c b/src/spicelib/parser/inp2i.c index b9e27a0cf..2f4e6c091 100644 --- a/src/spicelib/parser/inp2i.c +++ b/src/spicelib/parser/inp2i.c @@ -22,8 +22,8 @@ void INP2I(CKTcircuit *ckt, INPtables * tab, card * current) char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inp2j.c b/src/spicelib/parser/inp2j.c index 04b8f6a09..8593004fa 100644 --- a/src/spicelib/parser/inp2j.c +++ b/src/spicelib/parser/inp2j.c @@ -22,9 +22,9 @@ void INP2J(CKTcircuit *ckt, INPtables * tab, card * current) char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inp2l.c b/src/spicelib/parser/inp2l.c index 79ce44ba7..8cef02051 100644 --- a/src/spicelib/parser/inp2l.c +++ b/src/spicelib/parser/inp2l.c @@ -24,8 +24,8 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, card * current) char *model; /* the name of the inductor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ double val; /* temp to held inductance */ int error; /* error code temporary */ int error1; /* secondary error code temporary */ diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index 8301aecda..96f389349 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -34,13 +34,13 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current) char *nname7; /* the seventh node's name */ char *save; /* saj - used to save the posn of the start of the parameters if the model is a mosfet*/ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ - void *node4; /* the fourth node's node pointer */ - void *node5; /* the fifth node's node pointer */ - void *node6; /* the sixth node's node pointer */ - void *node7; /* the seventh node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ + CKTnode *node4; /* the fourth node's node pointer */ + CKTnode *node5; /* the fifth node's node pointer */ + CKTnode *node6; /* the sixth node's node pointer */ + CKTnode *node7; /* the seventh node's node pointer */ int error; /* error code temporary */ int nodeflag; /* flag indicating 4 or 5 (or 6 or 7) nodes */ GENinstance *fast; /* pointer to the actual instance */ diff --git a/src/spicelib/parser/inp2n.c b/src/spicelib/parser/inp2n.c index 800b52d2e..65fbb4a14 100644 --- a/src/spicelib/parser/inp2n.c +++ b/src/spicelib/parser/inp2n.c @@ -34,7 +34,7 @@ void INP2N(CKTcircuit *ckt, INPtables * tab, card * current) char *nnamex; /* serve as a temporary name */ char *nname[7]; /* the array of CKT node's name */ char *bname[7]; /* the array of NDEV electrode's name */ - void *node[7]; /* the array of CKT node's node pointer */ + CKTnode *node[7]; /* the array of CKT node's node pointer */ int error; /* error code temporary */ int i; diff --git a/src/spicelib/parser/inp2o.c b/src/spicelib/parser/inp2o.c index 6a3b9e75f..c86ac6277 100644 --- a/src/spicelib/parser/inp2o.c +++ b/src/spicelib/parser/inp2o.c @@ -24,10 +24,10 @@ void INP2O(CKTcircuit *ckt, INPtables * tab, card * current) char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ - void *node4; /* the fourth node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ + CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2p.c b/src/spicelib/parser/inp2p.c index e76d4badf..088fcf43c 100644 --- a/src/spicelib/parser/inp2p.c +++ b/src/spicelib/parser/inp2p.c @@ -27,9 +27,9 @@ char *model; /* the name of the cpl's model */ char **nname1; /* the first node's name */ char **nname2; /* the second node's name */ char *ground; -void **node1; /* the first node's node pointer */ -void **node2; /* the second node's node pointer */ -void *groundnode; +CKTnode **node1; /* the first node's node pointer */ +CKTnode **node2; /* the second node's node pointer */ +CKTnode *groundnode; int error; /* error code temporary */ int error1=0; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ @@ -64,8 +64,8 @@ int num, i; nname1 = (char **) tmalloc(num * sizeof(char *)); nname2 = (char **) tmalloc(num * sizeof(char *)); - node1 = (void **) tmalloc(num * sizeof(void *)); - node2 = (void **) tmalloc(num * sizeof(void *)); + node1 = (CKTnode **) tmalloc(num * sizeof(CKTnode *)); + node2 = (CKTnode **) tmalloc(num * sizeof(CKTnode *)); for (i = 0; i < num; i++) { INPgetNetTok(&line,&(nname1[i]),1); diff --git a/src/spicelib/parser/inp2q.c b/src/spicelib/parser/inp2q.c index 59a7858c4..b74bd17e3 100644 --- a/src/spicelib/parser/inp2q.c +++ b/src/spicelib/parser/inp2q.c @@ -15,7 +15,7 @@ Modified: 2001 Paolo Nenzi (Cider Integration) #include "error.h" /* controlled_exit() */ #endif -void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, void *gnode) +void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode) { /* Qname [] [] [OFF] @@ -31,12 +31,12 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, void *gnode) #ifdef ADMS char *nname5; /* the fifth node's name */ #endif - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ - void *node4; /* the fourth node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ + CKTnode *node4; /* the fourth node's node pointer */ #ifdef ADMS - void *node5; /* the fifth node's node pointer */ + CKTnode *node5; /* the fifth node's node pointer */ #endif int error; /* error code temporary */ int nodeflag; /* flag indicating 4 or 5 nodes */ diff --git a/src/spicelib/parser/inp2r.c b/src/spicelib/parser/inp2r.c index e1b484d3a..19814de84 100644 --- a/src/spicelib/parser/inp2r.c +++ b/src/spicelib/parser/inp2r.c @@ -30,8 +30,8 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current) char *model; /* the name of the resistor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ double val; /* temp to held resistance */ int error; /* error code temporary */ int error1; /* secondary error code temporary */ diff --git a/src/spicelib/parser/inp2s.c b/src/spicelib/parser/inp2s.c index c2d07ac0d..b7b0e228b 100644 --- a/src/spicelib/parser/inp2s.c +++ b/src/spicelib/parser/inp2s.c @@ -26,10 +26,10 @@ void INP2S(CKTcircuit *ckt, INPtables * tab, card * current) char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ - void *node4; /* the fourth node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ + CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast; /* pointer to the actual model */ diff --git a/src/spicelib/parser/inp2t.c b/src/spicelib/parser/inp2t.c index 5df22c1fe..d0478ad60 100644 --- a/src/spicelib/parser/inp2t.c +++ b/src/spicelib/parser/inp2t.c @@ -24,10 +24,10 @@ void INP2T(CKTcircuit *ckt, INPtables * tab, card * current) char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ - void *node4; /* the fourth node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ + CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2u.c b/src/spicelib/parser/inp2u.c index dad139437..17a277b47 100644 --- a/src/spicelib/parser/inp2u.c +++ b/src/spicelib/parser/inp2u.c @@ -23,9 +23,9 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current) char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ diff --git a/src/spicelib/parser/inp2v.c b/src/spicelib/parser/inp2v.c index b3133925d..e54b769a4 100644 --- a/src/spicelib/parser/inp2v.c +++ b/src/spicelib/parser/inp2v.c @@ -22,8 +22,8 @@ void INP2V(CKTcircuit *ckt, INPtables * tab, card * current) char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inp2w.c b/src/spicelib/parser/inp2w.c index 16afea9b6..36d3aad4f 100644 --- a/src/spicelib/parser/inp2w.c +++ b/src/spicelib/parser/inp2w.c @@ -24,8 +24,8 @@ void INP2W(CKTcircuit *ckt, INPtables * tab, card * current) char *model; /* the name of the resistor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast; /* pointer to the actual model */ diff --git a/src/spicelib/parser/inp2y.c b/src/spicelib/parser/inp2y.c index 6bd5b5b24..c970cea87 100644 --- a/src/spicelib/parser/inp2y.c +++ b/src/spicelib/parser/inp2y.c @@ -34,9 +34,9 @@ char rname1[10], rname2[10], rname3[10]; char cname1[10], cname2[10], cname3[10], cname4[10]; char *internal1, *internal2; char *ground1, *ground2; -void *node1; /* the first node's node pointer */ -void *node2; /* the second node's node pointer */ -void *gnode1, *gnode2, *inode1, *inode2; +CKTnode *node1; /* the first node's node pointer */ +CKTnode *node2; /* the second node's node pointer */ +CKTnode *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 */ diff --git a/src/spicelib/parser/inp2z.c b/src/spicelib/parser/inp2z.c index efbf46c01..f0a767352 100644 --- a/src/spicelib/parser/inp2z.c +++ b/src/spicelib/parser/inp2z.c @@ -29,9 +29,9 @@ void INP2Z(CKTcircuit *ckt, INPtables * tab, card * current) char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ - void *node1; /* the first node's node pointer */ - void *node2; /* the second node's node pointer */ - void *node3; /* the third node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ + CKTnode *node2; /* the second node's node pointer */ + CKTnode *node3; /* the third node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ diff --git a/src/spicelib/parser/inppas2.c b/src/spicelib/parser/inppas2.c index 238737e74..3e14dce3e 100644 --- a/src/spicelib/parser/inppas2.c +++ b/src/spicelib/parser/inppas2.c @@ -33,7 +33,7 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, void *task) char c; char *groundname = "0"; char *gname; - void *gnode; + CKTnode *gnode; int error; /* used by the macros defined above */ #ifdef HAS_WINDOWS int linecount = 0, actcount = 0; diff --git a/src/spicelib/parser/inppas3.c b/src/spicelib/parser/inppas3.c index 8aba728ec..657168cbe 100644 --- a/src/spicelib/parser/inppas3.c +++ b/src/spicelib/parser/inppas3.c @@ -37,7 +37,7 @@ INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, void *task, resistance into */ int which; /* which analysis we are performing */ int length; /* length of a name */ - void *node1; /* the first node's node pointer */ + CKTnode *node1; /* the first node's node pointer */ #ifdef TRACE /* SDB debug statement */ diff --git a/src/spicelib/parser/inpptree.c b/src/spicelib/parser/inpptree.c index 8bdeb0475..7a78c25b1 100644 --- a/src/spicelib/parser/inpptree.c +++ b/src/spicelib/parser/inpptree.c @@ -833,7 +833,7 @@ static INPparseNode *mkfnode(const char *fname, INPparseNode * arg) int i; INPparseNode *p; char buf[128], *name, *s; - IFnode temp; + CKTnode *temp; /* Make sure the case is ok. */ (void) strcpy(buf, fname); diff --git a/src/spicelib/parser/inpsymt.c b/src/spicelib/parser/inpsymt.c index 6dc9b0cd8..cfd03a830 100644 --- a/src/spicelib/parser/inpsymt.c +++ b/src/spicelib/parser/inpsymt.c @@ -43,7 +43,7 @@ INPtables *INPtabInit(int numlines) /* insert 'token' into the terminal symbol table */ /* create a NEW NODE and return a pointer to it in *node */ -int INPtermInsert(CKTcircuit *ckt, char **token, INPtables * tab, void **node) +int INPtermInsert(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node) { int key; int error; @@ -79,7 +79,7 @@ int INPtermInsert(CKTcircuit *ckt, char **token, INPtables * tab, void **node) /* USE node as the node pointer */ -int INPmkTerm(CKTcircuit *ckt, char **token, INPtables * tab, void **node) +int INPmkTerm(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node) { int key; struct INPnTab *t; @@ -107,7 +107,7 @@ int INPmkTerm(CKTcircuit *ckt, char **token, INPtables * tab, void **node) /* insert 'token' into the terminal symbol table as a name for ground*/ -int INPgndInsert(CKTcircuit *ckt, char **token, INPtables * tab, void **node) +int INPgndInsert(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node) { int key; int error; diff --git a/src/xspice/mif/mif_inp2.c b/src/xspice/mif/mif_inp2.c index 44c1b20fe..54ab6db07 100755 --- a/src/xspice/mif/mif_inp2.c +++ b/src/xspice/mif/mif_inp2.c @@ -853,7 +853,7 @@ MIFget_port( case MIF_DIFF_RESISTANCE: /* Call the spice3c1 function to put this node in the node list in ckt */ - INPtermInsert(ckt, next_token, tab,(void **)pos_node); + INPtermInsert(ckt, next_token, tab, pos_node); /* store the equation number and node identifier */ /* This is the equivalent of what CKTbindNode() does in 3C1 */ @@ -920,7 +920,7 @@ MIFget_port( // node = "0"; // deleted by K.A. March 5th 2000, this is incorrect, it creates a new pointer // that cause a crash in INPtermInsert() - INPtermInsert(ckt, &node, tab,(void **)neg_node); + INPtermInsert(ckt, &node, tab, neg_node); fast->conn[conn_num]->port[port_num]->neg_node_str = node; fast->conn[conn_num]->port[port_num]->smp_data.neg_node = neg_node[0]->number; @@ -936,7 +936,7 @@ MIFget_port( *status = MIF_ERROR; return; } - INPtermInsert(ckt, next_token, tab,(void **)neg_node); + INPtermInsert(ckt, next_token, tab, neg_node); fast->conn[conn_num]->port[port_num]->neg_node_str = *next_token; fast->conn[conn_num]->port[port_num]->smp_data.neg_node = neg_node[0]->number; *next_token = MIFget_token(line, next_token_type);