[net.news.b] vnews virtterm.c bug, was using ts rather than ti

hansen@pegasus.UUCP (03/04/84)

I don't know if this bug has been found before. If it has, then ignore this
message. If not, then read on.

I just recently started using a terminal that has a status line, and also
the entries in termcap for using that status line. I noticed that whenever
vnews started up, it would print out some garbage before anything else.
Turning on monitor mode (a.k.a. transparent mode or display-function mode),
I recognized the sequence as the string to program the status line. I knew
that vnews didn't use the status line, so I then looked at the source.

Wouldn't you know it, virtterm.c had the wrong letters for the "string to
begin programs that use cm". Simply put, it was looking at the string "ts"
instead of "ti". I hadn't been using a terminal that had a "cm" entry, so I
hadn't noticed the lack of use of that capability before.

The simple change would have been to change the one letter in the string for
sname[], but I also changed the name of the variable that referenced the
string. A diff follows.

					Tony Hansen
					pegasus!hansen


34c34
< #define TS _tstr[18]		/* start cursor mode */
---
> #define TI _tstr[18]		/* start cursor mode */
41c41
< static char sname[] = "hoclcdceupdousuebtbcaldlcmchcvcssfsrtstetacrpc";
---
> static char sname[] = "hoclcdceupdousuebtbcaldlcmchcvcssfsrtitetacrpc";
856,857c856,857
< 	if (TS != NULL)
< 		tputs(TS, 0, vputc);
---
> 	if (TI != NULL)
> 		tputs(TI, 0, vputc);