[PATCH 1/3] * tzfile.5 (SEE ALSO): Mention zdump(8), zic(8).
--- tzfile.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tzfile.5 b/tzfile.5 index 4089910..69b9e8b 100644 --- a/tzfile.5 +++ b/tzfile.5 @@ -151,6 +151,6 @@ between daylight saving and standard time. .PP Future changes to the format may append more data. .SH SEE ALSO -newctime(3), newtzset(3) +newctime(3), newtzset(3), zdump(8), zic(8) .\" This file is in the public domain, so clarified as of .\" 1996-06-05 by Arthur David Olson. -- 1.8.3.1
On 09/15/2013 11:23 AM, Michael Deckers wrote:
"one or more" seems to be meant rather than "any number"
Thanks, I pushed the following: ===== Problem reported by Michael Deckers in <http://mm.icann.org/pipermail/tz/2013-September/020206.html>. --- zic.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zic.8 b/zic.8 index 7ea94c5..ca29fd1 100644 --- a/zic.8 +++ b/zic.8 @@ -127,7 +127,7 @@ rather than when checking year types (see below). .PP Input lines are made up of fields. -Fields are separated from one another by any number of white space characters. +Fields are separated from one another by one or more white space characters. Leading and trailing white space on input lines is ignored. An unquoted sharp character (#) in the input introduces a comment which extends to the end of the line the sharp character appears on. -- 1.8.3.1
We don't know of any clients where this makes a difference, but it is a more-conservative change, as in theory older clients could reject version-3 format files merely because of the version number. (ZIC_VERSION_PRE_2013): New macro. (writezone): New arg 'version'. All callers changed. (outzone): Output version-2 format files unless the capabilities of version 3 are used. --- zic.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zic.c b/zic.c index 9939195..7e231b5 100644 --- a/zic.c +++ b/zic.c @@ -10,6 +10,7 @@ #include <stdarg.h> +#define ZIC_VERSION_PRE_2013 '2' #define ZIC_VERSION '3' typedef int_fast64_t zic_t; @@ -1386,7 +1387,7 @@ is32(const zic_t x) } static void -writezone(const char *const name, const char *const string) +writezone(const char *const name, const char *const string, char version) { register FILE * fp; register int i, j; @@ -1639,7 +1640,7 @@ writezone(const char *const name, const char *const string) #define DO(field) ((void) fwrite(tzh.field, sizeof tzh.field, 1, fp)) tzh = tzh0; (void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic); - tzh.tzh_version[0] = ZIC_VERSION; + tzh.tzh_version[0] = version; convert(thistypecnt, tzh.tzh_ttisgmtcnt); convert(thistypecnt, tzh.tzh_ttisstdcnt); convert(thisleapcnt, tzh.tzh_leapcnt); @@ -2009,6 +2010,7 @@ outzone(const struct zone * const zpfirst, const int zonecount) register int prodstic; /* all rules are min to max */ register int compat; register int do_extend; + register char version; max_abbr_len = 2 + max_format_len + max_abbrvar_len; max_envvar_len = 2 * max_abbr_len + 5 * 9; @@ -2058,6 +2060,7 @@ outzone(const struct zone * const zpfirst, const int zonecount) ** Generate lots of data if a rule can't cover all future times. */ compat = stringzone(envvar, zpfirst, zonecount); + version = compat < 2013 ? ZIC_VERSION_PRE_2013 : ZIC_VERSION; do_extend = compat < 0 || compat == YEAR_BY_YEAR_ZONE; if (noise && compat != 0 && compat != YEAR_BY_YEAR_ZONE) { if (compat < 0) @@ -2307,7 +2310,7 @@ error(_("can't determine time zone abbreviation to use just after until time")); addtt(rpytime(&xr, max_year + 1), typecnt-1); } } - writezone(zpfirst->z_name, envvar); + writezone(zpfirst->z_name, envvar, version); free(startbuf); free(ab); free(envvar); -- 1.8.3.1
participants (1)
-
Paul Eggert