The mm macros contain a couple of cases of .ie without a matching .el
This somehow triggers irrational groff behavior later, for example,
occasionally executing both branches of .ie/.el (the exact circumstances
are unstable, but may depend on macro nesting depth).
Anyway, I had some "impossible" execution paths which started
working normally after fixing these bugs in mm.
Below, and attached, is a patch against contrib/mm/m.tmac revision 2.53
-Jim
--- contrib/mm/m.tmac.ORIG 2013-02-27 23:40:03.768415121 -0800
+++ contrib/mm/m.tmac 2013-02-28 22:16:57.654569076 -0800
@@ -2015,7 +2015,7 @@
.if \\n[D]>2 .tm set format=\\n[ds*format]
.\" fill or not to fill, that is the...
.nr ds*fill 0
-.ie \\n[.$]>1 \{\
+.if \\n[.$]>1 \{\
. ie r ds*fill!\\$2 .nr ds*fill \\n[ds*fill!\\$2]
. el .@error "\\*[ds*type]:wrong fill:\\$2"
.\}
@@ -2197,7 +2197,7 @@
.if \\n[li*type]=5 .ds li*c-mark <\\n[li*cnt!\\n[li*lvl]]>
.if \\n[li*type]=6 .ds li*c-mark {\\n[li*cnt!\\n[li*lvl]]}
.if \\n[.$]=1 .ds li*c-mark \\$1
-.ie \\n[.$]=2 \{\
+.if \\n[.$]=2 \{\
. ie (\\$2=2):(\\n[Limsp]=0) .ds li*c-mark \\$1\\*[li*c-mark]
. el .ds li*c-mark \\$1\ \\*[li*c-mark]
.\}
--- contrib/mm/m.tmac 2013-02-28 22:16:57.654569076 -0800
+++ contrib/mm/m.tmac.ORIG 2013-02-27 23:40:03.768415121 -0800
@@ -2015,7 +2015,7 @@
.if \\n[D]>2 .tm set format=\\n[ds*format]
.\" fill or not to fill, that is the...
.nr ds*fill 0
-.if \\n[.$]>1 \{\
+.ie \\n[.$]>1 \{\
. ie r ds*fill!\\$2 .nr ds*fill \\n[ds*fill!\\$2]
. el .@error "\\*[ds*type]:wrong fill:\\$2"
.\}
@@ -2197,7 +2197,7 @@
.if \\n[li*type]=5 .ds li*c-mark <\\n[li*cnt!\\n[li*lvl]]>
.if \\n[li*type]=6 .ds li*c-mark {\\n[li*cnt!\\n[li*lvl]]}
.if \\n[.$]=1 .ds li*c-mark \\$1
-.if \\n[.$]=2 \{\
+.ie \\n[.$]=2 \{\
. ie (\\$2=2):(\\n[Limsp]=0) .ds li*c-mark \\$1\\*[li*c-mark]
. el .ds li*c-mark \\$1\ \\*[li*c-mark]
.\}
_______________________________________________
bug-groff mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-groff