[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in mm macro package
From: |
Nick Stoughton |
Subject: |
Bug in mm macro package |
Date: |
Mon, 13 Feb 2006 17:45:26 -0800 |
GROFF VERSION:
[1.19.2 (and also CVS)]
MACHINE:
[i686]
OS:
[Linux - FC4]
COMPILER:
[gcc 4.0.2]
INPUT FILES:
[
cat > bug.r << EOF
.nr q 1
.nr N 1
.af q i
.ie (\n[q]=1)&(\n[N]=1) .tm Ho!
.el .tm boo
.fp 1 PR
.fp 2 PI
.fp 3 PB
.fp 4 PBI
.fp 5 CW
.fp 6 CI
.fp 7 CB
.fp 8 H
.fp 9 HB
.ds HF 3 3 3 4 4 4 3
.BR bold roman
EOF
]
COMMAND LINE:
[troff -mm bug.r > /dev/null]
DESCRIPTION OF INCORRECT BEHAVIOUR:
[
bug.r:4: expected `;' after scale-indicator (got `=')
boo
bug.r:16: warning: can't find font `B'
bug.r:16: warning: can't find font `R'
--------
This report highlights two problems with the mm macro package. The first
is
an already reported troff problem if the number register '%' is in a
format other
than '1'. The second is that if fonts have been explictly loaded into
certain
positions, they should be referred to by number not name.
The convention that has always been used is that
position 1 = R
position 2 = I
position 3 = B
position 4 = S
]
SUGGESTED FIX [optional]:
[
The following patch should be applied to the current CVS version of
m.tmac.
--- ./m.tmac.orig 2006-02-13 16:31:29.000000000 -0800
+++ ./m.tmac 2006-02-13 16:35:29.000000000 -0800
@@ -1233,7 +1233,7 @@
. ie d TP .TP
. el \{\
' sp 3
-. ie ((\\n[%]=1)&((\\n[N]=1):(\\n[N]=2))) .sp
+. ie ((\\n[P]=1)&((\\n[N]=1):(\\n[N]=2))) .sp
. el .tl \\*[pg*header]
. ie o .tl \\*[pg*odd-header]
. el .tl \\*[pg*even-header]
@@ -1307,7 +1307,7 @@
.el \{\
. ie o .tl \\*[pg*odd-footer]
. el .tl \\*[pg*even-footer]
-. ie (\\n[%]=1)&(\\n[N]=1) .tl \\*[pg*header]
+. ie (\\n[P]=1)&(\\n[N]=1) .tl \\*[pg*header]
. el .tl \\*[pg*footer]
. tl ''address@hidden''
.\}
@@ -2593,7 +2593,7 @@
. ti 0
.\}
.el .ce 1
-\fB\\$1\fP\\$2
+\f3\\$1\fP\\$2
.br
.ev
.\" save line for LIST OF XXX, wth is the width of the label
@@ -2616,11 +2616,11 @@
\!.ie (address@hidden@)>(\\\\n[.l]-\\\\n[.i]) \{\
. in address@hidden@u
\!. ti 0
-\!\fB\\$1\fP\\$2
+\!\f3\\$1\fP\\$2
\!.\}
\!.el \{\
. ce 1
-\!\fB\\$1\fP\\$2
+\!\f3\\$1\fP\\$2
\!.\}
\!.br
\!.ev
@@ -2680,7 +2680,7 @@
.\"########################### module fnt ############################
.\" some font macros.
.de R
-.ft R
+.ft 1
.ul 0
..
.\"-----------
@@ -2699,30 +2699,30 @@
..
.\"-----------
.de B
-.ie \\n[.$] address@hidden \fB \f[\\n[.f]] \\$@
-.el .ft B
+.ie \\n[.$] address@hidden \f3 \f[\\n[.f]] \\$@
+.el .ft 3
..
.de I
-.ie \\n[.$] address@hidden \fI \f[\\n[.f]] \\$@
-.el .ft I
+.ie \\n[.$] address@hidden \f2 \f[\\n[.f]] \\$@
+.el .ft 2
..
.de IB
-.if \\n[.$] address@hidden \fI \fB \\$@
+.if \\n[.$] address@hidden \f2 \f3 \\$@
..
.de BI
-.if \\n[.$] address@hidden \fB \fI \\$@
+.if \\n[.$] address@hidden \f3 \f2 \\$@
..
.de IR
-.if \\n[.$] address@hidden \fI \fR \\$@
+.if \\n[.$] address@hidden \f2 \f1 \\$@
..
.de RI
-.if \\n[.$] address@hidden \fR \fI \\$@
+.if \\n[.$] address@hidden \f1 \f2 \\$@
..
.de RB
-.if \\n[.$] address@hidden \fR \fB \\$@
+.if \\n[.$] address@hidden \f1 \f3 \\$@
..
.de BR
-.if \\n[.$] address@hidden \fB \fR \\$@
+.if \\n[.$] address@hidden \f3 \f1 \\$@
..
.\"########################### module box ############################
.\" draw a box around some text. Text will be kept on the same page.
@@ -2846,7 +2846,7 @@
.de address@hidden
address@hidden 1 "" "\\*[Rp]" \\n[%]
.ce
-\fI\\*[Rp]\fP
+\f2\\*[Rp]\fP
.sp
.nr ref*ll \\n[.l]
address@hidden ref*ev
@@ -2916,15 +2916,15 @@
address@hidden 1 "" "\\*[App] \\$1: \\$2" \\n[%]
..
.\"------------
-.\" address@hidden name text
+.\" address@hidden name text
.de address@hidden
.bp
.SP (u;\\n[Lsp]*4)
.ce 1
-\s+4\fB\\*[App]\ \\$1\fP\s0
+\s+4\f3\\*[App]\ \\$1\fP\s0
.SP (u;\\n[Lsp]*2)
.if address@hidden@<\\n[.l] .ce 1
-\fB\s+2\\$2\s0\fP
+\f3\s+2\\$2\s0\fP
.SP (u;\\n[Lsp]*4)
..
.als APPX address@hidden
]