This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
Re: [Bug libc/2194] New: printf: meaning of precision for 'd', 'i', 'o', 'u', 'x', 'X' directives
- From: Andreas Schwab <schwab at suse dot de>
- To: sourceware-bugzilla at sourceware dot org
- Cc: glibc-bugs at sources dot redhat dot com
- Date: Mon, 23 Jan 2006 16:35:11 +0100
- Subject: Re: [Bug libc/2194] New: printf: meaning of precision for 'd', 'i', 'o', 'u', 'x', 'X' directives
- References: <20060123151149.2194.bruno@clisp.org>
"bruno at clisp dot org" <sourceware-bugzilla@sourceware.org> writes:
> Expected output according to POSIX:
>
> 0.000.000.001
> 0.000.000.012
> 0.000.000.123
> 0.000.001.234
> 0.000.012.345
> 0.000.123.456
> 0.001.234.567
> 0.012.345.678
> 0.123.456.789
> 1.234.567.890
> 12.345.678.901
> 123.456.789.012
Why do you think the grouping characters should be inserted after the
padding? POSIX says in the description of the '0' flag:
If the â0â and âââ flags both appear, the grouping characters are
inserted before zero padding.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."