Bug 16207

Summary: y2k problem in troff (e.g. 'man hosts.equiv')
Product: Base System Reporter: emon <emon>
Component: binAssignee: Jeroen Ruigrok van der Werven <asmodai>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-RELEASE   
Hardware: Any   
OS: Any   

Description emon 2000-01-19 16:07:33 UTC
>Number:         16207
>Category:       bin
>Synopsis:       y2k problem in troff (e.g. 'man hosts.equiv')
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 19 08:10:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     KOMURA Takaaki
>Release:        3.3-RELEASE
>Organization:
Kyoto University (student)
>Environment:
FreeBSD beat.kuis.kyoto-u.ac.jp 3.3-RELEASE FreeBSD 3.3-RELEASE #0: Thu Sep 16 23:40:35 GMT 1999     jkh@highwing.cdrom.com:/usr/src/sys/compile/GENERIC  i386
>Description:
When I invoked 'man host.equiv' at January 20 2000,
I found following in the man page:
----
FreeBSD                        January 20, 1900                              1
----
>How-To-Repeat:
# rm /usr/share/man/cat5/hosts.equiv
% man hosts.equiv

The following may be printed on the last of man page:
----
FreeBSD                        January 20, 1900                              1
----
>Fix:
/usr/src/contrib/groff/troff/input.cc, line 5546

-  set_number_reg("yr", int(tt->tm_year)%100);
+  set_number_reg("yr", int(tt->tm_year));


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Comment 1 emon 2000-01-19 16:10:01 UTC
When I invoked 'man host.equiv' at January 20 2000,
I found following in the man page:
----
FreeBSD                        January 20, 1900                              1
----

Fix: 

/usr/src/contrib/groff/troff/input.cc, line 5546

-  set_number_reg("yr", int(tt->tm_year)%100);
+  set_number_reg("yr", int(tt->tm_year));
How-To-Repeat: # rm /usr/share/man/cat5/hosts.equiv
% man hosts.equiv

The following may be printed on the last of man page:
----
FreeBSD                        January 20, 1900                              1
----
Comment 2 Bill Fenner 2000-01-21 01:46:10 UTC
Also see PRs gnu/4930, gnu/8321, bin/9502, and the *roff documentation
(which documents that yr is the last 2 digits of the year), and groff
v1.15 (which keeps it years since 1900 and adds Y2K fixes to the mandoc
and me macros based upon this.  ms didn't need fixing and orig_me
(from /usr/src/share/me) is not part of groff but also expects yr to be
years-since-1900).

\(yr holding "the last 2 digits of the year" is broken as designed,
since then there is no way for *roff macros to know the century.
The fix for bin/9502 made FreeBSD incompatible with everything else;
I think it should be reverted.

  Bill
Comment 3 Jeroen Ruigrok van der Werven freebsd_committer freebsd_triage 2000-01-30 20:54:04 UTC
Responsible Changed
From-To: freebsd-bugs->asmodai

I am working on this. 
Comment 4 Jeroen Ruigrok van der Werven freebsd_committer freebsd_triage 2000-03-27 20:53:36 UTC
State Changed
From-To: open->closed

This was fixed a while ago.