* posix/glob/configure.bat: Fixes from DJ.
* time/backward, time/europe, time/northamerica, time/pacificnew,
time/zdump.c, time/zic.c, time/tzfile.h, time/private.h,
time/ialloc.c: Code and data updated from ADO's 95b.
* time/emkdir.c: File removed.
* time/Makefile (distribute, extra-objs, zic): Omit it.
* time/localtime.c: Deansideclized. Never #define __tzname et al
to non-__ names.
* locale/lc-ctype.c (__ctype_tolower, __ctype_toupper): Use int *
instead of short int *.
* ctype/ctype-info.c: Likewise.
* ctype/ctype.h: Likewise.
* locale/langinfo.h (_NL_CTYPE_CLASS): Use this (just one) instead
of EB and EL versions.
+Wed Mar 8 13:38:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * posix/glob/configure.bat: Fixes from DJ.
+
+ * time/backward, time/europe, time/northamerica, time/pacificnew,
+ time/zdump.c, time/zic.c, time/tzfile.h, time/private.h,
+ time/ialloc.c: Code and data updated from ADO's 95b.
+ * time/emkdir.c: File removed.
+ * time/Makefile (distribute, extra-objs, zic): Omit it.
+
+ * time/localtime.c: Deansideclized. Never #define __tzname et al
+ to non-__ names.
+
+ * locale/lc-ctype.c (__ctype_tolower, __ctype_toupper): Use int *
+ instead of short int *.
+ * ctype/ctype-info.c: Likewise.
+ * ctype/ctype.h: Likewise.
+
+ * locale/langinfo.h (_NL_CTYPE_CLASS): Use this (just one) instead
+ of EB and EL versions.
+
Mon Mar 6 12:34:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* ctype/ctype.h (_ISbit): New macro, defined dependent on byte order.
extern const char _nl_C_LC_CTYPE_toupper[];
extern const char _nl_C_LC_CTYPE_tolower[];
-#define b(u,x) (((u short int *) _nl_C_LC_CTYPE_##x) + 128);
+#define b(u,x) (((u int *) _nl_C_LC_CTYPE_##x) + 128);
-const unsigned short int *__ctype_b = b(unsigned, class);
-const short int *__ctype_tolower = b(, tolower);
-const short int *__ctype_toupper = b(, toupper);
+const unsigned short int *__ctype_b = b(unsigned short, class);
+const int *__ctype_tolower = b(, tolower);
+const int *__ctype_toupper = b(, toupper);
char' value [0,255]; by EOF (-1); or by any `signed char' value
[-128,-1). ANSI requires that the ctype functions work for `unsigned
char' values and for EOF; we also support negative `signed char' values
- for broken old programs. The case conversion arrays are of `short int's
+ for broken old programs. The case conversion arrays are of `int's
rather than `unsigned char's because tolower (EOF) must be EOF, which
doesn't fit into an `unsigned char'. */
extern __const unsigned short int *__ctype_b; /* Characteristics. */
-extern __const short int *__ctype_tolower; /* Case conversions. */
-extern __const short int *__ctype_toupper; /* Case conversions. */
+extern __const int *__ctype_tolower; /* Case conversions. */
+extern __const int *__ctype_toupper; /* Case conversions. */
#define __isctype(c, type) \
(__ctype_b[(int) (c)] & (unsigned short int) type)
ERA, /* Alternate era. */
ERA_YEAR, /* Year in alternate era format. */
- ERA_D_FMT, /* Date in alternate ear format. */
+ ERA_D_FMT, /* Date in alternate era format. */
ALT_DIGITS, /* Alternate symbols for digits. */
_NL_NUM_LC_TIME, /* Number of indices in LC_TIME category. */
/* LC_CTYPE category: character classification.
This information is accessed by the functions in <ctype.h>.
- These `nl_langinfo' names are used internally. */
- _NL_CTYPE_CLASS_EB = _NL_ITEM (LC_CTYPE, 0),
+ These `nl_langinfo' names are used only internally. */
+ _NL_CTYPE_CLASS = _NL_ITEM (LC_CTYPE, 0),
_NL_CTYPE_TOUPPER_EB,
_NL_CTYPE_TOLOWER_EB,
- _NL_CTYPE_CLASS_EL,
_NL_CTYPE_TOUPPER_EL,
_NL_CTYPE_TOLOWER_EL,
_NL_NUM_LC_CTYPE,
#else
#error bizarre byte order
#endif
+#define eval(x) x
#define current(unsigned,x) \
- ((const unsigned short int *) _NL_CURRENT (LC_CTYPE, bo(_NL_CTYPE_##x)) \
+ ((const unsigned int *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_##eval(x)) \
+ 128)
- __ctype_b = current (unsigned, CLASS);
- __ctype_toupper = current (, TOUPPER);
- __ctype_tolower = current (, TOLOWER);
+ __ctype_b = current (unsigned short, CLASS);
+ __ctype_toupper = current (, bo (TOUPPER));
+ __ctype_tolower = current (, bo (TOLOWER));
}
-@echo off
-echo Configuring glob for GO32
-rem This batch file assumes a unix-type "sed" program
-
-echo # Makefile generated by "configure.bat"> Makefile
-
-if exist config.sed del config.sed
-
-echo "s/@srcdir@/./ ">> config.sed
-echo "s/@RANLIB@/ranlib/ ">> config.sed
-echo "s/@LDFLAGS@// ">> config.sed
-echo "s/@DEFS@/-DHAVE_CONFIG_H -I../ ">> config.sed
-echo "s/@REMOTE@/s/ ">> config.sed
-echo "s/@ALLOCA@// ">> config.sed
-echo "s/@LIBS@// ">> config.sed
-echo "s/@LIBOBJS@// ">> config.sed
-echo "s/^Makefile *:/_Makefile:/ ">> config.sed
-echo "s/^config.h *:/_config.h:/ ">> config.sed
-
-sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
-sed -f config2.sed Makefile.in >> Makefile
-del config.sed
-del config2.sed
+@echo off\r
+echo Configuring glob for GO32\r
+rem This batch file assumes a unix-type "sed" program\r
+\r
+echo # Makefile generated by "configure.bat"> Makefile\r
+\r
+if exist config.sed del config.sed\r
+\r
+echo "s/@srcdir@/./ ">> config.sed\r
+echo "s/@CC@/gcc/ ">> config.sed\r
+echo "s/@CFLAGS@/-O2 -g/ ">> config.sed\r
+echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H -I../ ">> config.sed\r
+echo "s/@AR@/ar/ ">> config.sed\r
+echo "s/@RANLIB@/ranlib/ ">> config.sed\r
+echo "s/@LDFLAGS@// ">> config.sed\r
+echo "s/@DEFS@// ">> config.sed\r
+echo "s/@ALLOCA@// ">> config.sed\r
+echo "s/@LIBS@// ">> config.sed\r
+echo "s/@LIBOBJS@// ">> config.sed\r
+echo "s/^Makefile *:/_Makefile:/ ">> config.sed\r
+echo "s/^config.h *:/_config.h:/ ">> config.sed\r
+\r
+sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed\r
+sed -f config2.sed Makefile.in >> Makefile\r
+del config.sed\r
+del config2.sed\r
static char buf[] = "Signal 12345678901234567890";
if (signal > 0 || signal < NSIG)
- return sys_siglist[signal];
+ return (char *) sys_siglist[signal];
sprintf (buf, "Signal %d", signal);
return buf;
subdir := time
headers := time.h sys/time.h sys/timeb.h
-distribute := tzfile.h private.h scheck.c ialloc.c emkdir.c yearistype
-extra-objs = scheck.o ialloc.o emkdir.o zonenames $(tzfiles:%=z.%)
+distribute := tzfile.h private.h scheck.c ialloc.c yearistype
+extra-objs = scheck.o ialloc.o zonenames $(tzfiles:%=z.%)
routines := offtime asctime clock ctime difftime gmtime \
localtime mktime strftime time tzset tzfile \
endif
-$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o $(objpfx)emkdir.o
+$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
$(objpfx)tzfile.o: tzfile.c; $(tz-cc)
$(objpfx)zic.o: zic.c; $(tz-cc)
-# @(#)backward 7.6
+# @(#)backward 7.8
-# This file provides links between late-1993-vintage names for time zones
-# and their previous names.
+# This file provides links between current names for time zones
+# and their old names. Many names changed in late 1993.
-Link Australia/Sydney Australia/ACT
+Link Australia/Canberra Australia/ACT
Link Australia/Lord_Howe Australia/LHI
Link Australia/Sydney Australia/NSW
Link Australia/Darwin Australia/North
Link America/Tijuana Mexico/BajaNorte
Link America/Mazatlan Mexico/BajaSur
Link America/Mexico_City Mexico/General
+Link America/Shiprock Navajo
Link Pacific/Auckland NZ
Link Pacific/Chatham NZ-CHAT
Link Asia/Shanghai PRC
+++ /dev/null
-#ifndef lint
-#ifndef NOID
-static char elsieid[] = "@(#)emkdir.c 8.23";
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-#ifndef emkdir
-
-/*LINTLIBRARY*/
-
-#include "private.h"
-
-extern char * imalloc P((int n));
-extern void ifree P((char * p));
-
-static char *
-quoted(name)
-register const char * name;
-{
- register char * result;
- register char * cp;
- register int c;
-
- if (name == NULL)
- name = "";
- result = imalloc((int) (4 * strlen(name) + 3));
- if (result == NULL)
- return NULL;
- cp = result;
-#ifdef unix
- *cp++ = '\'';
- while ((c = *name++) != '\0')
- if (c == '\'') {
- *cp++ = c;
- *cp++ = '\\';
- *cp++ = c;
- *cp++ = c;
- } else *cp++ = c;
- *cp++ = '\'';
-#endif /* defined unix */
-#ifndef unix
- while ((c = *name++) != '\0')
- if (c == '/')
- *cp++ = '\\';
- else *cp++ = c;
-#endif /* !defined unix */
- *cp = '\0';
- return result;
-}
-
-int
-emkdir(name, mode)
-const char * name;
-const int mode;
-{
- register int result;
- register const char * format;
- register char * command;
- register char * qname;
-
- if ((qname = quoted(name)) == NULL)
- return -1;
-#ifdef unix
- format = "mkdir 2>&- %s && chmod 2>&- %o %s";
-#endif /* defined unix */
-#ifndef unix
- format = "mkdir %s";
-#endif /* !defined unix */
- command = imalloc((int) (strlen(format) + 2 * strlen(qname) + 20 + 1));
- if (command == NULL) {
- ifree(qname);
- return -1;
- }
- (void) sprintf(command, format, qname, mode, qname);
- ifree(qname);
- result = system(command);
- ifree(command);
- return (result == 0) ? 0 : -1;
-}
-
-/*
-** UNIX was a registered trademark of UNIX System Laboratories in 1993.
-*/
-
-#endif /* !defined emkdir */
# place of my old transcription of the Green Paper table [the UK Government
# paper "Summer Time: A Consultation Document" (HMSO Cm722 June 1989)].
#
-# Peter Ilieve peter@memex.co.uk
+# Peter Ilieve peter@memex.co.uk
#
#
# ## control file for tabscript, a program to generate UK summer time dates
Rule GB-Eire 1971 only - Oct 31 3:00 0 GMT
Rule GB-Eire 1972 1980 - Oct Sun>=23 2:00s 0 GMT
# 1981 on
-Rule GB-Eire 1981 max - Mar lastSun 1:00s 1:00 BST
-Rule GB-Eire 1981 1989 - Oct Sun>=23 1:00s 0 GMT
-Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00s 0 GMT
-Rule GB-Eire 1996 max - Oct lastSun 1:00s 0 GMT
-#Rule GB-Eire 1981 max - Mar lastSun 1:00u 1:00 BST
-#Rule GB-Eire 1981 1989 - Oct Sun>=23 1:00u 0 GMT
-#Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00u 0 GMT
-#Rule GB-Eire 1996 max - Oct lastSun 1:00u 0 GMT
-# Also see W-Eur, which (starting 1996) differs only in LETTER/S.
+Rule GB-Eire 1981 max - Mar lastSun 1:00u 1:00 BST
+Rule GB-Eire 1981 1989 - Oct Sun>=23 1:00u 0 GMT
+Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00u 0 GMT
+Rule GB-Eire 1996 max - Oct lastSun 1:00u 0 GMT
+# Also see EC, which (starting 1996) differs only in LETTER/S.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/London -0:01:15 - LMT 1847 Sep 22
0:00 GB-Eire %s 1968 Feb 18 2:00
1:00 - BST 1971 Oct 31 2:00
- 0:00 GB-Eire %s
+ 0:00 GB-Eire %s 1996
+ 0:00 EC GMT/BST
Zone Europe/Belfast -0:23:40 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00 # Dublin MT
-0:25:21 1:00 DST 1916 Oct 1 3:00
0:00 GB-Eire %s 1968 Feb 18 2:00
1:00 - BST 1971 Oct 31 3:00
- 0:00 GB-Eire %s
+ 0:00 GB-Eire %s 1996
+ 0:00 EC GMT/BST
Zone Europe/Dublin -0:25:21 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00 # Dublin MT
-0:25:21 1:00 DST 1916 Oct 1 3:00
0:00 - GMT 1948 Apr 18 2:00
0:00 GB-Eire %s 1968 Feb 18 2:00
1:00 - BST 1971 Oct 31 3:00
- 0:00 GB-Eire %s
+ 0:00 GB-Eire %s 1996
+ 0:00 EC GMT/BST
###############################################################################
# Continental Europe
-# The *-Eur rules now correspond to the European Community (EC).
-# Three rulesets are used because the EC changes at 01:00 UTC, not local time.
-# Older *-Eur rules are for convenience in the tables.
+# EC rules are for the European Community.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule EC 1800 only - Jan 1 0:00 0 -
+Rule EC 1977 1980 - Apr Sun>=1 1:00u 1:00 " DST"
+Rule EC 1977 only - Sep lastSun 1:00u 0 -
+Rule EC 1978 only - Oct 1 1:00u 0 -
+Rule EC 1979 1995 - Sep lastSun 1:00u 0 -
+Rule EC 1981 max - Mar lastSun 1:00u 1:00 " DST"
+Rule EC 1996 max - Oct lastSun 1:00u 0 -
+# Also see GB-Eire, which (starting 1996) differs only in LETTER/S.
+
+# W-Eur differs from EC only in that W-Eur uses standard time.
Rule W-Eur 1800 only - Jan 1 0:00 0 -
Rule W-Eur 1977 1980 - Apr Sun>=1 1:00s 1:00 " DST"
Rule W-Eur 1977 only - Sep lastSun 1:00s 0 -
Rule W-Eur 1979 1995 - Sep lastSun 1:00s 0 -
Rule W-Eur 1981 max - Mar lastSun 1:00s 1:00 " DST"
Rule W-Eur 1996 max - Oct lastSun 1:00s 0 -
-# Also see GB-Eire, which (starting 1996) differs only in LETTER/S.
+# Older M-Eur rules are for convenience in the tables.
+# From 1977 on, M-Eur differs from EC only in that M-Eur uses standard time.
Rule M-Eur 1800 only - Jan 1 0:00 0 -
Rule M-Eur 1916 only - Apr 30 23:00 1:00 " DST"
Rule M-Eur 1916 only - Oct 1 1:00 0 -
Rule M-Eur 1981 max - Mar lastSun 2:00s 1:00 " DST"
Rule M-Eur 1996 max - Oct lastSun 2:00s 0 -
-Rule E-Eur 1981 max - Mar lastSun 3:00s 1:00 " DST"
-Rule E-Eur 1981 1995 - Sep lastSun 3:00s 0 -
-Rule E-Eur 1996 max - Oct lastSun 3:00s 0 -
-
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Russia 1880 only - Jan 1 0:00 0 -
Rule Russia 1917 only - Jul 1 23:00 1:00 " DST"
# These are for backward compatibility with older versions.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone WET 0:00 W-Eur WET%s
+Zone WET 0:00 EC WET%s
Zone MET 1:00 M-Eur MET%s
-Zone EET 2:00 E-Eur EET%s
+Zone EET 2:00 EC EET%s
Zone W-SU 3:00 M-Eur ????
# Tom Hoffman says that MET is also known as Central European Time
1:00 - MET 1940 Jun 16
1:00 Albania MET%s 1985 Mar 31 1:00
1:00 W-Eur MET%s
-# This may change to `M-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
# Andorra
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Andorra 0:06:04 - LMT 1901
0:00 - WET 1946 Sep 30
1:00 - MET 1985 Mar 31 2:00
- 1:00 M-Eur MET%s
+ 1:00 EC MET%s
# Austria
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
1:00 M-Eur MET%s 1918 Jun 16 3:00
1:00 Austria MET%s 1940 Apr 1 2:00
1:00 M-Eur MET%s 1945 Apr 2 2:00
- 1:00 Austria MET%s 1981 Mar 29 2:00
- 1:00 M-Eur MET%s
+ 1:00 Austria MET%s 1981
+ 1:00 EC MET%s
# Belarus
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
1:00 M-Eur MET%s 1919 Mar 1 23:00
0:00 Belgium WET%s 1940 Feb 24 23:00
1:00 M-Eur MET%s 1945 Apr 2 2:00
- 1:00 Belgium MET%s 1977 Apr 3 2:00
- 1:00 M-Eur MET%s
+ 1:00 Belgium MET%s 1977
+ 1:00 EC MET%s
# Bosnia and Herzegovina
# They switched from the Julian to the Gregorian calendar on 1918 Mar 18.
1:00 - MET 1941 Apr 18 23:00
1:00 M-Eur MET%s 1945 May 8 2:00s
1:00 1:00 "MET DST" 1945 Sep 16 2:00s
- 1:00 - MET 1983 Mar 27 2:00s
- 1:00 M-Eur MET%s
+ 1:00 - MET 1983
+ 1:00 EC MET%s
# Bulgaria
# Part switched from the Julian to the Gregorian calendar on 1915 Nov 14;
2:00 - EET 1979 Mar 31 23:00
2:00 Bulg EET%s 1982 Sep 26 2:00
2:00 M-Eur EET%s
-# This may change to `E-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
# Croatia
# They switched from the Julian to the Gregorian calendar on 1918 Mar 18.
1:00 - MET 1941 Apr 18 23:00
1:00 M-Eur MET%s 1945 May 8 2:00s
1:00 1:00 "MET DST" 1945 Sep 16 2:00s
- 1:00 - MET 1983 Mar 27 2:00s
- 1:00 M-Eur MET%s
+ 1:00 - MET 1983
+ 1:00 EC MET%s
# Czech Republic
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Zone Europe/Prague 0:57:44 - LMT 1850
0:58 - PMT 1891 Oct # Prague Mean Time
1:00 M-Eur MET%s 1944 Sep 17 2:00s
- 1:00 Czech MET%s 1979 Apr 1 2:00
- 1:00 M-Eur MET%s
+ 1:00 Czech MET%s 1979
+ 1:00 EC MET%s
# Denmark
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
0:50 - CMT 1894 Apr # Copenhagen Mean Time
1:00 Denmark MET%s 1942 Nov 2 2:00s
1:00 M-Eur MET%s 1945 Apr 2 2:00
- 1:00 Denmark MET%s 1980 Apr 6 2:00
- 1:00 M-Eur MET%s
+ 1:00 Denmark MET%s 1980
+ 1:00 EC MET%s
Zone Atlantic/Faeroe -0:27:04 - LMT 1908 Jan 11 # Torshavn
- 0:00 - WET 1981 Mar 29 1:00
- 0:00 W-Eur WET%s
+ 0:00 - WET 1981
+ 0:00 EC WET%s
Zone America/Scoresbysund -1:29:00 - LMT 1916 Jul 28
-2:00 - MGT 1980 Apr 6 2:00
-2:00 M-Eur MGT%s 1981 Mar 29
3:00 Russia MS%s 1989 Mar 26 2:00s
2:00 1:00 "EET DST" 1989 Sep 24 2:00s
2:00 M-Eur EET%s
-# This may change to `E-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
# Finland
#
Zone Europe/Helsinki 1:39:52 - LMT 1878 May 31
1:40 - HMT 1921 May # Helsinki Mean Time
2:00 Finland EET%s 1981 Mar 29 2:00
- 2:00 E-Eur EET%s
+ 2:00 EC EET%s
# France
# Shanks seems to use `24:00' ambiguously; we resolve it with Whitman.
0:00 France WET%s 1940 Jun 14
1:00 M-Eur MET%s 1944 Aug 25
0:00 France WET%s 1945 Sep 16 3:00
- 1:00 France MET%s 1977 Apr Sun>=1 2:00
- 1:00 M-Eur MET%s
+ 1:00 France MET%s 1977
+ 1:00 EC MET%s
# Germany
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Berlin 0:53:28 - LMT 1893 Apr
1:00 M-Eur MET%s 1945 Apr 2 2:00
- 1:00 Germany MET%s 1980 Apr 6 2:00
- 1:00 M-Eur MET%s
+ 1:00 Germany MET%s 1980
+ 1:00 EC MET%s
# Gibraltar
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Gibraltar -0:21:24 - LMT 1880 Aug 2
0:00 GB-Eire %s 1957 Apr 14 2:00
- 1:00 - MET 1982 Mar 28 2:00
- 1:00 M-Eur MET%s
+ 1:00 - MET 1982
+ 1:00 EC MET%s
# Greece
# They adopted the Julian calendar in 1846.
1:35 - AMT 1916 Jul 28 0:01 # Athens MT
2:00 Greece EET%s 1941 Apr 30
1:00 Greece MET%s 1944 Apr 4
- 2:00 Greece EET%s 1981 Mar 29 2:00
-# Greece must change by 1996 for EC compatibility.
- 2:00 M-Eur EET%s 1996 # Guess the last minute.
- 2:00 E-Eur EET%s
+ 2:00 Greece EET%s 1981
+ # Shanks says they switched to M-Eur in 1981;
+ # go with EC intead, since Greece joined it on Jan 1.
+ 2:00 EC EET%s
# Hungary
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
1:00 Hungary MET%s 1941 Apr 6 2:00
1:00 M-Eur MET%s 1945 May 1 23:00
1:00 Hungary MET%s 1980 Sep 28 2:00s
- 1:00 M-Eur MET%s
+ 1:00 EC MET%s
# Iceland
#
0:50 - RMT 1893 Nov # Rome Mean Time
1:00 Italy MET%s 1942 Nov 2 2:00s
1:00 M-Eur MET%s 1945 Apr 2 2:00s
- 1:00 Italy MET%s 1980 Apr 6 2:00
- 1:00 M-Eur MET%s
-# Vatican is identical to Europe/Rome; San Marino is like Europe/Rome.
+ 1:00 Italy MET%s 1980
+ 1:00 EC MET%s
+
+Link Europe/Rome Europe/Vatican
+Link Europe/Rome Europe/San_Marino
# Latvia
# They switched from the Julian to the Gregorian calendar on 1918 Feb 15.
3:00 Russia MS%s 1991 Mar 31 2:00s
2:00 1:00 "EET DST" 1991 Sep 29 2:00s
2:00 M-Eur EET%s
-# This may change to `E-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
# Liechtenstein
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Vaduz 0:38:04 - LMT 1894 Jun
- 1:00 - MET 1981 Mar 29 2:00
- 1:00 M-Eur MET%s
+ 1:00 - MET 1981
+ 1:00 EC MET%s
# Lithuania
# They switched from the Julian to the Gregorian calendar on 1918 Feb 15.
3:00 Russia MS%s 1991 Mar 31 2:00s
2:00 1:00 "EET DST" 1991 Sep 29 2:00s
2:00 M-Eur EET%s
-# This may change to `E-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
# Luxembourg
# Whitman disagrees with most of these dates in minor ways; go with Shanks.
0:00 Lux WET%s 1929 Oct 6 2:00s
0:00 Belgium WET%s 1940 May 14 3:00
1:00 M-Eur WET%s 1944 Sep 18 3:00
- 1:00 Belgium MET%s 1979 Apr 1 2:00
- 1:00 M-Eur MET%s
+ 1:00 Belgium MET%s 1979
+ 1:00 EC MET%s
# Macedonia
# They switched from the Julian to the Gregorian calendar on 1918 Mar 18.
1:00 - MET 1941 Apr 18 23:00
1:00 M-Eur MET%s 1945 May 8 2:00s
1:00 1:00 "MET DST" 1945 Sep 16 2:00s
- 1:00 - MET 1983 Mar 27 2:00s
- 1:00 M-Eur MET%s
+ 1:00 - MET 1983
+ 1:00 EC MET%s
# Malta
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
1:00 Italy MET%s 1942 Nov 2 2:00s
1:00 M-Eur MET%s 1945 Apr 2 2:00s
1:00 Italy MET%s 1973 Mar 31
- 1:00 Malta MET%s 1981 Mar 29 2:00s
- 1:00 M-Eur MET%s
+ 1:00 Malta MET%s 1981
+ 1:00 EC MET%s
# Moldova
# They switched from the Julian to the Gregorian calendar on 1919 Mar 18.
3:00 Russia MS%s 1991 Mar 31 2:00s
2:00 1:00 "EET DST" 1991 Sep 29 2:00s
2:00 M-Eur EET%s
-# This may change to `E-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
# Monaco
# Shanks gives 0:09 for Paris Mean Time; go with Whitman's more precise 0:09:05.
Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15
0:09:05 - PMT 1911 Mar 11 # Paris Mean Time
0:00 France WET%s 1945 Sep 16 3:00
- 1:00 France MET%s 1977 Apr Sun>=1 2:00
- 1:00 M-Eur MET%s
+ 1:00 France MET%s 1977
+ 1:00 EC MET%s
# Netherlands
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Neth 1937 only - May 22 2:00s 1:00 NST
# Whitman gives 1939 Apr 15 and 1940 Apr 19; go with Shanks.
Rule Neth 1938 1939 - May 15 2:00s 1:00 NST
-Rule Neth 1945 only - Apr 2 2:00s 1:00 -
-Rule Neth 1945 only - May 20 2:00s 0 " DST"
+Rule Neth 1945 only - Apr 2 2:00s 1:00 " DST"
+Rule Neth 1945 only - May 20 2:00s 0 -
# Before 1937, Shanks says just `0:20'; we use Whitman's more precise figure.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Amsterdam 0:19:28 - LMT 1892 May
0:19:28 Neth %s 1937 Jul
0:20 Neth %s 1940 May 16 0:40
1:00 M-Eur MET%s 1945 Apr 2 2:00
- 1:00 Neth MET%s 1977 Apr Sun>=1 2:00
- 1:00 M-Eur MET%s
+ 1:00 Neth MET%s 1977
+ 1:00 EC MET%s
# Norway
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Zone Europe/Oslo 0:43:00 - LMT 1895
1:00 Norway MET%s 1940 Aug 10 23:00
1:00 M-Eur MET%s 1945 Apr 2 2:00
- 1:00 Norway MET%s 1980 Apr 6 2:00
- 1:00 M-Eur MET%s
+ 1:00 Norway MET%s 1980
+ 1:00 EC MET%s
# Svalbard is like Europe/Oslo.
#
# From Whitman:
1:00 M-Eur MET%s 1944 Oct
1:00 Poland MET%s 1977 Apr 3 1:00
1:00 W-Eur MET%s
-# This may change to `M-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
# Portugal
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
0:00 Port WET%s 1966 Apr 3 2:00
1:00 - MET 1976 Sep 26 1:00
0:00 Port WET%s 1983 Sep 25 1:00s
- 0:00 W-Eur WET%s 1992 Sep 27 1:00s
+ 0:00 EC WET%s 1992 Sep 27 1:00s
# From Rui Pedro Salgueiro <rps@inescca.inescc.pt> (November 12, 1992):
# Portugal has recently (September, 27) changed timezone
# (from WET to MET or CET) to harmonize with EEC.
- 1:00 M-Eur MET%s
+ 1:00 EC MET%s
# We don't know what happened to Madeira or the Azores,
# so we'll just use Shanks for now.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-1:00 Port ACT%s 1966 Apr 3 2:00
0:00 - WET 1977 Mar 27
0:00 Port WET%s 1983 Sep 25 1:00s
- 0:00 W-Eur WET%s
+ 0:00 EC WET%s
# Slovakia
Link Europe/Prague Europe/Bratislava
1:44 - BMT 1931 Jul 24 # Bucharest MT
2:00 Romania EET%s 1981 Mar 29 2:00s
2:00 M-Eur EET%s
-# This may change to `E-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
# Russia
# From Paul Eggert <eggert@twinsun.com> (May 28, 1994):
1:00 - MET 1941 Apr 18 23:00
1:00 M-Eur MET%s 1945 May 8 2:00s
1:00 1:00 "MET DST" 1945 Sep 16 2:00s
- 1:00 - MET 1983 Mar 27 2:00s
- 1:00 M-Eur MET%s
+ 1:00 - MET 1983
+ 1:00 EC MET%s
# Slovenia
# They switched from the Julian to the Gregorian calendar on 1918 Mar 18.
1:00 - MET 1941 Apr 18 23:00
1:00 M-Eur MET%s 1945 May 8 2:00s
1:00 1:00 "MET DST" 1945 Sep 16 2:00s
- 1:00 - MET 1983 Mar 27 2:00s
- 1:00 M-Eur MET%s
+ 1:00 - MET 1983
+ 1:00 EC MET%s
# Spain
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Madrid -0:14:44 - LMT 1901
0:00 Spain WET%s 1946 Sep 30
- 1:00 Spain MET%s 1979 Apr 1 2:00
- 1:00 M-Eur MET%s
+ 1:00 Spain MET%s 1979
+ 1:00 EC MET%s
Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C.
-1:00 - ACT 1946 Sep 30 1:00
0:00 - WET 1980 Apr 6 0:00s
0:00 1:00 "WET DST" 1980 Sep 28 0:00s
- 0:00 W-Eur WET%s
+ 0:00 EC WET%s
# Sweden
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
1:12 - SMT 1900 Jan 1 1:00 # Stockholm MT
1:00 - MET 1916 Apr 14 23:00s
1:00 1:00 "MET DST" 1916 Sep 30 23:00s
- 1:00 - MET 1980 Apr 6 2:00
- 1:00 M-Eur MET%s
+ 1:00 - MET 1980
+ 1:00 EC MET%s
# Switzerland
# From Howse (1988), p 82:
Rule Swiss 1894 only - Jun 1 0:00 0 -
# From Whitman (who writes ``Midnight?''):
Rule Swiss 1940 only - Nov 2 0:00 1:00 " DST"
-Rule Swiss 1940 only - Dec 31 0:00 0 " DST"
+Rule Swiss 1940 only - Dec 31 0:00 0 -
# From Shanks (1991):
Rule Swiss 1941 1942 - May Sun>=1 2:00 1:00 " DST"
-Rule Swiss 1941 1942 - Oct Sun>=1 0:00 0 " DST"
+Rule Swiss 1941 1942 - Oct Sun>=1 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12
0:30 - SST 1894 Jun # Swiss Standard Time
- 1:00 Swiss MET%s 1981 Mar 29 2:00
- 1:00 M-Eur MET%s
+ 1:00 Swiss MET%s 1981
+ 1:00 EC MET%s
# Turkey
# European Turkey switched to the Gregorian calendar in 1908.
3:00 Turkey TUR%s 1985 Apr 20
2:00 Turkey EET%s 1986
2:00 M-Eur EET%s
-# This may change to `E-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
# Ukraine
2:00 - EET 1930 Jun 21
3:00 Russia MS%s 1990 Jul 17
2:00 M-Eur EET%s
-# This may change to `E-Eur' soon, for EC compatibility.
+# This may change to `EC' soon.
Zone Europe/Simferopol 2:16:24 - LMT 1880
2:08 Russia LST%s 1919 Jul 1 2:00
2:08 Ukraine LST%s 1924 May 2
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)ialloc.c 8.24";
+static char elsieid[] = "@(#)ialloc.c 8.28";
#endif /* !defined NOID */
#endif /* !defined lint */
#include "private.h"
-#ifdef MAL
-#define NULLMAL(x) ((x) == NULL || (x) == MAL)
-#endif /* defined MAL */
-#ifndef MAL
-#define NULLMAL(x) ((x) == NULL)
-#endif /* !defined MAL */
-
#define nonzero(n) (((n) == 0) ? 1 : (n))
char * icalloc P((int nelem, int elsize));
imalloc(n)
const int n;
{
-#ifdef MAL
- register char * result;
-
- result = malloc((alloc_size_T) nonzero(n));
- return NULLMAL(result) ? NULL : result;
-#endif /* defined MAL */
-#ifndef MAL
- return malloc((alloc_size_T) nonzero(n));
-#endif /* !defined MAL */
+ return malloc((size_t) nonzero(n));
}
char *
{
if (nelem == 0 || elsize == 0)
nelem = elsize = 1;
- return calloc((alloc_size_T) nelem, (alloc_size_T) elsize);
+ return calloc((size_t) nelem, (size_t) elsize);
}
void *
void * const pointer;
const int size;
{
- if (NULLMAL(pointer))
+ if (pointer == NULL)
return imalloc(size);
- return realloc((genericptr_T) pointer, (alloc_size_T) nonzero(size));
+ return realloc((void *) pointer, (size_t) nonzero(size));
}
char *
register char * result;
register int oldsize, newsize;
- newsize = NULLMAL(new) ? 0 : strlen(new);
- if (NULLMAL(old))
+ newsize = (new == NULL) ? 0 : strlen(new);
+ if (old == NULL)
oldsize = 0;
else if (newsize == 0)
return old;
else oldsize = strlen(old);
if ((result = irealloc(old, oldsize + newsize + 1)) != NULL)
- if (!NULLMAL(new))
+ if (new != NULL)
(void) strcpy(result + oldsize, new);
return result;
}
ifree(p)
char * const p;
{
- if (!NULLMAL(p))
+ if (p != NULL)
(void) free(p);
}
icfree(p)
char * const p;
{
- if (!NULLMAL(p))
+ if (p != NULL)
(void) free(p);
}
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <ctype.h>
#include <stdio.h>
#include <time.h>
-#ifndef HAVE_GNU_LD
-#define __tzname tzname
-#define __daylight daylight
-#define __timezone timezone
-#endif
-
/* Return the `struct tm' representation of *TIMER in the local timezone. */
struct tm *
-DEFUN(localtime, (timer), CONST time_t *timer)
+localtime (timer)
+ const time_t *timer;
{
extern int __use_tzfile;
- extern int EXFUN(__tz_compute, (time_t timer, struct tm *tp));
- extern int EXFUN(__tzfile_compute, (time_t timer,
- long int *leap_correct, int *leap_hit));
+ extern int __tz_compute __P ((time_t timer, struct tm *tp));
+ extern int __tzfile_compute __P ((time_t timer,
+ long int *leap_correct, int *leap_hit));
register struct tm *tp;
long int leap_correction;
int leap_extra_secs;
-# @(#)northamerica 7.12
+# @(#)northamerica 7.15
# also includes Central America and the Caribbean
# This data is by no means authoritative; if you think you know better,
# large size and location in three states." (The "only" means that other
# tribal nations don't use DST.)
-Link America/Denver Navajo
+Link America/Denver America/Shiprock
# From Bob Devine (January 28, 1988):
# Michigan didn't observe DST from 1968 to 1973.
-# @(#)pacificnew 7.6
+# @(#)pacificnew 7.7
# From Arthur David Olson (April 5, 1989):
# On April 5, 1989, the U. S. House of Representatives passed (238-154) a bill
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
## Zone US/Pacific-PET -8:00 US P%sT XXXX
-## -8:00 Twilite P%sT
+## -8:00 Twilite P%sT
# For now...
Link America/Los_Angeles US/Pacific-New ##
#ifndef lint
#ifndef NOID
-static char privatehid[] = "@(#)private.h 7.10";
+static char privatehid[] = "@(#)private.h 7.33";
#endif /* !defined NOID */
#endif /* !defined lint */
/*
-** const
+** Defaults for preprocessor symbols.
+** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'.
*/
-#ifndef const
-#ifndef __STDC__
-#define const
-#endif /* !defined __STDC__ */
-#endif /* !defined const */
+#ifndef HAVE_ADJTIME
+#define HAVE_ADJTIME 1
+#endif /* !defined HAVE_ADJTIME */
+
+#ifndef HAVE_SETTIMEOFDAY
+#define HAVE_SETTIMEOFDAY 3
+#endif /* !defined HAVE_SETTIMEOFDAY */
+
+#ifndef HAVE_UNISTD_H
+#define HAVE_UNISTD_H 1
+#endif /* !defined HAVE_UNISTD_H */
+
+#ifndef LOCALE_HOME
+#define LOCALE_HOME "/usr/lib/locale"
+#endif /* !defined LOCALE_HOME */
/*
-** void
+** Nested includes
*/
-#ifndef void
-#ifndef __STDC__
-#ifndef vax
-#ifndef sun
-#define void char
-#endif /* !defined sun */
-#endif /* !defined vax */
-#endif /* !defined __STDC__ */
-#endif /* !defined void */
+#include "sys/types.h" /* for time_t */
+#include "stdio.h"
+#include "ctype.h"
+#include "errno.h"
+#include "string.h"
+#include "limits.h" /* for CHAR_BIT */
+#include "time.h"
+#include "stdlib.h"
+
+#if HAVE_UNISTD_H - 0
+#include "unistd.h" /* for F_OK and R_OK */
+#endif /* HAVE_UNISTD_H - 0 */
+
+#if !(HAVE_UNISTD_H - 0)
+#ifndef F_OK
+#define F_OK 0
+#endif /* !defined F_OK */
+#ifndef R_OK
+#define R_OK 4
+#endif /* !defined R_OK */
+#endif /* !(HAVE_UNISTD_H - 0) */
/*
-** INITIALIZE
+** Workarounds for compilers/systems.
*/
-#ifndef GNUC_or_lint
-#ifdef lint
-#define GNUC_or_lint
-#endif /* defined lint */
-#ifdef __GNUC__
-#define GNUC_or_lint
-#endif /* defined __GNUC__ */
-#endif /* !defined GNUC_or_lint */
+/*
+** SunOS 4.1.1 cc lacks const.
+*/
-#ifndef INITIALIZE
-#ifdef GNUC_or_lint
-#define INITIALIZE(x) ((x) = 0)
-#endif /* defined GNUC_or_lint */
-#ifndef GNUC_or_lint
-#define INITIALIZE(x)
-#endif /* !defined GNUC_or_lint */
-#endif /* !defined INITIALIZE */
+#ifndef const
+#ifndef __STDC__
+#define const
+#endif /* !defined __STDC__ */
+#endif /* !defined const */
/*
-** P((args))
+** SunOS 4.1.1 cc lacks prototypes.
*/
#ifndef P
#endif /* !defined P */
/*
-** genericptr_T
+** SunOS 4.1.1 headers lack EXIT_SUCCESS.
*/
-#ifdef __STDC__
-typedef void * genericptr_T;
-#endif /* defined __STDC__ */
-#ifndef __STDC__
-typedef char * genericptr_T;
-#endif /* !defined __STDC__ */
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif /* !defined EXIT_SUCCESS */
-#include "sys/types.h" /* for time_t */
-#include "stdio.h"
-#include "ctype.h"
-#include "errno.h"
-#include "string.h"
-#include "limits.h" /* for CHAR_BIT */
-#ifndef _TIME_
-#include "time.h"
-#endif /* !defined _TIME_ */
+/*
+** SunOS 4.1.1 headers lack EXIT_FAILURE.
+*/
-#ifndef remove
-extern int unlink P((const char * filename));
-#define remove unlink
-#endif /* !defined remove */
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif /* !defined EXIT_FAILURE */
+
+/*
+** SunOS 4.1.1 headers lack FILENAME_MAX.
+*/
#ifndef FILENAME_MAX
#endif /* !defined FILENAME_MAX */
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#endif /* !defined EXIT_SUCCESS */
-
-#ifndef EXIT_FAILURE
-#define EXIT_FAILURE 1
-#endif /* !defined EXIT_FAILURE */
-
-#ifdef __STDC__
-
-#define alloc_size_T size_t
-#define qsort_size_T size_t
-#define fwrite_size_T size_t
-
-#endif /* defined __STDC__ */
-#ifndef __STDC__
-
-#ifndef alloc_size_T
-#define alloc_size_T unsigned
-#endif /* !defined alloc_size_T */
-
-#ifndef qsort_size_T
-#ifdef USG
-#define qsort_size_T unsigned
-#endif /* defined USG */
-#ifndef USG
-#define qsort_size_T int
-#endif /* !defined USG */
-#endif /* !defined qsort_size_T */
-
-#ifndef fwrite_size_T
-#define fwrite_size_T int
-#endif /* !defined fwrite_size_T */
-
-#ifndef USG
-extern char * sprintf P((char * buf, const char * format, ...));
-#endif /* !defined USG */
-
-#endif /* !defined __STDC__ */
-
/*
-** Ensure that these are declared--redundantly declaring them shouldn't hurt.
+** SunOS 4.1.1 libraries lack remove.
*/
-extern char * getenv P((const char * name));
-extern genericptr_T malloc P((alloc_size_T size));
-extern genericptr_T calloc P((alloc_size_T nelem, alloc_size_T elsize));
-extern genericptr_T realloc P((genericptr_T oldptr, alloc_size_T newsize));
+#ifndef remove
+extern int unlink P((const char * filename));
+#define remove unlink
+#endif /* !defined remove */
-#ifdef USG
-extern void exit P((int s));
-extern void qsort P((genericptr_T base, qsort_size_T nelem,
- qsort_size_T elsize, int (*comp)()));
-extern void perror P((const char * string));
-extern void free P((char * buf));
-#endif /* defined USG */
+/*
+** Finally, some convenience items.
+*/
#ifndef TRUE
#define TRUE 1
((sizeof(type) * CHAR_BIT - 1) * 302 / 1000 + 2)
#endif /* !defined INT_STRLEN_MAXIMUM */
-#ifndef LOCALE_HOME
-#define LOCALE_HOME "/usr/lib/locale"
-#endif /* !defined LOCALE_HOME */
+/*
+** INITIALIZE(x)
+*/
+
+#ifndef GNUC_or_lint
+#ifdef lint
+#define GNUC_or_lint
+#endif /* defined lint */
+#ifndef lint
+#ifdef __GNUC__
+#define GNUC_or_lint
+#endif /* defined __GNUC__ */
+#endif /* !defined lint */
+#endif /* !defined GNUC_or_lint */
+
+#ifndef INITIALIZE
+#ifdef GNUC_or_lint
+#define INITIALIZE(x) ((x) = 0)
+#endif /* defined GNUC_or_lint */
+#ifndef GNUC_or_lint
+#define INITIALIZE(x)
+#endif /* !defined GNUC_or_lint */
+#endif /* !defined INITIALIZE */
/*
** UNIX was a registered trademark of UNIX System Laboratories in 1993.
-** VAX is a trademark of Digital Equipment Corporation.
*/
#endif /* !defined PRIVATE_H */
#ifndef lint
#ifndef NOID
-static char tzfilehid[] = "@(#)tzfile.h 7.4";
+static char tzfilehid[] = "@(#)tzfile.h 7.6";
#endif /* !defined NOID */
#endif /* !defined lint */
*/
struct tzhead {
- char tzh_reserved[24]; /* reserved for future use */
+ char tzh_reserved[20]; /* reserved for future use */
+ char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
char tzh_leapcnt[4]; /* coded number of leap seconds */
char tzh_timecnt[4]; /* coded number of transition times */
** transition time is wall clock time
** if absent, transition times are
** assumed to be wall clock time
+** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition
+** time is GMT, if FALSE,
+** transition time is local time
+** if absent, transition times are
+** assumed to be local time
*/
/*
#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
#endif /* !defined NOSOLAR */
#ifdef NOSOLAR
-#define TZ_MAX_TYPES 10 /* Maximum number of local time types */
+/*
+** Must be at least 14 for Europe/Riga as of Jan 12 1995,
+** as noted by Earl Chew <earl@hpato.aus.hp.com>.
+*/
+#define TZ_MAX_TYPES 20 /* Maximum number of local time types */
#endif /* !defined NOSOLAR */
#endif /* !defined TZ_MAX_TYPES */
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)zdump.c 7.12";
+static char elsieid[] = "@(#)zdump.c 7.20";
#endif /* !defined NOID */
#endif /* !defined lint */
** You can use this code to help in verifying other implementations.
*/
-#include "stdio.h" /* for stdout, stderr */
+#include "stdio.h" /* for stdout, stderr, perror */
#include "string.h" /* for strcpy */
#include "sys/types.h" /* for time_t */
#include "time.h" /* for struct tm */
+#include "stdlib.h" /* for exit, malloc, atoi */
#ifndef MAX_STRING_LENGTH
#define MAX_STRING_LENGTH 1024
#ifdef lint
#define GNUC_or_lint
#endif /* defined lint */
+#ifndef lint
#ifdef __GNUC__
#define GNUC_or_lint
#endif /* defined __GNUC__ */
+#endif /* !defined lint */
#endif /* !defined GNUC_or_lint */
#ifndef INITIALIZE
extern time_t time();
extern char * tzname[2];
-#ifdef USG
-extern void exit();
-extern void perror();
-#endif /* defined USG */
-
static char * abbr();
static long delta();
static time_t hunt();
int argc;
char * argv[];
{
- register int i, c;
+ register int i;
+ register int c;
register int vflag;
register char * cutoff;
register int cutyear;
register long cuttime;
char ** fakeenv;
time_t now;
- time_t t, newt;
+ time_t t;
+ time_t newt;
time_t hibit;
- struct tm tm, newtm;
+ struct tm tm;
+ struct tm newtm;
INITIALIZE(cuttime);
progname = argv[0];
for (hibit = 1; (hibit << 1) != 0; hibit <<= 1)
continue;
{
- register int from, to;
+ register int from;
+ register int to;
for (i = 0; environ[i] != NULL; ++i)
continue;
- fakeenv = (char **) malloc((i + 2) * sizeof *fakeenv);
+ fakeenv = (char **) malloc((size_t) ((i + 2) *
+ sizeof *fakeenv));
if (fakeenv == NULL ||
- (fakeenv[0] = (char *) malloc(longest + 4)) == NULL) {
- (void) perror(progname);
- (void) exit(EXIT_FAILURE);
+ (fakeenv[0] = (char *) malloc((size_t) (longest +
+ 4))) == NULL) {
+ (void) perror(progname);
+ (void) exit(EXIT_FAILURE);
}
to = 0;
(void) strcpy(fakeenv[to++], "TZ=");
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)zic.c 7.28";
+static char elsieid[] = "@(#)zic.c 7.50";
#endif /* !defined NOID */
#endif /* !defined lint */
#include "private.h"
#include "tzfile.h"
+#ifdef unix
+#include "sys/stat.h" /* for umask manifest constants */
+#endif /* defined unix */
struct rule {
const char * r_filename;
long r_tod; /* time from midnight */
int r_todisstd; /* above is standard time if TRUE */
/* or wall clock time if FALSE */
- int r_todisuniv; /* above is universal time if TRUE */
+ int r_todisgmt; /* above is GMT if TRUE */
/* or local time if FALSE */
long r_stdoff; /* offset from standard time */
const char * r_abbrvar; /* variable part of abbreviation */
time_t z_untiltime;
};
-extern int emkdir P((const char * name, int mode));
-extern int getopt P((int argc, char * argv[], const char * options));
+extern int getopt P((int argc, char * const argv[],
+ const char * options));
extern char * icatalloc P((char * old, const char * new));
extern char * icpyalloc P((const char * string));
extern void ifree P((char * p));
static void addtt P((time_t starttime, int type));
static int addtype P((long gmtoff, const char * abbr, int isdst,
- int ttisstd));
+ int ttisstd, int ttisgmt));
static void leapadd P((time_t t, int positive, int rolling, int count));
static void adjleap P((void));
static void associate P((void));
static int ciequal P((const char * ap, const char * bp));
static void convert P((long val, char * buf));
static void dolink P((const char * fromfile, const char * tofile));
+static void doabbr P((char * abbr, const char * format,
+ const char * letters, int isdst));
static void eat P((const char * name, int num));
static void eats P((const char * name, int num,
const char * rname, int rnum));
static long oadd P((long t1, long t2));
static void outzone P((const struct zone * zp, int ntzones));
static void puttzcode P((long code, FILE * fp));
-static int rcomp P((const genericptr_T leftp, const genericptr_T rightp));
+static int rcomp P((const void * leftp, const void * rightp));
static time_t rpytime P((const struct rule * rp, int wantedy));
static void rulesub P((struct rule * rp,
const char * loyearp, const char * hiyearp,
static char isdsts[TZ_MAX_TYPES];
static unsigned char abbrinds[TZ_MAX_TYPES];
static char ttisstds[TZ_MAX_TYPES];
+static char ttisgmts[TZ_MAX_TYPES];
static char chars[TZ_MAX_CHARS];
static time_t trans[TZ_MAX_LEAPS];
static long corr[TZ_MAX_LEAPS];
{
/*
** Match the format of "cc" to allow sh users to
- ** zic ... 2>&1 | error -t "*" -v
+ ** zic ... 2>&1 | error -t "*" -v
** on BSD systems.
*/
(void) fprintf(stderr, "\"%s\", line %d: %s",
static void
usage P((void))
{
- (void) fprintf(stderr,
-"%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d directory ] \n\
+ (void) fprintf(stderr, "%s: usage is %s \
+[ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d directory ]\n\
\t[ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n",
progname, progname);
(void) exit(EXIT_FAILURE);
int argc;
char * argv[];
{
- register int i, j;
+ register int i;
+ register int j;
register int c;
#ifdef unix
- (void) umask(umask(022) | 022);
+ (void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
#endif /* defined unix */
progname = argv[0];
while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != EOF)
myname = ecpyalloc(name);
myname = ecatalloc(myname, "/.");
- accres = access(myname, 0);
+ accres = access(myname, F_OK);
ifree(myname);
return accres == 0;
}
static int
rcomp(cp1, cp2)
-const genericptr_T cp1;
-const genericptr_T cp2;
+const void * cp1;
+const void * cp2;
{
- return strcmp(((struct rule *) cp1)->r_name,
- ((struct rule *) cp2)->r_name);
+ return strcmp(((const struct rule *) cp1)->r_name,
+ ((const struct rule *) cp2)->r_name);
}
static void
register int i;
if (nrules != 0)
- (void) qsort((genericptr_T) rules,
- (qsort_size_T) nrules,
- (qsort_size_T) sizeof *rules, rcomp);
+ (void) qsort((void *) rules, (size_t) nrules,
+ (size_t) sizeof *rules, rcomp);
for (i = 0; i < nzones; ++i) {
zp = &zones[i];
zp->z_rules = NULL;
/*
** Convert a string of one of the forms
-** h -h hh:mm -hh:mm hh:mm:ss -hh:mm:ss
+** h -h hh:mm -hh:mm hh:mm:ss -hh:mm:ss
** into a number of seconds.
** A null string maps to zero.
** Call error with errstring and return zero on errors.
zones[nzones - 1].z_untiltime > min_time &&
zones[nzones - 1].z_untiltime < max_time &&
zones[nzones - 1].z_untiltime >= z.z_untiltime) {
-error("Zone continuation line end time is not after end time of previous line");
+ error("Zone continuation line end time is not \
+after end time of previous line");
return FALSE;
}
}
}
rp->r_month = lp->l_value;
rp->r_todisstd = FALSE;
- rp->r_todisuniv = FALSE;
+ rp->r_todisgmt = FALSE;
dp = ecpyalloc(timep);
if (*dp != '\0') {
ep = dp + strlen(dp) - 1;
switch (lowerit(*ep)) {
case 's': /* Standard */
rp->r_todisstd = TRUE;
- rp->r_todisuniv = FALSE;
+ rp->r_todisgmt = FALSE;
*ep = '\0';
break;
case 'w': /* Wall */
rp->r_todisstd = FALSE;
- rp->r_todisuniv = FALSE;
+ rp->r_todisgmt = FALSE;
*ep = '\0';
case 'g': /* Greenwich */
case 'u': /* Universal */
case 'z': /* Zulu */
rp->r_todisstd = TRUE;
- rp->r_todisuniv = TRUE;
+ rp->r_todisgmt = TRUE;
*ep = '\0';
break;
}
** Year work.
*/
cp = loyearp;
- if ((lp = byword(cp, begin_years)) != NULL) switch ((int) lp->l_value) {
+ lp = byword(cp, begin_years);
+ if (lp != NULL) switch ((int) lp->l_value) {
case YR_MINIMUM:
rp->r_loyear = min_int;
break;
char buf[4];
convert(val, buf);
- (void) fwrite((genericptr_T) buf,
- (fwrite_size_T) sizeof buf,
- (fwrite_size_T) 1, fp);
+ (void) fwrite((void *) buf, (size_t) sizeof buf, (size_t) 1, fp);
}
static void
(void) exit(EXIT_FAILURE);
}
}
+ convert(eitol(typecnt), tzh.tzh_ttisgmtcnt);
convert(eitol(typecnt), tzh.tzh_ttisstdcnt);
convert(eitol(leapcnt), tzh.tzh_leapcnt);
convert(eitol(timecnt), tzh.tzh_timecnt);
convert(eitol(typecnt), tzh.tzh_typecnt);
convert(eitol(charcnt), tzh.tzh_charcnt);
- (void) fwrite((genericptr_T) &tzh,
- (fwrite_size_T) sizeof tzh,
- (fwrite_size_T) 1, fp);
+#define DO(field) (void) fwrite((void *) tzh.field, \
+ (size_t) sizeof tzh.field, (size_t) 1, fp)
+ DO(tzh_reserved);
+ DO(tzh_ttisgmtcnt);
+ DO(tzh_ttisstdcnt);
+ DO(tzh_leapcnt);
+ DO(tzh_timecnt);
+ DO(tzh_typecnt);
+ DO(tzh_charcnt);
+#undef DO
for (i = 0; i < timecnt; ++i) {
j = leapcnt;
while (--j >= 0)
puttzcode((long) ats[i], fp);
}
if (timecnt > 0)
- (void) fwrite((genericptr_T) types,
- (fwrite_size_T) sizeof types[0],
- (fwrite_size_T) timecnt, fp);
+ (void) fwrite((void *) types, (size_t) sizeof types[0],
+ (size_t) timecnt, fp);
for (i = 0; i < typecnt; ++i) {
puttzcode((long) gmtoffs[i], fp);
(void) putc(isdsts[i], fp);
(void) putc(abbrinds[i], fp);
}
if (charcnt != 0)
- (void) fwrite((genericptr_T) chars,
- (fwrite_size_T) sizeof chars[0],
- (fwrite_size_T) charcnt, fp);
+ (void) fwrite((void *) chars, (size_t) sizeof chars[0],
+ (size_t) charcnt, fp);
for (i = 0; i < leapcnt; ++i) {
if (roll[i]) {
if (timecnt == 0 || trans[i] < ats[0]) {
}
for (i = 0; i < typecnt; ++i)
(void) putc(ttisstds[i], fp);
+ for (i = 0; i < typecnt; ++i)
+ (void) putc(ttisgmts[i], fp);
if (ferror(fp) || fclose(fp)) {
(void) fprintf(stderr, "%s: Write error on ", progname);
(void) perror(fullname);
}
static void
+doabbr(abbr, format, letters, isdst)
+char * const abbr;
+const char * const format;
+const char * const letters;
+const int isdst;
+{
+ if (strchr(format, '/') == NULL) {
+ if (letters == NULL)
+ (void) strcpy(abbr, format);
+ else (void) sprintf(abbr, format, letters);
+ } else if (isdst)
+ (void) strcpy(abbr, strchr(format, '/') + 1);
+ else {
+ (void) strcpy(abbr, format);
+ *strchr(abbr, '/') = '\0';
+ }
+}
+
+static void
outzone(zpfirst, zonecount)
const struct zone * const zpfirst;
const int zonecount;
register long startoff;
register int startisdst;
register int startttisstd;
+ register int startttisgmt;
register int type;
char startbuf[BUFSIZ];
** for noting the need to unconditionally initialize startttisstd.
*/
startttisstd = FALSE;
-#ifdef lint
- starttime = 0;
-#endif /* defined lint */
+ startttisgmt = FALSE;
for (i = 0; i < zonecount; ++i) {
zp = &zpfirst[i];
usestart = i > 0 && (zp - 1)->z_untiltime > min_time;
startisdst = -1;
if (zp->z_nrules == 0) {
stdoff = zp->z_stdoff;
- (void) strcpy(startbuf, zp->z_format);
+ doabbr(startbuf, zp->z_format,
+ (char *) NULL, stdoff != 0);
type = addtype(oadd(zp->z_gmtoff, stdoff),
- startbuf, stdoff != 0, startttisstd);
+ startbuf, stdoff != 0, startttisstd,
+ startttisgmt);
if (usestart)
addtt(starttime, type);
else if (stdoff != 0)
** stdoff values.
*/
untiltime = zp->z_untiltime;
- if (!zp->z_untilrule.r_todisuniv)
+ if (!zp->z_untilrule.r_todisgmt)
untiltime = tadd(untiltime,
-gmtoff);
if (!zp->z_untilrule.r_todisstd)
** that takes effect earliest in the year.
*/
k = -1;
-#ifdef lint
- ktime = 0;
-#endif /* defined lint */
for (j = 0; j < zp->z_nrules; ++j) {
rp = &zp->z_rules[j];
if (!rp->r_todo)
continue;
eats(zp->z_filename, zp->z_linenum,
rp->r_filename, rp->r_linenum);
- offset = rp->r_todisuniv ? 0 : gmtoff;
+ offset = rp->r_todisgmt ? 0 : gmtoff;
if (!rp->r_todisstd)
offset = oadd(offset, stdoff);
jtime = rp->r_temp;
stdoff = rp->r_stdoff;
startoff = oadd(zp->z_gmtoff,
rp->r_stdoff);
- (void) sprintf(startbuf, zp->z_format,
- rp->r_abbrvar);
+ doabbr(startbuf, zp->z_format,
+ rp->r_abbrvar,
+ rp->r_stdoff != 0);
startisdst = rp->r_stdoff != 0;
continue;
}
startoff = oadd(startoff,
zp->z_gmtoff);
(void) strcpy(startbuf,
- &chars[abbrinds[type]]);
+ &chars[abbrinds[type]]);
}
if (startisdst >= 0)
-addtt(starttime, addtype(startoff, startbuf, startisdst, startttisstd));
+addtt(starttime, addtype(startoff, startbuf, startisdst, startttisstd,
+ startttisgmt));
}
}
eats(zp->z_filename, zp->z_linenum,
rp->r_filename, rp->r_linenum);
- (void) sprintf(buf, zp->z_format,
- rp->r_abbrvar);
+ doabbr(buf, zp->z_format, rp->r_abbrvar,
+ rp->r_stdoff != 0);
offset = oadd(zp->z_gmtoff, rp->r_stdoff);
type = addtype(offset, buf, rp->r_stdoff != 0,
- rp->r_todisstd);
+ rp->r_todisstd, rp->r_todisgmt);
addtt(ktime, type);
stdoff = rp->r_stdoff;
}
if (useuntil) {
starttime = tadd(zp->z_untiltime, -gmtoff);
startttisstd = zp->z_untilrule.r_todisstd;
+ startttisgmt = zp->z_untilrule.r_todisgmt;
if (!startttisstd)
starttime = tadd(starttime, -stdoff);
}
}
static int
-addtype(gmtoff, abbr, isdst, ttisstd)
+addtype(gmtoff, abbr, isdst, ttisstd, ttisgmt)
const long gmtoff;
const char * const abbr;
const int isdst;
const int ttisstd;
+const int ttisgmt;
{
register int i, j;
for (i = 0; i < typecnt; ++i) {
if (gmtoff == gmtoffs[i] && isdst == isdsts[i] &&
strcmp(abbr, &chars[abbrinds[i]]) == 0 &&
- ttisstd == ttisstds[i])
+ ttisstd == ttisstds[i] &&
+ ttisgmt == ttisgmts[i])
return i;
}
/*
gmtoffs[i] = gmtoff;
isdsts[i] = isdst;
ttisstds[i] = ttisstd;
+ ttisgmts[i] = ttisgmt;
for (j = 0; j < charcnt; ++j)
if (strcmp(&chars[j], abbr) == 0)
*cp = '\0';
#ifndef unix
/*
- ** MS-DOS drive specifier?
+ ** DOS drive specifier?
*/
if (strlen(name) == 2 && isascii(name[0]) &&
isalpha(name[0]) && name[1] == ':') {
/*
** It doesn't seem to exist, so we try to create it.
*/
- if (emkdir(name, 0755) != 0) {
+ if (mkdir(name, 0755) != 0) {
(void) fprintf(stderr,
"%s: Can't create directory ",
progname);