diff options
author | yang.zhang <y0169.zhang@samsung.com> | 2016-05-18 11:25:47 +0800 |
---|---|---|
committer | yang.zhang <y0169.zhang@samsung.com> | 2016-05-18 11:27:16 +0800 |
commit | 41c06420b9ff028fd452cec19ac1412be665673f (patch) | |
tree | ece29e014e212b56654888fa3f95f50625164919 /testing/delta.h | |
parent | a96d62621beefe4aa20b696744be6325bc536fb6 (diff) | |
download | xdelta3-devel_psk_20160727.tar.gz xdelta3-devel_psk_20160727.tar.bz2 xdelta3-devel_psk_20160727.zip |
Imported upstream 3.0.8HEADsubmit/trunk/20191101.102136submit/trunk/20191030.112603submit/trunk/20191017.233826submit/trunk/20191017.111201submit/trunk/20190927.012842accepted/tools/devbase/tools/legacy/20240424.050617accepted/tools/devbase/tools/legacy/20240423.040635accepted/tools/devbase/tools/legacy/20240422.110744accepted/tizen/devbase/tools/20190927.044910spin-release-latestrelease-20161231release-20160930release-20160615release-20160531masterdevel_psk_20160727develaccepted/tools_devbase_tools_legacyaccepted/tizen_devbase_tools
Change-Id: I8423a2e4bed8a15b862b6b1ab6f6371c92e78b3f
Diffstat (limited to 'testing/delta.h')
-rw-r--r-- | testing/delta.h | 38 |
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_; |