diff options
author | tjr <tjr@FreeBSD.org> | 2002-05-17 01:25:51 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-05-17 01:25:51 +0000 |
commit | ddd093f802df49994e59483006cf67ec581884d5 (patch) | |
tree | 3045158d034795e8237b58687c7a4cce11265680 /usr.bin/compress | |
parent | 37d5dd60af7c1ef1e84a4ba16dfb2919a6ec5e51 (diff) | |
download | FreeBSD-src-ddd093f802df49994e59483006cf67ec581884d5.zip FreeBSD-src-ddd093f802df49994e59483006cf67ec581884d5.tar.gz |
Compression ratio statistics should be written to stderr instead of stdout.
Diffstat (limited to 'usr.bin/compress')
-rw-r--r-- | usr.bin/compress/compress.c | 9 |
1 files changed, 5 insertions, 4 deletions
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); } } |