Merge argmatch cleanups from Bison. Assume C89.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 21 Nov 2002 07:20:15 +0000 (07:20 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 21 Nov 2002 07:20:15 +0000 (07:20 +0000)
lib/ChangeLog

index 72638148bc908197cc4570a4f10da5fb13f35ec5..93504bf2de1d26dbfcd1791cf56f1eac9984c714 100644 (file)
@@ -1,3 +1,23 @@
+2002-11-20  Paul Eggert  <eggert@twinsun.com>
+
+       Merge argmatch cleanups from Bison.  Assume C89.
+
+       * argmatch.c: Include config.h here, not in argmatch.h.
+       Include stdlib.h, for EXIT_FAILURE.
+       Always include <string.h>, since we assume C89.
+       (EXIT_FAILURE): Remove pre-C89 bug workaround.
+       * argmatch.h: Do not include <config.h> or <sys/types.h>.
+       Include <stddef.h> instead, since it's all we need for size_t.
+       (PARAMS): Remove.  All uses removed.
+       (ARRAY_CARDINALITY): Do not bother to #undef.
+       (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
+       ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
+       Remove unnecessary parentheses.
+       (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
+       Insert necessary parentheses.
+       (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
+       (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
+
 2002-11-19  Bruno Haible  <bruno@clisp.org>
 
        * mbswidth.c: Include mbswidth.h right at the beginning.