Browse Source

nupa_substitute(), reduce scope of local variabes

pre-master-46
rlar 8 years ago
parent
commit
ef1d896cee
  1. 10
      src/frontend/numparam/xpressn.c

10
src/frontend/numparam/xpressn.c

@ -1182,8 +1182,8 @@ nupa_substitute(dico_t *dico, const char *s, char *r)
bug: wont flag overflow! bug: wont flag overflow!
*/ */
{ {
int level, nnest, ir = 0;
char c, d;
int ir = 0;
char d;
bool err = 0; bool err = 0;
SPICE_DSTRING qstr; /* temp result dynamic string */ SPICE_DSTRING qstr; /* temp result dynamic string */
@ -1193,12 +1193,12 @@ nupa_substitute(dico_t *dico, const char *s, char *r)
while ((s < s_end) && !err) { while ((s < s_end) && !err) {
c = *s++;
char c = *s++;
if (c == '{') { if (c == '{') {
/* try ps expression syntax */ /* try ps expression syntax */
const char *kptr = s; const char *kptr = s;
nnest = 1;
int nnest = 1;
do do
{ {
@ -1245,7 +1245,7 @@ nupa_substitute(dico_t *dico, const char *s, char *r)
if (s[-1] == '(') { if (s[-1] == '(') {
/* sub-formula */ /* sub-formula */
const char *kptr = s; const char *kptr = s;
level = 1;
int level = 1;
do do
{ {

Loading…
Cancel
Save