From 13f07e78931664e8b61e170ec911d526415017aa Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 28 Mar 2005 17:37:07 +0000 Subject: (GETOPT_HELP_OPTION_DECL): Use NULL, not `0'. (GETOPT_VERSION_OPTION_DECL): Likewise. --- src/system.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/system.h') 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 -- cgit v1.2.3-54-g00ecf