Termcap, IC, and IM

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Aug 29 03:53:26 AEST 1989


In article <1989Aug28.151908.24779 at agate.uucp> jym at anableps.berkeley.edu (Jym Dyer) writes:
>I've got several termcap documents.  One is Richard Stallman's excellent
> Termcap manual.  It tells me that if just inserting a character in insert
>  mode (IM) is sufficient, there's no need to define insert character (IC).
>   A DEC manual says that if you do define IC, IM should be defined in the
>    termcap file as ":im=:".

DEC is wrong.  You should specify both im/ei and ic only if the terminal
requires both.  Of course, specifying an empty string for im/ei results
in the same output sequence as doing it right would, but you cause the
application to perform more work than necessary.

>Is there ever a case where an insert mode won't let you insert without
> using an insert character escape sequence?  If so, what kind of insert
>  mode is it?

I don't understand the question.  There are im/ei-only, ic-only, and
im/ei/ic-combined terminal designs in existence.  There is also a strange
mode of operation in which not all characters on the right-hand part of
the line necessarily shift over when a new character is inserted; the "in"
capability is intended to deal with those designs.

By the way, IM and IC are not the same as im and ic.  There is no IM
capability, and IC takes a parameter which specifies how many spaces
are to be inserted.  im, ic, and ei are parameterless.

	- D A Gwyn, 4.3BSD TERMCAP(4) editor



More information about the Comp.unix.questions mailing list