C/A/T troff bug with -mm macros (4.3BSD)
Joe Wells
jbw at bucsf.bu.edu
Mon Dec 18 13:43:50 AEST 1989
In article <927 at hsi86.hsi.UUCP> stevens at hsi.UUCP (Richard Stevens) writes:
I have found a bug with the old C/A/T version of troff that's
shipped with 4.3BSD. The bug shows up with the -mm macro
package.
As several people have already pointed out, this is because of the missing
\g command in your version of troff. I'm including a diff to the MM macro
package to make it work without \g. The diff also fixes some other bugs.
Enjoy,
--
Joe Wells <jbw at bucsf.bu.edu>
jbw%bucsf.bu.edu at bu-it.bu.edu
...!harvard!bu-cs!bucsf!jbw
(617) 375-6893
200-202 Bay State Rd., Box 1486, Boston, MA 02215, USA
----------------------------------------------------------------------
*** mmt.old Wed May 31 16:32:52 1989
--- mmt Mon Jun 5 18:51:29 1989
***************
*** 619,643 ****
.tmERROR:(\\n(.F)input line \\n(.c:\\$1
.if!\\nD .ab \&
..
.deTB
! .nr!1 1
! .ie.)F TABLE 1 \\n+(Tb "\\$1" "\\n(H1-" 0
! .el.)F TABLE 1 \\n+(Tb "\\$1" "\\$2" 0\\$3
..
.deEC
! .nr!2 1
! .ie.)F Equation 2 \\n+(Ec "\\$1" "\\n(H1-" 0
! .el.)F Equation 2 \\n+(Ec "\\$1" "\\$2" 0\\$3
..
.deEX
! .nr!3 1
! .ie.)F Exhibit 3 \\n+(Ex "\\$1" "\\n(H1-" 0
! .el.)F Exhibit 3 \\n+(Ex "\\$1" "\\$2" 0\\$3
..
.deFG
! .nr!0 1
! .ie.)F Figure 0 \\n+(Fg "\\$1" "\\n(H1-" 0
! .el.)F Figure 0 \\n+(Fg "\\$1" "\\$2" 0\\$3
..
.de)F
.nr;0 \w\\$5
--- 619,657 ----
.tmERROR:(\\n(.F)input line \\n(.c:\\$1
.if!\\nD .ab \&
..
+ .\" Fixed numbering on exhibits, tables, figures, etc.
+ .\" Used to be like this:
+ .\" .deTB
+ .\" .nr!1 1
+ .\" .ie.)F TABLE 1 \\n+(Tb "\\$1" "\\n(H1-" 0
+ .\" .el.)F TABLE 1 \\n+(Tb "\\$1" "\\$2" 0\\$3
+ .\" ..
+ .\" Notice the syntax error (missing condition) on the .ie line.
+ .\" N=5 means do section numbering for figures.
+ .\" --Joe Wells
.deTB
! .nr !1 1
! .nr Tb +1
! .ie \\nN=5 .)F TABLE 1 \\n(Tb "\\$1" "\\n(H1-" 0
! .el .)F TABLE 1 \\n(Tb "\\$1" "\\$2" 0\\$3
..
.deEC
! .nr !2 1
! .nr Ec +1
! .ie \\nN=5 .)F Equation 2 \\n(Ec "\\$1" "\\n(H1-" 0
! .el .)F Equation 2 \\n(Ec "\\$1" "\\$2" 0\\$3
..
.deEX
! .nr !3 1
! .nr Ex +1
! .ie \\nN=5 .)F Exhibit 3 \\n(Ex "\\$1" "\\n(H1-" 0
! .el .)F Exhibit 3 \\n(Ex "\\$1" "\\$2" 0\\$3
..
.deFG
! .nr !0 1
! .nr Fg +1
! .ie \\nN=5 .)F Figure 0 \\n(Fg "\\$1" "\\n(H1-" 0
! .el .)F Figure 0 \\n(Fg "\\$1" "\\$2" 0\\$3
..
.de)F
.nr;0 \w\\$5
***************
*** 1143,1149 ****
.sp|1.1i-1v
\t\s36\(bs\s0
.vs.3i
! .if\w\\*(}2 \t\s16\f3\\*(}2\fP\s0
.vs12p
.sp|1.9i
.mk:2
--- 1157,1169 ----
.sp|1.1i-1v
\t\s36\(bs\s0
.vs.3i
! .\" Fixed display of company name so that it works properly for a
! .\" long name.
! .\" Used to be this:
! .\" .if\w\\*(}2 \t\s16\f3\\*(}2\fP\s0
! .\" String }2 is the company name.
! .\" --Joe Wells
! .if\w"\\*(}2" \s16\f3\h'|\\nWu-\w"\\*(}2"u'\\*(}2\fP\s0
.vs12p
.sp|1.9i
.mk:2
***************
*** 1192,1199 ****
.rs
.ie\\n(;3 \{\
.ie\\n(:t=2 \{\
! .af!S \\gP
! .afP i
.]t
.in+\\n(:3u
.>3
--- 1212,1227 ----
.rs
.ie\\n(;3 \{\
.ie\\n(:t=2 \{\
! .\" We keep track of the format of register P in string Pf, because
! .\" the \g command does not work in our version of troff. The \g
! .\" command returns the display format of a numeric register.
! .\" Next three lines used to be this:
! .\" .af!S \\gP
! .\" .afP i
! .\" --Joe Wells
! .ds !S \\*(Pf
! .ds Pf i
! .afP \\*(Pf
.]t
.in+\\n(:3u
.>3
***************
*** 1203,1209 ****
.wh0 )k
.bp
.nrP 1
! .afP \\g(!S
.]t
.wh0 )h
.if\\n(:G \{\
--- 1231,1241 ----
.wh0 )k
.bp
.nrP 1
! .\" Next two lines used to be this:
! .\" .afP \\g(!S
! .\" --Joe Wells
! .ds Pf \\*(!S
! .af P \\*(Pf
.]t
.wh0 )h
.if\\n(:G \{\
***************
*** 1854,1859 ****
.ie\\*(]w 'ch )f -\\n(:ou
.el'ch )f -(\\n(:ou+1v)
..
.dePH
.ds}t "\\$1
..
--- 1886,1899 ----
.ie\\*(]w 'ch )f -\\n(:ou
.el'ch )f -(\\n(:ou+1v)
..
+ .\" Purposes of some macros:
+ .\" }t = page header
+ .\" }e = even page header
+ .\" }o = odd page header
+ .\" }b = page footer
+ .\" }f = even page footer
+ .\" }p = odd page footer
+ .\" --Joe Wells
.dePH
.ds}t "\\$1
..
***************
*** 1875,1885 ****
.deTP
'sp
.)K
! .af;P \\gP
! .afP 1
! .nr;P \\nP
! .afP \\g(;P
! .af;P 1
.ie\\n(Pv \{\
.ie(\\n(Pv=1)&(\\n(;P>1) 'sp 2
.el\{\
--- 1915,1932 ----
.deTP
'sp
.)K
! .\" Next five lines are altered from original. Used to be:
! .\" .af;P \\gP
! .\" .afP 1
! .\" .nr;P \\nP
! .\" .afP \\g(;P
! .\" .af;P 1
! .\" --Joe Wells
! .af ;P 1
! .af P 1
! .nr ;P \\nP
! .if '\\*(Pf'' .ds Pf 1
! .af P \\*(Pf
.ie\\n(Pv \{\
.ie(\\n(Pv=1)&(\\n(;P>1) 'sp 2
.el\{\
***************
*** 1890,1895 ****
.if!\\n(;P-1 .if \\nN 'sp
.if!\\n(;P-1 .if \\n(:S .tl \\*(}t
.if!\\n(;P-1 .if !\\nN .tl \\*(}t
.if\\n(;P-1 .ie \w'\\*(]n' .tl '\\*(]n - \\nP'''
.el.tl \\*(}t
'if!\\n(;P%2 'tl \\*(}e
--- 1937,1944 ----
.if!\\n(;P-1 .if \\nN 'sp
.if!\\n(;P-1 .if \\n(:S .tl \\*(}t
.if!\\n(;P-1 .if !\\nN .tl \\*(}t
+ .\" String ]n is addressee of letter.
+ .\" --Joe Wells
.if\\n(;P-1 .ie \w'\\*(]n' .tl '\\*(]n - \\nP'''
.el.tl \\*(}t
'if!\\n(;P%2 'tl \\*(}e
***************
*** 1928,1938 ****
.tlBell System except under written agreement. \}
.if\\n(!K .tl
.)R
! .af;P \\gP
! .afP 1
! .nr;P \\nP
! .afP \\g(;P
! .af;P 1
.ie!\\n(;P%2 .tl \\*(}f
.el.tl \\*(}p
.ie\\n(;P=1 \{\
--- 1977,1994 ----
.tlBell System except under written agreement. \}
.if\\n(!K .tl
.)R
! .\" Next five lines used to be:
! .\" .af;P \\gP
! .\" .afP 1
! .\" .nr;P \\nP
! .\" .afP \\g(;P
! .\" .af;P 1
! .\" --Joe Wells
! .af ;P 1
! .af P 1
! .nr ;P \\nP
! .if '\\*(Pf'' .ds Pf 1
! .af P \\*(Pf
.ie!\\n(;P%2 .tl \\*(}f
.el.tl \\*(}p
.ie\\n(;P=1 \{\
***************
*** 2625,2634 ****
.tmERROR: MM package read twice
.ab \}
.ds]Z MM DEFINED
! .if!\w'\gE' .nr E 1
.if!\nL .nr L 11i
.pl\nLu
! .if!\w'\gO' .nr O .963i
.po\nOu
.if\nP .nr P -1
.nrP \nP 1
--- 2681,2701 ----
.tmERROR: MM package read twice
.ab \}
.ds]Z MM DEFINED
! .\" Next line used to be:
! .\" .if!\w'\gE' .nr E 1
! .\" Note, register E can no longer be set from the command line to
! .\" zero. No big loss. Numeric register E controls the font of the
! .\" subject/date/from fields.
! .\" --Joe Wells
! .if !\nE .nr E 1
.if!\nL .nr L 11i
.pl\nLu
! .\" The next line used to be this:
! .\" .if!\w'\gO' .nr O .963i
! .\" Note, you can no longer set register O from the command line
! .\" to zero. Register O controls the page offset.
! .\" --Joe Wells
! .if!\nO .nr O .963i
.po\nOu
.if\nP .nr P -1
.nrP \nP 1
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list