vt100 termcap (problem/question)

**** The Wizard **** pyr4 at psc90.UUCP
Tue Feb 20 08:58:07 AEST 1990


	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.

|   Ted Wisniewski    UUCP:  uunet!unhd!psc90!pyr4 or: dartvax!psc90!pyr4|
|   Plymouth State College                                               |
|   Plymouth NH, 03264              If I spoke for PSC they would pay me,|
|                                        But instead I pay them.         |



More information about the Comp.unix.wizards mailing list