summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcstime.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-05-27 03:30:32 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-05-27 03:30:32 +0000
commit7d89f936fbdc2dd3d49c0286998836e36cc68365 (patch)
tree42e90824fb35b817279c75e6a187f7a54dc474fb /usr.bin/cvs/rcstime.c
parent98bdde20935bf70a07278f2c429c1e05c676ff48 (diff)
commit the new opencvs code, i have been hacking on
this for the past 2 weeks now and it should go in at the start of the hackathon so others can help out. this code is a lot safer, smarter, faster and best of all it is actually doing what it is suppose to do! basic checkout, update, status, diff and commit are working in local mode only. there is no support for any remote setups now.
Diffstat (limited to 'usr.bin/cvs/rcstime.c')
-rw-r--r--usr.bin/cvs/rcstime.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/cvs/rcstime.c b/usr.bin/cvs/rcstime.c
index eda07bc0606..267d704b690 100644
--- a/usr.bin/cvs/rcstime.c
+++ b/usr.bin/cvs/rcstime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcstime.c,v 1.5 2006/04/17 06:33:22 ray Exp $ */
+/* $OpenBSD: rcstime.c,v 1.6 2006/05/27 03:30:31 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -33,7 +33,7 @@ void
rcs_set_tz(char *tz, struct rcs_delta *rdp, struct tm *tb)
{
int tzone;
- int pos;
+ int neg, pos;
char *h, *m;
struct tm *ltb;
time_t now;
@@ -44,9 +44,10 @@ rcs_set_tz(char *tz, struct rcs_delta *rdp, struct tm *tb)
ltb->tm_hour += ((int)ltb->tm_gmtoff/3600);
memcpy(tb, ltb, sizeof(struct tm));
} else {
- pos = 0;
+ neg = pos = 0;
switch (*tz) {
case '-':
+ neg = 1;
break;
case '+':
pos = 1;