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) { |