spice2g6 poly(19 compat:
When counting token, count an expression {...} for the
gain as a single token, even if it contains spaces.
This commit is contained in:
parent
ced7604fc4
commit
fe24a4135c
|
|
@ -9157,6 +9157,13 @@ static void inp_poly_2g6_compat(struct card* deck) {
|
||||||
case 'e':
|
case 'e':
|
||||||
curr_line = nexttok(curr_line);
|
curr_line = nexttok(curr_line);
|
||||||
curr_line = nexttok(curr_line);
|
curr_line = nexttok(curr_line);
|
||||||
|
/* The next token may be a simple text token or an expression
|
||||||
|
enclosed in brackets */
|
||||||
|
if (*curr_line == '{') {
|
||||||
|
char* tmptok = gettok_char(&curr_line, '}', TRUE, TRUE);
|
||||||
|
tfree(tmptok);
|
||||||
|
}
|
||||||
|
else
|
||||||
curr_line = nexttok(curr_line);
|
curr_line = nexttok(curr_line);
|
||||||
if (!curr_line) {
|
if (!curr_line) {
|
||||||
fprintf(stderr, "Error: not enough parameters in line\n %s\n", thisline);
|
fprintf(stderr, "Error: not enough parameters in line\n %s\n", thisline);
|
||||||
|
|
@ -9168,6 +9175,13 @@ static void inp_poly_2g6_compat(struct card* deck) {
|
||||||
case 'f':
|
case 'f':
|
||||||
case 'h':
|
case 'h':
|
||||||
curr_line = nexttok(curr_line);
|
curr_line = nexttok(curr_line);
|
||||||
|
/* The next token may be a simple text token or an expression
|
||||||
|
enclosed in brackets */
|
||||||
|
if (*curr_line == '{') {
|
||||||
|
char* tmptok = gettok_char(&curr_line, '}', TRUE, TRUE);
|
||||||
|
tfree(tmptok);
|
||||||
|
}
|
||||||
|
else
|
||||||
curr_line = nexttok(curr_line);
|
curr_line = nexttok(curr_line);
|
||||||
if (!curr_line) {
|
if (!curr_line) {
|
||||||
fprintf(stderr, "Error: not enough parameters in line\n %s\n", thisline);
|
fprintf(stderr, "Error: not enough parameters in line\n %s\n", thisline);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue