Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!unhd!psc90!pyr4 From: pyr4@psc90.UUCP (**** The Wizard ****) Newsgroups: comp.unix.wizards Subject: vt100 termcap (problem/question) Message-ID: <1177@psc90.UUCP> Date: 19 Feb 90 21:58:07 GMT Reply-To: pyr4@psc90.UUCP (**** The Wizard ****) Distribution: na Organization: Plymouth State College - Plymouth, NH Lines: 33 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. |