diff --git a/lrzip.c b/lrzip.c index 579219a..d58ea23 100644 --- a/lrzip.c +++ b/lrzip.c @@ -314,7 +314,7 @@ int open_tmpoutfile(rzip_control *control) fd_out = mkstemp(control->outfile); if (fd_out == -1) { - print_progress("WARNING: Failed to create out tmpfile: %s, will fail if cannot perform %scompression entirely in ram\n", + print_output("WARNING: Failed to create out tmpfile: %s, will fail if cannot perform %scompression entirely in ram\n", control->outfile, DECOMPRESS ? "de" : ""); } else register_outfile(control, control->outfile, TEST_ONLY || STDOUT || !KEEP_BROKEN); @@ -478,7 +478,7 @@ int open_tmpinfile(rzip_control *control) } if (fd_in == -1) { - print_progress("WARNING: Failed to create in tmpfile: %s, will fail if cannot perform %scompression entirely in ram\n", + print_output("WARNING: Failed to create in tmpfile: %s, will fail if cannot perform %scompression entirely in ram\n", control->infile, DECOMPRESS ? "de" : ""); } else { register_infile(control, control->infile, (DECOMPRESS || TEST_ONLY) && STDIN); @@ -774,7 +774,7 @@ bool decompress_file(rzip_control *control) } if (!STDOUT) - print_progress("Output filename is: %s\n", control->outfile); + print_output("Output filename is: %s\n", control->outfile); } if ( IS_FROM_FILE ) { @@ -871,7 +871,7 @@ bool decompress_file(rzip_control *control) if (unlikely(!get_hash(control, 0))) return false; - print_progress("Decompressing...\n"); + print_output("Decompressing...\n"); if (unlikely(runzip_fd(control, fd_in, fd_hist, expected_size) < 0)) { clear_rulist(control); @@ -885,13 +885,13 @@ bool decompress_file(rzip_control *control) /* if we get here, no fatal_return(( errors during decompression */ print_progress("\r"); if (!(STDOUT | TEST_ONLY)) - print_progress("Output filename is: %s: ", control->outfile); + print_output("Output filename is: %s: ", control->outfile); if (!expected_size) expected_size = control->st_size; if (!ENCRYPT) - print_progress("[OK] - %lld bytes \n", expected_size); + print_output("[OK] - %lld bytes \n", expected_size); else - print_progress("[OK] \n"); + print_output("[OK] \n"); if (TMP_OUTBUF) close_tmpoutbuf(control); @@ -1310,7 +1310,7 @@ bool compress_file(rzip_control *control) } else strcpy(control->outfile, tmpinfile); strcat(control->outfile, control->suffix); - print_progress("Output filename is: %s\n", control->outfile); + print_output("Output filename is: %s\n", control->outfile); } fd_out = open(control->outfile, O_RDWR | O_CREAT | O_EXCL, 0666); diff --git a/main.c b/main.c index f1c3ba1..33c85af 100644 --- a/main.c +++ b/main.c @@ -723,7 +723,7 @@ recursion: minutes = (int)(total_time / 60) % 60; seconds = total_time - hours * 3600 - minutes * 60; if (!INFO) - print_progress("Total time: %02d:%02d:%05.2f\n", hours, minutes, seconds); + print_output("Total time: %02d:%02d:%05.2f\n", hours, minutes, seconds); if (recurse) goto recursion; } diff --git a/runzip.c b/runzip.c index e3a04b2..7a1658c 100644 --- a/runzip.c +++ b/runzip.c @@ -412,7 +412,7 @@ i64 runzip_fd(rzip_control *control, int fd_in, int fd_hist, i64 expected_size) tdiff = end.tv_sec - start.tv_sec; if (!tdiff) tdiff = 1; - print_progress("\nAverage DeCompression Speed: %6.3fMB/s\n", + print_output("\nAverage DeCompression Speed: %6.3fMB/s\n", (total / 1024 / 1024) / tdiff); } diff --git a/rzip.c b/rzip.c index ba7998b..c79e50c 100644 --- a/rzip.c +++ b/rzip.c @@ -1247,8 +1247,8 @@ retry: (1.0 + st->stats.match_bytes) / st->stats.literal_bytes); if (!STDIN) - print_progress("%s - ", control->infile); - print_progress("Compression Ratio: %.3f. Average Compression Speed: %6.3fMB/s.\n", + print_output("%s - ", control->infile); + print_output("Compression Ratio: %.3f. Average Compression Speed: %6.3fMB/s.\n", 1.0 * s.st_size / s2.st_size, chunkmbs); clear_sslist(st); diff --git a/stream.c b/stream.c index eaaa425..304ed5b 100644 --- a/stream.c +++ b/stream.c @@ -1677,7 +1677,7 @@ fill_another: fsync(control->fd_out); if (unlikely(u_len > control->maxram)) - print_progress("Warning, attempting to malloc very large buffer for this environment of size %lld\n", u_len); + print_output("Warning, attempting to malloc very large buffer for this environment of size %lld\n", u_len); max_len = MAX(u_len, MIN_SIZE); max_len = MAX(max_len, c_len); s_buf = malloc(max_len);