]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Merge from gnulib.
authorJim Meyering <jim@meyering.net>
Fri, 6 Jun 2003 19:15:40 +0000 (19:15 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 6 Jun 2003 19:15:40 +0000 (19:15 +0000)
lib/human.c

index 1178b9c4c237f9a40e0418dd0343e0098822ac01..558263473a0d0e82a140654e9de579eb520b5232 100644 (file)
@@ -1,6 +1,6 @@
 /* human.c -- print human readable file size
 
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
    Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-/* Originally contributed by lm@sgi.com;
-   --si, output block size selection, large file support,
-   and grouping added by eggert@twinsun.com.  */
+/* Written by Paul Eggert and Larry McVoy.  */
 
 #if HAVE_CONFIG_H
 # include <config.h>
 #endif
 
-#if HAVE_STDBOOL_H
-# include <stdbool.h>
-#else
-typedef enum {false = 0, true = 1} bool;
-#endif
+#include "human.h"
 
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
 #ifndef SIZE_MAX
 # define SIZE_MAX ((size_t) -1)
 #endif
@@ -45,8 +32,6 @@ typedef enum {false = 0, true = 1} bool;
 # define UINTMAX_MAX ((uintmax_t) -1)
 #endif
 
-#include <limits.h>
-
 #if HAVE_LOCALE_H && HAVE_LOCALECONV
 # include <locale.h>
 #endif
@@ -69,18 +54,13 @@ char *getenv ();
 # include <strings.h>
 #endif
 
-#include <stdio.h>
-#include <sys/types.h>
-
-#include <gettext.h>
-#define _(text) gettext (text)
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
 
 #include <argmatch.h>
 #include <error.h>
 #include <xstrtol.h>
 
-#include "human.h"
-
 /* The maximum length of a suffix like "KiB".  */
 #define HUMAN_READABLE_SUFFIX_LENGTH_MAX 3