From: utzoo!decvax!ucbvax!G:tut
Newsgroups: net.bugs.4bsd
Title: Bugs in Berkeley -ms Macros
Article-I.D.: populi.255
Posted: Fri Jul 23 18:12:52 1982
Received: Mon Jul 26 05:25:49 1982

There are three bugs in the 4bsd (and 4.1bsd) version of -ms
that were NOT present in the vanilla v7 macros.

1) Unkept displays (.ID, .LD, .CD) are output in fill mode!
This can be fixed by adding .XD to all three macros.

	BEFORE			AFTER
	------			-----

	.de CD			.de CD
	.ce 1000		.XD
	..			.ce 1000
				..

	.de LD			.de LD
	..			.XD
				..

	.de ID			.de ID
	.if t .in +0.5i		.XD
	.if n .in +8		.if t .in +0.5i
	<2 lines omitted>	.if n .in +8
	..			<2 lines omitted>
				..

2) Periods and commas before "refer" references are not printed.
This can be easily fixed as follows:

	# ex /usr/lib/tmac/tmac.s
	:1388a
	.if n .ds >. .
	.if t .ds <. .
	.if n .ds >, ,
	.if t .ds <, ,
	.
	:wq

3) The line length of any paragraph after a .QP is 5n too long.
This can be fixed by moving 4 lines in the .RT macro:

	# ex /usr/lib/tmac/tmac.s
	:16,19m 7
	:wq

The .RT macro should then look like this:

	.\"	RT -  reset everything to normal state
	.de RT
	.if !\\n(1T .BG
	.if !\\n(IK .if !\\n(IF .if !\\n(IX .if !\\n(BE .di
	.ce 0
	.ul 0
	.if \\n(QP \{\
	.	ll +\\n(QIu
	.	in -\\n(QIu
	.	nr QP -1\}
	.if \\n(NX<=1 .if \\n(AJ=0 .ll \\n(LLu
	.if \\n(IF=0 \{\
	.	ps \\n(PS
	.	if \\n(VS>=40 .vs \\n(VSu
	.	if \\n(VS<=39 .vs \\n(VSp\}
	.if \\n(IP .in -\\n(I\\n(IRu
	.if \\n(IP=0 .nr I0 \\n(PIu
	.if \\n(IP .nr IP -1
	.ft 1
	.bd 1
	.ta 5n 10n 15n 20n 25n 30n 35n 40n 45n 50n 55n 60n 65n 70n 75n 80n
	.fi
	..

					Bill Tuthill
					ucbvax!g:tut