From 3acc9d6f25e716af0edee5721ba33e87da802bf7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 2 Nov 2011 10:35:00 -0700 Subject: [PATCH] * gzip.c (treat_stdin): If quiet, be quiet with plain gzip -q. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Problem reported by Michaël Guitton in . --- gzip.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gzip.c b/gzip.c index 6164438..cb10a23 100644 --- a/gzip.c +++ b/gzip.c @@ -617,11 +617,15 @@ local void treat_stdin() * * Here we use the --force option to get the other behavior. */ - fprintf(stderr, - "%s: compressed data not %s a terminal. Use -f to force %scompression.\n", - program_name, decompress ? "read from" : "written to", - decompress ? "de" : ""); - fprintf (stderr, "For help, type: %s -h\n", program_name); + if (! quiet) + fprintf (stderr, + ("%s: compressed data not %s a terminal." + " Use -f to force %scompression.\n" + "For help, type: %s -h\n"), + program_name, + decompress ? "read from" : "written to", + decompress ? "de" : "", + program_name); do_exit(ERROR); } -- 2.47.2