jiml@uwslh.UUCP (a) (01/13/86)
SYMPTOM: On terminals capable of underlining, no underlines are seen when they are expected; for example, when reading manual entries. REPEAT BY: man more PROBLEMS: (a) the termcap entry contains "ul" in addition to "us" and "ue" or "uc", but the terminal is incapable of overstrike style underlining, or not initialized to do it. (b) /usr/ucb/more has a bug which can make viewing underlined text very painful: it fails to turn off underline mode at the end of a line, causing the rest of that line and perhaps subsequent ones to be cleared to underlines, not spaces. (Presumably this is the motive for (a)). FIXES: (a) Delete the "ul" capability from /etc/termcap for terminals which have underline modes rather than underline overstriking. (b) Fix routine prbuf in more.c to turn off underline mode as it exits, by adding code such as what follows after the loop ... (diff -c form, for patch lovers): *** more.c.old Sun Sep 25 20:05:29 1983 --- more.c Mon Jan 13 09:13:05 1986 *************** *** 828,833 tputs(chUL, 1, putch); } } } /* --- 828,837 ----- tputs(chUL, 1, putch); } } + if (pstate) { + tputs( ULexit, 1, putch); + pstate = 0; + } } /* BUGS: This has probably been fixed before, but was still wrong at our site. The fix is as inefficient and dangerous as the rest of prbuf (consider the behaviour of a terminal with both "uc" and "us"/"ue" in its termcap entry). On terminals with brain-damaged underline mode, such as telerays, the behaviour is better but not right, since line length is screwed up by the mode changing sequences, and More doesn't check for that. James E. Leinweber ...!{seismo,harvard,topaz,ihnp4}!uwvax!uwslh!jiml Wisconsin State Hygiene Lab (608) 262-8092 University of Wisconsin; 465 Henry Mall; Madison, WI 53706 -- James E. Leinweber ...!{seismo,harvard,topaz,ihnp4}!uwvax!uwslh!jiml Wisconsin State Hygiene Lab (608) 262-8092 University of Wisconsin; 465 Henry Mall; Madison, WI 53706