diff options
Diffstat (limited to 'xdelta3/xdelta3.c')
-rw-r--r-- | xdelta3/xdelta3.c | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c index b0c9b30..294a05a 100644 --- a/xdelta3/xdelta3.c +++ b/xdelta3/xdelta3.c | |||
@@ -1424,8 +1424,8 @@ xd3_alloc (xd3_stream *stream, | |||
1424 | if (a != NULL) | 1424 | if (a != NULL) |
1425 | { | 1425 | { |
1426 | IF_DEBUG (stream->alloc_cnt += 1); | 1426 | IF_DEBUG (stream->alloc_cnt += 1); |
1427 | IF_DEBUG2 (DP(RINT "[stream %p malloc] size %u ptr %p\n", | 1427 | IF_DEBUG2 (DP(RINT "[stream %p malloc] size %"W"u ptr %p\n", |
1428 | stream, elts * size, a)); | 1428 | (void*)stream, elts * size, a)); |
1429 | } | 1429 | } |
1430 | else | 1430 | else |
1431 | { | 1431 | { |
@@ -1444,7 +1444,7 @@ xd3_free (xd3_stream *stream, | |||
1444 | IF_DEBUG (stream->free_cnt += 1); | 1444 | IF_DEBUG (stream->free_cnt += 1); |
1445 | XD3_ASSERT (stream->free_cnt <= stream->alloc_cnt); | 1445 | XD3_ASSERT (stream->free_cnt <= stream->alloc_cnt); |
1446 | IF_DEBUG2 (DP(RINT "[stream %p free] %p\n", | 1446 | IF_DEBUG2 (DP(RINT "[stream %p free] %p\n", |
1447 | stream, ptr)); | 1447 | (void*)stream, ptr)); |
1448 | stream->free (stream->opaque, ptr); | 1448 | stream->free (stream->opaque, ptr); |
1449 | } | 1449 | } |
1450 | } | 1450 | } |
@@ -1889,7 +1889,7 @@ xd3_getblk (xd3_stream *stream, xoff_t blkno) | |||
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | IF_DEBUG2 (DP(RINT "[getblk] read source block %"Q"u onblk " | 1891 | IF_DEBUG2 (DP(RINT "[getblk] read source block %"Q"u onblk " |
1892 | "%u blksize %u max_blkno %"Q"u\n", blkno, source->onblk, | 1892 | "%"W"u blksize %"W"u max_blkno %"Q"u\n", blkno, source->onblk, |
1893 | source->blksize, source->max_blkno)); | 1893 | source->blksize, source->max_blkno)); |
1894 | } | 1894 | } |
1895 | 1895 | ||
@@ -1906,7 +1906,7 @@ xd3_getblk (xd3_stream *stream, xoff_t blkno) | |||
1906 | } | 1906 | } |
1907 | else if (!source->eof_known) | 1907 | else if (!source->eof_known) |
1908 | { | 1908 | { |
1909 | IF_DEBUG1 (DP(RINT "[getblk] eof block has %d bytes; " | 1909 | IF_DEBUG1 (DP(RINT "[getblk] eof block has %"W"u bytes; " |
1910 | "source length known %"Q"u\n", | 1910 | "source length known %"Q"u\n", |
1911 | xd3_bytes_on_srcblk (source, blkno), | 1911 | xd3_bytes_on_srcblk (source, blkno), |
1912 | xd3_source_eof (source))); | 1912 | xd3_source_eof (source))); |
@@ -1945,7 +1945,7 @@ xd3_set_source (xd3_stream *stream, | |||
1945 | { | 1945 | { |
1946 | src->blksize = xd3_pow2_roundup(src->blksize); | 1946 | src->blksize = xd3_pow2_roundup(src->blksize); |
1947 | xd3_check_pow2 (src->blksize, &shiftby); | 1947 | xd3_check_pow2 (src->blksize, &shiftby); |
1948 | IF_DEBUG1 (DP(RINT "raising src_blksz to %u\n", src->blksize)); | 1948 | IF_DEBUG1 (DP(RINT "raising src_blksz to %"W"u\n", src->blksize)); |
1949 | } | 1949 | } |
1950 | 1950 | ||
1951 | src->shiftby = shiftby; | 1951 | src->shiftby = shiftby; |
@@ -1954,7 +1954,7 @@ xd3_set_source (xd3_stream *stream, | |||
1954 | if (xd3_check_pow2 (src->max_winsize, NULL) != 0) | 1954 | if (xd3_check_pow2 (src->max_winsize, NULL) != 0) |
1955 | { | 1955 | { |
1956 | src->max_winsize = xd3_xoff_roundup(src->max_winsize); | 1956 | src->max_winsize = xd3_xoff_roundup(src->max_winsize); |
1957 | IF_DEBUG1 (DP(RINT "raising src_maxsize to %u\n", src->blksize)); | 1957 | IF_DEBUG1 (DP(RINT "raising src_maxsize to %"W"u\n", src->blksize)); |
1958 | } | 1958 | } |
1959 | src->max_winsize = xd3_max (src->max_winsize, XD3_ALLOCSIZE); | 1959 | src->max_winsize = xd3_max (src->max_winsize, XD3_ALLOCSIZE); |
1960 | return 0; | 1960 | return 0; |
@@ -1968,7 +1968,7 @@ xd3_set_source_and_size (xd3_stream *stream, | |||
1968 | if (ret == 0) | 1968 | if (ret == 0) |
1969 | { | 1969 | { |
1970 | stream->src->eof_known = 1; | 1970 | stream->src->eof_known = 1; |
1971 | IF_DEBUG2 (DP(RINT "[set source] size known %"Q"\n", | 1971 | IF_DEBUG2 (DP(RINT "[set source] size known %"Q"u\n", |
1972 | source_size)); | 1972 | source_size)); |
1973 | xd3_blksize_div(source_size, | 1973 | xd3_blksize_div(source_size, |
1974 | stream->src, | 1974 | stream->src, |
@@ -2180,7 +2180,7 @@ xd3_iopt_finish_encoding (xd3_stream *stream, xd3_rinst *inst) | |||
2180 | 2180 | ||
2181 | IF_DEBUG2 ({ | 2181 | IF_DEBUG2 ({ |
2182 | static int cnt; | 2182 | static int cnt; |
2183 | DP(RINT "[iopt copy:%d] pos %"Q"-%"Q" addr %"Q"-%"Q" size %u\n", | 2183 | DP(RINT "[iopt copy:%d] pos %"Q"u-%"Q"u addr %"Q"u-%"Q"u size %"W"u\n", |
2184 | cnt++, | 2184 | cnt++, |
2185 | stream->total_in + inst->pos, | 2185 | stream->total_in + inst->pos, |
2186 | stream->total_in + inst->pos + inst->size, | 2186 | stream->total_in + inst->pos + inst->size, |
@@ -2197,7 +2197,7 @@ xd3_iopt_finish_encoding (xd3_stream *stream, xd3_rinst *inst) | |||
2197 | 2197 | ||
2198 | IF_DEBUG2 ({ | 2198 | IF_DEBUG2 ({ |
2199 | static int cnt; | 2199 | static int cnt; |
2200 | DP(RINT "[iopt run:%d] pos %"Q" size %u\n", cnt++, stream->total_in + inst->pos, inst->size); | 2200 | DP(RINT "[iopt run:%d] pos %"Q"u size %"W"u\n", cnt++, stream->total_in + inst->pos, inst->size); |
2201 | }); | 2201 | }); |
2202 | break; | 2202 | break; |
2203 | } | 2203 | } |
@@ -2211,7 +2211,7 @@ xd3_iopt_finish_encoding (xd3_stream *stream, xd3_rinst *inst) | |||
2211 | 2211 | ||
2212 | IF_DEBUG2 ({ | 2212 | IF_DEBUG2 ({ |
2213 | static int cnt; | 2213 | static int cnt; |
2214 | DP(RINT "[iopt add:%d] pos %"Q" size %u\n", cnt++, stream->total_in + inst->pos, inst->size); | 2214 | DP(RINT "[iopt add:%d] pos %"Q"u size %"W"u\n", cnt++, stream->total_in + inst->pos, inst->size); |
2215 | }); | 2215 | }); |
2216 | 2216 | ||
2217 | break; | 2217 | break; |
@@ -2593,11 +2593,11 @@ xd3_emit_single (xd3_stream *stream, xd3_rinst *single, uint8_t code) | |||
2593 | int has_size = stream->code_table[code].size1 == 0; | 2593 | int has_size = stream->code_table[code].size1 == 0; |
2594 | int ret; | 2594 | int ret; |
2595 | 2595 | ||
2596 | IF_DEBUG2 (DP(RINT "[emit1] %u %s (%u) code %u\n", | 2596 | IF_DEBUG2 (DP(RINT "[emit1] %"W"u %s (%"W"u) code %u\n", |
2597 | single->pos, | 2597 | single->pos, |
2598 | xd3_rtype_to_string ((xd3_rtype) single->type, 0), | 2598 | xd3_rtype_to_string ((xd3_rtype) single->type, 0), |
2599 | single->size, | 2599 | single->size, |
2600 | code)); | 2600 | code)); |
2601 | 2601 | ||
2602 | if ((ret = xd3_emit_byte (stream, & INST_TAIL (stream), code))) | 2602 | if ((ret = xd3_emit_byte (stream, & INST_TAIL (stream), code))) |
2603 | { | 2603 | { |
@@ -2631,13 +2631,13 @@ xd3_emit_double (xd3_stream *stream, xd3_rinst *first, | |||
2631 | return ret; | 2631 | return ret; |
2632 | } | 2632 | } |
2633 | 2633 | ||
2634 | IF_DEBUG2 (DP(RINT "[emit2]: %u %s (%u) %s (%u) code %u\n", | 2634 | IF_DEBUG2 (DP(RINT "[emit2]: %"W"u %s (%"W"u) %s (%"W"u) code %u\n", |
2635 | first->pos, | 2635 | first->pos, |
2636 | xd3_rtype_to_string ((xd3_rtype) first->type, 0), | 2636 | xd3_rtype_to_string ((xd3_rtype) first->type, 0), |
2637 | first->size, | 2637 | first->size, |
2638 | xd3_rtype_to_string ((xd3_rtype) second->type, 0), | 2638 | xd3_rtype_to_string ((xd3_rtype) second->type, 0), |
2639 | second->size, | 2639 | second->size, |
2640 | code)); | 2640 | code)); |
2641 | 2641 | ||
2642 | return 0; | 2642 | return 0; |
2643 | } | 2643 | } |
@@ -2869,7 +2869,8 @@ xd3_encode_buffer_leftover (xd3_stream *stream) | |||
2869 | XD3_ASSERT (stream->buf_avail == 0); | 2869 | XD3_ASSERT (stream->buf_avail == 0); |
2870 | XD3_ASSERT (stream->buf_leftavail < stream->winsize); | 2870 | XD3_ASSERT (stream->buf_leftavail < stream->winsize); |
2871 | 2871 | ||
2872 | IF_DEBUG2 (DP(RINT "[leftover] previous %u avail %u\n", stream->buf_leftavail, stream->avail_in)); | 2872 | IF_DEBUG2 (DP(RINT "[leftover] previous %"W"u avail %"W"u\n", |
2873 | stream->buf_leftavail, stream->avail_in)); | ||
2873 | 2874 | ||
2874 | memcpy (stream->buf_in, stream->buf_leftover, stream->buf_leftavail); | 2875 | memcpy (stream->buf_in, stream->buf_leftover, stream->buf_leftavail); |
2875 | 2876 | ||
@@ -2894,12 +2895,12 @@ xd3_encode_buffer_leftover (xd3_stream *stream) | |||
2894 | else if ((stream->buf_avail < stream->winsize) && !(stream->flags & XD3_FLUSH)) | 2895 | else if ((stream->buf_avail < stream->winsize) && !(stream->flags & XD3_FLUSH)) |
2895 | { | 2896 | { |
2896 | /* Buffer has space */ | 2897 | /* Buffer has space */ |
2897 | IF_DEBUG2 (DP(RINT "[leftover] emptied %u\n", take)); | 2898 | IF_DEBUG2 (DP(RINT "[leftover] emptied %"W"u\n", take)); |
2898 | return XD3_INPUT; | 2899 | return XD3_INPUT; |
2899 | } | 2900 | } |
2900 | 2901 | ||
2901 | /* Use the buffer: */ | 2902 | /* Use the buffer: */ |
2902 | IF_DEBUG2 (DP(RINT "[leftover] take %u remaining %u\n", take, stream->buf_leftavail)); | 2903 | IF_DEBUG2 (DP(RINT "[leftover] take %"W"u remaining %"W"u\n", take, stream->buf_leftavail)); |
2903 | stream->next_in = stream->buf_in; | 2904 | stream->next_in = stream->buf_in; |
2904 | stream->avail_in = stream->buf_avail; | 2905 | stream->avail_in = stream->buf_avail; |
2905 | stream->buf_avail = 0; | 2906 | stream->buf_avail = 0; |
@@ -3124,13 +3125,13 @@ xd3_encode_input (xd3_stream *stream) | |||
3124 | 3125 | ||
3125 | stream->enc_state = ENC_SEARCH; | 3126 | stream->enc_state = ENC_SEARCH; |
3126 | 3127 | ||
3127 | IF_DEBUG2 (DP(RINT "[WINSTART:%"Q"] input bytes %u offset %"Q"\n", | 3128 | IF_DEBUG2 (DP(RINT "[WINSTART:%"Q"u] input bytes %"W"u offset %"Q"u\n", |
3128 | stream->current_window, stream->avail_in, | 3129 | stream->current_window, stream->avail_in, |
3129 | stream->total_in)); | 3130 | stream->total_in)); |
3130 | return XD3_WINSTART; | 3131 | return XD3_WINSTART; |
3131 | 3132 | ||
3132 | case ENC_SEARCH: | 3133 | case ENC_SEARCH: |
3133 | IF_DEBUG2 (DP(RINT "[SEARCH] match_state %d avail_in %u %s\n", | 3134 | IF_DEBUG2 (DP(RINT "[SEARCH] match_state %d avail_in %"W"u %s\n", |
3134 | stream->match_state, stream->avail_in, | 3135 | stream->match_state, stream->avail_in, |
3135 | stream->src ? "source" : "no source")); | 3136 | stream->src ? "source" : "no source")); |
3136 | 3137 | ||
@@ -3266,7 +3267,7 @@ xd3_encode_input (xd3_stream *stream) | |||
3266 | stream->total_in += stream->avail_in; | 3267 | stream->total_in += stream->avail_in; |
3267 | stream->enc_state = ENC_POSTWIN; | 3268 | stream->enc_state = ENC_POSTWIN; |
3268 | 3269 | ||
3269 | IF_DEBUG2 (DP(RINT "[WINFINISH:%"Q"] in=%"Q"\n", | 3270 | IF_DEBUG2 (DP(RINT "[WINFINISH:%"Q"u] in=%"Q"u\n", |
3270 | stream->current_window, | 3271 | stream->current_window, |
3271 | stream->total_in)); | 3272 | stream->total_in)); |
3272 | return XD3_WINFINISH; | 3273 | return XD3_WINFINISH; |
@@ -3669,7 +3670,7 @@ xd3_srcwin_setup (xd3_stream *stream) | |||
3669 | * for the second block. */ | 3670 | * for the second block. */ |
3670 | src->srclen = xd3_min (src->srclen, xd3_source_eof(src) - src->srcbase); | 3671 | src->srclen = xd3_min (src->srclen, xd3_source_eof(src) - src->srcbase); |
3671 | } | 3672 | } |
3672 | IF_DEBUG1 (DP(RINT "[srcwin_setup_constrained] base %"Q"u len %u\n", | 3673 | IF_DEBUG1 (DP(RINT "[srcwin_setup_constrained] base %"Q"u len %"W"u\n", |
3673 | src->srcbase, src->srclen)); | 3674 | src->srcbase, src->srclen)); |
3674 | 3675 | ||
3675 | XD3_ASSERT (src->srclen); | 3676 | XD3_ASSERT (src->srclen); |
@@ -3786,8 +3787,8 @@ xd3_source_match_setup (xd3_stream *stream, xoff_t srcpos) | |||
3786 | } | 3787 | } |
3787 | 3788 | ||
3788 | IF_DEBUG2(DP(RINT | 3789 | IF_DEBUG2(DP(RINT |
3789 | "[match_setup] srcpos %"Q" (tgtpos %"Q") " | 3790 | "[match_setup] srcpos %"Q"u (tgtpos %"Q"u) " |
3790 | "unrestricted maxback %u maxfwd %u\n", | 3791 | "unrestricted maxback %"W"u maxfwd %"W"u\n", |
3791 | srcpos, | 3792 | srcpos, |
3792 | stream->total_in + stream->input_position, | 3793 | stream->total_in + stream->input_position, |
3793 | stream->match_maxback, | 3794 | stream->match_maxback, |
@@ -3823,7 +3824,7 @@ xd3_source_match_setup (xd3_stream *stream, xoff_t srcpos) | |||
3823 | 3824 | ||
3824 | IF_DEBUG2(DP(RINT | 3825 | IF_DEBUG2(DP(RINT |
3825 | "[match_setup] srcpos %"Q"u (tgtpos %"Q"u) " | 3826 | "[match_setup] srcpos %"Q"u (tgtpos %"Q"u) " |
3826 | "restricted maxback %u maxfwd %u\n", | 3827 | "restricted maxback %"W"u maxfwd %"W"u\n", |
3827 | srcpos, | 3828 | srcpos, |
3828 | stream->total_in + stream->input_position, | 3829 | stream->total_in + stream->input_position, |
3829 | stream->match_maxback, | 3830 | stream->match_maxback, |
@@ -3902,7 +3903,7 @@ xd3_source_extend_match (xd3_stream *stream) | |||
3902 | usize_t tryrem; /* tryrem is the number of matchable bytes */ | 3903 | usize_t tryrem; /* tryrem is the number of matchable bytes */ |
3903 | usize_t matched; | 3904 | usize_t matched; |
3904 | 3905 | ||
3905 | IF_DEBUG2(DP(RINT "[extend match] srcpos %"Q"\n", | 3906 | IF_DEBUG2(DP(RINT "[extend match] srcpos %"Q"u\n", |
3906 | stream->match_srcpos)); | 3907 | stream->match_srcpos)); |
3907 | 3908 | ||
3908 | XD3_ASSERT (src != NULL); | 3909 | XD3_ASSERT (src != NULL); |
@@ -3930,7 +3931,7 @@ xd3_source_extend_match (xd3_stream *stream) | |||
3930 | { | 3931 | { |
3931 | if (ret == XD3_TOOFARBACK) | 3932 | if (ret == XD3_TOOFARBACK) |
3932 | { | 3933 | { |
3933 | IF_DEBUG2(DP(RINT "[maxback] %"Q"u TOOFARBACK: %u INP %"Q"u CKSUM %"Q"u\n", | 3934 | IF_DEBUG2(DP(RINT "[maxback] %"Q"u TOOFARBACK: %"W"u INP %"Q"u CKSUM %"Q"u\n", |
3934 | tryblk, stream->match_back, | 3935 | tryblk, stream->match_back, |
3935 | stream->total_in + stream->input_position, | 3936 | stream->total_in + stream->input_position, |
3936 | stream->srcwin_cksum_pos)); | 3937 | stream->srcwin_cksum_pos)); |
@@ -3952,7 +3953,7 @@ xd3_source_extend_match (xd3_stream *stream) | |||
3952 | 3953 | ||
3953 | tryrem = xd3_min (tryoff, stream->match_maxback - stream->match_back); | 3954 | tryrem = xd3_min (tryoff, stream->match_maxback - stream->match_back); |
3954 | 3955 | ||
3955 | IF_DEBUG2(DP(RINT "[maxback] maxback %u trysrc %"Q"/%u tgt %u tryrem %u\n", | 3956 | IF_DEBUG2(DP(RINT "[maxback] maxback %"W"u trysrc %"Q"u/%"W"u tgt %"W"u tryrem %"W"u\n", |
3956 | stream->match_maxback, tryblk, tryoff, streamoff, tryrem)); | 3957 | stream->match_maxback, tryblk, tryoff, streamoff, tryrem)); |
3957 | 3958 | ||
3958 | /* TODO: This code can be optimized similar to xd3_match_forward() */ | 3959 | /* TODO: This code can be optimized similar to xd3_match_forward() */ |
@@ -3991,7 +3992,7 @@ xd3_source_extend_match (xd3_stream *stream) | |||
3991 | { | 3992 | { |
3992 | if (ret == XD3_TOOFARBACK) | 3993 | if (ret == XD3_TOOFARBACK) |
3993 | { | 3994 | { |
3994 | IF_DEBUG2(DP(RINT "[maxfwd] %"Q"u TOOFARBACK: %u INP %"Q"u CKSUM %"Q"u\n", | 3995 | IF_DEBUG2(DP(RINT "[maxfwd] %"Q"u TOOFARBACK: %"W"u INP %"Q"u CKSUM %"Q"u\n", |
3995 | tryblk, stream->match_fwd, | 3996 | tryblk, stream->match_fwd, |
3996 | stream->total_in + stream->input_position, | 3997 | stream->total_in + stream->input_position, |
3997 | stream->srcwin_cksum_pos)); | 3998 | stream->srcwin_cksum_pos)); |
@@ -4030,7 +4031,7 @@ xd3_source_extend_match (xd3_stream *stream) | |||
4030 | donefwd: | 4031 | donefwd: |
4031 | stream->match_state = MATCH_SEARCHING; | 4032 | stream->match_state = MATCH_SEARCHING; |
4032 | 4033 | ||
4033 | IF_DEBUG2(DP(RINT "[extend match] input %"Q"u srcpos %"Q"u len %u\n", | 4034 | IF_DEBUG2(DP(RINT "[extend match] input %"Q"u srcpos %"Q"u len %"W"u\n", |
4034 | stream->input_position + stream->total_in, | 4035 | stream->input_position + stream->total_in, |
4035 | stream->match_srcpos, | 4036 | stream->match_srcpos, |
4036 | stream->match_fwd)); | 4037 | stream->match_fwd)); |
@@ -4086,15 +4087,14 @@ xd3_source_extend_match (xd3_stream *stream) | |||
4086 | 4087 | ||
4087 | IF_DEBUG2 ({ | 4088 | IF_DEBUG2 ({ |
4088 | static int x = 0; | 4089 | static int x = 0; |
4089 | DP(RINT "[source match:%d] length %u <inp %"Q"u %"Q"u> <src %"Q"u %"Q"u> (%s) [ %u bytes ]\n", | 4090 | DP(RINT "[source match:%d] length %"W"u <inp %"Q"u %"Q"u> <src %"Q"u %"Q"u> (%s)\n", |
4090 | x++, | 4091 | x++, |
4091 | match_length, | 4092 | match_length, |
4092 | stream->total_in + target_position, | 4093 | stream->total_in + target_position, |
4093 | stream->total_in + target_position + match_length, | 4094 | stream->total_in + target_position + match_length, |
4094 | match_position, | 4095 | match_position, |
4095 | match_position + match_length, | 4096 | match_position + match_length, |
4096 | (stream->total_in + target_position == match_position) ? "same" : "diff", | 4097 | (stream->total_in + target_position == match_position) ? "same" : "diff"); |
4097 | match_length); | ||
4098 | }); | 4098 | }); |
4099 | 4099 | ||
4100 | if ((ret = xd3_found_match (stream, | 4100 | if ((ret = xd3_found_match (stream, |
@@ -4192,7 +4192,7 @@ xd3_smatch (xd3_stream *stream, | |||
4192 | 4192 | ||
4193 | again: | 4193 | again: |
4194 | 4194 | ||
4195 | IF_DEBUG2 (DP(RINT "smatch at base=%u inp=%u cksum=%u\n", base, | 4195 | IF_DEBUG2 (DP(RINT "smatch at base=%"W"u inp=%"W"u cksum=%"W"u\n", base, |
4196 | stream->input_position, scksum)); | 4196 | stream->input_position, scksum)); |
4197 | 4197 | ||
4198 | /* For small matches, we can always go to the end-of-input because | 4198 | /* For small matches, we can always go to the end-of-input because |
@@ -4432,7 +4432,7 @@ xd3_srcwin_move_point (xd3_stream *stream, usize_t *next_move_point) | |||
4432 | if (blkpos < (ssize_t) stream->smatcher.large_look) | 4432 | if (blkpos < (ssize_t) stream->smatcher.large_look) |
4433 | { | 4433 | { |
4434 | stream->srcwin_cksum_pos = (blkno + 1) * stream->src->blksize; | 4434 | stream->srcwin_cksum_pos = (blkno + 1) * stream->src->blksize; |
4435 | IF_DEBUG2 (DP(RINT "[srcwin_move_point] continue (end-of-block): %"Q"u\n", blkpos)); | 4435 | IF_DEBUG2 (DP(RINT "[srcwin_move_point] continue (end-of-block): %"Z"d\n", blkpos)); |
4436 | continue; | 4436 | continue; |
4437 | } | 4437 | } |
4438 | 4438 | ||
@@ -4473,7 +4473,7 @@ xd3_srcwin_move_point (xd3_stream *stream, usize_t *next_move_point) | |||
4473 | 4473 | ||
4474 | IF_DEBUG1 (DP(RINT | 4474 | IF_DEBUG1 (DP(RINT |
4475 | "[srcwin_move_point] exited loop T=%"Q"u " | 4475 | "[srcwin_move_point] exited loop T=%"Q"u " |
4476 | "S=%"Q" EOF=%"Q" %s\n", | 4476 | "S=%"Q"u EOF=%"Q"u %s\n", |
4477 | stream->total_in + stream->input_position, | 4477 | stream->total_in + stream->input_position, |
4478 | stream->srcwin_cksum_pos, | 4478 | stream->srcwin_cksum_pos, |
4479 | xd3_source_eof (stream->src), | 4479 | xd3_source_eof (stream->src), |
@@ -4502,7 +4502,7 @@ xd3_srcwin_move_point (xd3_stream *stream, usize_t *next_move_point) | |||
4502 | 4502 | ||
4503 | IF_DEBUG2 (DP(RINT | 4503 | IF_DEBUG2 (DP(RINT |
4504 | "[srcwin_move_point] finished T=%"Q"u " | 4504 | "[srcwin_move_point] finished T=%"Q"u " |
4505 | "S=%"Q"u L=%"Q"u EOF=%"Q"u %s again in %u\n", | 4505 | "S=%"Q"u L=%"Q"u EOF=%"Q"u %s again in %"W"u\n", |
4506 | stream->total_in + stream->input_position, | 4506 | stream->total_in + stream->input_position, |
4507 | stream->srcwin_cksum_pos, | 4507 | stream->srcwin_cksum_pos, |
4508 | target_cksum_pos, | 4508 | target_cksum_pos, |
@@ -4568,7 +4568,7 @@ XD3_TEMPLATE(xd3_string_match_) (xd3_stream *stream) | |||
4568 | usize_t match_offset = 0; | 4568 | usize_t match_offset = 0; |
4569 | usize_t next_move_point = 0; | 4569 | usize_t next_move_point = 0; |
4570 | 4570 | ||
4571 | IF_DEBUG2(DP(RINT "[string_match] initial entry %u\n", stream->input_position)); | 4571 | IF_DEBUG2(DP(RINT "[string_match] initial entry %"W"u\n", stream->input_position)); |
4572 | 4572 | ||
4573 | /* If there will be no compression due to settings or short input, | 4573 | /* If there will be no compression due to settings or short input, |
4574 | * skip it entirely. */ | 4574 | * skip it entirely. */ |
@@ -4581,7 +4581,7 @@ XD3_TEMPLATE(xd3_string_match_) (xd3_stream *stream) | |||
4581 | * needs to be reset. */ | 4581 | * needs to be reset. */ |
4582 | restartloop: | 4582 | restartloop: |
4583 | 4583 | ||
4584 | IF_DEBUG2(DP(RINT "[string_match] restartloop %u\n", stream->input_position)); | 4584 | IF_DEBUG2(DP(RINT "[string_match] restartloop %"W"u\n", stream->input_position)); |
4585 | 4585 | ||
4586 | /* If there is not enough input remaining for any kind of match, | 4586 | /* If there is not enough input remaining for any kind of match, |
4587 | skip it. */ | 4587 | skip it. */ |
@@ -4754,8 +4754,8 @@ XD3_TEMPLATE(xd3_string_match_) (xd3_stream *stream) | |||
4754 | { | 4754 | { |
4755 | IF_DEBUG2 ({ | 4755 | IF_DEBUG2 ({ |
4756 | static int x = 0; | 4756 | static int x = 0; |
4757 | DP(RINT "[target match:%d] <inp %u %u> <cpy %u %u> " | 4757 | DP(RINT "[target match:%d] <inp %"W"u %"W"u> <cpy %"W"u %"W"u> " |
4758 | "(-%d) [ %u bytes ]\n", | 4758 | "(-%"W"d) [ %"W"u bytes ]\n", |
4759 | x++, | 4759 | x++, |
4760 | stream->input_position, | 4760 | stream->input_position, |
4761 | stream->input_position + match_length, | 4761 | stream->input_position + match_length, |