MAINEDIT User's Guide, Appendix B

previous   next   top   contents   index   framed top   this page unframed


B. Display Modules

The currently available set of display modules is shown in Table B–1. Each display module is described on the following pages. Additional display modules can be made available; contact XIDAK if you need support for another terminal.

Support for display modules may be dropped without notice. Display terminals go in and out of fashion, and XIDAK does not support those in which there is no apparent interest. Contact XIDAK if support for a display module you use has been dropped.

Table B–1. Available Display Modules
Module Terminal(s)
AM60 60-line Ann Arbor Ambassador
AT386 IBM PC/AT and compatibles
BIGSUN Sun Microsystems workstation, arbitrary number of lines
DTTERM Common Desktop Environment
HEATH Heath (or Zenith) H-19
HPTERM Hewlett-Packard terminals
LINDPY any terminal; line-oriented
LINXTERM Linux X window
MSWIN Windows NT display
NCOL any terminal for which another display module is provided; multiple columns
SUN Sun Microsystems workstation
SUN3 Sun Microsystems SunView window
SUN46 Sun Microsystems workstation, 46 lines
SUNOPENWIN Sun Microsystems OpenWindows window
SUNXTERM Sun Microsystems X window
TELEVI Televideo (except model 950)
TRMCAP any terminal for which information is available in a UNIX-style database
TVI950 Televideo model 950
VIS550 Visual 550
VT100 VT100
VT102 VT102 (VT100 with insert and delete)
VT102M VT102 (imperfect emulators)
WY43 Wyse WY-60
WY50 Wyse WY-50
WY5043 Wyse WY-50, 43-line mode
WY75 Wyse WY-75
XDPY X Window System

For those terminals that have a keypad or special keys, macro ID keys are listed. Arrow keys and macro ID keys can be used in any mode (command, insert or overstrike). Arrow keys (which on most terminals have an arrow drawn on the keycap) map to default macros as shown in Table B–2. These macro ID keys may be defined by the / command like any other control sequence.

Other macro ID keys are initially undefined. Invoking an undefined macro causes MAINED to beep.

Table B–2. Names of the Arrow Key Codes and Default Macros
Key Code Name Default Mapping
dpyUp ^ Q R M
dpyDown \ Q R M
dpyLeft < Q R M
dpyRight > Q R M

On many terminals, two <esc>s constitute a single control sequence. On such terminals, it is often convenient to define <esc><esc> to be <ecm>. To do this, type /<esc><esc><ecm><ecm>/. The two <esc>s are mapped to a single control sequence, which is taken as the macro command name. The last <ecm> is removed as described in Section 14.4 of the MAINED User's Guide, leaving <esc> defined as just <ecm>.

B.1. How to Get Out When a Display Module Hangs While Trying to Initialize Itself

Some display modules expect to be able to send a command to the terminal and receive a reply from it, without the user typing anything. The reply consists of terminal parameters (e.g., screen size).

If you specify the wrong display module name, and the display module expects to be able to read parameters, but the display itself does not support the character sequence to read parameters that the display module issues, the display module will hang while trying to initialize itself.

If such a display module hangs, you can hit RETURN to abort the initialization. The editor will prompt for a new display module name.

B.2. Display Module AM60

The AM60 display module is available on an “as-is” basis. This display module is no longer fully supported, since XIDAK does not have access to a terminal on which to test it.

Terminals Ambassador
<ecm> RESET key
<abort> CTRL-L
Maximum columns in window 77
Maximum rows in window 58

The numeric keypad keys 8 (up arrow), 2 (down arrow), 6 (right arrow), and 4 (left arrow), generate dpyUp, dpyDown, dpyRight, and dpyLeft, respectively. The other numeric keypad keys and the keys on the top row (except SETUP and SEND) are macro ID keys.

It is important to specify the correct baud rate for the Ambassador display modules, as the terminal requires padding for a number of display commands at high baud rates.

The Ambassador terminal should have the following configuration settings for use with the AM60 display module:

