X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fargmatch.h;h=e8bb23c667ba7c334554ccb95abe605f11d552b4;hb=0df2580e13bb5523b7f5569e9bec1fda9c812677;hp=4b65ca4b72e1079e0660d885738544479cf04822;hpb=c778cfa6e45ec889e3d04b0d947dabd69a357b92;p=gnulib.git diff --git a/lib/argmatch.h b/lib/argmatch.h index 4b65ca4b7..e8bb23c66 100644 --- a/lib/argmatch.h +++ b/lib/argmatch.h @@ -1,5 +1,7 @@ /* 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 @@ -49,18 +51,13 @@ int argmatch (char const *arg, char const *const *arglist, char const *vallist, size_t valsize); -int argcasematch (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)) -# define ARGCASEMATCH(Arg, Arglist, Vallist) \ - argcasematch (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; @@ -91,7 +88,7 @@ void argmatch_valid (char const *const *arglist, int __xargmatch_internal (char const *context, char const *arg, char const *const *arglist, char const *vallist, size_t valsize, - int case_sensitive, argmatch_exit_fn exit_fn); + argmatch_exit_fn exit_fn); /* Programmer friendly interface to __xargmatch_internal. */ @@ -99,13 +96,7 @@ int __xargmatch_internal (char const *context, ((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \ (char const *) (Vallist), \ sizeof *(Vallist), \ - 1, argmatch_die)]) - -# define XARGCASEMATCH(Context, Arg, Arglist, Vallist) \ - ((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \ - (char const *) (Vallist), \ - sizeof *(Vallist), \ - 0, argmatch_die)]) + argmatch_die)]) /* Convert a value into a corresponding argument. */