summaryrefslogtreecommitdiff
path: root/lib/human.c
AgeCommit message (Collapse)Author
2004-11-16(human_readable): Support human_space_before_unit.Paul Eggert
2004-08-02unsigned -> unsigned intPaul Eggert
2004-04-04Sync from gnulib.Jim Meyering
2004-03-24(humblock): Support BLOCKSIZE envvar, as well as BLOCK_SIZE.Jim Meyering
2003-10-15Sync with gnulib.Jim Meyering
2003-09-10Include <stdlib.h>, <string.h> unconditionally.Jim Meyering
(getenv): Do not declare.
2003-09-03(human_readable): Fix bug that rounded 10501 to 10k.Jim Meyering
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 Meyering
2003-06-06Merge from gnulib.Jim Meyering
2002-11-09(human_readable): Revamp to avoid warning about unusedJim Meyering
variable 'amt'. Unfortunately this means using some gotos.
2002-11-08(human_readable): Avoid warnings from gcc -Wshadow.Jim Meyering
2002-10-19Rewrite to support locale-specificJim Meyering
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 Meyering
(generate_suffix_backwards): New function. (human_readable_inexact): Use it.
2000-06-16(adjust_value): New function.Jim Meyering
(human_readable_inexact): Apply rounding style even when printing approximate values.
2000-06-15(human_readable_inexact): Allow an input blockJim Meyering
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 Meyering
2000-02-27Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'Jim Meyering
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 Meyering
(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 Meyering
(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 Meyering
1999-05-13Include <string.h> or <strings.h> for strlen prototype.Jim Meyering
1999-04-25Don't include inttypes.h here.Jim Meyering
1999-04-18Include xstrtol.h, not xstrtoul.h, since xstrtol.h now defines all theJim Meyering
xstrto... functions.
1999-01-01(humblock): Use ARGMATCH in place of argmatch.Jim Meyering
1998-07-22(human_readable): amt -> damt, to fix typo whenJim Meyering
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 Meyering
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 Meyering
[lint]: Define `power'.
1997-11-30New file. The interface is inspiredJim Meyering
by the human_readable function that was in du.c, but it's pretty much rewritten from scratch.