B.3. Display Module AT386

The AT386 display module is available on an “as-is” basis. This display module is no longer fully supported, since XIDAK does not have access to a terminal on which to test it.

Terminals IBM PC/AT and compatibles
<ecm> <esc><esc>
<abort> CTRL-L
Maximum columns in window 77
Maximum rows in window 22

The keys marked with up arrow, down arrow, left arrow, and right arrow generate dpyUp, dpyDown, dpyLeft, and dpyRight, respectively. Other special keys generate macro IDs.

B.4. Display Module BIGSUN

Terminals Sun Microsystems workstations
<ecm> <esc><esc>
<abort> CTRL-L
Maximum columns in window depends on font and display
Maximum rows in window depends on font and display

This display module runs only under the UNIX operating system on systems manufactured by Sun Microsystems, Inc.

BIGSUN is a display module that takes advantage of the Sun display hardware and software to allow the use of user-created fonts and any number of columns on the screen. In two-column mode with the default font on a screen 1152 by 900, BIGSUN effectively provides an ASCII display terminal with over 170 lines.

A special bootstrap must be used to run BIGSUN, since the appropriate Sun library routines must be linked in. To make such a bootstrap, restore from the CONF configuration file sun2b.cnf on the MAINSAIL directory. Link the resulting output with mb.o instead of m.o on the MAINSAIL directory. The bootstrap mainsab on the MAINSAIL directory is configured to be able to run BIGSUN.

When BIGSUN is initialized, it opens a text file called (BIGSUN font file) and reads the description of the font to be used. The default (BIGSUN font file) describes a font 7 by 10 pixels.

The font file is divided into pages. The first page of the font file gives the name and dimensions of the font in the form:

FIXED font name
height of character, including descender
width of character, including spacing
left extension of characters
descender

Subsequent pages describe bitmaps. A bitmap consists of spaces (no tabs) and lowercase x's to indicate clear and set pixels, respectively. Each bitmap contains a period (.) or uppercase X to indicate the origin of the character; the period is used if the pixel at the origin is clear, and the uppercase X if the pixel is set.

The second page of the file is the pattern for the cursor; subsequent pages are for the ASCII character codes, starting at 0. After the last character in the file should appear a page with just the letter Z on it. If a character is not present in the font, its page should be blank.

For example, a page describing an uppercase A might look like:

Uppercase A (ASCII 65)
      
x
     
xxx
     
xxx
    
x  xx
    
x  xx
   
x    xx
   
xxxxxxx
  
x      xx
  
x      xx
 
x        xx
Xxx      xxxx

A lowercase g might look like:

Lowercase g (ASCII 103)
          
x
   
xxxxxxx
  
x     xx
 
xx      xx
 
xx      xx
  
xx     x
   
xxxxxx
  
xxx
.  
xxxxxx
 
x     xxx
xxx     x
  
xxxxxx

A comment line beginning with # may be used anywhere in the font file.

When BIGSUN is initialized, it also attempts to open a file called (BIGSUN columns). If unsuccessful, it prompts for the number of columns to use in the display, and allows no margins (unused space at the edge of the screen). If it opens the file, it reads from it five integers in the order:

number of columns to use
top margin, in pixels
bottom margin, in pixels
left margin, in pixels
right margin, in pixels

Margins are useful if any of the edges of the display are invisible.

When rshed to another Sun system, do not use BIGSUN, since it will execute (i.e., take over the screen) on the system where it is invoked, not the system at which you are sitting.

B.5. Display Module DTTERM

Terminals Common Desktop Environment
<ecm> <esc><esc>
<abort> CTRL-L
Maximum columns in window depends on window size
Maximum rows in window depends on window size

The display module DTTERM runs on systems running the Common Desktop Environment, or CDE.

DTTERM takes its name from dtterm, the terminal emulator used by the CDE.

B.6. Display Module HEATH

The HEATH display module is available on an “as-is” basis. This display module is no longer fully supported, since XIDAK does not have access to a terminal on which to test it.

