Skip to content

Commit

Permalink
Initial revision
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonf committed Sep 14, 1999
0 parents commit a1e2704
Show file tree
Hide file tree
Showing 57 changed files with 20,387 additions and 0 deletions.
21 changes: 21 additions & 0 deletions 5250.tcap
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Ron Colcernian IBM's 5250 Terminal, adapted form linux
5250|IBMs 5250 Terminal:\
:am:eo:mi:ms:ut:xn:xo:\
:co#80:it#8:li#25:\
:&7=^Z:@7=\E[4~:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\
:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\
:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
:IC=\E[%d@:K2=\E[G:al=\E[L:bl=^G:cd=\E[J:ce=\E[K:\
:ch=\E[%i%dG:cl=\E[H\E[J:cm=\E[%i%d;%dH:cr=^M:\
:cs=\E[%i%d;%dr:ct=\E[3g:cv=\E[%i%dd:dc=\E[P:dl=\E[M:\
:do=^J:ei=\E[4l:ho=\E[H:ic=\E[@:im=\E[4h:k1=\E[[A:\
:k2=\E[[B:k3=\E[[C:k4=\E[[D:k5=\E[[E:k6=\E[17~:\
:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kB=\E[Z:\
:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\0177:kd=\E[B:\
:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:le=^H:mr=\E[7m:\
:nd=\E[C:nw=^M^J:r1=\Ec:rc=\E8:sc=\E7:sf=^J:sr=\EM:\
:st=\EH:ta=^I:u6=\E[%i%d;%dR:u7=\E[6n:u8=\E[?6c:\
:u9=\E[c:up=\E[A:vb=200\E[?5h\E[?5l:ve=\E[?25h:\
:kB=\E^I:@8=\EOM:@7=\E[F:\
:vi=\E[?25l:tc=klone+sgr:tc=klone+color:tc=klone+acs:
30 changes: 30 additions & 0 deletions 5250.terminfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 5250 terminal definition, based on linux console
5250|xterm-5250|5250 terminal,
am, bce, eo, mir, msgr, xenl, xon,
colors#8, it#8, pairs#64,
acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[?25h, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP,
dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M,
ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
flash=\E[?5h\E[?5l$<200/>, home=\E[H, hpa=\E[%i%p1%dG,
ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
il1=\E[L, ind=^J, invis=\E[8m, kb2=\E[G, kbs=\177, kcbt=\E[Z,
kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
kdch1=\E[3~, kend=\E[4~, kent=\EOM, kf1=\E[[A, kf10=\E[21~,
kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D,
kf21=\E[35~, kf22=\E[36~, kf23=\E[37~, kf24=\E[38~,
kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kspd=^Z,
nel=^M^J, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
rmacs=\E[10m, rmir=\E[4l, rmpch=\E[10m, rmso=\E[27m,
rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, setab=\E[4%p1%dm,
setaf=\E[3%p1%dm,
sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smpch=\E[11m,
smso=\E[7m, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR,
u7=\E[6n, u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd,
10 changes: 10 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Roger Bowler
Ron Colcernian
Jan Echternach
Carey Evans
Jason 'Eraserhead' Felice - <[email protected]>
Colin McCormack
Dave McKenzie
Michael Madore - <[email protected]>
Peter Schlaile
William J. Suetholz
339 changes: 339 additions & 0 deletions COPYING

Large diffs are not rendered by default.

182 changes: 182 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
Basic Installation
==================

These are generic installation instructions.

The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').

If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.

The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.

The simplest way to compile this package is:

1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.

Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.

2. Type `make' to compile the package.

3. Optionally, type `make check' to run any self-tests that come with
the package.

4. Type `make install' to install the programs and any data files and
documentation.

5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.

Compilers and Options
=====================

Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure

Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure

Compiling For Multiple Architectures
====================================

You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.

If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.

Installation Names
==================

By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.

You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.

In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.

If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.

Optional Features
=================

Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.

For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.

Specifying the System Type
==========================

There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM

See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.

If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.

Sharing Defaults
================

If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.

Operation Controls
==================

`configure' recognizes the following options to control how it
operates.

`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.

`--help'
Print a summary of the options to `configure', and exit.

`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).

`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.

`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.

`configure' also accepts some other, not widely useful, options.
Empty file added NEWS
Empty file.
69 changes: 69 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
This is my implementation of the 5250 Telnet protocol for LINUX. This code
(as well as the documentation) is extremely BETA. That said, it does more or
less work...

This version has been substantially re-written with a more object oriented
approach. Hopefully, the code is should be easier to follow, enhance, and
maintain.

The linux console only defines F1-F20 by default. I have included a sample
map file which has all the function keys. It also has a modified definiton
for the tab key to allow the use of Shift-Tab to move backwards through
fields. It is based on the stock linux
console. To make use of the file, you need to use the loadkeys command. As
the root user, type the following:

loadkeys us5250.map (or uk5250.map if you have that keyboard)

The above is not necessary if you are only going to use the emlator in an
xterminal. After doing this, all the function keys will now return unique
codes. One caveat, is that this will effect all of your consoles. Also, the
change is only temporary, so you will have to invoke it again unless you put
it in a startup file somewhere.

In addition to the map file you also need to make sure that the terminfo
file that you are using is properly set up. In particular, it needs to have
definitions for all 24 function keys, and it must have the proper code for
back tab. To look at the current contents of your terminfo, use the infocmp
command to dump them to a file. After making any necessary changes, you can
recompile the file with the tic command. For details please see the man
pages for those commands. There is a file called 5250.terminfo which shows
the what I use. To add this terminfo entry, type the following as root:

tic 5250.terminfo

Now all you need to do is set your TERM environment variable to 5250 (or
xterm-5250 if you are using X-Windows).

To usr the emulator in an xterm, make sure you have compiled 5250.terminfo
using the tic command. To launch an xterm of the proper dimensions (a
standard xterm is only 24 rows high), use the xt5250 shell script. This
shell script will open an xterm 80X25 and sets the TERM environment variable
to the correct value, then launches the emulator. Below is an example
command line:

xt5250 -s MIKEM01 192.168.1.10

Where MIKEM01 is the device name I want on the AS/400, and 192.168.1.10 is
the address of the host system. NOTE: as things stand, function keys will
only work properly in a genuine x-term. This means that rxvt won't respond
to function keys correctly. I'd be happy to include sample Xdefault
settings for rxvt if someone sends them to me.


To build the emulator simply type the following:

./configure
make
make install

The emulator uses the ncurses library for manipulating the console. Make
sure you have the ncurses development libraries installed before trying to
compile the source.

Please send me any comments, questions, bug reports or patches.

Michael Madore
[email protected]
http://www.blarg.net/~mmadore
February 14th, 1999
30 changes: 30 additions & 0 deletions Xdefaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
xt5250*VT100.Translations: #override\n\
<Key>KP_Enter: string("\033OM") \n\
<Key>BackSpace: string("\177") \n\
~Shift <Key>F1: string("\033[[A") \n\
~Shift <Key>F2: string("\033[[B") \n\
~Shift <Key>F3: string("\033[[C") \n\
~Shift <Key>F4: string("\033[[D") \n\
~Shift <Key>F5: string("\033[[E") \n\
~Shift <Key>F6: string("\033[17~") \n\
~Shift <Key>F7: string("\033[18~") \n\
~Shift <Key>F8: string("\033[19~") \n\
~Shift <Key>F9: string("\033[20~") \n\
~Shift <Key>F10: string("\033[21~") \n\
~Shift <Key>F11: string("\033[23~") \n\
~Shift <Key>F12: string("\033[24~") \n\
Shift <Key>F1: string("\033[25~") \n\
Shift <Key>F2: string("\033[26~") \n\
Shift <Key>F3: string("\033[28~") \n\
Shift <Key>F4: string("\033[29~") \n\
Shift <Key>F5: string("\033[31~") \n\
Shift <Key>F6: string("\033[32~") \n\
Shift <Key>F7: string("\033[33~") \n\
Shift <Key>F8: string("\033[34~") \n\
Shift <Key>F9: string("\033[35~") \n\
Shift <Key>F10: string("\033[36~") \n\
Shift <Key>F11: string("\033[37~") \n\
Shift <Key>F12: string("\033[38~") \n\
Shift <Key>Tab: string("\033[Z") \n\
~Shift <Key>Delete: string("\033[3~") \n\
~Shift <Key>Insert: string("\033[2~")
8 changes: 8 additions & 0 deletions acconfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* Define to your system's socket descriptor type. */
#undef SOCKET_TYPE

/* Define this to use the -lncurses or -lcurses support. */
#undef USE_CURSES

/* Define this to use the -lslang support. */
#undef USE_SLANG
Loading

0 comments on commit a1e2704

Please sign in to comment.