From e7e16e06e7f108cfb246a81ed6036b43ad4e311f Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 31 Aug 2013 10:57:26 +0200 Subject: [PATCH] inpcom.c: debug printout to debug-out.txt improved --- src/frontend/inpcom.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index df35ba75e..32dba6abc 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -845,6 +845,17 @@ inp_readall(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile /*debug: print into file*/ FILE *fd = fopen("debug-out.txt", "w"); struct line *t; + fprintf(fd, "**************** uncommented deck **************\n\n"); + /* always print first line */ + fprintf(fd, "%d %d %s\n", cc->li_linenum_orig, cc->li_linenum, cc->li_line); + /* here without out-commented lines */ + for (t = cc->li_next; t; t = t->li_next) { + if (*(t->li_line) == '*') + continue; + fprintf(fd, "%d %d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line); + } + fprintf(fd, "\n****************** complete deck ***************\n\n"); + /* now completely */ for (t = cc; t; t = t->li_next) fprintf(fd, "%d %d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line); fclose(fd);