// 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
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;