Browse Source

getexpress(), return one less

pre-master-46
rlar 8 years ago
parent
commit
830b5faf0e
  1. 6
      src/frontend/numparam/xpressn.c

6
src/frontend/numparam/xpressn.c

@ -1406,7 +1406,7 @@ getexpress(nupa_type *type, SPICE_DSTRINGPTR tstr_p, const char *s)
if (type) if (type)
*type = tpe; *type = tpe;
return (char *) p + 1;
return (char *) p;
} }
@ -1460,7 +1460,7 @@ nupa_assignment(dico_t *dico, char *s, char mode)
error = message(dico, " = sign expected.\n"); error = message(dico, " = sign expected.\n");
const char *tmp = s + i; const char *tmp = s + i;
tmp = getexpress(&dtype, &ustr, tmp);
tmp = getexpress(&dtype, &ustr, tmp) + 1;
i = (int) (tmp - s); i = (int) (tmp - s);
if (dtype == NUPA_REAL) { if (dtype == NUPA_REAL) {
@ -1669,7 +1669,7 @@ nupa_subcktcall(dico_t *dico, char *s, char *x, char *inst_name)
} else if (t_p[k] == '{') { } else if (t_p[k] == '{') {
char *aux = spice_dstring_value(&tstr); char *aux = spice_dstring_value(&tstr);
const char *tmp = aux + j; const char *tmp = aux + j;
tmp = getexpress(NULL, &ustr, tmp);
tmp = getexpress(NULL, &ustr, tmp) + 1;
j = (int) (tmp - aux); j = (int) (tmp - aux);
j--; /* confusion: j was in Turbo Pascal convention */ j--; /* confusion: j was in Turbo Pascal convention */
} else { } else {

Loading…
Cancel
Save