|
|
@ -7623,24 +7623,27 @@ static void inp_quote_params(struct card *c, struct card *end_c, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
/* Now check if we have nested {..{ }...}, which is not accepted by numparam code. |
|
|
/* Now check if we have nested {..{ }...}, which is not accepted by numparam code. |
|
|
Replace the inner { } by ( ) */ |
|
|
|
|
|
|
|
|
Replace the inner { } by ( ). Do this only when this is not a behavioral device |
|
|
|
|
|
which will become a B source. B source handling is special in inp.c. */ |
|
|
char* cut_line = c->line; |
|
|
char* cut_line = c->line; |
|
|
cut_line = strchr(cut_line, '{'); |
|
|
|
|
|
if (cut_line) { |
|
|
|
|
|
int level = 1; |
|
|
|
|
|
cut_line++; |
|
|
|
|
|
while (*cut_line != '\0') { |
|
|
|
|
|
if (*cut_line == '{') { |
|
|
|
|
|
level++; |
|
|
|
|
|
if (level > 1) |
|
|
|
|
|
*cut_line = '('; |
|
|
|
|
|
} |
|
|
|
|
|
else if (*cut_line == '}') { |
|
|
|
|
|
if (level > 1) |
|
|
|
|
|
*cut_line = ')'; |
|
|
|
|
|
level--; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (!b_transformation_wanted(cut_line)) { |
|
|
|
|
|
cut_line = strchr(cut_line, '{'); |
|
|
|
|
|
if (cut_line) { |
|
|
|
|
|
int level = 1; |
|
|
cut_line++; |
|
|
cut_line++; |
|
|
|
|
|
while (*cut_line != '\0') { |
|
|
|
|
|
if (*cut_line == '{') { |
|
|
|
|
|
level++; |
|
|
|
|
|
if (level > 1) |
|
|
|
|
|
*cut_line = '('; |
|
|
|
|
|
} |
|
|
|
|
|
else if (*cut_line == '}') { |
|
|
|
|
|
if (level > 1) |
|
|
|
|
|
*cut_line = ')'; |
|
|
|
|
|
level--; |
|
|
|
|
|
} |
|
|
|
|
|
cut_line++; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|