NetBSD Problem Report #18521
Received: (qmail 23459 invoked by uid 605); 3 Oct 2002 15:25:02 -0000
Message-Id: <20021003152439.F0A5C19B2F@dmath5.geometrie.tuwien.ac.at>
Date: Thu, 3 Oct 2002 17:24:39 +0200 (CEST)
From: wiz@netbsd.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: wiz@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: printf(3) does not support the ' flag character
X-Send-Pr-Version: 3.95
>Number: 18521
>Category: standards
>Synopsis: printf(3) does not support the ' flag character
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: standards-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Oct 03 15:26:00 +0000 2002
>Closed-Date: Tue Jun 06 22:16:32 +0000 2017
>Last-Modified: Tue Jun 06 22:16:32 +0000 2017
>Originator: Thomas Klausner
>Release: NetBSD 1.6D
>Organization:
>Environment:
Irrelevant.
>Description:
The printf(3) family does not support the ' flag character, specified
by SUSv2 as:
'
The integer portion of the result of a decimal conversion (%i,
%d, %u, %f, %g or %G) will be formatted with thousands' grouping
characters. For other conversions the behaviour is undefined.
The non-monetary grouping character is used.
Additionally, %F (which does not appear in SUSv2)
should also be supported by this flag character.
>How-To-Repeat:
Write a C program using
printf("%'f", 1234567.89);
or take a look at pkgsrc/net/dctc.
>Fix:
Not provided.
Do we even have enough locale support for this yet?
>Release-Note:
>Audit-Trail:
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc: netbsd-bugs@netbsd.org
Subject: Re: standards/18521: printf(3) does not support the ' flag character
Date: Thu, 3 Oct 2002 17:51:16 +0200
On Thu, Oct 03, 2002 at 05:24:39PM +0200, wiz@netbsd.org wrote:
> >How-To-Repeat:
> Write a C program using
> printf("%'f", 1234567.89);
> or take a look at pkgsrc/net/dctc.
Sorry, that should have been pkgsrc/net/dc_gui.
Thomas
--
Thomas Klausner - wiz@danbala.ifoer.tuwien.ac.at
Main Rule of Usenet: Never argue with idiots. They drag you down to
their level, then beat you with experience.
From: joda@pdc.kth.se (Johan Danielsson)
To: wiz@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: standards/18521: printf(3) does not support the ' flag character
Date: 03 Oct 2002 20:02:29 +0200
wiz@netbsd.org writes:
> Do we even have enough locale support for this yet?
I almost think it's a feature that we don't print crap in the middle
of numbers, it's so totally useless, you can't do anything with a
string like that. Especially since scanf/atoi/whatever doesn't grok
numbers with , in them.
Just ignoring ' would be easy.
/Johan
From: Thomas Klausner <wiz@netbsd.org>
To: Johan Danielsson <joda@pdc.kth.se>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: standards/18521: printf(3) does not support the ' flag character
Date: Thu, 3 Oct 2002 20:09:36 +0200
On Thu, Oct 03, 2002 at 08:02:29PM +0200, Johan Danielsson wrote:
> I almost think it's a feature that we don't print crap in the middle
> of numbers, it's so totally useless, you can't do anything with a
> string like that. Especially since scanf/atoi/whatever doesn't grok
> numbers with , in them.
In the one case where I have seen it used so far, it is in a GUI
displaying numbers to the user. This is, of course, the intended
audience, not other programs...
> Just ignoring ' would be easy.
And would be better than what we have now, since now it's just a
format string error...
Thomas
--
Thomas Klausner - wiz@danbala.ifoer.tuwien.ac.at
Main Rule of Usenet: Never argue with idiots. They drag you down to
their level, then beat you with experience.
From: joda@pdc.kth.se (Johan Danielsson)
To: Thomas Klausner <wiz@netbsd.org>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: standards/18521: printf(3) does not support the ' flag character
Date: 04 Oct 2002 15:28:43 +0200
Thomas Klausner <wiz@netbsd.org> writes:
> In the one case where I have seen it used so far, it is in a GUI
> displaying numbers to the user.
But the next day you want to use those numbers as input somewhere
else, and you're screwed. IBM TSM does this, and it's *very* annoying.
/Johan
From: Thomas Klausner <wiz@netbsd.org>
To: Johan Danielsson <joda@pdc.kth.se>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: standards/18521: printf(3) does not support the ' flag character
Date: Fri, 4 Oct 2002 15:29:56 +0200
On Fri, Oct 04, 2002 at 03:28:43PM +0200, Johan Danielsson wrote:
> Thomas Klausner <wiz@netbsd.org> writes:
>
> > In the one case where I have seen it used so far, it is in a GUI
> > displaying numbers to the user.
>
> But the next day you want to use those numbers as input somewhere
> else, and you're screwed. IBM TSM does this, and it's *very* annoying.
Anyway, this discussion is completely off-topic, since SUSv2 says it
should be supported, and ISTR that we want to follow SUSv2.
Bye,
Thomas
--
Thomas Klausner - wiz@danbala.ifoer.tuwien.ac.at
Main Rule of Usenet: Never argue with idiots. They drag you down to
their level, then beat you with experience.
State-Changed-From-To: open->closed
State-Changed-By: perseant@NetBSD.org
State-Changed-When: Tue, 06 Jun 2017 22:16:32 +0000
State-Changed-Why:
We have had %' since at least 2009.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.