flag OUTDECK yields printout of deck after param substitution

This commit is contained in:
h_vogt 2009-02-28 14:03:08 +00:00
parent 4609081714
commit 3ecc23e290
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-02-28 Holger Vogt
* inp.c:605 ff, fcn inp_spsource(), if preproc. flag OUTDECK defined,
the deck is saved as debug-out2.txt, here after parameter substitution
2009-02-25 Holger Vogt
* inpdomod.c:436 error message adapted to existing devices
* /frontend/numparam/numparam.h, general.h: length of char arrays

View File

@ -57,6 +57,13 @@ static char * upper(register char *string);
static bool doedit(char *filename);
static void line_free_x(struct line * deck, bool recurse);
/* uncomment this line for getting deck output after all
manipulations into debug-out2.txt.
Used to check numpram substitution, compare to debug.out.txt
retrieved from inpcom.c, fcn inp_readall()*/
/* #define OUTDECK */
/* Do a listing. Use is listing [expanded] [logical] [physical] [deck] */
void
com_listing(wordlist *wl)
@ -594,6 +601,20 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
printf("In inp_spsource, done with dodeck.\n");
#endif
/* print out the expanded deck into debug-out2.txt */
#if defined(TRACE) || defined(OUTDECK)
{
FILE *fdo;
struct line *tmp_ptr1 = NULL;
/*debug: print into file*/
fdo = fopen("debug-out2.txt", "w");
for(tmp_ptr1 = deck; tmp_ptr1 != NULL; tmp_ptr1 = tmp_ptr1->li_next)
fprintf(fdo, "%s\n", tmp_ptr1->li_line);
;
(void) fclose(fdo);
}
#endif
/* Now that the deck is loaded, do the commands, if there are any */
if (controls) {
for (end = wl = wl_reverse(controls); wl; wl = wl->wl_next)