<div dir="ltr"><div><div><div><div>A possibility mentioned last year at the time of the Macquarie fix:<br></div>here's a more general fix for zic.c. For clarity, it comes in two pieces.<br></div>This first piece simply rolls back the Macquarie-specific changes to zic.c;<br>
</div>it's both attached and appears in mangled form below. These changes are<br>relative to the git repository version.<br><br></div> @dashdashado<br><br>1.1<br>2838 lines<br>1.2<br>2805 lines<br>*** /tmp/,azic.c 2014-05-01 01:51:26.531315400 -0400<br>
--- /tmp/,bzic.c 2014-05-01 01:51:26.640515600 -0400<br>***************<br>*** 1480,1490 ****<br> fromi = 0;<br> while (fromi < timecnt && attypes[fromi].at < min_time)<br> ++fromi;<br>
! /*<br>! ** Remember that type 0 is reserved.<br>! */<br>! if (isdsts[1] == 0)<br>! while (fromi < timecnt && attypes[fromi].type == 1)<br> ++fromi; /* handled by default rule */<br>
for ( ; fromi < timecnt; ++fromi) {<br> if (toi != 0 && ((attypes[fromi].at +<br>--- 1480,1487 ----<br> fromi = 0;<br> while (fromi < timecnt && attypes[fromi].at < min_time)<br>
++fromi;<br>! if (isdsts[0] == 0)<br>! while (fromi < timecnt && attypes[fromi].type == 0)<br> ++fromi; /* handled by default rule */<br> for ( ; fromi < timecnt; ++fromi) {<br>
if (toi != 0 && ((attypes[fromi].at +<br>***************<br>*** 1589,1599 ****<br> }<br> thistimelim = thistimei + thistimecnt;<br> thisleaplim = thisleapi + thisleapcnt;<br>
! /*<br>! ** Remember that type 0 is reserved.<br>! */<br>! writetype[0] = FALSE;<br>! for (i = 1; i < typecnt; ++i)<br> writetype[i] = thistimecnt == timecnt;<br> if (thistimecnt == 0) {<br>
/*<br>--- 1586,1592 ----<br> }<br> thistimelim = thistimei + thistimecnt;<br> thisleaplim = thisleapi + thisleapcnt;<br>! for (i = 0; i < typecnt; ++i)<br> writetype[i] = thistimecnt == timecnt;<br>
if (thistimecnt == 0) {<br> /*<br>***************<br>*** 1609,1619 ****<br> /*<br> ** For America/Godthab and Antarctica/Palmer<br> */<br>- /*<br>- ** Remember that type 0 is reserved.<br>
- */<br> if (thistimei == 0)<br>! writetype[1] = TRUE;<br> }<br> #ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH<br> /*<br>--- 1602,1609 ----<br> /*<br>
** For America/Godthab and Antarctica/Palmer<br> */<br> if (thistimei == 0)<br>! writetype[0] = TRUE;<br> }<br> #ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH<br>
/*<br>***************<br>*** 1663,1688 ****<br> }<br> #endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */<br> thistypecnt = 0;<br>- /*<br>- ** Potentially, set type 0 to that of lowest-valued time.<br>
- */<br>- if (thistimei > 0) {<br>- for (i = 1; i < typecnt; ++i)<br>- if (writetype[i] && !isdsts[i])<br>- break;<br>- if (i != types[thistimei - 1]) {<br>
- i = types[thistimei - 1];<br>- gmtoffs[0] = gmtoffs[i];<br>- isdsts[0] = isdsts[i];<br>- ttisstds[0] = ttisstds[i];<br>- ttisgmts[0] = ttisgmts[i];<br>
- abbrinds[0] = abbrinds[i];<br>- writetype[0] = TRUE;<br>- writetype[i] = FALSE;<br>- }<br>- }<br> for (i = 0; i < typecnt; ++i)<br>! typemap[i] = writetype[i] ? thistypecnt++ : 0;<br>
for (i = 0; i < sizeof indmap / sizeof indmap[0]; ++i)<br> indmap[i] = -1;<br> thischarcnt = 0;<br>--- 1653,1660 ----<br> }<br> #endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */<br>
thistypecnt = 0;<br> for (i = 0; i < typecnt; ++i)<br>! typemap[i] = writetype[i] ? thistypecnt++ : -1;<br> for (i = 0; i < sizeof indmap / sizeof indmap[0]; ++i)<br> indmap[i] = -1;<br>
thischarcnt = 0;<br>***************<br>*** 2105,2115 ****<br> updateminmax(leapminyear);<br> updateminmax(leapmaxyear + (leapmaxyear < ZIC_MAX));<br> }<br>- /*<br>- ** Reserve type 0.<br>
- */<br>- gmtoffs[0] = isdsts[0] = ttisstds[0] = ttisgmts[0] = abbrinds[0] = -1;<br>- typecnt = 1;<br> for (i = 0; i < zonecount; ++i) {<br> zp = &zpfirst[i];<br> if (i < zonecount - 1)<br>
--- 2077,2082 ----<br><br></div>