diff options
author | Josh MacDonald <josh.macdonald@gmail.com> | 2015-09-30 22:35:09 -0700 |
---|---|---|
committer | Josh MacDonald <josh.macdonald@gmail.com> | 2015-09-30 22:35:09 -0700 |
commit | db89f26dec16ef999a782a1f90ec2e58e674e2b1 (patch) | |
tree | ad8db51e74dbbd608e1f8b699e585fd88a27ef79 /xdelta3/xdelta3-main.h | |
parent | f63acfe3692478b983df1473bc1e7a1df3397b7f (diff) |
Use W printf insert for 32- or 64-bit usize_t
Diffstat (limited to 'xdelta3/xdelta3-main.h')
-rw-r--r-- | xdelta3/xdelta3-main.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index 8d36ebc..1a536eb 100644 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h | |||
@@ -1102,7 +1102,7 @@ main_file_write (main_file *ofile, uint8_t *buf, usize_t size, const char *msg) | |||
1102 | } | 1102 | } |
1103 | else | 1103 | else |
1104 | { | 1104 | { |
1105 | if (option_verbose > 5) { XPR(NT "write %s: %"Z"u bytes\n", | 1105 | if (option_verbose > 5) { XPR(NT "write %s: %"W"u bytes\n", |
1106 | ofile->filename, size); } | 1106 | ofile->filename, size); } |
1107 | ofile->nwrite += size; | 1107 | ofile->nwrite += size; |
1108 | } | 1108 | } |
@@ -1296,7 +1296,7 @@ main_print_window (xd3_stream* stream, main_file *xfile) | |||
1296 | addr_bytes = (usize_t)(stream->addr_sect.buf - addr_before); | 1296 | addr_bytes = (usize_t)(stream->addr_sect.buf - addr_before); |
1297 | inst_bytes = (usize_t)(stream->inst_sect.buf - inst_before); | 1297 | inst_bytes = (usize_t)(stream->inst_sect.buf - inst_before); |
1298 | 1298 | ||
1299 | VC(UT " %06"Q"u %03"Z"u %s %6"Z"u", | 1299 | VC(UT " %06"Q"u %03"W"u %s %6"W"u", |
1300 | stream->dec_winstart + size, | 1300 | stream->dec_winstart + size, |
1301 | option_print_cpymode ? code : 0, | 1301 | option_print_cpymode ? code : 0, |
1302 | xd3_rtype_to_string ((xd3_rtype) stream->dec_current1.type, | 1302 | xd3_rtype_to_string ((xd3_rtype) stream->dec_current1.type, |
@@ -1309,7 +1309,7 @@ main_print_window (xd3_stream* stream, main_file *xfile) | |||
1309 | { | 1309 | { |
1310 | if (stream->dec_current1.addr >= stream->dec_cpylen) | 1310 | if (stream->dec_current1.addr >= stream->dec_cpylen) |
1311 | { | 1311 | { |
1312 | VC(UT " T@%-6"Z"u", | 1312 | VC(UT " T@%-6"W"u", |
1313 | stream->dec_current1.addr - stream->dec_cpylen)VE; | 1313 | stream->dec_current1.addr - stream->dec_cpylen)VE; |
1314 | } | 1314 | } |
1315 | else | 1315 | else |
@@ -1328,7 +1328,7 @@ main_print_window (xd3_stream* stream, main_file *xfile) | |||
1328 | 1328 | ||
1329 | if (stream->dec_current2.type != XD3_NOOP) | 1329 | if (stream->dec_current2.type != XD3_NOOP) |
1330 | { | 1330 | { |
1331 | VC(UT " %s %6"Z"u", | 1331 | VC(UT " %s %6"W"u", |
1332 | xd3_rtype_to_string ((xd3_rtype) stream->dec_current2.type, | 1332 | xd3_rtype_to_string ((xd3_rtype) stream->dec_current2.type, |
1333 | option_print_cpymode), | 1333 | option_print_cpymode), |
1334 | stream->dec_current2.size)VE; | 1334 | stream->dec_current2.size)VE; |
@@ -1337,7 +1337,7 @@ main_print_window (xd3_stream* stream, main_file *xfile) | |||
1337 | { | 1337 | { |
1338 | if (stream->dec_current2.addr >= stream->dec_cpylen) | 1338 | if (stream->dec_current2.addr >= stream->dec_cpylen) |
1339 | { | 1339 | { |
1340 | VC(UT " T@%-6"Z"u", | 1340 | VC(UT " T@%-6"W"u", |
1341 | stream->dec_current2.addr - stream->dec_cpylen)VE; | 1341 | stream->dec_current2.addr - stream->dec_cpylen)VE; |
1342 | } | 1342 | } |
1343 | else | 1343 | else |
@@ -1357,7 +1357,7 @@ main_print_window (xd3_stream* stream, main_file *xfile) | |||
1357 | (stream->dec_current1.type >= XD3_CPY || | 1357 | (stream->dec_current1.type >= XD3_CPY || |
1358 | stream->dec_current2.type >= XD3_CPY)) | 1358 | stream->dec_current2.type >= XD3_CPY)) |
1359 | { | 1359 | { |
1360 | VC(UT " %06"Q"u (inefficiency) %"Z"u encoded as %"Z"u bytes\n", | 1360 | VC(UT " %06"Q"u (inefficiency) %"W"u encoded as %"W"u bytes\n", |
1361 | stream->dec_winstart + size_before, | 1361 | stream->dec_winstart + size_before, |
1362 | size - size_before, | 1362 | size - size_before, |
1363 | addr_bytes + inst_bytes)VE; | 1363 | addr_bytes + inst_bytes)VE; |
@@ -1425,7 +1425,7 @@ main_print_func (xd3_stream* stream, main_file *xfile) | |||
1425 | if (stream->dec_winstart == 0) | 1425 | if (stream->dec_winstart == 0) |
1426 | { | 1426 | { |
1427 | VC(UT "VCDIFF version: 0\n")VE; | 1427 | VC(UT "VCDIFF version: 0\n")VE; |
1428 | VC(UT "VCDIFF header size: %"Z"u\n", | 1428 | VC(UT "VCDIFF header size: %"W"u\n", |
1429 | stream->dec_hdrsize)VE; | 1429 | stream->dec_hdrsize)VE; |
1430 | VC(UT "VCDIFF header indicator: ")VE; | 1430 | VC(UT "VCDIFF header indicator: ")VE; |
1431 | if ((stream->dec_hdr_ind & VCD_SECONDARY) != 0) | 1431 | if ((stream->dec_hdr_ind & VCD_SECONDARY) != 0) |
@@ -1511,22 +1511,22 @@ main_print_func (xd3_stream* stream, main_file *xfile) | |||
1511 | 1511 | ||
1512 | if (SRCORTGT (stream->dec_win_ind)) | 1512 | if (SRCORTGT (stream->dec_win_ind)) |
1513 | { | 1513 | { |
1514 | VC(UT "VCDIFF copy window length: %"Z"u\n", | 1514 | VC(UT "VCDIFF copy window length: %"W"u\n", |
1515 | stream->dec_cpylen)VE; | 1515 | stream->dec_cpylen)VE; |
1516 | VC(UT "VCDIFF copy window offset: %"Q"u\n", | 1516 | VC(UT "VCDIFF copy window offset: %"Q"u\n", |
1517 | stream->dec_cpyoff)VE; | 1517 | stream->dec_cpyoff)VE; |
1518 | } | 1518 | } |
1519 | 1519 | ||
1520 | VC(UT "VCDIFF delta encoding length: %"Z"u\n", | 1520 | VC(UT "VCDIFF delta encoding length: %"W"u\n", |
1521 | (usize_t)stream->dec_enclen)VE; | 1521 | (usize_t)stream->dec_enclen)VE; |
1522 | VC(UT "VCDIFF target window length: %"Z"u\n", | 1522 | VC(UT "VCDIFF target window length: %"W"u\n", |
1523 | (usize_t)stream->dec_tgtlen)VE; | 1523 | (usize_t)stream->dec_tgtlen)VE; |
1524 | 1524 | ||
1525 | VC(UT "VCDIFF data section length: %"Z"u\n", | 1525 | VC(UT "VCDIFF data section length: %"W"u\n", |
1526 | (usize_t)stream->data_sect.size)VE; | 1526 | (usize_t)stream->data_sect.size)VE; |
1527 | VC(UT "VCDIFF inst section length: %"Z"u\n", | 1527 | VC(UT "VCDIFF inst section length: %"W"u\n", |
1528 | (usize_t)stream->inst_sect.size)VE; | 1528 | (usize_t)stream->inst_sect.size)VE; |
1529 | VC(UT "VCDIFF addr section length: %"Z"u\n", | 1529 | VC(UT "VCDIFF addr section length: %"W"u\n", |
1530 | (usize_t)stream->addr_sect.size)VE; | 1530 | (usize_t)stream->addr_sect.size)VE; |
1531 | 1531 | ||
1532 | ret = 0; | 1532 | ret = 0; |
@@ -1967,7 +1967,7 @@ main_merge_output (xd3_stream *stream, main_file *ofile) | |||
1967 | addr = inst->addr - window_start; | 1967 | addr = inst->addr - window_start; |
1968 | } | 1968 | } |
1969 | IF_DEBUG2 ({ | 1969 | IF_DEBUG2 ({ |
1970 | XPR(NTR "[merge copy] winpos %"Z" take %"Z" " | 1970 | XPR(NTR "[merge copy] winpos %"W" take %"W" " |
1971 | "addr %"Q" mode %u\n", | 1971 | "addr %"Q" mode %u\n", |
1972 | window_pos, take, addr, inst->mode); | 1972 | window_pos, take, addr, inst->mode); |
1973 | }); | 1973 | }); |
@@ -3300,7 +3300,7 @@ main_input (xd3_cmd cmd, | |||
3300 | stream.i_slots_used > stream.iopt_size) | 3300 | stream.i_slots_used > stream.iopt_size) |
3301 | { | 3301 | { |
3302 | XPR(NT "warning: input position %"Q"u overflowed " | 3302 | XPR(NT "warning: input position %"Q"u overflowed " |
3303 | "instruction buffer, needed %"Z"u (vs. %"Z"u), " | 3303 | "instruction buffer, needed %"W"u (vs. %"W"u), " |
3304 | "consider changing -I\n", | 3304 | "consider changing -I\n", |
3305 | stream.current_window * winsize, | 3305 | stream.current_window * winsize, |
3306 | stream.i_slots_used, stream.iopt_size); | 3306 | stream.i_slots_used, stream.iopt_size); |
@@ -3424,10 +3424,10 @@ done: | |||
3424 | if (option_verbose > 1 && cmd == CMD_ENCODE) | 3424 | if (option_verbose > 1 && cmd == CMD_ENCODE) |
3425 | { | 3425 | { |
3426 | XPR(NT "scanner configuration: %s\n", stream.smatcher.name); | 3426 | XPR(NT "scanner configuration: %s\n", stream.smatcher.name); |
3427 | XPR(NT "target hash table size: %"Z"u\n", stream.small_hash.size); | 3427 | XPR(NT "target hash table size: %"W"u\n", stream.small_hash.size); |
3428 | if (sfile != NULL && sfile->filename != NULL) | 3428 | if (sfile != NULL && sfile->filename != NULL) |
3429 | { | 3429 | { |
3430 | XPR(NT "source hash table size: %"Z"u\n", stream.large_hash.size); | 3430 | XPR(NT "source hash table size: %"W"u\n", stream.large_hash.size); |
3431 | } | 3431 | } |
3432 | } | 3432 | } |
3433 | 3433 | ||