diff lib/human.h @ 9137:629a6928f108

* 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.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 06 Aug 2007 16:44:24 +0000
parents 0bb31cd5b7ea
children bbbbbf4cd1c5
line wrap: on
line diff
--- 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 @@
 
 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_ */