Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/gen



On Tue, Mar 15, 2011 at 12:26:05PM +0100, Joerg Sonnenberger wrote:
> On Tue, Mar 15, 2011 at 11:26:05AM +0100, Joerg Sonnenberger wrote:
> > On Tue, Mar 15, 2011 at 03:47:04AM +0000, Eric Haszlakiewicz wrote:
> > > Module Name:      src
> > > Committed By:     erh
> > > Date:             Tue Mar 15 03:47:04 UTC 2011
> > > 
> > > Modified Files:
> > >   src/lib/libc/gen: Makefile.inc
> > > Added Files:
> > >   src/lib/libc/gen: commaize_number.3 commaize_number.c
> > > 
> > > Log Message:
> > > PR#7540, add a commaize_number function, which inserts comma into a string
> > >  of digits to make it more readable.  This is soon to be used in /bin/ls.
> > 
> > Wouldn't a flag for humanize_number be a much better approach for this?
> > Also, this doesn't belong into libc.
> 
> There is also the point that the ' printf modifier is supposed to do
> this if the current locale has a thousand separator. As such, I would
> like to see this reverted and done properly.

IIRC scanf() and the number processing sort are also required to parse
numbers with the locale's 1000 separator.
This is all fubar when the thousand sep is ' ' or '.'.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index