<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libutil/humanize_number.3, branch releng/14.2</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Remove $FreeBSD$: one-line nroff pattern</title>
<updated>2023-08-16T17:55:15+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b2c76c41be32f904179efed29c0ca04d53f3996c'/>
<id>b2c76c41be32f904179efed29c0ca04d53f3996c</id>
<content type='text'>
Remove /^\.\\"\s*\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\.\\"\s*\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>libutil: Fix mandoc warnings</title>
<updated>2022-08-07T14:30:24+00:00</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2022-08-07T14:30:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=816ca3d10fd2f0c9283005a189fac156071d748d'/>
<id>816ca3d10fd2f0c9283005a189fac156071d748d</id>
<content type='text'>
- missing comma before name
- possible typo in section name: Sh CAVEAT instead of CAVEATS
- useless macro: Tn
- blank line in fill mode, using .sp
- no blank before trailing delimiter: Dv NULL?

MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- missing comma before name
- possible typo in section name: Sh CAVEAT instead of CAVEATS
- useless macro: Tn
- blank line in fill mode, using .sp
- no blank before trailing delimiter: Dv NULL?

MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>humanize_number(3): fix math edge case in rounding large numbers</title>
<updated>2017-12-28T22:57:34+00:00</updated>
<author>
<name>Bartek Rutkowski</name>
<email>robak@FreeBSD.org</email>
</author>
<published>2017-12-28T22:57:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e285e32e5615d20b4899c4f82d5c88a81ec49395'/>
<id>e285e32e5615d20b4899c4f82d5c88a81ec49395</id>
<content type='text'>
Fix for remainder overflow, when in rare cases adding remainder to divider
exceeded 1 and turned the total to 1000 in final formatting, taking up
the space for the unit character.

The fix continues the division of the original number if the above case
happens -- added the appropriate check to the for loop performing
the division. This lowers the value shown, to make it fit into the buffer
space provided (1.0M for 4+1 character buffer, as used by ls).

Add test case for the reported bug and extend test program to support
providing buffer length (ls -lh uses 5, tests hard-coded 4).

PR:		224498
Submitted by:	Pawel Biernacki &lt;pawel.biernacki@gmail.com&gt;
Reported by:	Masachika Ishizuka &lt;ish@amail.plala.or.jp&gt;
Reviewed by:	cem, kib
Approved by:	cem, kib
MFC after:	1 week
Sponsored by:	Mysterious Code Ltd.
Differential Revision:	D13578
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix for remainder overflow, when in rare cases adding remainder to divider
exceeded 1 and turned the total to 1000 in final formatting, taking up
the space for the unit character.

The fix continues the division of the original number if the above case
happens -- added the appropriate check to the for loop performing
the division. This lowers the value shown, to make it fit into the buffer
space provided (1.0M for 4+1 character buffer, as used by ls).

Add test case for the reported bug and extend test program to support
providing buffer length (ls -lh uses 5, tests hard-coded 4).

PR:		224498
Submitted by:	Pawel Biernacki &lt;pawel.biernacki@gmail.com&gt;
Reported by:	Masachika Ishizuka &lt;ish@amail.plala.or.jp&gt;
Reviewed by:	cem, kib
Approved by:	cem, kib
MFC after:	1 week
Sponsored by:	Mysterious Code Ltd.
Differential Revision:	D13578
</pre>
</div>
</content>
</entry>
<entry>
<title>don't assert on bad args, instead return an error..</title>
<updated>2013-10-07T22:22:57+00:00</updated>
<author>
<name>John-Mark Gurney</name>
<email>jmg@FreeBSD.org</email>
</author>
<published>2013-10-07T22:22:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=44f01c419d1e84684fa53b3814459419ded71a6b'/>
<id>44f01c419d1e84684fa53b3814459419ded71a6b</id>
<content type='text'>
Since so many programs don't check return value, always NUL terminate
the buf...

fix rounding when using base 1024 (the bug that started it all)...

add a set of test cases so we can make sure that things don't break
in the future...

Thanks to Clifton Royston for testing and the test program...

Approved by:	re (hrs, glebius)
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since so many programs don't check return value, always NUL terminate
the buf...

fix rounding when using base 1024 (the bug that started it all)...

add a set of test cases so we can make sure that things don't break
in the future...

Thanks to Clifton Royston for testing and the test program...

Approved by:	re (hrs, glebius)
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for IEE/IEC (and now also SI) power of two notions of</title>
<updated>2011-04-12T22:48:03+00:00</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2011-04-12T22:48:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7d14df1a2d82bf1bc811ba2e33804a6de0504240'/>
<id>7d14df1a2d82bf1bc811ba2e33804a6de0504240</id>
<content type='text'>
prefixes (Ki, Mi, Gi...) for humanize_number(3).

Note that applications has to pass HN_IEC_PREFIXES to use this
feature for backward compatibility reasons.

Reviewed by:	arundel
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
prefixes (Ki, Mi, Gi...) for humanize_number(3).

Note that applications has to pass HN_IEC_PREFIXES to use this
feature for backward compatibility reasons.

Reviewed by:	arundel
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>s/buffer/buf as is used in the code.</title>
<updated>2011-03-21T23:59:20+00:00</updated>
<author>
<name>Glen Barber</name>
<email>gjb@FreeBSD.org</email>
</author>
<published>2011-03-21T23:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5f2e9efbf964b12318d6e4e803fa4b0456310ec6'/>
<id>5f2e9efbf964b12318d6e4e803fa4b0456310ec6</id>
<content type='text'>
Submitted by:	arundel (via doc@)
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Submitted by:	arundel (via doc@)
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>The NetBSD Foundation has granted permission to remove clause 3 and 4 from</title>
<updated>2010-03-02T17:06:40+00:00</updated>
<author>
<name>Joel Dahl</name>
<email>joel@FreeBSD.org</email>
</author>
<published>2010-03-02T17:06:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f20b6c8575c4f494a230cea831c3f5e0cc22b017'/>
<id>f20b6c8575c4f494a230cea831c3f5e0cc22b017</id>
<content type='text'>
their software.

Obtained from:	NetBSD
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
their software.

Obtained from:	NetBSD
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust history.</title>
<updated>2007-09-28T15:31:44+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2007-09-28T15:31:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=61881b52838a3466cdfd660cd31df12187d6fe60'/>
<id>61881b52838a3466cdfd660cd31df12187d6fe60</id>
<content type='text'>
Approved by:	re(ken)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Approved by:	re(ken)
</pre>
</div>
</content>
</entry>
<entry>
<title>Point expand_number(3) at humanize_number(3) and nive versa.</title>
<updated>2007-09-05T14:25:16+00:00</updated>
<author>
<name>Pawel Jakub Dawidek</name>
<email>pjd@FreeBSD.org</email>
</author>
<published>2007-09-05T14:25:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c2fc8cebdd152fb1dd0b17cbe09c7ab5108cbc37'/>
<id>c2fc8cebdd152fb1dd0b17cbe09c7ab5108cbc37</id>
<content type='text'>
Suggested by:	trhodes
Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggested by:	trhodes
Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>Markup fixes.</title>
<updated>2006-09-17T21:27:35+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2006-09-17T21:27:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a73a3ab56baabfbc4b63c100ee64951a407e9416'/>
<id>a73a3ab56baabfbc4b63c100ee64951a407e9416</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
