Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: third_party/zlib/contrib/minizip/mztools.c

Issue 8806004: Update zlib to 1.2.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/zlib/contrib/minizip/mztools.h ('k') | third_party/zlib/contrib/minizip/unzip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/contrib/minizip/mztools.c
===================================================================
--- third_party/zlib/contrib/minizip/mztools.c (revision 113739)
+++ third_party/zlib/contrib/minizip/mztools.c (working copy)
@@ -8,7 +8,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
#if defined(USE_SYSTEM_ZLIB)
#include <zlib.h>
#else
@@ -67,7 +66,7 @@
unsigned int fnsize = READ_16(header + 26); /* file name length */
unsigned int extsize = READ_16(header + 28); /* extra field length */
filename[0] = extra[0] = '\0';
-
+
/* Header */
if (fwrite(header, 1, 30, fpOut) == 30) {
offset += 30;
@@ -75,7 +74,7 @@
err = Z_ERRNO;
break;
}
-
+
/* Filename */
if (fnsize > 0) {
if (fread(filename, 1, fnsize, fpZip) == fnsize) {
@@ -108,7 +107,7 @@
break;
}
}
-
+
/* Data */
{
int dataSize = cpsize;
@@ -138,7 +137,7 @@
}
}
}
-
+
/* Central directory entry */
{
char header[46];
@@ -164,7 +163,7 @@
/* Header */
if (fwrite(header, 1, 46, fpOutCD) == 46) {
offsetCD += 46;
-
+
/* Filename */
if (fnsize > 0) {
if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) {
@@ -177,7 +176,7 @@
err = Z_STREAM_ERROR;
break;
}
-
+
/* Extra field */
if (extsize > 0) {
if (fwrite(extra, 1, extsize, fpOutCD) == extsize) {
@@ -187,7 +186,7 @@
break;
}
}
-
+
/* Comment field */
if (comsize > 0) {
if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) {
@@ -197,8 +196,8 @@
break;
}
}
-
-
+
+
} else {
err = Z_ERRNO;
break;
@@ -230,17 +229,17 @@
WRITE_32(header + 12, offsetCD); /* size of CD */
WRITE_32(header + 16, offset); /* offset to CD */
WRITE_16(header + 20, comsize); /* comment */
-
+
/* Header */
if (fwrite(header, 1, 22, fpOutCD) == 22) {
-
+
/* Comment field */
if (comsize > 0) {
if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) {
err = Z_ERRNO;
}
}
-
+
} else {
err = Z_ERRNO;
}
@@ -262,14 +261,14 @@
fclose(fpOutCD);
}
}
-
+
/* Close */
fclose(fpZip);
fclose(fpOut);
-
+
/* Wipe temporary file */
(void)remove(fileOutTmp);
-
+
/* Number of recovered entries */
if (err == Z_OK) {
if (nRecovered != NULL) {
« no previous file with comments | « third_party/zlib/contrib/minizip/mztools.h ('k') | third_party/zlib/contrib/minizip/unzip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698