]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/unzip.c
Added bits & pieces to allow cross compilation under MXE.
[virtualjaguar] / src / unzip.c
index 509da18e1a1730ca01201a22b99d8c9fecad9867..e28e7d44d519c15117b0225c903e42a6127fcdef 100644 (file)
@@ -2,10 +2,10 @@
 // ZIP file support (mostly ripped from MAME--thx MAME team!)
 // Mostly this is here to simplify interfacing to zlib...
 //
-// Added by James L. Hammons
+// Added by James Hammons
 // (C) 2010 Underground Software
 //
-// JLH = James L. Hammons <jlhamm@acm.org>
+// JLH = James Hammons <jlhamm@acm.org>
 //
 // Who  When        What
 // ---  ----------  -------------------------------------------------------------
 // JLH  02/28/2010  Removed unnecessary cruft
 //
 
+#include "unzip.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 #include <assert.h>
 #include <zlib.h>
-
-#include "unzip.h"
 #include "log.h"
 
 /* public globals */
 int    gUnzipQuiet = 0;                /* flag controls error messages */
 
 
-#define ERROR_CORRUPT "The zipfile seems to be corrupt, please check it"
-#define ERROR_FILESYSTEM "Your filesystem seems to be corrupt, please check it"
+#define ERROR_CORRUPT     "The zipfile seems to be corrupt, please check it"
+#define ERROR_FILESYSTEM  "Your filesystem seems to be corrupt, please check it"
 #define ERROR_UNSUPPORTED "The format of this zipfile is not supported, please recompress it"
 
 #define INFLATE_INPUT_BUFFER_MAX 16384
@@ -120,7 +120,7 @@ static int ecd_read(ZIP * zip)
                        return -1;
                }
 
-               if (fread(buf, 1, buf_length, zip->fp) != buf_length)
+               if (fread(buf, 1, buf_length, zip->fp) != (unsigned int)buf_length)
                {
                        free(buf);
                        return -1;