summaryrefslogtreecommitdiff
path: root/xdelta3
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2008-07-07 03:11:00 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2008-07-07 03:11:00 +0000
commite33a66616ed7912db380716310fe0641639cc17d (patch)
tree4fd1e3ec813bcddbe45bd898554b63669f06e599 /xdelta3
parent7dd0248a21ecc9bd0b333d3c251b52faee532549 (diff)
Make these files compile with C++.
Diffstat (limited to 'xdelta3')
-rw-r--r--xdelta3/xdelta3-main.h8
-rw-r--r--xdelta3/xdelta3-merge.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h
index 8a1ccf8..0e16e53 100644
--- a/xdelta3/xdelta3-main.h
+++ b/xdelta3/xdelta3-main.h
@@ -1256,14 +1256,14 @@ main_print_window (xd3_stream* stream, main_file *xfile)
1256 1256
1257 VC(UT " %06"Q"u %03u %s %3u", stream->dec_winstart + size, 1257 VC(UT " %06"Q"u %03u %s %3u", stream->dec_winstart + size,
1258 option_print_cpymode ? code : 0, 1258 option_print_cpymode ? code : 0,
1259 xd3_rtype_to_string (stream->dec_current1.type, option_print_cpymode), 1259 xd3_rtype_to_string ((xd3_rtype) stream->dec_current1.type, option_print_cpymode),
1260 (usize_t) stream->dec_current1.size)VE; 1260 (usize_t) stream->dec_current1.size)VE;
1261 1261
1262 if (stream->dec_current1.type != XD3_NOOP) 1262 if (stream->dec_current1.type != XD3_NOOP)
1263 { 1263 {
1264 if (stream->dec_current1.type >= XD3_CPY) 1264 if (stream->dec_current1.type >= XD3_CPY)
1265 { 1265 {
1266 VC(UT " @%-"Q"6u", 1266 VC(UT " @%-6"Q"u",
1267 stream->dec_cpyoff + stream->dec_current1.addr)VE; 1267 stream->dec_cpyoff + stream->dec_current1.addr)VE;
1268 } 1268 }
1269 else 1269 else
@@ -1277,7 +1277,7 @@ main_print_window (xd3_stream* stream, main_file *xfile)
1277 if (stream->dec_current2.type != XD3_NOOP) 1277 if (stream->dec_current2.type != XD3_NOOP)
1278 { 1278 {
1279 VC(UT " %s %3u", 1279 VC(UT " %s %3u",
1280 xd3_rtype_to_string (stream->dec_current2.type, 1280 xd3_rtype_to_string ((xd3_rtype) stream->dec_current2.type,
1281 option_print_cpymode), 1281 option_print_cpymode),
1282 (usize_t)stream->dec_current2.size)VE; 1282 (usize_t)stream->dec_current2.size)VE;
1283 1283
@@ -1355,7 +1355,7 @@ main_print_func (xd3_stream* stream, main_file *xfile)
1355 1355
1356 if (xfile->snprintf_buf == NULL) 1356 if (xfile->snprintf_buf == NULL)
1357 { 1357 {
1358 if ((xfile->snprintf_buf = main_malloc(SNPRINTF_BUFSIZE)) == NULL) 1358 if ((xfile->snprintf_buf = (uint8_t*)main_malloc(SNPRINTF_BUFSIZE)) == NULL)
1359 { 1359 {
1360 return ENOMEM; 1360 return ENOMEM;
1361 } 1361 }
diff --git a/xdelta3/xdelta3-merge.h b/xdelta3/xdelta3-merge.h
index cd1d7b5..6c03d3e 100644
--- a/xdelta3/xdelta3-merge.h
+++ b/xdelta3/xdelta3-merge.h
@@ -78,7 +78,7 @@ xd3_realloc_buffer (xd3_stream *stream,
78 cur_size = current_units * unit_size; 78 cur_size = current_units * unit_size;
79 new_alloc = xd3_round_blksize (needed * 2, XD3_ALLOCSIZE); 79 new_alloc = xd3_round_blksize (needed * 2, XD3_ALLOCSIZE);
80 80
81 if ((new_buf = xd3_alloc (stream, new_alloc, 1)) == NULL) 81 if ((new_buf = (uint8_t*) xd3_alloc (stream, new_alloc, 1)) == NULL)
82 { 82 {
83 return ENOMEM; 83 return ENOMEM;
84 } 84 }
@@ -475,7 +475,7 @@ int xd3_merge_inputs (xd3_stream *stream,
475 xd3_whole_state *input) 475 xd3_whole_state *input)
476{ 476{
477 int ret = 0; 477 int ret = 0;
478 int input_i; 478 size_t input_i;
479 479
480 /* iterate over each instruction. */ 480 /* iterate over each instruction. */
481 for (input_i = 0; ret == 0 && input_i < input->instlen; ++input_i) 481 for (input_i = 0; ret == 0 && input_i < input->instlen; ++input_i)