From adc2476fa213797d849ae80fa8b5fcd9eba5dc4f Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 1 Sep 2008 12:53:43 -0700 Subject: Output numbers in 3-digit groups by default (e.g. 1,234,567). Also improved the human-readable output functions, including adding the ability to output negative numbers. --- progress.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'progress.c') diff --git a/progress.c b/progress.c index b09ca118..5d445a13 100644 --- a/progress.c +++ b/progress.c @@ -21,11 +21,11 @@ */ #include "rsync.h" +#include "ifuncs.h" extern int am_server; extern int need_unsorted_flist; extern int output_needs_newline; -extern int human_readable; extern struct stats stats; extern struct file_list *cur_flist; @@ -72,7 +72,7 @@ static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, if (is_last) { int len = snprintf(eol, sizeof eol, - " (xfer#%d, to-check=%d/%d)\n", + " (xfr#%d, to-chk=%d/%d)\n", stats.num_transferred_files, stats.num_files - current_file_index - 1, stats.num_files); @@ -124,8 +124,8 @@ static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, output_needs_newline = 0; pct = ofs == size ? 100 : (int) (100.0 * ofs / size); - rprintf(FCLIENT, "\r%12s %3d%% %7.2f%s %s%s", - big_num(ofs, human_readable), pct, rate, units, rembuf, eol); + rprintf(FCLIENT, "\r%15s %3d%% %7.2f%s %s%s", + human_num(ofs), pct, rate, units, rembuf, eol); if (!is_last) { output_needs_newline = 1; rflush(FCLIENT); -- cgit v1.2.3