From 341e0c1996478aa75dbc71a2460abc0405fa781c Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Fri, 10 Nov 1995 17:00:00 -0500 Subject: [PATCH] snapshot of project "ncurses", label v1_9_7a --- ANNOUNCE | 13 +- INSTALL | 75 +- MANIFEST | 7 +- NEWS | 3 +- TO-DO | 2 +- announce.html | 11 +- announce.html.in | 5 +- configure.in | 2 + dist.mk | 10 +- form/frm_driver.c | 1 - form/fty_regex.c | 16 +- include/Makefile.in | 4 +- include/curses.h.in | 2 +- man/MKterminfo.sh | 13 +- man/Makefile.in | 2 +- man/form.3x | 4 +- man/form_win.3x | 4 +- man/infocmp.1m | 42 +- man/term.7 | 2 +- man/terminfo.head | 16 +- man/terminfo.tail | 1 + misc/ncurses-intro.doc | 2477 ++++++++++++++++++++++++++++++- misc/terminfo.src | 1646 +++++++------------- ncurses/MKfallback.sh | 2 +- ncurses/Makefile.in | 4 + ncurses/comp_hash.c | 22 +- ncurses/comp_scan.c | 5 +- ncurses/fallback.c | 11 - ncurses/lib_clrbot.c | 24 +- ncurses/lib_clreol.c | 3 +- ncurses/lib_scroll.c | 4 + ncurses/modules | 2 +- ncurses/parse_entry.c | 2 - ncurses/read_entry.c | 15 +- ncurses/write_entry.c | 4 +- progs/infocmp.c | 139 +- {include => progs}/progs.priv.h | 21 +- progs/toe.c | 42 +- progs/tset.c | 16 +- test/ncurses.c | 4 +- test/testcurs.c | 9 +- test/view.c | 10 +- 42 files changed, 3371 insertions(+), 1326 deletions(-) delete mode 100644 ncurses/fallback.c rename {include => progs}/progs.priv.h (83%) diff --git a/ANNOUNCE b/ANNOUNCE index 86ae8cdc..554e9e38 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,7 +1,7 @@ - ANNOUNCING NCURSES 1.9.7 + ANNOUNCING NCURSES 1.9.7A -Overview of ncurses 1.9.7 +Overview of ncurses 1.9.7a The ncurses library is a freeware emulation of System V Release 4.0 curses. It uses terminfo format, supports color and multiple @@ -82,6 +82,12 @@ Overview of ncurses 1.9.7 line-deletion for screen-line movements. This algorithm is more powerful than the 4.4BSD curses quickch() routine. + * It is possible to generate the library with a list of pre-loaded + fallback entries linked to it so that it can serve those terminal + types even when no terminfo tree or termcap file is accessible + (this may be useful for support of screen-oriented programs that + must run in single-user mode). + * The tic(1)/captoinfo utility provided with ncurses has the ability to translate many termcaps from the XENIX, IBM and AT&T extension sets. @@ -149,7 +155,8 @@ Overview of ncurses 1.9.7 u386mon System performance monitor for SVr4 - nvi New vi alpha versions 1.1.50 and later use ncurses + nvi New vi alpha versions 1.50 are able to use ncurses versions + 1.9.7 and later. The ncurses distribution includes a selection of test programs. diff --git a/INSTALL b/INSTALL index 4a9d81da..16d41891 100644 --- a/INSTALL +++ b/INSTALL @@ -49,14 +49,14 @@ INSTALLATION PROCEDURE: If you want to put the terminal descriptions in, for example, /usr/share/lib/terminfo, you can either make that a symbolic link to - /usr/lib/terminfo, or type `configure --with-datadir=/usr/share/lib/terminfo'. + /usr/lib/terminfo, or type `./configure --with-datadir=/usr/share/lib/terminfo'. This is particularly useful if your system already has a terminfo database. This option allows you to place ncurses' terminfo in an alternate location. You can use TERMINFO to point to the appropriate directory. -2. Type `configure' to configure ncurses for your operating system and create +2. Type `./configure' to configure ncurses for your operating system and create the Makefiles. Various configuration options are available to customize - the installation; use `configure --help' to list the available options. + the installation; use `./configure --help' to list the available options. It will create your Makefiles. If your operating system is not supported, read the PORTABILITY section in the file ncurses/README for information on @@ -76,7 +76,7 @@ INSTALLATION PROCEDURE: If you do not specify any models, the normal and debug libraries will be configured. This is equivalent to - configure --with-normal --with-debug + ./configure --with-normal --with-debug Rules for generating shared libraries are highly dependent upon the choice of host system and compiler. We've been testing shared libraries on linux @@ -95,7 +95,26 @@ INSTALLATION PROCEDURE: do), some test programs, and the panels and menus libraries. Read the file test/README for details on the test programs. -4. IF YOU HAVE ROOT: You can type `make install' to install the libraries, +4. Run ncurses and several other test programs in the test directory to + verify that ncurses functions correctly before overwriting any system + files. + + The ncurses program is designed specifically to test the ncurses library. + You can use it to verify that the screen highlights work correctly, that + cursor addressing and window scrolling works OK, etc. + +5. If you are running SLS, Slackware, or any Linux distribution based on + them, you may already have an older version of ncurses installed. If so, + you must remove the old files from /usr/include and the old libraries + from /usr/lib before installing ncurses. Otherwise, you may have + compilation errors or linkage problems because you're picking up the old + files. + + If you have BSD curses installed in your system and you accidentally + compile using its curses.h you'll end up with a large number of + undefined symbols at link time. _waddbytes is one of them. + +6. IF YOU HAVE ROOT: You can type `make install' to install the libraries, the programs, the terminfo database and the man pages. Alternately, you can type `make install' in each directory you want to install. In the top-level directory, you can do a partial install using these commands: @@ -156,26 +175,10 @@ INSTALLATION PROCEDURE: directory. Note: this will go away next time you do `make install.data' and you'll have to redo it. -9. Run ncurses and several other test programs (see the test directory). - - The ncurses program is designed specifically to test the ncurses library. - You can use it to verify that the screen highlights work correctly, that - cursor addressing and window scrolling works OK, etc. - -NOTES: - If you have SLS or anything based on it (slackware is OK) PLEASE - remove everything related to ncurses before re-installing it. - - If you have BSD curses installed in your system and you accidentally - compile using its curses.h you'll end up with a large number of - undefined symbols at link time. _waddbytes is one of them. - - The include files will normally be installed in /usr/include/ncurses. - To arrange for your programs to see them by default, copy or link them - to /usr/include from there. - IF YOU ARE A SYSTEM INTEGRATOR: + Configuration and Installation: + Configure with --prefix=/usr to make the install productions put libraries and headers in the correct locations (overwriting any previous curses libraries and headers). This will put the terminfo @@ -189,6 +192,32 @@ IF YOU ARE A SYSTEM INTEGRATOR: that use raw termcap to query terminal characteristics will win (providing you recompile and relink them!). + Keyboard Mapping: + + Some Linux console keyboard mappings as of 1995 are sub-optimal; a + bit of tweaking would allow terminfo to make useful distinctions and + conform better to the ANSI/ECMA-48 standard. The following specific + things should be changed: + + * Backspace should generate ^H, not ^?. + * Shift-tab should generate \E[Z, not ^I. + + The terminfo master file assumes these mappings from version 9.11.3 up. + Here are the loadkeys -d mappings that will set these up: + + keycode 14 = BackSpace BackSpace + alt keycode 14 = Meta_BackSpace + keycode 15 = Tab Tab + alt keycode 15 = Meta_Tab + shift keycode 15 = F26 + string F26 ="\033[Z" + + but this is a kluge that uses up the F26 function key binding when + it shouldn't. The compiled-in defaults in the keyboard driver should + be changed using the loadkeys -m option. + + Naming the Console Terminal + In various Linuxes (and possibly elsewhere) there has been a practice of designating the system console driver type as `console'. Please do not do this any more! It complicates peoples' lives, because it diff --git a/MANIFEST b/MANIFEST index 5f8c74a3..560bb006 100644 --- a/MANIFEST +++ b/MANIFEST @@ -51,14 +51,13 @@ ./include/curses.h.in ./include/edit_cfg.sh ./include/parametrized.sh -./include/progs.priv.h ./include/term_entry.h ./include/termcap.h.in ./include/tic.h ./include/unctrl.h.in ./install-sh -./man/Makefile.in ./man/MKterminfo.sh +./man/Makefile.in ./man/captoinfo.1m ./man/clear.1 ./man/curs_addch.3x @@ -200,7 +199,6 @@ ./ncurses/SigAction.h ./ncurses/alloc_entry.c ./ncurses/captoinfo.c -./ncurses/fallback.c ./ncurses/comp_error.c ./ncurses/comp_hash.c ./ncurses/comp_parse.c @@ -272,10 +270,10 @@ ./ncurses/parse_entry.c ./ncurses/read_entry.c ./ncurses/read_termcap.c -./ncurses/write_entry.c ./ncurses/sigaction.c ./ncurses/strerror.c ./ncurses/vsscanf.c +./ncurses/write_entry.c ./panel/Makefile.in ./panel/modules ./panel/panel.c @@ -289,6 +287,7 @@ ./progs/dump_entry.h ./progs/infocmp.c ./progs/modules +./progs/progs.priv.h ./progs/termsort.sh ./progs/toe.c ./progs/tput.c diff --git a/NEWS b/NEWS index 47eb61b9..971f3cd2 100644 --- a/NEWS +++ b/NEWS @@ -18,7 +18,8 @@ started working with Pavel Curtis' original work, pcurses, in 1992: * added -h option to toe(1). * added -R option to tic(1) and infocmp(1). * added fallback-entry-list feature. -* added -i option to infocmp(1) +* added -i option to infocmp(1). +* do a better job at detecting if we're on SCO. ### ncurses-1.9.5 -> 1.9.6 diff --git a/TO-DO b/TO-DO index 8bd5a869..1b8c8676 100644 --- a/TO-DO +++ b/TO-DO @@ -29,7 +29,7 @@ LONGER-TERM TO-DO ITEMS: 1. Extended mouse support via gpm integration We have mouse support under xterm now, implemented and documented. The -next step is to add code to lib_getch.c that can detect Alessandro Rubini's +next step is to add code to lib_mouse.c that can detect Alessandro Rubini's GPM server and use it to implement the same interface. 2. Extended COSE conformance diff --git a/announce.html b/announce.html index e3132605..665e7420 100644 --- a/announce.html +++ b/announce.html @@ -5,10 +5,10 @@ -Announcing ncurses 1.9.7 -

Announcing ncurses 1.9.7

+Announcing ncurses 1.9.7a +

Announcing ncurses 1.9.7a

-

Overview of ncurses 1.9.7

+

Overview of ncurses 1.9.7a

The ncurses library is a freeware emulation of System V Release 4.0 curses. It uses terminfo format, supports color and multiple highlights and forms @@ -92,7 +92,7 @@ the 4.4BSD curses quickch() routine.

  • It is possible to generate the library with a list of pre-loaded fallback entries linked to it so that it can serve those terminal types even when no terminfo tree or termcap file is accessible (this may be useful -for support of screen-oriented programs that must run in single-user mode). +for support of screen-oriented programs that must run in single-user mode).

  • The tic(1)/captoinfo utility provided with ncurses has the ability to translate many termcaps from the XENIX, IBM and @@ -154,7 +154,8 @@ including:

    u386mon
    System performance monitor for SVr4
    nvi -
    New vi alpha versions 1.1.50 and later use ncurses +
    New vi alpha versions 1.50 are able to use ncurses versions 1.9.7 +and later. The ncurses distribution includes a selection of test programs. diff --git a/announce.html.in b/announce.html.in index 5767dad7..11b30e97 100644 --- a/announce.html.in +++ b/announce.html.in @@ -92,7 +92,7 @@ the 4.4BSD curses quickch() routine.

  • It is possible to generate the library with a list of pre-loaded fallback entries linked to it so that it can serve those terminal types even when no terminfo tree or termcap file is accessible (this may be useful -for support of screen-oriented programs that must run in single-user mode). +for support of screen-oriented programs that must run in single-user mode).

  • The tic(1)/captoinfo utility provided with ncurses has the ability to translate many termcaps from the XENIX, IBM and @@ -154,7 +154,8 @@ including:

    u386mon
    System performance monitor for SVr4
    nvi -
    New vi alpha versions 1.1.50 and later use ncurses +
    New vi alpha versions 1.50 are able to use ncurses versions 1.9.7 +and later. The ncurses distribution includes a selection of test programs. diff --git a/configure.in b/configure.in index d79bae82..e7d58170 100644 --- a/configure.in +++ b/configure.in @@ -142,6 +142,7 @@ AC_CHECK_LIB(bsd, gettimeofday)dnl CLIX: bzero, select, gettimeofday ### Checks for header files. AC_STDC_HEADERS +AC_HEADER_DIRENT dnl These are some other potentially nonportable headers. AC_CHECK_HEADERS( \ @@ -189,6 +190,7 @@ getttynam \ setbuffer \ setvbuf \ sigaction \ +strdup \ strerror \ usleep \ vsscanf \ diff --git a/dist.mk b/dist.mk index a17547e3..db0b43f0 100644 --- a/dist.mk +++ b/dist.mk @@ -15,10 +15,10 @@ SHELL = /bin/sh # 1.9a, 1.9b, 1.9foobar, ... when the ncurses release version changes # If a new ncurses has an incompatible application binary interface than # previous one, the ABI version should be changed. -VERSION = 1.9.7 -SHARED_ABI = 2.0 +VERSION = 1.9.7a +SHARED_ABI = 2.1 -dist: ANNOUNCE INTRO +dist: ANNOUNCE INTRO HACK (cd ..; tar cvf ncurses-$(VERSION).tar `sed announce.html INTRO: misc/ncurses-intro.html - lynx -dump $^ > misc/ncurses-intro.doc + lynx -dump misc/ncurses-intro.html > misc/ncurses-intro.doc +HACK: misc/hackguide.html + lynx -dump misc/hackguide.html > misc/hackguide.doc # Prepare distribution for version control vcprepare: diff --git a/form/frm_driver.c b/form/frm_driver.c index ced8267d..c0de0fff 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -1295,7 +1295,6 @@ static int IFN_Next_Word(FORM * form) char *bp = Address_Of_Current_Position_In_Buffer(form); char *s; char *t; - bool again = FALSE; /* We really need access to the data, so we have to synchronize */ Synchronize_Buffer(form); diff --git a/form/fty_regex.c b/form/fty_regex.c index 01886472..76b63bc7 100644 --- a/form/fty_regex.c +++ b/form/fty_regex.c @@ -21,12 +21,24 @@ typedef struct #undef RETURN static int reg_errno; -#define INIT register char *sp = instring; reg_errno=0; +static char *RegEx_Init(char *instring) +{ + reg_errno = 0; + return instring; +} + +static char *RegEx_Error(int code) +{ + reg_errno = code; + return 0; +} + +#define INIT register char *sp = RegEx_Init(instring); #define GETC() (*sp++) #define PEEKC() (*sp) #define UNGETC(c) (--sp) #define RETURN(c) return(c) -#define ERROR(c) reg_errno=(c) +#define ERROR(c) return RegEx_Error(c) #include diff --git a/include/Makefile.in b/include/Makefile.in index fb43125f..ddbab770 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -44,8 +44,8 @@ install.libs \ install.includes : term.h $(includedir) $(INSTALL_DATA) term.h $(includedir)/term.h $(INSTALL_DATA) curses.h $(includedir)/curses.h - $(INSTALL_DATA) $(srcdir)/unctrl.h $(includedir)/unctrl.h - $(INSTALL_DATA) $(srcdir)/termcap.h $(includedir)/termcap.h + $(INSTALL_DATA) unctrl.h $(includedir)/unctrl.h + $(INSTALL_DATA) termcap.h $(includedir)/termcap.h @echo "Make sure you delete any old header files!" $(includedir) : diff --git a/include/curses.h.in b/include/curses.h.in index 0fab0bdd..68a7acef 100644 --- a/include/curses.h.in +++ b/include/curses.h.in @@ -464,7 +464,7 @@ extern int slk_attroff(attr_t); * pseudo functions */ #define wgetstr(w, s) wgetnstr(w, s, -1) -#define getnstr(w, s, n) wgetnstr(stdscr, s, n) +#define getnstr(s, n) wgetnstr(stdscr, s, n) #define setterm(term) setupterm(term, 1, (int *)0) diff --git a/man/MKterminfo.sh b/man/MKterminfo.sh index 5d0fb06b..25c222c1 100755 --- a/man/MKterminfo.sh +++ b/man/MKterminfo.sh @@ -14,15 +14,20 @@ head=$1 caps=$2 tail=$3 -echo '.\" DO NOT EDIT THIS FILE BY HAND!' -echo '.\" It is generated from terminfo.head, Caps, and terminfo.tail.' +cat <<'EOF' +'\" t +.\" DO NOT EDIT THIS FILE BY HAND! +.\" It is generated from terminfo.head, Caps, and terminfo.tail. +.\" +.\" Note: this must be run through tbl before nroff. +.\" The magic cookie on the first line triggers this under some man programs. +EOF cat $head sed -n <$caps "\ /%%-STOP-HERE-%%/q /^#%/s///p /^#/d -s/^/\\\s-1/ -s/$/T}\\\s+1/ +s/$/T}/ s/ [Y\-][B\-][C\-][G\-][E\-]\** / T{/ s/ bool / /p s/ num / /p diff --git a/man/Makefile.in b/man/Makefile.in index 0bf676b5..f59126b8 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -50,7 +50,7 @@ install.man_db : terminfo.5 # We compose terminfo.5 from the real sources... CAPLIST=$(srcdir)/../include/Caps terminfo.5: terminfo.head $(CAPLIST) terminfo.tail Makefile MKterminfo.sh - sh MKterminfo.sh terminfo.head $(CAPLIST) terminfo.tail >terminfo.5 + sh $(srcdir)/MKterminfo.sh $(srcdir)/terminfo.head $(CAPLIST) $(srcdir)/terminfo.tail >terminfo.5 clean mostlyclean: rm -f terminfo.5 diff --git a/man/form.3x b/man/form.3x index 1528fe5c..41d65986 100644 --- a/man/form.3x +++ b/man/form.3x @@ -56,7 +56,7 @@ _________________________________________________________ \fBfield_type\fR form_field_validation(3X) \fBfield_userptr\fR form_field_userptr(3X) \fBform_driver\fR form_driver(3X) -\fBform_fields\fR form_fields(3X) +\fBform_fields\fR form_field(3X) \fBform_init\fR form_hook(3X) \fBform_opts\fR form_opts(3X) \fBform_opts_off\fR form_opts(3X) @@ -91,7 +91,7 @@ _________________________________________________________ \fBset_field_userptr\fR form_field_userptr(3X) \fBset_fieldtype_arg\fR form_fieldtype(3X) \fBset_fieldtype_choice\fR form_fieldtype(3X) -\fBset_form_fields\fR form_fields(3X) +\fBset_form_fields\fR form_field(3X) \fBset_form_init\fR form_hook(3X) \fBset_form_opts\fR form_field_opts(3X) \fBset_form_page\fR form_page(3X) diff --git a/man/form_win.3x b/man/form_win.3x index b6d204fc..08b64547 100644 --- a/man/form_win.3x +++ b/man/form_win.3x @@ -5,9 +5,9 @@ .SH SYNOPSIS \fB#include \fR .br -int set_form_window(FORM *form, WINDOW *win); +int set_form_win(FORM *form, WINDOW *win); .br -WINDOW *form_window(FORM *form); +WINDOW *form_win(FORM *form); .br int set_form_sub(FORM *form, WINDOW *sub); .br diff --git a/man/infocmp.1m b/man/infocmp.1m index 39ad4573..ddd590a0 100644 --- a/man/infocmp.1m +++ b/man/infocmp.1m @@ -224,28 +224,30 @@ l l. Action Meaning = RIS full reset +SC save cursor +RC restore cursor +LL home-down +RSR reset scroll region -DECPAM application keypad mode -DECPNM normal keypad mode +ISO DEC G0 enable DEC graphics for G0 +ISO UK G0 enable UK chars for G0 +ISO US G0 enable US chars for G0 +ISO DEC G1 enable DEC graphics for G1 +ISO UK G1 enable UK chars for G1 +ISO US G1 enable US chars for G1 -DECSC save cursor -DECRC restore cursor +DECPAM application keypad mode +DECPNM normal keypad mode +DECANSI enter ANSI mode -DEC G0 enable DEC graphics for G0 -DEC UK G0 enable UK chars for G0 -DEC US G0 enable US chars for G0 -DEC G1 enable DEC graphics for G1 -DEC UK G1 enable UK chars for G1 -DEC US G1 enable US chars for G1 - -DECCKM application cursor keys -DECANM set VT52 mode -DECCOLM 132-column mode -DECSCLM smooth scroll -DECSCNM reverse video mode -DECOM origin mode -DECAWM wraparound mode -DECARM auto-repeat mode +DEC[+-]CKM application cursor keys +DEC[+-]ANM set VT52 mode +DEC[+-]COLM 132-column mode +DEC[+-]SCLM smooth scroll +DEC[+-]SCNM reverse video mode +DEC[+-]OM origin mode +DEC[+-]AWM wraparound mode +DEC[+-]ARM auto-repeat mode .TE .SH FILES .TP 20 @@ -263,8 +265,6 @@ The \fB-r\fR option's notion of `termcap' capabilities is BSD 4.4's. Older versions may have a more restricted set. .SH BUGS The -F option of \fBinfocmp\fR(1m) should be a \fBtoe\fR(1m) mode. - -The \fI-i\fR option isn't smart enough to recognize composite sequences. .SH SEE ALSO \fBinfocmp\fR(1m), \fBcaptoinfo\fR(1m), \fBinfotocap\fR(1m), \fBtic\fR(1m), \fBtoe\fR(1m), diff --git a/man/term.7 b/man/term.7 index 6473e46d..ea407027 100644 --- a/man/term.7 +++ b/man/term.7 @@ -110,7 +110,7 @@ attributes. Enable auto-margin (right-margin wraparound) .TP 5 -m -Suppress color support +Mono mode - suppress color support .TP 5 -na No arrow keys - termcap ignores arrow keys which are actually there on the diff --git a/man/terminfo.head b/man/terminfo.head index 4b109985..f9222a14 100644 --- a/man/terminfo.head +++ b/man/terminfo.head @@ -1,6 +1,3 @@ -'\" t -.\" Note: this must be run through tbl before nroff. -.\" The magic cookie on the first line triggers this under some man programs. .TH TERMINFO 5 "" "" "File Formats" .ds n 5 .ds d @TERMINFO@ @@ -50,18 +47,19 @@ l l l. \fBSuffix Meaning Example\fP -\fInn\fP Number of lines on the screen aaa-60 -\fIn\fPp Number of pages of memory c100-4p --am With auto. margins (usually default) vt100-am --m Mono mode. Suppress color. ansi-m +-am With automargins (usually the default) vt100-am +-m Mono mode; suppress color ansi-m -mc Magic cookie; spaces when highlighting wy30-mc -na No arrow keys (leave them in local) c100-na -nam Without automatic margins vt100-nam --nl No status line. att4415-nl --ns No status line. hp2626-ns +-nl No status line att4415-nl +-ns No status line hp2626-ns -rv Reverse video c100-rv -s Enable status line vt100-s --vb Use visible bell instead of flash. wy370-vb --w Wide mode (more than 80 columns) vt100-w +-vb Use visible bell instead of beep wy370-vb +-w Wide mode (> 80 columns, usually 132) vt100-w .TE For more on terminal naming conventions, see the \fBterm(7)\fR manual page. .SS Capabilities .\" Head of terminfo man page ends here +.ps -1 diff --git a/man/terminfo.tail b/man/terminfo.tail index f2a0f0ff..3a12a7e4 100644 --- a/man/terminfo.tail +++ b/man/terminfo.tail @@ -1,4 +1,5 @@ .\" Beginning of terminfo.tail file +.ps +1 .PP .SS A Sample Entry .PP diff --git a/misc/ncurses-intro.doc b/misc/ncurses-intro.doc index a6a9bdae..e9efa7e2 100644 --- a/misc/ncurses-intro.doc +++ b/misc/ncurses-intro.doc @@ -1,32 +1,2457 @@ - WELCOME TO THE UNIVERSITY OF KANSAS + WRITING PROGRAMS WITH NCURSES - This server is operated by Academic Computing Services at the - University of Kansas, which is the home of + by Eric S. Raymond and Zeyd M. Ben-Halim + + CONTENTS + + * Introduction + + A Brief History of Curses + + Scope of This Document + + Terminology + * The Curses Library + + An Overview of Curses + o Compiling Programs using Curses + o Updating the Screen + o Standard Windows and Function Naming Conventions + o Variables + + Using the Library + o Starting up + o Output + o Input + o Using Forms Characters + o Character Attributes and Color + o Mouse Interfacing + o Finishing Up + + Function Descriptions + o Initialization and Wrapup + o Causing Output to the Terminal + o Low-Level Capability Access + o Debugging + + Hints, Tips, and Tricks + o Some Notes of Caution + o Temporarily Leaving ncurses Mode + o Using ncurses under xterm + o Handling Multiple Terminal Screens + o Testing for Terminal Capabilities + o Tuning for Speed + o Special Features of ncurses + * The Panels Library + + Compiling With the Panels Library + + Overview of Panels + + Panels, Input, and the Standard Screen + + Hiding Panels + + Miscellaneous Other Facilities + * The Menu Library + + Compiling with the menu Library + + Overview of Menus + + Selecting items + + Menu Display + + Menu Windows + + Processing Menu Input + + Miscellaneous Other Features + * The Forms Library + + Compiling with the forms Library + + Overview of Forms + + Creating and Freeing Fields and Forms + + Fetching and Changing Field Attributes + o Fetching Size and Location Data + o Changing the Field Location + o The Justification Attribute + o Field Display Attributes + o Field Option Bits + o Field Status + o Field User Pointer + + Variable-Sized Fields + + Field Validation + o TYPE_ALPHA + o TYPE_ALNUM + o TYPE_ENUM + o TYPE_INTEGER + o TYPE_NUMERIC + o TYPE_REGEXP + + Direct Field Buffer Manipulation + * Attributes of Forms + * Control of Form Display + * Input Processing in the Forms Driver + + Page Navigation Requests + + Inter-Field Navigation Requests + + Intra-Field Navigation Requests + + Scrolling Requests + + Field Editing Requests + + Order Requests + + Application Commands + * Field Change Hooks + * Field Change Commands + * Form Options + * Custom Validation Types + + Union Types + + New Field Types + + Validation Function Arguments + + Order Functions For Custom Types + + Avoiding Problems + - * KUfacts, the KU campus wide information system, - * KANREN Info, the KANREN information system, - * HNSource, the central information server for historians, and + _________________________________________________________________ + + INTRODUCTION + + This document is an introduction to programming with curses. It is not + an exhaustive reference for the curses Application Programming + Interface (API); that role is filled by the curses manual pages. + Rather, it is intended to help C programmers ease into using the + package. + + The curses package is a subroutine library for terminal-independent + screen-painting and input-event handling which presents a high level + screen model to the programmer, hiding differences between terminal + types and doing automatic optimization of output to change one + screenfull of text into another. Curses uses terminfo, which is a + database format that can describe the capabilities of thousands of + different terminals. + + The curses API may seem something of an archaism on UNIX desktops + increasingly dominated by X, Motif, and Tcl/Tk. Nevertheless, UNIX + still supports tty lines and X supports _xterm(1)_; the curses API has + the advantage of (a) back-portability to character-cell terminals, and + (b) simplicity. For an application that does not require bit-mapped + graphics and multiple fonts, an interface implementation using curses + will typically be a great deal simpler and less expensive than one + using an X toolkit. + +A Brief History of Curses + + Historically, the first ancestor of curses was the routines written to + provide screen-handling for the game rogue; these used the already- + existing termcap database facility for describing terminal + capabilities. These routines were abstracted into a documented library + and first released with the early BSD UNIX versions. + + System III UNIX from Bell Labs featured a rewritten and much-improved + curses library. It introduced the terminfo format. Terminfo is based + on Berkeley's termcap database, but contains a number of improvements + and extensions. Parameterized capabilities strings were introduced, + making it possible to describe multiple video attributes, and colors + and to handle far more unusual terminals than possible with termcap. + In the later AT&T System V releases, curses evolved to use more + facilities and offer more capabilities, going far beyond BSD curses in + power and flexibility. + +Scope of This Document + + This document describes ncurses, a freeware implementation of the + System V curses API with some clearly marked extensions. It includes + the following System V curses features: + + * Support for multiple screen highlights (BSD curses could only + handle one `standout' highlight, usually reverse-video). - * the Lynx and DosLynx World-Wide Web (WWW) browsers. The current - version of Lynx is 2.4. If you are running an earlier version - PLEASE UPGRADE! + * Support for line- and box-drawing using forms characters. - Other University of Kansas Servers - * The University of Kansas Medical Center--Pulse - * Atmospheric Science - * Electrical Engineering and Computer Science - * Mathematics - * Physics - * Printing Services - * Research Support and Grants Administration - * Special Education Department - * Telecommuncations and Information Sciences Lab - * University Affiliated Program for Devleopmental Disabilities + * Recognition of function keys on input. - Information sources about and for WWW - * For a description of WWW choose Web Overview - * About the WWW Information Sharing project - * WWW Information By Subject - * WWW Information By Type - * Inter-Links, Internet access made easy + * Color support. + + * Support for pads (windows of larger than screen size on which the + screen or a subwindow defines a viewport). + + Also, this package makes use of the insert and delete line and + character features of terminals so equipped, and determines how to + optimally use these features with no help from the programmer. It + allows arbitrary combinations of video attributes to be displayed, + even on terminals that leave ``magic cookies'' on the screen to mark + changes in attributes. + + The ncurses package can also capture and use event reports from a + mouse in some environments (notably, xterm under the X window system). + This document includes tips for using the mouse. The ncurses package + was originated by Pavel Curtis. The primary maintainer of the package + is Zeyd Ben-Halim . Eric S. Raymond + wrote many of the new features in versions + after 1.8.1 and wrote most of this introduction. + + This document also describes the extension library, similarly modeled + on the SVr4 panels facility. This library allows you to associate + backing store with each of a stack or deck of overlapping windows, and + provides operations for moving windows around in the stack that change + their visibility in the natural way (handling window overlaps). + + Finally, this document describes in detail the menus and forms + extension libraries, also cloned from System V, which support easy + construction and sequences of menus and fill-in forms. + +Terminology + + In this document, the following terminology is used with reasonable + consistency: + + window + A data structure describing a sub-rectangle of the screen + (possibly the entire screen). You can write to a window as + though it were a miniature screen, scrolling independently of + other windows on the physical screen. + + screens + A subset of windows which are as large as the terminal screen, + i.e., they start at the upper left hand corner and encompass + the lower right hand corner. One of these, stdscr, is + automatically provided for the programmer. + + terminal screen + The package's idea of what the terminal display currently looks + like, i.e., what the user sees now. This is a special screen. + + THE CURSES LIBRARY + +An Overview of Curses + + COMPILING PROGRAMS USING CURSES + + In order to use the library, it is necessary to have certain types and + variables defined. Therefore, the programmer must have a line: + + + #include + + at the top of the program source. The screen package uses the Standard + I/O library, so includes . also + includes , , or depending on your + system. It is redundant (but harmless) for the programmer to do these + includes, too. In linking with curses you need to have -lncurses in + your LDFLAGS or on the command line. There is no need for any other + libraries. + + UPDATING THE SCREEN + + In order to update the screen optimally, it is necessary for the + routines to know what the screen currently looks like and what the + programmer wants it to look like next. For this purpose, a data type + (structure) named WINDOW is defined which describes a window image to + the routines, including its starting position on the screen (the (y, + x) coordinates of the upper left hand corner) and its size. One of + these (called curscr, for current screen) is a screen image of what + the terminal currently looks like. Another screen (called stdscr, for + standard screen) is provided by default to make changes on. + + A window is a purely internal representation. It is used to build and + store a potential image of a portion of the terminal. It doesn't bear + any necessary relation to what is really on the terminal screen; it's + more like a scratchpad or write buffer. + + To make the section of physical screen corresponding to a window + reflect the contents of the window structure, the routine refresh() + (or wrefresh() if the window is not stdscr) is called. + + A given physical screen section may be within the scope of any number + of overlapping windows. Also, changes can be made to windows in any + order, without regard to motion efficiency. Then, at will, the + programmer can effectively say ``make it look like this,'' and let the + package implementation determine the most efficient way to repaint the + screen. + + STANDARD WINDOWS AND FUNCTION NAMING CONVENTIONS + + As hinted above, the routines can use several windows, but two are + automatically given: curscr, which knows what the terminal looks like, + and stdscr, which is what the programmer wants the terminal to look + like next. The user should never actually access curscr directly. + Changes should be made to through the API, and then the routine + refresh() (or wrefresh()) called. + + Many functions are defined to use stdscr as a default screen. For + example, to add a character to stdscr, one calls addch() with the + desired character as argument. To write to a different window. use the + routine waddch() (for `w'indow-specific addch()) is provided. This + convention of prepending function names with a `w' when they are to be + applied to specific windows is consistent. The only routines which do + not follow it are those for which a window must always be specified. + + In order to move the current (y, x) coordinates from one point to + another, the routines move() and wmove() are provided. However, it is + often desirable to first move and then perform some I/O operation. In + order to avoid clumsiness, most I/O routines can be preceded by the + prefix 'mv' and the desired (y, x) coordinates prepended to the + arguments to the function. For example, the calls + + + move(y, x); + addch(ch); + + can be replaced by + + + mvaddch(y, x, ch); + + and + + + wmove(win, y, x); + waddch(win, ch); + + can be replaced by + + + mvwaddch(win, y, x, ch); + + Note that the window description pointer (win) comes before the added + (y, x) coordinates. If a function requires a window pointer, it is + always the first parameter passed. + + VARIABLES + + The curses library sets some variables describing the terminal + capabilities. + + + type name description + ------------------------------------------------------------------ + int LINES number of lines on the terminal + int COLS number of columns on the terminal + + The curses.h also introduces some #define constants and types of + general usefulness: + + bool boolean type, actually a `char' (e.g., bool doneit;) + + TRUE boolean `true' flag (1). + + FALSE boolean `false' flag (0). + + ERR error flag returned by routines on a fail (-1). + + OK error flag returned by routines when things go right. + +Using the Library + + Now we describe how to actually use the screen package. In it, we + assume all updating, reading, etc. is applied to stdscr. These + instructions will work on any window, providing you change the + function names and parameters as mentioned above. + + Here is a sample program to motivate the discussion: + + +#include +#include + +static void finish(int sig); + +main(int argc, char *argv[]) +{ + /* initialize your non-curses data structures here */ + + (void) signal(SIGINT, finish); /* arrange interrupts to terminate */ + + (void) initscr(); /* initialize the curses library */ + keypad(stdscr, TRUE); /* enable keyboard mapping */ + (void) nonl(); /* tell curses not to do NL->CR/NL on output */ + (void) cbreak(); /* take input chars one at a time, no wait for \n */ + (void) noecho(); /* don't echo input */ + + if (has_colors()) + { + start_color(); + + /* + * Simple color assignment, often all we need. + */ + init_pair(COLOR_BLACK, COLOR_BLACK, COLOR_BLACK); + init_pair(COLOR_GREEN, COLOR_GREEN, COLOR_BLACK); + init_pair(COLOR_RED, COLOR_RED, COLOR_BLACK); + init_pair(COLOR_CYAN, COLOR_CYAN, COLOR_BLACK); + init_pair(COLOR_WHITE, COLOR_WHITE, COLOR_BLACK); + init_pair(COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK); + init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLACK); + init_pair(COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK); + } + + for (;;) + { + int c = getch(); /* refresh, accept single keystroke of input */ + + /* process the command keystroke */ + } + + finish(0); /* we're done */ +} + +static void finish(int sig) +{ + endwin(); + + /* do your non-curses wrapup here */ + + exit(0); +} + + STARTING UP + + In order to use the screen package, the routines must know about + terminal characteristics, and the space for curscr and stdscr must be + allocated. These function initscr() does both these things. Since it + must allocate space for the windows, it can overflow memory when + attempting to do so. On the rare occasions this happens, initscr() + will terminate the program with an error message. initscr() must + always be called before any of the routines which affect windows are + used. If it is not, the program will core dump as soon as either + curscr or stdscr are referenced. However, it is usually best to wait + to call it until after you are sure you will need it, like after + checking for startup errors. Terminal status changing routines like + nl() and cbreak() should be called after initscr(). + + Once the screen windows have been allocated, you can set them up for + your program. If you want to, say, allow a screen to scroll, use + scrollok(). If you want the cursor to be left in place after the last + change, use leaveok(). If this isn't done, refresh() will move the + cursor to the window's current (y, x) coordinates after updating it. + + You can create new windows of your own using the functions newwin(), + derwin(), and subwin(). The routine delwin() will allow you to get rid + of old windows. All the options described above can be applied to any + window. + + OUTPUT + + Now that we have set things up, we will want to actually update the + terminal. The basic functions used to change what will go on a window + are addch() and move(). addch() adds a character at the current (y, x) + coordinates. move() changes the current (y, x) coordinates to whatever + you want them to be. It returns ERR if you try to move off the window. + As mentioned above, you can combine the two into mvaddch() to do both + things at once. + + The other output functions, such as addstr() and printw(), all call + addch() to add characters to the window. + + After you have put on the window what you want there, when you want + the portion of the terminal covered by the window to be made to look + like it, you must call refresh(). In order to optimize finding + changes, refresh() assumes that any part of the window not changed + since the last refresh() of that window has not been changed on the + terminal, i.e., that you have not refreshed a portion of the terminal + with an overlapping window. If this is not the case, the routine + touchwin() is provided to make it look like the entire window has been + changed, thus making refresh() check the whole subsection of the + terminal for changes. + + If you call wrefresh() with curscr as its argument, it will make the + screen look like curscr thinks it looks like. This is useful for + implementing a command which would redraw the screen in case it get + messed up. + + INPUT + + The complementary function to addch() is getch() which, if echo is + set, will call addch() to echo the character. Since the screen package + needs to know what is on the terminal at all times, if characters are + to be echoed, the tty must be in raw or cbreak mode. Since initially + the terminal has echoing enabled and is in ordinary ``cooked'' mode, + one or the other has to changed before calling getch(); otherwise, the + program's output will be unpredictable. + + When you need to accept line-oriented input in a window, the functions + wgetstr() and friends are available. There is even a wscanw() function + that can do scanf()(3)-style multi-field parsing on window input. + These pseudo-line-oriented functions turn on echoing while they + execute. + + The example code above uses the call keypad(stdscr, TRUE) to enable + support for function-key mapping. With this feature, the getch() code + watches the input stream for character sequences that correspond to + arrow and function keys. These sequences are returned as + pseudo-character values. The #define values returned are listed in the + curses.h The mapping from sequences to #define values is determined by + key_ capabilities in the terminal's terminfo entry. + + USING FORMS CHARACTERS + + The addch() function (and some others, including box() and border()) + can accept some pseudo-character arguments which are specially defined + by ncurses. These are #define values set up in the curses.h header; + see there for a complete list (look for the prefix ACS_). + + The most useful of the ACS defines are the forms-drawing characters. + You can use these to draw boxes and simple graphs on the screen. If + the terminal does not have such characters, curses.h will map them to + a recognizable (though ugly) set of ASCII defaults. + + CHARACTER ATTRIBUTES AND COLOR + + The ncurses package supports screen highlights including standout, + reverse-video, underline, and blink. It also supports color, which is + treated as another kind of highlight. + + Highlights are encoded, internally, as high bits of the + pseudo-character type (chtype) that curses.h uses to represent the + contents of a screen cell. See the curses.h header file for a complete + list of highlight mask values (look for the prefix A_). + + There are two ways to make highlights. One is to logical-or the value + of the highlights you want into the character argument of an addch() + call, or any other output call that takes a chtype argument. + + The other is to set the current-highlight value. This is logical-or'ed + with any highlight you specify the first way. You do this with the + functions attron(), attroff(), and attrset(); see the manual pages for + details. Color is a special kind of highlight. The package actually + thinks in terms of color pairs, combinations of foreground and + background colors. The sample code above sets up eight color pairs, + all of the guaranteed-available colors on black. Note that each color + pair is, in effect, given the name of its foreground color. Any other + range of eight non-conflicting values could have been used as the + first arguments of the init_pair() values. + + Once you've done an init_pair() that creates color-pair N, you can use + COLOR_PAIR(N) as a highlight that invokes that particular color + combination. Note that COLOR_PAIR(N), for constant N, is itself a + compile-time constant and can be used in initializers. + + MOUSE INTERFACING + + The ncurses library also provides a mouse interface. Note: his + facility is original to ncurses, it is not part of either the XSI + Curses standard, nor of System V Release 4, nor BSD curses. Thus, we + recommend that you wrap mouse-related code in an #ifdef using the + feature macro NCURSES_MOUSE_VERSION so it will not be compiled and + linked on non-ncurses systems. + + Presently, mouse event reporting works only under xterm. In the + future, ncurses will detect the presence of \fBgpm\fR(1), Alessandro + Rubini's freeware mouse server for Linux systems, and accept mouse + reports through it. + + The mouse interface is very simple. To activate it, you use the + function mousemask(), passing it as first argument a bit-mask that + specifies what kinds of events you want your program to be able to + see. It will return the bit-mask of events that actually become + visible, which may differ from the argument if the mouse device is not + capable of reporting some of the event types you specify. + + Once the mouse is active, your application's command loop should watch + for a return value of KEY_MOUSE from wgetch(). When you see this, a + mouse event report has been queued. To pick it off the queue, use the + function getmouse() (you must do this before the next wgetch(), + otherwise another mouse event might come in and make the first one + inaccessible). + + Each call to getmouse() fills a structure (the address of which you'll + pass it) with mouse event data. The event data includes zero-origin, + screen-relative character-cell coordinates of the mouse pointer. It + also includes an event mask. Bits in this mask will be set, + corresponding to the event type being reported. + + The mouse structure contains two additional fields which may be + significant in the future as ncurses interfaces to new kinds of + pointing device. In addition to x and y coordinates, there is a slot + for a z coordinate; this might be useful with touchscreens that can + return a pressure or duration parameter. There is also a device ID + field, which could be used to distinguish between multiple pointing + devices. + + The class of visible events may be changed at any time via getmouse(). + Events that can be reported include presses, releases, single-, + double- and triple-clicks (you can set the maximum button-down time + for clicks). If you don't make clicks visible, they will be reported + as press-release pairs. In some environments, the event mask may + include bits reporting the state of shift, alt, and ctrl keys on the + keyboard during the event. + + A function to check whether a mouse event fell within a given window + is also supplied. You can use this to see whether a given window + should consider a mouse event relevant to it. + + Because mouse event reporting will not be available in all + environments, it would be unwise to build ncurses applications that + _require_ the use of a mouse. Rather, you should use the mouse as a + shortcut for point-and-shoot commands your application would normally + accept from the keyboard. Two of the test games in the ncurses + distribution (bs and knight) contain code that illustrates how this + can be done. + + See the manual page curs_mouse(3X) for full details of the + mouse-interface functions. + + FINISHING UP + + In order to clean up after the ncurses routines, the routine endwin() + is provided. It restores tty modes to what they were when initscr() + was first called, and moves the cursor down to the lower-left corner. + Thus, anytime after the call to initscr, endwin() should be called + before exiting. + +Function Descriptions + + We describe the detailed behavior of some important curses functions + here, as a supplement to the manual page descriptions. + + INITIALIZATION AND WRAPUP + + initscr() + The first function called should almost always be initscr(). + This will determine the terminal type and initialize curses + data structures. initscr() also arranges that the first call to + refresh() will clear the screen. If an error occurs a message + is writen to standard error and the program exits. Otherwise it + returns a pointer to stdscr. A few functions may be called + before initscr (slk_init(), filter(), ripofflines(), use_env(), + and, if you are using multiple terminals, newterm().) + + endwin() + Your program should always call endwin() before exiting or + shelling out of the program. This function will restore tty + modes, move the cursor to the lower left corner of the screen, + reset the terminal into the proper nonvisual mode. Calling + refresh() or doupdate() after a temporary escape from the + program will restore the ncurses screen from before the escape. + + + newterm(type, ofp, ifp) + A program which outputs to more than one terminal should use + newterm() instead of initscr(). newterm() should be called once + for each terminal. It returns a variable of type SCREEN * which + should be saved as a reference to that terminal. The arguments + are the type of the terminal (a string) and FILE pointers for + the output and input of the terminal. If type is NULL then the + environment variable $TERM is used. endwin() should called once + at wrapup time for each terminal opened using this function. + + set_term(new) + This function is used to switch to a different terminal + previously opened by newterm(). The screen reference for the + new terminal is passed as the parameter. The previous terminal + is returned by the function. All other calls affect only the + current terminal. + + delscreen(sp) + The inverse of newterm(); deallocates the data structures + associated with a given SCREEN reference. + + CAUSING OUTPUT TO THE TERMINAL + + refresh() and wrefresh(win) + These functions must be called to actually get any output on + the terminal, as other routines merely manipulate data + structures. wrefresh() copies the named window to the physi- + cal terminal screen, taking into account what is already there + in order to do optimizations. refresh() does a refresh of + stdscr(). Unless leaveok() has been enabled, the physical + cursor of the terminal is left at the location of the window's + cursor. + + doupdate() and wnoutrefresh(win) + These two functions allow multiple updates with more efficiency + than wrefresh. To use them, it is important to understand how + curses works. In addition to all the window structures, curses + keeps two data structures representing the terminal screen: a + physical screen, describing what is actually on the screen, and + a virtual screen, describing what the programmer wants to have + on the screen. wrefresh works by first copying the named window + to the virtual screen (wnoutrefresh()), and then calling the + routine to update the screen (doupdate()). If the programmer + wishes to output several windows at once, a series of calls to + wre- fresh will result in alternating calls to wnoutrefresh() + and doupdate(), causing several bursts of output to the screen. + By calling wnoutrefresh() for each window, it is then possible + to call doupdate() once, resulting in only one burst of output, + with probably fewer total characters transmitted. + + LOW-LEVEL CAPABILITY ACCESS + + setupterm(term, filenum, errret) This routine is called to initialize + a terminal's description, without setting up the curses screen + structures or changing the tty-driver mode bits. term is the + character string representing the name of the terminal being + used. filenum is the UNIX file descriptor of the ter- minal to + be used for output. errret is a pointer to an integer, in which + a success or failure indication is returned. The values + returned can be 1 (all is well), 0 (no such terminal), or -1 + (some problem locating the terminfo database). + + The value of term can be given as NULL, which will cause the + value of TERM in the environment to be used. The errret pointer + can also be given as NULL, meaning no error code is wanted. If + errret is defaulted, and something goes wrong, setupterm() will + print an appropriate error message and exit, rather than + returning. Thus, a simple program can call setupterm(0, 1, 0) + and not worry about initialization errors. + + After the call to setupterm(), the global variable cur_term is + set to point to the current structure of terminal capabilities. + By calling setupterm() for each terminal, and saving and + restoring cur_term, it is possible for a program to use two or + more terminals at once. Setupterm() also stores the names + section of the terminal description in the global character + array ttytype[]. Subsequent calls to setupterm() will overwrite + this array, so you'll have to save it yourself if need be. + + + DEBUGGING + + _tracef() + NOTE: THIS FUNCTION IS NOT PART OF THE STANDARD CURSES API! + This function can be used to output your own debugging + information. It is only available only if you link with + -lncurses_g. It can be used the same way as printf(), only it + outputs a newline after the end of arguments. The output goes + to a file called trace in the current directory. + + Trace logs can be difficult to interpret due to the sheer volume of + data dumped in them. There is a script called _tracemunch_ included + with the ncurses distribution that can alleviate this problem + somewhat; it compacts long sequences of similar operations into more + succinct single-line pseudo-operations. These pseudo-ops can be + distinguished by the fact that they are named in capital letters. + +Hints, Tips, and Tricks + + The ncurses manual pages are a complete reference for this library. In + the remainder of this document, we discuss various useful methods that + may not be obvious from the manual page descriptions. + + SOME NOTES OF CAUTION + + If you find yourself thinking you need to use noraw() or nocbreak(), + think again and move carefully. It's probably better design to use + getstr() or one of its relatives to simulate cooked mode. The noraw() + and nocbreak() functions try to restore cooked mode, but they may end + up clobbering some control bits set before you started your + application. Also, they have always been poorly documented, and are + likely to hurt your application's usability with other curses + libraries. + + Bear in mind that refresh() is a synonym for wrefresh(stdscr), and + don't try to mix use of stdscr with use of windows declared by + newwin(); a refresh() call will blow them off the screen. The right + way to handle this is to use subwin(), or not touch stdscr at all and + tile your screen with declared windows which you then wnoutrefresh() + somewhere in your program event loop, with a single doupdate() call to + trigger actual repainting. + + You are much less likely to run into problems if you design your + screen layouts to use tiled rather than overlapping windows. + Historically, curses support for overlapping windows has been weak, + fragile, and poorly documented. The ncurses library is not yet an + exception to this rule. + + There is a freeware panels library included in the ncurses + distribution that does a pretty good job of strengthening the + overlapping-windows facilities. + + Try to avoid using the global variables LINES and COLS. Use getmaxyx() + on the stdscr context instead. Reason: your code may be ported to run + in an environment with window resizes, in which case several screens + could be open with different sizes. + + TEMPORARILY LEAVING NCURSES MODE + + Sometimes you will want to write a program that spends most of its + time in screen mode, but occasionally returns to ordinary `cooked' + mode. A common reason for this is to support shell-out. This behavior + is simple to arrange in ncurses. + + To leave ncurses mode, call endwin() as you would if you were + intending to terminate the program. This will take the screen back to + cooked mode; you can do your shell-out. When you want to return to + ncurses mode, simply call refresh() or doupdate(). This will repaint + the screen. + + There is a boolean function, isendwin(), which code can use to test + whether ncurses screen mode is active. It returns TRUE in the interval + between an endwin() call and the following refresh(), FALSE otherwise. + + + Here is some sample code for shellout: + + + addstr("Shelling out..."); + def_prog_mode(); /* save current tty modes */ + endwin(); /* restore original tty modes */ + system("sh"); /* run shell */ + addstr("returned.\n"); /* prepare return message */ + refresh(); /* restore save modes, repaint screen */ + + USING NCURSES UNDER XTERM + + A resize operation in X sends SIGWINCH to the application running + under xterm. The ncurses library does not catch this signal, because + it cannot in general know how you want the screen re-painted. You will + have to write the SIGWINCH handler yourself. + + The easiest way to code your SIGWINCH handler is to have it do an + endwin, followed by an initscr and a screen repaint you code yourself. + The initscr will pick up the new screen size from the xterm's + environment. + + HANDLING MULTIPLE TERMINAL SCREENS + + The initscr() function actually calls a function named newterm() to do + most of its work. If you are writing a program that opens multiple + terminals, use newterm() directly. + + For each call, you will have to specify a terminal type and a pair of + file pointers; each call will return a screen reference, and stdscr + will be set to the last one allocated. You will switch between screens + with the set_term call. Note that you will also have to call + def_shell_mode and def_prog_mode on each tty yourself. + + TESTING FOR TERMINAL CAPABILITIES + + Sometimes you may want to write programs that test for the presence of + various capabilities before deciding whether to go into ncurses mode. + An easy way to do this is to call setupterm(), then use the functions + tigetflag(), tigetnum(), and tigetstr() to do your testing. + + A particularly useful case of this often comes up when you want to + test whether a given terminal type should be treated as `smart' + (cursor-addressable) or `stupid'. The right way to test this is to see + if the return value of tigetstr("cup") is non-NULL. Alternatively, you + can include the term.h file and test the value of the macro + cursor_address. + + TUNING FOR SPEED + + Use the addchstr() family of functions for fast screen-painting of + text when you know the text doesn't contain any control characters. + Try to make attribute changes infrequent on your screens. Don't use + the immedok() option! + + SPECIAL FEATURES OF NCURSES + + When running on PC-clones, ncurses has enhanced support for the IBM + high-half and ROM characters. The A_ALTCHARSET highlight, enables + display of both high-half ACS graphics and the PC ROM graphics 0-31 + that are normally interpreted as control characters. + + THE PANELS LIBRARY + + The ncurses library by itself provides good support for screen + displays in which the windows are tiled (non-overlapping). In the more + general case that windows may overlap, you have to use a series of + wnoutrefresh() calls followd by a doupdate(), and be careful about the + order you do the window refreshes in. It has to be bottom-upwards, + otherwise parts of windows that should be obscured will show through. + + When your interface design is such that windows may dive deeper into + the visibility stack or pop to the top at runtime, the resulting + book-keeping can be tedious and difficult to get right. Hence the + panels library. + + The panel library first appeared in AT&T System V. The version + documented here is the freeware panel code distributed with ncurses. + +Compiling With the Panels Library + + Your panels-using modules must import the panels library declarations + with + + + #include + + and must be linked explicitly with the panels library using an -lpanel + argument. Note that they must also link the ncurses library with + -lncurses. Most modern linkers are two-pass and will accept either + order, but it is still good practice to put -lpanel first and + -lncurses second. + +Overview of Panels + + A panel object is a window that is implicitly treated as part of a + deck including all other panel objects. The deck has an implicit + bottom-to-top visibility order. The panels library includes an update + function (analogous to refresh()) that displays all panels in the deck + in the proper order to resolve overlaps. The standard window, stdscr, + is considered below all panels. + + Details on the panels functions are available in the man pages. We'll + just hit the highlights here. + + You create a panel from a window by calling new_panel() on a window + pointer. It then becomes the top of the deck. The panel's window is + available as the value of pnel_windo() called with the panel pointer + as argument. + + You can delete a panel (removing it from the deck) with del_panel. + This will not deallocate the associated window; you have to do that + yourself. You can replace a panel's window with a different window by + calling replace_window. The new window may be of different size; the + panel code will re-compute all overlaps. This operation doesn't change + the panel's position in the deck. + + To move a panel's window, use move_panel(). The mvwin() function on + the panel's window isn't sufficient because it doesn't update the + panels library's representation of where the windows are. This + operation leaves the panel's depth, contents, and size unchanged. + + Two functions (top_panel(), bottom_panel()) are provided for + rearranging the deck. The first pops its argument window to the top of + the deck; the second sends it to the bottom. Either operation leaves + the panel's screen location, contents, and size unchanged. + + The function update_panels() does all the wnoutrefresh() calls needed + to prepare for doupdate() (which you must call yourself, afterwards). + +Panels, Input, and the Standard Screen + + You shouldn't mix wnoutrefresh() or wrefresh() operations with panels + code; this will work only if the argument window is either in the top + panel or un-obscured by any other panels. + + The stsdcr window is a special case. It is considered below all + panels. Because changes to panels may obscure parts of stdscr, though, + you should call update_panels() before doupdate() even when you only + change stdscr. + + Note that wgetch automatically calls wrefresh. Therefore, before + requesting input from a panel window, you need to be sure that the + panel is totally unobscured. + + There is presently no way to display changes to one obscured panel + without repainting all panels. + +Hiding Panels + + It's possible to remove a panel from the deck temporarily; use + hide_panel for this. You can un-hide a panel with show_panel(). The + predicate function panel_hidden tests whether or not a panel is + hidden. + + The panel_update code ignores hidden panels. You cannot do top_panel() + or bottom_panel on a hiddlen panel(). Other panels operations are + applicable. + +Miscellaneous Other Facilities + + It's possible to navigate the deck using the functions panel_above() + and panel_below. Handed a panel pointer, they return the panel above + or below that panel. Handed NULL, they return the bottom-most or + top-most panel. + + Every panel has an associated user pointer, not used by the panel + code, to whicch you can attach application data. See the man page + documentation of set_panel_userptr() and panel_userptr for details. + + THE MENU LIBRARY + + A menu is a screen display that assists the user to choose some subset + of a given set of items. The menu library is a curses extension that + supports easy programming of menu hierarchies with a uniform but + flexible interface. + + The menu library first appeared in AT&T System V. The version + documented here is the freeware menu code distributed with ncurses. + +Compiling With the menu Library + + Your menu-using modules must import the menu library declarations with + + + #include + + and must be linked explicitly with the menus library using an -lmenu + argument. Note that they must also link the ncurses library with + -lncurses. Most modern linkers are two-pass and will accept either + order, but it is still good practice to put -lmenu first and -lncurses + second. + +Overview of Menus + + The menus created by this library consist of collections of items + including a name string part and a description string part. To make + menus, you create groups of these items and connect them with menu + frame objects. + + The menu can then by posted, that is written to an associated window. + Actually, each menu has two associated windows; a containing window in + which the programmer can scribble titles or borders, and a subwindow + in which the menu items proper are displayed. If this subwindow is too + small to display all the items, it will be a scrollable viewport on + the collection of items. + + A menu may also be unposted (that is, undisplayed), and finally freed + to make the storage associated with it and its items available for + re-use. + + The general flow of control of a menu program looks like this: + 1. Initialize curses. + 2. Create the menu items, using new_item(). + 3. Create the menu using new_menu(). + 4. Post the menu using menu_post(). + 5. Refresh the screen. + 6. Process user requests via an input loop. + 7. Unpost the menu using menu_unpost(). + 8. Free the menu, using free_menu(). + 9. Free the items using free_item(). + 10. Terminate curses. + +Selecting items + + Menus may be multi-valued or (the default) single-valued (see the + manual page mitem_opts(3x) to see how to change the default). Both + types always have a current item. + + From a single-valued menu you can read the selected value simply by + looking at the current item. From a multi-valued menu, you get the + selected set by looping through the items applying the item_value() + predicate function. Your menu-processing code can use the function + set_item_value() to flag the items in the select set. + + Menu items can be made un-selectable using set_item_opts() or + item_opts_off() with the O_SELECTABLE argument. This is the only + option so far defined for menus, but it is good practice to code as + though other option bits might be on. + +Menu Display + + The menu library calculates a minimum display size for your window, + based on the following variables: + + * The number and maximum length of the menu items + * Whether the O_ROWMAJOR option is enabled + * Whether display of descriptions is enabled + * Whatever menu format may have been set by the programmer + * The length of the menu mark string used for highlighting selected + items + + The function set_menu_format() allows you to set the maximum size of + the viewport or menu page that will be used to display menu items. You + can retrieve any format associated with a menu with menu_format(). The + default format is rows=16, columns=1. + + The actual menu page may be smaller than the format size. This depends + on the item number and size and whether O_ROWMAJOR is on. This option + (on by default) causes menu items to be displayed in a `raster-scan' + pattern, so that if more than one item will fit horizontally the first + couple of items are side-by-side in the top row. The alternative is + column-major display, which tries to put the first several items in + the first column. + + As mentioned above, a menu format not large enough to allow all items + to fit on-screen will result in a menu display that is vertically + scrollable. + + You can scroll it with requests to the menu driver, which will be + described in the section on menu input handling. + + Each menu has a mark string used to visually tag selected items; see + the menu_mark(3x) manual page for details. The mark string length also + influences the menu page size. + + The function scale_menu() returns the minimum display size that the + menu code computes from all these factors. There are other menu + display attributes including a select attribute, an attribute for + selectable items, an attribute for unselectable items, and a pad + character used to separate item name text from description text. These + have reasonable defaults which the library allows you to change (see + the menu_attribs(3x)manual page. + +Menu Windows + + Each menu has, as mentioned previously, a pair of associated windows. + Both these windows are painted when the menu is posted and erased when + the menu is unposted. + + The outer or frame window is not otherwise touched by the menu + routines. It exists so the programmer can associate a title, a border, + or perhaps help text with the menu and have it properly refreshed or + erased at post/unpost time. The inner window or subwindow is where the + current menu page is displayed. + + By default, both windows are stdscr. You can set them with the + functions in menu_win(3x). + + When you call menu_post(), you write the menu to its subwindow. When + you call menu_unpost(), you erase the subwindow, However, neither of + these actually modifies the screen. To do that, call wrefresh() or + some equivalent. + +Processing Menu Input + + The main loop of your menu-processing code should call menu_driver() + repeatedly. The first argument of this routine is a menu pointer; the + second is a menu command code. You should write an input-fetching + routine that maps input characters to menu command codes, and pass its + output to menu_driver(). The menu command codes are fully documented + in menu_driver(3x). + + The simplest group of command codes is REQ_NEXT_ITEM, REQ_PREV_ITEM, + REQ_FIRST_ITEM, REQ_LAST_ITEM, REQ_UP_ITEM, REQ_DOWN_ITEM, + REQ_LEFT_ITEM, REQ_RIGHT_ITEM. These change the currently selected + item. These requests may cause scrolling of the menu page if it only + partially displayed. + + There are explicit requests for scrolling which also change the + current item (because the select location does not change, but the + item there does). These are REQ_SCR_DLINE, REQ_SCR_ULINE, + REQ_SCR_DPAGE, and REQ_SCR_UPAGE. + + The REQ_TOGGLE_ITEM selects or deselects the current item. It is for + use in multi-valued menus; if you use it with O_ONEVALUE on, you'll + get an error return (E_REQUEST_DENIED). + + Each menu has an associated pattern buffer. The menu_driver() logic + tries to accumulate printable ASCII characters passed in in that + buffer; when it matches a prefix of an item name, that item (or the + next matching item) is selected. If apopending a character yields no + new match, that character is deleted from the pattern buffer, and + menu_driver() returns E_NO_MATCH. + + Some requests change the pattern buffer directly: REQ_CLEAR_PATTERN, + REQ_BACK_PATTERN, REQ_NEXT_MATCH, REQ_PREV_MATCH. The latter two are + useful when pattern buffer input matches more than one item in a + multi-valued menu. + + Each successful scroll or item navigation request clears the pattern + buffer. It is also possible to set the pattern buffer explicitly with + set_menu_pattern(). + + Finally, menu driver requests above the constant MAX_COMMAND are + considered application-specific commands. The menu_driver() code + ignores them and returns E_UNKNOWN_COMMAND. + +Miscellaneous Other Features + + Various menu options can affect the processing and visual appearance + and input processing of menus. See menu_opts(3x) for details. + + It is possible to change the current item from application code; this + is useful if you want to write your own navigation requests. It is + also possible to explicitly set the top row of the menu display. See + mitem_current(3x). If your application needs to change the menu + subwindow cursor for any reason, pos_menu_cursor() will restore it to + the correct location for continuing menu driver processing. + + It is possible to set hooks to be called at menu initialization and + wrapup time, and whenever the selected item changes. See + menu_hook(3x). + + Each item, and each menu, has an associated user pointer on which you + can hang application data. See mitem_userptr(3x) and menu_userptr(3x). + + + THE FORMS LIBRARY + + The form library is a curses extension that supports easy programming + of on-screen forms for data entry and program control. + + The form library first appeared in AT&T System V. The version + documented here is the freeware form code distributed with ncurses. + +Compiling With the form Library + + Your form-using modules must import the form library declarations with + + + #include + + and must be linked explicitly with the forms library using an -lform + argument. Note that they must also link the ncurses library with + -lncurses. Most modern linkers are two-pass and will accept either + order, but it is still good practice to put -lform first and -lncurses + second. + +Overview of Forms + + A form is a collection of fields; each field may be either a label + (explanatory text) or a data-entry location. Long forms may be + segmented into pages; each entry to a new page clears the screen. + + To make forms, you create groups of fields and connect them with form + frame objects; the form library makes this relatively simple. + + Once defined, a form can be posted, that is written to an associated + window. Actually, each form has two associated windows; a containing + window in which the programmer can scribble titles or borders, and a + subwindow in which the form fields proper are displayed. + + As the form user fills out the posted form, navigation and editing + keys support movement between fields, editing keys support modifying + field, and plain text adds to or changes data in a current field. The + form library allows you (the forms designer) to bind each navigation + and editing key to any keystroke accepted by curses Fields may have + validation conditions on them, so that they check input data for type + and value. The form library supplies a rich set of pre-defined field + types, and makes it relatively easy to define new ones. + + Once its transaction is completed (or aborted), a form may be unposted + (that is, undisplayed), and finally freed to make the storage + associated with it and its items available for re-use. + + The general flow of control of a form program looks like this: + 1. Initialize curses. + 2. Create the form fields, using new_field(). + 3. Create the form using new_form(). + 4. Post the form using form_post(). + 5. Refresh the screen. + 6. Process user requests via an input loop. + 7. Unpost the form using form_unpost(). + 8. Free the form, using free_form(). + 9. Free the fields using free_field(). + 10. Terminate curses. + + Note that this looks much like a menu program; the form library + handles tasks which are in many ways similar, and its interface was + obviously designed to resemble that of the menu library wherever + possible. + + In forms programs, however, the `process user requests' is somewhat + more complicated than for menus. Besides menu-like navigation + operations, the menu driver loop has to support field editing and data + validation. + +Creating and Freeing Fields and Forms + + The basic function for creating fields is new_field(): + + +FIELD *new_field(int height, int width, /* new field size */ + int top, int left, /* upper left corner */ + int offscreen, /* number of offscreen rows */ + int nbuf); /* number of working buffers */ + + Menu items always occupy a single row, but forms fields may have + multiple rows. So new_field() requires you to specify a width and + height (the first two arguments, which mist both be greater than + zero). + + You must also specify the location of the field's upper left corner on + the screen (the third and fourth arguments, which must be zero or + greater). Note that these coordinates are relative to the form + subwindow, which will coincide with stdscr by default but need not be + stdscr if you've done an explicit set_form_window() call. + + The fifth argument allows you to specify a number of offscreen rows. + If this is zero, the entire field will always be displayed. If it is + nonzero, the form will be scrollable, with only one screen-full + (initially the top part) displayed at any given time. If you make a + field dynamic and grow it so it will no longer fit on the screen, the + form will become scrollable even if the \fBoffscreen\fR argument was + initially zero. + + The forms library allocates one working buffer per field; the size of + each buffer is ((height + offscreen)*width + 1, one character for each + position in the field plus a NUL terminator. The sixth argument is the + number of additional data buffers to allocate for the field; your + application can use them for its own purposes. + + +FIELD *dup_field(FIELD *field, /* field to copy */ + int top, int left); /* location of new copy */ + + The function dup_field() duplicates an existing field at a new + location. Size and buffering information are copied; some attribute + flags and status bits are not (see the form_field_new(3X) for + details). + + +FIELD *link_field(FIELD *field, /* field to copy */ + int top, int left); /* location of new copy */ + + The function link_field() also duplicates an existing field at a new + location. The difference from dup_field() is that it arranges for the + new field's buffer to be shared with the old one. + + Besides the obvious use in making a field editable from two different + form pages, linked fields give you a way to hack in dynamic labels. If + you declare several fields linked to an original, and then make them + inactive, changes from the original will still be propagated to the + linked fields. + + As with duplicated fields, linked fields have attribute bits separate + from the original. + + As you might guess, all these field-allocations return NULL if the + field allocation is not possible due to an out-of-memory error or + out-of-bounds arguments. + + To connect fields to a form, use + + +FORM *new_form(FIELD **fields); + + This function expects to see a NULL-terminated array of field + pointers. Said fields are connected to a newly-allocated form object; + its address is returned (or else NULL if the allocation fails). + + Note that new_field() does _not_ copy the pointer array into private + storage; if you modify the contents of the pointer array during forms + processing, all manner of bizarre things might happen. Also note that + any given field may only be connected to one form. + + The functions free_field() and free_form are available to free field + and form objects. It is an error to attempt to free a field connected + to a form, but not vice-versa; thus, you will generally free your form + objects first. + +Fetching and Changing Field Attributes + + Each form field has a number of location and size attributes + associated with it. There are other field attributes used to control + display and editing of the field. Some (for example, the + \fBO_STATIC\fR bit) involve sufficent complications to be covered in + sections of their own later on. We cover the functions used to get and + set several basic attributes here. + + When a field is created, the attributes not specified by the new_field + function are copied from an invisible system default field. In + attribute-setting and -fetching functions, the argument NULL is taken + to mean this field. Changes to it persist as defaults until your forms + application terminates. + + FETCHING SIZE AND LOCATION DATA + + You can retrieve field sizes and locations through: + + +int field_info(FIELD *field, /* field from which to fetch */ + int *height, *int width, /* field size */ + int *top, int *left, /* upper left corner */ + int *offscreen, /* number of offscreen rows */ + int *nbuf); /* number of working buffers */ + + This function is a sort of inverse of new_field(); instead of setting + size and location attributes of a new field, it fetches them from an + existing one. + + CHANGING THE FIELD LOCATION + + If is possible to move a field's location on the screen: + + +int move_field(FIELD *field, /* field to alter */ + int top, int left); /* new upper-left corner */ + + You can, of course. query the current location through field_info(). + + THE JUSTIFICATION ATTRIBUTE + + One-line fields may be unjustified, justified right, justified left, + or centered. Here is how you manipulate this attribute: + + +int set_field_just(FIELD *field, /* field to alter */ + int justmode); /* mode to set */ + +int field_just(FIELD *field); /* fetch mode of field */ + + The mode values accepted and returned by this functions are + preprocessor macros NO_JUSTIFICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or + JUSTIFY_CENTER. + + FIELD DISPLAY ATTRIBUTES + + For each field, you can set a foreground attribute for entered + characters, a background attribute for the entire field, and a pad + character for the unfilled portion of the field. You can also control + pagination of the form. + + This group of four field attributes controls the visual appearance of + the field on the screen, without affecting in any way the data in the + field buffer. + + +int set_field_fore(FIELD *field, /* field to alter */ + chtype attr); /* attribute to set */ + +chtype field_fore(FIELD *field); /* field to query */ + +int set_field_back(FIELD *field, /* field to alter */ + chtype attr); /* attribute to set */ + +chtype field_back(FIELD *field); /* field to query */ + +int set_field_pad(FIELD *field, /* field to alter */ + int pad); /* pad character to set */ + +chtype field_pad(FIELD *field); + +int set_new_page(FIELD *field, /* field to alter */ + int flag); /* TRUE to force new page */ + +chtype new_page(FIELD *field); /* field to query */ + + The attributes set and returned by the first four functions are normal + curses(3x) display attribute values (A_STANDOUT, A_BOLD, A_REVERSE + etc). The page bit of a field controls whether it is displayed at the + start of a new form screen. + + FIELD OPTION BITS + + There is also a large collection of field option bits you can set to + control various aspects of forms processing. You can manipulate them + with these functions: + + +int set_field_opts(FIELD *field, /* field to alter */ + int attr); /* attribute to set */ + +int field_opts_on(FIELD *field, /* field to alter */ + int attr); /* attributes to turn on */ + +int field_opts_off(FIELD *field, /* field to alter */ + int attr); /* attributes to turn off */ + +int field_opts(FIELD *field); /* field to query */ + + By default, all options are on. Here are the available option bits: + + O_VISIBLE + Controls whether the field is visible on the screen. Can be + used during form processing to hide or pop up fields depending + on the value of parent fields. + + O_ACTIVE + Controls whether the field is active during forms processing + (i.e. visited by form navigation keys). Can be used to make + labels or derived fields with buffer values alterable by the + forms application, not the user. + + O_PUBLIC + Controls whether data is displayed during field entry. If this + option is turned off on a field, the library will accept and + edit data in that field, but it will not be displayed and the + visible field cursor will not move. You can turn off the + O_PUBLIC bit to define password fields. + + O_EDIT + Controls whether the field's data can be modified. When this + option is off, all editing requests except REQ_PREV_CHOICE and + REQ_NEXT_CHOICEwill fail. Such read-only fields may be useful + for help messages. + + O_WRAP + Controls word-wrapping in multi-line fields. Normally, when any + character of a (blank-separated) word reaches the end of the + current line, the entire word is wrapped to the next line + (assuming there is one). When this option is off, the word will + be split across the line break. + + O_BLANK + Controls field blanking. When this option is on, entering a + character at the first field position erases the entire field + (except for the just-entered character). + + O_AUTOSKIP + Controls automatic skip to next field when this one fills. + Normally, when the forms user tries to type more data into a + field than will fit, the editing location jumps to next field. + When this option is off, the user's cursor will hang at the end + of the field. This option is ignored in dynamic fields that + have not reached their size limit. + + O_NULLOK + Controls whether validation is applied to blank fields. + Normally, it is not; the user can leave a field blank without + invoking the usual validation check on exit. If this option is + off on a field, exit from it will invoke a validation check. + + O_PASSOK + Controls whether validation occurs on every exit, or only after + the field is modified. Normally the latter is true. Setting + O_PASSOK may be useful if your field's validation function may + change during forms processing. + + O_STATIC + Controls whether the field is fixed to its initial dimensions. + If you turn this off, the field becomes dynamic and will + stretch to fit entered data. + + A field's options cannot be changed while the field is currently + selected. However, options may be changed on posted fields that are + not current. + + The option values are bit-masks and can be composed with logical-or in + the obvious way. + +Field Status + + Every field has a status flag, which is set to FALSE when the field is + creaated and TRUE when the value in field buffer 0 changes. This flag + can be queried and set directly: + + +int set_field_status(FIELD *field, /* field to alter */ + int status); /* mode to set */ + +int field_status(FIELD *field); /* fetch mode of field */ + + Setting this flag under program control can be useful if you use the + same form repeatedly, looking for modified fields each time. + + Calling field_status() on a field not currently selected for input + will return a corret value. Calling field_status() on a field that is + currently selected for input may not necessarily give a correct field + status value, because entered data isn't necessarily copied to buffer + zero before the exit validation check. To guarantee that the returned + status value reflects reality, call field_status() either (1) in the + field's exit validation check routine, (2) from the field's or form's + initialization or termination hooks, or (3) just after a + REQ_VALIDATION request has been processed by the forms driver. + +Field User Pointer + + Each field structure contains one character pointer slot that is not + used by the forms library. It is intended to be used by applications + to store private per-field data. You can manipulate it with: + + +int set_field_userptr(FIELD *field, /* field to alter */ + char *userptr); /* mode to set */ + +char *field_userptr(FIELD *field); /* fetch mode of field */ + + (Properly, this user pointer field ought to have (void *) type. The + (char *) type is retained for System V compatibility.) + + It is valid to set the user pointer of the default field (with a + set_field_userptr() call passed a NULL field pointer.) When a new + field is created, the default-field user pointer is copied to + initialize the new field's user pointer. + +Variable-Sized Fields + + Normally, a field is fixed at the size specfied for it at cereation + time. If, however, you turn off its O_STATIC bit, it becomes dynamic + and will automatically resize itself to accommodate data as it is + entered. If the field has extra buffers associated with it, they will + grow right along with the main input buffer. + + A one-line dynamic field will have a fixed height (1) but variable + width, scrolling horizontally to display data within the field area as + originally dimensioned and located. A multiline dynamic field will + have a fixed width, but variable height (number of rows), scrolling + vertically to display data within the field area as originally + dimensioned and located. + + Normally, a dynamic field is allowed to grow without limit. But it is + possible to set an upper limit on the size of a dynamic field. You do + it with this function: + + +int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ + int max_size); /* upper limit on field size */ + + If the field is one-line, max_size is taken to be a column size limit; + if it is multi-line, it is taken to be a line size limit. To disable + any limit, use an argument of zero. The growth limit can be changed + whether or not the O_STATIC bit is on, but has no effect until it is. + + The following properties of a field change when it becomes dynamic: + * If there is no growth limit, there is no final position of the + field; therefore O_AUTOSKIP and O_NL_OVERLOAD are ignored. + * Field justification will be ignored (though whatever justification + is set up will be retained internally and can be queried). + * The dup_field() and link_field() calls copy dynamic-buffer sizes. + If the O_STATIC option is set on one of a collection of links, + buffer resizing will occur only when the field is edited through + that link. + * The call field_info() will retrieve the original static size of + the field; use dynamic_field_info() to get the actual dynamic + size. + +Field Validation + + By default, a field will accept any data that will fit in its input + buffer. However, it is possible to attach a validation type to a + field. If you do this, any attempt to leave the field while it + contains data that doesn't match the validation type will fail. Some + validation types also have a character-validity check for each time a + character is entered in the field. + + A field's validation check (if any) is not called when + set_field_buffer() modifies the input buffer, nor when that buffer is + changed through a linked field. + + The form library provides a rich set of pre-defined validation types, + and gives you the capability to define custom ones of your own. You + can examine and change field validation attributes with the following + functions: + + +int set_field_type(FIELD *field, /* field to alter */ + FIELDTYPE *ftype, /* type to associate */ + ...); /* additional arguments*/ + +FIELDTYPE *field_type(FIELD *field); /* field to query */ + + The validation type of a field is considered an attribute of the + field. As with other field attributes, Also, doing set_field_type() + with a NULL field default will change the system default for + validation of newly-created fields. + + Here are the pre-defined validation types: + + TYPE_ALPHA + + This field type accepts alphabetic data; no blanks, no digits, no + special characters (this is checked at character-entry time). It is + set up with: + + +int set_field_type(FIELD *field, /* field to alter */ + TYPE_ALPHA, /* type to associate */ + int width); /* maximum width of field */ + + The width argument sets a minimum width of data. Typically you'll want + to set this to the field width; if it's greater than the field width, + the validation check will always fail. A minimum width of zero makes + field completion optional. + + TYPE_ALNUM + + This field type accepts alphabetic data and digits; no blanks, no + special characters (this is checked at character-entry time). It is + set up with: + + +int set_field_type(FIELD *field, /* field to alter */ + TYPE_ALNUM, /* type to associate */ + int width); /* maximum width of field */ + + The width argument sets a minimum width of data. As with TYPE_ALPHA, + typically you'll want to set this to the field width; if it's greater + than the field width, the validation check will always fail. A minimum + width of zero makes field completion optional. + + TYPE_ENUM + + This type allows you to restrict a field's values to be among a + specified set of string values (for example, the two-letter postal + codes for U.S. states). It is set up with: + + +int set_field_type(FIELD *field, /* field to alter */ + TYPE_ENUM, /* type to associate */ + char **valuelist; /* list of possible values */ + int checkcase; /* case-sensitive? */ + int checkunique); /* must specify uniquely? */ + + The valuelist parameter must point at a NULL-terminated list of valid + strings. The checkcase argument, if true, makes comparison with the + string case-sensitive. + + When the user exits a TYPE_ENUM field, the validation procedure tries + to complete the data in the buffer to a valid entry. If a complete + choice string has been entered, it is of course valid. But it is also + possible to enter a prefix of a valid string and have it completed for + you. + + By default, if you enter such a prefix and it matches more than one + value in the string list, the prefix will be completed to the first + matching value. But the checkunique argument, if true, requires prefix + matches to be unique in order to be valid. + + The REQ_NEXT_CHOICE and REQ_PREV_CHOICE input requests can be + particularly useful with these fields. + + TYPE_INTEGER + + This field type accepts an integer. It is set up as follows: + + +int set_field_type(FIELD *field, /* field to alter */ + TYPE_INTEGER, /* type to associate */ + int padding, /* # places to zero-pad to */ + int vmin, int vmax); /* valid range */ + + Valid characters consist of an optional leading minus and digits. The + range check is performed on exit. If the range maximum is less than or + equal to the minimum, the range is ignored. + + If the value passes its range check, it is padded with as many leading + zero digits as necessary to meet the padding argument. + + A TYPE_INTEGER value buffer can conveniently be interpreted with the C + library function atoi(3). + + TYPE_NUMERIC + + This field type accepts a decimal number. It is set up as follows: + + +int set_field_type(FIELD *field, /* field to alter */ + TYPE_NUMERIC, /* type to associate */ + int padding, /* # places of precision */ + int vmin, int vmax); /* valid range */ + + Valid characters consist of an optional leading minus and digits. + possibly including a decimal point. The range check is performed on + exit. If the range maximum is less than or equal to the minimum, the + range is ignored. + + If the value passes its range check, it is padded with as many + trailing zero digits as necessary to meet the padding argument. + + A TYPE_NUMERIC value buffer can conveniently be interpreted with the C + library function atof(3). + + TYPE_REGEXP + + This field type accepts data matching a regular expression. It is set + up as follows: + + +int set_field_type(FIELD *field, /* field to alter */ + TYPE_REGEXP, /* type to associate */ + char *regexp); /* expression to match */ + + The syntax for regular expressions is that of regcomp(3). The check + for regular-expression match is performed on exit. + +Direct Field Buffer Manipulation + + The most central attribute of a field is its buffer contents. When a + form has been completed, your application usually needs to know the + state of each field buffer. You can find this out with: + + +char *field_buffer(FIELD *field, /* field to query */ + int bufindex); /* number of buffer to query */ + + Normally, the state of the zero-numbered buffer for each field is set + by the user's editing actions on that field. It's sometimes useful to + be able to set the value of the zero-numbered (or some other) buffer + from your application: + + +int set_field_buffer(FIELD *field, /* field to alter */ + int bufindex, /* number of buffer to alter */ + char *value); /* string value to set */ + + If the field is not large enough and cannot be resized to a + sufficiently large size to contain the specified value, the value will + be truncated to fit. + + Calling field_buffer() with a null field pointer will raise an error. + Calling field_buffer() on a field not currently selected for input + will return a corret value. Calling field_buffer() on a field that is + currently selected for input may not necessarily give a correct field + buffer value, because entered data isn't necessarily copied to buffer + zero before the exit validation check. To guarantee that the returned + buffer value reflects on-screen reality, call field_buffer() either + (1) in the field's exit validation check routine, (2) from the field's + or form's initialization or termination hooks, or (3) just after a + REQ_VALIDATION request has been processed by the forms driver. + +Attributes of Forms + + As with field attributes, form attributes inherit a default from a + system default form structure. These defaults can be queried or set by + of these functions using a form-pointer argument of NULL. + + The most important attribute of a form is its field list. You can + query and change this list with: + + +int set_form_fields(FORM *form, /* form to alter */ + FIELD **fields); /* fields to connect */ + +char *form_fields(FORM *form); /* fetch fields of form */ + +int field_count(FORM *form); /* count connect fields */ + + The second argument of set_form_fields() may be a NULL-terminated + field pointer array like the one required by new_form(). In that case, + the old fields of the form are disconnected but not freed (and + eligible to be connected to other forms), then the new fields are + connected. + + It may also be null, in which case the old fields are disconnected + (and not freed) but no new ones are connected. + + The field_count() function simply counts the number of fields + connected to a given from. It returns -1 if the form-pointer argument + is NULL. + +Control of Form Display + + In the overview section, you saw that to display a form you normally + start by definining its size (and fields), posting it, and refreshing + the screen. There is an hidden step before posting, which is the + association of the form with a frame window (actually, a pair of + windows) within which it will be displayed. By default, the forms + library associates every form with the full-screen window stdscr. + + By making this step explicit, you can associate a form with a declared + frame window on your screen display. This can be useful if you want to + adapt the form display to different screen sizes, dynamically tile + forms on the screen, or use a form as part of an interface layout + managed by panels. + + The two windows associated with each form have the same functions as + their analogues in the menu library. Both these windows are painted + when the form is posted and erased when the form is unposted. + + The outer or frame window is not otherwise touched by the form + routines. It exists so the programmer can associate a title, a border, + or perhaps help text with the form and have it properly refreshed or + erased at post/unpost time. The inner window or subwindow is where the + current form page is actually displayed. + + In order to declare your own frame window for a form, you'll need to + know the size of the form's bounding rectangle. You can get this + information with: + + +int scale_form(FORM *form, /* form to query */ + int *rows, /* form rows */ + int *cols); /* form cols */ + + The form dimensions are passed back in the locations pointed to by the + arguments. Once you have this information, you can use it to declare + of windows, then use one of these functions: + + +int set_form_win(FORM *form, /* form to alter */ + WINDOW *win); /* frame window to connect */ + +WINDOW *form_win(FORM *form); /* fetch frame window of form */ + +int set_form_sub(FORM *form, /* form to alter */ + WINDOW *win); /* form subwindow to connect */ + +WINDOW *form_sub(FORM *form); /* fetch form subwindow of form */ + + Note that curses operations, including refresh(), on the form, should + be done on the frame window, not the form subwindow. + + It is possible to check from your application whether all of a + scrollable field is actually displayed within the menu subwindow. Use + these functions: + + +int data_ahead(FORM *form); /* form to be queried */ + +int data_behind(FORM *form); /* form to be queried */ + + The function data_ahead() returns TRUE if (a) the current field is + one-line and has undisplayed data off to the right, (b) the current + field is multi-line and there is data offscreen below it. + + The function data_behind() returns TRUE if the first (upper left hand) + character position is off-screen (not being displayed). + + Finally, there is a function to restore the form window's cursor to + the value expected by the forms driver: + + +int pos_form_cursor(FORM *) /* form to be queried */ + + If your application changes the form window cursor, call this function + before handing control back to the forms driver in order to + re-synchronize it. + +Input Processing in the Forms Driver + + The function form_driver() handles virtualized input requests for form + navigation, editing, and validation requests, just as menu_driver does + for menus (see the section on menu input handling). + + +int form_driver(FORM *form, /* form to pass input to */ + int request); /* form request code */ + + Your input virtualization function needs to take input and then + convert it to either an alphanumeric character (which is treated as + data to be entered in the currently-selected field), or a forms + processing request. + + The forms driver provides hooks (through input-validation and + field-termination functions) with which your application code can + check that the input taken by the driver matched what was expected. + + PAGE NAVIGATION REQUESTS + + These requests cause page-level moves through the form, triggering + display of a new form screen. + + REQ_NEXT_PAGE + Move to the next form page. + + REQ_PREV_PAGE + Move to the previous form page. + + REQ_FIRST_PAGE + Move to the first form page. + + REQ_LAST_PAGE + Move to the last form page. + + These requests treat the list as cyclic; that is, REQ_NEXT_PAGE from + the last page goes to the first, and REQ_PREV_PAGE from the first page + goes to the last. + + INTER-FIELD NAVIGATION REQUESTS + + These requests handle navigation between fields on the same page. + + REQ_NEXT_FIELD + Move to next field. + + REQ_PREV_FIELD + Move to previous field. + + REQ_FIRST_FIELD + Move to the first field. + + REQ_LAST_FIELD + Move to the last field. + + REQ_SNEXT_FIELD + Move to sorted next field. + + REQ_SPREV_FIELD + Move to sorted previous field. + + REQ_SFIRST_FIELD + Move to the sorted first field. + + REQ_SLAST_FIELD + Move to the sorted last field. + + REQ_LEFT_FIELD + Move left to field. + + REQ_RIGHT_FIELD + Move right to field. + + REQ_UP_FIELD + Move up to field. + + REQ_DOWN_FIELD + Move down to field. + + These requests treat the list of fields on a page as cyclic; that is, + REQ_NEXT_FIELD from the last field goes to the first, and + REQ_PREV_FIELD from the first field goes to the last. The order of the + fields for these (and the REQ_FIRST_FIELD and REQ_LAST_FIELD requests) + is simply the order of the field pointers in the form array (as set up + by new_form() or set_form_fields() + + It is also possible to traverse the fields as if they had been sorted + in screen-position order, so the sequence goes left-to-right and + top-to-bottom. To do this, use the second group of four + sorted-movement requests. + + Finally, it is possible to move between fields using visual directions + up, down, right, and left. To accomplish this, use the third group of + four requests. Note, however, that the position of a form for purposes + of these requests is its upper-left corner. + + For example, suppose you have a multi-line field B, and two + single-line fields A and C on the same line with B, with A to the left + of B and C to the right of B. A REQ_MOVE_RIGHT from A will go to B + only if A, B, and C _all_ share the same first line; otherwise it will + skip over B to C. + + INTRA-FIELD NAVIGATION REQUESTS + + These requests drive movement of the edit cursor within the currently + selected field. + + REQ_NEXT_CHAR + Move to next character. + + REQ_PREV_CHAR + Move to previous character. + + REQ_NEXT_LINE + Move to next line. + + REQ_PREV_LINE + Move to previous line. + + REQ_NEXT_WORD + Move to next word. + + REQ_PREV_WORD + Move to previous word. + + REQ_BEG_FIELD + Move to beginning of field. + + REQ_END_FIELD + Move to ebd of field. + + REQ_BEG_LINE + Move to beginning of line. + + REQ_END_LINE + Move to ebd of line. + + REQ_LEFT_CHAR + Move left in field. + + REQ_RIGHT_CHAR + Move right in field. + + REQ_UP_CHAR + Move up in field. + + REQ_DOWN_CHAR + Move down in field. + + Each _word_ is separated from the previous and next characters by + whitespace. The commands to move to beginning and end of line or field + look for the first or last non-pad character in their ranges. + + SCROLLING REQUESTS + + Fields that are dynamic and have grown and fields explicitly created + with offscreen rows are scrollable. One-line fields scroll + horizontally; multi-line fields scroll vertically. Most scrolling is + triggered by editing and intra-field movement (the library scrolls the + field to keep the cursor visible). It is possible to explicitly + request scrolling with the following requests: + + + + REQ_SCR_FLINE + Scroll vertically forward a line. + + REQ_SCR_BLINE + Scroll vertically backward a line. + + REQ_SCR_FPAGE + Scroll vertically forward a page. + + REQ_SCR_BPAGE + Scroll vertically backward a page. + + REQ_SCR_FHPAGE + Scroll vertically forward half a page. + + REQ_SCR_BHPAGE + Scroll vertically backward half a page. + + REQ_SCR_FCHAR + Scroll horizontally forward a character. + + REQ_SCR_BCHAR + Scroll horizontally backward a character. + + REQ_SCR_HFLINE + Scroll horizontally one field width forward. + + REQ_SCR_HBLINE + Scroll horizontally one field width backward. + + REQ_SCR_HFHALF + Scroll horizontally one half field width forward. + + REQ_SCR_HBHALF + Scroll horizontally one half field width backward. + + For scrolling purposes, a _page_ of a field is the height of its + visible part. + + EDITING REQUESTS + + When you pass the forms driver an ASCII character, it is treated as a + request to add the character to the field's data buffer. Whether this + is an insertion or a replacement depends on the field's edit mode + (insertion is the default. + + The following requests support editing the field and changing the edit + mode: + + REQ_INS_MODE + Set insertion mode. + + REQ_OVL_MODE + Set overlay mode. + + REQ_NEW_LINE + New line request (see below for explanation). + + REQ_INS_CHAR + Insert space at character location. + + REQ_INS_LINE + Insert blank line at character location. + + REQ_DEL_CHAR + Delete character at cursor. + + REQ_DEL_PREV + Delete previous word at cursor. + + REQ_DEL_LINE + Delete line at cursor. + + REQ_DEL_WORD + Delete word at cursor. + + REQ_CLR_EOL + Clear to end of line. + + REQ_CLR_EOF + Clear to end of field. + + REQ_CLEAR_FIELD + Clear entire field. + + The behavior of the REQ_NEW_LINE and REQ_DEL_PREV requests is + complicated and partly controlled by a pair of forms options. The + special cases are triggered when the cursor is at the beginning of a + field, or on the last line of the field. + + First, we consider REQ_NEW_LINE: + + The normal behavior of REQ_NEW_LINE in insert mode is to break the + current line at the position of the edit cursor, inserting the portion + of the current line after the cursor as a new line following the + current and moving the cursor to the beginning of that new line (you + may think of this as inserting a newline in the field buffer). + + The normal behavior of REQ_NEW_LINE in overlay mode is to clear the + current line from the position of the edit cursor to end of line. The + cursor is then moved to the beginning of the next line. + + However, REQ_NEW_LINE at the beginning of a field, or on the last line + of a field, instead does a REQ_NEXT_FIELD. O_NL_OVERLOAD option is + off, this special action is disabled. + + Now, let us consider REQ_DEL_PREV: + + The normal behavior of REQ_DEL_PREV is to delete the previous + character. If insert mode is on, and the cursor is at the start of a + line, and the text on that line will fit on the previous one, it + instead appends the contents of the current line to the previous one + and deletes the current line (you may think of this as deleting a + newline from the field buffer). + + However, REQ_DEL_PREV at the beginning of a field is instead treated + as a REQ_PREV_FIELD. + + If the O_BS_OVERLOAD option is off, this special action is disabled + and the forms driver just returns E_REQUEST_DENIED. + + See Form Options for discussion of how to set and clear the overload + options. + + ORDER REQUESTS + + If the type of your field is ordered, and has associated functions for + getting the next and previous values of the type from a given value, + there are requests that can fetch that value into the field buffer: + + REQ_NEXT_CHOICE + Place the successor value of the current value in the buffer. + + REQ_PREV_CHOICE + Place the predecessor value of the current value in the buffer. + + Of the built-in field types, only TYPE_ENUM has built-in successor and + predecessor functions. When you define a field type of your own (see + Custom Validation Types), you can associate our own ordering + functions. + + APPLICATION COMMANDS + + Form requests are represented as integers above the curses value + greater than KEY_MAX and less than or equal to the constant + MAX_COMMAND. If your input-virtualization routine returns a value + above MAX_COMMAND, the forms driver will ignore it. + +Field Change Hooks + + It is possible to set function hooks to be executed whenever the + current field or form changes. Here are the functions that support + this: + + +typedef void (*HOOK)(); /* pointer to function returning void */ + +int set_form_init(FORM *form, /* form to alter */ + HOOK hook); /* initialization hook */ + +HOOK form_init(FORM *form); /* form to query */ + +int set_form_term(FORM *form, /* form to alter */ + HOOK hook); /* termination hook */ + +HOOK form_term(FORM *form); /* form to query */ + +int set_field_init(FORM *form, /* form to alter */ + HOOK hook); /* initialization hook */ + +HOOK field_init(FORM *form); /* form to query */ + +int set_field_term(FORM *form, /* form to alter */ + HOOK hook); /* termination hook */ + +HOOK field_term(FORM *form); /* form to query */ + + These functions allow you to either set or query four different hooks. + In each of the set functions, the second argument should be the + address of a hook function. These functions differ only in the timing + of the hook call. + + form_init + This hook is called when the form is posted; also, just after + each page change operation. + + field_init + This hook is called when the form is posted; also, just after + each field change + + field_term + This hook is called just after field validation; that is, just + before the field is altered. It is also called when the form is + unposted. + + form_term + This hook is called when the form is unposted; also, just + before each page change operation. + + Calls to these hooks may be triggered + 1. When user editing requests are processed by the forms driver + 2. When the current page is changed by set_current_field() call + 3. Wnen the current field is changed by a set_form_page() call + + See Field Change Commands for discussion of the latter two cases. + + You can set a default hook for all fields by passing one of the set + functions a NULL first argument. + + You can disable any of these hooks by (re)setting them to NULL, the + default value. + +Field Change Commands + + Normally, navigation through the form will be driven by the user's + input requests. But sometimes it is useful to be able to move the + focus for editing and viewing under control of your application, or + ask which field it currently is in. The following functions help you + accomplish this: + + +int set_current_field(FORM *form, /* form to alter */ + FIELD *field); /* field to shift to */ + +FIELD *current_field(FORM *form); /* form to query */ + +int field_index(FORM *form, /* form to query */ + FIELD *field); /* field to get index of */ + + The function field_index() returns the index of the given field in the + given form's field array (the array passed to new_form() or + set_form_fields()). + + The initial current field of a form is the first active field on the + first page. The function set_form_fields() resets this. + + It is also possible to move around by pages. + + +int set_form_page(FORM *form, /* form to alter */ + int page); /* page to go to (0-origin) */ + +int form_page(FORM *form); /* return form's current page */ + + The initial page of a newly-created form is 0. The function + set_form_fields() resets this. + +Form Options + + Like fields, forms may have control option bits. They can be changed + or queiried with these functions: + + + +int set_form_opts(FORM *form, /* form to alter */ + int attr); /* attribute to set */ + +int form_opts_on(FORM *form, /* form to alter */ + int attr); /* attributes to turn on */ + +int form_opts_off(FORM *form, /* form to alter */ + int attr); /* attributes to turn off */ + +int form_opts(FORM *form); /* form to query */ + + +By default, all options are on. Here are the available option bits: + + O_NL_OVERLOAD + Enable overloading of REQ_NEW_LINE as described in Editing + Requests. The value of this option is ignored on dynamic fields + that have not reached their size limit; these have no last + line, so the circumstances for triggering a REQ_NEXT_FIELD + never arise. + + O_BS_OVERLOAD + Enable overloading of REQ_DEL_PREV as described in Editing + Requests. + + The option values are bit-masks and can be composed with logical-or in + the obvious way. + +Custom Validation Types + + The form library gives you the capability to define custom validation + types of your own. Further, the optional additional arguments of + set_field_type effectively allow you to parametrize validation types. + Most of the complications in the validation-type interface have to do + with the handling of the additional arguments within custom validation + functions. + + UNION TYPES + + The simplest way to create a custom data type is to compose it from + two preexisting ones: + + +FIELD *link_fieldtype(FIELDTYPE *type1, + FIELDTYPE *type2); + + This function creates a field type that will accept any of the values + legal for either of its argument field types (which may be either + predefined or programmer-defined). If a set_field_type() call later + requires arguments, the new composite type expects all arguments for + the first type, than all arguments for the second. Order functions + (see Order Requests) associated with the component types will work on + the composite; what it does is check the validation function for the + first type, then for the second, to figure what type the buffer + contents should be treated as. + + NEW FIELD TYPES + + To create a field type from scratch, you need to specify one or both + of the following things: + + * A character-validation function, to check each character as it is + entered. + * A field-validation function to be applied on exit from the field. + + Here's how you do that: + + typedef int (*HOOK)(); /* pointer to function returning int */ + + +FIELDTYPE *new_fieldtype(HOOK f_validate, /* field validator */ + HOOK c_validate) /* character validator */ + + +int free_fieldtype(FIELDTYPE *ftype); /* type to free */ + + At least one of the arguments of new_fieldtype()must be non-NULL. The + forms driver will automatically call the new type's validation + functions at appropriate points in processing a field of the new type. + + + The function free_fieldtype() deallocates the argument fieldtype, + freeing all storage associated with it. + + Normally, a field validator is called when the user attempts to leave + the field. Its first argument is a field fointer, from which it can + get to field buffer 0 and test it. If the function returns TRUE, the + operation succeeds; if it returns FALSE, the edit cursor stays in the + field. + + A character validator gets the character passed in as a first + argument. It too should return TRUE if the character is valid, FALSE + otherwise. + + VALIDATION FUNCTION ARGUMENTS + + Your field- and character- validation functions will be passed a + second argument as well. This second argument is the address of a + structure (which we'll call a _pile_) built from any of the + field-type-specific arguments passed to set_field_type(). If no such + arguments are defined for the field type, this pile pointer argument + will be NULL. + + In order to arrange for such arguments to be passed to your validation + functions, you must associate a small set of storage-management + functions with the type. The forms driver will use these to synthesize + a pile from the trailing arguments of each set_field_type() argument, + and a pointer to the pile will be passed to the validation functions. + + Here is how you make the association: + + +typedef char *(*PTRHOOK)(); /* pointer to function returning (char *) */ +typedef void (*VOIDHOOK)(); /* pointer to function returning void */ + +int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ + PTRHOOK make_str, /* make structure from args */ + PTRHOOK copy_str, /* make copy of structure */ + VOIDHOOK free_str); /* free structure storage */ + + Here is how the storage-management hooks are used: + + make_str + This function is called by set_field_type(). It gets one + argument, a va_list of the type-specific arguments passed to + set_field_type(). It is expected to return a pile pointer to a + data structure that encapsulates those arguments. + + copy_str + This function is called by form library functions that allocate + new field instances. It is expected to take a pile pointer, + copy the pile to allocated storage, and return the address of + the pile copy. + + free_str + This function is called by field- and type-deallocation + routines in the library. It takes a pile pointer argument, and + is expected to free the storage of that pile. + + The make_str and copy_str functions may return NULL to signal + allocation failure. The library routines will that call them will + return error indication when this happens. Thus, your validation + functions should never see a NULL pile pointer and need not check + specially for it. + + ORDER FUNCTIONS FOR CUSTOM TYPES + + Some custom field types are simply ordered in the same well-defined + way that TYPE_ENUM is. For such types, it is possible to define + successor and predecessor functions to support the REQ_NEXT_CHOICE and + REQ_PREV_CHOICE requests. Here's how: + + +typedef int (*INTHOOK)(); /* pointer to function returning int */ + +int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ + INTHOOK succ, /* get successor value */ + INTHOOK pred); /* get predecessor value */ + + The successor and predecessor arguments will each be passed two + arguments; a field pointer, and a pile pointer (as for the validation + functions). They are expected to use the function field_buffer() to + read the current value, and set_field_buffer() on buffer 0 to set the + next or previous value. Either hook may return TRUE to indicate + success (a legal next or previous value was set) or FALSE to indicate + fialure. + + AVOIDING PROBLEMS + + The interface for defining custom types is complicated and tricky. + Rather than attempting to create a custom type entirely from scratch, + you should start by studying the library source code for whichever of + the pre-defined types seems to be closest to what you want. + + Use that code as a model, and evolve it towards what you really want. + You will avoid many problems and annoyances that way. The code in the + ncurses library has been specifically un-copyrighted to support this. + + If your custom type defines order functions, have do something + intuitive with a blank field. A useful convention is to make the + successor of a blank field the types minimum value, and its + predecessor the maximum. + + + _________________________________________________________________ + + + + THIS DOCUMENT IS STILL UNDER CONSTRUCTION. Full descriptions of the + form library entry points are available in the form_*.3x manual pages + included with the ncurses distributions. + + + _________________________________________________________________ + + Eric S. Raymond diff --git a/misc/terminfo.src b/misc/terminfo.src index e3097b4f..4cbf2e90 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src @@ -1,6 +1,6 @@ ######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE # -# Version 9.11.0 +# Version 9.11.3 # terminfo syntax # # Eric S. Raymond (current maintainer) @@ -25,6 +25,13 @@ # Pointers to related resources (including the ncurses distribution) may # be found at . # +# INTERNATIONALIZATION: +# +# This file assumes a US-ASCII character set. If you need to fix this, start +# by global-replacing \E(B and \E)B with the appropriate ISO 6429 enablers +# for your character set. \E(A and \E)A enables the British character set +# with the pound sign at position 2/3. +# # FILE FORMAT: # # The version you are looking at may be in any of three formats: master @@ -167,8 +174,10 @@ # # The cursor position report (u6) string must contain two scanf(3)-style # %d format elements. The first of these must correspond to the Y coordinate -# and the second to the %d. The typical CPR value is \E[%d;%dR (on VT100/ -# ANSI-compatible terminals). +# and the second to the %d. If the string contains the sequence %i, it is +# taken as an instruction to decrement each value after reading it (this is +# the inverse sense from the cup string). The typical CPR value is +# \E[%i%d;%dR (on VT100/ ANSI-compatible terminals). # # These capabilities are used by tac(1m), the terminfo action checker soon # to be distributed with ncurses. @@ -308,7 +317,7 @@ ibcs2|Intel Binary Compatibility Standard prescriptions, ech=\E[%p1%dX, hpa=\E[%i%p1%dG, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, indn=\E[%p1%dS, rc=\E8, rin=\E[%p1%dT, rmam=\E[?7l, sc=\E7, - smam=\E[?7h, tbc=\E[g, vpa=\E[%i%dd, + smam=\E[?7h, tbc=\E[g, vpa=\E[%i%p1%dd, #### ANSI terminals and terminal emulators # @@ -360,10 +369,10 @@ pcansi-33|pcansi33|ibm-pc terminal programs with 33 lines, pcansi-43|pcansi43|ibm-pc terminal programs with 43 lines, lines#43, use=pcansi, -# From: Eric S. Raymond Feb 3 1995 # ansi-m -- full ANSI X3.64 with ANSI.SYS-compatible attributes, no color. # If you want pound signs rather than dollars, replace `B' with `A' # in the s?ds capabilities. +# From: Eric S. Raymond Nov 6 1995 ansi-m|ansi-mono|ANSI X3.64-1979 terminal with ANSI.SYS compatible attributes, mc5i, cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, @@ -378,9 +387,9 @@ ansi-m|ansi-mono|ANSI X3.64-1979 terminal with ANSI.SYS compatible attributes, # ansi -- this terminfo expresses the largest subset of X3.64 that will fit in # standard terminfo. Assumes ANSI.SYS-compatible attributes and color -# From: Eric S. Raymond Feb 12 1995 +# From: Eric S. Raymond Nov 6 1995 ansi|ansi/pc-term compatible with color, - u6=\E[%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c, + u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c, u9=\E[c, use=klone+color,use=klone+acs,use=klone+sgr,use=ansi-m, # @@ -389,17 +398,18 @@ ansi|ansi/pc-term compatible with color, # This completely describes the sequences specified in the DOS 2.1 ANSI.SYS # documentation (except for the keyboard key reassignment feature, which # doen't fit the pfkey model well). The klone+acs sequences were valid though -# undocumented. Note that (clear) clears attributes and sets wrap at margin -# before clearing the screen. -# From: Eric S. Raymond Nov 2 1995 +# undocumented. The pfkey capability is untested but should work for keys +# F1-F10 (%p1 values outside this range will yoield unpredictable results). +# From: Eric S. Raymond Nov 7 1995 ansi.sys-old|ANSI.SYS under PC-DOS 2.1, am, mir, msgr, xon, cols#80, lines#25, - clear=\E[m\E[7h\E[2J, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - el=\E[k, home=\E[H, is2=\E[m\E[7h, kcub1=^H, - kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, rc=\E[u, - rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%d;%dR, + clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[k, + home=\E[H, is2=\E[m\E[?7h, kcub1=^H, kcud1=^J, + kcuf1=^L, kcuu1=^K, khome=^^, + pfkey=\E[0;%p1%{58}%+%d;%p2"%s", rc=\E[u, + rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%i%d;%dR, u7=\E[6n, use=klone+color,use=klone+acs,use=klone+sgr, ansi.sys|ANSI.SYS 3.1 and later versions, el=\E[K, use=ansi.sys-old, @@ -439,13 +449,29 @@ nansi.sysk|nansisysk|PC-DOS Public Domain NANSI.SYS with keypad redefined for vi # # Note: there are numerous broken linux entries out there, which didn't screw # up BSD termcap but hose ncurses's smarter cursor-movement optimization. -# One common pathology is an incorrect tab length of 4. Also note that the -# hpa=\E[%i%dG/vpa=\E[%i%dd capabilities seem not to be reliable. To reproduce -# the bug, re-introduce them and run worm -T 200 212 from the ncurses -# test suite, save the trace, then worm -N -T 200 212. Observe that the first -# run fails to properly delete some worm segments, then diff the trace files. +# One common pathology is an incorrect tab length of 4. # -# From: Eric S. Raymond 3 Oct 1995 +# *************************************************************************** +# * * +# * WARNING: * +# * Some Linuxes come with a default keyboard mapping that makes kbs=^? and * +# * all have kcbt=^I. Apply `loadkeys -d' to change this if necessary, and * +# * bug your Linux distributor to get it right in the next release. Here * +# * are the keymap replacement lines that will fix the problem: * +# * * +# keycode 14 = BackSpace BackSpace +# alt keycode 14 = Meta_BackSpace +# keycode 15 = Tab Tab +# alt keycode 15 = Meta_Tab +# shift keycode 15 = F26 +# string F26 ="\033[Z" +# * * +# * This has to use F26 which is unfortunate. The change ought to be built * +# * into the kernel tables. * +# * * +# *************************************************************************** +# +# From: Eric S. Raymond 9 Nov 1995 linux|linux console, am, bce, eo, mir, msgr, xenl, xon, cols#80, it#8, lines#25, @@ -454,19 +480,20 @@ linux|linux console, cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l, - home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, - kb2=\E[G, kbs=^_, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, - 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, 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, rc=\E8, rev=\E[7m, ri=\EM, - rmir=\E[4l, rs1=\Ec, sc=\E7, smir=\E[4h, tbc=\E[3g, - u6=\E[%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c, use=klone+sgr,use=klone+color,use=klone+acs, + 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, kb2=\E[G, kbs=^H, kcbt=\E[Z, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, + kend=\E[4~, 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, + 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, rc=\E8, rev=\E[7m, + ri=\EM, rmir=\E[4l, rs1=\Ec, sc=\E7, smir=\E[4h, + tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, + u9=\E[c, vpa=\E[%i%p1%dd, use=klone+sgr,use=klone+color,use=klone+acs, linux-m|Linux console no color, colors@, pairs@, setab@, setaf@, setb@, setf@, use=linux, @@ -617,6 +644,7 @@ att7300|unixpc|pc7300|3b1|s4|AT&T UNIX PC Model 7300, smul=\E[4m, # From: +# (iris-ansI: added rmam/smam based on init string -- esr) iris-ansi|iris-ansi-net|IRIS emulating ANSI terminal, am, cols#80, it#8, lines#40, @@ -640,8 +668,9 @@ iris-ansi|iris-ansi-net|IRIS emulating ANSI terminal, kpp=\E[150q, kprt=\E[209q, krmir=\E[146q, kspd=\E[217q, nel=\EE, pfkey=\EP101;%p1%d.y%p2%s\E\\, rc=\E8, rev=\E[7m, - ri=\EM, rmso=\E[m, rmul=\E[m, sc=\E7, sgr0=\E[m, - smso=\E[1;7m, smul=\E[4m, tbc=\E[3g, + ri=\EM, rmam=\E[?7l, rmso=\E[m, rmul=\E[m, sc=\E7, + sgr0=\E[m, smam=\E[?7h, smso=\E[1;7m, smul=\E[4m, + tbc=\E[3g, # From: Alex R.N. Wetmore oldpc3|oibmpc3|IBM PC 386BSD Console, @@ -665,15 +694,15 @@ bsdos|ibmpc3-ul|ibmpc3ul|IBM PC BSD/OS Console, am, bw, eo, km, xon, cols#80, it#8, lines#25, bel=^G, blink=\E[5m, bold=\E[1m, clear=\Ec, cr=^M, - cub=\E[%dD, cub1=^H, cud=\E[%dB, cud1=^J, - cuf=\E[%dC, cuf1=\E[C, cup=\E[%i%d;%dH, cuu=\E[%dA, - cuu1=\E[A, dim=\E[=8F, dl=\E[%dM, dl1=\E[M, - ed=\E[J, el=\E[K, home=\E[H, ht=^I, il=\E[%dL, - il1=\E[L, ind=^J, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, kich1=\E[L, - kll=\E[F, knp=\E[G, kpp=\E[I, nel=^M^J, rc=\E[=u, - rev=\E[7m, rmso=\E[m, sc=\E[=s, sgr0=\E[m, - smso=\E[7m, + cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, + cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, cuu1=\E[A, dim=\E[=8F, dl=\E[%p1%dM, + dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + il=\E[%p1%dL, il1=\E[L, ind=^J, kbs=^H, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, + kich1=\E[L, kll=\E[F, knp=\E[G, kpp=\E[I, nel=^M^J, + rc=\E[=u, rev=\E[7m, rmso=\E[m, sc=\E[=s, + sgr0=\E[m, smso=\E[7m, # (This is equivalent to the entry BSDI shipped in 1.0. 1.1, and 2.0) bsdos-ul|pc3|ibmpc3|IBM PC BSD/OS Console with bold instead of underline, rmul=\E[m, smul=\E[1m, use=bsdos, @@ -701,7 +730,8 @@ pcix|PC/IX console, # :CW=\E[E:NU=\E[F:RF=\E[G:RC=\E[H:\ # :WL=\E[K:WR=\E[L:CL=\E[M:CR=\E[N:\ # I renamed GS/GE/WL/WR/CL/CR/PU/PD/HM/EN; also, removed a duplicate -# ":kh=\E[Y:". The XENIX forms caps won't translate. -- esr) +# ":kh=\E[Y:". Added IBM-PC forms characters and highlights, they match +# what was there before. -- esr) ibmpcx|xenix|ibmx|IBM PC xenix console display, am, msgr, cols#80, lines#25, @@ -711,11 +741,9 @@ ibmpcx|xenix|ibmx|IBM PC xenix console display, il1=\E[L, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[d, kf1=\E[K, kf2=\E[L, kf3=\E[M, kf4=\E[N, khome=\E[Y, knp=\E[e, - kpp=\E[Z, rmacs=\E[10m, rmso=\E[m, rmul=\E[m, - smacs=\E[11m, smgr=\E[m, smso=\E[7m, smul=\E[4m, -ibmc|ibmcx|ibmcpc|IBM PC xenix color console display, - use=ibmpcx, + kpp=\E[Z, use=klone+acs,use=klone+sgr, +# (pcvt25: added rmam/smam based on the init string -- esr) pcvt25h|386BSD pcvt rel 2.10 vt220 emulator video driver, am, km, mir, msgr, xenl, cols#80, it#8, lines#25, pb#9216, vt#3, @@ -726,24 +754,24 @@ pcvt25h|386BSD pcvt rel 2.10 vt220 emulator video driver, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, - il1=\E[L, ind=\ED, indn=\E%p1%dD, + il1=\E[L, ind=\E[S, indn=\E[%p1%dS, is1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;25r\E[25;1H, kbs=^_, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\E[17~, kf2=\E[18~, kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, khome=\E[1~, kich1=\E[2~, kll=\E[4~, knp=\E[6~, kpp=\E[5~, nel=^M^J, rc=\E8, - rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM, - rin=\E%p1%dM, rmacs=^O, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[27m, rmul=\E[24m, + rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\E[T, + rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, - sgr0=\E[m, smacs=^N, smir=\E[4h, smkx=\E[?1h\E=, - smso=\E[7m, smul=\E[4m, tbc=\E[3g, + sgr0=\E[m, smacs=^N, smam=\E[?7h, smir=\E[4h, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, ## QNX 4.0 Console # No auto-margin capability is listed because the smcup capability string # explicitly turns it off. This allows full screen applications on terminals -# to be able to address the bottom, right corner. +# to be able to address the bottom, right corner. See also qnx-am. # From: Michael Hunter 25 Aug 1995 qnx|qnx4|qnx console, daisy, km, mir, msgr, xhpa, xt, @@ -801,13 +829,20 @@ qnx|qnx4|qnx console, scp=\E@%p1%02d, sgr=%?%p1%t\E<%;%p2%t\E[%;%p3%t\E(%;%p4%t\E{%;%p6%t\E<%;, sgr0=\E}\E]\E>\E), smcup=\Ei, smso=\E(, smul=\E[, +# The ncurses library can do slightly better optimization if am is on, +# and can still write to the lower-right corner using ich1. +# From: Eric S. Raymond 7 Nov 1995 +qnx-am|qnx4-am|qnx console with automargin (for use with ncurses), + am, + rmam=\Eh, rmcup=\ER, smam=\Ei, smcup@, use=qnx, #### DEC VT100 and compatibles # -# DEC terminals from the vt100 forward are collected here. Older DEC terminals -# and micro consoles can be found in the `obsolete' section. More details -# on the relationship between the VT100 and ANSI X3.64/ISO 6429/ECMA-48 may -# be found near the end of this file. +# DEC terminals from the vt100 forward (and the vt52, way obsolete but still +# the basis ofsome emulations) are collected here. Older DEC terminals and +# micro consoles can be found in the `obsolete' section. More details on +# the relationship between the VT100 and ANSI X3.64/ISO 6429/ECMA-48 may be +# found near the end of this file. # # Except where noted, these entries are DEC's official terminfos. # Contact Bill Hedberg of Terminal Support @@ -815,6 +850,14 @@ qnx|qnx4|qnx console, # are kept available at ftp://gatekeeper.dec.com/pub/DEC/termcaps. # +vt52|dec vt52, + cols#80, it#8, lines#24, + bel=^G, clear=\EH\EJ, cr=^M, cub1=\ED, cud1=\EB, + cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, + cuu1=\EA, ed=\EJ, el=\EK, home=\EH, ht=^I, ind=^J, + kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, + nel=^M^J, ri=\EI, + # NOTE: Any VT100 emulation, whether in hardware or software, almost # certainly includes what DEC called the `Level 1 editing extension' codes; # only the very oldest VT100s lacked these and there probably aren't any of @@ -872,8 +915,9 @@ qnx|qnx4|qnx console, # Margin Bell 0-Off Parity Sense 0-Odd # 1-On 1-Even # +# (I added rmam/smam based on the init string -- esr) vt100|vt100-am|dec vt100 (w/advanced video), - am, mir, msgr, xenl, xon, + am, msgr, xenl, xon, cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, @@ -889,11 +933,13 @@ vt100|vt100-am|dec vt100 (w/advanced video), kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, - rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, + rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, + rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017$<2>, smacs=^N, smkx=\E[?1h\E=, - smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, + smkx=\E[?1h\E=, smso=\E[7m$<2>, smul=\E[4m$<2>, + tbc=\E[3g, vt100nam|vt100-nam|vt100 w/no am (w/advanced video), am@, xenl@, use=vt100-am, @@ -993,6 +1039,7 @@ vt125|vt125 graphics terminal, clear=\E[H\E[2J\EPpS(E)\E\\$<50>, use=vt100, # This isn't a DEC entry, it came from University of Wisconsin. +# (vt131: I added rmam/smam based on the init string -- esr) vt131|dec vt131, am, xenl, cols#80, it#8, lines#24, vt#3, @@ -1004,7 +1051,7 @@ vt131|dec vt131, home=\E[H, ht=^I, is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=^M^J, - rc=\E8, rev=\E[7m$<2/>, ri=\EM$<5/>, + rc=\E8, rev=\E[7m$<2/>, ri=\EM$<5/>, rmam=\E[?7h, rmkx=\E[?1l\E>, rmso=\E[m$<2/>, rmul=\E[m$<2/>, rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr0=\E[m$<2/>, smkx=\E[?1h\E=, smso=\E[7m$<2/>, @@ -1045,11 +1092,12 @@ vt220|DEC VT220 in vt100 emulation mode, kf9=\E[21~, khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, rc=\E8, rev=\E[7m$<2>, rf=/usr/lib/tabset/vt100, ri=\EM$<14/>, - rmacs=\E(B$<4>, rmir=\E[4l, rmso=\E[m, rmul=\E[m, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmso=\E[m, + rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, + sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, - sgr0=\E[m$<2>, smacs=\E(0$<2>, smir=\E[4h, - smso=\E[7m, smul=\E[4m, + sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, + smir=\E[4h, smso=\E[7m, smul=\E[4m, # # vt220d: # This vt220 description regards F6--F10 as the second block of function keys @@ -1064,30 +1112,6 @@ vt220d|DEC VT220 in vt100 mode with DEC function key labeling, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, kf5@, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, use=vt220, -# This is not a DEC entry. It's a 220 version that substitutes VT220 -# colors for various monochrome highlights. -# From: Tony Nugent 23 Apr 95 -vt220c|vt-220c|dec colour vt220, - xon, - cols#80, lines#49, vt#3, - bel=^G, blink=\E[5m$<2>, bold=\E[1m\E[32;44m$<2>, - clear=\E[;H\E[2J$<50>, cnorm=\E[?7h\E[0;2;1;36m, - cr=^M, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, - cuf1=\E[C$<2>, cup=\E[%i%p1%d;%p2%dH$<5>, - cuu1=\E[A$<2>, cvvis=\E[?7l, ed=\E[J$<50>, - el=\E[K$<3>, home=\E[H, ht=^I, ind=^J, - is2=\E[1;49r\E[49;1H, kbs=^H, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\E[29~, - kf1=\EOP, kf10=\E[29~, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, - kf8=\E[20~, kf9=\E[21~, rc=\E8, rev=\E[7m$<2>, - ri=\EM$<5>, rmacs=\E(B$<4>, rmir=\E[4l, - rmkx=\E[?1l\E>, rmso=\E[7m\E[0;1;36m$<2>, - rmul=\E[m\E[0;1;36m$<2>, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E1;36m\E[?8h, - sc=\E7, sgr0=\E[m\E[1;36m$<2>, smkx=\E[?1h\E=, - smso=\E[m\E[1;33;44m$<2>, smul=\E[4m\E[1;32m$<2>, - vt220nam|vt220-nam|v220n|VT220 in vt100 mode with no auto margins, am@, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h, use=vt220, @@ -1209,7 +1233,8 @@ vt320-w-nam|vt300-w-nam|dec vt320 wide 7 bit terminal with no am, # your termcap entry, # # From: Daniel Glasser , 13 Oct 1993 -# (vt340: string capability "sb=\E[M" corrected to "sr" -- esr) +# (vt340: string capability "sb=\E[M" corrected to "sr"; +# also, added rmam/smam based on the init string -- esr) vt340|dec-vt340|vt330|dec-vt330|dec vt340 graphics terminal with 24 line page, am, eslok, hs, mir, msgr, xenl, xon, cols#80, it#8, lines#24, vt#3, @@ -1230,9 +1255,10 @@ vt340|dec-vt340|vt330|dec-vt330|dec vt340 graphics terminal with 24 line page, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, nel=^M\ED, rc=\E8, rev=\E[7m, rf=/usr/lib/tabset/vt100, - ri=\EM, rmacs=^O, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[27m, rmul=\E[24m, rs1=\E[?3l, sc=\E7, - sgr0=\E[m, smacs=^N, smir=\E[4h, smkx=\E[?1h\E=, + ri=\EM, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, + rs1=\E[?3l, sc=\E7, sgr0=\E[m, smacs=^N, + smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E[2$~\E[1$}\E[1;%dH, @@ -1255,7 +1281,8 @@ vt340|dec-vt340|vt330|dec-vt330|dec vt340 graphics terminal with 24 line page, # your termcap entry, # # From: Daniel Glasser , 13 Oct 1993 -# (vt400: string capability "sb=\E[M" corrected to "sr" -- esr) +# (vt400: string capability "sb=\E[M" corrected to "sr"; +# also, added rmam/smam based on the init string -- esr) vt400|vt400-24|dec-vt400|dec vt400 24x80 column autowrap, am, eslok, hs, mir, msgr, xenl, xon, cols#80, it#8, lines#24, vt#3, @@ -1276,13 +1303,15 @@ vt400|vt400-24|dec-vt400|dec vt400 24x80 column autowrap, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, nel=^M\ED, rc=\E8, rev=\E[7m, rf=/usr/lib/tabset/vt100, - ri=\EM, rmacs=^O, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[27m, rmul=\E[24m, rs1=\E<\E[?3l\E[!p\E[?7h, - sc=\E7, sgr0=\E[m, smacs=^N, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, + ri=\EM, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, + rs1=\E<\E[?3l\E[!p\E[?7h, sc=\E7, sgr0=\E[m, + smacs=^N, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, + smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E[2$~\E[1$}\E[1;%dH, -# (I removed kf0, it collided with kf10 -- esr) +# (I removed kf0, it collided with kf10; +# I also added rmam/smam based on the init string -- esr) vt420|DEC VT420, am, mir, xenl, xon, cols#80, lines#24, vt#3, @@ -1300,15 +1329,13 @@ vt420|DEC VT420, kf7=\E[19~, kf8=\E[20~, kf9=\E[21~, kfnd=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, rc=\E8, rev=\E[7m$<2>, rf=/usr/lib/tabset/vt100, - ri=\EM, rmacs=\E(B$<4>, rmir=\E[4l, rmkx=\E>, + ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, + rmkx=\E>, rmsc=\E[?0;0r\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, rmso=\E[m, rmul=\E[m, rs3=\E[?67h\E[64;1"p, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, - sgr0=\E[m$<2>, smacs=\E(0$<2>, smir=\E[4h, - smkx=\E=, smso=\E[7m, smul=\E[4m, - -vt420nam|vt420-nam|v420n|DEC VT420 in vt100 emul. mode with NO AUTO WRAP mode, - am@, use=vt420, + sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, + smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, # # DECUDK @@ -1320,7 +1347,7 @@ vt420nam|vt420-nam|v420n|DEC VT420 in vt100 emul. mode with NO AUTO WRAP mode, # else value = key + 5; # vt420pc|DEC VT420 w/PC keyboard, - kdch1=^_, kend=\E[4~, kf1=\E[11~, kf10=\E[21~, + kdch1=\177, kend=\E[4~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[11;2~, kf14=\E[12;2~, kf15=\E[13;2~, kf16=\E[14;2~, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, @@ -1346,7 +1373,7 @@ vt420pcdos|DEC VT420 w/PC for DOS Merge, sgr@, sgr0=\E[m, smsc=\E[?1;2r\E[34h, use=vt420pc, vt420f|DEC VT420 with VT kbd; VT400 mode; F1-F5 used as Fkeys, - kdch1=^_, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, + kdch1=\177, kf1=\E[11~, 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[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, @@ -1354,19 +1381,10 @@ vt420f|DEC VT420 with VT kbd; VT400 mode; F1-F5 used as Fkeys, kf9=\E[20~, khome=\E[H, lf1=\EOP, lf2=\EOQ, lf3=\EOR, lf4=\EOS, use=vt420, -vt420f-nam|v420fn|DEC VT420 no auto margins, - am@, use=vt420f, -vt420pc-nam|v420pcn|DEC VT420 PC keyboard no auto margins, - am@, use=vt420pc, - vt510|DEC VT510, use=vt420, -vt510nam|vt510-nam|v510n|DEC VT510 in vt100 emul. mode with NO AUTO WRAP mode, - use=vt420nam, vt510pc|DEC VT510 w/PC keyboard, use=vt420pc, -vt510pc-nam|v510pcn|DEC VT510 PC keyboard no auto margins, - am@, use=vt420pc, vt510pcdos|DEC VT510 w/PC for DOS Merge, use=vt420pcdos, @@ -1383,6 +1401,7 @@ vt510pcdos|DEC VT510 w/PC for DOS Merge, # terminal mode is being used. If Set-Up has been disabled or # assigned to an unknown key, Set-Up may be entered by pressing # [F3] as the first key after power up, regardless of keyboard type. +# (I added rmam/smam based on the init string -- esr) vt520|DEC VT520, am, mir, xenl, xon, cols#80, lines#24, vt#3, @@ -1402,16 +1421,14 @@ vt520|DEC VT520, kslt=\E[4~, pfx=\EP1;1|%?%{16}%p1%>%t%{0}%e%{21}%p1%>%t%{1}%e%{25}%p1%>%t%{2}%e%{27}%p1%>%t%{3}%e%{30}%p1%>%t%{4}%e%{5}%;%p1%+%d/%p2%s\E\\, rc=\E8, rev=\E[7m$<2>, rf=/usr/lib/tabset/vt100, - ri=\EM, rmacs=\E(B$<4>, rmir=\E[4l, + ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmsc=\E[?0;0r\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, rmso=\E[m, rmul=\E[m, rs3=\E[?67h\E[64;1"p, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, - sgr0=\E[m$<2>, smacs=\E(0$<2>, smir=\E[4h, - smso=\E[7m, smul=\E[4m, - -vt520nam|vt520-nam|v520n|DEC VT520 with NO AUTO WRAP, - am@, use=vt520, + sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, + smir=\E[4h, smso=\E[7m, smul=\E[4m, +# (I added rmam/smam based on the init string -- esr) vt525|DEC VT525, am, mir, xenl, xon, cols#80, lines#24, vt#3, @@ -1431,15 +1448,12 @@ vt525|DEC VT525, kslt=\E[4~, pfx=\EP1;1|%?%{16}%p1%>%t%{0}%e%{21}%p1%>%t%{1}%e%{25}%p1%>%t%{2}%e%{27}%p1%>%t%{3}%e%{30}%p1%>%t%{4}%e%{5}%;%p1%+%d/%p2%s\E\\, rc=\E8, rev=\E[7m$<2>, rf=/usr/lib/tabset/vt100, - ri=\EM, rmacs=\E(B$<4>, rmir=\E[4l, + ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmsc=\E[?0;0r\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, rmso=\E[m, rmul=\E[m, rs3=\E[?67h\E[64;1"p, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, - sgr0=\E[m$<2>, smacs=\E(0$<2>, smir=\E[4h, - smso=\E[7m, smul=\E[4m, - -vt525nam|vt525-nam|v525n|DEC VT525 with NO AUTO WRAP, - am@, use=vt525, + sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, + smir=\E[4h, smso=\E[7m, smul=\E[4m, #### VT100 emulations # @@ -1455,21 +1469,22 @@ dec-vt100|EWAN telnet's vt100 emulation, # that matter -- DEC's ALL-in-1 seems happy with it, as does INFOPLUS's # RDBM systems, it includes ReGIS and SiXel support! I'm impressed... # I can send the address if requested. +# (z340: changed garbled \E[5?l to \E[?5l, DEC smooth scroll off -- esr) # From: Adam Thompson Sept 10 1995 z340|zstem vt340 terminal emulator 132col 42line, lines#42, - is2=\E>\E[?3h\E[?4l\E[5?l\E[?7h\E[?8h\E[1;42r\E[42;1H, - rs2=\E>\E[?3h\E[?4l\E[5?l\E[?7h\E[?8h\E[1;42r\E[42;1H, use=vt320-w, + is2=\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h\E[1;42r\E[42;1H, + rs2=\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h\E[1;42r\E[42;1H, use=vt320-w, z340-nam|zstem vt340 terminal emulator 132col 42line, am@, - is2=\E>\E[?3h\E[?4l\E[5?l\E[?7l\E[?8h\E[1;42r\E[42;1H, - rs2=\E>\E[?3h\E[?4l\E[5?l\E[?7l\E[?8h\E[1;42r\E[42;1H, use=z340, + is2=\E>\E[?3h\E[?4l\E[?5l\E[?7l\E[?8h\E[1;42r\E[42;1H, + rs2=\E>\E[?3h\E[?4l\E[?5l\E[?7l\E[?8h\E[1;42r\E[42;1H, use=z340, #### Xterm variants # # X10/6.6 11/7/86, minus alternate screen, plus (csr) -# (xterm: ":MT:" changed to ":km:"; +# (xterm: ":MT:" changed to ":km:"; added smam/rmam based on init string; # removed (hs, eslok, tsl=\E[?E\E[?%i%dT, fsl=\E[?F, dsl=\E[?E) # as these seem not to work -- esr) x10term|vs100-x10|xterm terminal emulator (X10 window system), @@ -1483,20 +1498,16 @@ x10term|vs100-x10|xterm terminal emulator (X10 window system), is2=\E\E[m\E[?7h\E[?1;4l, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rev=\E[7m, ri=\EM, - rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - sgr0=\E[m, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, + rmul=\E[m, sgr0=\E[m, smam=\E[?7h, smir=\E[4h, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, # X11R6 xterm. This is known good for the XFree86 version under Linux. -# From: Eric S. Raymond 4 Sept 1995 -# 1. If you use the line-drawing character set, the disable afterwards -# will leave you in US-ASCII. If you live somewhere that wants a pound sign -# at 2/3, change rmacs to "\E(A". -# 2. The cuf and cud capabilities don't seem to be reliable under my XFree86 -# X1R6 xterm, so they're commented out. -# 3. The kmous key is actually the \E[M prefix returned by xterm's internal +# From: Eric S. Raymond 9 Nov 1995 +# 1. The cuf and cud capabilities don't seem to be reliable under my XFree86 +# X11R6 xterm, so they're commented out. +# 2. The kmous key is actually the \E[M prefix returned by xterm's internal # mouse-tracking facility. ncurses will interpret the following three bytes # of mouse status information. -# 4. Added rs1 of ^O to reset character set. xterm|vs100|xterm terminal emulator (X11R6 Window System), am, km, mir, msgr, xenl, xon, cols#80, it#8, lines#24, @@ -1506,31 +1517,23 @@ xterm|vs100|xterm terminal emulator (X11R6 Window System), cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, - home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=^J, + enacs=\E(B\E)0, home=\E[H, ht=^I, ich=\E[%p1%d@, + ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, - kcuu1=\EOA, kend=\E[[, kf1=\E[11~, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~, - kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, khome=\E[@, kich1=\E[2~, - kmous=\E[M, knp=\E[6~, kpp=\E[5~, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=\E(B, + kcuu1=\EOA, kend=\E[[, kent=\EOM, kf1=\E[11~, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, + kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[@, + kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, + rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs1=^O, rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<, - sc=\E7, sgr0=\E[m, smacs=\E(0, smcup=\E7\E[?47h, - smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3k, u6=\E[%d;%dR, u7=\E[6n, u8=\E[?1;2c, - u9=\E[c, -xterm25|vs100-25|xterm terminal emulator (25 lines) (X11R6 window system), - cols#80, lines#25, use=xterm, -xterm50|vs100-50|xterm terminal emulator (50 lines) (X11R6 window system), - cols#80, lines#50, use=xterm, -xterm65|vs100-65|xterm terminal emulator (65 lines) (X11R6 window system), - cols#80, lines#65, use=xterm, -xterms|vs100s|xterm terminal emulator (small) (X11R6 window system), - use=xterm, + sc=\E7, sgr0=\E[m, smacs=^N, smam=\E[?7h, + smcup=\E7\E[?47h, smir=\E[4h, smkx=\E[?1h\E=, + smso=\E[7m, smul=\E[4m, tbc=\E[3k, u6=\E[%i%d;%dR, + u7=\E[6n, u8=\E[?1;2c, u9=\E[c, # (kterm: this had extension capabilities ":KJ:TY=ascii:" -- esr) kterm|kterm kanji terminal emulator (X window system), eslok, hs, @@ -1893,7 +1896,8 @@ altos2|alt2|altos-2|altos II, kf41=^Ai\r, kf42=^Aj\r, kf43=^Ak\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, khome=\E[f, kil1=^AJ\r, kind=^AO\r, nel=^M^J, - rmso=\E[m, rmul=\E[m, smso=\E[7m, smul=\E[4m, + rmam=\E[?7l, rmso=\E[m, rmul=\E[m, smam=\E[?7h, + smso=\E[7m, smul=\E[4m, # (altos3: had extension capabilities # :c0=^A`\r:c1=^Aa\r:c2=^Ab\r:c3=^Ac\r:\ # :c4=^Ad\r:c5=^Ae\r:c6=^Af\r:c7=^Ag\r:\ @@ -2322,7 +2326,6 @@ hp2622|hp2622a|2622|2622a|hp 2622, hp2623|hp2623a|2623|2623a|hp 2623, use=hp2622, - hp2624b-p|hp2624b-4p-p|hewlett packard 2624 B with printer, use=hp+printer,use=hp2624, @@ -2376,9 +2379,10 @@ hpansi|hp700|hewlett packard 700/44 in HP-PCterm mode, kf10=\E[28~, kf2=\E[18~, kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, khome=\E[1~, knp=\E[6~, kpp=\E[5~, - rmsc=\E[>11l\EP1**x0/11;1/13\E[m\E\\, rmso=\E[m, - rmul=\E[m, smsc=\E[>11h\EPO**x0/65;1/67\E\\$<250>, - smso=\E[7m, smul=\E[4m, xoffc=g, xonc=e, + rmam=\E[?7l, rmsc=\E[>11l\EP1**x0/11;1/13\E[m\E\\, + rmso=\E[m, rmul=\E[m, smam=\E[?7h, + smsc=\E[>11h\EPO**x0/65;1/67\E\\$<250>, smso=\E[7m, + smul=\E[4m, xoffc=g, xonc=e, # hp2392|2392|2393|239x series, cols#80, @@ -2521,41 +2525,23 @@ bobcat|sbobcat|HP 9000 model 300 console, rmul=\E&d@, smir=\EQ, smkx=\E&s1A, smso=\E&dB, smul=\E&dD, vpa=\E&a%dY$<6/>, gator-t|HP 9000 model 237 emulating extra-tall AAA, - bw, km, mir, ul, - cols#128, it#8, lines#94, - bel=^G, cbt=\E[Z, clear=\E[H\E[J, cr=^M, cub1=^H, - cud1=^J, cuf1=\E[C, cup=\E[%i%d;%dH, cuu1=\EM, - dch=\E[%dP$<4/>, dch1=\E[P, dl=\E[%dM$<1*/>, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, - hpa=\E[%i%d`, ht=^I, ich=\E[%d@$<4/>, ich1=\E[@, - il=\E[%dL$<1*/>, il1=\E[L, kbs=^H, kcub1=^H, - kcud1=^J, nel=^M^J, rep=%.\E[%db$<1*/>, rev=\E[7m, - rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, - smul=\E[4m, + lines#94, use=gator, gator|HP 9000 model 237 emulating AAA, bw, km, mir, ul, cols#128, it#8, lines#47, bel=^G, cbt=\E[Z, clear=\E[H\E[J, cr=^M, cub1=^H, - cud1=^J, cuf1=\E[C, cup=\E[%i%d;%dH, cuu1=\EM, - dch=\E[%dP$<4/>, dch1=\E[P, dl=\E[%dM$<1*/>, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, - hpa=\E[%i%d`, ht=^I, ich=\E[%d@$<4/>, ich1=\E[@, - il=\E[%dL$<1*/>, il1=\E[L, kbs=^H, kcub1=^H, - kcud1=^J, nel=^M^J, rep=%.\E[%db$<1*/>, rev=\E[7m, - rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, - smul=\E[4m, + cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu1=\EM, dch=\E[%p1%dP$<4/>, dch1=\E[P, + dl=\E[%p1%dM$<1*/>, dl1=\E[M, ed=\E[J, el=\E[K, + home=\E[H, hpa=\E[%i%p1%d`, ht=^I, + ich=\E[%p1%d@$<4/>, ich1=\E[@, il=\E[%p1%dL$<1*/>, + il1=\E[L, kbs=^H, kcub1=^H, kcud1=^J, nel=^M^J, + rep=%p1%c\E[%p2%db$<1*/>, rev=\E[7m, rmso=\E[m, + rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m, gator-52|HP 9000 model 237 emulating VT52, - cols#128, it#8, lines#47, - bel=^G, clear=\EH\EJ, cr=^M, cub1=^H, cud1=^J, - cuf1=\EC, cup=\EY%+ %+ , cuu1=\EA, ed=\EJ, el=\EK, - home=\EH, ht=^I, kbs=^H, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, nel=^M^J, ri=\EI, + cols#128, lines#47, use=vt52, gator-52t|HP 9000 model 237 emulating extra-tall VT52, - cols#128, it#8, lines#94, - bel=^G, clear=\EH\EJ, cr=^M, cub1=^H, cud1=^J, - cuf1=\EC, cup=\EY%+ %+ , cuu1=\EA, ed=\EJ, el=\EK, - home=\EH, ht=^I, kbs=^H, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, nel=^M^J, ri=\EI, + lines#94, use=gator-52, #### Honeywell-Bull # @@ -2691,7 +2677,7 @@ adm22|lsi adm22, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, dl1=\ER, ed=\Ey, el=\Et, home=^^, ht=\Ei, ich1=\EQ, il1=\EE, - is2=\E%\014\014\014\016\003\200\003\002\003\002\200\200\200\200\200\200\200\200\200\200\200, + is2=\E%\014\014\014\016^C\200\003\002\003^B\200\200\200\200\200\200\200\200\200\200\200, kbs=^H, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kf1=^A@\r, kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, khome=^^, lf1=F1, @@ -2854,6 +2840,10 @@ adm31|lsi adm31, oadm31|o31|old adm31, rmul@, smso=\EG4, smul@, use=adm31, # ADM36 in native mode (not VT52 emulation mode) +# Hmmm...this looks a lot like an incomplete and slightly botched description +# of a vt100 emulator. Might be worth trying vt100 on this type and seeing +# if it flies. Assuming there are any of these left alive... +# (adm36: I added rmam/smam based on the initialization string -- esr) adm36|lsi adm36, am, mir, cols#80, lines#24, @@ -2862,7 +2852,7 @@ adm36|lsi adm36, ed=\E[0J, el=\E[0K, il1=\E[1L$<100>, is2=\E[6;?7h\E[4;20;?1;?3;?6;?4l\E(B\E)B\E>, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\E[A, - rmir=\E[4l, smir=\E[4h, + rmam=\E[?7l, rmir=\E[4l, smam=\E[?7h, smir=\E[4h, # (adm42: removed obsolete ":ma=^K^P:" -- esr) adm42|lsi adm42, am, @@ -2962,8 +2952,9 @@ qvt101+|qvt101p|qume qvt 101 PLUS product, khome=^^, kich1=\EQ, kil1=\EE, mc4=\EA, mc5=\E@, rmso=\E(, rmul=\EG0, smso=\E0P\E), smul=\EG8, tbc=\E3, tsl=\Eg\Ef, -qvt102|qume qvt 102 product, +qvt102|qume qvt 102, cnorm=\E., use=qvt101, +# (qvt103: added rmam/smam based on init string -- esr) qvt103|qume qvt 103, am, xenl, xon, cols#80, it#8, lines#24, vt#3, @@ -2976,12 +2967,12 @@ qvt103|qume qvt 103, home=\E[H, ht=^I, hts=\EH, ind=^J, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, - rev=\E[7m$<2>, ri=\EM$<5>, rmkx=\E[?1l\E>, - rmso=\E[m$<2>, rmul=\E[m$<2>, + rev=\E[7m$<2>, ri=\EM$<5>, rmam=\E[?7l, + rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, - sgr0=\E[m$<2>, smkx=\E[?1h\E=, smso=\E[7m$<2>, - smul=\E[4m$<2>, tbc=\E[3g, + sgr0=\E[m$<2>, smam=\E[?7h, smkx=\E[?1h\E=, + smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, qvt103-w|qume qvt103 132 cols, cols#132, lines#24, rs2=\E>\E[?3h\E[?4l\E[?5l\E[?8h, use=qvt103, @@ -3182,7 +3173,7 @@ tvi910+|910+|televideo 910+, kf7=^AG\r, kf8=^AH\r, kf9=^AI\r, ll=\E=7 , use=tvi910, # (tvi912: removed obsolete ":ma=^K^P^L :" -- esr) -tvi912|tvi920|old televideo 912, +tvi912|tvi914|tvi920|old televideo 912/914/920, am, cols#80, it#8, lines#24, xmc#1, bel=^G, clear=^Z, cr=^M, cub1=^H, cud1=^J, cuf1=^L, @@ -3199,8 +3190,8 @@ tvi912|tvi920|old televideo 912, # Terminfo makes you use the funct key on the 912 but the real keys on the 920. tvi912c|tvi912b|912c|912b|tvi|new televideo 912, dl1=\ER$<5*>, il1=\EE$<5*>, use=tvi912, -# set to page 1 when entering ex (\E-17 ) -# reset to page 0 when exiting ex (\E-07 ) +# set to page 1 when entering curses application (\E-17 ) +# reset to page 0 when exiting curses application (\E-07 ) tvi912-2p|tvi920-2p|912-2p|920-2p|tvi-2p|televideo w/2 pages, rmcup=\E-07 , smcup=\E-17 , use=tvi912, # We got some new tvi912c terminals that act really weird on the regular @@ -3209,9 +3200,6 @@ tvi912-2p|tvi920-2p|912-2p|920-2p|tvi-2p|televideo w/2 pages, tvi912cc|tvi912 at cowell college, cup@, use=tvi912c, -tvi914|televideo 914, - use=tvi920, - # Here are the switch settings for the TVI 920c: # # S1 (Line), and S3 (Printer) baud rates -- put one, and only one, switch down: @@ -3309,14 +3297,6 @@ tvi92D|tvi92B with DTR instead of XON/XOFF & better padding, dl1=\ER$<2*/>, il1=\EE$<2*/>, is2=\El\E"\EF1\E.3\016\EA\E<, kdl1=\ER$<2*/>, kil1=\EE$<2*/>, use=tvi92B, -# tv921 from gould 2.0 -# (tvi921-g: commented out the following nonstandard caps: -# :em=\EU:mn=\E(:sm=\Eu: -# :Gs=\E$:Ge=\E%:Tl=F:Tr=G:Tj=N:Bl=E:Br=H:Bj=O:Lj=M:Rj=L: -# :Cj=I:Hl=K:Vl=J:Xc=\136:Sl=B:Sr=C:Zl=A:Zr=D: -# -- esr) -tvi921-g|televideo 921 from gould 2.0, - use=tvi921, tvi924|televideo tvi924, am, bw, hs, in, mir, msgr, xenl, xon, @@ -3341,8 +3321,6 @@ tvi924|televideo tvi924, lf8=F9, lf9=F10, pfkey=\E|%p1%'1'%+%c%p2%s\031, ri=\Ej, rmso=\EG0, rmul=\EG0, sgr0=\EG0, smso=\EG4, smul=\EG8, tbc=\E3, tsl=\Ef, -tvi924vb|924vb|televideo model 924 visual bells, - flash=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed, use=tvi924, # TVI925 DIP switches. In each of these, D = Down and U = Up, # @@ -3491,15 +3469,6 @@ tvi925|925|televideo 925, kf9=^AH\r, khome=^^, kich1=\EQ, kil1=\EE, rmso=\EG0, rmul=\EG0, smso=\EG4, smul=\EG8, tbc=\E3, tsl=\Eh\Ef, -tvi925vb|925vb|televideo model 925 visual bells, - flash=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed, use=tvi925, -# Since the 925 uses a character position to store the escape sequences to go -# in and out of both stand out and underline modes, screen positioning is -# difficult. The following 925 entries don't use these modes. -tvi925n|925n|televideo model 925 no standout or underline, - rmso@, rmul@, smso@, smul@, use=tvi925, -tvi925vbn|925vbn|televideo model 925 visual bells no so or ul, - flash=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed, use=tvi925n, # From: Todd Litwin 28 May 1993 # Originally Tim Curry, Univ. of Central Fla., 5/21/82 @@ -3780,6 +3749,8 @@ vi55|Visual 55, # below try to get around the problem by ignoring the feature or # turning it off when inputting a character. They are said not to # work well at 300 baud. (You could always cut the wire to the bell!) +# (vi200: this used to use ich1=\Ei \010\Ej but it's more effective to +# use smir/rmir directly -- esr) # From: Mon Nov 14 08:34:29 1983 vi200|vis200|visual 200 with function keys, am, @@ -3787,17 +3758,16 @@ vi200|vis200|visual 200 with function keys, bel=^G, clear=\Ev, cnorm=\Ec, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\Ed, dch1=\EO$<4*>, dl1=\EM$<4*>, - ed=\Ey, el=\Ex$<4*>, home=\EH, ht=^I, - ich1=\Ei \010\Ej, il1=\EL, ind=^J, - is2=\E3\Eb\Ej\E\\\El\EG\Ec\Ek, kcub1=\ED, + ed=\Ey, el=\Ex$<4*>, home=\EH, ht=^I, il1=\EL, + ind=^J, is2=\E3\Eb\Ej\E\\\El\EG\Ec\Ek, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E , kf4=\E!, kf5=\E", kf6=\E#, kf7=\E$, kf8=\E%, kf9=\E&, khome=\EH, ri=\EI, - rmso=\E3, smso=\E4, + rmir=\Ej, rmso=\E3, smir=\Ei, smso=\E4, vi200-rv-ic|visual 200 reverse video using insert char, ich1@, rmir=\Ej, smir=\Ei, use=vi200-rv, # The older Visuals didn't come with function keys. This entry uses -# ks and ke so that the keypad keys can be used as function keys. +# smkx and rmkx so that the keypad keys can be used as function keys. # If your version of vi doesn't support function keys you may want # to use vi200-f. vi200-f|visual|visual 200 no function keys, @@ -3807,13 +3777,12 @@ vi200-f|visual|visual 200 no function keys, smkx=\E=, smso@, use=vi200, vi200-rv|visual 200 reverse video, cnorm@, cvvis@, ri@, rmso=\E3, smso=\E4, use=vi200, -vi200-ic|visual 200 using insert char, - ich1@, rmir=\Ej, smir=\Ei, use=vi200, # the function keys are programmable but we don't reprogram # them to their default values with "is" because programming # them is very verbose. maybe an "if" file should be made for # the 300 and they could be stuck in it. +# (vi300: added rmam/smam based on init string -- esr) vi300|visual 300 ansi x3.64, am, bw, mir, xenl, cols#80, lines#24, @@ -3826,8 +3795,9 @@ vi300|visual 300 ansi x3.64, kf1=\E_A\E\\, kf2=\E_B\E\\, kf3=\E_C\E\\, kf4=\E_D\E\\, kf5=\E_E\E\\, kf6=\E_F\E\\, kf7=\E_G\E\\, kf8=\E_H\E\\, kf9=\E_I\E\\, - khome=\E[H, ri=\EM, rmir=\E[4l, rmso=\E[m, - rmul=\E[m, smir=\E[4h, smso=\E[1m, smul=\E[4m, + khome=\E[H, ri=\EM, rmam=\E[?7l, rmir=\E[4l, + rmso=\E[m, rmul=\E[m, smam=\E[?7h, smir=\E[4h, + smso=\E[1m, smul=\E[4m, vi300-rv|visual 300 reverse video, bel=^G, cr=^M, cud1=^J, ind=^J, is2=\E[7s\E[2;3;4;20;?6l\E[12;?5;?7h\E[1Q\E[0;1(D\E[8s, use=vi300, @@ -3843,7 +3813,7 @@ ovi300|visual 300 old, # use this termcap for the vi300 vi300-aw|visual 300 no autowrap, am@, xenl@, - cnorm=\E[?7h, cvvis=\E[?7l, use=vi300, + rmcup=\E[?7h, smcup=\E[?7l, use=vi300, # Visual 500 ptototype entry from University of Wisconsin. # The best place to look for the escape sequences is page A1-1 of the @@ -3900,6 +3870,7 @@ vi603|visual603|visual 603, # # All the following entries until (but not including) wy100q are direct from # Wyse technical support and represent their best knowledge as of January 1995. +# I canceled the bel capacities in the vb entries. # I made two trivial syntax fixes in the wyse30 entry. # # Note: The wyse75, wyse85, and wyse99 have been discontinued. @@ -3920,16 +3891,16 @@ wy30|wyse30|Wyse 30, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<10>, dim=\E`7\E), dl1=\ER$<1>, dsl=\EF\r, - ed=\EY$<80>, el=\ET, fsl=^M, home=^^, ht=\011$<1>, - hts=\E1, il1=\EE$<2>, ind=\n$<2>, ip=$<2>, - is2=\E'\E(\E\^3\E`9\016\024, kHOM=\E{, kbs=^H, - kcbt=\EI, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, - kdch1=\EW, kdl1=\ER, ked=\EY, kel=\ET, kent=\E7, - kf1=^A@\r, kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, - kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, - khome=^^, kich1=\EQ, kil1=\EE, knp=\EK, kpp=\EJ, - krpl=\Er, ll=^^^K, mc0=\EP, mc4=^T, mc5=^X, - nel=^M^J, pfx=\Ez%p1%'?'%+%c%p2%s\177, + ed=\EY$<80>, el=\ET, flash=\E`8$<100/>\E`9, fsl=^M, + home=^^, ht=\011$<1>, hts=\E1, il1=\EE$<2>, + ind=\n$<2>, ip=$<2>, is2=\E'\E(\E\^3\E`9\016\024, + kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=^H, kcud1=^J, + kcuf1=^L, kcuu1=^K, kdch1=\EW, kdl1=\ER, ked=\EY, + kel=\ET, kent=\E7, kf1=^A@\r, kf2=^AA\r, kf3=^AB\r, + kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, + kf8=^AG\r, khome=^^, kich1=\EQ, kil1=\EE, knp=\EK, + kpp=\EJ, krpl=\Er, ll=^^^K, mc0=\EP, mc4=^T, + mc5=^X, nel=^M^J, pfx=\Ez%p1%'?'%+%c%p2%s\177, pln=\Ez%p1%'/'%+%c%p2%s\r, prot=\E`7\E), ri=\Ej$<3>, rmacs=\EH^C, rmir=\Er, rmln=\EA11, rmso=\E(, @@ -3954,7 +3925,7 @@ wy30-mc|wyse30-mc|wyse 30 with magic cookies, # unset xon and delete the / from the delay. # i.e. change $<100/> to $<100> wy30-vb|wyse30-vb|wyse 30 visible bell, - flash=\E`8$<100/>\E`9, use=wy30, + bel@, use=wy30, # # The Wyse 50 can support one attribute (e.g. Dim, Inverse, # Normal) without magic cookies by using the protect mode. @@ -3974,18 +3945,18 @@ wy50|wyse50|Wyse 50, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<1>, dim=\E`7\E), dl1=\ER, dsl=\EF\r, - ed=\EY$<20>, el=\ET, fsl=^M, home=^^, ht=^I, - hts=\E1, il1=\EE, ind=\n$<2>, ip=$<1>, - is1=\E`\072\E`9$<30>, is2=\016\024\E'\E(, kHOM=\E{, - kbs=^H, kcbt=\EI, kcub1=^H, kcud1=^J, kcuf1=^L, - kcuu1=^K, kdch1=\EW, kdl1=\ER, ked=\EY, kel=\ET, - kent=\E7, kf1=^A@\r, kf10=^AI\r, kf11=^AJ\r, - kf12=^AK\r, kf13=^AL\r, kf14=^AM\r, kf15=^AN\r, - kf16=^AO\r, kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, - kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, - kf9=^AH\r, khome=^^, kich1=\EQ, kil1=\EE, knp=\EK, - kpp=\EJ, kprt=\EP, krpl=\Er, ll=^^^K, mc0=\EP, - mc4=^T, mc5=^X, nel=^M^J, + ed=\EY$<20>, el=\ET, flash=\E`8$<100/>\E`9, fsl=^M, + home=^^, ht=^I, hts=\E1, il1=\EE, ind=\n$<2>, + ip=$<1>, is1=\E`\072\E`9$<30>, is2=\016\024\E'\E(, + kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=^H, kcud1=^J, + kcuf1=^L, kcuu1=^K, kdch1=\EW, kdl1=\ER, ked=\EY, + kel=\ET, kent=\E7, kf1=^A@\r, kf10=^AI\r, + kf11=^AJ\r, kf12=^AK\r, kf13=^AL\r, kf14=^AM\r, + kf15=^AN\r, kf16=^AO\r, kf2=^AA\r, kf3=^AB\r, + kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, + kf8=^AG\r, kf9=^AH\r, khome=^^, kich1=\EQ, + kil1=\EE, knp=\EK, kpp=\EJ, kprt=\EP, krpl=\Er, + ll=^^^K, mc0=\EP, mc4=^T, mc5=^X, nel=^M^J, pfx=\Ez%p1%'?'%+%c%p2%s\177, pln=\Ez%p1%'/'%+%c%p2%s\r, prot=\E`7\E), rev=\E`6\E), ri=\Ej, rmacs=\EH^C, rmir=\Er, @@ -4011,13 +3982,13 @@ wy50-mc|wyse50-mc|wyse 50 with magic cookies, # unset xon and delete the / from the delay. # i.e. change $<100/> to $<100> wy50-vb|wyse50-vb|wyse 50 visible bell, - flash=\E`8$<100/>\E`9, use=wy50, + bel@, use=wy50, wy50-w|wyse50-w|wyse 50 132-column, cols#132, lw#7, nlab#16, wsl#97, cup=\Ea%i%p1%dR%p2%dC, dch1=\EW$<2>, is1=\E`;\E`9$<30>, use=wy50, wy50-wvb|wyse50-wvb|wyse 50 132-column visible bell, - flash=\E`8$<100/>\E`9, use=wy50-w, + bel@, use=wy50-w, # # The Wyse 350 is a Wyse 50 with color. # Unfortunately this means that it has magic cookies. @@ -4035,6 +4006,11 @@ wy50-wvb|wyse50-wvb|wyse 50 132-column visible bell, # sure that the wy350 runs better with this terminfo than it does # with the wy50 terminfo (with user adjusted colors). # +# The mandatory pause used by flash does not work with +# older versions of terminfo. If you see this effect then +# unset xon and delete the / from the delay. +# i.e. change $<100/> to $<100> +# wy350|wyse350|Wyse 350, am, bw, hs, mc5i, mir, xon, colors#8, cols#80, lh#1, lines#24, lw#8, ncv#55, @@ -4044,19 +4020,20 @@ wy350|wyse350|Wyse 350, cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<1>, dim=\EGp, dl1=\ER, dsl=\EF\r, - ed=\EY$<20>, el=\ET, fsl=^M, home=^^, ht=^I, - hts=\E1, il1=\EE, ind=\n$<2>, invis=\EG1, ip=$<1>, - is1=\E`\072\E`9$<30>, is2=\016\024\E'\E(, is3=\E%?, - kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=^H, kcud1=^J, - kcuf1=^L, kcuu1=^K, kdch1=\EW, kdl1=\ER, ked=\EY, - kel=\ET, kent=\E7, kf1=^A@\r, kf10=^AI\r, - kf11=^AJ\r, kf12=^AK\r, kf13=^AL\r, kf14=^AM\r, - kf15=^AN\r, kf16=^AO\r, kf2=^AA\r, kf3=^AB\r, - kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, - kf8=^AG\r, kf9=^AH\r, khome=^^, kich1=\EQ, - kil1=\EE, knp=\EK, kpp=\EJ, kprt=\EP, krpl=\Er, - ll=^^^K, mc0=\EP, mc4=^T, mc5=^X, nel=^M^J, - oc=\E%?, op=\EG0, pfx=\Ez%p1%'?'%+%c%p2%s\177, + ed=\EY$<20>, el=\ET, flash=\E`8$<100/>\E`9, fsl=^M, + home=^^, ht=^I, hts=\E1, il1=\EE, ind=\n$<2>, + invis=\EG1, ip=$<1>, is1=\E`\072\E`9$<30>, + is2=\016\024\E'\E(, is3=\E%?, kHOM=\E{, kbs=^H, + kcbt=\EI, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, + kdch1=\EW, kdl1=\ER, ked=\EY, kel=\ET, kent=\E7, + kf1=^A@\r, kf10=^AI\r, kf11=^AJ\r, kf12=^AK\r, + kf13=^AL\r, kf14=^AM\r, kf15=^AN\r, kf16=^AO\r, + kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, + kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, + khome=^^, kich1=\EQ, kil1=\EE, knp=\EK, kpp=\EJ, + kprt=\EP, krpl=\Er, ll=^^^K, mc0=\EP, mc4=^T, + mc5=^X, nel=^M^J, oc=\E%?, op=\EG0, + pfx=\Ez%p1%'?'%+%c%p2%s\177, pln=\Ez%p1%'/'%+%c%p2%s\r, prot=\EG0\E), rev=\EG4, ri=\Ej, rmacs=\EG0\EH\003, rmir=\Er, rmln=\EA11, rmso=\EG0, rmul=\EG0, setb= , @@ -4065,18 +4042,14 @@ wy350|wyse350|Wyse 350, sgr0=\EG0\E(\EH\003%{0}%PA%{0}%PC, smacs=\EG0\EH\002, smir=\Eq, smln=\EA10, smso=\EG4, smul=\EG8, tbc=\E0, tsl=\EF, -# The manditorary pause used by flash does not work with -# older versions of terminfo. If you see this effect then -# unset xon and delete the / from the delay. -# i.e. change $<100/> to $<100> wy350-vb|wyse350-vb|wyse 350 visible bell, - flash=\E`8$<100/>\E`9, use=wy350, + bel@, use=wy350, wy350-w|wyse350-w|wyse 350 132-column, cols#132, lw#7, nlab#16, wsl#97, cup=\Ea%i%p1%dR%p2%dC, dch1=\EW$<2>, is1=\E`;\E`9$<30>, use=wy350, wy350-wvb|wyse350-wvb|wyse 350 132-column visible bell, - flash=\E`8$<100/>\E`9, use=wy350-w, + bel@, use=wy350-w, # # This terminfo description is untested. # @@ -4110,9 +4083,10 @@ wy120|wyse120|wy150|wyse150|Wyse 120/150, clear=\E+$<50>, cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>, dim=\EGp, dl1=\ER$<3>, - dsl=\EF\r, ed=\EY$<50>, el=\ET$<4>, fsl=^M, - home=^^, ht=\011$<1>, hts=\E1, il1=\EE$<3>, - ind=\n$<3>, invis=\EG1, ip=$<2>, is1=\EcB0\EcC1, + dsl=\EF\r, ed=\EY$<50>, el=\ET$<4>, + flash=\E`8$<100/>\E`9, fsl=^M, home=^^, + ht=\011$<1>, hts=\E1, il1=\EE$<3>, ind=\n$<3>, + invis=\EG1, ip=$<2>, is1=\EcB0\EcC1, is2=\Ed$\EcD\E'\Er\EH\003\Ed/\EO\Ee1\Ed*\E`@\E`9\E`1\016\024\El, is3=\EwJ\Ew1$<150>, kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kdch1=\EW, @@ -4149,10 +4123,10 @@ wy120-25-w|wyse120-25-w|wy150-25-w|wyse150-25-w|wyse 120/150 132-column 25-lines pln@, rs3=\EwG\Ee)$<100>, use=wy120-w, # wy120-vb|wyse120-vb|wy150-vb|wyse150-vb|Wyse 120/150 visible bell, - flash=\E`8$<100/>\E`9, use=wy120, + bel@, use=wy120, # wy120-w-vb|wy120-wvb|wyse120-wvb|wy150-w-vb|wyse150-w-vb|Wyse 120/150 132-column visible bell, - flash=\E`8$<100/>\E`9, use=wy120-w, + bel@, use=wy120-w, # # The Wyse 60 is like the Wyse 50 but with more padding. # The reset strings are slow and the pad times very depending @@ -4190,8 +4164,9 @@ wy60|wyse60|Wyse 60, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<11>, dclk=\E`b, dim=\EGp, dl1=\ER$<5>, dsl=\EF\r, ed=\EY$<100>, el=\ET, - fsl=^M, home=^^, ht=\011$<1>, hts=\E1, il1=\EE$<4>, - ind=\n$<5>, invis=\EG1, ip=$<3>, is1=\EcB0\EcC1, + flash=\E`8$<100/>\E`9, fsl=^M, home=^^, + ht=\011$<1>, hts=\E1, il1=\EE$<4>, ind=\n$<5>, + invis=\EG1, ip=$<3>, is1=\EcB0\EcC1, is2=\Ed$\EcD\E'\Er\EH\003\Ed/\EO\Ee1\Ed*\E`@\E`9\E`1\016\024\El, is3=\EwJ\Ew1$<150>, kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kdch1=\EW, @@ -4247,9 +4222,9 @@ wy60-43-w|wyse60-43-w|wyse 60 132-column 43-lines, pln@, rs3=\Ee+$<150>, use=wy60-42-w, # wy60-vb|wyse60-vb|Wyse 60 visible bell, - flash=\E`8$<100/>\E`9, use=wy60, + bel@, use=wy60, wy60-w-vb|wy60-wvb|wyse60-wvb|Wyse 60 132-column visible bell, - flash=\E`8$<100/>\E`9, use=wy60-w, + bel@, use=wy60-w, # The Wyse-99GT looks at lot like the Wyse 60 except that it # does not have the 42/43 line mode. In the Wyse-60 the "lines" @@ -4269,10 +4244,11 @@ wy60-w-vb|wy60-wvb|wyse60-wvb|Wyse 60 132-column visible bell, wy99gt|wyse99gt|Wyse 99gt, msgr@, clear=\E+$<130>, dch1=\EW$<7>, dl1=\ER$<4>, - ed=\Ey$<130>, el=\Et$<5>, ht=\011$<1>, il1=\EE$<4>, - ind=\n$<4>, ip=$<2>, is3=\Ew0$<20>, nel@, - ri=\Ej$<3>, rmcup=\Ew0, rs2=\E`\072$<150>, - smcup=\Ew1, u0=\E~>\E8, u1=\E[42h, use=wy60, + ed=\Ey$<130>, el=\Et$<5>, flash=\E`8$<100/>\E`9, + ht=\011$<1>, il1=\EE$<4>, ind=\n$<4>, ip=$<2>, + is3=\Ew0$<20>, nel@, ri=\Ej$<3>, rmcup=\Ew0, + rs2=\E`\072$<150>, smcup=\Ew1, u0=\E~>\E8, + u1=\E[42h, use=wy60, # wy99gt-w|wyse99gt-w|wyse 99gt 132-column, cols#132, lw#7, nlab#16, wsl#97, @@ -4289,10 +4265,10 @@ wy99gt-25-w|wyse99gt-25-w|wyse 99gt 132-column 25-lines, pln@, rs2=\E`;$<150>, use=wy99gt-w, # wy99gt-vb|wyse99gt-vb|Wyse 99gt visible bell, - flash=\E`8$<100/>\E`9, use=wy99gt, + bel@, use=wy99gt, # wy99gt-w-vb|wy99gt-wvb|wyse99gt-wvb|Wyse 99gt 132-column visible bell, - flash=\E`8$<100/>\E`9, use=wy99gt-w, + bel@, use=wy99gt-w, # # The Wyse 160 is combination of the WY-60 and the WY-99gt. # The reset strings are slow and the pad times very depending @@ -4320,8 +4296,9 @@ wy160|wyse160|Wyse 160, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<5>, dclk=\E`b, dim=\EGp, dl1=\ER$<1>, dsl=\EF\r, ed=\EY$<30>, el=\ET$<5>, - fsl=^M, home=^^, ht=^I, hts=\E1, il1=\EE$<1>, - ind=\n$<1>, invis=\EG1, ip=$<2>, is1=\EcB0\EcC1, + flash=\E`8$<100/>\E`9, fsl=^M, home=^^, ht=^I, + hts=\E1, il1=\EE$<1>, ind=\n$<1>, invis=\EG1, + ip=$<2>, is1=\EcB0\EcC1, is2=\Ed$\EcD\E'\Er\EH\003\Ed/\EO\Ee1\Ed*\E`@\E`9\E`1\016\024\El, is3=\Ew0$<100>, kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kdch1=\EW, @@ -4374,9 +4351,9 @@ wy160-43-w|wyse160-43-w|wyse 160 132-column 43-lines, pln@, rs3=\Ee+$<150>, use=wy160-42-w, # wy160-vb|wyse160-vb|Wyse 160 visible bell, - flash=\E`8$<100/>\E`9, use=wy160, + bel@, use=wy160, wy160-w-vb|wy160-wvb|wyse160-wvb|Wyse 160 132-column visible bell, - flash=\E`8$<100/>\E`9, use=wy160-w, + bel@, use=wy160-w, # # The Wyse 75 is a vt100 lookalike without advanced video. # @@ -4402,10 +4379,10 @@ wy75|wyse75|wyse 75, dl=\E[%p1%dM$<1*>, dl1=\E[M, dsl=\E[>\\\054\001\001\E[>-\001\001, ech=\E[%p1%dX, ed=\E[J$<30>, el=\E[K$<3>, el1=\E[1K$<3>, - enacs=\E)0, fsl=^A, home=\E[H, hpa=\E[%i%p1%dG, - ht=^I, hts=\EH, ich=\E[%p1%d@$<1*>, - il=\E[%p1%dL$<2*>, il1=\E[L$<2>, ind=\n$<2>, - ip=$<1>, + enacs=\E)0, flash=\E[30h\E\\\054\E[30l$<250>, + fsl=^A, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, + ich=\E[%p1%d@$<1*>, il=\E[%p1%dL$<2*>, + il1=\E[L$<2>, ind=\n$<2>, ip=$<1>, is1=\E[2;4;20;30l\E[?1;10l\E[12h\E[?7;8;25h, is2=\E>\E(B\E)0\017, is3=\E[m, ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\E[D, @@ -4442,13 +4419,13 @@ wy75-mc|wyse75-mc|wyse 75 with magic cookies, smul=\E[8p, use=wy75, wy75-vb|wyse75-vb|wyse 75 with visible bell, pb@, - flash=\E[30h\E\\\054\E[30l$<250>, use=wy75, + bel@, use=wy75, wy75-w|wyse75-w|wyse 75 in 132 column mode, cols#132, wsl#130, rs2=\E[35h\E[?3h$<80>, use=wy75, wy75-wvb|wyse75-wvb|wyse 75 with visible bell 132 columns, pb@, - flash=\E[30h\E\\\054\E[30l$<250>, use=wy75-w, + bel@, use=wy75-w, # # Wyse 85 emulating a vt220 7 bit mode. # 24 line screen with status line. @@ -4475,7 +4452,8 @@ wy85|wyse85|wyse 85, dch1=\E[P$<3>, dim=\E[2m, dl=\E[%p1%dM$<3*>, dl1=\E[M$<3>, dsl=\E[40l, ech=\E[%p1%dX, ed=\E[J$<110>, el=\E[K$<1>, el1=\E[1K, enacs=\E)0, - fsl=\E[1;24r\E8, home=\E[H, ht=\011$<1>, hts=\EH, + flash=\E[30h\E\\\054\E[30l$<300>, fsl=\E[1;24r\E8, + home=\E[H, ht=\011$<1>, hts=\EH, ich=\E[%p1%d@$<4*>, il=\E[%p1%dL$<5*>, il1=\E[L$<5>, ind=\n$<3>, invis=\E[8m, ip=$<3>, is1=\E[62;1"p\E[?5W, @@ -4502,7 +4480,7 @@ wy85|wyse85|wyse 85, # # Wyse 85 with visual bell. wy85-vb|wyse85-vb|wyse 85 with visible bell, - flash=\E[30h\E\\\054\E[30l$<300>, use=wy85, + bel@, flash=\E[30h\E\\\054\E[30l$<300>, use=wy85, # # Wyse 85 in 132-column mode. wy85-w|wyse85-w|wyse 85 in 132-column mode, @@ -4511,7 +4489,7 @@ wy85-w|wyse85-w|wyse 85 in 132-column mode, # # Wyse 85 in 132-column mode with visual bell. wy85-wvb|wyse85-wvb|wyse 85 with visible bell 132-columns, - flash=\E[30h\E\\\054\E[30l$<300>, use=wy85-w, + bel@, use=wy85-w, # # Wyse 185 emulating a vt320 7 bit mode. # @@ -4537,10 +4515,11 @@ wy185|wyse185|wyse 185, dch1=\E[P$<3>, dim=\E[2m, dl=\E[%p1%dM$<2*>, dl1=\E[M$<2>, dsl=\E7\E[99;0H\E[K\E8, ech=\E[%p1%dX, ed=\E[J$<40>, el=\E[K, el1=\E[1K, - enacs=\E)0, fsl=\E[1;24r\E8, home=\E[H, - hpa=\E[%i%p1%d`, ht=^I, hts=\EH, ich=\E[%p1%d@$<2>, - il=\E[%p1%dL$<3*>, il1=\E[L$<3>, ind=\n$<2>, - invis=\E[8m, ip=$<4>, is1=\E[?5W, + enacs=\E)0, flash=\E[30h\E\\\054\E[30l$<100>, + fsl=\E[1;24r\E8, home=\E[H, hpa=\E[%i%p1%d`, ht=^I, + hts=\EH, ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, + il1=\E[L$<3>, ind=\n$<2>, invis=\E[8m, ip=$<4>, + is1=\E[?5W, is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25h, is3=\E>\E(B\E)0\017\E[m, ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, @@ -4571,7 +4550,7 @@ wy185-24|wyse185-24|wyse 185 with 24 data lines, # # Wyse 185 with visual bell. wy185-vb|wyse185-vb|wyse 185+flash, - flash=\E[30h\E\\\054\E[30l$<100>, use=wy185, + bel@, use=wy185, # # Wyse 185 in 132-column mode. wy185-w|wyse185-w|wyse 185 in 132-column mode, @@ -4581,7 +4560,7 @@ wy185-w|wyse185-w|wyse 185 in 132-column mode, # # Wyse 185 in 132-column mode with visual bell. wy185-wvb|wyse185-wvb|wyse 185+flash+132 cols, - flash=\E[30h\E\\\054\E[30l$<100>, use=wy185-w, + bel@, use=wy185-w, # wy325 terminfo entries # Done by Joe H. Davis 3-9-92 @@ -4597,9 +4576,10 @@ wy325|wyse325|Wyse epc, clear=\E+$<50>, cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>, dim=\EGp, dl1=\ER$<3>, - dsl=\EF\r, ed=\EY$<50>, el=\ET$<4>, fsl=^M, - home=^^, ht=^I, hts=\E1, il1=\EE$<3>, ind=\n$<3>, - invis=\EG1, ip=$<2>, is1=\EcB0\EcC1, + dsl=\EF\r, ed=\EY$<50>, el=\ET$<4>, + flash=\E`8$<100/>\E`9, fsl=^M, home=^^, ht=^I, + hts=\E1, il1=\EE$<3>, ind=\n$<3>, invis=\EG1, + ip=$<2>, is1=\EcB0\EcC1, is2=\EcD\E'\Er\EH\003\Ed/\EO\Ee1\Ed*\E`@\E`9\E`1\016\024\El, is3=\Ew0$<16>, kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kdch1=\EW, @@ -4626,7 +4606,7 @@ wy325|wyse325|Wyse epc, # lines 24 columns 80 vb # wy325-vb|wyse325-vb|wyse-325 with visual bell, - flash=\E`8$<100/>\E`9, use=wy325, + bel@, use=wy325, # # lines 24 columns 132 @@ -4651,7 +4631,7 @@ wy325-25w|wyse325-25w|wy325 132 columns, # lines 25 columns 132 vb # wy325-w-vb|wy325-wvb|wyse325-wvb|wyse-325 wide mode reverse video, - flash=\E`8$<100/>\E`9, use=wy325-w, + bel@, use=wy325-w, # # lines 42 columns 80 @@ -4669,13 +4649,13 @@ wy325-42w|wyse325-42w|wyse-325 42 lines wide mode, # lines 42 columns 132 vb # wy325-42w-vb|wy325-42wvb|wyse-325 42 lines wide mode visual bell, - flash=\E`8$<100/>\E`9, use=wy325-w, + bel@, use=wy325-w, # # lines 43 columns 80 # wy325-43|wyse325-43|wyse-325 43 lines, lh@, lines#43, lw@, nlab@, - pln@, rs3=\EwG\Ee)$<100>, use=wy325, + pln@, use=wy325, # # lines 43 columns 132 # @@ -4686,10 +4666,9 @@ wy325-43w|wyse325-43w|wyse-325 43 lines wide mode, # lines 43 columns 132 vb # wy325-43w-vb|wy325-43wvb|wyse-325 43 lines wide mode visual bell, - flash=\E`8$<100/>\E`9, use=wy325-w, -# Wyse 370 -# -# 24 line screen with status line. + bel@, use=wy325-w, + +# Wyse 370 -- 24 line screen with status line. # # The terminal may have to be set for 8 data bits and 2 stop # bits for the arrow keys to work. @@ -4721,7 +4700,8 @@ wy370-nk|wyse 370 without function keys, dch1=\E[P$<1>, dclk=\E[31h, dim=\E[2m, dl=\E[%p1%dM$<2*>, dl1=\E[M$<2>, dsl=\E[40l, ech=\E[%p1%dX$<.1*>, ed=\E[J$<40>, el=\E[K$<10>, - el1=\E[1K$<12>, enacs=\E)0, fsl=\E[1;24r\E8, + el1=\E[1K$<12>, enacs=\E)0, + flash=\E[30h\E\\\054\E[30l$<300>, fsl=\E[1;24r\E8, home=\E[H, hpa=\E[%i%p1%d`, ht=\011$<1>, hts=\EH, ich=\E[%p1%d@$<1*>, il=\E[%p1%dL$<2*>, il1=\E[L$<2>, ind=\n$<2>, @@ -4788,7 +4768,7 @@ wy370|wyse370|Wyse 370, # # Wyse 370 with visual bell. wy370-vb|Wyse 370 with visible bell, - flash=\E[30h\E\\\054\E[30l$<300>, use=wy370, + bel@, use=wy370, # # Wyse 370 in 132-column mode. wy370-w|Wyse 370 in 132-column mode, @@ -4866,7 +4846,7 @@ kermit|standard kermit, el=\EK, home=\EH, is2=K0 Standard Kermit 9-25-84\n, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, -kermitam|standard kermit plus auto-margin, +kermit-am|standard kermit plus auto-margin, am, is2=K1 Standard Kermit plus Automatic Margins\n, use=kermit, # IBMPC Kermit 1.2. @@ -4931,6 +4911,7 @@ msk22714|mskermit22714|UCB MS-DOS Kermit 2.27 UCB 227.14 IBM PC, # This was designed for a VT320 emulator, but it is probably a good start # at support for the VT320 itself. # Please send changes with explanations to bug-gnu-emacs@prep.ai.mit.edu. +# (vt320-k3: I added rmam/smam based on the init string -- esr) vt320-k3|MS-Kermit 3.00's vt320 emulation, am, eslok, hs, km, mir, msgr, xenl, cols#80, it#8, lines#49, pb#9600, vt#3, @@ -4951,14 +4932,14 @@ vt320-k3|MS-Kermit 3.00's vt320 emulation, kf8=\E[19~, kf9=\E[20~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, nel=^M^J, rc=\E8, rev=\E[7m, ri=\EM, rin=\E[%p1%dL, - rmacs=\E(B, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[27m, rmul=\E[24m, + rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E(B\E)B\E>\E F\E[4;20l\E[12h\E[?1;5;6;38;42l\E[?7;25h\E4i\E?4i\E[m\E[r\E[2$~, - sc=\E7, sgr0=\E[m, smacs=\E(0, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[1$}\r\E[K, vpa=\E[%i%p1%dd, + sc=\E7, sgr0=\E[m, smacs=\E(0, smam=\E[?7h, + smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + tbc=\E[3g, tsl=\E[1$}\r\E[K, vpa=\E[%i%p1%dd, # From: Joseph Gil 13 Dec 1991 -# (I removed a bogus boolean :mo: and added msgr -- esr) +# (I removed a bogus boolean :mo: and added msgr,smam,rmam -- esr) vt320-k311|dec vt320 series as defined by kermit 3.11, am, eslok, hs, mir, msgr, xenl, xon, cols#80, it#8, lines#24, vt#3, @@ -4979,10 +4960,11 @@ vt320-k311|dec vt320 series as defined by kermit 3.11, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, nel=^M\ED, rc=\E8, rev=\E[7m, rf=/usr/lib/tabset/vt100, - ri=\EM, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, - rmul=\E[24m, rs1=\E[?3l, sc=\E7, sgr0=\E[m, - smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, tsl=\E[2$~\E[1$}\E[1;%dH, + ri=\EM, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, + rmso=\E[27m, rmul=\E[24m, rs1=\E[?3l, sc=\E7, + sgr0=\E[m, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, + smso=\E[7m, smul=\E[4m, tbc=\E[3g, + tsl=\E[2$~\E[1$}\E[1;%dH, ######## NON-ANSI TERMINAL EMULATIONS # @@ -5009,7 +4991,7 @@ vt320-k311|dec vt320 series as defined by kermit 3.11, avatar0|avatar terminal emulator level 0, am, bce, msgr, cols#80, it#8, lines#25, - blink=^A^V^_, bold=^V^A^P, cr=^M, cub1=^V^E, + blink=^A^V\177, bold=^V^A^P, cr=^M, cub1=^V^E, cud1=^V^D, cuf1=^V^F, cup=\026\010%p1%c%p2%c, cuu1=^V^C, el=^V^G, ind=^J, invis=^V^A\200, rep=\031%p1%c%p2%d, rev=^A^Vp, rs2=^L, @@ -5060,12 +5042,6 @@ att2300|sv80|AT&T 2300 Video Information Terminal 80 column mode, smso=\E[7m, att2350|AT&T 2350 Video Information Terminal 80 column mode, mc0@, mc4@, mc5@, use=att2300, -att2300-x40|sv40|AT&T 2300 Video Information Terminal 40 column mode, - cols#40, it#5, lines#23, - il@, il1@, use=att2300, -att2350-x40|AT&T 2350 Video Information Terminal 40 column mode, - cols#40, it#5, lines#23, - il@, il1@, use=att2350, # Must setup RETURN KEY - CR, REC'VD LF - INDEX. # Seems upward compatible with vt100, plus ins/del line/char. @@ -5107,21 +5083,12 @@ att4410v1-w|att5410v1-w|tty5410v1-w|AT&T 4410/5410 132 columns - version 1, att4410|att5410|tty5410|AT&T 4410/5410 80 columns - version 2, pfx=\E[%p1%d;%p2%l%02dq f%p1%d %p2%s, use=att5410v1, -att4410-nfk|att5410-nfk|4410-nfk|tty5410-nfk|5410-nfk|version 1 AT&T 4410/5410 entry without function keys, - is3@, kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, - kf8@, pln@, use=att4410, - att5410-w|att4410-w|4410-w|tty5410-w|5410-w|AT&T 4410/5410 in 132 column mode, cols#132, wsl#132, is1=\E[?3h\E)0, rs2=\Ec\E[?3h\E[2;0y, use=att4410, -att5410-ns|4410-ns|att4410-ns|tty5410-ns|tty5410 entry without pln defined, - pln@, use=att4410, - -otty5410|teletype 5410 for S5R2 curses, - tsl=\E7\E[25;%p1%{1}%+%dH, use=att4410, - # 5410 in terms of a vt100 +# (v5410: added rmam/smam based on init string -- esr) v5410|5410 in terms of a vt100, am, mir, msgr, xon, cols#80, it#8, lines#24, vt#3, @@ -5138,12 +5105,13 @@ v5410|5410 in terms of a vt100, kent=\EOM, kf0=\EOy, kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, rev=\E[7m$<2>, - ri=\EM$<5>, rmacs=^O, rmkx=\E[?1l\E>, + ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017$<2>, smacs=^N, smkx=\E[?1h\E=, - smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, + smkx=\E[?1h\E=, smso=\E[1;7m$<2>, smul=\E[4m$<2>, + tbc=\E[3g, # # Teletype Model 5420 -- A souped up 5410, with multiple windows, @@ -5181,6 +5149,7 @@ v5410|5410 in terms of a vt100, # It also sets up labels f1, f2, ..., f8, and sends edit keys. # This string causes them to send the strings kf1-kf8 # when pressed in SYS PF mode. +# (att4415: I added rmam/smam based on the init string -- esr) att4415|tty5420|att5420|AT&T 4415/5420 80 cols, db, mir, xon, lh#2, lm#78, lw#8, nlab#8, wsl#55, @@ -5203,10 +5172,10 @@ att4415|tty5420|att5420|AT&T 4415/5420 80 cols, mc4=\E[?9i, mc5=\E[?4i, mrcup=\E[%i%p1%d;%p2%dt, pfx=\E[%p1%d;%p2%l%02dq F%p1%d %p2%s, pln=\E[%p1%d;0;0;0q%p2%\072-16.16s, prot=\EV, - rin=\E[%p1%dF, rmir=\E[4l, + rin=\E[%p1%dF, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[19;0j\E[21;1j\212, rmln=\E|, sgr=\E[0%?%p1%p5%|%t;2%;%?%p2%p6%|%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smir=\E[4h, + sgr0=\E[m\017, smam=\E[?7h, smir=\E[4h, smkx=\E[19;1j\E[21;4j\Eent, smln=\E~, tbc=\E[3g, tsl=\E7\E[25;%p1%{8}%+%dH, vpa=\E[%p1%{1}%+%dd, use=att4410, @@ -5366,6 +5335,7 @@ att4424-1|tty4424-1|teletype 4424 in display function group I, # # This has been tested on a preliminary model. # +# (att5425: added rmam/smam based on the init string -- esr) att5425|tty5425|att4425|AT&T 4425/5425, am, da, db, hs, mir, msgr, xenl, xon, cols#80, it#8, lh#2, lines#24, lm#78, lw#8, nlab#8, @@ -5396,10 +5366,11 @@ att5425|tty5425|att4425|AT&T 4425/5425, pfx=\E[%p1%d;%p2%l%02dq F%p1%1d %p2%s, pln=\E[%p1%d;0;0;0q%p2%\072-16.16s, prot=\EV, rc=\E8, rev=\E[7m, ri=\EM, rin=\E[%p1%dF, rmacs=^O, - rmir=\E[4l, rmkx=\E[21;0j\E[25;1j\212, rmln=\E|, - rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y, sc=\E7, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E[21;0j\E[25;1j\212, + rmln=\E|, rmso=\E[m, rmul=\E[m, + rs2=\Ec\E[?3l\E[2;0y, sc=\E7, sgr=\E[0%?%p1%p5%|%t;2%;%?%p2%p6%|%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smir=\E[4h, + sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, smkx=\E[21;1j\E[25;4j\Eent\E~, smln=\E~, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E7\E[25;%p1%{8}%+%dH, vpa=\E[%p1%{1}%+%dd, @@ -5407,20 +5378,11 @@ att5425|tty5425|att4425|AT&T 4425/5425, att5425-nl|tty5425-nl|att4425-nl|AT&T 4425/5425 80 columns no labels, smkx=\E[21;1j\E[25;4j\Eent, use=att4425, -att5425-nl-w|tty5425-nl-w|att4425-nl-w|AT&T 4425/5425 132 columns no labels, - smkx=\E[21;1j\E[25;4j\Eent, use=att4425-w, - -tty5425-fk|att4425-fk|AT&T 4425/5425 without function keys, - rmkx@, smkx@, use=att5425, - att5425-w|att4425-w|tty5425-w|teletype 4425/5425 in 132 column mode, cols#132, lm#54, wsl#97, is1=\E[?3h$<100>, use=tty5425, -tty5425-w-fk|att4425-w-fk|att5425-w-fk|AT&T 4425/5425 without function keys in wide mode, - rmkx@, smkx@, use=att5425-w, - -# This had bogus capabilities: ri=\EM, ri=\E[1U, +# (att4426: his had bogus capabilities: ri=\EM, ri=\E[1U. I added rmam/smam) att4426|tty4426|teletype 4426S, am, da, db, xon, cols#80, lines#24, lm#48, @@ -5439,8 +5401,9 @@ att4426|tty4426|teletype 4426S, kf6=\EOU, kf7=\EOV, kf8=\EOW, khome=\E[H, kll=\E[24;1H, ll=\E[24H, nel=^M^J, rc=\E8, rev=\E[7m, ri=\ET, rin=\E[%p1%dT, rmacs=\E(B, - rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y, sc=\E7, - sgr0=\E[m\E(B, smacs=\E(0, smso=\E[5m, smul=\E[4m, + rmam=\E[?7l, rmso=\E[m, rmul=\E[m, + rs2=\Ec\E[?3l\E[2;0y, sc=\E7, sgr0=\E[m\E(B, + smacs=\E(0, smam=\E[?7h, smso=\E[5m, smul=\E[4m, tbc=\E[3g, vpa=\E[%p1%dd, # Terminfo entry for the AT&T 510 A Personal Terminal @@ -5521,7 +5484,8 @@ att510d|510d|bct510d|510D|AT&T 510D Personal Terminal, smul=\E[4m, smxon=\E[29;0|, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, -att513|att513-page|513-page|attis513-pfk|513bct|AT&T 513 using page mode, +# (att500: I merged this with the att513 entry, att500 just used att513 -- esr) +att500|att513|500bct|513bct|AT&T 513 using page mode, am, chts, mir, msgr, xenl, xon, cols#80, lh#2, lines#24, lw#8, nlab#8, acsc=hrisjjkkllmmnnqqttuuvvwwxx{{||}}~~-f\\\054h.e+g`b, @@ -5574,9 +5538,6 @@ att513|att513-page|513-page|attis513-pfk|513bct|AT&T 513 using page mode, smkx=\E[19;1|\E[21;4|\Eent, smln=\E?, smso=\E[7m, smul=\E[4m, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, -att500|bct500|500|AT&T-IS 500 terminal, - use=att513, - # 01-07-88 # printer must be set to EMUL ANSI to accept ESC codes # cuu1 stops at top margin @@ -5584,7 +5545,7 @@ att500|bct500|500|AT&T-IS 500 terminal, # and alt font ascii,wrap on,tabs cleared # is2 disables newline on LF,Emphasized off # The u0 capability sets form length -att5320|AT&T Model 5320 matrix printer, +att5310|att5320|AT&T Model 53210 or 5320 matrix printer, xhpa, xvpa, bufsz#8192, cols#132, cps#120, it#8, lines#66, orc#10, orhi#100, orl#12, orvi#72, @@ -5601,9 +5562,6 @@ att5320|AT&T Model 5320 matrix printer, smgrp=\E[;%{1}%p1%+%ds, smgtp=\E[%p1%dr, sshm=\E[5m, u0=\E[%p1%dt, vpa=\E[%p1%dd, -att5310|AT&T 5310 matrix printer, - cols#80, use=att5320, - # 5620 terminfo (2.0 or later ROMS with char attributes) # assumptions: ind (scroll forward one line) is only done at screen bottom # For more, see the 5620 FAQ maintained by David Breneman . @@ -5680,6 +5638,7 @@ att605-pc|605bct-pc|ATT 605 in pc term mode, att605-w|605bct-w|AT&T 605-w 132 column 102 key keyboard, cols#132, wsl#132, is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h\E(B\E)0, use=att605, +# (att610: I added rmam/smam based on the init string -- esr) att610|610bct|AT&T 610; 80 column; 98key keyboard, am, eslok, hs, mir, msgr, xenl, xon, cols#80, it#8, lh#2, lines#24, lw#8, nlab#8, @@ -5707,12 +5666,13 @@ att610|610bct|AT&T 610; 80 column; 98key keyboard, mc5=\E[?5i, nel=\EE, pfx=\E[%p1%d;%p2%l%02dq F%p1%1d %p2%s, pln=\E[%p1%d;0;0;0q%p2%\072-16.16s, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=^O, rmir=\E[4l, - rmln=\E[2p, rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l, - sc=\E7, + rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, + rmir=\E[4l, rmln=\E[2p, rmso=\E[m, rmul=\E[m, + rs2=\Ec\E[?3l, sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smir=\E[4h, smln=\E[p, - smso=\E[7m, smul=\E[4m, tsl=\E7\E[25;%i%p1%dx, + sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, + smln=\E[p, smso=\E[7m, smul=\E[4m, + tsl=\E7\E[25;%i%p1%dx, att610-w|610bct-w|AT&T 610; 132 column; 98key keyboard, cols#132, wsl#132, is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, use=att610, @@ -5761,6 +5721,7 @@ att615-103k|615-103k|615mt-103k|AT&T 615; 80 column; 103key keyboard, kLFT=\E[ A, kRIT=\E[ @, use=att610-103k, att615-103k-w|615-103k-w|615mt-103k-w|AT&T 615; 132 column; 103key keyboard, kLFT=\E[ A, kRIT=\E[ @, use=att610-103k-w, +# (att620: I added rmam/smam based on the init string -- esr) att620|620mtg|AT&T 620; 80 column; 98key keyboard, am, eslok, hs, mir, msgr, xenl, xon, cols#80, it#8, lh#2, lines#24, lw#8, nlab#8, @@ -5796,12 +5757,12 @@ att620|620mtg|AT&T 620; 80 column; 98key keyboard, mc4=\E[?4i, mc5=\E[?5i, nel=\EE, pfx=\E[%p1%d;%p2%l%02dq F%p1%1d %p2%s, pln=\E[%p1%d;0;0;0q%p2%\072-16.16s, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=\E(B\017, rmir=\E[4l, - rmln=\E[2p, rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l, - sc=\E7, + rev=\E[7m, ri=\EM, rmacs=\E(B\017, rmam=\E[?7l, + rmir=\E[4l, rmln=\E[2p, rmso=\E[m, rmul=\E[m, + rs2=\Ec\E[?3l, sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\E(B\017, smacs=\E)0\016, smir=\E[4h, - smln=\E[p, smso=\E[7m, smul=\E[4m, + sgr0=\E[m\E(B\017, smacs=\E)0\016, smam=\E[?7h, + smir=\E[4h, smln=\E[p, smso=\E[7m, smul=\E[4m, tsl=\E7\E[25;%i%p1%dx, att620-w|620-w|620mtg-w|AT&T 620; 132 column; 98key keyboard, cols#132, wsl#132, @@ -5872,6 +5833,7 @@ att630-24|5630-24|5630DMD-24|630MTG-24|AT&T 630 windowing terminal 24 lines, # kHOM has been commented out. The user can uncomment kHOM if using the # 102, 102+1, or 122 key keyboards # kHOM=\E[2J, +# (att730: I added rmam/smam based on the init string -- esr) att730|730MTG|AT&T 730 windowing terminal, am, da, db, eslok, hs, mir, msgr, npc, xenl, xon, cols#80, it#8, lh#2, lines#60, lm#0, lw#8, nlab#24, @@ -5910,12 +5872,13 @@ att730|730MTG|AT&T 730 windowing terminal, pfxl=\E[%p1%d;%p2%l%02d;0;0q%p3%\072-16.16s%p2%s, pln=\E[%p1%d;0;0;0q%p2%\072-16.16s, rc=\E8, rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, ri=\EM, - rmacs=^O, rmir=\E[4l, rmln=\E[?13h, rmso=\E[27m, - rmul=\E[24m, rmxon=\E[?21l, rs2=\Ec\E[?3l, sc=\E7, + rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmln=\E[?13h, + rmso=\E[27m, rmul=\E[24m, rmxon=\E[?21l, + rs2=\Ec\E[?3l, sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smir=\E[4h, smln=\E[?13l, - smso=\E[7m, smul=\E[4m, smxon=\E[?21h, swidm=\E#6, - tsl=\E7\E[;%i%p1%dx, + sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, + smln=\E[?13l, smso=\E[7m, smul=\E[4m, + smxon=\E[?21h, swidm=\E#6, tsl=\E7\E[;%i%p1%dx, att730-41|730MTG-41|AT&T 730-41 windowing terminal Version, lines#41, use=att730, att730-24|730MTG-24|AT&T 730-24 windowing terminal Version, @@ -6179,6 +6142,7 @@ ampex210|a210|ampex a210, kf5=^A5\r, kf6=^A6\r, kf7=^A7\r, kf8=^A8\r, kf9=^A9\r, khome=^^, rmso=\EG0, rmul=\EG0, smso=\EG4, smul=\EG8, tsl=\E.0\Eg\E}\Ef, +# (ampex219: I added rmam/smam based on the init string -- esr) ampex219|ampex-219|amp219|Ampex with Automargins, hs, xenl, cols#80, it#8, lines#24, @@ -6193,9 +6157,9 @@ ampex219|ampex-219|amp219|Ampex with Automargins, kf0=\E[21~, kf1=\E[7~, kf2=\E[8~, kf3=\E[9~, kf4=\E[10~, kf5=\E[11~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H, rev=\E[7m, - ri=$<5>\EM, rmkx=\E>, rmso=$<2>\E[m, rmul=$<2>\E[m, - sgr0=\E[m, smkx=\E=, smso=$<2>\E[7m, - smul=$<2>\E[4m, + ri=$<5>\EM, rmam=\E[?7l, rmkx=\E>, rmso=$<2>\E[m, + rmul=$<2>\E[m, sgr0=\E[m, smam=\E[?7h, smkx=\E=, + smso=$<2>\E[7m, smul=$<2>\E[4m, ampex219w|ampex-219w|amp219w|Ampex 132 cols, cols#132, lines#24, bel=^G, cr=^M, cud1=^J, cvvis=\E[?3h, ind=^J, @@ -6345,7 +6309,7 @@ annarbor4080|aa4080|ann arbor 4080, tbc=^\^P^P, # If you're using the GNU termcap library, add -# :cS=\E[%d;%d;%d;%dp: +# :cS=\E[%p1%d;%p2%d;%p3%d;%p4%dp: # to these capabilities. This is the nonstandard GNU termcap scrolling # capability, arguments are: # 1. Total number of lines on the screen. @@ -6609,8 +6573,6 @@ regent60|regent200|Adds Regent 60, dch1=\EE, is2=\EV\EB, kdch1=\EE, kich1=\EF, krmir=\EF, rmir=\EF, rmso=\ER\E0@\EV, smir=\EF, smso=\ER\E0P\EV, use=regent40+, -regent60na|regent 60 w/no arrow keys, - kcub1@, kcud1@, kcuf1@, kcuu1@, use=regent60, # From: Thu Jul 9 09:27:33 1981 # (viewpoint: added kcuf1, kf* and dl1 capabilities -- esr) viewpoint|addsviewpoint|adds viewpoint, @@ -6623,15 +6585,10 @@ viewpoint|addsviewpoint|adds viewpoint, kcud1=^J, kcuf1=^F, kcuu1=^Z, kf0=^B1, kf2=^B2, kf3=^B!, kf4=^B", kf5=^B#, khome=^A, ll=^A, rmso=^O, rmul=^O, smso=^N, smul=^N, +# Some viewpoints have bad ROMs that foo up on ^O screwpoint|adds viewpoint with ^O bug, - am, - cols#80, lh#0, lines#24, lw#0, nlab#0, - bel=^G, clear=\014$<10.1*>, cr=^M, cub1=^H, - cud1=^J, cuf1=^F, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<6>, cuu1=^Z, - dl1=\El, ed=\Ek$<16.1*>, el=\EK$<16>, ind=^J, - is2=^G, kcub1=^U, kcud1=^J, kcuf1=^F, kcuu1=^Z, - khome=^A, ll=^A, + cvvis@, rmso@, rmul@, smso@, smul@, use=viewpoint, + # From: Jay S. Rouman 5 Jul 92 # The civis/cnorm/sgr/sgr0 strings were added by ESR from specs. # Theory; the 3a+ wants \E0%c to set highlights, where normal=01000000, @@ -6705,41 +6662,24 @@ cit80|cit-80|citoh 80, ff=^L, ind=^J, is2=\E>, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rmkx=\E[?1l\E>, smkx=\E[?1h\E=, -# Alternate cit101 (vt100 em) file used in vt100. -# Uses 23 lines so can run citsys (like h19sys). -# 24 May 85 (mtxinu!sybase!tim) - removed 2-byte limit on :cm: cursor -# coordinates otherwise there is garbling on long lines in -# co#132 mode; also added support for multipage memory on the Itoh. # From: Tim Wood Fri Sep 27 09:39:12 PDT 1985 -citc|Citoh fast vt100, +# (cit101: added rmam/smam based on init string, merged this with c101 -- esr) +cit101|citc|C.itoh fast vt100, am, xenl, - cols#80, lines#23, - clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E7\E[U, - dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, + cols#80, lines#24, + bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, + cvvis=\E7\E[U, dch1=\E[P, dl1=\E[M, ed=\E[J, + el=\E[K, flash=\E[?5h\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\E[?5l, ich1=\E[@, il1=\E[L, is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, -cita, - am, xenl, - cols#80, lines#23, - clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E7\E[U, - ed=\E[J, el=\E[K, - flash=\E[?5h\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\E[?5l, - is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, -cit101|Citoh 101, - lines#24, - flash@, use=citc, -cit101b|Citoh 101b, - lines#24, use=citc, + rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, + smul=\E[4m, # The CIT-500 was unusual in that it had a portrait-style display. +# (cit500: I added rmam/smam based on the init string -- esr) # (This entry used to have lines#40, but Michael Coughlin # says this is wrong, they actually have 64 lines. Perhaps someone was # thinking in hex? -- esr) @@ -6753,9 +6693,9 @@ cit500|cit-500|cit 500, is2=\E(B\E)0\E>\E[?3l\E[?7h\E[?8h, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, - ri=\EM$<5/>, rmkx=\E[?1l\E>, rmso=\E[m$<2/>, - rmul=\E[m$<2/>, smkx=\E[?1h\E=, smso=\E[7m$<2/>, - smul=\E[4m$<2/>, + ri=\EM$<5/>, rmam=\E[?7l, rmkx=\E[?1l\E>, + rmso=\E[m$<2/>, rmul=\E[m$<2/>, smam=\E[?7h, + smkx=\E[?1h\E=, smso=\E[7m$<2/>, smul=\E[4m$<2/>, citoh|ci8510|8510|c.itoh 8510a, cols#80, it#8, @@ -6792,8 +6732,6 @@ cdc456|cdc 456 terminal, bel=^G, clear=^Y^X, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E1%p1%{32}%+%c%p2%{32}%+%c, cuu1=^Z, dl1=\EJ, ed=^X, el=^V, home=^Y, il1=\EL, ind=^J, -cdc456tst|cdc 456 test version?, - cuf1@, cuu1@, dl1@, ed@, el@, home@, il1@, use=cdc456, #### Human Designed Systems (Concept) # @@ -6840,48 +6778,30 @@ cdc456tst|cdc 456 test version?, # There are probably more function keys that should be added but # I don't know what they are. # +# No delays needed on c108 because of ^S/^Q handshaking +# c108|concept108|c108-8p|concept108-8p|concept 108 w/8 pages, is3=\EU\E z"\Ev\001\177 !p\E ;"\E z \Ev \001\177p\Ep\n, rmcup=\Ev \001\177p\Ep\r\n, use=c108-4p, -c108+acs|alternate charset defns for c108, - acsc=l\\qLkTxUmMjE, rmacs=\Ej , smacs=\Ej!, -c108-4p-acs|c108-4p w/ acs, - use=c108+acs,use=c108-4p, -c108-8p-acs|c108-8p w/ acs, - use=c108+acs,use=c108-8p, -c108-rv-8p-acs|c108-rv-8p w/ acs, - use=c108+acs,use=c108-rv-8p, c108-4p|concept108-4p|concept 108 w/4 pages, eslok, hs, xon, pb@, - cnorm=\Ew, cr=^M, + acsc=l\\qLkTxUmMjE, cnorm=\Ew, cr=^M, cup=\Ea%p1%?%p1%{95}%>%t\001%{96}%-%;%{32}%+%c%p2%?%p2%{95}%>%t\001%{96}%-%;%{32}%+%c, cvvis=\EW, dch1=\E 1$<16*>, dsl=\E ;\177, fsl=\Ee\E z , ind=^J, is1=\EK\E!\E F, is3=\EU\E z"\Ev\177 !p\E ;"\E z \Ev \001 p\Ep\n, - rmcup=\Ev \001 p\Ep\r\n, + rmacs=\Ej , rmcup=\Ev \001 p\Ep\r\n, smacs=\Ej!, smcup=\EU\Ev 8p\Ep\r\E\025, tsl=\E z"\E?\E\005\EE\Ea %+ , use=c100, c108-rv|c108-rv-8p|concept 108 w/8 pages in reverse video, rmcup=\Ev \002 p\Ep\r\n, smcup=\EU\Ev 8p\Ep\r, use=c108-rv-4p, c108-rv-4p|concept108rv4p|concept 108 w/4 pages in reverse video, flash=\EK$<50>\Ek, is1=\Ek, rmso=\Ee, smso=\EE, use=c108-4p, -c108-rv-4p-acs|c108-rv-4p w/ acs, - use=c108+acs,use=c108-rv-4p, -c108-na|c108-na-8p|c108-8p-na|concept108-na|concept108na8p|concept 108 w/8 pages no arrows, - kf7=\E;, kf8=\E<, kf9=\E=, rmkx@, smkx@, use=c108-8p, -c108-na-acs|c108-na w/ acs, - use=c108+acs,use=c108-na, -c108-rv-na|c108-rv-na-8p|c108-8p-rv-na|concept 108 8 pages no arrows rev video, - kf7=\E;, kf8=\E<, kf9=\E=, rmkx@, smkx@, use=c108-rv-8p, -c108-rv-na-acs|c108-na w/ acs, - use=c108+acs,use=c108-rv-na, c108-w|c108-w-8p|concept108-w-8|concept108-w8p|concept 108 w/8 pages in wide mode, cols#132, is1=\E F\E", rmcup=\Ev ^A0\001D\Ep\r\n, smcup=\EU\Ev 8\001D\Ep\r, use=c108-8p, -c108-w-acs|c108-w w/ acs, - use=c108+acs,use=c108-w, # Concept 100: # These have only window relative cursor addressing, not screen @@ -6948,8 +6868,6 @@ c100|concept100|concept|c104|c100-4p|hds concept 100, c100-rv|c100-rv-4p|concept100-rv|c100 rev video, cnorm@, cvvis@, flash=\EK$<20>\Ek, is1=\Ek, rmso=\Ee, smso=\EE, use=c100, -c100-rv-na|c100-rv-4p-na|c100 with no arrows, - rmkx@, smkx@, use=c100-rv, oc100|oconcept|c100-1p|old 1 page concept 100, in, is3@, use=c100, @@ -7111,22 +7029,6 @@ dg6053|data general 6053, rmcup=^L, rmso=\200^^E, rmul=^U, smcup=^L^R, smso=\200\200\200\200\200\036D, smul=^T, -# From: Joan Walter -# Data General/One -# David Holub got the dg1 to work with jove with this termcap -# by making li#23 and co#78 to comply with obvious terminal -# capabilities. Still waiting for documentation. -# Data General/One from modified DG Dasher DG210/211 (bw removed) -# From: Peter N. Wan -# courtesy of Carlos Rucalde of Vantage Software, Inc. -dg1|Data General/One, - am, - cols#78, lines#23, - clear=^L, cr=^M, cub1=^Y, cud1=^Z, cuf1=^X, - cup=\020%p2%c%p1%c, cuu1=^W, el=^K, home=^H, ht=^I, - kbs=^Y, kcub1=^Y, kcud1=^Z, kcuf1=^X, kcuu1=^W, - khome=^H, nel=^M^Z, - #### Datamedia (dm) # @@ -7282,6 +7184,7 @@ falco-p|ts1p|ts-1p|falco ts-1 with paging option, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, rmcup=\E_b, rmir=\Er, rmso=\Eg0, rmul=\Eg0, smcup=\E_d, smir=\Eq, smso=\Eg4, smul=\Eg1, +# (ts100: I added rmam/smam based on the init string -- esr) ts100|ts100-sp|falco ts100-sp, am, mir, msgr, xenl, xon, cols#80, it#8, lines#24, vt#3, @@ -7300,12 +7203,13 @@ ts100|ts100-sp|falco ts100-sp, kf0=\EOy, kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, - rmacs=^O, rmkx=\E[?1l\E>, rmso=\E[m$<2>, - rmul=\E[m$<2>, + rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, + rmso=\E[m$<2>, rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017$<2>, smacs=^N, smkx=\E[?1h\E=, - smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, + smkx=\E[?1h\E=, smso=\E[1;7m$<2>, smul=\E[4m$<2>, + tbc=\E[3g, ts100-ctxt|falco ts-100 saving context, rmcup=\E~_b, smcup=\E~_d\E[2J, use=ts100, @@ -7455,7 +7359,7 @@ f200vi-w|Liberty Freedom 200 - 132 cols for vi, # including one odd hybrid that starts out life on power-up as a character # terminal, than can be switched to X graphics mode (driven over the serial # line) by an escape sequence. No info on this beast yet. - +# (go140: I added rmam/smam based on the init string -- esr) go140|graphon go-140, cols#80, it#8, lines#24, clear=\E[H\E[2J$<10/>, cub1=^H, cuf1=\E[C, @@ -7465,14 +7369,16 @@ go140|graphon go-140, is2=\E<\E=\E[?3l\E[?7l\E(B\E[J\E7\E[;r\E8\E[m\E[q, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, - ri=\EM, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, - rmul=\E[m, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, + ri=\EM, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, + rmso=\E[m, rmul=\E[m, smam=\E[?7h, smir=\E[4h, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, go140w|graphon go-140 in 132 column mode, + am, cols#132, is2=\E<\E=\E[?3h\E[?7h\E(B\E[J\E7\E[;r\E8\E[m\E[q, use=go140, # Hacked up vt200 termcap to handle GO-225/VT220 # From: +# (go225: I added rmam/smam based on the init string -- esr) go225|go-225|Graphon 225, am, mir, xenl, cols#80, it#8, lines#25, vt#3, @@ -7485,11 +7391,11 @@ go225|go-225|Graphon 225, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, rc=\E8, rev=\E[7m, rf=/usr/share/tabset/vt100, - ri=\EM, rmcup=\E[!p\E[?7h\E[2;1;1#w, rmir=\E[4l, - rmkx=\E>, rmso=\E[27m, rmul=\E[24m, + ri=\EM, rmam=\E[?7l, rmcup=\E[!p\E[?7h\E[2;1;1#w, + rmir=\E[4l, rmkx=\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E[!p\E[?7h\E[2;1;1#w, sc=\E7, sgr0=\E[m, - smcup=\E[2;0#w\E[1;25r, smir=\E[4h, smkx=\E=, - smso=\E[7m, smul=\E[4m, + smam=\E[?7h, smcup=\E[2;0#w\E[1;25r, smir=\E[4h, + smkx=\E=, smso=\E[7m, smul=\E[4m, #### Harris (Beehive) # @@ -7885,6 +7791,7 @@ ibmapa8c-c|ibm6154-c|IBM 6154 Advanced Color Graphics Display, # (hft-c: this entry had :kb=\E[D:kf=\E[C: on the line with ku/kd/kh; this was # pretty obviously mislabeled for :le: and :nd:; also ":ul=\E[4m:" was clearly # a typo for ":us=\E[4m:"; also ":el=\E[K:" was a typo for ":ce=\E[K:". +# I also added rmam/smam based on the terminal reset string. # There was an unknown boolean ":ht:" which I assume was meant to set # hardware tabs, so I have inserted it#8. Finally, "ac=^N" paired with the # ae looked like a typo for ":as=^N:" -- esr) @@ -7899,11 +7806,12 @@ ibm8512|ibm8513|hft-c|IBM High Function Terminal, kcuu1=\E[A, kf0=\E[010q, kf1=\E[001q, kf2=\E[002q, kf3=\E[003q, kf4=\E[004q, kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, kf8=\E[008q, kf9=\E[009q, khome=\E[H, - rc=\E[u, rev=\E[7m, rmacs=^O, rmcup=\E[20h, - rmdc=\E[4l, rmir=\E[4l, rmso=\E[m, rmul=\E[m, - rs1=\Eb\E[m\017\E[?7h\E[H\E[J, sc=\E[s, sgr0=\E[m, - smacs=^N, smcup=\E[20;4l\E[?7h\Eb, smdc=\E[4h, - smir=\E[4h, smso=\E[7m, smul=\E[4m, + rc=\E[u, rev=\E[7m, rmacs=^O, rmam=\E[?7l, + rmcup=\E[20h, rmdc=\E[4l, rmir=\E[4l, rmso=\E[m, + rmul=\E[m, rs1=\Eb\E[m\017\E[?7h\E[H\E[J, sc=\E[s, + sgr0=\E[m, smacs=^N, smam=\E[?7h, + smcup=\E[20;4l\E[?7h\Eb, smdc=\E[4h, smir=\E[4h, + smso=\E[7m, smul=\E[4m, hft|AIWS High Function Terminal, am, xon, cols#80, lines#25, @@ -7992,13 +7900,8 @@ addrinfo, bel=^G, clear=^L, cr=^M, cub1=^Z, cud1=^J, cuf1=^Y, cup=\037%p1%{1}%-%c%p2%{1}%-%c, cuu1=^\, ed=^K, home=^H, ind=^J, ll=^H^\, +# (infoton: used to have the no-ops lh#0, lw#0, nlab#0 -- esr) infoton, - am, - cols#80, lh#0, lines#24, lw#0, nlab#0, - bel=^G, clear=^L, cr=^M, cub1=^Z, cud1=^J, cuf1=^Y, - cuu1=^\, ed=^K, ind=^J, ll=^H^\, -# (infotonKAS: removed obsolete ":bc=^Z:" -- esr) -infotonKAS, am, cols#80, lines#24, bel=^G, clear=^L, cr=^M, cub1=^Z, cud1=^J, cuf1=^Y, @@ -8100,7 +8003,7 @@ abm85e|85E|85e|Kimtron ABM 85H in 920E mode, rev=\Ej, sgr0=\E(\Ek, smir=\EZ, use=abm85, abm85h-o|oabm85h|o85h|Kimtron ABM 85H with old firmware rev., xmc@, - dim=\E), flash=\200\200\200\007\200\200\200, + dim=\E), flash=\200\200\200^G\200\200\200, is2=\E}\EC\EX\Ee\En\E%\Er\E(\Ek\Em\Eq\Ed\ET\EC\E9\EF, rev=\Ej, sgr0=\E(\Ek, smir=\EZ, use=abm85, # From: @@ -8147,10 +8050,6 @@ act4|microterm|microterm act iv, act5|microterm5|microterm act v, kcub1=^H, kcud1=^K, kcuf1=^X, kcuu1=^Z, ri=\EH$<3>, uc=^H\EA, use=act4, -# Act V in split screen mode. act5s is not tested and said not to work. -act5s|skinny act5, - cols#39, lines#48, - rmcup=\EQ, smcup=\EP, use=act5, # Mimes using brightness for standout. Half bright is really dim unless # you turn up the brightness so far that lines show up on the screen. mime-fb|full bright mime1, @@ -8225,7 +8124,8 @@ mm340|mime340|mime 340, is2=\E\054, kbs=^H, kcub1=^H, kcud1=^J, kcuu1=^K, nel=^M^J, # This came from University of Wisconsin marked "astro termcap for jooss". -# (mt4520-rv: removed obsolete ":kn#4:" and incorrect ":ri=\E[C:" -- esr) +# (mt4520-rv: removed obsolete ":kn#4:" and incorrect ":ri=\E[C:"; +# also added rmam/smam based on the init string -- esr) mt4520-rv|micro-term 4520 reverse video, am, hs, msgr, xenl, xon, cols#80, it#8, lines#24, wsl#80, @@ -8242,11 +8142,11 @@ mt4520-rv|micro-term 4520 reverse video, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, ll=\E[24;1H, nel=\EE, rc=\E8, - rf=/usr/lib/tabset/vt100, ri=\EM, rmir=, + rf=/usr/lib/tabset/vt100, ri=\EM, rmam=\E[?7l, rmso=\E[0m, rmul=\E[24m, rs1=\E(B\E[2l\E>\E[20l\E[?3l\E[?5h\E[?7h\E[H\E[J, - sc=\E7, smir=, smso=\E[7m, smul=\E[4m, tbc=\E[g, - tsl=\E[25;1H, + sc=\E7, smam=\E[?7h, smso=\E[7m, smul=\E[4m, + tbc=\E[g, tsl=\E[25;1H, # Fri Aug 5 08:11:57 1983 @@ -8257,6 +8157,7 @@ mt4520-rv|micro-term 4520 reverse video, # WARNING!!! There are multiple versions of ERGO 4000 microcode # Be advised that very early versions DO NOT WORK RIGHT !! # Microterm does have a ROM exchange program- use it or lose big +# (ergo400: added rmam/smam based on the init string -- esr) ergo4000|microterm ergo 4000, da, db, msgr, cols#80, lines#66, @@ -8269,8 +8170,9 @@ ergo4000|microterm ergo 4000, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, ri=\EM$<20*>, - rmir=\E[4l, rmkx=\E=$<4>, rmso=\E[m$<20>, - smir=\E[4h$<6>, smkx=\E=$<4>, smso=\E[7m$<20>, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E=$<4>, + rmso=\E[m$<20>, smam=\E[?7m, smir=\E[4h$<6>, + smkx=\E=$<4>, smso=\E[7m$<20>, #### NCR # @@ -8327,8 +8229,6 @@ ncr7900i|7900i|ncr7900|7900|ncr 7900 model 1, mc5=^R, rev=\E0P, rmso=\E0@, rmul=\E0@, sgr=\E0%p5%'@'%+%p4%{2}%*%+%p3%{16}%*%+%p2%{32}%*%+%p1%{17}%*%+%c, sgr0=\E0@, smso=\E0Q, smul=\E0`, -ncr7900i-na|ncr7900-na|7900-na|ncr 7900 model 1 with no arrows, - kcub1@, kcud1@, kcuf1@, kcuu1@, use=ncr7900i, ncr7900iv|ncr 7900 model 4, am, bw, eslok, hs, cols#80, lines#24, @@ -8422,6 +8322,7 @@ pe7000c|perkin elmer 7000 series colour monitor, # This entry is for the Sperry UTS30 terminal running the TTY # utility under control of CP/M Plus 1R1. The functionality # provided is comparable to the DEC vt100. +# (uts30: I added rmam/smam based on the init string -- esr) uts30|sperry uts30 with cp/m@1R1, am, bw, hs, cols#80, lines#24, wsl#40, @@ -8437,10 +8338,10 @@ uts30|sperry uts30 with cp/m@1R1, is2=\E[U 7\E[24;1H, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, khome=\E[H, rc=\EX, rev=\E[7m, rf=/usr/lib/tabset/vt100, ri=\EI, - rin=\E[%p1%dA, rmacs=\Ed, rmso=\E[m, rmul=\E[m, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\EW, - sgr0=\E[m, smacs=\EF, smso=\E[7m, smul=\E[4m, - tsl=\E], uc=\EPB, + rin=\E[%p1%dA, rmacs=\Ed, rmam=\E[?7l, rmso=\E[m, + rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, + sc=\EW, sgr0=\E[m, smacs=\EF, smam=\E[?7m, + smso=\E[7m, smul=\E[4m, tsl=\E], uc=\EPB, #### Tandem # @@ -8503,8 +8404,7 @@ dt100|dt-100|Tandy DT-100 terminal, ri=\EM, rmacs=^O, rmso=\E[m, rmul=\E[m, smacs=^N, smso=\E[7m, smul=\E[4m, dt100w|dt-100w|Tandy DT-100 terminal (wide mode), - cols#132, - is2=\E[?3l\E)0\E(B, use=dt100, + cols#132, use=dt100, dt110|Tandy DT-110 emulating ansi, xon, cols#80, lines#24, @@ -8523,13 +8423,6 @@ dt110|Tandy DT-110 emulating ansi, lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf8=f9, lf9=f10, ri=\EM, rmacs=^O, rmso=\E[m, rmul=\E[m, smacs=^N, smso=\E[7m, smul=\E[4m, -dt200|td200|Tandy 200, - am, xt, - cols#40, lines#16, - bel=^G, clear=\EE, cr=^M, cub1=^H, cud1=^_, - cuf1=^\, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, - dl1=\EM, ed=^L, el=\EK, il1=\EL, ind=^J, kcub1=^], - kcud1=^_, kcuf1=^\, kcuu1=^^, rmso=\Eq, smso=\Ep, pt210|TRS-80 PT-210 printing terminal, hc, os, cols#80, @@ -8671,6 +8564,7 @@ tek4105|4105|tektronix 4105, smacs=\E[1m, smcup=\E%!1\E[?6l\E[2J, smir=\E[4h, smso=\E[=2;<3m, smul=\E[=5;<2m, tbc=\E[1g, +# (tek4105-30: I added rmam/smam based on the init string -- esr) tek4105-30|4105-30|4015 emulating 30 line vt100, am, mir, msgr, xenl, xon, cols#80, it#8, lines#30, vt#3, @@ -8688,11 +8582,13 @@ tek4105-30|4105-30|4015 emulating 30 line vt100, kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, - rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, + rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, + rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017$<2>, smacs=^N, smkx=\E[?1h\E=, - smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, + smkx=\E[?1h\E=, smso=\E[1;7m$<2>, smul=\E[4m$<2>, + tbc=\E[3g, tek4107|tek4109|4107|4109|tektronix terminals 4107 4109, am, mir, msgr, ul, xenl, xt, @@ -8780,7 +8676,7 @@ tek4113-nd|4113-nd|tektronix 4113 color graphics with no dialog area, is2=\ELZ\EKA0\ELF7l\177 @, ll=\ELF hl @, rmso=\EMT1, smso=\EMT2, uc=\010\EMG1_\EMG0, # This entry is from Tek. Inc. (Brian Biehl) -# (tek4115: :bc: renamed to :le: -- esr) +# (tek4115: :bc: renamed to :le:, rmam/smam added based on init string -- esr) otek4115|Tektronix 4115, am, da, db, eo, cols#80, it#8, lines#34, @@ -8791,8 +8687,9 @@ otek4115|Tektronix 4115, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, if=/usr/share/tabset/vt100, il1=\E[L, is2=\E%!0\E%\014\ELV0\EKA1\ELBB2\ENU@=\ELLB2\ELM0\ELV1\EKYA?\E%!1\E[<1l\E[?7h\E[?8h\E[34;1H\E[34B\E[m, - kbs=^H, ri=\EM, rmcup=\E%!0\ELBG8\E%!1\E[34;1H\E[J, - rmir=\E[4l, rmkx=\E>, rmso=\E[m, rmul=\E[m, + kbs=^H, ri=\EM, rmam=\E[?7l, + rmcup=\E%!0\ELBG8\E%!1\E[34;1H\E[J, rmir=\E[4l, + rmkx=\E>, rmso=\E[m, rmul=\E[m, smam=\E[?7h, smcup=\E%!0\ELBB2\E%!1, smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, tek4115|newer tektronix 4115 entry with more ANSI capabilities, @@ -8807,11 +8704,11 @@ tek4115|newer tektronix 4115 entry with more ANSI capabilities, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, - rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmso=\E[m, - rmul=\E[m, + rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmam=\E[?7l, + rmso=\E[m, rmul=\E[m, sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m, - sgr0=\E[m, smso=\E[7m, smul=\E[4m, tbc=\E[2g, - vpa=\E[%p1%{1}%+%dd, + sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, + tbc=\E[2g, vpa=\E[%p1%{1}%+%dd, # The tek4125 emulates a vt100 incorrectly - the scrolling region # command is ignored. The following entry replaces the :cs: with the needed # :al:, :dl:, and :im:; removes some cursor pad commands that the tek4125 @@ -8826,7 +8723,7 @@ tek4125|tektronix 4125, rc@, sc@, smir=\E1, smkx=\E=, use=vt100, # From: -# (tek4107: This was the termcap file's entry for the 4107/4207, but SCO +# (tek4207: This was the termcap file's entry for the 4107/4207, but SCO # supplied another, less capable 4107 entry. So we'll use that for 4107 and # note that if jcoker wasn't confused you may be able to use this one. -- esr) tek4207|Tektronix 4207 graphics terminal with memory, @@ -8932,12 +8829,10 @@ tek4205|4205|tektronix 4205, # other programs still default to emitting codes for the Model 37. # -tty33|model 33 teletype, +tty33|tty35|model 33 or 35 teletype, hc, os, xon, cols#72, bel=^G, cr=^M, cud1=^J, ind=^J, -tty35|model 35 teletype, - use=tty33, tty37|model 37 teletype, hc, os, xon, bel=^G, cr=^M, cub1=^H, cud1=^J, cuu1=\E7, hd=\E9, @@ -8972,6 +8867,8 @@ tty43|model 43 teletype, #### Tymshare # +# You can add is2=\E< to put this 40-column mode, though I can't +# for the life of me think why anyone would want to. scanset|sc410|sc415|Tymshare Scan Set, am, bw, msgr, cols#80, lines#24, @@ -8981,8 +8878,6 @@ scanset|sc410|sc415|Tymshare Scan Set, el=\EK, home=\EH, ind=^J, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, mc0=\E;3, mc4=\E;0, mc5=\E;0, rc=^C, rmacs=^O, rs1=\E>, sc=^B, smacs=^N, -scanset-n|Tymshare Scan Set in 40 col mode, - rs2=\E<, use=scanset, #### Volker-Craig (vc) # @@ -9008,11 +8903,6 @@ vc404|volker-craig 404, kcub1=^H, kcud1=^J, kcuf1=^U, kcuu1=^Z, vc404-s|volker-craig 404 w/standout mode, cud1=^J, rmso=^O, smso=^N, use=vc404, -# (vc404-na: removed obsolete ":ma@:" -- esr) -vc404-na|volker-craig 404 w/no arrow keys, - kcuf1@, kcuu1@, use=vc404, -vc404-s-na|volker-craig 404 w/standout mode and no arrow keys, - rmso=^O, smso=^N, use=vc404-na, # From: # (vc414: merged in cup/dl1/home from an old vc414h-noxon) vc414|vc414h|Volker-Craig 414H in sane escape mode., @@ -9044,7 +8934,7 @@ vc415|volker-craig 415, # Steve Jacobson 8/85 pcplot|pc-plot terminal emulation program, xenl@, - csr@, rc@, sc@, use=vt100, + csr@, dl@, dl1@, il@, il1@, rc@, sc@, use=vt100, # (kaypro: removed obsolete ":ma=^K^P:" -- esr) kaypro|kaypro2|kaypro II, am, @@ -9052,12 +8942,6 @@ kaypro|kaypro2|kaypro II, clear=\032$<1/>, cub1=^H, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, home=^^, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, -sanyo55|sanyo|sanyo mbc-55x pc compatible, - am, - cols#80, lines#25, - clear=\E[H\E[J, cub1=^H, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K, - rmso=\E[m, rmul=\E[m, smso=\E[7m, smul=\E[4m, # From IBM, Thu May 5 19:35:27 1983 ibmpc|ibm-pc|ibm5051|5051|IBM Personal Computer (no ANSI.SYS), @@ -9070,18 +8954,6 @@ ibmpc|ibm-pc|ibm5051|5051|IBM Personal Computer (no ANSI.SYS), #### Apple # -# apple -- works with an Apple ][+ that is equipped with a Videx 80 column -# card in slot 3. A special routine must be installed at the apple end to -# enable scroll down, here indicated with a ^U. The Videx card must have -# inverse char set, which is used as standout. -apple|apple-v80|Apple][+ w/Videx80 & custom scroll down, - am, xenl, - cols#80, lines#24, - bel=^G, clear=\014$<40*>, cr=^M, cub1=\010$<10>, - cud1=^J, cuf1=^\, - cup=\r\036%r%p1%{32}%+%c%p2%{32}%+%c$<6>, cuu1=^_, - ed=\013$<20*>, el=\035$<6>, home=\031$<50>, ind=^J, - ri=^P, rmacs=^Z3, rmso=^Z2, smacs=^Z2, smso=^Z3, appleII|apple ii plus, am, cols#80, it#8, lines#24, @@ -9153,10 +9025,6 @@ coco3|os9LII|Tandy CoCo3 24*80 OS9 Level II, kcub1=^H, kcud1=^J, kcuf1=^I, kcuu1=^L, rev=^_ , rmso=^_!, rmul=^_#, sgr0=\037!\E\072\200, smso=^_ , smul=^_", -trs80|trs-80|radio shack trs-80 Model I, - am, - cols#64, lines#16, - bel=^G, cr=^M, cub1=^H, cud1=^J, ind=^J, # (trs2: removed obsolete ":nl=^_:" -- esr) trs2|trsII|trs80II|Radio Shack Model II using P&T CP/M, am, msgr, @@ -9173,7 +9041,7 @@ trs2|trsII|trs80II|Radio Shack Model II using P&T CP/M, # I also deleted the unnecessary ":kn#2:", ":sg#0:" -- esr) trs16|trs-80 model 16 console, am, - cols#80, it#8, lines#24, xmc#0, + cols#80, it#8, lines#24, acsc=l_mbk`javewcquxs, bel=^G, civis=\ERc, clear=^L, cnorm=\ERC, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, @@ -9184,28 +9052,6 @@ trs16|trs-80 model 16 console, kf7=^S, khome=^W, lf0=f1, lf1=f2, lf2=f3, lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, mc4=\E]+, mc5=\E]=, rmacs=\ERg, rmso=\ER@, smacs=\ERG, smso=\ERD, -# From: Suk Lee <..!{decvax,linus,allegra,ihnp4}!utcsrgv!spoo> -# (civis/cnorm added from SCO description) -trs100|Radio Shack Model 100, - am, xt, - cols#40, lines#8, - bel=^G, civis=\EQ, clear=\EE, cnorm=\EP, cr=^M, - cub1=^H, cud1=^J, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM, - ed=\EJ, el=\EK, home=\EH, il1=\EL, ind=^J, kbs=^H, - kcub1=^], kcud1=^_, kcuf1=^\, kcuu1=^^, rmso=\Eq, - smso=\Ep, -trs200|Tandy Model 200, - lines#16, - civis@, cnorm@, cud1=^_, cuf1=^\, ed=^L, home@, - kbs@, use=trs100, -trs600|Tandy Model 600, - am, - cols#80, lines#15, - bel=^G, clear=\EH\EE, cr=^M, cub1=^H, cud1=\EB, - cuf1=\EC, cup=\EY%p1%{32}%+%c040%p2%{32}%+%c, - cuu1=\EA, ht=^I, ind=^J, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, #### Atari ST # @@ -9269,61 +9115,6 @@ amiga|Amiga ANSI, rmso=\E[m, rmul=\E[m, rs1=\Ec, sgr0=\E[m, smacs=^N, smso=\E[7m, smul=\E[4m, -# The legendary home of B1FF... -vic20|vic|VIC-20 Personal Computer, - am, - cols#22, lines#20, - bel=^G, clear=^K^L, cr=^M, cud1=^J, cuf1=^\, - cuu1=^^, home=^L, ind=^J, - -#### CompuColor -# -# These were consoles for a line of Z80-based micros dating from around 1977. -# - -# These compucolors appear similar, but they at least have different -# sized screens. I don't know what's going on here. -# (compucolor: removed obsolete ":bc=^Z:" -- esr) -compucolor|isc8001|intecolor|compucolor console, - am, - cols#80, lines#47, - bel=^G, clear=\014$<31>, cr=\r$<1>, cub1=\032$<1>, - cud1=\n$<1>, cuf1=\031$<1>, cuu1=\034$<1>, - dl1=\EV\034$<5*>, il1=\EU$<5*>, ind=\n$<1>, - kcub1=^Z, kcud1=^J, kcuf1=^Y, kcuu1=^\, khome=^H, - rmir=\022\EK$<1>, rmul=\022$<1>, smir=\023\EQ$<1>, - smul=\021$<1>, -# (compucolor2: removed obsolete ":bc=^Z:" -- esr) -compucolor2|compucolorII|compucolor II console, - am, - cols#64, it#8, lines#32, - bel=^G, clear=^L, cr=^M, cub1=^Z, cud1=^J, cuf1=^Y, - cup=\003%p2%c%p1%c, cuu1=^\, home=^H, ht=^I, - ind=^J, - -#### Exidy Sorcerer -# - -exidy|exidy2500|exidy sorcerer as dm2500, - am, - cols#64, it#8, lines#30, - bel=^G, clear=^^, cr=^M, cub1=^H, cud1=^J, cuf1=^\, - cup=\014%p2%'`'%^%c%p1%'`'%^%c, cuu1=^Z, dch1=^H, - dl1=^P^Z^X, ed=^X, el=^W, home=^B, ht=^I, ich1=^\, - il1=^P^J^X, ind=^J, rmir=^X, rmso=^X, smdc=^P, - smir=^P, smso=^N, -ex3000|exidy 3000, - cols#80, lines#24, - bel=^G, cr=^M, cud1=^J, home=^Q, ind=^J, -# This came from the comp ctr who got it from some user. Smart indeed! -# (sexidy: looks like an Exidy Sorcerer in some bizarre emulation mode; -# removed obsolete ":ma=^x^J:"; removed obsolete ":bc=^A:"; removed -# incorrect (and overridden) ":le=^H:" -- esr) -sexidy|exidy smart, - cols#64, lines#24, - bel=^G, clear=^L, cr=^M, cub1=^A, cud1=^J, cuf1=^S, - cuu1=^W, home=^Q, ind=^J, kcud1=^S, - #### Osborne # # Thu Jul 7 03:55:16 1983 @@ -9405,23 +9196,6 @@ pc-venix|venix|IBM PC console running Venix, # # If you know anything more about any of these, please tell me. -# I don't know which, if either, of these sols to believe. -# ^S is an arrow key! Boy is this guy in for a surprise... -sol|sol1|sol terminal computer, - am, - cols#64, lines#16, - bel=^G, clear=^K, cr=^M, cub1=^H, cud1=^J, cuf1=^S, - cup=\E\021%p1%c\E\022%p2%c, cuu1=^W, home=^N, - ind=^J, kcub1=^A, kcud1=^Z, kcuf1=^S, kcuu1=^W, -sol2|sol terminal computer (version 2), - am, mir, xenl, - cols#64, lines#16, - bel=^G, clear=20\EE, cnorm=\EX, cr=^M, cub1=^H, - cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, - cuu1=\EA, cvvis=^N^Lv, dch1=\EN, dl1=20\EM, - ed=20\EJ, el=\EK, home=\EH, ht=^I, il1=20\EL, - ind=\n$<20>, kcub1=\EL, kcud1=\ED, kcuf1=\ER, - kcuu1=\EU, khome=\EH, rmir=\EO, smir=\E@, # basis from Peter Harrison, Computer Graphics Lab, San Francisco # ucbvax!ucsfmis!harrison ...uucp / ucbvax!ucsfmis!harrison@BERKELEY ...ARPA # (basis: removed obsolete ":ma=^K^P^R^L^L :nl=5000*^J:" -- esr) @@ -9432,19 +9206,11 @@ basis|BASIS108 computer with terminal translation table active, # luna's BMC terminal emulator luna|luna68k|LUNA68K Bitmap console, cols#88, lines#46, use=ansi-mini, -microkit|mkt|microkit terminal computer, - am, mir, xenl, - cols#40, lines#23, - bel=^G, clear=\Ee, cnorm=\Ex, cr=^M, cub1=^H, - cud1=^J, cuf1=\Ec, cup=\Ey%p1%{32}%+%c%p2%{32}%+%c, - cuu1=\Ea, cvvis=\016\014zv, dch1=\En, dl1=\Em, - ed=\Ej, el=\Ek, home=\Eh, ht=^I, il1=\El, ind=^J, - kcub1=\El, kcud1=\Ed, kcuf1=\Er, kcuu1=\Eu, - khome=\Eh, rmir=\Eo, smir=\E@, megatek|pegasus workstation terminal emulator, am, os, cols#83, lines#60, -# The Xerox 820 was an early Z80 micro that went nowhere (I think) +# The Xerox 820 was a Z80 micro with a snazzy XEROX PARC-derived +# interface (pre-Macintosh by several years) that went nowhere. xerox820|x820|Xerox 820, am, cols#80, lines#24, @@ -9470,71 +9236,12 @@ m2-nam|minitel|minitel-2|minitel-2-nam|France Telecom Minitel, ri=\EM, rmacs=\E(B, rmir=\E[4l, rmso=\E[m, rmul=\E[m, smacs=\E(0, smir=\E[4h, smso=\E[7m, smul=\E[4m, -# From: Joel Rubin -# This is a preliminary TERMCAP for VIDTEX, a terminal program sold by -# Compuserve. Line and column numbers are computer-dependent (I have a -# Commodore '64); you should use the meta-B option to shut off clean-breaking -# of lines. No key codes included since some of them are programmable and -# most are machine-specific. Works on vi if you don't use clean-breaking. -# Very similar to the IBM 3101 termcap. Escape-D used for backspace because -# control-H is destructive backspace. There seem to be a few weirdnesses -# (especially at the beginning of a wrapped line), and the cursor does not, -# unfortunately, flash. -# (vid: changed :bc: to :le: -- esr) -vid|vidtex|Compuserve vidtex program, - am, - cols#40, it#8, lines#25, - clear=^L, cub1=\ED, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, - el=\EK, home=\EH, ht=^I, -# This (inherited from the Emacs termcap.dat file) is probably *way* obsolete! -rsvidtx|Radio Shack VIDEOTEX, - cols#32, lines#16, - clear=\EH\EJ, cr=^M, cud1=^J, cuf1=\EC, - cup=\EY%+ %+ , cuu1=\EA, ed=\EJ, el=\EK, ht=^I, - ind=^J, kbs=^H, kcub1=^H, kcud1=^J, nel=^M^J, ######## OBSOLETE VDT TYPES # # These terminals are *long* dead -- these entries are retained for # historical interest only. -#### AED -# -# Advanced Electronic Devices made its name manufacturing super-expensive -# vector-graphics displays and frame buffers in the late 1970s. They used -# to be in Sunnyvale CA 94086 on Pastoria Avenue. They're long gone now. -# - -# From: Giles Billingsley -# rewritten 8/82 for newer AEDs and better operation of vi, etc. -# (bel/cr/cub1/cud1/ind added from SCO entry, which doesn't have db or the -# humongous is2, thus they are commented out here -- esr) -aed|aed512|AED512|aed 512, - cols#64, lines#40, - bel=^G, clear=^L, cnorm=\E\072004=000200??\001, - cr=^M, cub1=^H, cud1=^J, cuf1=\Ei0800\001, cuu1=^K, - flash=\EK0001??0000K0001202080\001, - ind=\E;1100\072004=000200??;1300'\200\001\n\E\072004=0002??00;1200\001\n, - rmcup=\E\07200>8000100{804<0??00001000L80\072004=000200??\001, - rmso=\E[00C80\001, rmul=\E\07200>8000100\001, - smcup=\E\07200>8000140{<04<0??00001010L<0\072004=0002??00\001, - smso=\E\07200>8000140[80C00\001, - smul=\E\07200>8000140\001, - uc=\Ei???>l0800i0102\001, -aed-ucb|aed512-ucb|aed 512 w/o UCB ROM, - cols#64, lines#40, - clear=^L, cnorm=\E\E\E\E\E\E\E\072004=000200??\001, - cub1=^H, cuf1=\Ei0800\001, cuu1=^K, - flash=\EK0001??0000K0001202080\001, - if=/usr/share/tabset/aed512, - rmcup=\E\07200>8000100{804<0??00001000L80\072004=000200??\001, - rmso=\E[00C80\001, rmul=\E\07200>8000100\001, - smcup=\E\07200>8000140{<04<0??00001010L<0\072004=0002??00\001, - smso=\E\07200>8000140[80C00\001, - smul=\E\07200>8000140\001, - uc=\Ei???>l0800i0102\001, - #### Amtek Business Machines # @@ -9598,11 +9305,6 @@ oblit|ojerq|first version of blit rom, il=\Ef%p1%{32}%+%c, il1=\EF, ind=^J, kbs=^H, rmir=\ER, smir=\EQ, -daleblit|daleterm|blit running Dale DeJager's ROM, - da@, db@, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - rmso=\EV!, rmul=\EV", smso=\EU!, smul=\EU", use=oblit, - #### Bolt, Beranek & Newman (bbn) # # The BitGraph was a product of the now-defunct BBN Computer Corporation. @@ -9649,6 +9351,7 @@ bg1.25rv|bbn bitgraph 1.25 (reverse video), flash=\E[?5l\E[?5h, is2=\E>\E[?5h\E[?7h, use=bg1.25, bg1.25nv|bbn bitgraph 1.25 (normal video), flash=\E[?5h\E[?5l, is2=\E>\E[?5l\E[?7h, use=bg1.25, +# (bg1.25: I added rmam/smam based on the init string -- esr) bg1.25|bbn bitgraph 1.25, cols#85, lines#64, bel=^G, clear=\E[H\E[J$<150>, cr=^M, cub1=^H, @@ -9657,8 +9360,9 @@ bg1.25|bbn bitgraph 1.25, el=\E[K$<2>, ht=^I, il1=\E[L$<2*>, ind=\n$<280>, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf1=\EP, kf2=\EQ, kf3=\ER, kf4=\ES, lf1=PF1, - lf2=PF2, lf3=PF3, lf4=PF4, ll=\E[64;1H, rmkx=\E>, - rmso=\E[m, smkx=\E=, smso=\E[7m, + lf2=PF2, lf3=PF3, lf4=PF4, ll=\E[64;1H, + rmam=\E[?7l, rmkx=\E>, rmso=\E[m, smam=\E[?7h, + smkx=\E=, smso=\E[7m, #### Chromatics # @@ -9682,8 +9386,7 @@ cg7900|chromatics|chromatics 7900, rmcup=\001W0\\\05440\\\05485\\\05448\\\054\014\001W0\\\0540\\\05485\\\05448\\\054\001M0\\\05440\\\054, rmso=\001C1\\\054\001c2\\\054, smcup=\001P0\001O1\001R1\001C4\\\054\001c0\\\054\014\001M0\\\05442\\\054WARNING DOUBLE ENTER ESCAPE and \025\001C1\\\054\001c2\\\054\001W0\\\0540\\\05479\\\05439\\\054, - smso=\001C4\\\054\001c7\\\054, - uc=\001\001_\001\200, + smso=\001C4\\\054\001c7\\\054, uc=\001\001_^A\200, #### Computer Automation # @@ -9757,12 +9460,6 @@ vt50h|dec vt50h, bel=^G, clear=\EH\EJ, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, el=\EK, ht=^I, ind=^J, ri=\EI, -vt52|dec vt52, - cols#80, it#8, lines#24, - bel=^G, clear=\EH\EJ, cr=^M, cub1=^H, cud1=^J, - cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, - cuu1=\EA, ed=\EJ, el=\EK, ht=^I, ind=^J, kbs=^H, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, ri=\EI, vt61|vt-61|vt61.5|dec vt61, cols#80, lines#24, bel=^G, clear=\EH\EJ$<120>, cr=\r$<20>, cub1=^H, @@ -9773,6 +9470,7 @@ vt61|vt-61|vt61.5|dec vt61, kcuu1=\EA, ri=\E$<20>I, # The gigi does standout with red! +# (gigi: I added rmam/smam based on the init string -- esr) gigi|vk100|dec gigi graphics terminal, am, xenl, cols#84, lines#24, @@ -9783,8 +9481,9 @@ gigi|vk100|dec gigi graphics terminal, is2=\E>\E[?3l\E[?4l\E[?5l\E[?20l\E[?7h\E[?8h, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, - ri=\EM, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - smkx=\E[?1h\E=, smso=\E[7;31m, smul=\E[4m, + ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, + rmul=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, + smso=\E[7;31m, smul=\E[4m, # DEC PRO-350 console (VT220-style). The 350 was DEC's attempt to produce # a PC differentiated from the IBM clones. It was a total, ludicrous, @@ -9820,7 +9519,7 @@ dw2|decwriter|dw|decwriter II, # \E[1;66r full vertical page can be printed # \E[4g clear vertical tab stops # \E> disable alternate keypad mode (so it transmits numbers!) -# \E[%i%du set tab stop at column %d (origin == 1) +# \E[%i%p1%du set tab stop at column %d (origin == 1) # (Full syntax is \E[n;n;n;n;n;...;nu where each 'n' is # a tab stop) # @@ -9857,6 +9556,7 @@ delta|dd5000|delta data 5000, #### Digital Data Research (ddr) # +# (ddr: I added rmam/smam based on the init string -- esr) ddr|rebus3180|ddr3180|Rebus/DDR 3180 vt100 emulator, am, xenl, cols#80, it#8, lines#24, vt#3, @@ -9869,11 +9569,11 @@ ddr|rebus3180|ddr3180|Rebus/DDR 3180 vt100 emulator, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, rev=\E[7m$<2/>, rf=/usr/share/lib/tabset/vt100, - ri=\EM$<5/>, rmkx=\E[?1l\E>, rmso=\E[m, + ri=\EM$<5/>, rmam=\E[7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m$<2/>, rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, - sgr0=\E[m$<2/>, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m$<2/>, + sgr0=\E[m$<2/>, smam=\E[7l, smkx=\E[?1h\E=, + smso=\E[7m, smul=\E[4m$<2/>, #### General Electric (ge) # @@ -9919,7 +9619,7 @@ terminet1200|terminet300|tn1200|tn300|terminet|GE terminet 1200, # 7 6 5 4 3 2 1 0 # S401 1 0 0 0 1 1 0 0 # S402 0 0 0 0 0 0 0 0 - +# (h19: I added rmam/smam based on the init string -- esr) h19-a|heath-ansi|heathkit-a|heathkit h19 ansi mode, am, mir, msgr, cols#80, it#8, lines#24, @@ -9933,8 +9633,8 @@ h19-a|heath-ansi|heathkit-a|heathkit h19 ansi mode, kcuu1=\E[1A, kf1=\EOS, kf2=\EOT, kf3=\EOU, kf4=\EOV, kf5=\EOW, kf6=\EOP, kf7=\EOQ, kf8=\EOR, khome=\E[H, lf6=blue, lf7=red, lf8=white, ri=\EM, - rmacs=\E[11m, rmir=\E[4l, rmso=\E[m, smacs=\E[10m, - smir=\E[4h, smso=\E[7m, + rmacs=\E[11m, rmam=\E[?7l, rmir=\E[4l, rmso=\E[m, + smacs=\E[10m, smam=\E[?7h, smir=\E[4h, smso=\E[7m, h19-bs|heathkit w/keypad shifted, rmkx=\Eu, smkx=\Et, use=h19-b, h19-smul|heathkit w/keypad shifted/underscore cursor, @@ -10084,8 +9784,6 @@ ztx|ztx11|zt-1|htx11|ztx-1-a|ztx-10 or 11, # From: Erik Fair Sun Oct 27 07:21:05 1985 ims950-b|bare ims950 no init string, is2@, use=ims950, -ims950-ns|ims950 w/no standout, - rmso@, rmul@, smso@, smul@, use=ims950, # (ims950: removed obsolete ":ko@:" -- esr) ims950|ims televideo 950 emulation, xenl@, @@ -10133,14 +9831,10 @@ intertube|intertec|Intertec InterTube, # The intertube 2 has the "full duplex" problem like the tek 4025: if you # are typing and a command comes in, the keystrokes you type get interspersed # with the command and it messes up -it2|intertube2|intertec data systems intertube 2, - am, - cols#80, lines#25, - bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=^F, +intertube2|intertec data systems intertube 2, cup=\016%p1%c\020%p2%{10}%/%{16}%*%p2%{10}%m%+%c, - cuu1=^Z, el=\EK, home=^A, - hpa=\020%p1%{10}%/%{16}%*%p1%{10}%m%+%c, ind=^J, - ll=^K^X\r, rmso=\E0@, smso=\E0P, vpa=\013%p1%c, + el=\EK, hpa=\020%p1%{10}%/%{16}%*%p1%{10}%m%+%c, + ll=^K^X\r, vpa=\013%p1%c, use=intertube, #### Ithaca Intersystems # @@ -10176,24 +9870,9 @@ graphos|graphos III, nel=^M\ED, rc=\E8, rf=/usr/lib/tabset/init.graphos, ri=\EM, rmdc=\E[4l, rmir=\E[4l, rmso=\E[m, sc=\E7, smdc=\E[4h, smir=\E[4h, smso=\E[7m, -# We would like on ve to return to previous page and window -# (graphos: removed obsolete and syntactically incorrect :kn=4: -- esr) graphos-30|graphos III with 30 lines, - am, mir, - cols#80, it#8, lines#30, - clear=\E[H\E[2J, cnorm=\Ez56;2;0;0z\Ez73z\Ez4;1;1z, - cr=^M, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, - cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\Ez4;2;1z\Ez56;2;80;30z, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, - home=\E[H, ht=^I, if=/usr/lib/tabset/init.Graphos, - il=\E[%p1%dL, il1=\E[L, ind=\ED, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, - nel=^M\ED, rc=\E8, rf=/usr/lib/tabset/init.Graphos, - ri=\EM, rmdc=\E[4l, rmir=\E[4l, rmso=\E[m, sc=\E7, - smdc=\E[4h, smir=\E[4h, smso=\E[7m, + lines#30, + cvvis=\Ez4;2;1z\Ez56;2;80;30z, use=graphos, #### Modgraph # @@ -10214,7 +9893,7 @@ modgraph|mod|modgraph terminal emulating vt100, cvvis=\E\^9;0s\E\^7;1s, is2=\E\^9;0s\E\^7;1s\E[3g\E\^11;9s\E\^11;17s\E\^11;25s\E\^11;33s\E\^11;41s\E\^11;49s\E\^11;57s\E\^11;65s\E\^11;73s\E\^11;81s\E\^11;89s, rf@, ri=\EM\E[K$<5/>, use=vt100, -# The GX-1000 manual is dated 1984 +# The GX-1000 manual is dated 1984. This looks rather like a VT-52. modgraph2|modgraph gx-1000 80x24 with keypad not enabled, am, da, db, cols#80, it#8, lines#24, @@ -10260,39 +9939,6 @@ mt70|mt-70|Morrow MD-70; native Morrow mode, rmso=\EG0, sgr0=\EG0, smacs=\E$, smcup=\E"2\EG0\E], smso=\EG4, smul=\EG1, tbc=\E0, -#### Netronics -# -# The Netronics Smarterm 80 was a kit-built terminal that came in at least two -# flavors, a first 40-column version, and a second 64-column version released -# about 1983. -# - -# (netx: removed obsolete ":ma=j^Jk^Pl :" -- esr) -netx|netronics|netronics version 2, - cols#64, lines#16, - bel=^G, clear=\014$<466>, cr=^M, cub1=^H, cud1=^J, - cuf1=\E+@A, cup=\E=%p1%'@'%+%c%p2%'@'%+%c, cuu1=^K, - ed=\006\005$<2000>, el=\005$<1600>, home=^D, - ind=^J, ri=\E=@@\013, -smartvid|Netronics Smartvid 80, - am, bw, eo, msgr, xhp, - cols#80, lines#24, xmc#1, - bel=^G, cbt=\EI, clear=^L, cnorm=^Z^K, cr=^M, - cub1=^H, cud1=^J, cuf1=^A, - cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, - dl1=\ER, ed=\EY, el=\ET, home=^Z, ht=\Ei, ich1=\EQ, - ind=^J, ll=^Z^K, ri=^K, rmacs=\EGB, rmcup=^Z^K, - rmir=\ED, rmso=\EG@, rmul=\EG@, smacs=\EG@, - smir=\EC, smso=\EGC, smul=\EGA, -smarterm|smarterm-s|netronics smarterm 80x24 naked terminal, - am, ul, - cols#80, lines#24, xmc#1, - bel=^G, cbt=\EI, clear=^L, cr=^M, cub1=^H, cud1=^J, - cuf1=^A, cup=\E=%p1%{32}%+%c%p2%{32}%+%c$<6>, - dch1=\EW, dl1=\ER, ed=\EY, el=\ET, home=^Z, ht=^I, - ich1=\EQ, il1=\EE, ind=^J, rmir=\ED, rmul=\EG@, - smir=\EC, smul=\EGA, - #### Omron # # This company is still around in 1995, manufacturing point-of-sale systems. @@ -10434,7 +10080,7 @@ synertek|ktm|synertek380|synertek ktm 3/80 tubeless terminal, # :is: sets 80 col mode, normal video, autowrap on (for :am:). # Seems to be no way to get rid of status line. # The manual for this puppy was dated June 1981. It claims to be VT52- -# compatible. +# compatible but looks more vt100-like. tab132|tab|tab132-15|tab 132/15, da, db, cols#80, lines#24, lm#96, @@ -10530,6 +10176,9 @@ t16|teleray 16, #### Texas Instruments (ti) # +# The Silent 700 was so called because it was built around a quiet thermal +# printer. It was portable, equipped with an acoustic coupler, and pretty +# neat for its day. ti700|ti733|ti735|ti silent 700, hc, os, cols#80, @@ -10538,6 +10187,7 @@ ti743|ti745|ti silent 745, hc, os, cols#80, bel=^G, cr=^M, cub1=^H, cud1=^J, ind=^J, + ti800|ti omni 800, hc, os, cols#132, @@ -10589,7 +10239,7 @@ ti931|Texas Instruments 931 VDT, am, xon, cols#80, lines#24, bel=^G, blink=\E4P, clear=\EL, cnorm=\E4@, cr=^M, - cub=ENTR, cub1=\ED, cud1=\EB, cuf1=\EC, + cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, dl1=\EO, ed=\EJ, el=\EI, home=\EH, ich1=\ER\EP\EM, il1=\EN, ind=\Ea, invis=\E4H, @@ -10601,8 +10251,9 @@ ti931|Texas Instruments 931 VDT, sgr0=\E4@, smso=\E4A, smul=\E4D, ti926|Texas Instruments 926 VDT 8859/1 7 bit CTRL, csr@, ind=\E[1S, ri=\E[1T, use=ti924, +# (ti926-8: I corrected this from the broken SCO entry -- esr) ti926-8|Texas Instruments 926 VDT 8859/1 8 bit CTRL, - csr@, ind=S$<\2331>, ri=T$<\2331>, use=ti924-8, + csr@, ind=\2331S, ri=\2331T, use=ti924-8, ti_ansi|basic entry for ti928, am, bce, eo, xenl, xon, colors#8, cols#80, it#8, lines#25, pairs#64, @@ -10804,33 +10455,10 @@ versaterm|versaterm vt100 emulator for the macintosh, rmul=\E[m$<2/>, rs1=\E>, sc=\E7, sgr0=\E[m$<2/>, smkx=\E=\E[?1h, smso=\E[7m$<2/>, smul=\E[4m$<2/>, -# pc52 - can't use blue foreground, it clashes with underline; -# it's simulated with cyan -# bold means: white on black bold, so it not allowed with colors -# rev means: black on white, also not allowed -# smso and dim are simulated with colors, ditto -# smul is allowed, even though it always means white foreground: -# it is too important to leave out. -pc52|dec vt52 for PC, - am, bce, msgr, - colors#8, cols#80, it#8, lines#25, ncv#53, - pairs#63, - bel=^G, blink=\Eo, bold=\Ebo\Ec0, clear=\EH\EJ, - cr=^M, cub1=^H, cud1=^J, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, - dim=\Eb3\Ec0, dl1=\EM, ed=\EJ, el=\EK, ht=^I, - il1=\EL, ind=^J, kbs=^H, kcub1=\EL, kcud1=\ED, - kcuf1=\ER, kcuu1=\EU, kf1=\Ea, kf10=\Ej, kf2=\Eb, - kf3=\Ec, kf4=\Ed, kf5=\Ee, kf6=\Ef, kf7=\Eg, - kf8=\Eh, kf9=\Ei, op=\Eb7\Ec0, rev=\Ep, ri=\EI, - rmso=\Eb7\Ec0, setb=\Ec%p1%d, - setf=\Eb%?%p1%{1}%=%t3\n%e%p1%d%;, - sgr0=\Eb7\Ec0\Et, smso=\Eb6\Ec4, smul=\Es, - # vs100 emulator using tsim # From: # (vs100t: had Al/Dl in front of obvious AL/DL capabilities -- esr) -vs100t|tsim|vs100-tsim|tsim vt100 emulator, +vs100t|tsim|vs100-tsim|tsim vs100 emulator, am, cols#80, it#8, lines#24, clear=\EE, csr=\ES%p1%{32}%+%c%p2%{32}%+%c, @@ -10842,9 +10470,11 @@ vs100t|tsim|vs100-tsim|tsim vt100 emulator, smul=\Eu, # From: Rick Thomas +# (xtalk: I added rmam/smam based on the init string. +# I also removed xmc#1, I don't believe it on a PC display -- esr) xtalk|IBM PC with xtalk communication program (versions up to 3.4), am, mir, msgr, xon, - cols#80, it#8, lines#24, vt#3, xmc#1, + cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, clear=\E[H\E[J$<50>, cr=^M, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, @@ -10857,43 +10487,11 @@ xtalk|IBM PC with xtalk communication program (versions up to 3.4), kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, - kf9=\EOw, ri=\EM$<5>, rmacs=^O, rmkx=\E[?1l\E>, - rmso=\E[m , rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - smacs=^N, smkx=\E[?1h\E=, smso=\E[7m , tbc=\E[3g, - -# YTERM standard version 1.0. -# Straight old ascii keyboard except function keys are Yale (e.g.,ASCII.KBD). -# Only 80 tab columns (else yterm 1.1 bug). No :xn: in 1.0. -# Cannot use termcap :sr=\EM: because vi will not work, too bad. -# vi string is given so that yterm is reset each vi startup. -# (yterm10: removed obsolete ":EP:" and ":ma=h^Jj k lH:" caps -- esr) -# From: greg small 9-25-84 -yterm10|yterm 1.0 UCB ascii.kbd, - am, - cols#80, it#8, lines#24, - clear=^L, cub1=^H, cuf1=^\, - cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, - cvvis=\017\E[7i\E[m\E[?7h\E[?3g\r\EHY0 \EH \EH \EH \EH \EH \EH \EH \EH \EH\r, - ed=^K, el=^], home=^Y, ht=^I, - is2=\017\E[7i\E[m\E[?7h\E[?3g\r\EHY0 for \EHYTERM 1.\EH0 with A\EHSCII.KBD\EH 9-13-84\EH \EH \EH \EH \EH\n, - kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kf0=\E0, - kf1=\E1, kf2=\E2, kf3=\E3, kf4=\E4, kf5=\E5, - kf6=\E6, kf7=\E7, kf8=\E8, kf9=\E9, khome=^^, - rc=\E8, rmso=\E[m, rmul=\E[m, sc=\E7, smso=\E[7m, - smul=\E[4m, -# YTERM variant version 1.1. Version 1.1 has :xn:. -# From: greg small 9-13-84 -yterm11|yterm 1.1 UCB ascii.kbd, - xenl, - is2=\017\E[7i\E[m\E[?7h\E[?3g\r\EHY1 for \EHYTERM 1.\EH1 with A\EHSCII.KBD\EH 9-13-84\EH \EH \EH \EH \EH\n, use=yterm10, -# YTERM 1.0 variant no autowrap or tabs -# X does not remember autowrap or tabs when T is deleted and restarted. -# (yterm: changed ":pt@:" to ":it@:" -- esr) -yterm10nat|yterm 1.0 UCB ascii.kbd no autowrap or tabs, - am@, - it@, - cvvis=\017\E[7i\E[m\E[?7l\E[?3g\rY2\r, - is2=\017\E[7i\E[m\E[?7l\E[?3g\rY2 for YTERM 1.0 with ASCII.KBD 9-20-84 no autowrap or tabs\n, use=yterm10, + kf9=\EOw, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, + rmkx=\E[?1l\E>, rmso=\E[m , + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, smacs=^N, + smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m , + tbc=\E[3g, # The official PC terminal emulator program of the AT&T Product Centers. # Note - insert mode commented out - doesn't seem to work on AT&T PC. @@ -10908,23 +10506,10 @@ simterm|attpc running simterm, #### Daisy wheel printers # - # This section collects Diablo, DTC, Xerox, Qume, and other daisy # wheel terminals. These are now largely obsolete. # -# This is an "experimental" entry for the SRI Agiles. -# It has been tried in a minimal way -- the Agile did not blow up! -# However, it has not been exhaustively tested. -# Anyone who tries it and finds it wanting should get in touch with: -# From: Ralph Keirstead -# EK352; SRI International; 333 Ravenswood Avenue; Menlo Park, CA 94025 -# (agile: I removed an incorrect ":pl:" -- esr) -agile|agiles|sri agiles, - hc, os, - cols#132, - bel=^G, cr=^M, cub1=^H, cud1=^J, cuu1=\E^J, hd=\E9, - ht=^I, hts=\E1, hu=\E0, ind=^J, is2=\EE\EF\EJ, - kbs=^H, tbc=\E2, + diablo1620|diablo1720|diablo450|ipsi|diablo 1620, hc, os, cols#132, it#8, @@ -10933,7 +10518,7 @@ diablo1620|diablo1720|diablo450|ipsi|diablo 1620, if=/usr/share/tabset/xerox1720, kbs=^H, tbc=\E2, diablo1620-m8|diablo1640-m8|diablo 1620 w/8 column left margin, cols#124, - cud1=^J, is2=\r \E9, use=diablo1620, + is2=\r \E9, use=diablo1620, diablo1640|diablo1730|diablo1740|diablo630|x1700|diablo|xerox|diablo 1640, bel=^G, if=/usr/share/tabset/xerox1730, rmso=\E&, rmul=\ER, smso=\EW, smul=\EE, use=diablo1620, @@ -10970,7 +10555,7 @@ dtc300s|DTC 300s, bel=^G, cr=^M, cub1=^H, cud1=^J, cuu1=^Z, ff=^L, hd=\Eh, ht=^I, hts=\E1, hu=\EH, ind=^J, kbs=^H, tbc=\E3, -gsi, +gsi|mystery gsi terminal, hc, os, cols#132, bel=^G, cr=^M, cub1=^H, cud1=^J, cuu1=^Z, hd=\Eh, @@ -10990,6 +10575,13 @@ aj510|Anderson-Jacobson model 510, kcud1=\EZ, kcuf1=\EX, kcuu1=\EY, pad=\177, rmcup=\E"N, rmir=\E'J, rmso=\E"I, rmul=\E"U, smcup=\E"N, smir=\E'I, smso=\E"I, smul=\E"U, +# This used to say "de#001202" which presumably refers to the stty bits +# that need to be set for some version of Unix. We need the real delay +# requirements in MS. +mw2|Multiwriter 2, + hc, os, + cols#132, + bel=^G, cr=^M, cud1=^J, ind=^J, # From: Thu Aug 20 09:09:18 1981 # This is incomplete, but it's a start. nec5520|nec|spinwriter|nec 5520, @@ -11004,7 +10596,7 @@ qume5|qume|Qume Sprint 5, bel=^G, cr=^M, cub1=^H, cud1=^J, cuu1=^Z, ff=^L, hd=\Eh, ht=^I, hts=\E1, hu=\EH, ind=^J, kbs=^H, tbc=\E3, -# I suspect the xerox1720 is the same as the diablo 1620. +# I suspect the xerox 1720 is the same as the diablo 1620. xerox1720|x1720|x1750|xerox 1720, hc, os, cols#132, it#8, @@ -11034,7 +10626,7 @@ cdi|cdi1203|cdi 1203, cops10|cops|cops-10|cops 10, am, bw, cols#80, lines#24, - bel=^G, clear=30^X, cr=^M, cub1=^H, cud1=^J, + bel=^G, clear=\030$<30/>, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\020%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, ed=^W, el=^V, ind=^J, kbs=^H, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^Y, @@ -11065,28 +10657,9 @@ digilog|digilog 333, bel=^G, cr=^M, cub1=^H, cud1=^J, cuf1=^I, cuu1=^O, el=^X, home=^N, ind=^J, env230|envision230|envision 230 graphics terminal, - am, mir, msgr, xon, - cols#80, it#8, lines#24, vt#3, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[J$<50>, cr=^M, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, - cuf=\E[%p1%dC, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, - cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, - el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I, - hts=\EH, ind=^J, ka1=\EOq, ka3=\EOs, kb2=\EOr, - kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, - kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, - kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, - mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, - rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, - rmkx=\E[?1l\E>, rmso=\E[m<2>, rmul=\E[m$<2>, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, - sgr=\E[%?%p1%t;1%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, - sgr0=\E[m\017$<2>, smacs=^N, smkx=\E[?1h\E=, - smso=\E[1m<2>, smul=\E[4m$<2>, tbc=\E[3g, + xenl@, + mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, + sgr=\E[%?%p1%t;1%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, use=vt100, # These execuports were impact-printer ttys with a 30- or maybe 15-cps acoustic # coupler attached, the whole rig fitting in a suitcase and more or less # portable. Hot stuff for c.1977 :-) -- esr @@ -11096,10 +10669,7 @@ ep48|ep4080|execuport 4080, bel=^G, cr=^M, cub1=^H, cud1=^J, hd=^\, hu=^^, ind=^J, ep40|ep4000|execuport 4000, - am, os, - cols#136, - bel=^G, cr=^M, cub1=^H, cud1=^J, hd=^\, hu=^^, - ind=^J, + cols#136, use=ep4080, # Adam Thompson tells us: # Informer series - these are all portable units, resembling older # automatic bread-baking machines. The terminal looks like a `clamshell' @@ -11119,15 +10689,8 @@ ifmr|Informer D304, cup=\EY%p2%{32}%+%c%p1%{32}%+%c, cuu1=\EA, dch1=\E\\, ed=\E/, el=\EQ, home=\EH, ich1=\E[, ri=\En, rmso=\EK, smso=\EJ, -# This used to say "de#001202" which presumably refers to the stty bits -# that need to be set for some version of Unix. We need the real delay -# requirements in MS. -mw2|Multiwriter 2, - hc, os, - cols#132, - bel=^G, cr=^M, cud1=^J, ind=^J, # Entry largely based on wy60 and has the features of wy60ak. -opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys, +opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys, am, bw, hs, km, mir, msgr, ul, xon, cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#80, acsc=0wa_h[jukslrmqnxqzttuyv]wpxv, bel=^G, @@ -11138,7 +10701,7 @@ opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys, el=\ET, fsl=^M, home=\036$<2>, ht=\011$<5>, hts=\E1, if=/usr/lib/tabset/std, il1=\EE$<4>, ind=^J, invis=\EG1, ip=$<3>, - is2=\E`\072\Ee(\EO\Ee6\Ec41\E~4\Ec21\Ed/\Ezz&\E[A\037\Ezz'\E[B\037\Ezz(\E[D\037\Ezz)\E[C\037\Ezz<\E[Q\037\Ezz`\E[F\037\EA1*\EZH12, + is2=\E`\072\Ee(\EO\Ee6\Ec41\E~4\Ec21\Ed/\Ezz&\E[A\177\Ezz'\E[B\177\Ezz(\E[D\177\Ezz)\E[C\177\Ezz<\E[Q\177\Ezz`\E[F\177\EA1*\EZH12, kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\EW, kdl1=\ER, ked=\EY, kel=\ET, kend=\E[F, kent=\E7, kf1=^A@\r, @@ -11157,7 +10720,7 @@ opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys, rs3=\EwG\Ee($<150>, sgr=%?%p8%t\E)%e\E(%;%?%p9%t\EH\002%e\EH\003%;\EG%'0'%?%p2%p6%|%t%{8}%|%;%?%p1%p3%|%p6%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c, sgr0=\E(\EH\003\EG0\EcD, smacs=\EH^B, smam=\Ed/, - smcup=\Ezz&\E[A\037\Ezz'\E[B\037\Ezz(\E[D\037\Ezz)\E[C\037\Ezz<\E[Q\037, + smcup=\Ezz&\E[A\177\Ezz'\E[B\177\Ezz(\E[D\177\Ezz)\E[C\177\Ezz<\E[Q\177, smir=\Eq, smln=\EA10, smso=\EG4, smul=\EG8, smxon=\Ec21, tbc=\E0, tsl=\Ez(, uc=\EG8%p1%c\EG0, # (ps300: changed ":pt@:" to "it@" -- esr) @@ -11165,25 +10728,6 @@ ps300|Picture System 300, xt, it@, rmso@, rmul@, smso@, smul@, use=vt100, -ramtek|ramtek 6000, - am, - cols#78, lines#24, - bel=^G, clear=[alpha]\n[erase]\n, cr=^M, cub1=^H, - cud1=^J, ind=^J, -# Upper case terminal, uses lower case for control sequences!!! -tec400|tec scope, - xmc#1, - clear=f, cub1=w, cud1=h, cuf1=g, - cup=l%p2%~%c%p1%~%c, cuu1=x, dch1=t, dl1=u, ed=s, - el=c, home=i, ich1=d, il1=e, rmso=|, smso={, -# From: Mon Sep 21 21:15:45 1981 -# This entry has been tested. -tec500|tec 500, - am, - cols#80, lines#24, - bel=^G, clear=\032$<20>, cr=^M, cub1=^H, cud1=^J, - cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, - home=^^, ind=^J, rmso=^\, smso=^], teletec|Teletec Datascreen, am, cols#80, lines#24, @@ -11200,7 +10744,8 @@ terak|Terak emulating Datamedia 1520, # edit keypad: FIND, INSERT HERE, REMOVE, SELECT, PREV SCREEN, # NEXT SCREEN. The key definitions k6-k9 represent the PF1 to # PF4 keys. -# (v3220: removed obsolete ":kn#10:" -- esr) +# (v3220: removed obsolete ":kn#10:", +# I added rmam/smam based on the init string -- esr) v3220|LANPAR Vision II model 3220/3221/3222, am, mir, xenl, cols#80, it#8, lines#24, @@ -11211,126 +10756,10 @@ v3220|LANPAR Vision II model 3220/3221/3222, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\E[1~, kf1=\E[2~, kf2=\E[3~, kf3=\E[4~, kf4=\E[5~, kf5=\E[6~, kf6=\E[OP, kf7=\E[OQ, kf8=\E[OR, - kf9=\E[OS, khome=\E[H, ri=\EM, rmir=\E[4l, - rmkx=\E>, rmso=\E[m, rmul=\E[m, smir=\E[4h, - smkx=\E=, smso=\E[7m, smul=\E[4m, -# Does anybody know where these "wind" terminals came from? -wind, - cols#80, lines#24, - clear=\EnP(\Eo, cub1=^H, cuf1=^L, - cup=\Ep%p2%c%p1%c, cuu1=^K, home=\Ep\200\200, - kcub1=\E3, kcud1=\E2, kcuf1=\E4, kcuu1=\E1, - kf1=\E5, kf2=\E6, kf3=\E7, kf4=\E8, rmso=\Em^C, - smso=\Em^L, -wind16, - lines#16, - clear=\EnP\020\Eo, kcub1@, kcud1@, kcuf1@, kcuu1@, - kf1@, kf2@, kf3@, kf4@, use=wind, -wind40, - lines#40, - kcub1@, kcud1@, kcuf1@, kcuu1@, kf1@, kf2@, kf3@, - kf4@, use=wind, -# (wind50: corrected :cl=\EnP\128\062\Eo: -- esr) -wind50, - cols#88, lines#50, - clear=\EnP2\Eo, use=wind, -# (xitex: removed obsolete ":ma=j^Jk^Pl :" -- esr) -xitex|xitex sct-100, - cols#64, lines#16, - bel=^G, clear=\014$<400>, cr=^M, cub1=^H, cud1=^J, - cuf1=\E+@A, cup=\E=%p1%'@'%+%c%p2%'@'%+%c, cuu1=^K, - ed=\006\005$<2000>, el=\005$<1600>, home=^D, - ind=^J, ri=\E=@@\013, -plasma|plasma panel, - am, - cols#85, lines#45, - bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=^X, - cuu1=^V, home=^^, ind=^J, - -#### Homebrew and custom terminals -# -# Note, some of these have had description fields beginning with `mystery' -# added to avoid tic warning messages. -# - -# Nu machine parameters taken from mit-vax. -# smc - 5/21/85 -# -nuterminal|MIT nu machine, - am, mir, msgr, - cols#80, it#8, lines#24, - clear=\EE$<60/>, cnorm=\Ey4, cr=^M, cub1=^H, - cud1=\EB, cuf1=\EC, cup=\EY%+ %+ $<10/>, cuu1=\EA, - cvvis=\Ex4, dch1=\EN$<2.5*/>, dl1=\EM$<1*/>, - ed=\EJ$<60/>, el=\EK$<10/>, home=\EH, ht=^I, - il1=\EL$<1*/>, ind=^J, ip=$<2.5*/>, kbs=^H, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV, kf5=\EW, - kf6=\EP, kf7=\EQ, kf8=\ER, khome=\EH, lf6=blue, - lf7=red, lf8=white, nel=^M^J, ri=\EI, rmacs=\EG, - rmir=\EO, rmso=\Eq, smacs=\EF, smir=\E@, smso=\Ep, -nu24|nuwindow|MIT nu machine 24 lines, - mir, msgr, - cols#86, it#8, lines#24, - clear=\EE, cnorm=\Ey4, cr=^M, cub1=^H, cud1=\EB, - cuf1=\EC, cup=\EY%+ %+ , cuu1=\EA, cvvis=\Ex4, - dl1=\EM$<1*/>, ed=\EJ, el=\EK, home=\EH, ht=^I, - il1=\EL$<1*/>, ind=^J, ip=$<2.5*/>, kbs=^H, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - khome=\EH, nel=^M^J, ri=\EI, rmacs=\EG, rmir=\EO, - rmso=\Eq, smacs=\EF, smir=\E@, smso=\Ep, -bnu|nu51|bnuwindow|MIT nu machine 51 lines, - cols#86, lines#51, use=nuterminal, -fnu|nu61|fnuwindow|MIT nu machine 61 lines, - cols#86, lines#61, use=nuterminal, -nunix-30|nu-telnet-30|nu-half|half nu screen thru telnet, - am, - cols#78, it#8, lines#30, - clear=\EE, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, - cup=\EY%+ %+ , cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, - home=\EH, ht=^I, il1=\EL, ind=^J, ip=$<2.5*/>, - kbs=^H, kcub1=^H, kcud1=^J, nel=^M^J, ri=\EI, - rmso=\Eq, smso=\Ep, -nunix-61|nu-telnet-61|nu-full|full nu screen thru telnet, - cols#78, lines#61, use=nunix-30, - -bch|bc|bill croft homebrew, - am, - cols#96, lines#72, - clear=^Z, cub1=^H, cud1=^J, cuf1=^L, - cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, flash=, - home=^^, -nucterm|rayterm|NUC homebrew, - am, - cols#80, lines#24, - bel=^G, clear=\014$<1>, cr=^M, cub1=^H, cud1=^J, - cuf1=^C, cuu1=^N, ed=^E, el=^A, home=^B, ind=^J, - ll=^K, -carlock|klc|mystery `carlock' terminal, - am, - cols#80, lines#24, - bel=^G, clear=\032$<100>, cr=^M, cub1=^H, cud1=^J, - cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, - dch1=\177, dl1=^D, el=^U, flash=\EV\EV, home=^^, - il1=^E, ind=^J, rmir=^T, rmso=^V, smir=^T, smso=^V, -# uVAX -qdss|qdcons|qdss glass tty, - am, - cols#128, lines#57, - clear=\032$<1/>, cub1=^H, cud1=^J, cuf1=^L, - cup=\E=%p1%c%p2%c, cuu1=^K, -# (ubell: removed obsolete ":ma=j^Jk^P^K^Pl :bc=^Y:" -- esr) -ubell|ubellchar|mystery `ubell' terminal, - am, - cols#80, it#8, lines#24, - bel=^G, clear=^Z, cr=^M, cub1=^H, cud1=^J, cuf1=^L, - cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, el=\Ed, - home=^^, ht=^I, ind=^J, -ttywilliams, - am, - cols#80, lines#12, - bel=^G, clear=^^, cr=^M, cub1=^Y, cud1=^K, cuf1=^X, - cuu1=^Z, el=^_, home=^], ind=^J, + kf9=\E[OS, khome=\E[H, ri=\EM, rmam=\E[?7l, + rmir=\E[4l, rmkx=\E>, rmso=\E[m, rmul=\E[m, + smam=\E[?7h, smir=\E[4h, smkx=\E=, smso=\E[7m, + smul=\E[4m, ######## ICH/ICH1 VERSUS RMIR/SMIR # # Some non-curses applications get confused if both ich/ich1 and rmir/smir @@ -12109,6 +11538,35 @@ ttywilliams, # * Corrected ansi.sys entry. # * Freeze for ncurses-1.9.7 release. # +# 9.11.1 (Tue Nov 6 18:18:38 EST 1995): +# * Added rmam/smam capabilities to many entries based on init strings. +# * Added correct hpa/vpa to linux. +# * Reduced several entries relative to vt52. +# +# 9.11.2 (Tue Nov 7 00:21:06 EST 1995): +# * Exiled some utterly unidentifiable custom and homebrew types to the +# UFO file; also, obsolete small-screen hardware; also, entries which +# look flat-out incorrect, garbled, or redundant. These include the +# following entries: carlock, cdc456tst, microkit, qdss, ramtek, tec, +# tec400, tec500, ubell, wind, wind16, wind40, wind50, plasma, agile, +# apple, bch, daleblit, nucterm, ttywilliams, nuterminal, nu24, bnu, +# fnu, nunix-30, nunix-61, exidy, ex3000, sexidy, pc52, sanyo55, +# yterm10, yterm11, yterm10nat, aed, aed-ucb, compucolor, compucolor2, +# vic20, dg1, act5s, netx, smartvid, smarterm, sol, sol2, dt200, +# trs80, trs100, trs200, trs600, xitex, rsvidtx, vid, att2300-x40, +# att2350-x40, att4410-nfk, att5410-ns, otty5410, att5425-nl-w, +# tty5425-fk, tty5425-w-fk, cita, c108-na, c108-rv-na, c100-rv-na, +# c108-na-acs, c108-rv-na-acs, ims950-ns, infotonKAS, ncr7900i-na, +# regent60na, scanset-n, tvi921-g, tvi925n, tvi925vbn, tvi925vb, +# vc404-na, vc404-s-na, vt420nam, vt420f-nam, vt420pc-nam, vt510nam, +# vt510pc-nam, vt520nam, vt525nam, xterm25, xterm50, xterm65, xterms. +# * Corrected pcvt25h as suggested by Brian C. Grayson +# . +# +# 9.11.3 (Thu Nov 9 12:14:40 EST 1995): +# * Added kspd=\E[P, kcbt=\E[Z, to linux entry, changed kbs back to ^H. +# * Added kent=\EOM to xterm entry. +# ######## REORDER # # Older termcap distributions featured a kluge called `reorder' intended to diff --git a/ncurses/MKfallback.sh b/ncurses/MKfallback.sh index 4aa2673b..047c6295 100755 --- a/ncurses/MKfallback.sh +++ b/ncurses/MKfallback.sh @@ -59,6 +59,6 @@ else fi cat <$@ + keys.tries: $(srcdir)/keys.list $(AWK) -f $(srcdir)/MKkeys.awk $(srcdir)/keys.list > keys.tries diff --git a/ncurses/comp_hash.c b/ncurses/comp_hash.c index 51159a89..876fa1c0 100644 --- a/ncurses/comp_hash.c +++ b/ncurses/comp_hash.c @@ -27,6 +27,7 @@ */ #include +#include "config.h" #include "tic.h" #include "hashsize.h" @@ -166,6 +167,18 @@ struct name_table_entry const *ptr; * performance enhancement). */ +#ifndef HAVE_STRDUP +static char *strdup (char *s) +{ + char *p; + + p = malloc((unsigned)(strlen(s)+1)); + if (p) + strcpy(p,s); + return(p); +} +#endif /* not HAVE_STRDUP */ + #define MAX_COLUMNS BUFSIZ /* this _has_ to be worst-case */ #define typeCalloc(type,elts) (type *)calloc(sizeof(type),elts) @@ -235,10 +248,13 @@ int main(int argc, char **argv) /* * Read the table into our arrays. */ - for (n = 0; (n < CAPTABSIZE) && gets(buffer); ) { - char **list = parse_columns(buffer); + for (n = 0; (n < CAPTABSIZE) && fgets(buffer, BUFSIZ, stdin); ) { + char **list, *nl = strchr(buffer, '\n'); + if (nl) + *nl = '\0'; + list = parse_columns(buffer); if (list == 0) /* blank or comment */ - continue; + continue; name_table[n].nte_link = -1; /* end-of-hash */ name_table[n].nte_name = strdup(list[column]); if (!strcmp(list[2], "bool")) { diff --git a/ncurses/comp_scan.c b/ncurses/comp_scan.c index 23cf00c1..14318a04 100644 --- a/ncurses/comp_scan.c +++ b/ncurses/comp_scan.c @@ -424,7 +424,10 @@ chtype ch, last_ch = '\0'; _nc_warning("Illegal ^ character - %s", _tracechar((unsigned char)ch)); } - *(ptr++) = (char)(ch & 037); + if (ch == '?') + *(ptr++) = '\177'; + else + *(ptr++) = (char)(ch & 037); } else if (ch == '\\') { ch = c = next_char(); diff --git a/ncurses/fallback.c b/ncurses/fallback.c deleted file mode 100644 index 8ca03e9c..00000000 --- a/ncurses/fallback.c +++ /dev/null @@ -1,11 +0,0 @@ -/* - * DO NOT EDIT THIS FILE BY HAND! It is generated by MKfallback.sh. - */ - -#include "term.h" - -const TERMTYPE *_nc_fallback(const char *name) -{ - /* the fallback list is empty */ - return((TERMTYPE *)NULL); -} diff --git a/ncurses/lib_clrbot.c b/ncurses/lib_clrbot.c index 899968be..e8866ec6 100644 --- a/ncurses/lib_clrbot.c +++ b/ncurses/lib_clrbot.c @@ -36,34 +36,36 @@ int y, startx, minx; T(("wclrtobot(%p) called", win)); startx = win->_curx; + if (win->_flags & _NEED_WRAP) + startx++; T(("clearing from y = %d to y = %d with maxx = %d", win->_cury, win->_maxy, win->_maxx)); for (y = win->_cury; y <= win->_maxy; y++) { - minx = _NOCHANGE; - end = &win->_line[y].text[win->_maxx]; + minx = _NOCHANGE; + end = &win->_line[y].text[win->_maxx]; - for (ptr = &win->_line[y].text[startx]; ptr <= end; ptr++) { - int blank = _nc_render(win, *ptr, BLANK); + for (ptr = &win->_line[y].text[startx]; ptr <= end; ptr++) { + int blank = _nc_render(win, *ptr, BLANK); if (*ptr != blank) { - maxx = ptr; - if (minx == _NOCHANGE) + maxx = ptr; + if (minx == _NOCHANGE) minx = ptr - win->_line[y].text; - *ptr = blank; + *ptr = blank; } - } + } - if (minx != _NOCHANGE) { + if (minx != _NOCHANGE) { if (win->_line[y].firstchar > minx || win->_line[y].firstchar == _NOCHANGE) win->_line[y].firstchar = minx; if (win->_line[y].lastchar < maxx - win->_line[y].text) win->_line[y].lastchar = maxx - win->_line[y].text; - } + } - startx = 0; + startx = 0; } _nc_synchook(win); return OK; diff --git a/ncurses/lib_clreol.c b/ncurses/lib_clreol.c index f3ff6625..119bfe74 100644 --- a/ncurses/lib_clreol.c +++ b/ncurses/lib_clreol.c @@ -38,7 +38,8 @@ int y, x, minx; y = win->_cury; x = win->_curx; - if (y > win->_maxy + if (win->_flags & _NEED_WRAP + || y > win->_maxy || x > win->_maxx) return ERR; diff --git a/ncurses/lib_scroll.c b/ncurses/lib_scroll.c index da0b318a..16a3d9a6 100644 --- a/ncurses/lib_scroll.c +++ b/ncurses/lib_scroll.c @@ -98,6 +98,10 @@ wscrl(WINDOW *win, int n) if (n == 0) return OK; + if ((n > (win->_regbottom - win->_regtop)) || + (-n > (win->_regbottom - win->_regtop))) + return ERR; + _nc_scroll_window(win, n, win->_regtop, win->_regbottom); touchline(win, win->_regtop, win->_regbottom - win->_regtop + 1); diff --git a/ncurses/modules b/ncurses/modules index ace69154..5cdbaa1f 100644 --- a/ncurses/modules +++ b/ncurses/modules @@ -63,7 +63,7 @@ lib_vidattr lib $(srcdir) ../include/term.h lib_window lib $(srcdir) names lib . read_entry lib $(srcdir) ../include/term.h $(INCDIR)/tic.h -fallback lib $(srcdir) ../include/term.h $(INCDIR)/tic.h +fallback lib . ../include/term.h $(INCDIR)/tic.h read_termcap lib $(srcdir) ../include/term.h write_entry progs $(srcdir) ../include/term.h $(INCDIR)/tic.h diff --git a/ncurses/parse_entry.c b/ncurses/parse_entry.c index 495e67f0..bb5d8df9 100644 --- a/ncurses/parse_entry.c +++ b/ncurses/parse_entry.c @@ -318,8 +318,6 @@ int _nc_capcmp(const char *s, const char *t) /* else *s == *t but one is not NUL, so continue */ s++, t++; } - - return(0); } /* diff --git a/ncurses/read_entry.c b/ncurses/read_entry.c index e9e49f22..3380f7cb 100644 --- a/ncurses/read_entry.c +++ b/ncurses/read_entry.c @@ -55,16 +55,19 @@ TERMINAL *cur_term; * table. */ -#define IS_NEG1(p) (((p)[0] == 0377) && ((p)[1] == 0377)) -#define IS_NEG2(p) (((p)[0] == 0376) && ((p)[1] == 0377)) -#define LOW_MSB(p) ((p)[0] + 256*(p)[1]) +#undef BYTE +#define BYTE(p,n) (unsigned char)(p)[n] + +#define IS_NEG1(p) ((BYTE(p,0) == 0377) && (BYTE(p,1) == 0377)) +#define IS_NEG2(p) ((BYTE(p,0) == 0376) && (BYTE(p,1) == 0377)) +#define LOW_MSB(p) (BYTE(p,0) + 256*BYTE(p,1)) int _nc_read_file_entry(const char *filename, TERMTYPE *ptr) /* return 1 if read, 0 if not found or garbled, -1 if database inaccessible */ { - int name_size, bool_count, num_count, str_count, str_size; - int i, fd, numread; - unsigned char buf[MAX_ENTRY_SIZE]; + int name_size, bool_count, num_count, str_count, str_size; + int i, fd, numread; + char buf[MAX_ENTRY_SIZE]; if ((fd = open(filename, 0)) < 0) { diff --git a/ncurses/write_entry.c b/ncurses/write_entry.c index 162cac27..4b473780 100644 --- a/ncurses/write_entry.c +++ b/ncurses/write_entry.c @@ -25,7 +25,9 @@ * write_entry.c -- write a terminfo structure onto the file system */ -#include +#include + +#include #include #include diff --git a/progs/infocmp.c b/progs/infocmp.c index fed641b1..c48d1a42 100644 --- a/progs/infocmp.c +++ b/progs/infocmp.c @@ -89,6 +89,11 @@ static char *canonical_name(char *ptr, char *buf) static int capcmp(const char *s, const char *t) /* capability comparison function */ { + if (!s && !t) + return(0); + else if (!s || !t) + return(1); + if (ignorepads) return(_nc_capcmp(s, t)); else @@ -301,49 +306,51 @@ static void compare_predicate(int type, int idx, const char *name) ***************************************************************************/ typedef struct {char *from; char *to;} assoc; -static const assoc dec_caps[] = + +static const assoc std_caps[] = { - /* FIXME: use ECMA-48 mnemonics here rather than the DEC ones */ - "\033c", "RIS", /* full reset */ + /* these are specified by X.364 and iBCS2 */ + {"\033c", "RIS"}, /* full reset */ - "\033=", "DECPAM", /* application keypad mode */ - "\033>", "DECPNM", /* normal keypad mode */ - - "\0337", "DECSC", /* save cursor */ - "\0338", "DECRC", /* restore cursor */ - - "\033(0", "DEC G0", /* enable DEC graphics for G0 */ - "\033(A", "DEC UK G0", /* enable UK chars for G0 */ - "\033(B", "DEC US G0", /* enable US chars for G0 */ - "\033)0", "DEC G1", /* enable DEC graphics for G1 */ - "\033)A", "DEC UK G1", /* enable UK chars for G1 */ - "\033)B", "DEC US G1", /* enable US chars for G1 */ - - "\033[?1h", "DECCKM on", /* application cursor keys */ - "\033[?2h", "DECANM on", /* set VT52 mode */ - "\033[?3h", "DECCOLM on", /* 132-column mode */ - "\033[?4h", "DECSCLM on", /* smooth scroll */ - "\033[?5h", "DECSCNM on", /* reverse video mode */ - "\033[?6h", "DECOM on", /* origin mode */ - "\033[?7h", "DECAWM on", /* wraparound mode */ - "\033[?8h", "DECARM on", /* auto-repeat mode */ - - "\033[?1l", "DECCKM off", /* application cursor keys */ - "\033[?2l", "DECANM off", /* set VT52 mode */ - "\033[?3l", "DECCOLM off", /* 132-column mode */ - "\033[?4l", "DECSCLM off", /* smooth scroll */ - "\033[?5l", "DECSCNM off", /* reverse video mode */ - "\033[?6l", "DECOM off", /* origin mode */ - "\033[?7l", "DECAWM off", /* wraparound mode */ - "\033[?8l", "DECARM off", /* auto-repeat mode */ - (char *)NULL, + {"\0337", "SC"}, /* save cursor */ + {"\0338", "RC"}, /* restore cursor */ + {"\033[r", "RSR"}, /* not an X.364 mnemonic */ + + /* this group is specified by ISO 2022 */ + {"\033(0", "ISO DEC G0"}, /* enable DEC graphics for G0 */ + {"\033(A", "ISO UK G0"}, /* enable UK chars for G0 */ + {"\033(B", "ISO US G0"}, /* enable US chars for G0 */ + {"\033)0", "ISO DEC G1"}, /* enable DEC graphics for G1 */ + {"\033)A", "ISO UK G1"}, /* enable UK chars for G1 */ + {"\033)B", "ISO US G1"}, /* enable US chars for G1 */ + + /* these are DEC private modes widely supported by emulators */ + {"\033=", "DECPAM"}, /* application keypad mode */ + {"\033>", "DECPNM"}, /* normal keypad mode */ + {"\033<", "DECANSI"}, /* enter ANSI mode */ + + (char *)NULL +}; + +static const assoc private_modes[] = +/* DEC \E[ ... [hl] modes recognized by many emulators */ +{ + {"1", "CKM"}, /* application cursor keys */ + {"2", "ANM"}, /* set VT52 mode */ + {"3", "COLM"}, /* 132-column mode */ + {"4", "SCLM"}, /* smooth scroll */ + {"5", "SCNM"}, /* reverse video mode */ + {"6", "OM"}, /* origin mode */ + {"7", "AWM"}, /* wraparound mode */ + {"8", "ARM"}, /* auto-repeat mode */ + (char *)NULL }; static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) { char buf[MAX_TERMINFO_LENGTH]; char buf2[MAX_TERMINFO_LENGTH]; - const char *sp; + const char *sp, *ep; const assoc *ap; if (cap == ABSENT_STRING || cap == CANCELLED_STRING) @@ -353,7 +360,7 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) buf[0] = '\0'; for (sp = cap; *sp; sp++) { - int i, len; + int i, len = 0; char *expansion = (char *)NULL; /* first, check other capabilities in this entry */ @@ -393,9 +400,9 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) } } - /* now check the DEC capabilities */ + /* now check the standard capabilities */ if (!expansion) - for (ap = dec_caps; ap->from; ap++) + for (ap = std_caps; ap->from; ap++) { len = strlen(ap->from); @@ -406,14 +413,52 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) } } + /* now check for private-mode sequences */ + if (!expansion + && sp[0] == '\033' && sp[1] == '[' && sp[2] == '?' + && (len = strspn(sp + 3, "0123456789;")) + && ((sp[3 + len] == 'h') || (sp[3 + len] == 'l'))) + { + char buf3[MAX_TERMINFO_LENGTH]; + + (void) strcpy(buf2, (sp[3 + len] == 'h') ? "DEC+" : "DEC-"); + (void) strncpy(buf3, sp + 3, len); + len += 4; + buf3[len] = '\0'; + + ep = strtok(buf3, ";"); + do { + bool found = FALSE; + + for (ap = private_modes; ap->from; ap++) + { + int tlen = strlen(ap->from); + + if (strncmp(ap->from, ep, len) == 0) + { + (void) strcat(buf2, ap->to); + found = TRUE; + break; + } + } + + if (!found) + (void) strcat(buf2, ep); + (void) strcat(buf2, ";"); + } while + (ep = strtok((char *)NULL, ";")); + buf2[strlen(buf2) - 1] = '\0'; + expansion = buf2; + } + /* now check for scroll region reset */ if (!expansion) { (void) sprintf(buf2, "\033[1;%dr", tp->Numbers[2]); len = strlen(buf2); if (strncmp(buf2, sp, len) == 0) - expansion = "DEC/ANSI scroll region reset"; - } + expansion = "RSR"; + } /* now check for home-down */ if (!expansion) @@ -421,7 +466,7 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) (void) sprintf(buf2, "\033[%d;1H", tp->Numbers[2]); len = strlen(buf2); if (strncmp(buf2, sp, len) == 0) - expansion = "DEC/ANSI home-down"; + expansion = "LL"; } /* now look at the expansion we got, if any */ @@ -448,7 +493,7 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) * ***************************************************************************/ -static void file_comparison(int argc, char *argv[], int optind) +static void file_comparison(int argc, char *argv[]) { /* someday we may allow comparisons on more files */ int filecount = 0; @@ -836,7 +881,6 @@ int main(int argc, char *argv[]) /* dump as C initializer for the terminal type */ if (initdump) { - int i; char *str; int size; @@ -861,6 +905,9 @@ int main(int argc, char *argv[]) case CANCELLED_BOOLEAN: str = "CANCELLED_BOOLEAN"; break; + default: + str = "?ERROR"; + break; } (void) printf("/* %s */ %s,\n", boolnames[i], str); @@ -901,7 +948,7 @@ int main(int argc, char *argv[]) (void) printf("/* %s */ %s,\n", strnames[i], str); } (void) printf("} /* size = %d */\n", size); - return; + exit(0); } /* analyze the init strings */ @@ -916,7 +963,7 @@ int main(int argc, char *argv[]) analyze_string("rs2", reset_2string, &term[0]); analyze_string("rs3", reset_3string, &term[0]); #undef CUR - return; + exit(0); } /* @@ -981,7 +1028,7 @@ int main(int argc, char *argv[]) (void) fprintf(stderr, "File comparison needs exactly two file arguments.\n"); else - file_comparison(argc, argv, optind); + file_comparison(argc, argv); exit(0); } diff --git a/include/progs.priv.h b/progs/progs.priv.h similarity index 83% rename from include/progs.priv.h rename to progs/progs.priv.h index aa532da6..ef1d06e1 100644 --- a/include/progs.priv.h +++ b/progs/progs.priv.h @@ -47,11 +47,28 @@ # endif #endif +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + #if HAVE_GETOPT_H #include #else - /* 'getopt()' may be prototyped in , but declaring its - * variables doesn't hurt. +/* 'getopt()' may be prototyped in , but declaring its +* variables doesn't hurt. */ extern char *optarg; extern int optind; diff --git a/progs/toe.c b/progs/toe.c index 3e3de9ea..52f9028c 100644 --- a/progs/toe.c +++ b/progs/toe.c @@ -24,10 +24,10 @@ * */ -#include -#include +#include + +#include -#include "progs.priv.h" #include "tic.h" #include "term.h" #include "dump_entry.h" @@ -148,12 +148,12 @@ int main (int argc, char *argv[]) else { char *explicit, *home, *eargv[3]; - int i; + int j; extern char *getenv(const char *); - i = 0; + j = 0; if ((explicit = getenv("TERMINFO")) != (char *)NULL) - eargv[i++] = explicit; + eargv[j++] = explicit; else { if ((home = getenv("HOME")) != (char *)NULL) @@ -162,13 +162,13 @@ int main (int argc, char *argv[]) (void) sprintf(personal, PRIVATE_INFO, home); if (access(personal, F_OK) == 0) - eargv[i++] = personal; + eargv[j++] = personal; } - eargv[i++] = TERMINFO; + eargv[j++] = TERMINFO; } - eargv[i] = (char *)NULL; + eargv[j] = (char *)NULL; - typelist(i, eargv, header, deschook); + typelist(j, eargv, header, deschook); } exit(0); @@ -211,31 +211,37 @@ static void typelist(int eargc, char *eargv[], while ((subdir = readdir(termdir)) != NULL) { + size_t len = NAMLEN(subdir); char buf[PATH_MAX]; + char name_1[PATH_MAX]; DIR *entrydir; struct dirent *entry; - if (!strcmp(subdir->d_name, ".") - || !strcmp(subdir->d_name, "..")) + strncpy(name_1, subdir->d_name, len)[len] = '\0'; + if (!strcmp(name_1, ".") + || !strcmp(name_1, "..")) continue; (void) strcpy(buf, eargv[i]); (void) strcat(buf, "/"); - (void) strcat(buf, subdir->d_name); + (void) strcat(buf, name_1); (void) strcat(buf, "/"); chdir(buf); entrydir = opendir("."); while ((entry = readdir(entrydir)) != NULL) { + char name_2[PATH_MAX]; TERMTYPE lterm; char *cn; int status; - if (!strcmp(entry->d_name, ".") - || !strcmp(entry->d_name, "..")) + len = NAMLEN(entry); + strncpy(name_2, entry->d_name, len)[len] = '\0'; + if (!strcmp(name_2, ".") + || !strcmp(name_2, "..")) continue; - status = _nc_read_file_entry(entry->d_name, <erm); + status = _nc_read_file_entry(name_2, <erm); if (status == -1) { (void) fprintf(stderr, @@ -247,13 +253,13 @@ static void typelist(int eargc, char *eargv[], { (void) fprintf(stderr, "infocmp: couldn't open terminfo file %s.\n", - entry->d_name); + name_2); return; } /* only visit things once, by primary name */ cn = _nc_first_name(lterm.term_names); - if (strcmp(cn, entry->d_name)) + if (strcmp(cn, name_2)) continue; /* apply the selected hook function */ diff --git a/progs/tset.c b/progs/tset.c index 9e48e643..fe9cef18 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -128,6 +128,18 @@ CaselessCmp(char *a, char *b) /* strcasecmp isn't portable */ return LOWERCASE(*a) - LOWERCASE(*b); } +#ifndef HAVE_STRDUP +static char *strdup (char *s) +{ + char *p; + + p = malloc((unsigned)(strlen(s)+1)); + if (p) + strcpy(p,s); + return(p); +} +#endif /* not HAVE_STRDUP */ + static void err(const char *fmt, ...) { @@ -545,11 +557,11 @@ found: if ((p = getenv("TERMCAP")) != NULL && *p != '/') { #define CKILL CTRL('U') #if defined(CLNEXT) #undef CLNEXT -#define CLNEXT('v') +#define CLNEXT CTRL('v') #endif #if defined(CRPRNT) #undef CRPRNT -#define CRPRNT('r') +#define CRPRNT CTRL('r') #endif #define CQUIT CTRL('\\') #define CSTART CTRL('Q') diff --git a/test/ncurses.c b/test/ncurses.c index 4c62ab3e..f865660c 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -878,8 +878,6 @@ static WINDOW *w3; static WINDOW *w4; static WINDOW *w5; -#define nap(x) usleep(1000*x) - static unsigned long nap_msec = 1; char *mod[] = @@ -909,7 +907,7 @@ wait_a_while(unsigned long msec) if(nap_msec == 1) getchar(); else - nap(nap_msec); + napms(nap_msec); #endif } /* end of wait_a_while */ diff --git a/test/testcurs.c b/test/testcurs.c index 6176a866..ef3bdcfe 100644 --- a/test/testcurs.c +++ b/test/testcurs.c @@ -3,6 +3,7 @@ * This is a test program for the PDCurses screen package for IBM PC type * machines. * This program was written by John Burnell (johnb@kea.am.dsir.govt.nz) + * esr changed the usleep calls to napms calls, 7 Nov 1995 * */ @@ -168,7 +169,7 @@ scrollTest (WINDOW *win) wrefresh (win); scrollok(win, TRUE); for (i = 1; i <= height; i++) { - usleep (250); + napms(250); scroll(win); wrefresh (win); }; @@ -180,7 +181,7 @@ scrollTest (WINDOW *win) box(win, ACS_VLINE, ACS_HLINE); wrefresh (win); for (i = 1; i <= 5; i++) { - usleep (500); + napms(500); scroll(win); wrefresh (win); }; @@ -229,7 +230,7 @@ inputTest (WINDOW *win) box(subWin, ACS_VLINE, ACS_HLINE); mvwprintw (subWin, 1, 1, "Time = %d", i); wrefresh(subWin); - usleep(1000); + napms(1000); flushinp(); } @@ -237,7 +238,7 @@ inputTest (WINDOW *win) werase(win); flash(); wrefresh(win); - usleep(500); + napms(500); mvwaddstr(win, 2, 1, "Press a key, followed by ENTER"); wmove(win, 9, 10); diff --git a/test/view.c b/test/view.c index 63fe0479..7e4054dd 100644 --- a/test/view.c +++ b/test/view.c @@ -36,10 +36,10 @@ int main(int argc, char *argv[]) FILE *fp; char buf[BUFSIZ]; int i; -char **lptr; +char **lptr, **olptr; #ifdef TRACE - trace(TRACE_CALLS); + trace(TRACE_UPDATE); #endif if (argc != 2) { @@ -101,22 +101,24 @@ char **lptr; switch(c) { case KEY_DOWN: case 'n': + olptr = lptr; for (i = 0; i < n; i++) if (lptr + LINES < lines + MAXLINES && lptr[LINES + 1]) lptr++; else break; - wscrl(stdscr, i); + wscrl(stdscr, olptr - lptr); break; case KEY_UP: case 'p': + olptr = lptr; for (i = 0; i < n; i++) if (lptr > lines) lptr--; else break; - wscrl(stdscr, -i); + wscrl(stdscr, olptr - lptr); break; } }