Browse Source

getexpress(), cleanup

pre-master-46
rlar 8 years ago
parent
commit
47db566181
  1. 10
      src/frontend/numparam/xpressn.c

10
src/frontend/numparam/xpressn.c

@ -1358,14 +1358,14 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
ia_ptr++; ia_ptr++;
p = ia_ptr - 1; p = ia_ptr - 1;
while (((p + 1) < ls_ptr) && ((p + 1)[-1] != '"'))
while (((p + 1) < ls_ptr) && (*p != '"'))
p++; p++;
tpe = NUPA_STRING; tpe = NUPA_STRING;
do do
p++; p++;
while (((p + 1) <= ls_ptr) && ((p + 1)[-1] <= ' '));
while (((p + 1) <= ls_ptr) && (*p <= ' '));
} else { } else {
@ -1381,7 +1381,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
if ((p + 1) > ls_ptr) if ((p + 1) > ls_ptr)
c = ';'; c = ';';
else else
c = (p + 1)[-1];
c = *p;
if (c == '(') { if (c == '(') {
/* sub-formula */ /* sub-formula */
@ -1393,7 +1393,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
if ((p + 1) > ls_ptr) if ((p + 1) > ls_ptr)
d = '\0'; d = '\0';
else else
d = (p + 1)[-1];
d = *p;
if (d == '(') if (d == '(')
level++; level++;
@ -1410,7 +1410,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
pscopy(tstr_p, ia_ptr - 1, 0, (int) (p + 1 - ia_ptr)); pscopy(tstr_p, ia_ptr - 1, 0, (int) (p + 1 - ia_ptr));
if ((p + 1)[-1] == '}')
if (*p == '}')
p++; p++;
if (tpe == NUPA_STRING) if (tpe == NUPA_STRING)

Loading…
Cancel
Save