This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: argp-parse.c: ARGP_PARSE_ARGV0 shouldn't be ignored


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   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]