This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Thousands' grouping flag in printf() format string
- From: Larry Hall <cygwin-lh at cygwin dot com>
- To: Laszlo Ersek <LACOS at ludens dot elte dot hu>, cygwin at cygwin dot com
- Date: Sat, 05 Jun 2004 01:01:10 -0400
- Subject: Re: Thousands' grouping flag in printf() format string
- References: <Pine.VMS.3.91-2.1040604200929.50295D-100000@ludens.elte.hu>
- Reply-to: Cygwin List <cygwin at cygwin dot com>
At 02:18 PM 6/4/2004, you wrote:
>I'd like to ask whether there is any intention to implement the X/Open
>extension ' (0x27) printf() format flag. (Numbered argument specifications
>work (thanks to Jeff Johnston), and they are an X/Open extension too.)
>
>I encountered this problem using cygwin-1.5.10-3 on an XP.
>
>Illustration:
>
>--------
>
>#define _XOPEN_SOURCE
>
>#include <stdio.h>
>#include <assert.h>
>#include <locale.h>
>
>int main(void)
>{
> assert(setlocale(LC_NUMERIC, ""));
>
> /* This works. */
> printf("%1$d %1$d\n", 1000);
>
> /* This does not, even if LC_NUMERIC is C. */
> printf("%'d\n", 1001);
>
> return 0;
>}
>
>--------
>
>
>Thank you
>
>Laszlo Ersek
The target for Cygwin is POSIX. That said, if someone were to submit a
patch to support the construct you're looking for, I'm sure it would be
thoughtfully considered (i.e. PTC ;-) )
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
838 Washington Street (508) 893-9889 - FAX
Holliston, MA 01746
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/