bytebug@pertec.UUCP (06/05/84)
Problem: When using a terminal which uses a binary row/column cursor address sequence (%.), vnews won't generate a proper display. In looking at the characters being sent to the terminal, it appears that the cursor addressing sequences are being truncated. Solution: Positioning to row or column 0 causes a null character to be placed in the cursor addressing sequence. `Tputs' terminates when it sees this null character. In looking at the manual, it states that: Tgoto returns a cursor addressing string decoded from cm to go to column destcol in line destline. It uses the external variables UP (from the up capability) and BC (if bc is given rather than bs) if necessary to avoid placing \n, ^D or ^@ in the returned string. (Programs which call tgoto should be sure to turn off the XTABS bit(s), since tgoto may now output a tab. Note that programs using termcap should in general turn off XTABS anyway since some terminals use control I for other functions, such as nondestructive space.) If a % sequence is given which is not understood, then tgoto returns OOPS. The changes given below were made to virtterm.c, and will cause BC and UP to be defined for `tgoto' to reference. 20c20 < #define UP _tstr[4] /* up one line */ --- > #define xUP _tstr[4] /* up one line */ 25c25 < #define BC _tstr[9] /* backspace */ --- > #define xBC _tstr[9] /* backspace */ 38a39 > char *BC, *UP; /* external variables for `tgoto' */ 825a827,828 > BC = xBC; /* set up external so `tgoto' works */ > UP = xUP; /* set up external so `tgoto' works */
mark@cbosgd.UUCP (Mark Horton) (06/11/84)
Note also that all recent versions of termlib (I'm not sure exactly how recent, but anything based on 4BSD or System V qualifies) will automatically initialize ospeed, BC, UP, and PC for you. So this problem only occurs on systems with a fairly old termlib. If you happen to be running at 19200 baud, you may not get any padding either unless you extend an array in tputs.c. I don't remember when this table was extended but again only old termlibs should have the problem.