summaryrefslogtreecommitdiffstats
path: root/compat/zlib/contrib/minizip/mztools.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/zlib/contrib/minizip/mztools.c')
-rw-r--r--compat/zlib/contrib/minizip/mztools.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/compat/zlib/contrib/minizip/mztools.c b/compat/zlib/contrib/minizip/mztools.c
index 8a50ee4..f9092e6 100644
--- a/compat/zlib/contrib/minizip/mztools.c
+++ b/compat/zlib/contrib/minizip/mztools.c
@@ -62,7 +62,7 @@ uLong* bytesRecovered;
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;
@@ -70,7 +70,7 @@ uLong* bytesRecovered;
err = Z_ERRNO;
break;
}
-
+
/* Filename */
if (fnsize > 0) {
if (fread(filename, 1, fnsize, fpZip) == fnsize) {
@@ -103,7 +103,7 @@ uLong* bytesRecovered;
break;
}
}
-
+
/* Data */
{
int dataSize = cpsize;
@@ -133,7 +133,7 @@ uLong* bytesRecovered;
}
}
}
-
+
/* Central directory entry */
{
char header[46];
@@ -159,7 +159,7 @@ uLong* bytesRecovered;
/* Header */
if (fwrite(header, 1, 46, fpOutCD) == 46) {
offsetCD += 46;
-
+
/* Filename */
if (fnsize > 0) {
if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) {
@@ -172,7 +172,7 @@ uLong* bytesRecovered;
err = Z_STREAM_ERROR;
break;
}
-
+
/* Extra field */
if (extsize > 0) {
if (fwrite(extra, 1, extsize, fpOutCD) == extsize) {
@@ -182,7 +182,7 @@ uLong* bytesRecovered;
break;
}
}
-
+
/* Comment field */
if (comsize > 0) {
if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) {
@@ -192,8 +192,8 @@ uLong* bytesRecovered;
break;
}
}
-
-
+
+
} else {
err = Z_ERRNO;
break;
@@ -225,17 +225,17 @@ uLong* bytesRecovered;
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;
}
@@ -257,14 +257,14 @@ uLong* bytesRecovered;
fclose(fpOutCD);
}
}
-
+
/* Close */
fclose(fpZip);
fclose(fpOut);
-
+
/* Wipe temporary file */
(void)remove(fileOutTmp);
-
+
/* Number of recovered entries */
if (err == Z_OK) {
if (nRecovered != NULL) {