diff options
author | Wayne Davison <wayned@samba.org> | 2008-09-01 12:53:43 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2008-09-01 13:27:11 -0700 |
commit | adc2476fa213797d849ae80fa8b5fcd9eba5dc4f (patch) | |
tree | 6a2ec090dfab190c8583760edafb2828cd7f4944 /progress.c | |
parent | 34c3ca8f35ddd77eb18711d227924d0010520075 (diff) | |
download | rsync-adc2476fa213797d849ae80fa8b5fcd9eba5dc4f.tar.gz rsync-adc2476fa213797d849ae80fa8b5fcd9eba5dc4f.tar.bz2 rsync-adc2476fa213797d849ae80fa8b5fcd9eba5dc4f.zip |
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.
Diffstat (limited to 'progress.c')
-rw-r--r-- | progress.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |