[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
argp limitation
From: |
Marcus Brinkmann |
Subject: |
argp limitation |
Date: |
Sun, 10 Mar 2002 21:35:27 +0100 |
User-agent: |
Mutt/1.3.27i |
Hi,
I wanted to use a hierarchy of argp parsers in the console server, one in
each driver module, one for focus groups, one for consoles, and one for the
main program. However, argp parents and childs shade the options of other
childs, in the sense that argp calls only one parser for each recognized
option. It is not possible to have common options in different parsers this
way (I wanted to enable/disable parsers in parent parsers).
So what I want to do now is to do the recursion manually, so that when a new
input device is configured, the input device parser is run which parses as
much on the command line as it can, and then returns back, where parsing in
the other parser is continued. This might actually be cleaner and easier to
implement anyway. From a quick glance, argp seems to be reentrant, is this
really true? Are there any (better) alternatives?
Note: pfinet would have the same problem, except that it avoids it by lack
of modularity. libstores would have the same problem except it avoids it by
lack of flexibility (all arguments for a store are encoded in the store
name). I think both are not acceptable work arounds here, because drivers
are platform specific and complex. Here is an example potential console
command line I have in mind:
/hurd/console --encoding isolat1 --console maincons --output-device vga \
--vt 1 --encoding utf8 \
--focus-group mainfocg --focus maincons --input-device pckbd --layout de \
--input-device mouse --name mouse1 --device /dev/ttyS0 --protocol mouseman
(Don't be scared, some of these will already be the default).
Or, for example, to remove the mouse:
fsysopts /node --remove mouse1
To use isolat9 on virtual console 2:
fsysopts /node --console maincons --vt 2 --encoding isolat9
(or maybe even "fsysopts /node/maincons/2 --encoding isolat9")
(If you have better ideas instead of the option marathon, let me know).
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann GNU http://www.gnu.org marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de
- argp limitation,
Marcus Brinkmann <=
- Re: argp limitation, Roland McGrath, 2002/03/10
- console stuff (was: Re: argp limitation, Marcus Brinkmann, 2002/03/10
- Re: console stuff (was: Re: argp limitation, Roland McGrath, 2002/03/11
- Re: console stuff (was: Re: argp limitation, Marcus Brinkmann, 2002/03/11
- Re: console stuff (was: Re: argp limitation, Roland McGrath, 2002/03/11
- Re: console stuff (was: Re: argp limitation, Thomas Bushnell, BSG, 2002/03/11
- Re: console stuff (was: Re: argp limitation, Roland McGrath, 2002/03/11
- Re: console stuff (was: Re: argp limitation, Thomas Bushnell, BSG, 2002/03/11
- Re: console stuff (was: Re: argp limitation, Roland McGrath, 2002/03/12
- Re: console stuff (was: Re: argp limitation, Thomas Bushnell, BSG, 2002/03/12