Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!bloom-beacon!eru!hagbard!sunic!mcsun!cernvax!jmg From: jmg@cernvax.cern.ch (mike gerard) Newsgroups: comp.unix.programmer Subject: Re: termcap str + params -> control seq. How? Message-ID: <4797@cernvax.cern.ch> Date: 6 Apr 91 07:57:36 GMT References: <12587@hydra.Helsinki.FI> <577@bria> <1931@ahds.UUCP> Organization: CERN, European Laboratory for Particle Physics Lines: 28 In article <1931@ahds.UUCP> dick@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@cernvax.uucp | | | | _ / \ _ __ _ __ _| jmg@cernvax.bitnet | | | | |_) /_) | __/_) | (___\ | (_/ | J. M. Gerard, Div. DD, CERN, | | |_|_| \_/\___ \__/ \___| (_|_| \_|_ 1211 Geneva 23, Switzerland