CKTfndDev(), unuse the type argument

This commit is contained in:
rlar 2013-07-04 19:43:16 +02:00
parent 390dccd44b
commit 6c80cb4062
4 changed files with 12 additions and 7 deletions

View File

@ -615,10 +615,10 @@ finddev_special(
int type = -1;
// assert(third && *third == NULL); for all invocations
*devptr = ft_sim->findInstance (ckt, &type, devptr, name);
*devptr = ft_sim->findInstance (ckt, NULL, devptr, name);
if (*devptr) {
*device_or_model = 0;
return (type);
return (*devptr)->GENmodPtr->GENmodType;
}
type = -1;
@ -1217,9 +1217,9 @@ finddev(CKTcircuit *ckt, char *name, GENinstance **devptr, GENmodel **modptr)
int type = -1;
// assert(third && *third == NULL); for all invocations
*devptr = ft_sim->findInstance (ckt, &type, devptr, name);
*devptr = ft_sim->findInstance (ckt, NULL, devptr, name);
if (*devptr)
return (type);
return (*devptr)->GENmodPtr->GENmodType;
type = -1;
*devptr = NULL;

View File

@ -41,10 +41,12 @@ INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam,
* WILL be set on return unless error is not OK
*/
// assert(third) for all invocations
*fast = sim->findInstance (ckt, dev, fast, devnam);
*fast = sim->findInstance (ckt, NULL, fast, devnam);
if (*fast == NULL)
return (E_NODEV);
*dev = (*fast)->GENmodPtr->GENmodType;
/* now find the parameter - hunt through the parameter tables for
* this device type and look for a name match of an 'ask'able
* parameter.

View File

@ -1395,12 +1395,13 @@ get_mod_param TCL_CMDPROCARGS(clientData, interp, argc, argv)
/* get the unique IFuid for name (device/model) */
INPretrieve(&name, ft_curckt->ci_symtab);
// assert(third && *third == NULL);
devptr = ft_sim->findInstance (ft_curckt->ci_ckt, &typecode, &devptr, name);
devptr = ft_sim->findInstance (ft_curckt->ci_ckt, NULL, &devptr, name);
if (!devptr) {
typecode = -1;
devptr = NULL;
err = ft_sim->findModel (ft_curckt->ci_ckt, &typecode, &modptr, name);
} else {
typecode = devptr->GENmodPtr->GENmodType;
err = OK;
}
if (err != OK) {

View File

@ -43,10 +43,12 @@ SENstartup(CKTcircuit *ckt, int restart)
fast = NULL;
// assert(third && *third == NULL);
fast = CKTfndDev(ckt, &type, &fast, ckt->CKTsenInfo->SENdevices[i]);
fast = CKTfndDev(ckt, NULL, &fast, ckt->CKTsenInfo->SENdevices[i]);
if (!fast)
return E_NODEV;
type = fast->GENmodPtr->GENmodType;
#ifdef SENSDEBUG
printf("SENstartup Instance: %s Design parameter: %s\n", ckt->CKTsenInfo->SENdevices[i],
ckt->CKTsenInfo->SENparmNames[i]);