[comp.bugs.4bsd] Bug with nroff -ms?

johan@cwi.nl (Johan Wolleswinkel) (02/17/88)

In article <358@expya.UUCP> admin@expya.UUCP (System Administrator)
writes:
> 
> I am getting a strange result when I try to change the footer margine
> in nroff using the ms package.  Here is an example
> 
> .ND
> .nr HM 3v
> .nr FM 1v
> .nr LL 70n
> .LP
>   ...
> 
> Clearly the line 61 should come before the 1st blank line.  If I set
> the FM to 2v then the error does not occur.  But if set to 0 then the
> blank line occurs at 59 followed by line 60 and 61 followed by new
> page.
> 
> 
> I have tried this on Pyramid (BSD 4.2 and SYS V), Convex (BSD 4.2) and
> SUN 3.  All with the same result.  Can someone enlighten me?
> 
> 

Each time a page-transition occurs, NP is executed, which a.o.
resets the FO- trap according to the current FM- setting.
As opposed to what one (at least I) would expect the BT- trap
is not reset in this macro (nor is it reset elsewhere).
In the problem-case reported above the BT- trap now occurred
before the FO- trap, generated a blank line (LF, CF and RF were
all empty), and processing continued with the next textlines
until the FO- trap was sprung and generated a page transition.

The easiest workaround in this case is to remove the BT- trap
completely, e.g. by inserting `.ch BT' after .LP .

A better way of course would be to correct the ms- package.
Could it be, that insertion of
   .ch BT \\n(.pu-(\\n(FMu/2u)
after
   .ch FO \\n(.pu-\\n(FMu
would be enough?

I ran across this error long ago and found the workaround.
Sometimes ago I noticed somebody else being beaten by this error
in an even less obvious way: after the pagetransition the pointsize
of the text was decreased by 2 starting with the 2nd word and up
to the next paragraph. It might have taken him some days to
discover on his own, that he could mend this by adding `.ch BT'
after the first .LP .
I reported this to our system administrator and asked him to
update the ms- package. He refused, because he wanted to be
compatible with other systems. I now see what he probably meant:
if there is some user or system administrator that spent much
time on the discovery of an error, there should be on all systems
users and/or system administrators, that spend the same amount of
time to discover such a feature again -:) .

Now the question:
We recently got BSD 4.3, and the ms-package still holds this
feature; I saw a listing from the ms- package from 1980, again
with the feature; in the new (Berkeley-) ms- package the
trapsetting for FO was changed to `.ch FO -\\n(FMu',
but the setting for BT was not included.
This makes me wonder what the maintenance level for this product is
and whether it really is a bug. 
If so, would you correct your package? If so, it may cause
texts which are handled correctly on your own node to be
in errror on others (e.g. with a released version).
Incidentally, there may be other reasons, to install a
node-specific version of the package. Probably only very few people
will have to specify the address for the Holmdel-laboratory,
but might need some local enhancements.

One could imagine, that every node has its own version of the
ms- package, and as a second version the released version.
Now by default the nodes' own version is used, and for texts
that have to be exported to other nodes one could do a (di)troff- run
with the released version to check for incompatibilities.


How is this problem handled at other nodes?
If you intend to report about your host, I would be glad to
receive that as mail; I'll summarize to the net.
-- 
                                                 Johan Wolleswinkel
CWI, Postbus 4079, 1009 AB  Amsterdam,  Kruislaan 413, The Netherlands
Phone: +31 20 5924050      Telex: 12571 (mactr nl)
UUCP: johan@cwi.nl or ...{seismo,philabs,decvax}!mcvax!johan