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