From: <lab...@us...> - 2018-12-09 16:15:04
|
Revision: 1553 http://sourceforge.net/p/opengtoolkit/svn/1553 Author: labviewer Date: 2018-12-09 16:15:03 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Fix several small errors caused by new code Modified Paths: -------------- trunk/lvzip/c_source/compress.c trunk/lvzip/c_source/deflate.c trunk/lvzip/c_source/inflate.c trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvapi.h trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/trees.c trunk/lvzip/c_source/uncompr.c trunk/lvzip/c_source/zalias.h trunk/lvzip/c_source/zlib.h trunk/lvzip/c_source/zlibvc.vcproj Modified: trunk/lvzip/c_source/compress.c =================================================================== --- trunk/lvzip/c_source/compress.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/compress.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -53,7 +53,7 @@ err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); } while (err == Z_OK); - *destLen = stream.total_out; + *destLen = (uLongf)stream.total_out; deflateEnd(&stream); return err == Z_STREAM_END ? Z_OK : err; } Modified: trunk/lvzip/c_source/deflate.c =================================================================== --- trunk/lvzip/c_source/deflate.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/deflate.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -198,8 +198,7 @@ * bit values at the expense of memory usage). We slide even when level == 0 to * keep the hash table consistent if we switch back to level > 0 later. */ -local void slide_hash(s) - deflate_state *s; +local void slide_hash(deflate_state *s) { unsigned n, m; Posf *p; @@ -338,8 +337,7 @@ /* ========================================================================= * Check for a valid deflate stream state. Return 0 if ok, 1 if not. */ -local int deflateStateCheck (strm) - z_streamp strm; +local int deflateStateCheck(z_streamp strm) { deflate_state *s; if (strm == Z_NULL || Modified: trunk/lvzip/c_source/inflate.c =================================================================== --- trunk/lvzip/c_source/inflate.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/inflate.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -115,8 +115,7 @@ return 0; } -int ZEXPORT inflateResetKeep(strm) -z_streamp strm; +int ZEXPORT inflateResetKeep(z_streamp strm) { struct inflate_state FAR *state; @@ -140,8 +139,7 @@ return Z_OK; } -int ZEXPORT inflateReset(strm) -z_streamp strm; +int ZEXPORT inflateReset(z_streamp strm) { struct inflate_state FAR *state; @@ -153,9 +151,7 @@ return inflateResetKeep(strm); } -int ZEXPORT inflateReset2(strm, windowBits) -z_streamp strm; -int windowBits; +int ZEXPORT inflateReset2(z_streamp strm, int windowBits) { int wrap; struct inflate_state FAR *state; @@ -191,11 +187,7 @@ return inflateReset(strm); } -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) -z_streamp strm; -int windowBits; -const char *version; -int stream_size; +int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, const char *version, int stream_size) { int ret; struct inflate_state FAR *state; @@ -235,18 +227,12 @@ return ret; } -int ZEXPORT inflateInit_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; +int ZEXPORT inflateInit_(z_streamp strm, const char *version, int stream_size) { return inflateInit2_(strm, DEF_WBITS, version, stream_size); } -int ZEXPORT inflatePrime(strm, bits, value) -z_streamp strm; -int bits; -int value; +int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) { struct inflate_state FAR *state; @@ -274,8 +260,7 @@ used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ -local void fixedtables(state) -struct inflate_state FAR *state; +local void fixedtables(struct inflate_state FAR *state) { #ifdef BUILDFIXED static int virgin = 1; @@ -392,10 +377,7 @@ output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ -local int updatewindow(strm, end, copy) -z_streamp strm; -const Bytef *end; -unsigned copy; +local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { struct inflate_state FAR *state; unsigned dist; @@ -618,9 +600,7 @@ will return Z_BUF_ERROR if it has not reached the end of the stream. */ -int ZEXPORT inflate(strm, flush) -z_streamp strm; -int flush; +int ZEXPORT inflate(z_streamp strm, int flush) { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ @@ -1273,8 +1253,7 @@ return ret; } -int ZEXPORT inflateEnd(strm) -z_streamp strm; +int ZEXPORT inflateEnd(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) @@ -1287,10 +1266,7 @@ return Z_OK; } -int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) -z_streamp strm; -Bytef *dictionary; -uInt *dictLength; +int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength) { struct inflate_state FAR *state; @@ -1310,10 +1286,7 @@ return Z_OK; } -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) -z_streamp strm; -const Bytef *dictionary; -uInt dictLength; +int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength) { struct inflate_state FAR *state; unsigned long dictid; @@ -1345,9 +1318,7 @@ return Z_OK; } -int ZEXPORT inflateGetHeader(strm, head) -z_streamp strm; -gz_headerp head; +int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) { struct inflate_state FAR *state; @@ -1373,10 +1344,7 @@ called again with more data and the *have state. *have is initialized to zero for the first call. */ -local unsigned syncsearch(have, buf, len) -unsigned FAR *have; -const unsigned char FAR *buf; -unsigned len; +local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, unsigned len) { unsigned got; unsigned next; @@ -1396,11 +1364,10 @@ return next; } -int ZEXPORT inflateSync(strm) -z_streamp strm; +int ZEXPORT inflateSync(z_streamp strm) { unsigned len; /* number of bytes to look at or looked at */ - unsigned long in, out; /* temporary to save total_in and total_out */ + uint64_t in, out; /* temporary to save total_in and total_out */ unsigned char buf[4]; /* to restore bit buffer to byte string */ struct inflate_state FAR *state; @@ -1447,8 +1414,7 @@ block. When decompressing, PPP checks that at the end of input packet, inflate is waiting for these length bytes. */ -int ZEXPORT inflateSyncPoint(strm) -z_streamp strm; +int ZEXPORT inflateSyncPoint(z_streamp strm) { struct inflate_state FAR *state; @@ -1457,9 +1423,7 @@ return state->mode == STORED && state->bits == 0; } -int ZEXPORT inflateCopy(dest, source) -z_streamp dest; -z_streamp source; +int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { struct inflate_state FAR *state; struct inflate_state FAR *copy; @@ -1504,9 +1468,7 @@ return Z_OK; } -int ZEXPORT inflateUndermine(strm, subvert) -z_streamp strm; -int subvert; +int ZEXPORT inflateUndermine(z_streamp strm, int subvert) { struct inflate_state FAR *state; Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/lvapi.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -2,12 +2,13 @@ Copyright (C) 2009-2015 Rolf Kalbermatter */ +#include <string.h> +#include <mbstring.h> #define ZLIB_INTERNAL #include "zlib.h" #include "lvutil.h" #include "zip.h" #include "unzip.h" -#include <string.h> #include "lvapi.h" #ifndef VERSIONMADEBY @@ -180,7 +181,7 @@ LibAPI(MgErr) lvzlib_zipOpen(const void *pathname, int append, LStrHandle *globalcomment, zlib_filefunc64_def* filefuncs, LVRefNum *refnum) { - zipcharpc comment; + const char *comment; zipFile node = zipOpen3_64(pathname, append, 0, &comment, filefuncs); *refnum = kNotARefNum; @@ -229,10 +230,10 @@ if (!err) { err = LibToMgErr(zipOpenNewFileInZip4_64(node, (const char*)LStrBufH(filename), zipfi, - LStrBufH(extrafield_local), LStrLenH(extrafield_local), - LStrBufH(extrafield_global), LStrLenH(extrafield_global), - (const char*)LStrBufH(comment), method, level, raw, windowBits, memLevel, - strategy, password[0] ? password : NULL, crcForCrypting, version, flags, zip64)); + LStrBufH(extrafield_local), (uint16_t)LStrLenH(extrafield_local), + LStrBufH(extrafield_global), (uint16_t)LStrLenH(extrafield_global), + (const char*)LStrBufH(comment), (uint16_t)method, level, raw, windowBits, memLevel, + strategy, password[0] ? password : NULL, crcForCrypting, (uint16_t)version, (uint16_t)flags, zip64)); } } } @@ -291,7 +292,7 @@ if (err) comment = globalComment; } - retval = zipClose2(node, (const char*)LStrBufH(comment), stream); + retval = zipClose2(node, (const char*)LStrBufH(comment), VERSIONMADEBY, (voidpf*)stream); if (comment) DSDisposeHandle((UHandle)comment); if (!err && retval) @@ -334,7 +335,7 @@ * refnum: An archive extraction file reference * ****************************************************************************************************/ -LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum) +LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum, LStrHandle *stream) { unzFile node; MgErr err = lvzlibDisposeRefnum(refnum, &node, UnzMagic); @@ -341,7 +342,7 @@ if (!err) { *refnum = kNotARefNum; - err = LibToMgErr(unzClose(node)); + err = LibToMgErr(unzClose2(node, (voidpf*)stream)); } return err; } @@ -423,6 +424,11 @@ * characters or multibyte characters. * ****************************************************************************************************/ +static int caseInsensitiveNameComparer(unzFile file, const char *filename1, const char *filename2) +{ + return _mbsicmp((const unsigned char*)filename1, (const unsigned char*)filename2); +} + LibAPI(MgErr) lvzlib_unzLocateFile(LVRefNum *refnum, LStrHandle fileName, int iCaseSensitivity) { unzFile node; @@ -432,7 +438,7 @@ err = ZeroTerminateLString(&fileName); if (!err) { - err = LibToMgErr(unzLocateFile(node, (const char*)LStrBufH(fileName), iCaseSensitivity)); + err = LibToMgErr(unzLocateFile(node, (const char*)LStrBufH(fileName), iCaseSensitivity ? caseInsensitiveNameComparer : NULL)); } } return err; Modified: trunk/lvzip/c_source/lvapi.h =================================================================== --- trunk/lvzip/c_source/lvapi.h 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/lvapi.h 2018-12-09 16:15:03 UTC (rev 1553) @@ -23,7 +23,7 @@ LibAPI(MgErr) lvzlib_zipCloseFileInZipRaw64(LVRefNum *refnum, uInt64 uncompressedSize, uInt32 crc32); LibAPI(MgErr) lvzlib_zipClose(LVRefNum *refnum, const LStrHandle globalComment, LStrHandle *stream); LibAPI(MgErr) lvzlib_unzOpen(const void *pathname, zlib_filefunc64_def* filefuncs, LVRefNum *refnum); -LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum); +LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum, LStrHandle *stream); LibAPI(MgErr) lvzlib_unzGetGlobalInfo32(LVRefNum *refnum, LStrHandle *comment, uInt32 *nEntry); LibAPI(MgErr) lvzlib_unzGetGlobalInfo64(LVRefNum *refnum, LStrHandle *comment, uInt64 *nEntry); LibAPI(MgErr) lvzlib_unzLocateFile(LVRefNum *refnum, LStrHandle fileName, int iCaseSensitivity); Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/lvutil.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -1706,7 +1706,7 @@ } if (hFile != INVALID_HANDLE_VALUE) { - int32 length = wcslen(lpTargetFileName) + 1, offset = 0; + int32 length = (int32)wcslen(lpTargetFileName) + 1, offset = 0; WCHAR namebuf[MAX_PATH + 6]; DWORD bytes = (DWORD)(REPARSE_DATA_BUFFER_HEADER_SIZE + length * sizeof(WCHAR) * 2 + 20); PREPARSE_DATA_BUFFER buffer = (PREPARSE_DATA_BUFFER)DSNewPClr(bytes); Modified: trunk/lvzip/c_source/trees.c =================================================================== --- trunk/lvzip/c_source/trees.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/trees.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -376,8 +376,7 @@ /* =========================================================================== * Initialize the tree data structures for a new zlib stream. */ -void ZLIB_INTERNAL _tr_init(s) - deflate_state *s; +void ZLIB_INTERNAL _tr_init(deflate_state *s) { tr_static_init(); @@ -404,8 +403,7 @@ /* =========================================================================== * Initialize a new block. */ -local void init_block(s) - deflate_state *s; +local void init_block(deflate_state *s) { int n; /* iterates over tree elements */ @@ -448,10 +446,7 @@ * when the heap property is re-established (each father smaller than its * two sons). */ -local void pqdownheap(s, tree, k) - deflate_state *s; - ct_data *tree; /* the tree to restore */ - int k; /* node to move down */ +local void pqdownheap(deflate_state *s, ct_data *tree /* the tree to restore */, int k /* node to move down */) { int v = s->heap[k]; int j = k << 1; /* left son of k */ @@ -483,9 +478,7 @@ * The length opt_len is updated; static_len is also updated if stree is * not null. */ -local void gen_bitlen(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ +local void gen_bitlen(deflate_state *s, tree_desc *desc /* the tree descriptor */) { ct_data *tree = desc->dyn_tree; int max_code = desc->max_code; @@ -569,10 +562,11 @@ * OUT assertion: the field code is set for all tree elements of non * zero code length. */ -local void gen_codes (tree, max_code, bl_count) - ct_data *tree; /* the tree to decorate */ - int max_code; /* largest code with non zero frequency */ - ushf *bl_count; /* number of codes at each bit length */ +local void gen_codes ( + ct_data *tree, /* the tree to decorate */ + int max_code, /* largest code with non zero frequency */ + ushf *bl_count /* number of codes at each bit length */ +) { ush next_code[MAX_BITS+1]; /* next code value for each bit length */ unsigned code = 0; /* running code value */ @@ -612,9 +606,7 @@ * and corresponding code. The length opt_len is updated; static_len is * also updated if stree is not null. The field max_code is set. */ -local void build_tree(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ +local void build_tree(deflate_state *s, tree_desc *desc /* the tree descriptor */) { ct_data *tree = desc->dyn_tree; const ct_data *stree = desc->stat_desc->static_tree; @@ -700,10 +692,11 @@ * Scan a literal or distance tree to determine the frequencies of the codes * in the bit length tree. */ -local void scan_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ +local void scan_tree ( + deflate_state *s, + ct_data *tree, /* the tree to be scanned */ + int max_code /* and its largest code of non zero frequency */ +) { int n; /* iterates over all tree elements */ int prevlen = -1; /* last emitted length */ @@ -745,10 +738,11 @@ * Send a literal or distance tree in compressed form, using the codes in * bl_tree. */ -local void send_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ +local void send_tree ( + deflate_state *s, + ct_data *tree, /* the tree to be scanned */ + int max_code /* and its largest code of non zero frequency */ +) { int n; /* iterates over all tree elements */ int prevlen = -1; /* last emitted length */ @@ -796,8 +790,7 @@ * Construct the Huffman tree for the bit lengths and return the index in * bl_order of the last bit length code to send. */ -local int build_bl_tree(s) - deflate_state *s; +local int build_bl_tree(deflate_state *s) { int max_blindex; /* index of last bit length code of non zero freq */ @@ -831,9 +824,7 @@ * lengths of the bit length codes, the literal tree and the distance tree. * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. */ -local void send_all_trees(s, lcodes, dcodes, blcodes) - deflate_state *s; - int lcodes, dcodes, blcodes; /* number of codes for each tree */ +local void send_all_trees(deflate_state *s, int lcodes, int dcodes, int blcodes /* number of codes for each tree */) { int rank; /* index in bl_order */ @@ -860,13 +851,14 @@ /* =========================================================================== * Send a stored block */ -void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ +void ZLIB_INTERNAL _tr_stored_block( + deflate_state *s, + charf *buf, /* input block */ + ulg stored_len, /* length of input block */ + int last /* one if this is the last block for a file */ +) { - send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ + send_bits(s, (STORED_BLOCK << 1) + last, 3); /* send block type */ bi_windup(s); /* align on byte boundary */ put_short(s, (ush)stored_len); put_short(s, (ush)~stored_len); @@ -883,8 +875,7 @@ /* =========================================================================== * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) */ -void ZLIB_INTERNAL _tr_flush_bits(s) - deflate_state *s; +void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) { bi_flush(s); } @@ -893,8 +884,7 @@ * Send one empty static block to give enough lookahead for inflate. * This takes 10 bits, of which 7 may remain in the bit buffer. */ -void ZLIB_INTERNAL _tr_align(s) - deflate_state *s; +void ZLIB_INTERNAL _tr_align(deflate_state *s) { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); @@ -908,11 +898,12 @@ * Determine the best encoding for the current block: dynamic trees, static * trees or store, and write out the encoded block. */ -void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block, or NULL if too old */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ +void ZLIB_INTERNAL _tr_flush_block( + deflate_state *s, + charf *buf, /* input block, or NULL if too old */ + ulg stored_len, /* length of input block */ + int last /* one if this is the last block for a file */ +) { ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ int max_blindex = 0; /* index of last bit length code of non zero freq */ @@ -1011,10 +1002,11 @@ * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ -int ZLIB_INTERNAL _tr_tally (s, dist, lc) - deflate_state *s; - unsigned dist; /* distance of matched string */ - unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +int ZLIB_INTERNAL _tr_tally ( + deflate_state *s, + unsigned dist, /* distance of matched string */ + unsigned lc /* match length-MIN_MATCH or unmatched char (if dist==0) */ +) { s->d_buf[s->last_lit] = (ush)dist; s->l_buf[s->last_lit++] = (uch)lc; @@ -1061,10 +1053,11 @@ /* =========================================================================== * Send the block data compressed using the given Huffman trees */ -local void compress_block(s, ltree, dtree) - deflate_state *s; - const ct_data *ltree; /* literal tree */ - const ct_data *dtree; /* distance tree */ +local void compress_block( + deflate_state *s, + const ct_data *ltree, /* literal tree */ + const ct_data *dtree /* distance tree */ +) { unsigned dist; /* distance of matched string */ int lc; /* match length or unmatched char (if dist == 0) */ @@ -1121,8 +1114,7 @@ * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). * IN assertion: the fields Freq of dyn_ltree are set. */ -local int detect_data_type(s) - deflate_state *s; +local int detect_data_type(deflate_state *s) { /* black_mask is the bit mask of black-listed bytes * set bits 0..6, 14..25, and 28..31 @@ -1155,9 +1147,10 @@ * method would use a table) * IN assertion: 1 <= len <= 15 */ -local unsigned bi_reverse(code, len) - unsigned code; /* the value to invert */ - int len; /* its bit length */ +local unsigned bi_reverse( + unsigned code, /* the value to invert */ + int len /* its bit length */ +) { register unsigned res = 0; do { @@ -1170,8 +1163,7 @@ /* =========================================================================== * Flush the bit buffer, keeping at most 7 bits in it. */ -local void bi_flush(s) - deflate_state *s; +local void bi_flush(deflate_state *s) { if (s->bi_valid == 16) { put_short(s, s->bi_buf); @@ -1187,8 +1179,7 @@ /* =========================================================================== * Flush the bit buffer and align the output on a byte boundary */ -local void bi_windup(s) - deflate_state *s; +local void bi_windup(deflate_state *s) { if (s->bi_valid > 8) { put_short(s, s->bi_buf); Modified: trunk/lvzip/c_source/uncompr.c =================================================================== --- trunk/lvzip/c_source/uncompr.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/uncompr.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -68,7 +68,7 @@ *sourceLen -= len + stream.avail_in; if (dest != buf) - *destLen = stream.total_out; + *destLen = (uLongf)stream.total_out; else if (stream.total_out && err == Z_BUF_ERROR) left = 1; Modified: trunk/lvzip/c_source/zalias.h =================================================================== --- trunk/lvzip/c_source/zalias.h 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/zalias.h 2018-12-09 16:15:03 UTC (rev 1553) @@ -58,6 +58,7 @@ #define zlibVersion lvzip_zlibVersion #define unzClose lvzip_unzClose +#define unzClose2 lvzip_unzClose2 #define unzCloseCurrentFile lvzip_unzCloseCurrentFile #define unzGetCurrentFileInfo lvzip_unzGetCurrentFileInfo #define unzGetCurrentFileInfo64 lvzip_unzGetCurrentFileInfo64 Modified: trunk/lvzip/c_source/zlib.h =================================================================== --- trunk/lvzip/c_source/zlib.h 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/zlib.h 2018-12-09 16:15:03 UTC (rev 1553) @@ -31,6 +31,8 @@ #ifndef ZLIB_H #define ZLIB_H +#include <stdint.h> + #include "zalias.h" #include "zconf.h" @@ -45,6 +47,10 @@ #define ZLIB_VER_REVISION 11 #define ZLIB_VER_SUBREVISION 0 +#if defined(_MSC_VER) +#pragma warning(disable: 4100 4101 4127) +#endif + /* The 'zlib' compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. @@ -87,11 +93,11 @@ typedef struct z_stream_s { z_const Bytef *next_in; /* next input byte */ uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ + uint64_t total_in; /* total number of input bytes read so far */ Bytef *next_out; /* next output byte will go here */ uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ + uint64_t total_out; /* total number of bytes output so far */ z_const char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ Modified: trunk/lvzip/c_source/zlibvc.vcproj =================================================================== --- trunk/lvzip/c_source/zlibvc.vcproj 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/zlibvc.vcproj 2018-12-09 16:15:03 UTC (rev 1553) @@ -294,6 +294,7 @@ Optimization="0" AdditionalIncludeDirectories="bzip2" PreprocessorDefinitions="WIN32;_DEBUG;NO_vsnprintf;HAVE_AES;HAVE_BZIP2;BZ_NO_STDIO;_CRT_SECURE_NO_WARNINGS" + GeneratePreprocessedFile="0" RuntimeLibrary="3" PrecompiledHeaderFile="$(IntDir)\zlibvc.pch" AssemblerListingLocation="$(IntDir)\" @@ -1658,10 +1659,6 @@ </FileConfiguration> </File> <File - RelativePath=".\minishared.c" - > - </File> - <File RelativePath="mztools.c" > <FileConfiguration @@ -1938,7 +1935,6 @@ > <FileConfiguration Name="DLL Release|Win32" - ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" @@ -1946,7 +1942,6 @@ </FileConfiguration> <FileConfiguration Name="DLL Release|x64" - ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" @@ -1954,7 +1949,6 @@ </FileConfiguration> <FileConfiguration Name="DLL Embedded|Win32" - ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" @@ -1962,7 +1956,6 @@ </FileConfiguration> <FileConfiguration Name="DLL Embedded|x64" - ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" @@ -2231,10 +2224,6 @@ > </File> <File - RelativePath=".\minishared.h" - > - </File> - <File RelativePath="mztools.h" > </File> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |