[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
groff <= 1.19.3, ms macros -- confusing warning for 1 < pl < 13
From: |
Keith Marshall |
Subject: |
groff <= 1.19.3, ms macros -- confusing warning for 1 < pl < 13 |
Date: |
Sat, 14 Jul 2007 20:11:29 +0100 |
User-agent: |
KMail/1.8.2 |
While following up on this:
http://lists.gnu.org/archive/html/bug-groff/2007-07/msg00000.html
I observed this unexpected behaviour:--
$ nroff -ms
.pl 10
.LP
<standard input>:2: warning: macro `cov*first-page-init' not defined
Some further checking confirms this behaviour with `.pl N', for values
of N such that 1 < N < 13. The warning message isn't useful for the
average user. Indeed, it may be confusing, for the macro in question
is defined in s.tmac. The warning arises because the macro is invoked
by a `.wh 0' trap on the first page; it immediately deletes itself, but
does not remove the trap. It then overflows the short page length,
springing the trap again on the second page.
Ok to apply the following patch, which resolves this?
2007-??-?? Keith Marshall <address@hidden>
* tmac/s.tmac (cov*first-page-init): Remove invoking trap, to
avoid possible recursion.
Index: tmac/s.tmac
===================================================================
RCS file: /cvsroot/groff/groff/tmac/s.tmac,v
retrieving revision 1.33
diff -u -r1.33 s.tmac
--- tmac/s.tmac 2 Jul 2007 14:49:35 -0000 1.33
+++ tmac/s.tmac 14 Jul 2007 19:05:48 -0000
@@ -134,6 +134,10 @@
.als AI cov*err-not-before-tl
.als AB cov*err-not-before-tl
.de cov*first-page-init
+.\" Invoked by `.wh 0' trap on first page.
+.\" We should not come here again, but at short page length,
+.\" recursion may occur; remove trap and macro to avoid it.
+.ch cov*first-page-init
.rm cov*first-page-init
.if !'\\n[.ev]'0' \{\
. @error must be in top-level environment, not `\\n[.ev]',
- groff <= 1.19.3, ms macros -- confusing warning for 1 < pl < 13,
Keith Marshall <=