[comp.terminals] character insert: ic, im, ei, ip?

kkim@uiucdcsm.cs.uiuc.edu (05/10/88)

    i got confused about the following termcap entries used 
in unix systems: ic, im, ei, ip.  according to the man page:

    1) the editor can handle both terminals which have an insert mode,
and terminals which send a simple sequence to operan a blank position
on the curent line...

Q: what is the difference between these two?  some simple example
will help.

    2) most terminals with a true insert mode will not give ic, terminals
which send a sequence to open a screen position should give it here.
(insert mode is preferable to the sequence to open a position on the 
screen if your terminal has both)

Q: my Qume QVT-101 terminal needs "ESCAPE Q" to insert a character.
which of the two types does my terminal belong to?  shall i give
"\EQ" to "ic" or "im"?

    3) if post insert padding is needed, give this as a number of 
milliseconds in ip.  any other sequence which may need to be sent
after an insert of a single character may also be given in ip.

Q: what is the difference between ip and ei?  also what is "post
insert padding" and when is it required?  some example will help.

    thanks in advance.

Kyongsok Kim

Dept. of C.S.; Univ. of Illinois at Urbana-Champaign
Arpa Internet/CSnet: kkim@a.cs.uiuc.edu
uucp      : ... {seismo, ihnp4, pur-ee}!uiucdcs!kkim

gwyn@brl-smoke.ARPA (Doug Gwyn ) (05/11/88)

In article <8700002@uiucdcsm> kkim@uiucdcsm.cs.uiuc.edu writes:
>    i got confused about the following termcap entries used 
>in unix systems: ic, im, ei, ip.  ...

>Q: what is the difference between these two?  some simple example
>will help.

start with the following on the display, with the cursor between
the "a"s and the "b"s.
aaaaabbbbb

The "ic" code produces
aaaaa bbbbb

The "im" code produces
aaaaabbbbb
(no visible change, just an internal mode is set)

The "ic" code followed by "ccc" produces
aaaaacccbbb
The first character was in effect inserted (actually it overwrote a
blank that the "ic" code inserted) and the following characters just
do the normal thing, namely overwrite what is on the display.

The "im" code followed by "ccc" produces
aaaaacccbbbbb
You'd better do an "ei" to get out of insert mode.

>Q: my Qume QVT-101 terminal needs "ESCAPE Q" to insert a character.
>which of the two types does my terminal belong to?  shall i give
>"\EQ" to "ic" or "im"?

"ic" inserts just ONE following character after which the terminal
reverts to overwrite mode.
"im" initiates a mode in which ALL subsequent characters are inserted
until the "ei" string is sent.
One cannot tell from your description which of the two cases applies.
My guess would be "im" with ei=\ER, because that's what HP terminals do.

>Q: what is the difference between ip and ei?  also what is "post
>insert padding" and when is it required?  some example will help.

Padding is used to cause a delay while some time-consuming operation
occurs during which additional screen formatting instructions could
be lost.  Delay might be necessary for insertion of each character
because it takes time for the terminal to copy the block of characters
that has to be moved to new locations in its display memory.

"ei" undoes the effect of "im" and has nothing to do with padding.