Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/games/hack pullup 1.5->1.6 (Krister Walfridsson): minor...



details:   https://anonhg.NetBSD.org/src/rev/c8e8d54edd33
branches:  netbsd-1-4
changeset: 468476:c8e8d54edd33
user:      perry <perry%NetBSD.org@localhost>
date:      Mon Apr 26 15:53:00 1999 +0000

description:
pullup 1.5->1.6 (Krister Walfridsson): minor y2k bug

diffstat:

 games/hack/hack.unix.c |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (33 lines):

diff -r 46475f4ba4a7 -r c8e8d54edd33 games/hack/hack.unix.c
--- a/games/hack/hack.unix.c    Mon Apr 26 15:46:47 1999 +0000
+++ b/games/hack/hack.unix.c    Mon Apr 26 15:53:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hack.unix.c,v 1.5 1997/10/19 16:59:21 christos Exp $   */
+/*     $NetBSD: hack.unix.c,v 1.5.4.1 1999/04/26 15:53:00 perry Exp $  */
 
 /*
  * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
@@ -6,7 +6,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: hack.unix.c,v 1.5 1997/10/19 16:59:21 christos Exp $");
+__RCSID("$NetBSD: hack.unix.c,v 1.5.4.1 1999/04/26 15:53:00 perry Exp $");
 #endif                         /* not lint */
 
 /* This file collects some Unix dependencies; hack.pager.c contains some more */
@@ -64,12 +64,8 @@
        static char     datestr[7];
        struct tm      *lt = getlt();
 
-       (void) sprintf(datestr, "%2d%2d%2d",
-                      lt->tm_year, lt->tm_mon + 1, lt->tm_mday);
-       if (datestr[2] == ' ')
-               datestr[2] = '0';
-       if (datestr[4] == ' ')
-               datestr[4] = '0';
+       (void) sprintf(datestr, "%02d%02d%02d",
+                      lt->tm_year % 100, lt->tm_mon + 1, lt->tm_mday);
        return (datestr);
 }
 



Home | Main Index | Thread Index | Old Index