Package: xdelta3 / 3.0.8-dfsg-1

Q_not_u Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
--- a/testing/delta.h
+++ b/testing/delta.h
@@ -53,13 +53,13 @@ public:
       xd3_winst &winst = stream_.whole_target.inst[i];
       switch (winst.type) {
       case XD3_RUN: 
-	DP(RINT "%"Q"u run %u\n", winst.position, winst.size);
+	DP(RINT "%"Q" run %u\n", winst.position, winst.size);
 	break;
       case XD3_ADD: 
-	DP(RINT "%"Q"u add %u\n", winst.position, winst.size);
+	DP(RINT "%"Q" add %u\n", winst.position, winst.size);
 	break;
       default:
-	DP(RINT "%"Q"u copy %u @ %"Q"u (mode %u)\n", 
+	DP(RINT "%"Q" copy %u @ %"Q" (mode %u)\n", 
 	   winst.position, winst.size, winst.addr, winst.mode);
 	break;
       }
--- a/testing/regtest.cc
+++ b/testing/regtest.cc
@@ -92,7 +92,7 @@ public:
     bool done = false;
     bool done_after_input = false;
 
-    IF_DEBUG1 (XPR(NTR "source %"Q"u[%"Q"u] target %"Q"u[%lu] winsize %lu\n",
+    IF_DEBUG1 (XPR(NTR "source %"Q"[%"Q"] target %"Q"[%lu] winsize %lu\n",
 		  source_file.Size(), options.block_size,
 		  target_file.Size(), Constants::READ_SIZE,
 		  Constants::WINDOW_SIZE));
@@ -102,7 +102,7 @@ public:
 
       xoff_t blks = target_iterator.Blocks();
 
-      IF_DEBUG2(XPR(NTR "target in %s: %llu..%llu %"Q"u(%"Q"u) verified %"Q"u\n",
+      IF_DEBUG2(XPR(NTR "target in %s: %llu..%llu %"Q"(%"Q") verified %"Q"\n",
 		   encoding ? "encoding" : "decoding",
 		   target_iterator.Offset(),
 		   target_iterator.Offset() + target_block.Size(),
@@ -152,8 +152,8 @@ public:
 	xd3_source *src = (encoding ? &encode_source : &decode_source);
 	Block *block = (encoding ? &encode_source_block : &decode_source_block);
 	if (encoding) {
-	  IF_DEBUG1(XPR(NTR "[srcblock] %"Q"u last srcpos %"Q"u "
-		       "encodepos %"Q"u\n",
+	  IF_DEBUG1(XPR(NTR "[srcblock] %"Q" last srcpos %"Q" "
+		       "encodepos %"Q"\n",
 		       encode_source.getblkno,
 		       encode_stream.match_last_srcpos,
 		       encode_stream.input_position + encode_stream.total_in));
@@ -230,7 +230,7 @@ public:
 			const Options &options) {
     vector<const char*> ecmd;
     char buf[16];
-    snprintf(buf, sizeof(buf), "-B%"Q"u", options.encode_srcwin_maxsz);
+    snprintf(buf, sizeof(buf), "-B%"Q"", options.encode_srcwin_maxsz);
     ecmd.push_back("xdelta3");
     ecmd.push_back(buf);
     ecmd.push_back("-s");
@@ -975,7 +975,7 @@ void UnitTest() {
 // These are Xdelta tests.
 template <class T>
 void MainTest() {
-  XPR(NT "Blocksize %"Q"u readsize %"Q"u windowsize %"Q"u\n", 
+  XPR(NT "Blocksize %"Q" readsize %"Q" windowsize %"Q"\n", 
       T::BLOCK_SIZE, T::READ_SIZE, T::WINDOW_SIZE);
   Regtest<T> regtest;
   TEST(TestEmptyInMemory);
--- a/xdelta3-test.h
+++ b/xdelta3-test.h
@@ -409,7 +409,7 @@ test_compare_files (const char* tgt, con
 	{
 	  if (obuf[i] != rbuf[i])
  	    {
-	      XPR(NT "byte %u (read %u @ %"Q"u) %d != %d\n", 
+	      XPR(NT "byte %u (read %u @ %"Q") %d != %d\n", 
 		  (int)i, (int)oc, offset, obuf[i], rbuf[i]);
 	      diffs++;
 	      return XD3_INTERNAL;
@@ -1787,7 +1787,7 @@ test_command_line_arguments (xd3_stream
       if (ratio >= TEST_ADD_RATIO + TEST_EPSILON)
 	{
 	  XPR(NT "test encode with size ratio %.4f, "
-	     "expected < %.4f (%"Q"u, %"Q"u)\n",
+	     "expected < %.4f (%"Q", %"Q")\n",
 	    ratio, TEST_ADD_RATIO + TEST_EPSILON, dsize, tsize);
 	  stream->msg = "strange encoding";
 	  return XD3_INTERNAL;
@@ -2610,7 +2610,7 @@ test_string_matching (xd3_stream *stream
 	  if (inst->type == XD3_CPY)
 	    {
 	      *rptr++ = '@';
-	      snprintf_func (rptr, rbuf+TESTBUFSIZE-rptr, "%"Q"d", inst->addr);
+	      snprintf_func (rptr, rbuf+TESTBUFSIZE-rptr, "%"Qd, inst->addr);
 	      rptr += strlen (rptr);
 	    }
 
--- a/xdelta3.c
+++ b/xdelta3.c
@@ -2590,7 +2590,7 @@ xd3_getblk (xd3_stream *stream, xoff_t b
       ret = stream->getblk (stream, source, blkno);
       if (ret != 0)
 	{
-	  IF_DEBUG1 (DP(RINT "[getblk] app error blkno %"Q"u: %s\n",
+	  IF_DEBUG1 (DP(RINT "[getblk] app error blkno %"Q": %s\n",
 			blkno, xd3_strerror (ret)));
 	  return ret;
 	}
@@ -2608,8 +2608,8 @@ xd3_getblk (xd3_stream *stream, xoff_t b
 	{
 	  source->frontier_blkno = blkno + 1;
 
-	  IF_DEBUG2 (DP(RINT "[getblk] full source blkno %"Q"u: "
-			"source length unknown %"Q"u\n",
+	  IF_DEBUG2 (DP(RINT "[getblk] full source blkno %"Q": "
+			"source length unknown %"Q"\n",
 			blkno,
 			xd3_source_eof (source)));
 	}
@@ -2618,7 +2618,7 @@ xd3_getblk (xd3_stream *stream, xoff_t b
 	  if (!source->eof_known)
 	    {
 	      IF_DEBUG2 (DP(RINT "[getblk] eof block has %d bytes; "
-			    "source length known %"Q"u\n",
+			    "source length known %"Q"\n",
 			    xd3_bytes_on_srcblk (source, blkno),
 			    xd3_source_eof (source)));
 	      source->eof_known = 1;
@@ -2629,7 +2629,7 @@ xd3_getblk (xd3_stream *stream, xoff_t b
     }
 
   XD3_ASSERT (source->curblk != NULL);
-  IF_DEBUG2 (DP(RINT "[getblk] read source block %"Q"u onblk %u blksize %u\n",
+  IF_DEBUG2 (DP(RINT "[getblk] read source block %"Q" onblk %u blksize %u\n",
 		blkno, source->onblk, source->blksize));
 
   if (blkno == source->max_blkno)
@@ -2690,7 +2690,7 @@ xd3_set_source_and_size (xd3_stream *str
   if (ret == 0)
     {
       stream->src->eof_known = 1;
-      IF_DEBUG2 (DP(RINT "[set source] size known %"Q"u\n",
+      IF_DEBUG2 (DP(RINT "[set source] size known %"Q"\n",
 		    source_size));
 
       xd3_blksize_div(source_size,
@@ -2900,7 +2900,7 @@ xd3_iopt_finish_encoding (xd3_stream *st
 
 	IF_DEBUG2 ({
 	  static int cnt;
-	  DP(RINT "[iopt copy:%d] pos %"Q"u-%"Q"u addr %"Q"u-%"Q"u size %u\n",
+	  DP(RINT "[iopt copy:%d] pos %"Q"-%"Q" addr %"Q"-%"Q" size %u\n",
 		   cnt++,
 		   stream->total_in + inst->pos,
 		   stream->total_in + inst->pos + inst->size,
@@ -2919,7 +2919,7 @@ xd3_iopt_finish_encoding (xd3_stream *st
 
 	IF_DEBUG2 ({
 	  static int cnt;
-	  DP(RINT "[iopt run:%d] pos %"Q"u size %u\n", cnt++, stream->total_in + inst->pos, inst->size);
+	  DP(RINT "[iopt run:%d] pos %"Q" size %u\n", cnt++, stream->total_in + inst->pos, inst->size);
 	});
 	break;
       }
@@ -2933,7 +2933,7 @@ xd3_iopt_finish_encoding (xd3_stream *st
 
 	IF_DEBUG2 ({
 	  static int cnt;
-	  DP(RINT "[iopt add:%d] pos %"Q"u size %u\n", cnt++, stream->total_in + inst->pos, inst->size);
+	  DP(RINT "[iopt add:%d] pos %"Q" size %u\n", cnt++, stream->total_in + inst->pos, inst->size);
 	});
 
 	break;
@@ -3863,7 +3863,7 @@ xd3_encode_input (xd3_stream *stream)
 
       stream->enc_state = ENC_SEARCH;
 
-      IF_DEBUG2 (DP(RINT "[WINSTART:%"Q"u] input bytes %u offset %"Q"u\n",
+      IF_DEBUG2 (DP(RINT "[WINSTART:%"Q"] input bytes %u offset %"Q"\n",
 		    stream->current_window, stream->avail_in,
 		    stream->total_in));
       return XD3_WINSTART;
@@ -4004,7 +4004,7 @@ xd3_encode_input (xd3_stream *stream)
       stream->total_in += (xoff_t) stream->avail_in;
       stream->enc_state = ENC_POSTWIN;
 
-      IF_DEBUG2 (DP(RINT "[WINFINISH:%"Q"u] in=%"Q"u\n",
+      IF_DEBUG2 (DP(RINT "[WINFINISH:%"Q"] in=%"Q"\n",
 		    stream->current_window,
 		    stream->total_in));
       return XD3_WINFINISH;
@@ -4442,13 +4442,13 @@ xd3_source_match_setup (xd3_stream *stre
    * back further than the LRU cache maintaining FIFO discipline, (to
    * avoid seeking). */
   frontier_pos = stream->src->frontier_blkno * stream->src->blksize;
-  IF_DEBUG2(DP(RINT "[match_setup] frontier_pos %"Q"u, srcpos %"Q"u, "
-	       "src->max_winsize %"Q"u\n",
+  IF_DEBUG2(DP(RINT "[match_setup] frontier_pos %"Q", srcpos %"Q", "
+	       "src->max_winsize %"Q"\n",
 	       frontier_pos, srcpos, stream->src->max_winsize));
   if (srcpos < frontier_pos &&
       frontier_pos - srcpos > stream->src->max_winsize) {
     IF_DEBUG1(DP(RINT "[match_setup] rejected due to src->max_winsize "
-		 "distance eof=%"Q"u srcpos=%"Q"u maxsz=%"Q"u\n",
+		 "distance eof=%"Q" srcpos=%"Q" maxsz=%"Q"\n",
 		 xd3_source_eof (stream->src),
 		 srcpos, stream->src->max_winsize));
     goto bad;
@@ -4505,7 +4505,7 @@ xd3_source_match_setup (xd3_stream *stre
 	}
 
       IF_DEBUG2(DP(RINT
-		   "[match_setup] srcpos %"Q"u (tgtpos %"Q"u) "
+		   "[match_setup] srcpos %"Q" (tgtpos %"Q") "
 		   "unrestricted maxback %u maxfwd %u\n",
 		   srcpos,
 		   stream->total_in + stream->input_position,
@@ -4541,7 +4541,7 @@ xd3_source_match_setup (xd3_stream *stre
 	}
 
       IF_DEBUG1(DP(RINT
-		   "[match_setup] srcpos %"Q"u (tgtpos %"Q"u) "
+		   "[match_setup] srcpos %"Q" (tgtpos %"Q") "
 		   "restricted maxback %u maxfwd %u\n",
 		   srcpos,
 		   stream->total_in + stream->input_position,
@@ -4620,7 +4620,7 @@ xd3_source_extend_match (xd3_stream *str
   usize_t tryrem;    /* tryrem is the number of matchable bytes */
   usize_t matched;
 
-  IF_DEBUG2(DP(RINT "[extend match] srcpos %"Q"u\n",
+  IF_DEBUG2(DP(RINT "[extend match] srcpos %"Q"\n",
 	       stream->match_srcpos));
 
   XD3_ASSERT (src != NULL);
@@ -4658,7 +4658,7 @@ xd3_source_extend_match (xd3_stream *str
 
 	  tryrem = min (tryoff, stream->match_maxback - stream->match_back);
 
-	  IF_DEBUG2(DP(RINT "[maxback] maxback %u trysrc %"Q"u/%u tgt %u tryrem %u\n",
+	  IF_DEBUG2(DP(RINT "[maxback] maxback %u trysrc %"Q"/%u tgt %u tryrem %u\n",
 		       stream->match_maxback, tryblk, tryoff, streamoff, tryrem));
 
 	  /* TODO: This code can be optimized similar to xd3_match_forward() */
@@ -4783,7 +4783,7 @@ xd3_source_extend_match (xd3_stream *str
 
       IF_DEBUG2 ({
 	static int x = 0;
-	DP(RINT "[source match:%d] <inp %"Q"u %"Q"u>  <src %"Q"u %"Q"u> (%s) [ %u bytes ]\n",
+	DP(RINT "[source match:%d] <inp %"Q" %"Q">  <src %"Q" %"Q"> (%s) [ %u bytes ]\n",
 	   x++,
 	   stream->total_in + target_position,
 	   stream->total_in + target_position + match_length,
@@ -5110,13 +5110,13 @@ xd3_srcwin_move_point (xd3_stream *strea
  	      ret = XD3_INTERNAL;
 	    }
 	  IF_DEBUG1 (DP(RINT
-			"[srcwin_move_point] async getblk return for %"Q"u\n",
+			"[srcwin_move_point] async getblk return for %"Q"\n",
 			blkno));
 	  return ret;
 	}
 
       IF_DEBUG1 (DP(RINT
-		    "[srcwin_move_point] T=%"Q"u{%"Q"u} S=%"Q"u EOF=%"Q"u %s\n",
+		    "[srcwin_move_point] T=%"Q"{%"Q"} S=%"Q" EOF=%"Q" %s\n",
 		    stream->total_in + stream->input_position,
 		    logical_input_cksum_pos,
 		    stream->srcwin_cksum_pos,
@@ -5164,8 +5164,8 @@ xd3_srcwin_move_point (xd3_stream *strea
     }
 
   IF_DEBUG1 (DP(RINT
-		"[srcwin_move_point] exited loop T=%"Q"u{%"Q"u} "
-		"S=%"Q"u EOF=%"Q"u %s\n",
+		"[srcwin_move_point] exited loop T=%"Q"{%"Q"} "
+		"S=%"Q" EOF=%"Q" %s\n",
 		stream->total_in + stream->input_position,
 		logical_input_cksum_pos,
 		stream->srcwin_cksum_pos,
--- a/xdelta3-blkcache.h
+++ b/xdelta3-blkcache.h
@@ -246,7 +246,7 @@ main_set_source (xd3_stream *stream, xd3
 
       if (sfile->size_known)
 	{
-	  short_sprintf (srcszbuf, "source size %s [%"Q"u]",
+	  short_sprintf (srcszbuf, "source size %s [%"Q"]",
 			 main_format_bcnt (source_size, &srccntbuf),
 			 source_size);
 	}
@@ -366,7 +366,7 @@ main_read_seek_source (xd3_stream *strea
 	  if (!option_quiet)
 	    {
 	      XPR(NT "source can't seek backwards; requested block offset "
-		  "%"Q"u source position is %"Q"u\n",
+		  "%"Q" source position is %"Q"\n",
 		  pos, sfile->source_position);
 	    }
 
@@ -386,7 +386,7 @@ main_read_seek_source (xd3_stream *strea
 
 	  if (option_verbose > 1)
 	    {
-	      XPR(NT "seek error at offset %"Q"u: %s\n",
+	      XPR(NT "seek error at offset %"Q": %s\n",
 		  pos, xd3_mainerror (ret));
 	    }
 	}
@@ -395,7 +395,7 @@ main_read_seek_source (xd3_stream *strea
 
       if (option_verbose > 1 && pos != sfile->source_position)
 	{
-	  XPR(NT "non-seekable source skipping %"Q"u bytes @ %"Q"u\n",
+	  XPR(NT "non-seekable source skipping %"Q" bytes @ %"Q"\n",
 	      pos - sfile->source_position,
 	      sfile->source_position);
 	}
@@ -440,7 +440,7 @@ main_read_seek_source (xd3_stream *strea
 	  sfile->source_position += nread;
 	  blru->size = nread;
 
-	  IF_DEBUG1 (DP(RINT "[getblk] skip blkno %"Q"u size %u\n",
+	  IF_DEBUG1 (DP(RINT "[getblk] skip blkno %"Q" size %u\n",
 			skip_blkno, blru->size));
 
 	  XD3_ASSERT (sfile->source_position <= pos);
@@ -536,20 +536,20 @@ main_getblk_func (xd3_stream *stream,
 	{
 	  if (blru->blkno != blkno)
 	    {
-	      XPR(NT "source block %"Q"u read %zu ejects %"Q"u (lru_hits=%u, "
+	      XPR(NT "source block %"Q" read %zu ejects %"Q" (lru_hits=%u, "
 		  "lru_misses=%u, lru_filled=%u)\n",
 		  blkno, nread, blru->blkno, lru_hits, lru_misses, lru_filled);
 	    }
 	  else
 	    {
-	      XPR(NT "source block %"Q"u read %zu (lru_hits=%u, "
+	      XPR(NT "source block %"Q" read %zu (lru_hits=%u, "
 		  "lru_misses=%u, lru_filled=%u)\n",
 		  blkno, nread, lru_hits, lru_misses, lru_filled);
 	    }
 	}
       else
 	{
-	  XPR(NT "source block %"Q"u read %zu (lru_hits=%u, lru_misses=%u, "
+	  XPR(NT "source block %"Q" read %zu (lru_hits=%u, lru_misses=%u, "
 	      "lru_filled=%u)\n", blkno, nread, 
 	      lru_hits, lru_misses, lru_filled);
 	}
@@ -561,8 +561,8 @@ main_getblk_func (xd3_stream *stream,
   blru->size       = nread;
   blru->blkno      = blkno;
 
-  IF_DEBUG1 (DP(RINT "[main_getblk] blkno %"Q"u onblk %zu pos %"Q"u "
-		"srcpos %"Q"u\n",
+  IF_DEBUG1 (DP(RINT "[main_getblk] blkno %"Q" onblk %zu pos %"Q" "
+		"srcpos %"Q"\n",
 		blkno, nread, pos, sfile->source_position));
 
   return 0;
--- a/xdelta3-decode.h
+++ b/xdelta3-decode.h
@@ -224,7 +224,7 @@ xd3_decode_parse_halfinst (xd3_stream *s
     {
       IF_DEBUG2 ({
 	static int cnt = 0;
-	XPR(NT "DECODE:%u: COPY at %"Q"u (winoffset %u) size %u winaddr %u\n",
+	XPR(NT "DECODE:%u: COPY at %"Q" (winoffset %u) size %u winaddr %u\n",
 		 cnt++,
 		 stream->total_out + (stream->dec_position -
 				      stream->dec_cpylen),
@@ -265,7 +265,7 @@ xd3_decode_parse_halfinst (xd3_stream *s
 	if (inst->type == XD3_ADD)
 	  {
 	    static int cnt;
-	    XPR(NT "DECODE:%d: ADD at %"Q"u (winoffset %u) size %u\n",
+	    XPR(NT "DECODE:%d: ADD at %"Q" (winoffset %u) size %u\n",
 	       cnt++,
 	       (stream->total_out + stream->dec_position - stream->dec_cpylen),
 	       stream->dec_position - stream->dec_cpylen,
@@ -275,7 +275,7 @@ xd3_decode_parse_halfinst (xd3_stream *s
 	  {
 	    static int cnt;
 	    XD3_ASSERT (inst->type == XD3_RUN);
-	    XPR(NT "DECODE:%d: RUN at %"Q"u (winoffset %u) size %u\n",
+	    XPR(NT "DECODE:%d: RUN at %"Q" (winoffset %u) size %u\n",
 	       cnt++,
 	       stream->total_out + stream->dec_position - stream->dec_cpylen,
 	       stream->dec_position - stream->dec_cpylen,
@@ -453,7 +453,7 @@ xd3_decode_output_halfinst (xd3_stream *
 		if ((source->onblk != blksize) &&
 		    (blkoff + take > source->onblk))
 		  {
-		    IF_DEBUG1 (XPR(NT "[srcfile] short at blkno %"Q"u onblk "
+		    IF_DEBUG1 (XPR(NT "[srcfile] short at blkno %"Q" onblk "
 				   "%u blksize %u blkoff %u take %u\n",
 				   block,
 				   source->onblk,
@@ -936,7 +936,7 @@ xd3_decode_input (xd3_stream *stream)
 
 	stream->dec_state = DEC_CPYLEN;
 
-	IF_DEBUG2 (DP(RINT "--------- TARGET WINDOW %"Q"u -----------\n",
+	IF_DEBUG2 (DP(RINT "--------- TARGET WINDOW %"Q" -----------\n",
 		      stream->current_window));
       }
 
@@ -1093,8 +1093,8 @@ xd3_decode_input (xd3_stream *stream)
 			  &src->cpyoff_blkoff);
 	  
 	  IF_DEBUG1(DP(RINT
-		       "decode cpyoff %"Q"u "
-		       "cpyblkno %"Q"u "
+		       "decode cpyoff %"Q" "
+		       "cpyblkno %"Q" "
 		       "cpyblkoff %u "
 		       "blksize %u\n",
 		       stream->dec_cpyoff,
--- a/xdelta3-main.h
+++ b/xdelta3-main.h
@@ -616,7 +616,7 @@ main_format_bcnt (xoff_t r, shortbuf *bu
 
       if (r >= 100 && r < 1000)
 	{
-	  short_sprintf (*buf, "%"Q"u %s", r, fmts[i]);
+	  short_sprintf (*buf, "%"Q" %s", r, fmts[i]);
 	  return buf->buf;
 	}
 
@@ -716,12 +716,12 @@ main_atoux (const char* arg, xoff_t *xo,
 
   if (x < low)
     {
-      XPR(NT "-%c: minimum value: %"Q"u\n", which, low);
+      XPR(NT "-%c: minimum value: %"Q"\n", which, low);
       return EXIT_FAILURE;
     }
   if (high != 0 && x > high)
     {
-      XPR(NT "-%c: maximum value: %"Q"u\n", which, high);
+      XPR(NT "-%c: maximum value: %"Q"\n", which, high);
       return EXIT_FAILURE;
     }
   (*xo) = x;
@@ -1296,7 +1296,7 @@ main_print_window (xd3_stream* stream, m
 
       if ((ret = xd3_decode_instruction (stream)))
 	{
-	  XPR(NT "instruction decode error at %"Q"u: %s\n",
+	  XPR(NT "instruction decode error at %"Q": %s\n",
 	      stream->dec_winstart + size, stream->msg);
 	  return ret;
 	}
@@ -1487,7 +1487,7 @@ main_print_func (xd3_stream* stream, mai
       VC(UT "\n")VE;
     }
 
-  VC(UT "VCDIFF window number:         %"Q"u\n", stream->current_window)VE;
+  VC(UT "VCDIFF window number:         %"Q"\n", stream->current_window)VE;
   VC(UT "VCDIFF window indicator:      ")VE;
   if ((stream->dec_win_ind & VCD_SOURCE) != 0) VC(UT "VCD_SOURCE ")VE;
   if ((stream->dec_win_ind & VCD_TARGET) != 0) VC(UT "VCD_TARGET ")VE;
@@ -1513,14 +1513,14 @@ main_print_func (xd3_stream* stream, mai
 
   if (stream->dec_winstart != 0)
     {
-      VC(UT "VCDIFF window at offset:      %"Q"u\n", stream->dec_winstart)VE;
+      VC(UT "VCDIFF window at offset:      %"Q"\n", stream->dec_winstart)VE;
     }
 
   if (SRCORTGT (stream->dec_win_ind))
     {
       VC(UT "VCDIFF copy window length:    %u\n",
 	 (usize_t)stream->dec_cpylen)VE;
-      VC(UT "VCDIFF copy window offset:    %"Q"u\n",
+      VC(UT "VCDIFF copy window offset:    %"Q"\n",
 	 stream->dec_cpyoff)VE;
     }
 
@@ -1973,7 +1973,7 @@ main_merge_output (xd3_stream *stream, m
 		  XD3_ASSERT (inst->addr >= window_start);
 		  addr = inst->addr - window_start;
 		}
-	      IF_DEBUG2 (XPR(NTR "[merge copy] winpos %u take %u addr %"Q"u mode %u\n",
+	      IF_DEBUG2 (XPR(NTR "[merge copy] winpos %u take %u addr %"Q" mode %u\n",
 			    window_pos, take, addr, inst->mode));
 	      if ((ret = xd3_found_match (recode_stream, window_pos, take,
 					  addr, inst->mode != 0)))
@@ -2249,7 +2249,7 @@ main_pipe_copier (uint8_t     *pipe_buf,
 
   if (option_verbose && skipped != 0)
     {
-      XPR(NT "skipping %"Q"u bytes in %s\n",
+      XPR(NT "skipping %"Q" bytes in %s\n",
 	  skipped, ifile->filename);
     }
   return 0;
@@ -3290,7 +3290,7 @@ main_input (xd3_cmd     cmd,
 		    /* Warn when no source copies are found */
 		    if (option_verbose && ! xd3_encoder_used_source (& stream))
 		      {
-			XPR(NT "warning: input window %"Q"u..%"Q"u has "
+			XPR(NT "warning: input window %"Q"..%"Q" has "
 			    "no source copies\n",
 			    stream.current_window * winsize,
 			    (stream.current_window+1) * winsize);
@@ -3303,7 +3303,7 @@ main_input (xd3_cmd     cmd,
 			stream.srcwin_decided_early &&
 			stream.i_slots_used > stream.iopt_size)
 		      {
-			XPR(NT "warning: input position %"Q"u overflowed "
+			XPR(NT "warning: input position %"Q" overflowed "
 			    "instruction buffer, needed %u (vs. %u), "
 			    "consider changing -I\n",
 			    stream.current_window * winsize,
@@ -3327,7 +3327,7 @@ main_input (xd3_cmd     cmd,
 
 		    if (option_verbose > 1)
 		      {
-			XPR(NT "%"Q"u: in %s (%s): out %s (%s): "
+			XPR(NT "%"Q": in %s (%s): out %s (%s): "
 			    "total in %s: out %s: %s: srcpos %s\n",
 			    stream.current_window,
 			    main_format_bcnt (this_read, &rdb),
@@ -3341,7 +3341,7 @@ main_input (xd3_cmd     cmd,
 		      }
 		    else
 		      {
-			XPR(NT "%"Q"u: in %s: out %s: total in %s: "
+			XPR(NT "%"Q": in %s: out %s: total in %s: "
 			    "out %s: %s\n",
  			    stream.current_window,
 			    main_format_bcnt (this_read, &rdb),
@@ -3437,12 +3437,12 @@ done:
 
   if (option_verbose > 2 && cmd == CMD_ENCODE)
     {
-      XPR(NT "source copies: %"Q"u (%"Q"u bytes)\n",
+      XPR(NT "source copies: %"Q" (%"Q" bytes)\n",
 	  stream.n_scpy, stream.l_scpy);
-      XPR(NT "target copies: %"Q"u (%"Q"u bytes)\n",
+      XPR(NT "target copies: %"Q" (%"Q" bytes)\n",
 	  stream.n_tcpy, stream.l_tcpy);
-      XPR(NT "adds: %"Q"u (%"Q"u bytes)\n", stream.n_add, stream.l_add);
-      XPR(NT "runs: %"Q"u (%"Q"u bytes)\n", stream.n_run, stream.l_run);
+      XPR(NT "adds: %"Q" (%"Q" bytes)\n", stream.n_add, stream.l_add);
+      XPR(NT "runs: %"Q" (%"Q" bytes)\n", stream.n_run, stream.l_run);
     }
 #endif
 
@@ -3454,7 +3454,7 @@ done:
       long end_time = get_millisecs_now ();
       xoff_t nwrite = ofile != NULL ? ofile->nwrite : 0;
 
-      XPR(NT "finished in %s; input %"Q"u output %"Q"u bytes (%0.2f%%)\n",
+      XPR(NT "finished in %s; input %"Q" output %"Q" bytes (%0.2f%%)\n",
 	  main_format_millis (end_time - start_time, &tm),
 	  ifile->nread, nwrite, 100.0 * nwrite / ifile->nread);
     }