× 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: ~/.tn5250rc, command-line parsing...
  • From: "Jason M. Felice" <jasonf@xxxxxxxxxxxxxx>
  • Date: Fri, 14 Apr 2000 00:13:51 -0400

Hello everyone.

I've been sitting on this half-finished patch for quite some time, so I've
finally bit the bullet, finished it, tested it, and posted it.  It's a big
change but the code is pretty clean, so there shouldn't be too many bugs.

The version in CVS now parses some rc files during startup, in this order:
1) $(sysconfdir)/tn5250rc (usually /usr/local/etc/tn5250rc)
2) ~/.tn5250rc

Then procedes to parse the command-line arguments.  The configuration files
have the following format:

# This is a comment
name = value

# The below is shorthand for 'name = on'
+name

# The below is shorthand for 'name = off'
-name

# This sets group.name to `on'
group.name = on
# So does this
group {
        name = on
}
# and this
+group.name

The command-line options have been melded into this as well, so you can do
this:

tn5250 +underscores map=37 localhost:1975

Additionally, this uses all options set within a group:

tn5250 group

This is good for setting up different AS/400 sessions, for example, like this:

AS4001 {
  host = as.400.1.com
  map = 37
  env.TERM = IBM-3812-1
}
AS4002 {
  host = as.400.2.com
  map = 284
  +underscores
}

Then:
tn5250 AS4002

You can even do:

tn5250 -underscores AS4002

Here are the currently supported options:

+/-underscores       (old -u option)
trace=FILE           (old -t option)
host=HOST            (old host parameter.  From the command-line
                      'host=' is optional)
session=NAME         (old -s option)
env.TERM=TERM        (old -y option)
+version             (old -V option)
+help                (old -h option)

everything in env.* gets sent to the AS400 as an environment string, so now
you can specify arbitrary telnet exit strings.

I realize this is a big change, I will back it out of CVS if necessary but I
think it's much more flexible and forward-looking a scheme.  We now have a
vehicle for implementing keyboard mapping (e.g. key.enter = field exit) and
lots of odds and ends options (window-title = My AS/400 Session) which wouldn't
have fit well into the old scheme.  This should also interface very simply
with scripting languages such as Perl and Guile when we add support for them.

Please bang on it and make sure that it's stable (I've tested nearly every
combination I can think of, but then again...)

-Jay 'Eraserhead' Felice

P.S. This breaks xt5250.  I will fix to-morrow.
P.S.S.  It's case sensitive.  I just realized that's probably a bad idea.

+---
| 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:

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.