diff options
author | Jim Meyering <jim@meyering.net> | 2005-03-28 17:37:07 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-03-28 17:37:07 +0000 |
commit | 13f07e78931664e8b61e170ec911d526415017aa (patch) | |
tree | 9a4072cad1368374e182e0988edc65e4f92e4ada | |
parent | db632b64c4bee8e578c6a7b13b841e5646909a62 (diff) | |
download | coreutils-13f07e78931664e8b61e170ec911d526415017aa.tar.xz |
(GETOPT_HELP_OPTION_DECL): Use NULL, not `0'.
(GETOPT_VERSION_OPTION_DECL): Likewise.
-rw-r--r-- | src/system.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/system.h b/src/system.h index 27122e0ac..77cf30c55 100644 --- a/src/system.h +++ b/src/system.h @@ -602,9 +602,9 @@ enum }; #define GETOPT_HELP_OPTION_DECL \ - "help", no_argument, 0, GETOPT_HELP_CHAR + "help", no_argument, NULL, GETOPT_HELP_CHAR #define GETOPT_VERSION_OPTION_DECL \ - "version", no_argument, 0, GETOPT_VERSION_CHAR + "version", no_argument, NULL, GETOPT_VERSION_CHAR #define case_GETOPT_HELP_CHAR \ case GETOPT_HELP_CHAR: \ @@ -839,3 +839,20 @@ ptr_align (void *ptr, size_t alignment) ((Type_max) / 10 < Accum || Accum * 10 + (Digit_val) < Accum \ ? 0 : ((Accum = Accum * 10 + (Digit_val)), 1)) \ ) + +#if 0 +#define ASSERT_ABORT(Expr) do { if (!(Expr)) abort (); } while (0) +#define DECIMAL_DIGIT_ACCUMULATE(Accum, Digit_val, Type_max, Overflow) \ + do \ + { \ + int _digit_val = Digit_val; \ + ASSERT_ABORT (0 <= _digit_val && _digit_val < 10 \ + && Accum <= Type_max); \ + /* Ensure that Type_max is the maximum value of Accum. */ \ + VERIFY_W_TYPEOF (TYPE_MAXIMUM (__typeof__ (Accum)) == (Type_max)); \ + if (!(Overflow = ((Type_max) / 10 < Accum \ + || Accum * 10 + _digit_val < Accum))) \ + Accum = Accum * 10 + _digit_val; \ + } \ + while (0) +#endif |