Terminals Heath (or Zenith) H-19
<ecm> ENTER key
<abort> CTRL-L
Maximum columns in window 77
Maximum rows in window 22

The numeric keypad keys with the up arrow (8), down arrow (2), left arrow (4), and right arrow (6) generate dpyUp, dpyDown, dpyLeft, and dpyRight respectively. The remaining keys on the right-hand numeric keypad (except for ENTER), the function keys F1 through F5, the ERASE key, and the keys with a colored square in the middle are macro ID keys.

Sample internal Heath switch settings are shown in Table B–3. The settings that are important to the proper functioning of the HEATH display module are marked with an asterisk. Other settings (parity and baud rate in particular) may be necessary to talk to certain computers, and certain settings (e.g., keyclick) are purely a matter of personal taste.

The terminal initialization sequence sets “no auto LF”, “no auto CR”, and “wrap at end of line”. The terminal initialization does not work correctly if the terminal has been set to ANSI mode. If the terminal has been set to ANSI mode, the only way to restore it to normal operation is to reset it by simultaneously pressing the right-hand SHIFT key and the RESET key.

Table B–3. Sample Heath Switch Settings
Switch Number Meaning Setting
Switch 402
0 underscore cursor 0
1 no keyclick 1
2 wrap line 1 *
3 no auto LF 0 *
4 no auto CR 0 *
5 Heath mode 0 *
6 normal keypad 0 *
7 60 Hz refresh 0
Switch 401
0 baud rate = 1200 1
1 0
2 1
3 no parity 0
4 0
5 odd parity 0
6 normal parity 0
7 full duplex 1

B.7. Display Module HPTERM

Terminals Hewlett-Packard HP2392A, A1097A, A4033A, and compatible models (not for use with terminals controlled by the Common Desktop Environment)
<ecm> home key (on some terminals this key is labeled with a hollow arrow pointing to the upper left corner of the keycap)
<abort> CTRL-L
Maximum columns in window depends on display
Maximum rows in window depends on display

The arrow keys marked with up arrow, down arrow, left arrow, and right arrow generate dpyUp, dpyDown, dpyLeft, and dpyRight respectively. On some terminals, some of the numeric keypad keys on the far right side of the keyboard are also marked with arrows; these numeric keypad keys do not generate the cursor movement key codes. Use the arrow keys to the left of the numeric keypad.

On the HP2392A, the home key is a white arrow pointer to the upper left, just above the black arrow keys.

B.8. Display Module LINDPY

Terminals any
<ecm> ! or #C
<abort> #A
Maximum columns in window user-settable
Maximum rows in window user-settable

LINDPY performs input and output to the standard MAINSAIL files cmdFile and logFile, and may therefore run on any terminal. It is more cumbersome to use than a terminal-specific display module, but may be used on terminals for which a terminal-specific display module has not yet been written or which do not provide the required display functions (e.g., a hardcopy terminal).

LINDPY is not able to respond to keystrokes as they are typed or position the cursor on the screen. Instead, it accepts input one line at a time, and redisplays the entire “screen” after processing each line of input.

When LINDPY is initialized, it prompts for the size of the “screen”. It then displays the number of lines specified after each line of input, except that trailing blank lines are not displayed. The cursor appears as a caret (^) character immediately under the character on which it is positioned. The caret is displayed on a line by itself.

Because keypad and other special keys cannot be recognized by LINDPY, special sequences are used to simulate special keys. See Table B–4.

Table B–4. LINDPY Special Sequences
Character(s) Key Simulated
! <ecm>
#D or #d <del>
#E or #e <eol>
#T or #t <tab>
#L or #l <lf>
#S or #s <sp>
#B or #b <bs>
#C or #c <ecm>
#A or #a <abort>
#X or #x <esc>
#! !
#? ?
## #
#any other character macro ID

cmdFile and logFile may be redirected when LINDPY is used, so that a “batch editing” facility may be simulated.

B.9. Display Module LINXTERM

