[mupen64plus-core] 117/310: Reformat new_minizip.patch
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:57:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.
commit c6d8f852e7919fc51429cce968ea970761c344bc
Author: Sven Eckelmann <sven at narfation.org>
Date: Fri Oct 14 21:34:30 2011 +0200
Reformat new_minizip.patch
---
debian/patches/new_minizip.patch | 70 ++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 38 deletions(-)
diff --git a/debian/patches/new_minizip.patch b/debian/patches/new_minizip.patch
index 0db7b67..b087f4f 100644
--- a/debian/patches/new_minizip.patch
+++ b/debian/patches/new_minizip.patch
@@ -3497,34 +3497,13 @@ index 9daaecbdc43571b98b2227fabb4ad59be6e02cfd..3c34fc8bd4925ae4efd0527018bd95c3
- else
- uBackRead+=BUFREADCOMMENT;
- uReadPos = uSizeFile-uBackRead ;
--
-- uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-- (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
-- if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-- break;
--
-- if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
-- break;
--
-- for (i=(int)uReadSize-3; (i--)>0;)
-- if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
-- ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
-- {
-- uPosFound = uReadPos+i;
-- break;
-- }
--
-- if (uPosFound!=0)
-- break;
+ // Signature "0x07064b50" Zip64 end of central directory locater
+ if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
+ {
+ uPosFound = uReadPos+i;
+ break;
+ }
- }
-- TRYFREE(buf);
-- return uPosFound;
++ }
+
+ if (uPosFound!=0)
+ break;
@@ -3570,7 +3549,7 @@ index 9daaecbdc43571b98b2227fabb4ad59be6e02cfd..3c34fc8bd4925ae4efd0527018bd95c3
+ return 0;
+
+ return relativeOffset;
- }
++}
+
+int LoadCentralDirectoryRecord(zip64_internal* pziinit)
+{
@@ -3611,21 +3590,36 @@ index 9daaecbdc43571b98b2227fabb4ad59be6e02cfd..3c34fc8bd4925ae4efd0527018bd95c3
+ if (central_pos==0)
+ err=ZIP_ERRNO;
+*/
-+
+
+- uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+- (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
+- if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+- break;
+ if(hasZIP64Record)
+ {
+ ZPOS64_T sizeEndOfCentralDirectory;
+ if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)
+ err=ZIP_ERRNO;
-+
+
+- if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+- break;
+ /* the signature, already checked */
+ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)
+ err=ZIP_ERRNO;
-+
+
+- for (i=(int)uReadSize-3; (i--)>0;)
+- if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
+- ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
+- {
+- uPosFound = uReadPos+i;
+- break;
+- }
+ /* size of zip64 end of central directory record */
+ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK)
+ err=ZIP_ERRNO;
-+
+
+- if (uPosFound!=0)
+- break;
+ /* version made by */
+ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK)
+ err=ZIP_ERRNO;
@@ -3738,7 +3732,9 @@ index 9daaecbdc43571b98b2227fabb4ad59be6e02cfd..3c34fc8bd4925ae4efd0527018bd95c3
+ {
+ size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment);
+ pziinit->globalcomment[size_comment]=0;
-+ }
+ }
+- TRYFREE(buf);
+- return uPosFound;
+ }
+
+ byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir);
@@ -3774,7 +3770,7 @@ index 9daaecbdc43571b98b2227fabb4ad59be6e02cfd..3c34fc8bd4925ae4efd0527018bd95c3
+ err=ZIP_ERRNO;
+
+ return err;
-+}
+ }
+
+
#endif /* !NO_ADDFILEINEXISTINGZIP*/
@@ -4254,12 +4250,17 @@ index 9daaecbdc43571b98b2227fabb4ad59be6e02cfd..3c34fc8bd4925ae4efd0527018bd95c3
- /* write the local header */
- err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4);
--
++ zi->ci.zip64 = zip64;
++ zi->ci.totalCompressedData = 0;
++ zi->ci.totalUncompressedData = 0;
++ zi->ci.pos_zip64extrainfo = 0;
+
- if (err==ZIP_OK)
- err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */
- if (err==ZIP_OK)
- err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2);
--
++ err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local);
+
- if (err==ZIP_OK)
- err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2);
-
@@ -4287,13 +4288,6 @@ index 9daaecbdc43571b98b2227fabb4ad59be6e02cfd..3c34fc8bd4925ae4efd0527018bd95c3
- if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local)
- !=size_extrafield_local)
- err = ZIP_ERRNO;
-+ zi->ci.zip64 = zip64;
-+ zi->ci.totalCompressedData = 0;
-+ zi->ci.totalUncompressedData = 0;
-+ zi->ci.pos_zip64extrainfo = 0;
-+
-+ err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local);
-+
+#ifdef HAVE_BZIP2
+ zi->ci.bstream.avail_in = (uInt)0;
+ zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git
More information about the Pkg-games-commits
mailing list