Browse Source

enable usage of parameters in .options lines.

pre-master-46
Holger Vogt 5 years ago
parent
commit
c2d11728c4
  1. 2
      src/frontend/inp.c
  2. 5
      src/frontend/options.c

2
src/frontend/inp.c

@ -569,7 +569,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
if (!comfile) {
/* Extract the .option lines from the deck into 'options',
and remove them from the deck. */
and remove them from the deck. Exceptions are .option with params. */
options = inp_getopts(deck);
/* Check for .option seed=[val|random] and set the random number generator.
Check for .option cshunt=val and set a global variable cshunt_value */

5
src/frontend/options.c

@ -214,7 +214,6 @@ cp_usrvars(void)
/* Extract the .option lines from the deck */
struct card *
inp_getopts(struct card *deck)
{
@ -222,7 +221,9 @@ inp_getopts(struct card *deck)
for (dd = deck->nextcard; dd; dd = next) {
next = dd->nextcard;
if (ciprefix(".opt", dd->line)) {
/* .option with params is excluded here. These options will be handled
after parameter substitution by INP2dot(), dot_options(), and INPdoOpts(). */
if (ciprefix(".opt", dd->line) && !strchr(dd->line, '{')) {
inp_casefix(dd->line);
if (last)
last->nextcard = dd->nextcard;

Loading…
Cancel
Save