Article View: comp.bugs.4bsd
Article #1404Re: C/A/T troff bug with -mm macros (4.3BSD)
From: Bill "Bill" Tuthill
Date: Sat, 16 Dec 1989 22:58
Date: Sat, 16 Dec 1989 22:58
39 lines
1900 bytes
1900 bytes
In <1989Dec16.133059.6190@pcrat.uucp>, rick@pcrat.uucp (Rick Richardson) writes:
> In article <927@hsi86.hsi.UUCP> stevens@hsi.UUCP (Richard Stevens) writes:
> >I have found a bug with the old C/A/T version of troff that's
> >shipped with 4.3BSD. The bug shows up with the -mm macro
> > MM page at start = 0
> >
> > - 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 -
>
> I believe this is because the MM macros use the \g (return register
> format) escape sequence, which does not exist in C/A/T troff.
It's easy enough to add support for \g -- even I could do it. This was
many moons ago, so I hope these diffs are sufficient.
% sccs diffs -r1.3 n1.c
------- n1.c -------
613a620,622
> case 'g': /* return format of number reg */
> setaf();
> goto g0;
% sccs diffs -r1.3 n4.c
------- n4.c -------
481a505,519
> setaf() /* return format of number register */
> {
> register int i, j;
>
> if ((i = usedr(getsn())) == -1) /* no such register */
> return;
> cp = cbuf;
> if (fmt[i] > 20) /* probably a A i I */
> *cp++ = fmt[i];
> else
> for (j = (fmt[i] ? fmt[i] : 1); j; j--)
> *cp++ = '0';
> *cp = 0;
> cp = cbuf;
> }
Technical Details
Message-ID:
<129336@sun.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!uakari.primate.wisc.edu!ames!sun-barr!newstop!sun!cairo!tutReferences:
<927@hsi86.hsi.UUCP> Sender: <1989Dec16.133059.6190@pcrat.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!uakari.primate.wisc.edu!ames!sun-barr!newstop!sun!cairo!tut From: tut%cairo@Sun.COM (Bill "Bill" Tuthill) Newsgroups: comp.bugs.4bsd,comp.text Subject: Re: C/A/T troff bug with -mm macros (4.3BSD) Message-ID: <129336@sun.Eng.Sun.COM> Date: 16 Dec 89 22:58:28 GMT References: <927@hsi86.hsi.UUCP> Sender: <1989Dec16.133059.6190@pcrat.uucp> Sender: news@sun.Eng.Sun.COM Followup-To: poster Lines: 39