Terminals Linux display
<ecm> <esc><esc>
<abort> CTRL-L
Maximum columns in window depends on display
Maximum rows in window depends on display

The LINXTERM display module can be used in an xterm or Terminal window on the display of a Linux system. The only keyboards on which LINXTERM has been tested are those made by Hewlett-Packard and Dell.

The keys marked with the up arrow, down arrow, left arrow, and right arrow (including those on the numeric keypad) generate dpyUp, dpyDown, dpyLeft, and dpyRight respectively. The function keys are macro ID keys, as are the remaining numbers on the numeric keypad.

LINXTERM differs from SUNXTERM only in its mapping of the raw byte sequences generated by the special keys on the keyboard.

B.10. Display Module MSWIN

Terminals PC
<ecm> ESC key
<abort> CTRL-L
Maximum columns in window depends on font and display
Maximum rows in window depends on font and display

The MSWIN display module can be used only on PCs running Windows NT. It is the only display module (other than LINDPY) that works on PCs running Windows NT.

The arrow keys to the lower right and the arrow keys on the numeric keypad generate dpyUp, dpyDown, dpyLeft, and dpyRight, respectively.

The function keys F1, F2, F3, F4, F5, F6, F7, F8, F9, F11, F12, F13, F14, the keys PAUSE, INSERT, HOME, END, PAGEUP, and PAGEDOWN, and the keys on the numeric keypad marked 0, 1, 3, 5, 7, 9, and DEL are macro ID keys.

The MSWIN display module pops up a new window in which editing takes place.

The first time MSWIN displays itself, it presents a window allowing you to choose its font. This font is remembered in the registry; to clear the registry entry, choose Clear Default Font from the File menu. You can also change the default font explicitly with File -> Set Default Font.

You can exit from an MSWIN window by choosing File -> Exit.

B.11. Display Module NCOL

Terminals any
<ecm> depends on underlying display module
<abort> depends on underlying display module
Maximum columns in window depends on underlying display module
Maximum rows in window depends on underlying display module

