summaryrefslogtreecommitdiff
path: root/time/offtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/offtime.c')
-rw-r--r--time/offtime.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/time/offtime.c b/time/offtime.c
index 4e062df0d3..1469029bc0 100644
--- a/time/offtime.c
+++ b/time/offtime.c
@@ -1,26 +1,25 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <time.h>
/* Defined in mktime.c. */
-extern CONST unsigned short int __mon_yday[2][13];
+extern const unsigned short int __mon_yday[2][13];
#define SECS_PER_HOUR (60 * 60)
#define SECS_PER_DAY (SECS_PER_HOUR * 24)
@@ -29,11 +28,13 @@ extern CONST unsigned short int __mon_yday[2][13];
offset OFFSET seconds east of UTC,
and store year, yday, mon, mday, wday, hour, min, sec into *TP. */
void
-DEFUN(__offtime, (t, offset, tp),
- CONST time_t *t AND long int offset AND struct tm *tp)
+__offtime (t, offset, tp)
+ const time_t *t;
+ long int offset;
+ struct tm *tp;
{
register long int days, rem, y;
- register CONST unsigned short int *ip;
+ register const unsigned short int *ip;
days = *t / SECS_PER_DAY;
rem = *t % SECS_PER_DAY;
@@ -58,7 +59,7 @@ DEFUN(__offtime, (t, offset, tp),
tp->tm_wday += 7;
y = 1970;
-# define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)
+#define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)
while (days < 0 || days >= (__isleap (y) ? 366 : 365))
{