This is the mail archive of the
libc-alpha@cygnus.com
mailing list for the glibc project.
Re: argp-parse.c: ARGP_PARSE_ARGV0 shouldn't be ignored
- To: Gordon Matzigkeit <gord@fig.org>
- Subject: Re: argp-parse.c: ARGP_PARSE_ARGV0 shouldn't be ignored
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 27 Jul 1998 10:01:38 -0700
- Cc: bug-hurd@gnu.org, GNU Libc Alpha Testers <libc-alpha@cygnus.com>
- References: <86u345i4zo.fsf@trick.fig.org>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Gordon Matzigkeit <gord@fig.org> writes:
> [1 <text/plain; US-ASCII (7bit)>]
> Hi!
>
> The current implementation of argp-parse.c makes ARGP_PARSE_ARGV0 do
> nothing unless ARGP_NO_ERRS is specified. This is undocumented, and I
> don't know what a proper fix is, but the attached patch at least
> returns an error code rather failing silently.
Well, I have yet to see where this option is useful and therefore have
to rely on what miles wrote. In argp.h he wrote:
/* Don't ignore the first element of ARGV. Normally (and always unless
ARGP_NO_ERRS is set) the first element of the argument vector is
skipped for option parsing purposes, as it corresponds to the program name
in a command line. */
I.e., it is ok that ARGP_PARSE_ARGV0 is ignored if ARGP_NO_ERRS is not
defined. Your patch seems not to be needed.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------