|
"Jason M. Felice" <jfelice@cronosys.com> 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 LINUX5250@midrange.com. | To subscribe to this list send email to LINUX5250-SUB@midrange.com. | To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.