drop (GENmodel*) casts
This commit is contained in:
parent
a8c64094fc
commit
aa11b7b84f
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
|||
2010-08-10 Robert Larice
|
||||
* src/frontend/spiceif.c ,
|
||||
* src/spicelib/analysis/cktmask.c ,
|
||||
* src/spicelib/analysis/cktmcrt.c ,
|
||||
* src/spicelib/analysis/cluster.c ,
|
||||
* src/spicelib/analysis/dctrcurv.c ,
|
||||
* src/spicelib/devices/cktcrte.c ,
|
||||
* src/spicelib/devices/cktfinddev.c :
|
||||
drop (GENmodel*) casts, which are no longer necessary
|
||||
|
||||
2010-08-09 Robert Larice
|
||||
* src/frontend/display.c ,
|
||||
* src/frontend/parser/input.c ,
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val )
|
|||
fprintf(cp_err, "Error: no such model %s.\n", val);
|
||||
return;
|
||||
}
|
||||
newMod = (GENmodel*)(inpmod->INPmodfast);
|
||||
newMod = inpmod->INPmodfast;
|
||||
|
||||
/* see if new model name same as current model name */
|
||||
if ( newMod->GENmodName == curMod->GENmodName ) {
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
CKTmodAsk(CKTcircuit *ckt, GENmodel *modfast, int which, IFvalue *value, IFvalue *selector)
|
||||
{
|
||||
int type = ((GENmodel *)modfast)->GENmodType;
|
||||
int type = modfast->GENmodType;
|
||||
if((*DEVices[type]).DEVmodAsk) {
|
||||
return( (*((*DEVices[type]).DEVmodAsk)) (ckt,
|
||||
(GENmodel *)modfast,which,value) );
|
||||
modfast, which, value) );
|
||||
}
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name)
|
|||
if(mymodfast == (GENmodel *)NULL) return(E_NOMEM);
|
||||
mymodfast->GENmodType = type;
|
||||
mymodfast->GENmodName = name;
|
||||
mymodfast->GENnextModel =(GENmodel *)(ckt->CKThead[type]);
|
||||
ckt->CKThead[type]=(GENmodel *)mymodfast;
|
||||
mymodfast->GENnextModel = ckt->CKThead[type];
|
||||
ckt->CKThead[type] = mymodfast;
|
||||
if(modfast) *modfast=mymodfast;
|
||||
return(OK);
|
||||
} else if (error==0) {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ int CLUsetup(CKTcircuit *ckt){
|
|||
|
||||
/* count the number of connections expected */
|
||||
i = INPtypelook("Isource");
|
||||
for(mod = (GENmodel *)ckt->CKThead[i];
|
||||
for(mod = ckt->CKThead[i];
|
||||
mod != NULL;
|
||||
mod = mod->GENnextModel)
|
||||
for (inst = mod->GENinstances;
|
||||
|
|
@ -115,7 +115,7 @@ static int setup_output(CKTcircuit *ckt){
|
|||
lastTimeSent = 0;
|
||||
type = INPtypelook("Isource");
|
||||
|
||||
for(mod = (GENmodel *)ckt->CKThead[type];
|
||||
for(mod = ckt->CKThead[type];
|
||||
mod != NULL;
|
||||
mod = mod->GENnextModel)
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ static int setup_input(CKTcircuit *ckt){
|
|||
input->time = -1;
|
||||
|
||||
/*Find the Isource to control*/
|
||||
for(mod = (GENmodel *)ckt->CKThead[type];
|
||||
for(mod = ckt->CKThead[type];
|
||||
mod != NULL;
|
||||
mod = mod->GENnextModel)
|
||||
|
||||
|
|
|
|||
|
|
@ -305,10 +305,10 @@ resume:
|
|||
1/(((RESinstance *)(cv->TRCVvElt[i]))->RESresist);
|
||||
/* Note: changing the resistance does nothing */
|
||||
/* changing the conductance 1/r instead */
|
||||
DEVices[rcode]->DEVload((GENmodel*)(cv->TRCVvElt[i]->GENmodPtr),ckt);
|
||||
DEVices[rcode]->DEVload(cv->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
|
||||
/*
|
||||
* RESload((GENmodel*)(cv->TRCVvElt[i]->GENmodPtr),ckt);
|
||||
* RESload(cv->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -496,9 +496,9 @@ nextstep:;
|
|||
/* This code should update resistance and conductance */
|
||||
((RESinstance*)(cv->TRCVvElt[i]))->RESconduct =
|
||||
1/(((RESinstance*)(cv->TRCVvElt[i]))->RESresist);
|
||||
DEVices[rcode]->DEVload((GENmodel*)(cv->TRCVvElt[i]->GENmodPtr),ckt);
|
||||
DEVices[rcode]->DEVload(cv->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
/*
|
||||
* RESload((GENmodel*)(cv->TRCVvElt[i]->GENmodPtr),ckt);
|
||||
* RESload(cv->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
*/
|
||||
}
|
||||
/* PN Temp Sweep - serban */
|
||||
|
|
@ -540,10 +540,10 @@ nextstep:;
|
|||
1/(((RESinstance*)(cv->TRCVvElt[i]))->RESresist);
|
||||
|
||||
((RESinstance*)(cv->TRCVvElt[i]))->RESresGiven = cv->TRCVgSave[i];
|
||||
DEVices[rcode]->DEVload((GENmodel*)(cv->TRCVvElt[i]->GENmodPtr),ckt);
|
||||
DEVices[rcode]->DEVload(cv->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
|
||||
/*
|
||||
* RESload((GENmodel*)(cv->TRCVvElt[i]->GENmodPtr),ckt);
|
||||
* RESload(cv->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
*/
|
||||
}
|
||||
else if(cv->TRCVvType[i] == TEMP_CODE) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ int
|
|||
CKTcrtElt(CKTcircuit *ckt, GENmodel *inModPtr, GENinstance **inInstPtr, IFuid name)
|
||||
{
|
||||
GENinstance *instPtr = NULL; /* instPtr points to the data struct for per-instance data */
|
||||
GENmodel *modPtr = (GENmodel*)inModPtr; /* modPtr points to the data struct for per-model data */
|
||||
GENmodel *modPtr = /*fixme*/ inModPtr; /* modPtr points to the data struct for per-model data */
|
||||
|
||||
SPICEdev **DEVices;
|
||||
int error;
|
||||
|
|
@ -27,10 +27,10 @@ CKTcrtElt(CKTcircuit *ckt, GENmodel *inModPtr, GENinstance **inInstPtr, IFuid na
|
|||
|
||||
DEVices = devices();
|
||||
|
||||
if( (GENmodel *)modPtr == (GENmodel*)NULL )
|
||||
if(!modPtr)
|
||||
return E_NOMOD;
|
||||
|
||||
type = ((GENmodel*)modPtr)->GENmodType;
|
||||
type = modPtr->GENmodType;
|
||||
|
||||
error = CKTfndDev(ckt, &type, &instPtr, name, inModPtr,
|
||||
(char *)NULL );
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ CKTfndDev(CKTcircuit *Ckt, int *type, GENinstance **fast, IFuid name, GENmodel *
|
|||
if (*type >= 0 && *type < DEVmaxnum) {
|
||||
/* have device type, need to find model & device */
|
||||
/* look through all models */
|
||||
for (mods = (GENmodel *)ckt->CKThead[*type];
|
||||
for (mods = ckt->CKThead[*type];
|
||||
mods != NULL ;
|
||||
mods = mods->GENnextModel)
|
||||
{
|
||||
|
|
@ -73,7 +73,7 @@ CKTfndDev(CKTcircuit *Ckt, int *type, GENinstance **fast, IFuid name, GENmodel *
|
|||
for(*type = 0; *type < DEVmaxnum; (*type)++) {
|
||||
/* need to find model & device */
|
||||
/* look through all models */
|
||||
for(mods=(GENmodel *)ckt->CKThead[*type];mods!=NULL;
|
||||
for(mods = ckt->CKThead[*type]; mods != NULL;
|
||||
mods = mods->GENnextModel)
|
||||
{
|
||||
/* and all instances */
|
||||
|
|
|
|||
Loading…
Reference in New Issue