Subject: misc/5294: me macros work neither with nor without -C option to groff
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Anders.Hjalmarsson@economics.gu.se>
List: netbsd-bugs
Date: 04/15/1998 01:28:42
>Number: 5294
>Category: misc
>Synopsis: me macros work neither with nor without -C option to groff
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 14 16:35:01 1998
>Last-Modified:
>Originator: Anders Hjalmarsson
>Organization:
>Release: NetBSD-current 19980414
>Environment:
System: NetBSD econahja.econ.gu.se 1.3E NetBSD 1.3E (ECONAHJA) #95: Tue Apr 14 11:11:57 CEST 1998 econahja@econahja.econ.gu.se:/usr/src/sys/arch/i386/compile/ECONAHJA i386
>Description:
The .+c macro is broken in groff because the definition of string
register * is parsed incorrectly when groff handles long register
names. It works in compatibility mode.
In compatibility mode, however, the string register td is not set
correcly because it uses *year and that does not work in
compatibility mode.
>How-To-Repeat:
Run the following through groff:
.+c Test
.pp
Today is \*(td
groff -Tascii -me p.me >/dev/null gives:
p.me:1: a newline character is not allowed in an escape name
groff -Tascii -C -me p.me > /dev/null gives:
/usr/share/tmac/tmac.e:998: warning: numeric expression expected (got `e')
>Fix:
The convert sed-script changes the definition of * as follows and
that seems to work both in normal and compatibility mode.
To fix the second problem, use a short register name. As I understand
the me reference manual, *y is reserved by the implementation and
it is not used elsewhere in me (and it is somewhat mnemonic).
This diff is from tmac.e 1.4
--- tmac.e.old Wed Apr 15 00:55:50 1998
+++ tmac.e Wed Apr 15 01:05:53 1998
@@ -961,7 +961,7 @@
.\}
.nr ?C 1
.nr $f 1 1
-.ds * \\*[1\\*]\k*
+.ds * \\*[[]1\\*]\k*
.if \\n(?R \
. pn 1
.bp
@@ -1084,8 +1084,8 @@
.if \n(dw=5 .ds dw Thursday
.if \n(dw=6 .ds dw Friday
.if \n(dw=7 .ds dw Saturday
-.nr *year \n(yr+1900
-.ds td \*(mo \n(dy, \n[*year]
+.nr *y \n(yr+1900
+.ds td \*(mo \n(dy, \n(*y
.\" *** PARAMETRIC INITIALIZATIONS ***
.if (1m<0.1i)&(\nx!=0) \
. vs 9p \" for 12-pitch DTC terminals
>Audit-Trail:
>Unformatted: