|
|
369dca |
diff -upr zlib-1.2.7.orig/deflate.c zlib-1.2.7/deflate.c
|
|
|
369dca |
--- zlib-1.2.7.orig/deflate.c 2012-10-04 12:18:50.750427902 +0200
|
|
|
369dca |
+++ zlib-1.2.7/deflate.c 2012-10-04 12:20:04.222190460 +0200
|
|
|
369dca |
@@ -1150,15 +1150,16 @@ local void lm_init (s)
|
|
|
369dca |
/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
|
|
|
369dca |
* match.S. The code will be functionally equivalent.
|
|
|
369dca |
*/
|
|
|
369dca |
-local uInt longest_match(s, cur_match)
|
|
|
369dca |
+local uInt longest_match(s, pcur_match)
|
|
|
369dca |
deflate_state *s;
|
|
|
369dca |
- IPos cur_match; /* current match */
|
|
|
369dca |
+ IPos pcur_match; /* current match */
|
|
|
369dca |
{
|
|
|
369dca |
+ ptrdiff_t cur_match = pcur_match; /* extend to pointer width */
|
|
|
369dca |
unsigned chain_length = s->max_chain_length;/* max hash chain length */
|
|
|
369dca |
register Bytef *scan = s->window + s->strstart; /* current string */
|
|
|
369dca |
register Bytef *match; /* matched string */
|
|
|
369dca |
register int len; /* length of current match */
|
|
|
369dca |
- int best_len = s->prev_length; /* best match length so far */
|
|
|
369dca |
+ ptrdiff_t best_len = s->prev_length; /* best match length so far */
|
|
|
369dca |
int nice_match = s->nice_match; /* stop if match long enough */
|
|
|
369dca |
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
|
|
|
369dca |
s->strstart - (IPos)MAX_DIST(s) : NIL;
|
|
|
369dca |
@@ -1173,12 +1174,12 @@ local uInt longest_match(s, cur_match)
|
|
|
369dca |
* Try with and without -DUNALIGNED_OK to check.
|
|
|
369dca |
*/
|
|
|
369dca |
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
|
|
|
369dca |
- register ush scan_start = *(ushf*)scan;
|
|
|
369dca |
- register ush scan_end = *(ushf*)(scan+best_len-1);
|
|
|
369dca |
+ register uInt scan_start = *(ushf*)scan;
|
|
|
369dca |
+ register uInt scan_end = *(ushf*)(scan+best_len-1);
|
|
|
369dca |
#else
|
|
|
369dca |
register Bytef *strend = s->window + s->strstart + MAX_MATCH;
|
|
|
369dca |
- register Byte scan_end1 = scan[best_len-1];
|
|
|
369dca |
- register Byte scan_end = scan[best_len];
|
|
|
369dca |
+ register uInt scan_end1 = scan[best_len-1];
|
|
|
369dca |
+ register uInt scan_end = scan[best_len];
|
|
|
369dca |
#endif
|
|
|
369dca |
|
|
|
369dca |
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
|