summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3-main.h
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3/xdelta3-main.h')
-rwxr-xr-xxdelta3/xdelta3-main.h48
1 files changed, 23 insertions, 25 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h
index 0fe848c..4a84e67 100755
--- a/xdelta3/xdelta3-main.h
+++ b/xdelta3/xdelta3-main.h
@@ -306,7 +306,8 @@ static int main_help (void);
306static int 306static int
307main_version (void) 307main_version (void)
308{ 308{
309 P(RINT "VERSION=3_PRERFC_0\n"); 309 /* $Format: " P(RINT \"VERSION=3.$Xdelta3Version$\\n\");" $ */
310 P(RINT "VERSION=3.0g\n");
310 return EXIT_SUCCESS; 311 return EXIT_SUCCESS;
311} 312}
312 313
@@ -314,31 +315,27 @@ static int
314main_config (void) 315main_config (void)
315{ 316{
316 main_version (); 317 main_version ();
317 /* Compile-time */ 318
318 P(RINT "VCDIFF_TOOLS=%d\n", VCDIFF_TOOLS); 319 P(RINT "EXTERNAL_COMPRESSION=%d\n", EXTERNAL_COMPRESSION);
319 P(RINT "REGRESSION_TEST=%d\n", REGRESSION_TEST);
320 P(RINT "SECONDARY_FGK=%d\n", SECONDARY_FGK);
321 P(RINT "SECONDARY_DJW=%d\n", SECONDARY_DJW);
322 P(RINT "GENERIC_ENCODE_TABLES=%d\n", GENERIC_ENCODE_TABLES); 320 P(RINT "GENERIC_ENCODE_TABLES=%d\n", GENERIC_ENCODE_TABLES);
323 P(RINT "GENERIC_ENCODE_TABLES_COMPUTE=%d\n", GENERIC_ENCODE_TABLES_COMPUTE); 321 P(RINT "GENERIC_ENCODE_TABLES_COMPUTE=%d\n", GENERIC_ENCODE_TABLES_COMPUTE);
324 P(RINT "EXTERNAL_COMPRESSION=%d\n", EXTERNAL_COMPRESSION); 322 P(RINT "REGRESSION_TEST=%d\n", REGRESSION_TEST);
325 P(RINT "XD3_POSIX=%d\n", XD3_POSIX); 323 P(RINT "SECONDARY_DJW=%d\n", SECONDARY_DJW);
326 P(RINT "XD3_DEBUG=%d\n", XD3_DEBUG); 324 P(RINT "SECONDARY_FGK=%d\n", SECONDARY_FGK);
327 P(RINT "XD3_USE_LARGEFILE64=%d\n", XD3_USE_LARGEFILE64); 325 P(RINT "VCDIFF_TOOLS=%d\n", VCDIFF_TOOLS);
328 P(RINT "XD3_ENCODER=%d\n", XD3_ENCODER);
329
330 /* Runtime sizes/command-line */
331 P(RINT "XD3_DEFAULT_WINSIZE=%d\n", XD3_DEFAULT_WINSIZE);
332 P(RINT "XD3_DEFAULT_SRCWINSZ=%d\n", XD3_DEFAULT_SRCWINSZ);
333 P(RINT "XD3_DEFAULT_MEMSIZE=%d\n", XD3_DEFAULT_MEMSIZE);
334
335 /* TODO: the following cannot be set by command-line */
336 P(RINT "XD3_ALLOCSIZE=%d\n", XD3_ALLOCSIZE); 326 P(RINT "XD3_ALLOCSIZE=%d\n", XD3_ALLOCSIZE);
327 P(RINT "XD3_DEBUG=%d\n", XD3_DEBUG);
337 P(RINT "XD3_DEFAULT_CKSUM_SIZE=%d\n", XD3_DEFAULT_CKSUM_ADVANCE); 328 P(RINT "XD3_DEFAULT_CKSUM_SIZE=%d\n", XD3_DEFAULT_CKSUM_ADVANCE);
338 P(RINT "XD3_DEFAULT_IOPT_SIZE=%d\n", XD3_DEFAULT_IOPT_SIZE); 329 P(RINT "XD3_DEFAULT_IOPT_SIZE=%d\n", XD3_DEFAULT_IOPT_SIZE);
330 P(RINT "XD3_DEFAULT_MEMSIZE=%d\n", XD3_DEFAULT_MEMSIZE);
339 P(RINT "XD3_DEFAULT_SPREVSZ=%d\n", XD3_DEFAULT_SPREVSZ); 331 P(RINT "XD3_DEFAULT_SPREVSZ=%d\n", XD3_DEFAULT_SPREVSZ);
332 P(RINT "XD3_DEFAULT_SRCWINSZ=%d\n", XD3_DEFAULT_SRCWINSZ);
333 P(RINT "XD3_DEFAULT_WINSIZE=%d\n", XD3_DEFAULT_WINSIZE);
334 P(RINT "XD3_ENCODER=%d\n", XD3_ENCODER);
340 P(RINT "XD3_HARDMAXWINSIZE=%d\n", XD3_HARDMAXWINSIZE); 335 P(RINT "XD3_HARDMAXWINSIZE=%d\n", XD3_HARDMAXWINSIZE);
341 P(RINT "XD3_NODECOMPRESSSIZE=%d\n", XD3_NODECOMPRESSSIZE); 336 P(RINT "XD3_NODECOMPRESSSIZE=%d\n", XD3_NODECOMPRESSSIZE);
337 P(RINT "XD3_POSIX=%d\n", XD3_POSIX);
338 P(RINT "XD3_USE_LARGEFILE64=%d\n", XD3_USE_LARGEFILE64);
342 339
343 return EXIT_SUCCESS; 340 return EXIT_SUCCESS;
344} 341}
@@ -2213,7 +2210,8 @@ main_input (xd3_cmd cmd,
2213 option_srcwinsz = max(option_srcwinsz, XD3_ALLOCSIZE); 2210 option_srcwinsz = max(option_srcwinsz, XD3_ALLOCSIZE);
2214 option_winsize = max(option_winsize, XD3_ALLOCSIZE); 2211 option_winsize = max(option_winsize, XD3_ALLOCSIZE);
2215 2212
2216 source.blksize = max(XD3_DEFAULT_WINSIZE, option_srcwinsz / 32); 2213 source.blksize = (option_srcwinsz / 32) & ~(XD3_ALLOCSIZE-1);
2214 source.blksize = max(XD3_DEFAULT_WINSIZE, source.blksize);
2217 2215
2218 config.srcwin_maxsz = option_srcwinsz; 2216 config.srcwin_maxsz = option_srcwinsz;
2219 config.winsize = option_winsize; 2217 config.winsize = option_winsize;
@@ -2552,6 +2550,10 @@ main (int argc, char **argv)
2552 char **orig_argv = argv; 2550 char **orig_argv = argv;
2553 int ret; 2551 int ret;
2554 2552
2553 main_file_init (& ifile);
2554 main_file_init (& ofile);
2555 main_file_init (& sfile);
2556
2555 go: /* Go. */ 2557 go: /* Go. */
2556 cmd = CMD_NONE; 2558 cmd = CMD_NONE;
2557 sfilename = NULL; 2559 sfilename = NULL;
@@ -2816,10 +2818,6 @@ main (int argc, char **argv)
2816 XPR(NT "command line: %s\n", buf); 2818 XPR(NT "command line: %s\n", buf);
2817 } 2819 }
2818 2820
2819 main_file_init (& ifile);
2820 main_file_init (& ofile);
2821 main_file_init (& sfile);
2822
2823 ifile.flags = RD_FIRST; 2821 ifile.flags = RD_FIRST;
2824 sfile.flags = RD_FIRST; 2822 sfile.flags = RD_FIRST;
2825 sfile.filename = option_source_filename; 2823 sfile.filename = option_source_filename;
@@ -2930,7 +2928,7 @@ main_help (void)
2930 P(RINT " -0 .. -9 compression level\n"); 2928 P(RINT " -0 .. -9 compression level\n");
2931 P(RINT " -A [apphead] disable/provide application header\n"); 2929 P(RINT " -A [apphead] disable/provide application header\n");
2932 P(RINT " -B blksize source file block size\n"); 2930 P(RINT " -B blksize source file block size\n");
2933 P(RINT " -C soft config (see code)\n"); 2931 P(RINT " -C soft config (see xdelta3-cfgs.h)\n");
2934 P(RINT " -c use stdout instead of default\n"); 2932 P(RINT " -c use stdout instead of default\n");
2935 P(RINT " -D disable external decompression (encode/decode)\n"); 2933 P(RINT " -D disable external decompression (encode/decode)\n");
2936 P(RINT " -d same as decode command\n"); 2934 P(RINT " -d same as decode command\n");
@@ -2946,7 +2944,7 @@ main_help (void)
2946 P(RINT " -R disable external recompression (decode)\n"); 2944 P(RINT " -R disable external recompression (decode)\n");
2947 P(RINT " -S [djw|fgk] disable/enable secondary compression\n"); 2945 P(RINT " -S [djw|fgk] disable/enable secondary compression\n");
2948 P(RINT " -s source source file to copy from (if any)\n"); 2946 P(RINT " -s source source file to copy from (if any)\n");
2949 P(RINT " -T use alternate code table (compatibility testing)\n"); 2947 P(RINT " -T use alternate code table\n");
2950 P(RINT " -v be verbose (max 2)\n"); 2948 P(RINT " -v be verbose (max 2)\n");
2951 P(RINT " -V show version\n"); 2949 P(RINT " -V show version\n");
2952 P(RINT " -W winsize input window buffer size\n"); 2950 P(RINT " -W winsize input window buffer size\n");