From 49bdcc3e3d6546873f2624e14d8be34b0dc17247 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 17 Nov 2017 21:53:26 +0100 Subject: [PATCH] getexpress(), drop first argument `ls_ptr' --- src/frontend/numparam/xpressn.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index bf4ea7cbc..5a22e7c65 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -1334,13 +1334,14 @@ getword(const char *s, SPICE_DSTRINGPTR tstr_p) static nupa_type -getexpress(const char * const ls_ptr, SPICE_DSTRINGPTR tstr_p, const char **pi) +getexpress(SPICE_DSTRINGPTR tstr_p, const char **pi) /* returns expression-like string until next separator Input i=position before expr, output i=just after expr, on separator. returns tpe=='R' if (numeric, 'S' if (string only */ { const char *xia_ptr = *pi; + const char * const ls_ptr = xia_ptr + strlen(xia_ptr); const char *p; nupa_type tpe; @@ -1463,7 +1464,7 @@ nupa_assignment(dico_t *dico, char *s, char mode) error = message(dico, " = sign expected.\n"); const char *tmp = s + i; - dtype = getexpress(s + strlen(s), &ustr, &tmp); + dtype = getexpress(&ustr, &tmp); i = (int) (tmp - s); if (dtype == NUPA_REAL) { @@ -1672,7 +1673,7 @@ nupa_subcktcall(dico_t *dico, char *s, char *x, char *inst_name) } else if (t_p[k] == '{') { char *aux = spice_dstring_value(&tstr); const char *tmp = aux + j; - getexpress(aux + strlen(aux), &ustr, &tmp); + getexpress(&ustr, &tmp); j = (int) (tmp - aux); j--; /* confusion: j was in Turbo Pascal convention */ } else {