summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3-main.h
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3/xdelta3-main.h')
-rw-r--r--xdelta3/xdelta3-main.h28
1 files changed, 9 insertions, 19 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h
index acb0ac0..91c9884 100644
--- a/xdelta3/xdelta3-main.h
+++ b/xdelta3/xdelta3-main.h
@@ -1692,22 +1692,13 @@ main_merge_arguments (main_merge_list* merges)
1692 } 1692 }
1693 else 1693 else
1694 { 1694 {
1695 xd3_stream tmp_stream; 1695 /* Merge the recode_stream with merge_input. */
1696 memset (& tmp_stream, 0, sizeof (tmp_stream)); 1696 ret = xd3_merge_input_output (recode_stream,
1697 if ((ret = xd3_config_stream (& tmp_stream, NULL)) || 1697 & merge_input.whole_target);
1698 (ret = xd3_whole_state_init (& tmp_stream)) ||
1699 (ret = xd3_merge_inputs (& tmp_stream,
1700 & merge_input.whole_target,
1701 & recode_stream->whole_target)))
1702 {
1703 XPR(NT XD3_LIB_ERRMSG (&tmp_stream, ret));
1704 }
1705 1698
1706 /* the output is in tmp_stream.whole_state, swap into input */ 1699 /* Save the next merge source in merge_input. */
1707 xd3_swap_whole_state (& merge_input.whole_target, 1700 xd3_swap_whole_state (& recode_stream->whole_target,
1708 & tmp_stream.whole_target); 1701 & merge_input.whole_target);
1709 /* total allocation counts are preserved */
1710 xd3_free_stream (& tmp_stream);
1711 } 1702 }
1712 } 1703 }
1713 1704
@@ -1792,10 +1783,9 @@ main_merge_output (xd3_stream *stream, main_file *ofile)
1792 1783
1793 /* merge_stream is set if there were arguments. this stream's input 1784 /* merge_stream is set if there were arguments. this stream's input
1794 * needs to be applied to the merge_stream source. */ 1785 * needs to be applied to the merge_stream source. */
1795 if (merge_stream != NULL && 1786 if ((merge_stream != NULL) &&
1796 (ret = xd3_merge_inputs (stream, 1787 (ret = xd3_merge_input_output (stream,
1797 & merge_stream->whole_target, 1788 & merge_stream->whole_target)))
1798 & stream->whole_target)))
1799 { 1789 {
1800 XPR(NT XD3_LIB_ERRMSG (stream, ret)); 1790 XPR(NT XD3_LIB_ERRMSG (stream, ret));
1801 return ret; 1791 return ret;