getexpress(), drop `c' and cleanup
This commit is contained in:
parent
f8fc4edf52
commit
33b8936a3b
|
|
@ -1347,37 +1347,33 @@ getexpress(nupa_type *type, SPICE_DSTRINGPTR tstr_p, const char *s)
|
||||||
while ((s < ls_ptr - 1) && (*s <= ' '))
|
while ((s < ls_ptr - 1) && (*s <= ' '))
|
||||||
s++; /*white space ? */
|
s++; /*white space ? */
|
||||||
|
|
||||||
if (*s == '"') {
|
if (*s == '"') { /* string constant */
|
||||||
/* string constant */
|
|
||||||
s++;
|
s++;
|
||||||
p = s;
|
p = s;
|
||||||
|
|
||||||
while ((p < ls_ptr - 1) && (*p != '"'))
|
while ((p < ls_ptr - 1) && (*p != '"'))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
tpe = NUPA_STRING;
|
|
||||||
|
|
||||||
do
|
do
|
||||||
p++;
|
p++;
|
||||||
while ((p < ls_ptr) && (*p <= ' '));
|
while ((p < ls_ptr) && (*p <= ' '));
|
||||||
|
|
||||||
|
tpe = NUPA_STRING;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (*s == '{')
|
if (*s == '{')
|
||||||
s++;
|
s++;
|
||||||
|
|
||||||
p = s - 1;
|
p = s;
|
||||||
|
|
||||||
p++;
|
|
||||||
|
|
||||||
for (; p < ls_ptr; p++) {
|
for (; p < ls_ptr; p++) {
|
||||||
|
|
||||||
char c = *p;
|
if (strchr(",;)}", *p)) /* legal separators */
|
||||||
|
|
||||||
if (strchr(",;)}", c)) /* legal separators */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (c == '(') {
|
if (*p == '(') {
|
||||||
/* sub-formula */
|
/* sub-formula */
|
||||||
int level = 1;
|
int level = 1;
|
||||||
p++;
|
p++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue