]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Update from FSF via patch-2.2.93.
authorJim Meyering <jim@meyering.net>
Tue, 27 May 1997 09:39:25 +0000 (09:39 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 27 May 1997 09:39:25 +0000 (09:39 +0000)
lib/argmatch.c
lib/argmatch.h

index c0708bfbbd992c8cde971bd27c4f159c8d813cec..aa5593329765506faf3a4f67c52f1d5fff2c8f54 100644 (file)
@@ -1,5 +1,5 @@
 /* argmatch.c -- find a match for a string in an array
-   Copyright (C) 1990 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1997 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
    GNU General Public License for more details.
 
    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.  */
+   along with this program; see the file COPYING.
+   If not, write to the Free Software Foundation,
+   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-/* Written by David MacKenzie <djm@ai.mit.edu> */
+/* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
 
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
 # include <config.h>
 #endif
 
+#include <argmatch.h>
+
 #include <sys/types.h>
 
 #include <stdio.h>
-#ifdef STDC_HEADERS
+#if HAVE_STRING_H
 # include <string.h>
+#else
+# include <strings.h>
 #endif
 
-extern char *program_name;
-
 /* If ARG is an unambiguous match for an element of the
    null-terminated array OPTLIST, return the index in OPTLIST
    of the matched element, else -1 if it does not match any element
index cbd6ce155a96eaa9721de37811f766860e2afdad..e95ff62e24c06b095c1e1e3681eb090e646495ac 100644 (file)
@@ -1,18 +1,12 @@
-#ifndef ARGMATCH_H
-#define ARGMATCH_H 1
+/* argmatch.h -- declarations for matching arguments against option lists */
 
-#ifndef __P
-# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
-#  define __P(args) args
-# else
-#  define __P(args) ()
-# endif  /* GCC.  */
-#endif  /* Not __P.  */
+#if defined __STDC__ || __GNUC__
+# define __ARGMATCH_P(args) args
+#else
+# define __ARGMATCH_P(args) ()
+#endif
 
-int
-  argmatch __P ((const char *arg, const char *const *optlist));
+int argmatch __ARGMATCH_P ((const char *, const char * const *));
+void invalid_arg __ARGMATCH_P ((const char *, const char *, int));
 
-void
-  invalid_arg __P ((const char *kind, const char *value, int problem));
-
-#endif /* ARGMATCH_H */
+extern char const program_name[];