diff options
author | dotdotisdead <dotdotisdead@a3eca27d-f21b-0410-9b4a-6511e771f64e> | 2007-01-10 13:20:42 +0000 |
---|---|---|
committer | dotdotisdead <dotdotisdead@a3eca27d-f21b-0410-9b4a-6511e771f64e> | 2007-01-10 13:20:42 +0000 |
commit | dd34abf7bac54838473e24d2f8c7eec62646a8cd (patch) | |
tree | 168e155928849f0e9948b4da3988ae949acd1525 /xdelta3/xdelta3-main.h | |
parent | c0bb815c7e93362b17c330c975a3032662349bcc (diff) |
Work on tuning tests.
Diffstat (limited to 'xdelta3/xdelta3-main.h')
-rwxr-xr-x | xdelta3/xdelta3-main.h | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index e80b332..7d03eb7 100755 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h | |||
@@ -242,7 +242,7 @@ static int option_stdout = 0; | |||
242 | static int option_force = 0; | 242 | static int option_force = 0; |
243 | static int option_verbose = 0; | 243 | static int option_verbose = 0; |
244 | static int option_quiet = 0; | 244 | static int option_quiet = 0; |
245 | static int option_level = 6; | 245 | static int option_level = 5; |
246 | static int option_use_appheader = 1; | 246 | static int option_use_appheader = 1; |
247 | static uint8_t* option_appheader = NULL; | 247 | static uint8_t* option_appheader = NULL; |
248 | static int option_use_secondary = /* until-standardized, leave this off */ 0; | 248 | static int option_use_secondary = /* until-standardized, leave this off */ 0; |
@@ -352,6 +352,51 @@ main_config (void) | |||
352 | return EXIT_SUCCESS; | 352 | return EXIT_SUCCESS; |
353 | } | 353 | } |
354 | 354 | ||
355 | static void | ||
356 | reset_defaults() | ||
357 | { | ||
358 | option_stdout = 0; | ||
359 | option_force = 0; | ||
360 | option_verbose = 0; | ||
361 | option_quiet = 0; | ||
362 | option_level = 5; | ||
363 | option_use_appheader = 1; | ||
364 | option_appheader = NULL; | ||
365 | option_use_secondary = 0; | ||
366 | option_secondary = NULL; | ||
367 | option_use_checksum = 1; | ||
368 | option_use_altcodetable = 0; | ||
369 | option_smatch_config = NULL; | ||
370 | option_no_compress = 0; | ||
371 | option_no_output = 0; | ||
372 | option_source_filename = NULL; | ||
373 | option_winsize = XD3_DEFAULT_WINSIZE; | ||
374 | option_srcwinsz = XD3_DEFAULT_SRCWINSZ; | ||
375 | option_srcwinsz_set = 0; | ||
376 | option_profile_cnt = 0; | ||
377 | #if EXTERNAL_COMPRESSION | ||
378 | option_decompress_inputs = 1; | ||
379 | option_recompress_outputs = 1; | ||
380 | #endif | ||
381 | #if VCDIFF_TOOLS | ||
382 | option_print_cpymode = 1; | ||
383 | #endif | ||
384 | program_name = NULL; | ||
385 | appheader_used = NULL; | ||
386 | main_bdata = NULL; | ||
387 | lru_size = 0; | ||
388 | lru = NULL; | ||
389 | do_not_lru = 0; | ||
390 | lru_hits = 0; | ||
391 | lru_misses = 0; | ||
392 | lru_filled = 0; | ||
393 | allow_fake_source = 0; | ||
394 | option_winsize = XD3_DEFAULT_WINSIZE; | ||
395 | option_srcwinsz = XD3_DEFAULT_SRCWINSZ; | ||
396 | option_srcwinsz_set = 0; | ||
397 | option_smatch_config = NULL; | ||
398 | } | ||
399 | |||
355 | static void* | 400 | static void* |
356 | main_malloc1 (usize_t size) | 401 | main_malloc1 (usize_t size) |
357 | { | 402 | { |
@@ -2295,8 +2340,8 @@ main_input (xd3_cmd cmd, | |||
2295 | config.smatcher_soft.long_enough = values[8]; | 2340 | config.smatcher_soft.long_enough = values[8]; |
2296 | config.smatcher_soft.promote = values[9]; | 2341 | config.smatcher_soft.promote = values[9]; |
2297 | } | 2342 | } |
2298 | else if (option_level < 5) { config.smatch_cfg = XD3_SMATCH_FAST; } | 2343 | else if (option_level <= 5) { config.smatch_cfg = XD3_SMATCH_FAST; } |
2299 | else { config.smatch_cfg = XD3_SMATCH_SLOW; } | 2344 | else { config.smatch_cfg = XD3_SMATCH_SLOW; } |
2300 | break; | 2345 | break; |
2301 | #endif | 2346 | #endif |
2302 | case CMD_DECODE: | 2347 | case CMD_DECODE: |
@@ -2353,6 +2398,11 @@ main_input (xd3_cmd cmd, | |||
2353 | return EXIT_FAILURE; | 2398 | return EXIT_FAILURE; |
2354 | } | 2399 | } |
2355 | 2400 | ||
2401 | if (option_verbose > 1) | ||
2402 | { | ||
2403 | XPR(NT "scanner configuration: %s\n", stream.smatcher.name); | ||
2404 | } | ||
2405 | |||
2356 | /* This times each window. */ | 2406 | /* This times each window. */ |
2357 | get_millisecs_since (); | 2407 | get_millisecs_since (); |
2358 | 2408 | ||
@@ -2661,6 +2711,8 @@ main (int argc, char **argv) | |||
2661 | main_file_init (& ofile); | 2711 | main_file_init (& ofile); |
2662 | main_file_init (& sfile); | 2712 | main_file_init (& sfile); |
2663 | 2713 | ||
2714 | reset_defaults(); | ||
2715 | |||
2664 | go: /* Go. */ | 2716 | go: /* Go. */ |
2665 | cmd = CMD_NONE; | 2717 | cmd = CMD_NONE; |
2666 | sfilename = NULL; | 2718 | sfilename = NULL; |