Skip to content

Commit 530377d

Browse files
Removing references to zip
1 parent 375bf30 commit 530377d

File tree

3 files changed

+986
-929
lines changed

3 files changed

+986
-929
lines changed

src/dos/dos_programs.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9166,11 +9166,14 @@ void START_ProgramStart(Program **make)
91669166
char *g_flagged_files[MAX_FLAGS]; //global array to hold flagged files
91679167
int flagged_backup(char *zip)
91689168
{
9169+
91699170
unsigned char buffer[4096];
91709171
char zipfile[CROSS_LEN];
91719172
int ret = 0;
91729173
int i;
91739174

9175+
#ifdef C_LIBZ
9176+
91749177
bool compresssaveparts = static_cast<Section_prop *>(control->GetSection("dosbox"))->Get_bool("compresssaveparts");
91759178

91769179
strcpy(zipfile, zip);
@@ -9224,6 +9227,8 @@ int flagged_backup(char *zip)
92249227
}
92259228
}
92269229

9230+
#endif
9231+
92279232
return ret;
92289233
}
92299234

@@ -9235,6 +9240,8 @@ int flagged_restore(char* zip)
92359240
int ret = 0;
92369241
int i;
92379242

9243+
#ifdef C_LIBZ
9244+
92389245
strcpy(zipfile, zip);
92399246
if (strstr(zipfile, ".sav"))
92409247
strcpy(strstr(zipfile, ".sav"), ".dat");
@@ -9286,6 +9293,8 @@ int flagged_restore(char* zip)
92869293
}
92879294
}
92889295

9296+
#endif
9297+
92899298
return ret;
92909299
}
92919300

src/libs/libchdr/libchdr_chd.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3040,6 +3040,8 @@ static chd_error metadata_find_entry(chd_file *chd, uint32_t metatag, uint32_t m
30403040

30413041
static chd_error zlib_codec_init(void *codec, uint32_t hunkbytes)
30423042
{
3043+
#ifdef C_LIBZ
3044+
30433045
int zerr;
30443046
chd_error err;
30453047
zlib_codec_data *data = (zlib_codec_data*)codec;
@@ -3064,6 +3066,10 @@ static chd_error zlib_codec_init(void *codec, uint32_t hunkbytes)
30643066
err = CHDERR_NONE;
30653067

30663068
return err;
3069+
3070+
#endif
3071+
3072+
return CHDERR_COMPRESSION_ERROR;
30673073
}
30683074

30693075
/*-------------------------------------------------
@@ -3073,6 +3079,8 @@ static chd_error zlib_codec_init(void *codec, uint32_t hunkbytes)
30733079

30743080
static void zlib_codec_free(void *codec)
30753081
{
3082+
#ifdef C_LIBZ
3083+
30763084
zlib_codec_data *data = (zlib_codec_data *)codec;
30773085

30783086
/* deinit the streams */
@@ -3083,6 +3091,8 @@ static void zlib_codec_free(void *codec)
30833091
/* free our fast memory */
30843092
zlib_allocator_free(&data->allocator);
30853093
}
3094+
3095+
#endif
30863096
}
30873097

30883098
/*-------------------------------------------------
@@ -3092,6 +3102,9 @@ static void zlib_codec_free(void *codec)
30923102

30933103
static chd_error zlib_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen)
30943104
{
3105+
3106+
#ifdef C_LIBZ
3107+
30953108
zlib_codec_data *data = (zlib_codec_data *)codec;
30963109
int zerr;
30973110

@@ -3112,6 +3125,10 @@ static chd_error zlib_codec_decompress(void *codec, const uint8_t *src, uint32_t
31123125
return CHDERR_DECOMPRESSION_ERROR;
31133126

31143127
return CHDERR_NONE;
3128+
3129+
#endif
3130+
3131+
return CHDERR_COMPRESSION_ERROR;
31153132
}
31163133

31173134
/*-------------------------------------------------
@@ -3125,6 +3142,8 @@ static chd_error zlib_codec_decompress(void *codec, const uint8_t *src, uint32_t
31253142

31263143
static voidpf zlib_fast_alloc(voidpf opaque, uInt items, uInt size)
31273144
{
3145+
#ifdef C_LIBZ
3146+
31283147
zlib_allocator *alloc = (zlib_allocator *)opaque;
31293148
uintptr_t paddr = 0;
31303149
uint32_t *ptr;
@@ -3167,6 +3186,10 @@ static voidpf zlib_fast_alloc(voidpf opaque, uInt items, uInt size)
31673186

31683187
/* return aligned block address */
31693188
return (voidpf)paddr;
3189+
3190+
#endif
3191+
3192+
return nullptr;
31703193
}
31713194

31723195
/*-------------------------------------------------
@@ -3176,6 +3199,8 @@ static voidpf zlib_fast_alloc(voidpf opaque, uInt items, uInt size)
31763199

31773200
static void zlib_fast_free(voidpf opaque, voidpf address)
31783201
{
3202+
#ifdef C_LIBZ
3203+
31793204
zlib_allocator *alloc = (zlib_allocator *)opaque;
31803205
uint32_t *ptr = (uint32_t *)address;
31813206
int i;
@@ -3188,19 +3213,25 @@ static void zlib_fast_free(voidpf opaque, voidpf address)
31883213
*(alloc->allocptr[i]) &= ~1;
31893214
return;
31903215
}
3216+
3217+
#endif
31913218
}
31923219

31933220
/*-------------------------------------------------
31943221
zlib_allocator_free
31953222
-------------------------------------------------*/
31963223
static void zlib_allocator_free(voidpf opaque)
31973224
{
3225+
#ifdef C_LIBZ
3226+
31983227
zlib_allocator *alloc = (zlib_allocator *)opaque;
31993228
int i;
32003229

32013230
for (i = 0; i < MAX_ZLIB_ALLOCS; i++)
32023231
if (alloc->allocptr[i])
32033232
free(alloc->allocptr[i]);
3233+
3234+
#endif
32043235
}
32053236

32063237
/*-------------------------------------------------

0 commit comments

Comments
 (0)