summaryrefslogtreecommitdiff
path: root/lib/human.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-08-06 16:44:24 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2007-08-06 16:44:24 +0000
commit0253ee27eb11b96be8cba141e7e066787b5904c3 (patch)
treef824b18dd4ad1b0a92adf95427f6277cbd184221 /lib/human.h
parentfb7fde6f658ac18b7ab7ca61dca9a290cc8c3348 (diff)
downloadgnulib-0253ee27eb11b96be8cba141e7e066787b5904c3.tar.gz
* NEWS: Describe interface changes to human, xstrtol.
* lib/human.h: Include <xstrtol.h>. (human_options): Return enum strtol_error, not int. Remove bool arg; take int * instead. * lib/human.c: Don't include "gettext.h". (_): Remove; no longer used. Don't include <xstrtol.h>, since human.h does it. (human_options): Adjust to abovementioned interface changes. Do not report error to stderr; that's now the caller's responsibility. * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to interface change. * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than Str, Argument_type_string. All uses changed. Put " argument" in diagnostics to make them clearer. Change wording of suffix message for clarity. (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str, Argument_type_string. (STRTOL_FATAL_WARN): Remove; no longer used. * modules/human (Depends-on): Remove gettext-h.
Diffstat (limited to 'lib/human.h')
-rw-r--r--lib/human.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/human.h b/lib/human.h
index 44b8b36d57..95fc930042 100644
--- a/lib/human.h
+++ b/lib/human.h
@@ -1,7 +1,7 @@
/* human.h -- print human readable file size
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+ 2005, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,6 +27,8 @@
# include <stdint.h>
# include <unistd.h>
+# include <xstrtol.h>
+
/* A conservative bound on the maximum length of a human-readable string.
The output can be the square of the largest uintmax_t, so double
its size before converting to a bound.
@@ -78,6 +80,6 @@ enum
char *human_readable (uintmax_t, char *, int, uintmax_t, uintmax_t);
-int human_options (char const *, bool, uintmax_t *);
+enum strtol_error human_options (char const *, int *, uintmax_t *);
#endif /* HUMAN_H_ */