getexpress(), ia_ptr ==> xiaptr + 1

This commit is contained in:
rlar 2017-11-18 13:05:30 +01:00
parent 47db566181
commit 9ff93246b6
1 changed files with 11 additions and 11 deletions

View File

@ -1340,7 +1340,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
returns tpe=='R' if (numeric, 'S' if (string only returns tpe=='R' if (numeric, 'S' if (string only
*/ */
{ {
const char *ia_ptr; const char *xia_ptr;
const char *ls_ptr; const char *ls_ptr;
const char *p = *pi - 1; const char *p = *pi - 1;
int level; int level;
@ -1348,15 +1348,15 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
nupa_type tpe; nupa_type tpe;
ls_ptr = s + strlen(s); ls_ptr = s + strlen(s);
ia_ptr = (p + 1) + 1; (xia_ptr + 1) = (p + 1) + 1;
while ((ia_ptr < ls_ptr) && (ia_ptr[-1] <= ' ')) while (((xia_ptr + 1) < ls_ptr) && ((xia_ptr + 1)[-1] <= ' '))
ia_ptr++; /*white space ? */ (xia_ptr + 1)++; /*white space ? */
if (ia_ptr[-1] == '"') { if ((xia_ptr + 1)[-1] == '"') {
/* string constant */ /* string constant */
ia_ptr++; (xia_ptr + 1)++;
p = ia_ptr - 1; p = (xia_ptr + 1) - 1;
while (((p + 1) < ls_ptr) && (*p != '"')) while (((p + 1) < ls_ptr) && (*p != '"'))
p++; p++;
@ -1369,10 +1369,10 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
} else { } else {
if (ia_ptr[-1] == '{') if ((xia_ptr + 1)[-1] == '{')
ia_ptr++; (xia_ptr + 1)++;
p = ia_ptr - 1 - 1; p = (xia_ptr + 1) - 1 - 1;
do do
{ {
@ -1408,7 +1408,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
tpe = NUPA_REAL; tpe = NUPA_REAL;
} }
pscopy(tstr_p, ia_ptr - 1, 0, (int) (p + 1 - ia_ptr)); pscopy(tstr_p, (xia_ptr + 1) - 1, 0, (int) (p + 1 - (xia_ptr + 1)));
if (*p == '}') if (*p == '}')
p++; p++;