"Jason M. Felice" <[EMAIL PROTECTED]> writes:
> I tried to make the syntax as similar to GNU-style long options as
> possible. The problem is that the option needs to indicate whether or
> not it has an argument, as the 5250 emulator may not understand the
> option and have to pass it to one of the other modular pieces, like
> the terminal driver or the stream driver.
I thought about this a bit, and came up with two solutions which would
work for using long options.
The more complicated one is to add functions to conf.c to let the
different tn5250 modules declare the types of options they accept;
e.g. cursesterm has a boolean "underscores" option, and telnetstream
has a dictionary option "env". This would let it parse the arguments
as GNU long options, and also check the configuration file for invalid
options.
A simpler one would be to make each main program accept a fixed set of
GNU long options, and use getopt_long to parse them. Then these
options would be mapped to the configuration file options. Arbitrary
options could still be passed as NAME=VALUE, or perhaps with a
different argument.
For example, this would let the user do something like:
tn5250 -s SESS1 --map=280 -o 'env.IBMIMENU=MAIN' as400sys
The latter solution shouldn't be very difficult to implement.
--
Carey Evans http://home.clear.net.nz/pages/c.evans/
"May not be representative of the experience of actual customers."
+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to [EMAIL PROTECTED]
| To subscribe to this list send email to [EMAIL PROTECTED]
| To unsubscribe from this list send email to [EMAIL PROTECTED]
| Questions should be directed to the list owner/operator: [EMAIL PROTECTED]
+---