summaryrefslogtreecommitdiff
path: root/xdelta3
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2008-02-11 02:11:30 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2008-02-11 02:11:30 +0000
commit8afc788e59bf5d41a1647444c149826cb29a01d3 (patch)
tree8d4066935b420e88dc1c73d18295f6c468c46865 /xdelta3
parentd9d95ae69315581ec577d4926bc462cac35511ea (diff)
Can't explain how the usize_t->uint32_t changes here solve the problem
described by issue 61, but it's likely the same as issue 66 and I'm going to apply them blindly with TODOs to try and understand it later.
Diffstat (limited to 'xdelta3')
-rw-r--r--xdelta3/xdelta3-test.h2
-rw-r--r--xdelta3/xdelta3.c4
-rw-r--r--xdelta3/xdelta3.h21
3 files changed, 16 insertions, 11 deletions
diff --git a/xdelta3/xdelta3-test.h b/xdelta3/xdelta3-test.h
index 6647cbf..e400d8d 100644
--- a/xdelta3/xdelta3-test.h
+++ b/xdelta3/xdelta3-test.h
@@ -474,7 +474,7 @@ test_decode_integer_end_of_input (xd3_stream *stream, int unused)
474 { \ 474 { \
475 const uint8_t *max; \ 475 const uint8_t *max; \
476 const uint8_t *inp; \ 476 const uint8_t *inp; \
477 TYPE val; \ 477 TYPE val; \
478 \ 478 \
479 DOT (); \ 479 DOT (); \
480 rbuf->next = 0; \ 480 rbuf->next = 0; \
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c
index b047a3c..1800c90 100644
--- a/xdelta3/xdelta3.c
+++ b/xdelta3/xdelta3.c
@@ -1760,7 +1760,7 @@ xd3_emit_bytes (xd3_stream *stream,
1760#define DECODE_INTEGER_TYPE(PART,OFLOW) \ 1760#define DECODE_INTEGER_TYPE(PART,OFLOW) \
1761 while (stream->avail_in != 0) \ 1761 while (stream->avail_in != 0) \
1762 { \ 1762 { \
1763 usize_t next = stream->next_in[0]; \ 1763 usize_t next = stream->next_in[0]; \
1764 \ 1764 \
1765 DECODE_INPUT(1); \ 1765 DECODE_INPUT(1); \
1766 \ 1766 \
@@ -1786,7 +1786,7 @@ xd3_emit_bytes (xd3_stream *stream,
1786#define READ_INTEGER_TYPE(TYPE, OFLOW) \ 1786#define READ_INTEGER_TYPE(TYPE, OFLOW) \
1787 TYPE val = 0; \ 1787 TYPE val = 0; \
1788 const uint8_t *inp = (*inpp); \ 1788 const uint8_t *inp = (*inpp); \
1789 usize_t next; \ 1789 usize_t next; \
1790 \ 1790 \
1791 do \ 1791 do \
1792 { \ 1792 { \
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h
index 0d18c93..4d04b49 100644
--- a/xdelta3/xdelta3.h
+++ b/xdelta3/xdelta3.h
@@ -550,8 +550,8 @@ struct _xd3_dinst
550struct _xd3_hinst 550struct _xd3_hinst
551{ 551{
552 uint8_t type; 552 uint8_t type;
553 usize_t size; 553 uint32_t size; /* TODO: why decode breaks if this is usize_t? */
554 usize_t addr; 554 uint32_t addr; /* TODO: why decode breaks if this is usize_t? */
555}; 555};
556 556
557/* the form of a whole-file instruction */ 557/* the form of a whole-file instruction */
@@ -577,7 +577,7 @@ struct _xd3_desect
577{ 577{
578 const uint8_t *buf; 578 const uint8_t *buf;
579 const uint8_t *buf_max; 579 const uint8_t *buf_max;
580 usize_t size; 580 uint32_t size; /* TODO: why decode breaks if this is usize_t? */
581 usize_t pos; 581 usize_t pos;
582 582
583 /* used in xdelta3-decode.h */ 583 /* used in xdelta3-decode.h */
@@ -857,11 +857,13 @@ struct _xd3_stream
857 857
858 usize_t dec_secondid; /* Optional secondary compressor ID. */ 858 usize_t dec_secondid; /* Optional secondary compressor ID. */
859 859
860 usize_t dec_codetblsz; /* Optional code table: length. */ 860 /* TODO: why decode breaks if this is usize_t? */
861 uint32_t dec_codetblsz; /* Optional code table: length. */
861 uint8_t *dec_codetbl; /* Optional code table: storage. */ 862 uint8_t *dec_codetbl; /* Optional code table: storage. */
862 usize_t dec_codetblbytes; /* Optional code table: position. */ 863 usize_t dec_codetblbytes; /* Optional code table: position. */
863 864
864 usize_t dec_appheadsz; /* Optional application header: 865 /* TODO: why decode breaks if this is usize_t? */
866 uint32_t dec_appheadsz; /* Optional application header:
865 size. */ 867 size. */
866 uint8_t *dec_appheader; /* Optional application header: 868 uint8_t *dec_appheader; /* Optional application header:
867 storage */ 869 storage */
@@ -872,12 +874,15 @@ struct _xd3_stream
872 uint8_t dec_cksum[4]; /* Optional checksum: storage. */ 874 uint8_t dec_cksum[4]; /* Optional checksum: storage. */
873 uint32_t dec_adler32; /* Optional checksum: value. */ 875 uint32_t dec_adler32; /* Optional checksum: value. */
874 876
875 usize_t dec_cpylen; /* length of copy window 877 /* TODO: why decode breaks if this is usize_t? */
878 uint32_t dec_cpylen; /* length of copy window
876 (VCD_SOURCE or VCD_TARGET) */ 879 (VCD_SOURCE or VCD_TARGET) */
877 xoff_t dec_cpyoff; /* offset of copy window 880 xoff_t dec_cpyoff; /* offset of copy window
878 (VCD_SOURCE or VCD_TARGET) */ 881 (VCD_SOURCE or VCD_TARGET) */
879 usize_t dec_enclen; /* length of delta encoding */ 882 /* TODO: why decode breaks if this is usize_t? */
880 usize_t dec_tgtlen; /* length of target window */ 883 uint32_t dec_enclen; /* length of delta encoding */
884 /* TODO: why decode breaks if this is usize_t? */
885 uint32_t dec_tgtlen; /* length of target window */
881 886
882#if USE_UINT64 887#if USE_UINT64
883 uint64_t dec_64part; /* part of a decoded uint64_t */ 888 uint64_t dec_64part; /* part of a decoded uint64_t */