Re: XForms: Xforms & command line parameters

Frank Stefani (EAD-Frank.Stefani@t-online.de)
Thu, 10 Jul 1997 10:27:12 +0200

To subscribers of the xforms list from EAD-Frank.Stefani@t-online.de (Frank Stefani) :

Steve Lamont wrote:
>
> To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
>
> > After that I want to treat the command line parameters specific to my
> > program, such as `-f configuration_file'.
> > fl_initialize however drops the name of the configuration file if I
> > leave a space between -f and configuration file. When I do not type a
> > space, everything is allright. But I prefer to have the space. Is
> > there another way around ?
>
> Either parse and edit the argument list before you pass it to
> fl_initialize() or use a different flag. [...]

This seems to be a problem. I use the common 'getopt' method
to pick application specific options *before* I call fl_initialize():

while ( (c = getopt(argc, argv, "b:d:D:hp:s:")) != EOF ) {
switch ( c ) {
case ...
case ...
case ...
}
}

After processing this loop no options remain for fl_initialize()
and, even worse, XForms options (X11 options) are treated as an
error if they are not explicitly mentioned in 'getopt(...)'.

I wouldn't like to make a copy of argv to pass it to fl_initialize()
after the getopt loop ...

Frank.

-- 
---------------------------------------------------------------
     _/_/_/_/     _/_/     _/_/_/    EAD-Systeme GmbH
    _/          _/  _/    _/    _/   Nachfeldstr. 4
   _/_/_/     _/    _/   _/     _/   D-82490 Farchant, Germany
  _/        _/_/_/_/_/  _/     _/    Phone: +49 8821 9623-0
 _/_/_/_/ _/        _/ _/_/_/_/      Fax: +49 8821 9623-20
---------------------------------------------------------------
Email: EAD-Frank.Stefani@t-online.de
---------------------------------------------------------------

_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html Xforms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/