From 948352a2edfaababb5d2d788aaf5e6b920fbc9da Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 8 May 2016 19:02:34 +0200 Subject: [PATCH] defsubckt(), drop i_ptr, use s instead --- src/frontend/numparam/xpressn.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index 61f397e3f..bdf21c6d0 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -507,32 +507,31 @@ defsubckt(dico_t *dico, struct card *card, nupa_type categ) to enter subcircuit (categ=U) and model (categ=O) names */ { - const char * const s_ = card->line; + const char *s = card->line; int w = card->linenum; bool err; - const char *i_ptr, *j_ptr; - i_ptr = s_; + const char *j_ptr; - while (*i_ptr && (*i_ptr != '.')) - i_ptr++; /* skip 1st dotword */ + while (*s && (*s != '.')) + s++; /* skip 1st dotword */ - while (*i_ptr && (*i_ptr > ' ')) - i_ptr++; + while (*s && (*s > ' ')) + s++; - while (*i_ptr && (*i_ptr <= ' ')) - i_ptr++; /* skip blank */ + while (*s && (*s <= ' ')) + s++; /* skip blank */ - j_ptr = i_ptr; + j_ptr = s; while (*j_ptr && (*j_ptr > ' ')) j_ptr++; - if (j_ptr > i_ptr) { + if (j_ptr > s) { SPICE_DSTRING ustr; /* temp user string */ spice_dstring_init(&ustr); - pscopy_up(&ustr, i_ptr, 0, (int) (j_ptr - i_ptr)); + pscopy_up(&ustr, s, 0, (int) (j_ptr - s)); err = nupa_define(dico, spice_dstring_value(&ustr), ' ', categ, 0.0, w, NULL); spice_dstring_free(&ustr); } else {