/ Check-in [ac6a3248]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Move variable declaration in zipfile extension to fix MSVC compiler error.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ac6a32482e675871c3ce5ecc727e50e4bba649e80e3c55bf99025fed5667da94
User & Date: mistachkin 2018-02-04 01:29:01
Context
2018-02-04
01:30
Fix harmless compiler warning seen with MSVC. check-in: 63a91441 user: mistachkin tags: trunk
01:29
Move variable declaration in zipfile extension to fix MSVC compiler error. check-in: ac6a3248 user: mistachkin tags: trunk
2018-02-02
16:28
Remove the "include <io.h>" win32 dependency from the zipfile extension. check-in: cb3feb3b user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/zipfile.c.

   697    697     int M = ((pCDS->mDate >> 5) & 0x0F);
   698    698     int D = (pCDS->mDate & 0x1F);
   699    699     int B = -13;
   700    700   
   701    701     int sec = (pCDS->mTime & 0x1F)*2;
   702    702     int min = (pCDS->mTime >> 5) & 0x3F;
   703    703     int hr = (pCDS->mTime >> 11) & 0x1F;
          704  +  i64 JD;
   704    705   
   705    706     /* JD = INT(365.25 * (Y+4716)) + INT(30.6001 * (M+1)) + D + B - 1524.5 */
   706    707   
   707    708     /* Calculate the JD in seconds for noon on the day in question */
   708    709     if( M<3 ){
   709    710       Y = Y-1;
   710    711       M = M+12;
   711    712     }
   712         -  i64 JD = (i64)(24*60*60) * (
          713  +  JD = (i64)(24*60*60) * (
   713    714         (int)(365.25 * (Y + 4716))
   714    715       + (int)(30.6001 * (M + 1))
   715    716       + D + B - 1524
   716    717     );
   717    718   
   718    719     /* Correct the JD for the time within the day */
   719    720     JD += (hr-12) * 3600 + min * 60 + sec;