summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3-main.h
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2007-10-21 07:56:34 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2007-10-21 07:56:34 +0000
commit93635ad98b10042bdcbfd8bb139ebb0e795ae26f (patch)
tree8c1a446c74f2165015c7da3c35b4f8d3b2d5df55 /xdelta3/xdelta3-main.h
parentf79ab343e49f89be06ede199a022eb3da07fd36b (diff)
Comments and build with speed_test.cc
Diffstat (limited to 'xdelta3/xdelta3-main.h')
-rw-r--r--xdelta3/xdelta3-main.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h
index 7f75c98..36de366 100644
--- a/xdelta3/xdelta3-main.h
+++ b/xdelta3/xdelta3-main.h
@@ -62,6 +62,9 @@
62#ifndef XD3_WIN32 62#ifndef XD3_WIN32
63#define XD3_WIN32 0 63#define XD3_WIN32 0
64#endif 64#endif
65#ifndef NOT_MAIN
66#define NOT_MAIN 0
67#endif
65 68
66/* Combines xd3_strerror() and strerror() */ 69/* Combines xd3_strerror() and strerror() */
67const char* xd3_mainerror(int err_num); 70const char* xd3_mainerror(int err_num);
@@ -332,8 +335,11 @@ static int main_help (void);
332static int 335static int
333main_version (void) 336main_version (void)
334{ 337{
335 /* $Format: " DP(RINT \"VERSION=3.$Xdelta3Version$\\n\");" $ */ 338 /* $Format: " DP(RINT \"Xdelta version $Xdelta3Version$, Copyright (C) 2007, Joshua MacDonald\n\");" $ */
336 DP(RINT "VERSION=3.0r\n"); 339 DP(RINT "Xdelta version 3.0s_pre0, Copyright (C) 2007, Joshua MacDonald\n");
340 DP(RINT "Xdelta comes with ABSOLUTELY NO WARRANTY.\n");
341 DP(RINT "This is free software, and you are welcome to redistribute it\n");
342 DP(RINT "under certain conditions; see \"COPYING\" for details.\n");
337 return EXIT_SUCCESS; 343 return EXIT_SUCCESS;
338} 344}
339 345
@@ -2141,7 +2147,7 @@ main_set_source (xd3_stream *stream, int cmd, main_file *sfile, xd3_source *sour
2141 sfile->mode = XO_READ; 2147 sfile->mode = XO_READ;
2142 sfile->realname = sfile->filename; 2148 sfile->realname = sfile->filename;
2143 sfile->nread = 0; 2149 sfile->nread = 0;
2144 source->size = UINT64_MAX; 2150 source->size = XOFF_T_MAX;
2145 } 2151 }
2146 else 2152 else
2147 { 2153 {
@@ -2349,8 +2355,8 @@ main_getblk_func (xd3_stream *stream,
2349 return 0; 2355 return 0;
2350 } 2356 }
2351 2357
2352 if (lru[idx].blkno != -1LL && 2358 if (lru[idx].blkno != (xoff_t)-1 &&
2353 lru[idx].blkno != blkno - lru_size) 2359 lru[idx].blkno != (xoff_t)(blkno - lru_size))
2354 { 2360 {
2355 return XD3_TOOFARBACK; 2361 return XD3_TOOFARBACK;
2356 } 2362 }
@@ -2412,7 +2418,7 @@ main_getblk_func (xd3_stream *stream,
2412 2418
2413 if (option_verbose > 3) 2419 if (option_verbose > 3)
2414 { 2420 {
2415 if (blru->blkno != -1LL) 2421 if (blru->blkno != (xoff_t)-1)
2416 { 2422 {
2417 XPR(NT "source block %"Q"u ejects %"Q"u (lru_hits=%u, lru_misses=%u, lru_filled=%u)\n", 2423 XPR(NT "source block %"Q"u ejects %"Q"u (lru_hits=%u, lru_misses=%u, lru_filled=%u)\n",
2418 blkno, blru->blkno, lru_hits, lru_misses, lru_filled); 2424 blkno, blru->blkno, lru_hits, lru_misses, lru_filled);
@@ -2456,8 +2462,10 @@ main_input (xd3_cmd cmd,
2456 xoff_t last_total_out = 0; 2462 xoff_t last_total_out = 0;
2457 long start_time; 2463 long start_time;
2458 int stdout_only = 0; 2464 int stdout_only = 0;
2465#if VCDIFF_TOOLS
2459 int recode_flags; 2466 int recode_flags;
2460 xd3_config recode_config; 2467 xd3_config recode_config;
2468#endif
2461 int (*input_func) (xd3_stream*); 2469 int (*input_func) (xd3_stream*);
2462 int (*output_func) (xd3_stream*, main_file *); 2470 int (*output_func) (xd3_stream*, main_file *);
2463 2471
@@ -3037,7 +3045,7 @@ setup_environment (int argc,
3037} 3045}
3038 3046
3039int 3047int
3040#if PYTHON_MODULE || SWIG_MODULE 3048#if PYTHON_MODULE || SWIG_MODULE || NOT_MAIN
3041xd3_main_cmdline (int argc, char **argv) 3049xd3_main_cmdline (int argc, char **argv)
3042#else 3050#else
3043main (int argc, char **argv) 3051main (int argc, char **argv)
@@ -3420,11 +3428,7 @@ main (int argc, char **argv)
3420static int 3428static int
3421main_help (void) 3429main_help (void)
3422{ 3430{
3423 /* $Format: " DP(RINT \"Xdelta version $Xdelta3Version$, Copyright (C) 2007, Joshua MacDonald\n\");" $ */ 3431 main_version();
3424
3425 DP(RINT "Xdelta comes with ABSOLUTELY NO WARRANTY.\n");
3426 DP(RINT "This is free software, and you are welcome to redistribute it\n");
3427 DP(RINT "under certain conditions; see \"COPYING\" for details.\n");
3428 3432
3429 /* Note: update wiki when command-line features change */ 3433 /* Note: update wiki when command-line features change */
3430 DP(RINT "usage: xdelta3 [command/options] [input [output]]\n"); 3434 DP(RINT "usage: xdelta3 [command/options] [input [output]]\n");