This is the mail archive of the 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]
Other format: [Raw text]

Re: libio

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.


`Rhubarb is no Egyptian god.' GNU
Marcus Brinkmann              The Hurd

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