summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3.h
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2008-04-09 02:53:26 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2008-04-09 02:53:26 +0000
commita5fcf7340127e5f55b7cec9af06dcf2386d2dbdb (patch)
treec457f8b641dd15a308163d29e59f5d325c626c7c /xdelta3/xdelta3.h
parent46055387b76e4a5732fbc9896b28bbb16ede81d7 (diff)
Add mechanism for processing merge arguments in order, memory
management for xd3_whole_target structures being passed between arguments-processing and main merge_output function.
Diffstat (limited to 'xdelta3/xdelta3.h')
-rw-r--r--xdelta3/xdelta3.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h
index 9b009f1..d77649f 100644
--- a/xdelta3/xdelta3.h
+++ b/xdelta3/xdelta3.h
@@ -248,6 +248,7 @@ typedef struct _xd3_config xd3_config;
248typedef struct _xd3_code_table_desc xd3_code_table_desc; 248typedef struct _xd3_code_table_desc xd3_code_table_desc;
249typedef struct _xd3_code_table_sizes xd3_code_table_sizes; 249typedef struct _xd3_code_table_sizes xd3_code_table_sizes;
250typedef struct _xd3_slist xd3_slist; 250typedef struct _xd3_slist xd3_slist;
251typedef struct _xd3_whole_state xd3_whole_state;
251 252
252/* The stream configuration has three callbacks functions, all of 253/* The stream configuration has three callbacks functions, all of
253 * which may be supplied with NULL values. If config->getblk is 254 * which may be supplied with NULL values. If config->getblk is
@@ -636,6 +637,16 @@ struct _xd3_slist
636 usize_t last_pos; 637 usize_t last_pos;
637}; 638};
638 639
640/* whole state for, e.g., merge */
641struct _xd3_whole_state {
642 usize_t addslen;
643 uint8_t *adds;
644 usize_t adds_alloc;
645 usize_t instlen;
646 xd3_winst *inst;
647 usize_t inst_alloc;
648};
649
639/******************************************************************** 650/********************************************************************
640 public types 651 public types
641 *******************************************************************/ 652 *******************************************************************/
@@ -944,12 +955,7 @@ struct _xd3_stream
944 955
945 /* state for reconstructing whole files (e.g., for merge), this only 956 /* state for reconstructing whole files (e.g., for merge), this only
946 * supports loading USIZE_T_MAX instructions, adds, etc. */ 957 * supports loading USIZE_T_MAX instructions, adds, etc. */
947 usize_t whole_target_addslen; 958 xd3_whole_state whole_target;
948 uint8_t *whole_target_adds;
949 usize_t whole_target_adds_alloc;
950 usize_t whole_target_instlen;
951 xd3_winst *whole_target_inst;
952 usize_t whole_target_inst_alloc;
953 959
954 /* statistics */ 960 /* statistics */
955 xoff_t n_scpy; 961 xoff_t n_scpy;