vt100 termcap (problem/question)
Bill Vermillion
bill at bilver.UUCP
Sun Feb 25 05:09:14 AEST 1990
In article <1177 at psc90.UUCP-> pyr4 at psc90.UUCP (**** The Wizard ****) writes:
->
-> I have been working with the termcap commands (tgetstr) etc.
-> and have run into a snag. The problem is when using a vt100 terminal
-> things get a bit strange. Here is a sample of the code I am using.
->
->
-> tgetent(termbuf,term = getenv("TERM"));
->
-> SO = tgetstr("so",&capptr); /* start reverse mode */
-> SE = tgetstr("se",&capptr); /* end reverse mode */
->
-> sprintf(buffer,"%s%s%s%s","This is ",SO,"reverse video",SE);
-> printf("%s\n",buffer);
->
-> The output I get looks like:
->
-> This is 2reverse video2
-> ^ reversed ^
-> -----------------
->This is part of the vt100 termcap entry:
->
->Note the 2's:
-> v v
-> so=2\E[7m :se=2\E[m
->
-> What I would like to know is are they there for some purpose? If
->so what is it. I would also like to how to use tgoto and tputs if possible.
->Thanx in advance.
The numbers following the equal sign and before the actual escape sequence are
used for padding (delay).
I have found that in many distrubutions of termcaps that someone has put a
delay string in places that do not accept delay strings. I have found this in
some SCO termcaps, along with some graphics character reversals.
In the FM neither se nor so are permitted to have padding characters. This
caused me some grief before I went though the termcap an attribute at a time.
This seems to be done in many places. I just grep'ed the termcap file for any
"so=2" occurances and just found 10! Take out the "2"s after the = on the
above and your problem should go away.
bill
--
Bill Vermillion - UUCP: uunet!tarpit!bilver!bill
: bill at bilver.UUCP
More information about the Comp.unix.wizards
mailing list