summaryrefslogtreecommitdiff
path: root/testing/delta.h
diff options
context:
space:
mode:
authoryang.zhang <y0169.zhang@samsung.com>2016-05-18 11:25:47 +0800
committeryang.zhang <y0169.zhang@samsung.com>2016-05-18 11:27:16 +0800
commit41c06420b9ff028fd452cec19ac1412be665673f (patch)
treeece29e014e212b56654888fa3f95f50625164919 /testing/delta.h
parenta96d62621beefe4aa20b696744be6325bc536fb6 (diff)
downloadxdelta3-devel_psk_20160727.tar.gz
xdelta3-devel_psk_20160727.tar.bz2
xdelta3-devel_psk_20160727.zip
Change-Id: I8423a2e4bed8a15b862b6b1ab6f6371c92e78b3f
Diffstat (limited to 'testing/delta.h')
-rw-r--r--testing/delta.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/testing/delta.h b/testing/delta.h
index deac217..b0cca7c 100644
--- a/testing/delta.h
+++ b/testing/delta.h
@@ -30,7 +30,7 @@ public:
case XD3_WINFINISH:
break;
default:
- cerr << "decode: " << done;
+ DP(RINT "error code %s\n", xd3_strerror (ret));
abort();
}
}
@@ -48,25 +48,23 @@ public:
return stream_.whole_target.wininfolen;
}
-// Note: This does not benefit from -Wformat= checking, due to the
-// enclosing template. Further, it was not used.
-// void Print() const {
-// for (size_t i = 0; i < stream_.whole_target.instlen; i++) {
-// xd3_winst &winst = stream_.whole_target.inst[i];
-// switch (winst.type) {
-// case XD3_RUN:
-// DP(RINT, "%" Q "u run %" W "u\n", winst.position, winst.size);
-// break;
-// case XD3_ADD:
-// DP(RINT "%" Q "u add %" W "u\n", winst.position, winst.size);
-// break;
-// default:
-// DP(RINT "%" Q "u copy %" W "u @ %" Q "u (mode %u)\n",
-// winst.position, winst.size, winst.addr, winst.mode);
-// break;
-// }
-// }
-// }
+ void Print() const {
+ for (size_t i = 0; i < stream_.whole_target.instlen; i++) {
+ 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);
+ break;
+ case XD3_ADD:
+ DP(RINT "%"Q"u add %u\n", winst.position, winst.size);
+ break;
+ default:
+ DP(RINT "%"Q"u copy %u @ %"Q"u (mode %u)\n",
+ winst.position, winst.size, winst.addr, winst.mode);
+ break;
+ }
+ }
+ }
private:
xd3_stream stream_;