From e5d4d7d63fc75ed3fef682a3927e101eb30878ef Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 10 Jan 2025 15:15:58 +0100 Subject: [PATCH] Add to debug-out.txt an output without source file information. Thus cluttering the view is reduced. --- src/frontend/inpcom.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 18baab1c2..ec646103f 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1222,20 +1222,33 @@ struct card *inp_readall(FILE *fp, const char *dir_name, const char* file_name, /*debug: print into file*/ struct card *t; fprintf(fd, - "**************** uncommented deck " + "\n\n**************** uncommented deck without source file info " "**************\n\n"); /* always print first line */ - fprintf(fd, "%6s %6d %6d %s\n", cc->linesource, cc->linenum_orig, cc->linenum, + fprintf(fd, "%6d %s\n", cc->linenum, cc->line); /* here without out-commented lines */ for (t = cc->nextcard; t; t = t->nextcard) { if (*(t->line) == '*') continue; - fprintf(fd, "%6s %6d %6d %s\n", - t->linesource, t->linenum_orig, t->linenum, t->line); + fprintf(fd, "%6d %s\n", + t->linenum, t->line); } fprintf(fd, - "\n****************** complete deck " + "\n\n**************** uncommented deck " + "**************\n\n"); + /* always print first line */ + fprintf(fd, "%6s %6d %6d %s\n", cc->linesource, cc->linenum_orig, cc->linenum, + cc->line); + /* here without out-commented lines */ + for (t = cc->nextcard; t; t = t->nextcard) { + if (*(t->line) == '*') + continue; + fprintf(fd, "%6s %6d %6d %s\n", + t->linesource, t->linenum_orig, t->linenum, t->line); + } + fprintf(fd, + "\n\n****************** complete deck " "***************\n\n"); /* now completely */ for (t = cc; t; t = t->nextcard)