#include <string.h>
#include <stdlib.h>
#include <zlib.h>
-#ifndef _WIN32
-#define CALLBACK
-#ifndef NO_DYLIB
+#if !defined(_WIN32) && !defined(NO_DYLIB)
#include <dlfcn.h>
#endif
-#else
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
#include "cdrcimg.h"
+#undef CALLBACK
+#define CALLBACK
+
#define PFX "cdrcimg: "
#define err(f, ...) fprintf(stderr, PFX f, ##__VA_ARGS__)
return 0;
}
-int uncomp2(void *out, unsigned long *out_size, void *in, unsigned long in_size)
+static int uncompress2_pcsx(void *out, unsigned long *out_size, void *in, unsigned long in_size)
{
static z_stream z;
int ret = 0;
ret = uncompress(cdbuffer->raw[0], &cdbuffer_size, cdbuffer->compressed, size);
break;
case CDRC_ZLIB2:
- ret = uncomp2(cdbuffer->raw[0], &cdbuffer_size, cdbuffer->compressed, size);
+ ret = uncompress2_pcsx(cdbuffer->raw[0], &cdbuffer_size, cdbuffer->compressed, size);
break;
case CDRC_BZ:
ret = pBZ2_bzBuffToBuffDecompress((char *)cdbuffer->raw, (unsigned int *)&cdbuffer_size,
char *ext;
FILE *f = NULL;
+ printf("%s cd_file=%d\n", __func__, cd_file == NULL ? 0 : 1);
+
if (cd_file != NULL)
return 0; // it's already open