whitespace

This commit is contained in:
rlar 2013-07-28 15:06:41 +02:00
parent 23d0f41e66
commit c2927128cd
4 changed files with 86 additions and 83 deletions

View File

@ -334,25 +334,21 @@ next:
continue;
}
/* found it, analysis which, parameter i */
if (if_parm->dataType & IF_FLAG) {
/* one of the keywords! */
ptemp.iValue = 1;
error = ft_sim->setAnalysisParm
(ckt, senseJob,
if_parm->id, &ptemp, NULL);
if (error)
current->error = INPerrCat(current->error, INPerror(error));
} else {
parm = INPgetValue
(ckt, &line,
if_parm->dataType, tab);
error = ft_sim->setAnalysisParm
(ckt, senseJob,
if_parm->id, parm, NULL);
if (error)
current->error = INPerrCat(current->error, INPerror(error));
}
/* found it, analysis which, parameter i */
if (if_parm->dataType & IF_FLAG) {
/* one of the keywords! */
ptemp.iValue = 1;
error = ft_sim->setAnalysisParm (ckt, senseJob,
if_parm->id, &ptemp, NULL);
if (error)
current->error = INPerrCat(current->error, INPerror(error));
} else {
parm = INPgetValue (ckt, &line, if_parm->dataType, tab);
error = ft_sim->setAnalysisParm (ckt, senseJob,
if_parm->id, parm, NULL);
if (error)
current->error = INPerrCat(current->error, INPerror(error));
}
}
if ((err = ft_sim->doAnalyses (ckt, 1, ft_curckt->ci_curTask)) != OK) {

View File

@ -1210,13 +1210,12 @@ finddev(CKTcircuit *ckt, char *name, GENinstance **devptr, GENmodel **modptr)
int
if_analQbyName(CKTcircuit *ckt, int which, JOB *anal, char *name, IFvalue *parm)
{
IFparm *if_parm;
if_parm = ft_find_analysis_parm(which, name);
IFparm *if_parm = ft_find_analysis_parm(which, name);
if (!if_parm)
return (E_BADPARM);
return (ft_sim->askAnalysisQuest
(ckt, anal, if_parm->id, parm, NULL));
return (ft_sim->askAnalysisQuest (ckt, anal, if_parm->id, parm, NULL));
}
@ -1283,7 +1282,7 @@ if_getstat(CKTcircuit *ckt, char *name)
IFvalue parm;
IFparm *if_parm;
options_idx = ft_find_analysis("options");
options_idx = ft_find_analysis("options");
if (options_idx == -1) {
fprintf(cp_err, "Warning: statistics unsupported\n");

View File

@ -511,45 +511,48 @@ dot_sens2(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
LITERR("Sensitivity-2 analysis unsupported\n");
return (0);
}
IFC(newAnalysis, (ckt, which, "Sensitivity-2 Analysis", &foo, task));
while (*line) {
IFparm *if_parm;
/* read the entire line */
INPgetTok(&line, &token, 1);
if_parm = ft_find_analysis_parm(which, token);
if (!if_parm) {
/* didn't find it! */
LITERR(" Error: unknown parameter on .sens-ignored \n");
continue;
}
/* found it, analysis which, parameter i */
if (if_parm->dataType & IF_FLAG) {
/* one of the keywords! */
ptemp.iValue = 1;
error =
ft_sim->setAnalysisParm (ckt, foo,
if_parm->id,
&ptemp,
NULL);
if (error)
current->error =
INPerrCat(current->error, INPerror(error));
} else {
parm =
INPgetValue(ckt, &line,
if_parm->dataType, tab);
error =
ft_sim->setAnalysisParm (ckt, foo,
if_parm->id,
parm,
NULL);
if (error)
current->error =
INPerrCat(current->error, INPerror(error));
IFparm *if_parm;
}
/* read the entire line */
INPgetTok(&line, &token, 1);
if_parm = ft_find_analysis_parm(which, token);
if (!if_parm) {
/* didn't find it! */
LITERR(" Error: unknown parameter on .sens-ignored \n");
continue;
}
/* found it, analysis which, parameter i */
if (if_parm->dataType & IF_FLAG) {
/* one of the keywords! */
ptemp.iValue = 1;
error = ft_sim->setAnalysisParm (ckt, foo,
if_parm->id,
&ptemp,
NULL);
if (error)
current->error = INPerrCat(current->error, INPerror(error));
} else {
parm = INPgetValue(ckt, &line, if_parm->dataType, tab);
error = ft_sim->setAnalysisParm (ckt, foo,
if_parm->id,
parm,
NULL);
if (error)
current->error = INPerrCat(current->error, INPerror(error));
}
}
return (0);
}
#endif

View File

@ -32,42 +32,47 @@ INPdoOpts(
int which;
which = ft_find_analysis("options");
if(which == -1) {
optCard->error = INPerrCat(optCard->error,INPmkTemp(
"error: analysis options table not found\n"));
"error: analysis options table not found\n"));
return;
}
line = optCard->line;
INPgetTok(&line,&token,1); /* throw away '.option' */
while (*line) {
IFparm *if_parm;
INPgetTok(&line,&token,1);
if_parm = ft_find_analysis_parm(which, token);
if(if_parm && !(if_parm->dataType & IF_UNIMP_MASK)) {
errmsg = TMALLOC(char, 45 + strlen(token));
(void) sprintf(errmsg,
" Warning: %s not yet implemented - ignored \n",token);
optCard->error = INPerrCat(optCard->error,errmsg);
val = INPgetValue(ckt,&line,
if_parm->dataType, tab);
continue;
}
if(if_parm && (if_parm->dataType & IF_SET)) {
val = INPgetValue(ckt,&line,
if_parm->dataType&IF_VARTYPES, tab);
error = ft_sim->setAnalysisParm (ckt, anal,
if_parm->id, val, NULL);
if(error) {
errmsg = TMALLOC(char, 35 + strlen(token));
(void) sprintf(errmsg,
"Warning: can't set option %s\n", token);
optCard->error = INPerrCat(optCard->error, errmsg);
}
continue;
}
errmsg = TMALLOC(char, 100);
(void) strcpy(errmsg," Error: unknown option - ignored\n");
errmsg = TMALLOC(char, 45 + strlen(token));
(void) sprintf(errmsg, " Warning: %s not yet implemented - ignored \n",token);
optCard->error = INPerrCat(optCard->error,errmsg);
fprintf(stderr, "%s\n", optCard->error);
val = INPgetValue(ckt,&line, if_parm->dataType, tab);
continue;
}
if(if_parm && (if_parm->dataType & IF_SET)) {
val = INPgetValue(ckt,&line, if_parm->dataType&IF_VARTYPES, tab);
error = ft_sim->setAnalysisParm (ckt, anal, if_parm->id, val, NULL);
if(error) {
errmsg = TMALLOC(char, 35 + strlen(token));
(void) sprintf(errmsg, "Warning: can't set option %s\n", token);
optCard->error = INPerrCat(optCard->error, errmsg);
}
continue;
}
errmsg = TMALLOC(char, 100);
(void) strcpy(errmsg," Error: unknown option - ignored\n");
optCard->error = INPerrCat(optCard->error,errmsg);
fprintf(stderr, "%s\n", optCard->error);
}
}