termcap str + params -> control seq. How?

mike gerard jmg at cernvax.cern.ch
Sat Apr 6 17:57:36 AEST 1991


In article <1931 at ahds.UUCP> dick at ahds.UUCP (Dick Heijne CCS/TS) writes:
>> you could always switch to the *real thing* and use terminfo instead. :-)
>The only(?) disadvantage of this *real thing* is, that you can't introduce
>new entries, which is quite simple in termcap. So far, I didn't find any
>advantage of terminfo over termcap. After solving the two-character entryname
>limit of termcap by writing my own libtermcap.a (with a variable buffersize
>instead of the standard 1K and unlimited entryname-length) I keep prefering
>termcap over terminfo for its greater flexibility.

Exactly what I found. I wanted more efficient sequences to move right
on the same line, so I put in a termcap entry of the form

  rt=\E[%dC:

and then use it with

  tputs(tgoto(RT, nx-ox, nx-ox), 1, putchar);

(where clearly nx = new x-value, ox = old x-value.

There are other sequences that I wanted in termcap (how to switch between
80 and 132 column mode): the nice thing about termcap is to be able to
do this without upsetting other uses. Another vote in favour of it!
-- 
 _ _  o |            __                    |    jmg at cernvax.uucp
| | |   |     _     /  \  _   __  _   __  _|    jmg at cernvax.bitnet
| | | | |_)  /_)    |  __/_) | (___\ | (_/ |  J. M. Gerard, Div. DD, CERN,
| | |_|_| \_/\___   \__/ \___|   (_|_|   \_|_ 1211 Geneva 23, Switzerland



More information about the Comp.unix.programmer mailing list