nupa_subcktcall(), g ==> gp - (const) t_p
This commit is contained in:
parent
3267bf8d63
commit
a773601b84
|
|
@ -1622,19 +1622,19 @@ nupa_subcktcall(dico_t *dico, char *s, char * const x, char * const inst_name)
|
||||||
/* transform to braces... */
|
/* transform to braces... */
|
||||||
kp++;
|
kp++;
|
||||||
t_p[(kp - t_p)] = '{';
|
t_p[(kp - t_p)] = '{';
|
||||||
int g = (int) (kp - t_p);
|
int (gp - t_p) = (int) (kp - t_p);
|
||||||
int nest = 1;
|
int nest = 1;
|
||||||
|
|
||||||
while ((nest > 0) && (g < ls)) {
|
while ((nest > 0) && ((gp - t_p) < ls)) {
|
||||||
g++;
|
(gp - t_p)++;
|
||||||
if (t_p[g] == '(')
|
if (t_p[(gp - t_p)] == '(')
|
||||||
nest++;
|
nest++;
|
||||||
else if (t_p[g] == ')')
|
else if (t_p[(gp - t_p)] == ')')
|
||||||
nest--;
|
nest--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((g < ls) && (nest == 0))
|
if (((gp - t_p) < ls) && (nest == 0))
|
||||||
t_p[g] = '}';
|
t_p[(gp - t_p)] = '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue