This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: libio
- From: Marcus Brinkmann <Marcus dot Brinkmann at ruhr-uni-bochum dot de>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: Roland McGrath <roland at redhat dot com>, Simon Josefsson <jas at extundo dot com>,Jeff Bailey <jbailey at nisa dot net>, libc-alpha at sources dot redhat dot com
- Date: Thu, 17 Oct 2002 21:51:02 +0200
- Subject: Re: libio
- References: <200210171933.g9HJXfn06311@magilla.sf.frob.com> <3DAF11EE.5080305@redhat.com>
On Thu, Oct 17, 2002 at 12:39:26PM -0700, Ulrich Drepper wrote:
> Why would argp need to be reentrant? Not using getopt just means more
> code for no obvious reason.
So that you can run an argp parser from an argp handler. I have written a
console which loads drivers at run time, and that parses command
line options for the driver in the driver's argp. Eg, an invocation would
be like this:
console -d vga --font 8x13.bdf -d speaker --beep 440
And the main argp would parse the -d options and then invoke the driver's
argp after loading it. The driver's argp would parse the driver specific
options and return the number of options parsed to the main argp handler.
This code is written already, except that I can not use argp in the driver,
but have to implement my own option parser right now, which is ugly and
unnecessary if argp would be reentrant. As soon as argp is reentrant the
code will be very elegant.
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org marcus@gnu.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/