Re: svn commit: r211304 - head/lib/libutil

2010-08-24 Thread Dag-Erling Smørgrav
Bruce Evans b...@optusnet.com.au writes: Dag-Erling Smørgrav d...@des.no writes: That's awesome! Any way I can convince you to fix expand_number() as well? I got a detailed explanation of what's wrong with it (both before and after my commits) from bde@ (cc:ed) in private correspondence;

Re: svn commit: r211304 - head/lib/libutil

2010-08-23 Thread Dag-Erling Smørgrav
Dimitry Andric dimi...@andric.com writes: Dag-Erling Smørgrav d...@des.no writes: Bruce Cran br...@cran.org.uk writes: Somewhat related, there are overflow bugs in humanize_number - for example df(1) fails to display space from a 100PB filesystem correctly. Patch? :) Attached.

Re: svn commit: r211304 - head/lib/libutil

2010-08-23 Thread Bruce Evans
On Mon, 23 Aug 2010, [utf-8] Dag-Erling Sm??rgrav wrote: Dimitry Andric dimi...@andric.com writes: Dag-Erling Sm??rgrav d...@des.no writes: Bruce Cran br...@cran.org.uk writes: Somewhat related, there are overflow bugs in humanize_number - for example df(1) fails to display space from a

Re: svn commit: r211304 - head/lib/libutil

2010-08-22 Thread Dimitry Andric
On 2010-08-16 10:51, Dag-Erling Smørgrav wrote: Bruce Cran br...@cran.org.uk writes: Somewhat related, there are overflow bugs in humanize_number - for example df(1) fails to display space from a 100PB filesystem correctly. Patch? :) Attached. This makes humanize_number() work properly

Re: svn commit: r211304 - head/lib/libutil

2010-08-16 Thread Dag-Erling Smørgrav
Bruce Cran br...@cran.org.uk writes: Somewhat related, there are overflow bugs in humanize_number - for example df(1) fails to display space from a 100PB filesystem correctly. Patch? :) DES -- Dag-Erling Smørgrav - d...@des.no ___

Re: svn commit: r211304 - head/lib/libutil

2010-08-15 Thread Dag-Erling Smørgrav
m...@freebsd.org writes: I think it's possible for the number to overflow but also not shrink. e.g. 0x12345678T. Ah, you're right, I didn't think of that. Thanks. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list

Re: svn commit: r211304 - head/lib/libutil

2010-08-15 Thread Bruce Cran
On Sat, 14 Aug 2010 14:34:36 + (UTC) Dag-Erling Smorgrav d...@freebsd.org wrote: Author: des Date: Sat Aug 14 14:34:36 2010 New Revision: 211304 URL: http://svn.freebsd.org/changeset/base/211304 Log: Simplify expand_number() by combining the (unrolled) loop with the switch.

svn commit: r211304 - head/lib/libutil

2010-08-14 Thread Dag-Erling Smorgrav
Author: des Date: Sat Aug 14 14:34:36 2010 New Revision: 211304 URL: http://svn.freebsd.org/changeset/base/211304 Log: Simplify expand_number() by combining the (unrolled) loop with the switch. Since expand_number() does not accept negative numbers, switch from int64_t to uint64_t; this

Re: svn commit: r211304 - head/lib/libutil

2010-08-14 Thread mdf
On Sat, Aug 14, 2010 at 2:34 PM, Dag-Erling Smorgrav d...@freebsd.org wrote: Author: des Date: Sat Aug 14 14:34:36 2010 New Revision: 211304 URL: http://svn.freebsd.org/changeset/base/211304 Log:  Simplify expand_number() by combining the (unrolled) loop with the  switch.  Since