🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.terminals
Article #1013

Re: terminfo description needs pause

#1013
From: Berny Goodheart
Date: Sun, 23 Dec 1990 17:11
95 lines
4870 bytes
In article <1990Dec17.171335.4861@xenitec.on.ca>, vances@xenitec.on.ca (Vance Shipley) writes:
> Here's one for you terminfo gurus.  I have an AT&T 5620 terminal and
> I am using SCO ODT.  The problem is that when I log in the terminal
> reset escape code is sent and this seems to take two or three seconds
> to proccess in the terminal, by that time the string that declares the
> terminal type and sometimes the first "1%" are missed.  I need to 
> introduce a delay after the rs1 sequence.  I tried adding a pad to the
> rs1 string but that didn't work because the npc boolean is present (no
> pad character).  Removing npc and supplying a pad in rs1 results in 
> garbage being displayed (the pad chars).
> 
> 	How can I delay further action after the rs1 sequence?
> 
> 	Why does terminfo use padding characters anyway, why not just wait?
> 

Here is an excerpt from my book "UNIX Curses Explained":


Initialization
---------------

(is2): Essentially, the sequences for initializing the terminal are sent by
the UNIX command tput. The command "tput init" should be issued
before any program that uses terminfo (including curses). Ideally,
this command should be run from your .profile at login time.

The purpose of these initialization strings is to set up the terminal
so that it is ready for use with curses or terminfo-based programs.
Once transmitted to the terminal, they should place it into its relevant 
operating modes, which are consistent with the rest of the terminal's
terminfo description.

Generally, is2 is the most common string used for initializing the terminal.
The command "tput init" does the following:
(1)	If the capability iprog is defined (which should contain the full
	path name of a UNIX command), then the program specified in this
	string is executed. This may be a special case program which
	initializes the terminal in a way that terminfo can't. Although this
	facility exists, there are currently no terminals in the terminfo
	database that use it.

(2)	If is1 is defined, this is sent to the terminal followed by is2.

(3)	Tabstops are initialized using tbc and hts.

(4)	If "if" is defined, the contents of this file are sent to the terminal.

(5)	Finally, the sequence for is3 is sent, if it is defined.

(if): If the terminal initialization sequence is too long to fit in the
description file, it should be put in a file which will be printed (sent)
to the terminal. Thus, this string capability contains the full path-name of
a UNIX file. It is normal for terminals that use this method to store their
initialization files in the /usr/lib/tabset directory.

(iprog): This string sequence contains the full path-name of a UNIX executable
which is used to initialize the terminal (see above).

(is1): This string contains the primary initialization sequence (see above)
which may be used in special cases.

(is3) This string contains the final initialization sequence (see above)
which may be used in special cases.


Resetting the terminal
------------------------

(rs2): As with the initialization capabilities, these strings are usually used
to reset the terminal to a "sane" operating mode if it gets into an unusable
state.  This often happens if a curses program exits abnormally without calling
endwin(). Normally, these strings are sent to the terminal by the UNIX command
"tput reset" which leaves the terminal in a completely sane mode.  The command 
"tput reset" does essentially the same as "tput init" except that the rs1,
rs2 and rs3 strings are also sent.

(rf): If the terminal's reset string is too long to fit in the description
file, then rf should define the full path-name of a UNIX file (normally
in /usr/lib/tabset) which will be printed to the terminal.

(rs1): This string contains the primary reset sequence (see above) which
may be used in special cases.

(rs3): This string contains the secondary reset sequence (see above)
which may be used in special cases.

Berny Goodheart


.===========================================================================.
|   ACSnet: berny@tndsyd.oz       UUCP: uunet!munnari.oz!tndsyd.oz.au!berny |
| INTERNET: berny@tndsyd.oz.au  DOMAIN: goodheart_berny@tandem.com          |
|   PSMAIL: smtpgate @comm(berny@tndsyd.oz@munnari.oz.au)                   |
TANDEM Computers Incorporated 76 Berry St, North Sydney, NSW, 2060, Australia
Technical Details
Message-ID: <606@tndsyd.oz>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!mel.dit.csiro.au!yarra!pta!tndsyd!berny
References: <1990Dec17.171335.4861@xenitec.on.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!mel.dit.csiro.au!yarra!pta!tndsyd!berny
From: berny@tndsyd.oz (Berny Goodheart)
Newsgroups: comp.terminals
Subject: Re: terminfo description needs pause
Message-ID: <606@tndsyd.oz>
Date: 23 Dec 90 17:11:27 GMT
References: <1990Dec17.171335.4861@xenitec.on.ca>
Organization: TANDEM Computers Incorporated, Sydney, NSW, Australia
Lines: 95