🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.text
Article #116

Re: Ditroff curiosity (bug?)

#116
From: Jaap Akkerhuis
Date: Fri, 13 Dec 1985 19:10
25 lines
1350 bytes
In article <819@inset.UUCP> james@inset.UUCP (James Dalby) writes:
 > I wonder whether anyone has come across this problem before, or knows the
 > cause of it.

Yep, you will find this in all versions of troff. I think I've fixed it
in every new unix version the last five year. I call in the 123-bug,
since if you do:
	.nr f 2
	1\nf3
you wil get
	132

It doesn't happen when the ligature mode is of (.lg 0).

The fix:
Dive into n4.c. Look in setn(). Note it does something like
	if((i = cbits(ii = getch())) == '+')
(Old troff probably looks like:
	if((i=getch() &CMASK) == '+')
but I don't remember exactly.)

Well, the getch of course expands ligatures. Change the "getch()"
in "getach()". Try your test again. Note the problem went way.

	jaap
Technical Details
Message-ID: <920@mcvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!gatech!seismo!mcvax!jaap
References: <819@inset.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC840302); site mcvax.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!gatech!seismo!mcvax!jaap
From: jaap@mcvax.UUCP (Jaap Akkerhuis)
Newsgroups: net.text
Subject: Re: Ditroff curiosity (bug?)
Message-ID: <920@mcvax.UUCP>
Date: Fri, 13-Dec-85 14:10:39 EST
Article-I.D.: mcvax.920
Posted: Fri Dec 13 14:10:39 1985
Date-Received: Mon, 16-Dec-85 04:01:48 EST
References: <819@inset.UUCP>
Reply-To: jaap@mcvax.UUCP (Jaap Akkerhuis)
Organization: CWI, Amsterdam
Lines: 25