From db0f2b808103d44fa36ea6c96321b87da9ac1add Mon Sep 17 00:00:00 2001 From: Ganton Date: Thu, 30 Mar 2023 20:40:35 +0200 Subject: [PATCH] If the verbose mode is disabled, do not always print some lines That also follows the design principle of "silence is golden" (from the Unix philosophy). --- src/filehandling_functions.c | 14 ++++++++++---- src/utils.c | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/filehandling_functions.c b/src/filehandling_functions.c index d6bb633..b05596c 100644 --- a/src/filehandling_functions.c +++ b/src/filehandling_functions.c @@ -484,14 +484,16 @@ seek_indirect(FILE * id) type = 0; if (!curses_open) { - printf(_("Searching for indirect done")); + if (verbose) + printf(_("Searching for indirect done")); printf("\n"); } else { attrset(bottomline); mvhline(maxy - 1, 0, ' ', maxx); - mvaddstr(maxy - 1, 0, _("Searching for indirect done")); + if (verbose) + mvaddstr(maxy - 1, 0, _("Searching for indirect done")); attrset(normal); } fseek(id, seek_pos, SEEK_SET); @@ -562,12 +564,16 @@ seek_tag_table(FILE * id,int quiet) xfree(type); type = 0; if (!curses_open) - printf(_("Searching for tag table done\n")); + { + if (verbose) + printf(_("Searching for tag table done\n")); + } else { attrset(bottomline); mvhline(maxy - 1, 0, ' ', maxx); - mvaddstr(maxy - 1, 0, "Searching for tag table done"); + if (verbose) + mvaddstr(maxy - 1, 0, "Searching for tag table done"); attrset(normal); } fseek(id, seek_pos, SEEK_SET); diff --git a/src/utils.c b/src/utils.c index 34c9b88..8fb0e08 100644 --- a/src/utils.c +++ b/src/utils.c @@ -433,7 +433,10 @@ closeprogram() if (ClearScreenAtExit) xsystem("clear"); else - printf("\n"); + { + if (verbose) + printf("\n"); + } if (tmpfilename1) { unlink(tmpfilename1);