Commit Graph

13 Commits

Author SHA1 Message Date
wiz 928749aba2 Fix typo. 2019-03-12 22:21:53 +00:00
kre df01b8ae2e PR lib/54053
When auto scaling, and the buffer is bigger than big enough
for the biggest possible number, don't try and calculate
the max value that will fit in the buffer - that calc
will overflow (guaranteed) and is useless, the value
we're formatting cannot possibly be bigger.  So simply
use the unscaled value (the raw number).

While here, also avoid returning values that are larger
than the buffer len ... while it would be nice to be able
to find out how big the buffer should be so the data will
fit, the interface doesn't really allow that (the buffer
length passed in controls the scaling - at least when
auto scaling) and the code already does "return -1" when
it detects the buffer length is too small, even before
it works out how much would have been needed.  So, rather
than returning a value > len (while truncating the result
to fit in len ... all courtesy of snprintf()) return -1
in this case as well.

Also, allow suffix==NULL (meaning "") - there's no reason
not to, and requiring users to pass in an explicit "" is
not useful.
2019-03-11 15:10:51 +00:00
wiz 5cbea9c38a Fix variable name in SYNOPSIS to match DESCRIPTION.
From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2011-08-20 21:35:32 +00:00
wiz dbd13d8219 Spelling. 2011-04-28 11:22:44 +00:00
jruoho b19fbfbfda Xref strsuftoll(3) and orders(7). 2011-01-14 10:08:57 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
jmmv 2630bb2c25 Document dehumanize_number(3). 2008-02-09 09:09:04 +00:00
xtraeme 486b2ff085 The humanize_number(3) proto will be available in stdlib.h, after
christos moves it to the correct place.
2007-12-14 16:31:20 +00:00
wiz f5d4b0a380 Remove duplicate word, from Wojciech A. Koszek in PR 29938. 2005-04-11 12:19:16 +00:00
wiz 472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
wiz b214676aec New sentence, new line. From Robert Elz. 2002-10-01 16:48:34 +00:00
wiz 079c182094 Kilo abbreviation is a small k (PR 18408). 2002-09-26 15:06:47 +00:00
abs a086fb2909 Move humanize_number(3) from libutil to libc as per discussion on tech-misc
Revert minor number bump on libutil (with note to skip it next update), and
bump libc.
2002-08-22 17:24:08 +00:00