transform(), use `strstr()' instead of `spos_()'
This commit is contained in:
parent
e28169d62c
commit
1721407359
|
|
@ -311,7 +311,6 @@ transform(dico_t *dico, SPICE_DSTRINGPTR dstr_p, bool incontrol)
|
||||||
* 'B' netlist (or .model ?) line that had Braces killed
|
* 'B' netlist (or .model ?) line that had Braces killed
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int a;
|
|
||||||
char *s; /* dstring value of dstr_p */
|
char *s; /* dstring value of dstr_p */
|
||||||
char category;
|
char category;
|
||||||
stripsomespace(dstr_p, incontrol);
|
stripsomespace(dstr_p, incontrol);
|
||||||
|
|
@ -326,15 +325,15 @@ transform(dico_t *dico, SPICE_DSTRINGPTR dstr_p, bool incontrol)
|
||||||
/* s[0] = '*'; */
|
/* s[0] = '*'; */
|
||||||
category = 'P';
|
category = 'P';
|
||||||
} else if (ci_prefix(".SUBCKT", s)) {
|
} else if (ci_prefix(".SUBCKT", s)) {
|
||||||
char *t;
|
char *params, *t;
|
||||||
SPICE_DSTRING tstr;
|
SPICE_DSTRING tstr;
|
||||||
spice_dstring_init(&tstr);
|
spice_dstring_init(&tstr);
|
||||||
scopy_up(&tstr, s);
|
scopy_up(&tstr, s);
|
||||||
t = spice_dstring_value(&tstr);
|
t = spice_dstring_value(&tstr);
|
||||||
/* split off any "params" tail */
|
/* split off any "params" tail */
|
||||||
a = spos_("PARAMS:", t);
|
params = strstr(t, "PARAMS:");
|
||||||
if (a >= 0)
|
if (params)
|
||||||
pscopy(dstr_p, s, 0, a);
|
pscopy(dstr_p, s, 0, (int)(params - t));
|
||||||
spice_dstring_free(&tstr);
|
spice_dstring_free(&tstr);
|
||||||
category = 'S';
|
category = 'S';
|
||||||
} else if (ci_prefix(".CONTROL", s)) {
|
} else if (ci_prefix(".CONTROL", s)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue