Compression ratio statistics should be written to stderr instead of stdout.
This commit is contained in:
parent
6c1b63bb06
commit
783b4710d3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96770
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user