numparam/xpressn.c, evaluate(), drop local `done' and `lq'

no longer limit the length of a quoted string parameter
This commit is contained in:
rlar 2017-11-04 15:31:27 +01:00
parent e970e8c4ea
commit 23f6d51c67
1 changed files with 7 additions and 12 deletions

View File

@ -1087,9 +1087,8 @@ evaluate(dico_t *dico, SPICE_DSTRINGPTR qstr_p, char *t, unsigned char mode)
{
/* transform t to result q. mode 0: expression, mode 1: simple variable */
double u = 0.0;
int j, lq;
entry_t *entry;
bool numeric, done;
bool numeric;
bool err;
spice_dstring_reinit(qstr_p);
@ -1111,24 +1110,20 @@ evaluate(dico_t *dico, SPICE_DSTRINGPTR qstr_p, char *t, unsigned char mode)
numeric = 1;
} else if (entry->tp == NUPA_STRING) {
/* suppose source text "..." at */
j = entry->ivl;
lq = 0;
int j = entry->ivl;
do
{
for (;;) {
j++;
lq++;
char c = /* ibf->bf[j]; */ entry->sbbase[j];
if (cpos('3', spice_dstring_value(&dico->option)) <= 0)
c = upcase(c); /* spice-2 */
done = (c == '\"') || (c < ' ') || (lq > 99);
if ((c == '\"') || (c < ' '))
break;
if (!done)
cadd(qstr_p, c);
} while (!done);
cadd(qstr_p, c);
}
}
} else {
u = formula(dico, t, t + strlen(t), &err);