× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: AS/400 client
  • From: "Jason M. Felice" <jfelice@xxxxxxxxxxxx>
  • Date: Mon, 18 Dec 2000 20:53:42 -0500
  • Organization: Cronosys, LLC.

Carey Evans wrote:
> 
> "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.
> 

This all sounds like -lpopt command-line parsing.  You can use an
external configuration file when parsing options with `-lpopt' to make
an option alias.
If we ever get to loadable modules (which is a good thing IMHO - right
now gnome-5250 loads -lncurses, for example), the module's install
script can tweak the popt config file accordingly.

RedHat's RPM does just this.  rpm -qi (for example) is just an alias for
rpm --queryformat "%{ <the format of the info output> }"

I'd like to hear from the BSD people as to whether -lpopt is installed
on their system (Scott?).  It's a really portable library.


-Jay 'Eraserhead' Felice
+---
| 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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.