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