enable usage of parameters in .options lines.
This commit is contained in:
parent
78eee72b36
commit
c2d11728c4
|
|
@ -569,7 +569,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
|
|
||||||
if (!comfile) {
|
if (!comfile) {
|
||||||
/* Extract the .option lines from the deck into 'options',
|
/* 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);
|
options = inp_getopts(deck);
|
||||||
/* Check for .option seed=[val|random] and set the random number generator.
|
/* Check for .option seed=[val|random] and set the random number generator.
|
||||||
Check for .option cshunt=val and set a global variable cshunt_value */
|
Check for .option cshunt=val and set a global variable cshunt_value */
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,6 @@ cp_usrvars(void)
|
||||||
|
|
||||||
|
|
||||||
/* Extract the .option lines from the deck */
|
/* Extract the .option lines from the deck */
|
||||||
|
|
||||||
struct card *
|
struct card *
|
||||||
inp_getopts(struct card *deck)
|
inp_getopts(struct card *deck)
|
||||||
{
|
{
|
||||||
|
|
@ -222,7 +221,9 @@ inp_getopts(struct card *deck)
|
||||||
|
|
||||||
for (dd = deck->nextcard; dd; dd = next) {
|
for (dd = deck->nextcard; dd; dd = next) {
|
||||||
next = dd->nextcard;
|
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);
|
inp_casefix(dd->line);
|
||||||
if (last)
|
if (last)
|
||||||
last->nextcard = dd->nextcard;
|
last->nextcard = dd->nextcard;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue