DO NOT REPLY [Bug 5529] Use commas in displayed numbers

samba-bugs at samba.org samba-bugs at samba.org
Tue Jun 10 11:39:06 GMT 2008


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





------- Comment #2 from jamie at shareable.org  2008-06-10 06:39 CST -------
Fwiw, printf() _does_ insert commas if you ask for it - as a GNU extension.  So
suitable for GNU/Linux and some other environments.

Write something like %'lld - the apostrophe modifier character asks for
'thousands grouping character'.

It is locale-dependent.  Some locales use '.' to separate thousands, some have
a different number of digits per group, and some don't do grouping.

To do it somewhat portably, use localeconv(), nl_langinfo() and/or strfmon(). 
The GNU libc manual explains (among other places).


-- 
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.


More information about the rsync mailing list