NCOL allows any display module to divide the screen into multiple columns so that more characters are visible at a time. When dividing an m-line display into n columns, it effectively turns it into a display of n * (m - 1) + 1 lines (the “- 1” is because the entire top line is reserved for MAINEDIT's status line).

NCOL obtains its underlying display module from the nColUnderlyingDisplayModule parameter, and the number of columns into which to split the screen from the nColNumberOfColumns parameter; both are in the $MAINED group of the standard parameters file (e.g.,v1620.prm). For example, the following entries in the parameters file:

$GROUP $MAINED

nColUnderlyingDisplayModule SUNXTERM
nColNumberOfColumns 2

specify that NCOL is to run in an xterm window divided vertically in half.

B.12. Display Modules SUN, SUN3, SUN46, SUNOPENWIN, and SUNXTERM

Terminals Sun Workstation monitor
<ecm> <esc><esc>
<abort> CTRL-L
Maximum columns in window 77 (SUN and SUN46); depends on display (SUN3, SUNOPENWIN, SUNXTERM)
Maximum rows in window 32 (SUN), 44 (SUN46); depends on display (SUN3, SUNOPENWIN, SUNXTERM)

The SUN display module can be used only on the Sun Workstation, which is a SPARC-based UNIX system produced by Sun Microsystems, Inc., or on another computer system using a Sun Workstation as a remote terminal. SUN is not designed for use under a windowing system such as X Window, Common Desktop Environment, OpenWindows, or SunView; it may fail to update the screen correctly if run from a windowing system.

The keys in the upper right part of the main keyboard with the up arrow, down arrow, left arrow, and right arrow generate dpyUp, dpyDown, dpyLeft, and dpyRight respectively. The PF keys are macro ID keys. The numeric keypad cannot be mapped, that is, it produces only numbers.

SUN46 is identical to SUN, except that it assumes a display with 46 lines rather than 34.

SUN3 is identical to SUN, except that it is designed for use under the SunView windowing system. It determines the size of a SunView window dynamically. It may hang if run on a terminal that does not provide the Sun function that returns the terminal size; if it does hang, repeatedly hit carriage return until MAINSAIL starts responding.

Currently, the SUN3 display module must be run in a ShellTool window, not a CommandTool window.

SUNOPENWIN is identical to SUN3, except that it is suited for running in an OpenWindows shelltool or cmdtool window instead of a SunView window.

In order for the function keys and right-hand keypad keys to work properly, you need to copy the file $OPENWINHOME/lib/.ttyswrc to your home directory before using SUNOPENWIN.

SUNOPENWIN may not be able to handle fonts other than the default. In addition, the cursor is sometimes improperly updated, apparently due to a bug of Sun's.

SUNXTERM is identical to SUN3, except that it is suited for running in an X Window System xterm window instead of a SunView window. If you are using SUNXTERM, you need to include the following line in your .Xdefaults file; otherwise, the macro keys will not be mapped correctly:

*SunFunctionKeys:       True

Experiment has shown that SUNXTERM usually works correctly in xterm windows even on machines other than a Sun Workstation, although XIDAK does not guarantee that it will work correctly in a non-Sun environment.

B.12.1. Suppressing Flashing in OpenWindows Shell Windows

MAINEDIT rings the terminal bell as a result of many commands to indicate an error or to draw your attention to some potential problem. In the OpenWindows Shell Tool window, the terminal bell by default “flashes” the window (inverts the window's colors, then quickly restores them) in addition to making a beeping sound. Many users of the SUNOPENWIN display module find this flashing annoying. To suppress it, create a Shell Tool window with the following command:

shelltool -xrm alarm.visible:false<eol>

The bell in the resulting window will not flash.

B.13. Display Module TRMCAP

Terminals Those listed in database file
<ecm> Depends on terminal entry
<abort> Depends on terminal entry
Maximum columns in window Depends on terminal entry
Maximum rows in window Depends on terminal entry

TRMCAP attempts to read a data base with the same format as the UNIX termcap terminal capability file. This is a file with a list of terminal names and descriptions of the command sequences they require. Consult a UNIX Programmer's Reference Manual, Chapter 5, for further information on termcap files (this document is not supplied by XIDAK).

The TRMCAP display module assumes the data base file is called (termcap data base). A MAINEX ENTER subcommand may be used to define this as a logical name for the real file name of the data base (see Section 21.2.19 of the MAINSAIL Utilities User's Guide). TRMCAP prompts for the terminal entry to be used when it is first invoked. For example, to select the VT100 entry from the data base:

Termcap displayVT100<eol>

TRMCAP is no more reliable than the available data base. Official UNIX termcap data bases vary greatly in quality from site to site. If a XIDAK display module exists for a particular terminal, it is almost certainly better to use that display module than to use TRMCAP.

B.14. Display Modules TELEVI and TVI950

The TELEVI and TVI950 display modules are available on an “as-is” basis. These display modules are no longer fully supported, since XIDAK does not have access to terminals on which to test them.

Terminals TeleVideo (various models)
<ecm> HOME key
<abort> FUNCT q
Maximum columns in window 77
Maximum rows in window 23

TELEVI is used for TeleVideo models 912, 912B, 912C, 920, 920B, and 920C. TVI950 is used for model 950.

The code FUNCT q is generated by holding down the key labeled FUNCT and typing a lowercase letter q.

The keys to the right of the space bar marked with up arrow, down arrow, left arrow, and right arrow generate dpyUp, dpyDown, dpyLeft, and dpyRight, respectively. The keys labeled with words across the top of the keyboard and numeric keypad are macro ID keys. Holding down the FUNCT key and typing any other key also generates a macro control sequence. Case is distinguished; i.e., FUNCT a is not the same as FUNCT A.

The numeric keys on the numeric keypad are not mappable; they generate only numbers.

CTRL-A is not available as a macro ID on the TeleVideo terminals, since most keypad codes generate sequences beginning with CTRL-A. A series of three CTRL-As, however, constitute a single control sequence. Also, <abort> is not mapped to CTRL-L since the right arrow key generates CTRL-L.

When the TELEVI and TVI950 modules are used on a half-duplex system, the cursor position is marked by displaying the character at the cursor with the half-intensity attribute (a half-intensity ^ is displayed when the cursor is on a blank).

B.15. Display Module VIS550

The VIS550 display module is available on an “as-is” basis. This display module is no longer fully supported, since XIDAK does not have access to a terminal on which to test it.

Terminals Visual 300, 550
<ecm> ENTER key or <esc><esc>
<abort> CTRL-L
Maximum columns in window 77
Maximum rows in window 30

The VIS550 display module is unsupported.

The arrow keys marked with up arrow, down arrow, left arrow, and right arrow generate dpyUp, dpyDown, dpyLeft, and dpyRight respectively. The function keys generate macro IDs.

B.16. Display Modules VT100, VT102, and VT102M

Terminals VT100, VT102, and compatible models
<ecm> ENTER key
<abort> CTRL-L
80 Column mode:
Maximum columns in window 77
Maximum rows in window 22
132 Column mode:
Maximum columns in window 129
Maximum rows in window 12

DEC's VT100 line of terminals (and compatible terminals made by other manufacturers) includes some terminals that support character and line insert and delete, and some that do not. Use the VT100 module for terminals without these capabilities, and VT102 or VT102M for the others.

The numeric keypad keys labeled 8, 2, 4, and 6 generate dpyUp, dpyDown, dpyLeft, and dpyRight, respectively. Other numeric keypad keys (except ENTER) are macro ID keys.

When the display modules VT100 and VT102 initialize the terminal, they normally check automatically to determine whether the terminal is in 80-column mode or 132-column mode. Such a check is not possible on half-duplex systems, so 80-column mode is always assumed on such systems. VT102M does not perform this check, even on full-duplex systems. It should be used on VT102-compatible terminals that do not support the check.

When the display module deinitializes the terminal (as when MAINEDIT returns to the operating system), the terminal's scroll region is set to be the entire screen.

It is important to specify the correct baud rate for the VT100 and related display modules, as the terminals may require padding for a number of display commands at high baud rates. The VT100 display modules do not work correctly if the terminal is in the “smooth scroll” mode; users are responsible for ensuring that the terminal is in “jump scroll” mode before using the display modules.

B.17. Display Modules WY43, WY50, WY5043, and WY75

Terminals Wyse WY-50 (WY50 and WY5043); Wyse WY-75 (WY75); Wyse WY-60 (WY43)
<ecm> ENTER
<abort> CTRL-L
Maximum columns in window 77
Maximum rows in window 22 (WY50 and WY75); 41 (WY5043 and WY43)

The yellow arrow keys below the RETURN key marked with up arrow, down arrow, left arrow, and right arrow generate dpyUp, dpyDown, dpyLeft, and dpyRight respectively. The function keys and keypad keys are macro ID keys. The function keys generate different macro IDs when shifted.

B.18. Display Module XDPY

Terminals any that run the X Window System
<ecm> <esc>
<abort> CTRL-L
Maximum columns in window depends on size of window and on whether in twoColumn mode
Maximum rows in window depends on size of window and on whether in twoColumn mode

The XDPY display module can be used on any terminal running the X Window System. It is based on the Motif package.

The arrow keys are those with keysyms Up, Down, Left, and Right. Other non-modifier keys are generally macro keys.

The XDPY display module currently cannot be used independently of MAINEDIT (or MTFEXE, which uses it implicitly; see the Motif-Based MAINSAIL Tools Reference Guide).

Several parameters from the $MAINEDIT and $GUIDBG groups of the v1620.prm file are used to initialize the state of the XDPY display module:

These options have the same effect, regardless of which of the two groups they appear in.

The GUI that uses XDPY is described in more detail in the Motif-Based MAINSAIL Tools Reference Guide.


previous   next   top   contents   index   framed top   this page unframed

MAINEDIT User's Guide, Appendix B