diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-12-18 17:20:41 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-12-18 17:20:41 +0000 |
commit | aab1086758e7596a8537714e8cd767183acacb4b (patch) | |
tree | 0f8162738a12990a06c8221d086390679233de47 /usr.bin/cvs/rcs.c | |
parent | 8d576e21cf9baaeccf86df62ca9e89297967bcb7 (diff) |
when parsing an RCS date, adjust the year by 1900 in the tm structure
so we can use this data with asctime(), mktime() and friends
spotted and patch by Joris Vink
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r-- | usr.bin/cvs/rcs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index fbfee5ccd39..bf6d13c6294 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.18 2004/12/17 21:13:58 jfb Exp $ */ +/* $OpenBSD: rcs.c,v 1.19 2004/12/18 17:20:40 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1049,6 +1049,8 @@ rcs_parse_delta(RCSFILE *rfp) rcs_freedelta(rdp); } rdp->rd_date.tm_year = datenum->rn_id[0]; + if (rdp->rd_date.tm_year >= 1900) + rdp->rd_date.tm_year -= 1900; rdp->rd_date.tm_mon = datenum->rn_id[1] - 1; rdp->rd_date.tm_mday = datenum->rn_id[2]; rdp->rd_date.tm_hour = datenum->rn_id[3]; |