If preprocessing is skipped, we still need the number of lines in the deck.

This commit is contained in:
Holger Vogt 2024-10-27 15:18:34 +01:00
parent 4847ce100e
commit 31b9075f88
1 changed files with 8 additions and 2 deletions

View File

@ -1050,9 +1050,15 @@ struct card *inp_readall(FILE *fp, const char *dir_name, const char* file_name,
rv = inp_read(fp, 0, dir_name, file_name, comfile, intfile);
cc = rv.cc;
/* skip all pre-processing for expanded input files created by 'listing r' */
if (cc && ciprefix("* expanded deck of", cc->line))
/* skip all pre-processing for expanded input files created by 'listing r',
but evaluate number of lines in input deck */
if (cc && ciprefix("* expanded deck of", cc->line)) {
struct card* dd;
dynmaxline = 0;
for (dd = cc; dd; dd = dd->nextcard)
dynmaxline++;
return cc;
}
/* files starting with *ng_script are user supplied command files */
if (cc && ciprefix("*ng_script", cc->line))