getexpress(), local scope for `c' and `d'
This commit is contained in:
parent
86ef4b8cb1
commit
2f24e6e563
|
|
@ -1343,7 +1343,6 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
||||||
const char *xia_ptr;
|
const char *xia_ptr;
|
||||||
const char *ls_ptr;
|
const char *ls_ptr;
|
||||||
const char *p = *pi - 1;
|
const char *p = *pi - 1;
|
||||||
char c, d;
|
|
||||||
nupa_type tpe;
|
nupa_type tpe;
|
||||||
|
|
||||||
ls_ptr = s + strlen(s);
|
ls_ptr = s + strlen(s);
|
||||||
|
|
@ -1375,6 +1374,8 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
char c;
|
||||||
|
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if (p >= ls_ptr)
|
if (p >= ls_ptr)
|
||||||
|
|
@ -1388,7 +1389,7 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
||||||
p++;
|
p++;
|
||||||
for (; p < ls_ptr; p++) {
|
for (; p < ls_ptr; p++) {
|
||||||
|
|
||||||
d = *p;
|
char d = *p;
|
||||||
|
|
||||||
if (d == '(')
|
if (d == '(')
|
||||||
level++;
|
level++;
|
||||||
|
|
@ -1400,7 +1401,10 @@ getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (!strchr(",;)}", c)); /* legal separators */
|
if (strchr(",;)}", c)) /* legal separators */
|
||||||
|
break;
|
||||||
|
|
||||||
|
} while (1);
|
||||||
|
|
||||||
tpe = NUPA_REAL;
|
tpe = NUPA_REAL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue