aboutsummaryrefslogtreecommitdiffstats
path: root/lib/human.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-08-21Remove from CVS, since the bootstrap script generates them automatically.Paul Eggert1-488/+0
2005-09-22Sync from gnulib.Paul Eggert1-1/+1
2005-05-14Update FSF postal mail address.Jim Meyering1-1/+1
2005-04-09(humblock): Set *options even when returning due toJim Meyering1-1/+4
xstrtoumax conversion failure. Thanks to a used-uninitialized warning from gcc-4.
2005-03-09Include intprops.h.Paul Eggert1-4/+3
(group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
2005-01-04* human.c (SIZE_MAX, UINTMAX_MAX): Move these conditionalPaul Eggert1-8/+8
definitions to be after all include files, to avoid collisions.
2004-12-02Assume <locale.h> exists.Paul Eggert1-6/+1
(human_readable): Assume localeconv exists.
2004-11-16(human_readable): Support human_space_before_unit.Paul Eggert1-0/+6
2004-08-02unsigned -> unsigned intPaul Eggert1-2/+2
2004-04-04Sync from gnulib.Jim Meyering1-2/+2
2004-03-24(humblock): Support BLOCKSIZE envvar, as well as BLOCK_SIZE.Jim Meyering1-1/+3
2003-10-15Sync with gnulib.Jim Meyering1-2/+0
2003-09-10Include <stdlib.h>, <string.h> unconditionally.Jim Meyering1-18/+2
(getenv): Do not declare.
2003-09-03(human_readable): Fix bug that rounded 10501 to 10k.Jim Meyering1-5/+3
Bug reported by Lute Kamstra in <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
2003-06-06Include <stdio.h>, once again, for declaration of sprintf.Jim Meyering1-0/+2
2003-06-06Merge from gnulib.Jim Meyering1-25/+5
2002-11-09(human_readable): Revamp to avoid warning about unusedJim Meyering1-146/+153
variable 'amt'. Unfortunately this means using some gotos.
2002-11-08(human_readable): Avoid warnings from gcc -Wshadow.Jim Meyering1-18/+24
2002-10-19Rewrite to support locale-specificJim Meyering1-203/+345
notations like thousands separators. Specify what includer of include.h must include beforehand. (human_group_digits, human_suppress_point_zero, human_autoscale, human_base_1024, human_SI, human_B): New enum values. (human_readable): Rename from human_readable_inexact; put the options before the sizes. All uses changed. The old human_readable function has been removed; use inttostr.h instead. (human_options): Renamed from human_block_size, with new signature that allows block sizes up to UINTMAX_MAX. All callers changed.
2001-12-19(suffixes): Prefer K to k for 1024.Jim Meyering1-19/+43
(generate_suffix_backwards): New function. (human_readable_inexact): Use it.
2000-06-16(adjust_value): New function.Jim Meyering1-47/+69
(human_readable_inexact): Apply rounding style even when printing approximate values.
2000-06-15(human_readable_inexact): Allow an input blockJim Meyering1-45/+40
size that is not a multiple of the output block size, and vice versa.
2000-02-27use double quotes, not single quotes around syntax-error-evoking stringJim Meyering1-1/+1
2000-02-27Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'Jim Meyering1-1/+4
now that autoconf always defines the HAVE_DECL_ symbols. Arrange for cpp to fail if the configure-time declaration check was not run.
1999-11-07(default_block_size): New function.Jim Meyering1-1/+12
(humblock): Use it if no block size is specified. (human_block_size): If the specified block size is zero, report an error if report_errors is nonzero; otherwise use the default.
1999-07-04(human_readable): New function.Jim Meyering1-9/+31
(human_readable_inexact): Renamed from human_readable, with new arg INEXACT_STYLE. Add support for ceiling and floor.
1999-05-17(human_readable): Allow from_block_size to be zero.Jim Meyering1-4/+5
1999-05-13Include <string.h> or <strings.h> for strlen prototype.Jim Meyering1-0/+6
1999-04-25Don't include inttypes.h here.Jim Meyering1-4/+0
1999-04-18Include xstrtol.h, not xstrtoul.h, since xstrtol.h now defines all theJim Meyering1-1/+1
xstrto... functions.
1999-01-01(humblock): Use ARGMATCH in place of argmatch.Jim Meyering1-2/+2
1998-07-22(human_readable): amt -> damt, to fix typo whenJim Meyering1-1/+1
computing which power to use after overflow occurs during multiplication. From Paul Eggert.
1998-06-29 * lib/human.c, lib/human.h (human_readable): Coalesce last two argsJim Meyering1-21/+104
into one, for convenience. All callers changed. (human_block_size): New function. * lib/human.c: Include <config.h> only if HAVE_CONFIG_H. Include <stdlib.h> if HAVE_STDLIB_H; declare getenv unless HAVE_DECL_GETENV. (_): New macro. Include <argmatch.h>, <error.h>, <xstrtoul.h>. (DEFAULT_BLOCK_SIZE): New macro. (block_size_args, block_size_types): New constants. (humblock): New function.
1997-11-30(human_readable): Convert to ANSI-style definition.Jim Meyering1-14/+13
[lint]: Define `power'.
1997-11-30New file. The interface is inspiredJim Meyering1-0/+204
by the human_readable function that was in du.c, but it's pretty much rewritten from scratch.