/* argmatch.h -- definitions and prototypes for argmatch.c
- Copyright (C) 1990, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004 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
false ambiguities (i.e., different matches of ARG but corresponding
to the same values in VALLIST). */
-int argmatch (char const *arg, char const *const *arglist,
- char const *vallist, size_t valsize);
+ptrdiff_t argmatch (char const *arg, char const *const *arglist,
+ char const *vallist, size_t valsize);
# define ARGMATCH(Arg, Arglist, Vallist) \
argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
/* xargmatch calls this function when it fails. This function should not
return. By default, this is a function that calls ARGMATCH_DIE which
- in turn defaults to `exit (EXIT_FAILURE)'. */
+ in turn defaults to `exit (exit_failure)'. */
typedef void (*argmatch_exit_fn) (void);
extern argmatch_exit_fn argmatch_die;
/* Report on stderr why argmatch failed. Report correct values. */
-void argmatch_invalid (char const *context, char const *value, int problem);
+void argmatch_invalid (char const *context, char const *value,
+ ptrdiff_t problem);
/* Left for compatibility with the old name invalid_arg */
/* Same as argmatch, but upon failure, reports a explanation on the
failure, and exits using the function EXIT_FN. */
-int __xargmatch_internal (char const *context,
- char const *arg, char const *const *arglist,
- char const *vallist, size_t valsize,
- argmatch_exit_fn exit_fn);
+ptrdiff_t __xargmatch_internal (char const *context,
+ char const *arg, char const *const *arglist,
+ char const *vallist, size_t valsize,
+ argmatch_exit_fn exit_fn);
/* Programmer friendly interface to __xargmatch_internal. */