summaryrefslogtreecommitdiff
path: root/lib/argmatch.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-02 18:32:50 +0000
committerJim Meyering <jim@meyering.net>1999-01-02 18:32:50 +0000
commitfa7427c2ea2117029ede697dad1a7b086f1c0b03 (patch)
tree67da28e880f140a2af557bbc4d78a3adb53dec5b /lib/argmatch.c
parentc39158b8ec9ab4024bcc18195e5b7231825d030c (diff)
downloadcoreutils-fa7427c2ea2117029ede697dad1a7b086f1c0b03.tar.xz
(__xargmatch_internal): Remove now-unused function.
(argmatch_to_argument): Add `const' attribute to first parameter.
Diffstat (limited to 'lib/argmatch.c')
-rw-r--r--lib/argmatch.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/lib/argmatch.c b/lib/argmatch.c
index efe22cd47..4e879691f 100644
--- a/lib/argmatch.c
+++ b/lib/argmatch.c
@@ -36,10 +36,6 @@
# define _(Text) Text
#endif
-#ifndef EXIT_BADARG
-# define EXIT_BADARG 1
-#endif
-
#include "quotearg.h"
/* When reporting a failing argument, make sure to show invisible
@@ -181,41 +177,10 @@ argmatch_valid (const char *const *arglist,
putc ('\n', stderr);
}
-/* Call __argmatch_internal, but handle the error so that it never
- returns. Errors are reported to the users with a list of valid
- values.
-
- KIND is a description of the type of entity that was being matched.
- ARG, ARGLIST, and SENSITIVE are the same as in __argmatch_internal
- VALIST, and VALSIZE are the same as in valid_args */
-int
-__xargmatch_internal (const char *kind, const char *arg,
- const char *const *arglist,
- const char *vallist, size_t valsize,
- int case_sensitive)
-{
- int i;
-
- i = __argmatch_internal (arg, arglist, vallist, valsize, case_sensitive);
- if (i >= 0)
- {
- /* Success */
- return i;
- }
- else
- {
- /* Failure */
- argmatch_invalid (kind, arg, i);
- argmatch_valid (arglist, vallist, valsize);
- exit (EXIT_BADARG);
- }
- return -1; /* To please some compilers */
-}
-
/* Look for VALUE in VALLIST, an array of objects of size VALSIZE and
return the first corresponding argument in ARGLIST */
const char *
-argmatch_to_argument (char *value,
+argmatch_to_argument (const char *value,
const char *const *arglist,
const char *vallist, size_t valsize)
{