summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/date.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/cvs/date.y')
-rw-r--r--usr.bin/cvs/date.y26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/cvs/date.y b/usr.bin/cvs/date.y
index 4635f2920c3..b49c582ad1f 100644
--- a/usr.bin/cvs/date.y
+++ b/usr.bin/cvs/date.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: date.y,v 1.9 2005/09/25 19:11:34 otto Exp $ */
+/* $OpenBSD: date.y,v 1.10 2005/10/07 21:47:32 reyk Exp $ */
/*
** Originally written by Steven M. Bellovin <smb@research.att.com> while
@@ -537,7 +537,7 @@ ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian)
Hours = 0;
return ((Hours + 12) * 60L + Minutes) * 60L + Seconds;
default:
- abort ();
+ abort();
}
/* NOTREACHED */
}
@@ -802,15 +802,14 @@ difftm(struct tm *a, struct tm *b)
int ay = a->tm_year + (YEAR_TMORIGIN - 1);
int by = b->tm_year + (YEAR_TMORIGIN - 1);
int days = (
- /* difference in day of year */
- a->tm_yday - b->tm_yday
- /* + intervening leap days */
- + ((ay >> 2) - (by >> 2))
- - (ay/100 - by/100)
- + ((ay/100 >> 2) - (by/100 >> 2))
- /* + difference in years * 365 */
- + (long)(ay-by) * 365
- );
+ /* difference in day of year */
+ a->tm_yday - b->tm_yday
+ /* + intervening leap days */
+ + ((ay >> 2) - (by >> 2))
+ - (ay/100 - by/100)
+ + ((ay/100 >> 2) - (by/100 >> 2))
+ /* + difference in years * 365 */
+ + (long)(ay-by) * 365);
return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))
+ (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec));
}
@@ -852,7 +851,7 @@ cvs_date_parse(const char *p)
if (gmt_ptr != NULL)
ftz.timezone = difftm(&gmt, tm) / 60;
- if(tm->tm_isdst)
+ if (tm->tm_isdst)
ftz.timezone += 60;
}
else {
@@ -889,7 +888,8 @@ cvs_date_parse(const char *p)
} else {
Start = nowtime;
if (!yyHaveRel)
- Start -= ((tm->tm_hour * 60L + tm->tm_min) * 60L) + tm->tm_sec;
+ Start -= ((tm->tm_hour * 60L + tm->tm_min) * 60L) +
+ tm->tm_sec;
}
Start += yyRelSeconds;