diff options
author | josh.macdonald <jmacd@users.noreply.github.com> | 2007-12-27 19:46:36 +0000 |
---|---|---|
committer | josh.macdonald <jmacd@users.noreply.github.com> | 2007-12-27 19:46:36 +0000 |
commit | 2e0d675bf995f9f6e893bd41cb4b14304c6c88ab (patch) | |
tree | daa0cef3fc8e9c3e6d476a17f197e8a90c67cc30 /xdelta3/xdelta3-decode.h | |
parent | b7e82b2ed8eaf661aaa4548e703083474b016f04 (diff) |
Adding more support for "merge" command.
Diffstat (limited to 'xdelta3/xdelta3-decode.h')
-rw-r--r-- | xdelta3/xdelta3-decode.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xdelta3/xdelta3-decode.h b/xdelta3/xdelta3-decode.h index a9c94b4..d67f00a 100644 --- a/xdelta3/xdelta3-decode.h +++ b/xdelta3/xdelta3-decode.h | |||
@@ -19,6 +19,9 @@ | |||
19 | #ifndef _XDELTA3_DECODE_H_ | 19 | #ifndef _XDELTA3_DECODE_H_ |
20 | #define _XDELTA3_DECODE_H_ | 20 | #define _XDELTA3_DECODE_H_ |
21 | 21 | ||
22 | #define SRCORTGT(x) ((((x) & VCD_SRCORTGT) == VCD_SOURCE) ? \ | ||
23 | VCD_SOURCE : ((((x) & VCD_SRCORTGT) == \ | ||
24 | VCD_TARGET) ? VCD_TARGET : 0)) | ||
22 | 25 | ||
23 | /* Return true if the caller must provide a source. Theoretically, | 26 | /* Return true if the caller must provide a source. Theoretically, |
24 | * this has to be checked after every window. It could be that the | 27 | * this has to be checked after every window. It could be that the |
@@ -75,6 +78,7 @@ xd3_decode_setup_buffers (xd3_stream *stream) | |||
75 | stream->space_out = 0; | 78 | stream->space_out = 0; |
76 | } | 79 | } |
77 | 80 | ||
81 | // TODO: VCD_TARGET mode, this is broken | ||
78 | stream->dec_cpyaddrbase = stream->dec_lastwin + | 82 | stream->dec_cpyaddrbase = stream->dec_lastwin + |
79 | (usize_t) (stream->dec_cpyoff - stream->dec_laststart); | 83 | (usize_t) (stream->dec_cpyoff - stream->dec_laststart); |
80 | } | 84 | } |
@@ -399,7 +403,10 @@ xd3_decode_output_halfinst (xd3_stream *stream, xd3_hinst *inst) | |||
399 | { | 403 | { |
400 | /* For VCD_TARGET we know the entire range is | 404 | /* For VCD_TARGET we know the entire range is |
401 | * in-memory, as established by | 405 | * in-memory, as established by |
402 | * decode_setup_buffers. */ | 406 | * decode_setup_buffers. |
407 | * | ||
408 | * TODO: this is totally bogus, VCD_TARGET won't work. | ||
409 | */ | ||
403 | src = stream->dec_cpyaddrbase + inst->addr; | 410 | src = stream->dec_cpyaddrbase + inst->addr; |
404 | inst->type = XD3_NOOP; | 411 | inst->type = XD3_NOOP; |
405 | inst->size = 0; | 412 | inst->size = 0; |
@@ -735,9 +742,6 @@ xd3_decode_input (xd3_stream *stream) | |||
735 | stream->dec_state = (nstate); \ | 742 | stream->dec_state = (nstate); \ |
736 | } while (0) | 743 | } while (0) |
737 | 744 | ||
738 | #define SRCORTGT(x) (((x) & VCD_SRCORTGT) == VCD_SOURCE || \ | ||
739 | ((x) & VCD_SRCORTGT) == VCD_TARGET) | ||
740 | |||
741 | switch (stream->dec_state) | 745 | switch (stream->dec_state) |
742 | { | 746 | { |
743 | case DEC_VCHEAD: | 747 | case DEC_VCHEAD: |