|
|
|
@ -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; |
|
|
|
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; |
|
|
|
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); |
|
|
|
|
|
|
|
errmsg = TMALLOC(char, 100); |
|
|
|
(void) strcpy(errmsg," Error: unknown option - ignored\n"); |
|
|
|
optCard->error = INPerrCat(optCard->error,errmsg); |
|
|
|
fprintf(stderr, "%s\n", optCard->error); |
|
|
|
} |
|
|
|
} |