|
176 | 176 |
|
177 | 177 |
|
178 | 178 |
|
179 |
| -/* Defines to completely disable specific portions of miniz.c: |
| 179 | +/* Defines to completely disable specific portions of miniz.c: |
180 | 180 | If all macros here are defined the only functionality remaining will be CRC-32, adler-32, tinfl, and tdefl. */
|
181 | 181 |
|
182 | 182 | /* Define MINIZ_NO_STDIO to disable all usage and any functions which rely on stdio for file I/O. */
|
|
199 | 199 | /* Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent conflicts against stock zlib. */
|
200 | 200 | /*#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES */
|
201 | 201 |
|
202 |
| -/* Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc. |
| 202 | +/* Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc. |
203 | 203 | Note if MINIZ_NO_MALLOC is defined then the user must always provide custom user alloc/free/realloc
|
204 | 204 | callbacks to the zlib and archive API's, and a few stand-alone helper API's which don't provide custom user
|
205 | 205 | functions (such as tdefl_compress_mem_to_heap() and tinfl_decompress_mem_to_heap()) won't work. */
|
@@ -523,19 +523,20 @@ typedef void *const voidpc;
|
523 | 523 | #include <stdlib.h>
|
524 | 524 | #include <string.h>
|
525 | 525 | #include <stdint.h>
|
| 526 | +#include <stdbool.h> |
526 | 527 |
|
527 | 528 | /* ------------------- Types and macros */
|
528 |
| -typedef unsigned char mz_uint8; |
529 |
| -typedef signed short mz_int16; |
530 |
| -typedef unsigned short mz_uint16; |
531 |
| -typedef unsigned int mz_uint32; |
| 529 | +typedef uint8_t mz_uint8; |
| 530 | +typedef int16_t mz_int16; |
| 531 | +typedef uint16_t mz_uint16; |
| 532 | +typedef uint32_t mz_uint32; |
532 | 533 | typedef unsigned int mz_uint;
|
533 | 534 | typedef int64_t mz_int64;
|
534 | 535 | typedef uint64_t mz_uint64;
|
535 |
| -typedef int mz_bool; |
| 536 | +typedef bool mz_bool; |
536 | 537 |
|
537 |
| -#define MZ_FALSE (0) |
538 |
| -#define MZ_TRUE (1) |
| 538 | +#define MZ_FALSE false |
| 539 | +#define MZ_TRUE true |
539 | 540 |
|
540 | 541 | /* Works around MSVC's spammy "warning C4127: conditional expression is constant" message. */
|
541 | 542 | #ifdef _MSC_VER
|
@@ -1195,7 +1196,7 @@ mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, cha
|
1195 | 1196 | /* Valid flags: MZ_ZIP_FLAG_CASE_SENSITIVE, MZ_ZIP_FLAG_IGNORE_PATH */
|
1196 | 1197 | /* Returns -1 if the file cannot be found. */
|
1197 | 1198 | int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
|
1198 |
| -int mz_zip_reader_locate_file_v2(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags, mz_uint32 *file_index); |
| 1199 | +mz_bool mz_zip_reader_locate_file_v2(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags, mz_uint32 *file_index); |
1199 | 1200 |
|
1200 | 1201 | /* Returns detailed information about an archive file entry. */
|
1201 | 1202 | mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat);
|
|
0 commit comments