Changeset 95239 in vbox for trunk/src/libs/zlib-1.2.12/contrib/minizip/zip.c
- Timestamp:
- Jun 9, 2022 9:09:44 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151769
- Location:
- trunk/src/libs/zlib-1.2.12
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/zlib-1.2.12
- Property svn:mergeinfo
-
old new 20 20 /branches/dsen/gui3/src/libs/zlib-1.2.11:79645-79692 21 21 /trunk/src/src/libs/zlib-1.2.11:92342 22 /vendor/zlib/1.2.12:151751 23 /vendor/zlib/current:150724-151750
-
- Property svn:mergeinfo
-
trunk/src/libs/zlib-1.2.12/contrib/minizip/zip.c
r76163 r95239 159 159 unsigned long keys[3]; /* keys defining the pseudo-random sequence */ 160 160 const z_crc_t* pcrc_32_tab; 161 intcrypt_header_size;161 unsigned crypt_header_size; 162 162 #endif 163 163 } curfile64_info; … … 302 302 } 303 303 304 if (ZWRITE64(*pzlib_filefunc_def,filestream,buf, nbByte)!=(uLong)nbByte)304 if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,(uLong)nbByte)!=(uLong)nbByte) 305 305 return ZIP_ERRNO; 306 306 else … … 338 338 year-=80; 339 339 return 340 (uLong) ((( ptm->tm_mday) + (32 *(ptm->tm_mon+1)) + (512 * year)) << 16) |341 (( ptm->tm_sec/2) + (32*ptm->tm_min) + (2048 * (uLong)ptm->tm_hour));340 (uLong) (((uLong)(ptm->tm_mday) + (32 * (uLong)(ptm->tm_mon+1)) + (512 * year)) << 16) | 341 (((uLong)ptm->tm_sec/2) + (32 * (uLong)ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); 342 342 } 343 343 … … 523 523 ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) 524 524 { 525 uPosFound = uReadPos+ i;525 uPosFound = uReadPos+(unsigned)i; 526 526 break; 527 527 } 528 528 529 530 529 if (uPosFound!=0) 530 break; 531 531 } 532 532 TRYFREE(buf); … … 587 587 if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) 588 588 { 589 uPosFound = uReadPos+ i;589 uPosFound = uReadPos+(unsigned)i; 590 590 break; 591 591 } … … 638 638 } 639 639 640 int LoadCentralDirectoryRecord(zip64_internal* pziinit)640 local int LoadCentralDirectoryRecord(zip64_internal* pziinit) 641 641 { 642 642 int err=ZIP_OK; … … 956 956 } 957 957 958 int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local)958 local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) 959 959 { 960 960 /* write the local header */ … … 1035 1035 zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); 1036 1036 1037 err = zip64local_putValue(&zi->z_filefunc, zi->filestream, ( short)HeaderID,2);1038 err = zip64local_putValue(&zi->z_filefunc, zi->filestream, ( short)DataSize,2);1037 err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)HeaderID,2); 1038 err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)DataSize,2); 1039 1039 1040 1040 err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); … … 1517 1517 ZPOS64_T compressed_size; 1518 1518 uLong invalidValue = 0xffffffff; 1519 shortdatasize = 0;1519 unsigned datasize = 0; 1520 1520 int err=ZIP_OK; 1521 1521 … … 1753 1753 } 1754 1754 1755 int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)1755 local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) 1756 1756 { 1757 1757 int err = ZIP_OK; … … 1775 1775 } 1776 1776 1777 int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)1777 local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) 1778 1778 { 1779 1779 int err = ZIP_OK; … … 1814 1814 return err; 1815 1815 } 1816 int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)1816 local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) 1817 1817 { 1818 1818 int err = ZIP_OK; … … 1862 1862 } 1863 1863 1864 int Write_GlobalComment(zip64_internal* zi, const char* global_comment)1864 local int Write_GlobalComment(zip64_internal* zi, const char* global_comment) 1865 1865 { 1866 1866 int err = ZIP_OK; … … 1963 1963 return ZIP_PARAMERROR; 1964 1964 1965 pNewHeader = (char*)ALLOC( *dataLen);1965 pNewHeader = (char*)ALLOC((unsigned)*dataLen); 1966 1966 pTmp = pNewHeader; 1967 1967
Note:
See TracChangeset
for help on using the changeset viewer.