use the type CKTnode instead of void*

This commit is contained in:
rlar 2010-08-11 18:54:31 +00:00
parent 773670b38f
commit 44a182c1ba
60 changed files with 257 additions and 195 deletions

View File

@ -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 :

View File

@ -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 *);

View File

@ -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 */

View File

@ -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 *);

View File

@ -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;

View File

@ -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);

View File

@ -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:

View File

@ -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

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);
}

View File

@ -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:

View File

@ -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;

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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);\
}

View File

@ -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) {

View File

@ -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;

View File

@ -60,7 +60,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
for(i=0;i<here->term;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;

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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)
{
/* .<something> Many possibilities */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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;

View File

@ -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 */

View File

@ -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);

View File

@ -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 <node> <node> <node> [<node>] <model> [<val>] [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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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;

View File

@ -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 */

View File

@ -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);

View File

@ -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;

View File

@ -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);