summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-06-06 19:16:06 +0000
committerJim Meyering <jim@meyering.net>2003-06-06 19:16:06 +0000
commit4a57eac20dc5aa55b0d9beaefd00c35928b88de0 (patch)
tree1bcc4d453e49cf28f66da4f45881758376dd2570
parent47158d0de8aa97855a1a891884a5de2f95509221 (diff)
downloadcoreutils-4a57eac20dc5aa55b0d9beaefd00c35928b88de0.tar.xz
Merge from gnulib.
-rw-r--r--lib/exclude.c13
-rw-r--r--lib/human.h52
2 files changed, 35 insertions, 30 deletions
diff --git a/lib/exclude.c b/lib/exclude.c
index 0de08dea5..75042cbd8 100644
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -24,20 +24,14 @@
# include <config.h>
#endif
-#if HAVE_STDBOOL_H
-# include <stdbool.h>
-#else
-typedef enum {false = 0, true = 1} bool;
-#endif
+#include <stdbool.h>
#include <errno.h>
#ifndef errno
extern int errno;
#endif
+#include <stddef.h>
#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@ -107,8 +101,7 @@ new_exclude (void)
struct exclude *ex = xmalloc (sizeof *ex);
ex->exclude_count = 0;
ex->exclude_alloc = (1 << 6); /* This must be a power of 2. */
- ex->exclude = xmalloc (ex->exclude_alloc
- * sizeof ex->exclude[0]);
+ ex->exclude = xmalloc (ex->exclude_alloc * sizeof ex->exclude[0]);
return ex;
}
diff --git a/lib/human.h b/lib/human.h
index 343fff7e8..604fec1ba 100644
--- a/lib/human.h
+++ b/lib/human.h
@@ -1,29 +1,41 @@
-#ifndef HUMAN_H_
-# define HUMAN_H_ 1
+/* human.h -- print human readable file size
+
+ 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
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
-/* Before including this file, you need something like the following:
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- #if HAVE_CONFIG_H
- # include <config.h>
- #endif
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- #if HAVE_STDBOOL_H
- # include <stdbool.h>
- #else
- typedef enum {false = 0, true = 1} bool;
- #endif
+/* Written by Paul Eggert and Larry McVoy. */
+
+#ifndef HUMAN_H_
+# define HUMAN_H_ 1
- #if HAVE_INTTYPES_H
- # include <inttypes.h>
- #else
- # if HAVE_STDINT_H
- # include <stdint.h>
- # endif
- #endif
+# if HAVE_CONFIG_H
+# include <config.h>
+# endif
- #include <limits.h>
+# include <limits.h>
+# include <stdbool.h>
- so that the proper identifiers are all declared. */
+# if HAVE_INTTYPES_H
+# include <inttypes.h>
+# else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+# endif
/* 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