|
|
|
@ -1334,19 +1334,16 @@ getword(const char *s, SPICE_DSTRINGPTR tstr_p) |
|
|
|
|
|
|
|
|
|
|
|
static nupa_type |
|
|
|
getexpress(const char * const s, SPICE_DSTRINGPTR tstr_p, const char **pi) |
|
|
|
getexpress(const char * const ls_ptr, SPICE_DSTRINGPTR tstr_p, const char **pi) |
|
|
|
/* returns expression-like string until next separator |
|
|
|
Input i=position before expr, output i=just after expr, on separator. |
|
|
|
returns tpe=='R' if (numeric, 'S' if (string only |
|
|
|
*/ |
|
|
|
{ |
|
|
|
const char *xia_ptr = *pi; |
|
|
|
const char *ls_ptr; |
|
|
|
const char *p; |
|
|
|
nupa_type tpe; |
|
|
|
|
|
|
|
ls_ptr = s + strlen(s); |
|
|
|
|
|
|
|
while ((xia_ptr < ls_ptr - 1) && (*xia_ptr <= ' ')) |
|
|
|
xia_ptr++; /*white space ? */ |
|
|
|
|
|
|
|
@ -1466,7 +1463,7 @@ nupa_assignment(dico_t *dico, char *s, char mode) |
|
|
|
error = message(dico, " = sign expected.\n"); |
|
|
|
|
|
|
|
const char *tmp = s + i; |
|
|
|
dtype = getexpress(s, &ustr, &tmp); |
|
|
|
dtype = getexpress(s + strlen(s), &ustr, &tmp); |
|
|
|
i = (int) (tmp - s); |
|
|
|
|
|
|
|
if (dtype == NUPA_REAL) { |
|
|
|
@ -1675,7 +1672,7 @@ nupa_subcktcall(dico_t *dico, char *s, char *x, char *inst_name) |
|
|
|
} else if (t_p[k] == '{') { |
|
|
|
char *aux = spice_dstring_value(&tstr); |
|
|
|
const char *tmp = aux + j; |
|
|
|
getexpress(aux, &ustr, &tmp); |
|
|
|
getexpress(aux + strlen(aux), &ustr, &tmp); |
|
|
|
j = (int) (tmp - aux); |
|
|
|
j--; /* confusion: j was in Turbo Pascal convention */ |
|
|
|
} else { |
|
|
|
|