Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!gatech!seismo!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: net.bugs.4bsd Subject: 4.[123]bsd tbl ".ne"eds too much (with fix) Message-ID: <6035@elsie.UUCP> Date: Thu, 27-Feb-86 15:49:08 EST Article-I.D.: elsie.6035 Posted: Thu Feb 27 15:49:08 1986 Date-Received: Sat, 1-Mar-86 04:50:16 EST Organization: NIH-LEC, Bethesda, MD Lines: 57 Keywords: bsd tbl Index: src/tbl/t7.c Fix Description: The "tbl" command may output a troff ".ne" directive that's larger than the size of the table being produced. Repeat-By: Create a file with these lines (eliminating the leading indent): echo ' .TS box ; l l . x _ _ x .TE ' | tbl | fgrep .ne (Note that the character between the two underscores above is a tab.) Now run the file through "sh" and note the result: .ne 3v+0p Next edit the above file, changing the line with the two underscores to a line with just a single underscore on it. Run the file through "sh" again and note the result: .ne 2v+2p Even though the two versions of the file produce identical-looking output when "typeset," the size that tbl claims is needed is different. Fix: Here's the fix to the 4.1bsd version of "src/tbl/t7.c". As usual, the trade secret status of the code involved precludes a clearer posting. The fix is an addition to the function "need", conditioned on "OLDVERSION": ... if (instead[i]!=0) continue; else #ifndef OLDVERSION if (allh(i)) horlin++; else #endif texlin++; ... -- Bugs is a Warner Brothers trademark. Bug is a Volkswagen of America trademark (writes Martin Minow). -- UUCP: ..decvax!seismo!elsie!ado ARPA: elsie!ado@seismo.ARPA DEC, VAX and Elsie are Digital Equipment and Borden trademarks