home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
550a.lha
/
niftyterm_v1.2
/
niftyterm.doc.pp
/
niftyterm.doc
Wrap
Text File
|
1991-09-08
|
22KB
|
416 lines
Niftyterm: A VT102/H19 terminal emulator for the Amiga
Copyright notice:
Niftyterm is (C) Copyright 1989, 1990 Christopher J. Newman and Todd
Williamson
All Rights Reserved.
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Christopher J. Newman
and Todd Williamson not be used in advertising or publicity pertaining
to distribution of the software without specific, written prior
permission. Christopher J. Newman and Todd Williamson make no
representations about the suitability of this software for any purpose.
It is provided "as is" without express or implied warranty.
CHRISTOPHER J. NEWMAN AND TODD WILLIAMSON DISCLAIM ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CHRISTOPHER J. NEWMAN OR
TODD WILLIAMSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
Authors: Christopher J. Newman and Todd Williamson
Niftyterm was compiled with Manx Aztec C version 5.0d
Niftyterm source code is available upon request. Send a disk and a
self-addressed mailer to the address below, and I'll send you a copy.
If you find this program useful, Chris and I would certainly appreciate
a donation to support further development:
Todd Williamson
5440 Fifth Avenue Apt. 59
Pittsburgh, Pa. 15232-2243
Niftyterm: History
Niftyterm was written at Carnegie-Mellon University by Chris Newman.
It started out as a terminal emulator for the CMU Andrew system (a
system of distributed UNIX workstations) using the CMU Window Manager
(wm). At the time it was created, all of the terminal emulators
available for wm were featureless and bug-ridden.
Then CMU purchased DECStation 3100's for use with Andrew. One of the
major faults of the DECStation is that the console only emulates a
glass tty (i.e. you can't even clear the screen, much less control the
cursor position; good luck running anything but a line editor). So,
of course, Chris ported niftyterm to run on the console of the
DECStation. While he was at it, he made a console version for all of
the other machines in the Andrew system (currently includes: Mac II
Mach, Sun 3, Sun 4 (Sparc), Decstation 3100, IBM RT, and VAX).
The next step, of course, was X Windows. There is currently a working
version, but it isn't complete yet.
Last fall, I found myself in need of an h19 emulator for the Amiga,
preferably under DNet. I also found myself wishing that we had a VT100
emulator that would run under DNet. So I ported Chris' work to the
Amiga.
What is Niftyterm?
Niftyterm is an h19/VT102/VT52 emulator for the Amiga. It was originally
designed to be used with DNet, but it has been expanded so that it may be
used as a normal terminal emulator. Niftyterm was designed to be a good
emulation of these terminals, as well as being fairly small and fast. It
was not designed to be anything but a terminal. As such, it provides no
direct facility for file transfer, nor are any planned for future versions.
Niftyterm opens its window on the WorkBench. It provides a full-featured
Intuition interface, as well as a system for storing preferences and a large
list of command-line options. Copy/paste to/from the clipboard is
supported. Niftyterm also remaps the cursor and keypad keys so that they
function as on the real terminals.
Starting Niftyterm
By default, Niftyterm will use the system font topaz 8. Since some people
find this font unattractive, and it lacks the necessary VT102 alternate
character set and double width characters, you might wish to use a set of
fonts specifically designed for use with Niftyterm. See the section below
entitled "About fonts" for more information.
Options
You can use the following arguments when entering the Niftyterm command:
niftyterm [-f fontname] [-h19] [-l file] [-p programname] [-sl] [-st] [-i]
[-g geometry] [-vt102] [-vt52] [-80] [-d device] [-u unit] [-V] [-w]
[-shared]
These arguments can be entered in any order and any combination (except
those that override opposite preferences). Their meanings are as follows:
-f font
Sets the font for the niftyterm window. By default the font
'nifty/11' or 'topaz/8' is used. If you wish to use a different font such
as 'courier 11', simply specify
font
as 'courier/11.' If the font you
choose is not fixed width, strange and unusual things will happen.
-h19
Causes niftyterm to emulate a Zenith h19 terminal. The only thing an
h19 can do that a vt102 can't is change the look of the cursor.
-l file
Writes
everything
that occurs in the niftyterm to a log file.
-p name
Sets the program name in the window title bar.
-sl
Starts up niftyterm in slow mode -- only useful if you intend to watch
some vt102 animations.
-st
Causes niftyterm to display whatever comes from standard input, and
send all keystrokes to standard output. For example:
run type >pipe:foo file
niftyterm <pipe:foo -st
would display file in a niftyterm window. (Or simply niftyterm <foo -st).
-i
Starts up niftyterm with an invisible cursor -- very limited
usefulness.
-g geometry
Set up the window geometry. The format for
geometry
is
left/top/width/height. A value of -1 for the width or height makes the
window stretch to the right edge or bottom of the screen. A value of -1
for the top makes the window's top edge appear just below the screen title
bar. The left and top are in pixels. The width and height are in
characters.
-vt102
This overrides the niftyterm.emulation preference, causing
niftyterm to emulate a vt102 terminal.
-vt52
This causes niftyterm to start up emulating a vt52 terminal. This
is only useful if you have a program designed for a vt52 terminal.
-80
causes niftyterm to use no more than 80 columns.
-d device
causes niftyterm to use
device
for its input and output. If you
want to use DNet, you can use 'dnet' as the device name.
-u unit
causes niftyterm to use the specified unit of the device. No
effect if using DNet.
-V
niftyterm will display the current version number and copyright notice.
-w
niftyterm will wait for a key to be pressed before closing the window.
-shared
niftyterm will open the device specified in "shared" mode. A new
menu option will appear also. This allows niftyterm to share the serial
port with other applications which open the serial port in shared mode
(including niftyterm). See the "unlisten" menu option.
Preferences
On startup, niftyterm reads the file s:niftyprefs for it's preferences
data. This file is in the format used by the CMU Window Manager. I
think that it's a good format. Entries in the file have the format:
niftyterm.preference: value
boolean values can be indicated by most things that make sense: {yes,
no}, {true, false}, etc. The following are the supported preferences:
niftyterm.emulation: [h19/vt52/vt102]
(default: vt102)
This preference sets the startup emulation for all niftyterm windows.
niftyterm.bell: [audio/visual/both/displaybeep/none]
(default: visual)
This preference sets what niftyterm should do when it gets the bell
character (^G).
audio
plays a simple beep.
visual
inverts the entire
window temporarily.
both
does both
audio
and
visual
.
displaybeep
calls
the internal Amiga DisplayBeep() function (in case you have your own nifty
sample set up as the beep).
none
means there is no bell.
niftyterm.device: <device>
(default: dnet)
This preference sets what device niftyterm should use for input and output.
For example. 'serial.device.' 'dnet' is a legal value, meaning that
niftyterm should talk to DNet instead of a particular device.
niftyterm.unit: <unit>
(default: 0)
This preference tells niftyterm which unit on the device specified by
niftyterm.device it should use.
niftyterm.altismeta: yes
(default)
By default, the alt key on the keyboard will act as a meta key (i.e. set
the eighth bit of the character pressed with the key down). Setting this
preference to 'no' will disable this feature. This is particularly useful
for emacs.
niftyterm.cursorblink: no
(default)
By default, niftyterm has a solid cursor. Setting this preference to 'yes'
will case niftyterm's cursor to blink at the rate of once per second.
niftyterm.cursor: [underline/block/invisible]
(default: block)
This preference sets the type of cursor niftyterm uses. Invisible isn't
very useful.
niftyterm.basefont: <name>/<size>
(default: nifty/11 then topaz/8)
This preference sets the base fontfamily for niftyterm's fonts. See the -f
option above.
(i.e. "niftyterm.basefont: courier/11" causes courier 11 to be the default
font).
niftyterm.normalDelete: yes
(default)
If you add "niftyterm.normalDelete: no", then niftyterm will bind the
delete key to backspace. See also the niftyterm.normalBackspace
preference.
niftyterm.normalBackspace: yes
(default)
If you add "niftyterm.normalBackspace: no", then niftyterm will bind the
backspace key to delete on startup.
niftyterm.emacsmode: no
(default)
If you add "niftyterm.emacsmode: yes", then niftyterm will start up in
"emacs mode". See description of emacs mode menu item below.
niftyterm.fixedColumns: no
(default)
If you add "niftyterm.fixedColumns: yes", then niftyterm will start up with
no more than 80 columns of text. This is useful for running programs
written for terminals that assume the terminal is 80 columns.
niftyterm.geometry: left/top/width/height
(default: 0/0/-1/-1)
Set up the default geometry of the window. See the -g option above. The
default is to open a window the size of your screen.
niftyterm.sizegadget: [row/column/none]
(default: column)
This preference controls which border of the window the window's sizing
gadget will appear in. If you have a sizing gadget on a window, you must
lose some of the window space for the border to contain it. This
preference controls whether you lose rows, columns, or nothing. If you
choose none, the window will not have a size gadget, and will therefore not
be resizeable. Useful if you want an 80x24 window to take up the smallest
possible screen space.
Menu meanings
Niftyterm currently has two menus, Edit and Control. The Edit menu has
editing commands. The Control menu allows the user to adjust the way
Niftyterm functions.
Edit menu:
Copy:
Copies the selected text into the clipboard. You can put the
text you copied most recently back into any document by choosing Paste.
Paste
: Copies the most recently copied text to the current cursor
position.
Move
: If a previous command or some text is selected in the Niftyterm
window, Move inserts the text as if it had been typed.
Execute
: The same as move, only it follows the text with a carriage
return.
Clear Screen:
Moves the current niftyterm prompt to the top of the
Niftyterm window and clears the screen.
Flush:
Flushes the buffers for the current device. Useful if you did
something that will cause a lot of output, and you want to tell
niftyterm not to display it all.
Break:
(only available if input is from a device, not dnet or standard
input) Break sends a break signal to the current device.
Iconify:
Turns the niftyterm window into an icon. Double click on the
icon to get the window back.
Quit
: exits Niftyterm and closes the window.
Control menu:
Change Cursor:
This toggles the cursor between a block and an
underline character. When emulating an h19 terminal, this cursor
change can also be made by terminal codes.
invert:
inverts the niftyterm display window. This may be
controlled by terminal codes when emulating a VT102 terminal.
soft reset:
resets all terminal styles, scroll regions, and invert
mode.
slow display:
If you select this, the display speed will be reduced,
and the menu item will change to
fast display
. A slow display is
useful when viewing VT100 animations.
Delete to Backspace:
If you select this, the Delete key will be
converted to a Backspace key, and the menu item will change to
Delete
to Normal
. By default, Niftyterm leaves the delete key alone.
Backspace to Delete:
If you select this, the Backspace key will be
converted to a Delete key, and the menu item will change to
Backspace
to Normal
. By default, Niftyterm leaves backspace key alone.
80 Columns:
Niftyterm will display no more than 80 columns in the
window, allowing 80 column terminal programs to run correctly.
Emacs mode on:
causes left mouse clicks to (attempt to) move the
cursor when running emacs in a niftyterm. The menu item will then
change to
Emacs mode off
. This is a hack, but you might find it
useful. It operates by inserting the right number of ^P, ^N, ^F, & ^B
characters to move the cursor to the desired location.
Unlisten:
(only available when niftyterm is started in "shared" mode)
Niftyterm will cease to talk to whatever device it is connected to, so
that another program can use it exclusively. Note that this niftyterm
window will not accept any input from the user except the "listen" menu
option. An example of usage: you're logged in and you want to save
something to a log file. You had foresight and started niftyterm in
shared mode. You "unlisten" and start another niftyterm writing to a
log file. When you have everything in the log file, you quit the
second niftyterm and "listen" the original. This option might be
useful if someone wants to write some stand-alone file transfer
utilities.
About Fonts
Niftyterm should be able to use any fixed-width font. However,
standard Amiga fonts do not represent the VT100's character set very
well. Included with this distribution is a set of fonts with names
starting with "nifty". Some explanation of these fonts is in order.
Niftyterm starts out with a base font name, something like "topaz" or
"nifty." If niftyterm needs an italic or bold font, it first looks in
the fonts: directory to see if there is a version of the current font
which was designed to be italic or bold. If not, it uses the Amiga's
internal functions to construct one. When it needs one of the special
VT100 character sets, it appends an extension to the font name and
looks for a font of the same size as the current font with the new
name. The extensions are as follows:
v alternate character set
w double-width font
t top half of double-width double-height font
b bottom half of double-width double-height font
"vw", "vt", and "vb" are also extensions, meaning the alternate
character set version of the different-sized font. So, for example, if
niftyterm was using the font "nifty/11," and it needed a double-width
font, it would look for the font "niftyw/11."
The fonts that come with the distribution are designed to be used on
screens where the pixels are roughly as wide as they are tall. Any of
the 640x400 graphics modes fall into this category. In the 640x200
modes, the fonts will seem too tall.
If anyone creates any fonts for use with niftyterm, I'd like to get a
copy of them.
Quick reference
Preferences: [default values in brackets]
niftyterm.emulation: h19/vt52/vt102 set emulation. [vt102]
niftyterm.bell: audio/visual/both/displaybeep/none set bell type [visual]
niftyterm.device: <device> set I/O device [dnet]
niftyterm.unit: <unit> set device unit [0]
niftyterm.altismeta: yes/no is alt key meta key? [yes]
niftyterm.cursorblink: yes/no does the cursor blink? [no]
niftyterm.cursor: block/underline/invisible type of cursor [block]
niftyterm.basefont: <name>/<size> set default font. [nifty/11]
niftyterm.normalDelete: yes/no delete key <-> delete? [yes]
niftyterm.normalBackspace: yes/no backspace key <-> bs? [yes]
niftyterm.emacsmode: no/yes cursor moves in emacs.[no]
niftyterm.fixedColumns: no/yes 80 columns max. [no]
niftyterm.geometry: left/top/width/height set up default window specs.
niftyterm.sizegadget: row/column/none sizegadget? where? [column]
Command line options:
-f <font>/<size> set the font. (i.e. nifty/11, courier/11).
-h19 emulate an h19 terminal instead of a VT102.
-l <file> write all output to a log file.
-p <name> set the program name (left side of title bar).
-sl start up in slow mode (for vt100 animations).
-st take input from standard input and display it.
-ic start up with invisible cursor.
-g left/top/width/height set up window geometry.
-vt102 emulate a vt102 terminal on startup.
-vt52 emulate a vt52 terminal on starpppptup.
-80 start with no more than 80 columns.
-d <device> set device to use for I/O.
-u <unit> set unit number for device I/O.
-V show version number and copyright notice.
-w wait for a keypress before closing window.
-shared start niftyterm in shared mode.
Delete and Backspace
Since some systems require the use of either a delete key or a backspace
key for line editing, Niftyterm can make each of these keys act like the
other selectively. For a temporary change to the performance of these
keys, select the appropriate menu item (
backspace to delete
or
delete to
backspace
). For a permanent change, use the preferences
niftyterm.normalDelete
and
niftyterm.normalBackspace
.
Warnings
Niftyterm's h19 emulation is not fully compatible with a standard h19
terminal.
The VT102 mode currently lacks 132 column mode.
When a Niftyterm window is reduced then enlarged, information will be
clipped and lost off the edge of the window.
Authors
Todd Williamson can be reached by electronic mail at tw0i@andrew.cmu.edu
(internet) or r746tw0i@cmccvb.BITNET. Please direct all correspondence and
suggestions about the Amiga version of niftyterm to him.
All correspondence about other versions of niftyterm should be directed to
cn0h@andrew.cmu.edu (internet).