<div dir="ltr"><div><div><div><div>And now, the update. These changes arrange things so that binary files include "transition" entries for minimum time values; these entries eliminate localtime guesswork in handling low-valued time stamps.<br>
<br></div>The bad news: binary files grow slightly as a result of these changes.<br>The good news: there are no changes in the output of "zdump -v" applied to<br></div>before-and-after versions of all the binary files generated by a "make install."<br>
<br></div>Changes are attached and appear in mangled form below; these are relative to the github version of zic.c after the rollback in the earlier message today.<br><br></div> @dashdashado<br><br>1.2<br>2805 lines<br>
1.4<br>2813 lines<br>*** /tmp/,azic.c 2014-05-01 01:51:36.998933800 -0400<br>--- /tmp/,bzic.c 2014-05-01 01:51:37.092534000 -0400<br>***************<br>*** 1480,1493 ****<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> gmtoffs[attypes[toi - 1].type]) <=<br>! (attypes[toi - 1].at + gmtoffs[toi == 1 ? 0<br>! : attypes[toi - 2].type]))) {<br>
attypes[toi - 1].type =<br> attypes[fromi].type;<br> continue;<br>--- 1480,1490 ----<br> fromi = 0;<br> while (fromi < timecnt && attypes[fromi].at < min_time)<br>
++fromi;<br> for ( ; fromi < timecnt; ++fromi) {<br>! if (toi > 1 && ((attypes[fromi].at +<br> gmtoffs[attypes[toi - 1].type]) <=<br>! (attypes[toi - 1].at +<br>
! gmtoffs[attypes[toi - 2].type]))) {<br> attypes[toi - 1].type =<br> attypes[fromi].type;<br> continue;<br>***************<br>*** 1532,1537 ****<br>
--- 1529,1541 ----<br> --timecnt32;<br> ++timei32;<br> }<br>+ /*<br>+ ** Output an INT32_MIN "transition" if appropriate--see below.<br>+ */<br>+ if (timei32 > 0 && ats[timei32] > INT32_MIN) {<br>
+ --timei32;<br>+ ++timecnt32;<br>+ }<br> while (leapcnt32 > 0 && !is32(trans[leapcnt32 - 1]))<br> --leapcnt32;<br> while (leapcnt32 > 0 && !is32(trans[leapi32])) {<br>
***************<br>*** 1698,1704 ****<br> #undef DO<br> for (i = thistimei; i < thistimelim; ++i)<br> if (pass == 1)<br>! puttzcode(ats[i], fp);<br> else puttzcode64(ats[i], fp);<br>
for (i = thistimei; i < thistimelim; ++i) {<br> unsigned char uc;<br>--- 1702,1713 ----<br> #undef DO<br> for (i = thistimei; i < thistimelim; ++i)<br> if (pass == 1)<br>
! /*<br>! ** Output an INT32_MIN "transition"<br>! ** if appropriate--see above.<br>! */<br>! puttzcode(((ats[i] < INT32_MIN) ?<br>
! INT32_MIN : ats[i]), fp);<br> else puttzcode64(ats[i], fp);<br> for (i = thistimei; i < thistimelim; ++i) {<br> unsigned char uc;<br>***************<br>*** 2176,2183 ****<br>
if (usestart) {<br> addtt(starttime, type);<br> usestart = FALSE;<br>! } else if (stdoff != 0)<br>! addtt(min_time, type);<br> } else for (year = min_year; year <= max_year; ++year) {<br>
if (useuntil && year > zp->z_untilrule.r_hiyear)<br> break;<br>--- 2185,2191 ----<br> if (usestart) {<br> addtt(starttime, type);<br> usestart = FALSE;<br>
! } else addtt(min_time, type);<br> } else for (year = min_year; year <= max_year; ++year) {<br> if (useuntil && year > zp->z_untilrule.r_hiyear)<br> break;<br>
<br></div>