From ddd093f802df49994e59483006cf67ec581884d5 Mon Sep 17 00:00:00 2001 From: tjr Date: Fri, 17 May 2002 01:25:51 +0000 Subject: Compression ratio statistics should be written to stderr instead of stdout. --- usr.bin/compress/compress.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'usr.bin/compress') diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c index b69422c..866e187 100644 --- a/usr.bin/compress/compress.c +++ b/usr.bin/compress/compress.c @@ -248,7 +248,8 @@ compress(in, out, bits) if (!force && sb.st_size >= isb.st_size) { if (verbose) - (void)printf("%s: file would grow; left unmodified\n", in); + (void)fprintf(stderr, "%s: file would grow; left unmodified\n", + in); eval = 2; if (unlink(out)) cwarn("%s", out); @@ -261,12 +262,12 @@ compress(in, out, bits) cwarn("%s", in); if (verbose) { - (void)printf("%s: ", out); + (void)fprintf(stderr, "%s: ", out); if (isb.st_size > sb.st_size) - (void)printf("%.0f%% compression\n", + (void)fprintf(stderr, "%.0f%% compression\n", ((float)sb.st_size / isb.st_size) * 100.0); else - (void)printf("%.0f%% expansion\n", + (void)fprintf(stderr, "%.0f%% expansion\n", ((float)isb.st_size / sb.st_size) * 100.0); } } -- cgit v1.1