From peter.jeremy@auss2.alcatel.com.au  Thu Jan 14 21:24:58 1999
Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA18820
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 14 Jan 1999 21:24:57 -0800 (PST)
          (envelope-from peter.jeremy@auss2.alcatel.com.au)
Received: by border.alcanet.com.au id <40342>; Fri, 15 Jan 1999 16:23:01 +1100
Message-Id: <99Jan15.162301est.40342@border.alcanet.com.au>
Date: Fri, 15 Jan 1999 16:23:38 +1100
From: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>
Reply-To: peter.jeremy@alcatel.com.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: `me' macro documentation incorrectly defines \n(yr
X-Send-Pr-Version: 3.2

>Number:         9502
>Category:       bin
>Synopsis:       `me' macro documentation incorrectly defines \n(yr
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 14 21:30:01 PST 1999
>Closed-Date:    Thu Jun 3 13:50:15 PDT 1999
>Last-Modified:  Wed Oct 26 22:49:16 UTC 2011
>Originator:     Peter Jeremy
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Alcatel Australia
>Environment:

	

>Description:

The groff number register `yr' is assigned from a (struct tm).tm_year
and therefore represents the number of years since 1900, not the
year within the century (see definition in troff/input.cc).

>How-To-Repeat:

Code inspection

>Fix:
	
--- /3.0/src/contrib/groff/doc/meref.me	Sun Sep  8 02:18:32 1996
+++ ./meref.me	Fri Jan 15 14:46:37 1999
@@ -1827,7 +1827,7 @@
 for example, \*(mo is \n(mo),
 and
 .NR (yr
-(the last two digits of the current year).
+(the number of years since 1900).
 .TL
 .ST (lq
 .DE
@@ -2184,7 +2184,7 @@
 \&.xp	M	print index
 \en(xs	R	index entry prespace
 \en(xu	R	index undent (from right margin)
-\en(yr	R\(sc	year (last two digits only)
+\en(yr	R\(sc	year (years since 1900)
 \en(zs	R	floating keep pre/post space
 \e{	F\(sc	begin conditional group
 \e|	F\(sc	1/6 em narrow space
--- /3.0/src/share/doc/usd/20.meref/ref.me	Tue May 31 05:08:31 1994
+++ ./ref.me	Fri Jan 15 14:46:37 1999
@@ -1995,7 +1995,7 @@
 for example, \*(mo is \n(mo),
 and
 .NR (yr
-(the last two digits of the current year).
+(the number of years since 1900).
 .TL
 .ST (lq
 .DE
@@ -2374,7 +2374,7 @@
 \&.xp	M	print index
 \en(xs	R	index entry prespace
 \en(xu	R	index undent (from right margin)
-\en(yr	R\(sc	year (last two digits only)
+\en(yr	R\(sc	year (years since 1900)
 \en(zs	R	floating keep pre/post space
 \e{	F\(sc	begin conditional group
 \e|	F\(sc	1/6 em narrow space
--- /3.0/src/share/me/summary.external	Tue May 31 05:09:00 1994
+++ ./summary.external	Fri Jan 15 14:46:37 1999
@@ -230,7 +230,7 @@
 xp	M	print index
 xs	R	index entry prespace
 xu	R	index undent (from right margin)
-yr	R\(sc	year (last two digits only)
+yr	R\(sc	year (years since 1900)
 zs	R	floating keep pre/post space
 {	F\(sc	begin conditional group
 |	F\(sc	1/6 em narrow space
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: chuckr 
State-Changed-When: Thu Jun 3 13:50:15 PDT 1999 
State-Changed-Why:  
changed, set yr register to tm->year mod 100 
>Unformatted:
I think this is wrong on two counts:
1) There is an implied assumption that the yr register is only
   used in the me macros, which isn't true, and
2) that changing the docs to match the actual performance, instead
   of changing the performance to match reality is more correct.

I'm leaning on allowing the read of the tm->year be mod 100, but
I'm getting someone who actually *uses* the me macros to double-
chuck me.  I use the mm macros, and that's certainly the fix
I'd like.

Update: Can't find a reviewer easily, so I'm going to do it my way.
closed.
