diff options
Diffstat (limited to 'xdelta3/testing/delta.h')
-rw-r--r-- | xdelta3/testing/delta.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/xdelta3/testing/delta.h b/xdelta3/testing/delta.h index af1b211..bd38c6c 100644 --- a/xdelta3/testing/delta.h +++ b/xdelta3/testing/delta.h | |||
@@ -44,7 +44,7 @@ public: | |||
44 | case XD3_WINFINISH: | 44 | case XD3_WINFINISH: |
45 | break; | 45 | break; |
46 | default: | 46 | default: |
47 | DP(RINT "error code %s\n", xd3_strerror (ret)); | 47 | cerr << "decode: " << done; |
48 | abort(); | 48 | abort(); |
49 | } | 49 | } |
50 | } | 50 | } |
@@ -62,23 +62,25 @@ public: | |||
62 | return stream_.whole_target.wininfolen; | 62 | return stream_.whole_target.wininfolen; |
63 | } | 63 | } |
64 | 64 | ||
65 | void Print() const { | 65 | // Note: This does not benefit from -Wformat= checking, due to the |
66 | for (size_t i = 0; i < stream_.whole_target.instlen; i++) { | 66 | // enclosing template. Further, it was not used. |
67 | xd3_winst &winst = stream_.whole_target.inst[i]; | 67 | // void Print() const { |
68 | switch (winst.type) { | 68 | // for (size_t i = 0; i < stream_.whole_target.instlen; i++) { |
69 | case XD3_RUN: | 69 | // xd3_winst &winst = stream_.whole_target.inst[i]; |
70 | DP(RINT "%"Q"u run %u\n", winst.position, winst.size); | 70 | // switch (winst.type) { |
71 | break; | 71 | // case XD3_RUN: |
72 | case XD3_ADD: | 72 | // DP(RINT, "%" Q "u run %" W "u\n", winst.position, winst.size); |
73 | DP(RINT "%"Q"u add %u\n", winst.position, winst.size); | 73 | // break; |
74 | break; | 74 | // case XD3_ADD: |
75 | default: | 75 | // DP(RINT "%" Q "u add %" W "u\n", winst.position, winst.size); |
76 | DP(RINT "%"Q"u copy %u @ %"Q"u (mode %u)\n", | 76 | // break; |
77 | winst.position, winst.size, winst.addr, winst.mode); | 77 | // default: |
78 | break; | 78 | // DP(RINT "%" Q "u copy %" W "u @ %" Q "u (mode %u)\n", |
79 | } | 79 | // winst.position, winst.size, winst.addr, winst.mode); |
80 | } | 80 | // break; |
81 | } | 81 | // } |
82 | // } | ||
83 | // } | ||
82 | 84 | ||
83 | private: | 85 | private: |
84 | xd3_stream stream_; | 86 | xd3_stream stream_; |