https://bugzilla.samba.org/show_bug.cgi?id=5529


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Comment #3 from [EMAIL PROTECTED]  2008-06-14 12:27 CST -------
You can use the -h (--human-readable) option to ask rsync to display sizes with
suffixes, so you'd see 135.23M instead of 135227644.  An option to insert
commas (or periods) would be nice, though, and easy to do in the human_num()
routine that is already handling the numbers.  e.g., a version with commas
hard-wired:

--- a/util.c
+++ b/util.c
@@ -1197,6 +1197,7 @@ char *human_num(int64 num)
        static char bufs[4][128]; /* more than enough room */
        static unsigned int n;
        char *s;
+       int pos;

        n = (n + 1) % (sizeof bufs / sizeof bufs[0]);

@@ -1225,7 +1226,9 @@ char *human_num(int64 num)

        if (!num)
                *--s = '0';
-       while (num) {
+       for (pos = 0; num; pos++) {
+               if (pos && (pos % 3) == 0)
+                       *--s = ',';
                *--s = (char)(num % 10) + '0';
                num /= 10;
        }

Other changes would be needed to make room for the extra width in the progress
output, but I'll consider this for the future.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to