mop up, in the shadow of the last two commits
This commit is contained in:
parent
6a6a52ebbe
commit
2ebe2d6277
|
|
@ -1,4 +1,7 @@
|
|||
2011-05-01 Robert Larice
|
||||
* src/spicelib/parser/inpaname.c ,
|
||||
* src/spicelib/parser/inpdpar.c ,
|
||||
* src/spicelib/parser/inppname.c ,
|
||||
* src/xspice/mif/mifgetmod.c :
|
||||
mop up, in the shadow of the last two commits
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,8 @@ INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam,
|
|||
* parameter.
|
||||
*/
|
||||
for (i = 0; i < *(sim->devices[*dev]->numInstanceParms); i++) {
|
||||
if (strcmp(parm,
|
||||
sim->devices[*dev]->instanceParms[i].keyword) == 0
|
||||
&& (sim->devices[*dev]->instanceParms[i].dataType &
|
||||
IF_ASK)) {
|
||||
if (strcmp(parm, sim->devices[*dev]->instanceParms[i].keyword) == 0
|
||||
&& (sim->devices[*dev]->instanceParms[i].dataType & IF_ASK)) {
|
||||
/* found it, so we ask the question using the device info we got
|
||||
* above and put the results in the IFvalue structure our caller
|
||||
* gave us originally
|
||||
|
|
|
|||
|
|
@ -43,35 +43,31 @@ char *INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast,
|
|||
*waslead = 1;
|
||||
} else
|
||||
*leading = 0.0;
|
||||
while (**line != (char) 0) {
|
||||
while (**line != '\0') {
|
||||
error = INPgetTok(line, &parm, 1);
|
||||
if (!*parm) {
|
||||
FREE(parm);
|
||||
continue;
|
||||
}
|
||||
if (error) {
|
||||
rtn = (INPerror(error));
|
||||
rtn = INPerror(error);
|
||||
goto quit;
|
||||
}
|
||||
for (i = 0; i < *(ft_sim->devices[dev]->numInstanceParms); i++) {
|
||||
if (strcmp(parm,
|
||||
ft_sim->devices[dev]->instanceParms[i].keyword) == 0) {
|
||||
if (strcmp(parm, ft_sim->devices[dev]->instanceParms[i].keyword) == 0) {
|
||||
val =
|
||||
INPgetValue(ckt, line,
|
||||
ft_sim->devices[dev]->
|
||||
instanceParms[i].dataType, tab);
|
||||
ft_sim->devices[dev]->instanceParms[i].dataType,
|
||||
tab);
|
||||
if (!val) {
|
||||
rtn = (INPerror(E_PARMVAL));
|
||||
rtn = INPerror(E_PARMVAL);
|
||||
goto quit;
|
||||
}
|
||||
error = ft_sim->setInstanceParm (ckt, fast,
|
||||
ft_sim->devices
|
||||
[dev]->
|
||||
instanceParms[i].id,
|
||||
val,
|
||||
NULL);
|
||||
ft_sim->devices[dev]->instanceParms[i].id,
|
||||
val, NULL);
|
||||
if (error) {
|
||||
rtn = (INPerror(error));
|
||||
rtn = INPerror(error);
|
||||
goto quit;
|
||||
}
|
||||
break;
|
||||
|
|
@ -80,7 +76,7 @@ char *INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast,
|
|||
if (i == *(ft_sim->devices[dev]->numInstanceParms)) {
|
||||
errbuf = TMALLOC(char, strlen(parm) + 25);
|
||||
(void) sprintf(errbuf, " unknown parameter (%s) \n", parm);
|
||||
rtn = (errbuf);
|
||||
rtn = errbuf;
|
||||
goto quit;
|
||||
}
|
||||
FREE(parm);
|
||||
|
|
|
|||
|
|
@ -28,14 +28,11 @@ int INPpName(char *parm, IFvalue * val, CKTcircuit *ckt, int dev, GENinstance *f
|
|||
int i;
|
||||
|
||||
for (i = 0; i < *(ft_sim->devices[dev]->numInstanceParms); i++) {
|
||||
if (strcmp(parm,
|
||||
ft_sim->devices[dev]->instanceParms[i].keyword) ==
|
||||
0) {
|
||||
if (strcmp(parm, ft_sim->devices[dev]->instanceParms[i].keyword) == 0) {
|
||||
error =
|
||||
ft_sim->setInstanceParm (ckt, fast,
|
||||
ft_sim->devices[dev]->
|
||||
instanceParms[i].id, val,
|
||||
NULL);
|
||||
ft_sim->devices[dev]->instanceParms[i].id,
|
||||
val, NULL);
|
||||
if (error)
|
||||
return (error);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue