From 1721407359cd75df76e4e97cd91a06042449e51d Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 15 May 2016 18:14:43 +0200 Subject: [PATCH] transform(), use `strstr()' instead of `spos_()' --- src/frontend/numparam/spicenum.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index 8cf4b78a0..f00714fc5 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -311,7 +311,6 @@ transform(dico_t *dico, SPICE_DSTRINGPTR dstr_p, bool incontrol) * 'B' netlist (or .model ?) line that had Braces killed */ { - int a; char *s; /* dstring value of dstr_p */ char category; stripsomespace(dstr_p, incontrol); @@ -326,15 +325,15 @@ transform(dico_t *dico, SPICE_DSTRINGPTR dstr_p, bool incontrol) /* s[0] = '*'; */ category = 'P'; } else if (ci_prefix(".SUBCKT", s)) { - char *t; + char *params, *t; SPICE_DSTRING tstr; spice_dstring_init(&tstr); scopy_up(&tstr, s); t = spice_dstring_value(&tstr); /* split off any "params" tail */ - a = spos_("PARAMS:", t); - if (a >= 0) - pscopy(dstr_p, s, 0, a); + params = strstr(t, "PARAMS:"); + if (params) + pscopy(dstr_p, s, 0, (int)(params - t)); spice_dstring_free(&tstr); category = 'S'; } else if (ci_prefix(".CONTROL", s)) {