mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
Vendor import of tzcode2010m
Obtained from: ftp://elsie.nci.nih.gov/pub/
This commit is contained in:
parent
dfca6b5ed7
commit
f9a3308029
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/tzcode/dist/; revision=213319 svn path=/vendor/tzcode/tzcode2010m/; revision=213320; tag=vendor/tzcode/tzcode2010m
48
zic/zic.c
48
zic/zic.c
@ -3,7 +3,7 @@
|
||||
** 2006-07-17 by Arthur David Olson.
|
||||
*/
|
||||
|
||||
static char elsieid[] = "@(#)zic.c 8.20";
|
||||
static char elsieid[] = "@(#)zic.c 8.22";
|
||||
|
||||
#include "private.h"
|
||||
#include "locale.h"
|
||||
@ -1621,6 +1621,52 @@ const char * const string;
|
||||
if (thistimei == 0)
|
||||
writetype[0] = TRUE;
|
||||
}
|
||||
#ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH
|
||||
/*
|
||||
** For some pre-2011 systems: if the last-to-be-written
|
||||
** standard (or daylight) type has an offset different from the
|
||||
** most recently used offset,
|
||||
** append an (unused) copy of the most recently used type
|
||||
** (to help get global "altzone" and "timezone" variables
|
||||
** set correctly).
|
||||
*/
|
||||
{
|
||||
register int mrudst, mrustd, hidst, histd, type;
|
||||
|
||||
hidst = histd = mrudst = mrustd = -1;
|
||||
for (i = thistimei; i < thistimelim; ++i)
|
||||
if (isdsts[types[i]])
|
||||
mrudst = types[i];
|
||||
else mrustd = types[i];
|
||||
for (i = 0; i < typecnt; ++i)
|
||||
if (writetype[i])
|
||||
if (isdsts[i])
|
||||
hidst = i;
|
||||
else histd = i;
|
||||
if (hidst >= 0 && mrudst >= 0 && hidst != mrudst &&
|
||||
gmtoffs[hidst] != gmtoffs[mrudst]) {
|
||||
isdsts[mrudst] = -1;
|
||||
type = addtype(gmtoffs[mrudst],
|
||||
&chars[abbrinds[mrudst]],
|
||||
TRUE,
|
||||
ttisstds[mrudst],
|
||||
ttisgmts[mrudst]);
|
||||
isdsts[mrudst] = TRUE;
|
||||
writetype[type] = TRUE;
|
||||
}
|
||||
if (histd >= 0 && mrustd >= 0 && histd != mrustd &&
|
||||
gmtoffs[histd] != gmtoffs[mrustd]) {
|
||||
isdsts[mrustd] = -1;
|
||||
type = addtype(gmtoffs[mrustd],
|
||||
&chars[abbrinds[mrustd]],
|
||||
FALSE,
|
||||
ttisstds[mrustd],
|
||||
ttisgmts[mrustd]);
|
||||
isdsts[mrustd] = FALSE;
|
||||
writetype[type] = TRUE;
|
||||
}
|
||||
}
|
||||
#endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */
|
||||
thistypecnt = 0;
|
||||
for (i = 0; i < typecnt; ++i)
|
||||
typemap[i] = writetype[i] ? thistypecnt++ : -1;
|
||||
|
Loading…
Reference in New Issue
Block a user