diff options
Diffstat (limited to 'xdelta3/xdelta3-main.h')
-rw-r--r-- | xdelta3/xdelta3-main.h | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index 3b7d11a..d33fd57 100644 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h | |||
@@ -84,7 +84,7 @@ const char* xd3_mainerror(int err_num); | |||
84 | #define PRINTHDR_SPECIAL -4378291 | 84 | #define PRINTHDR_SPECIAL -4378291 |
85 | 85 | ||
86 | /* The number of soft-config variables. */ | 86 | /* The number of soft-config variables. */ |
87 | #define XD3_SOFTCFG_VARCNT 10 | 87 | #define XD3_SOFTCFG_VARCNT 7 |
88 | 88 | ||
89 | /* this is used as in XPR(NT XD3_LIB_ERRMSG (stream, ret)) to print an error message | 89 | /* this is used as in XPR(NT XD3_LIB_ERRMSG (stream, ret)) to print an error message |
90 | * from the library. */ | 90 | * from the library. */ |
@@ -338,7 +338,6 @@ main_config (void) | |||
338 | { | 338 | { |
339 | main_version (); | 339 | main_version (); |
340 | 340 | ||
341 | /* TODO: This needs cleaning up */ | ||
342 | P(RINT "EXTERNAL_COMPRESSION=%d\n", EXTERNAL_COMPRESSION); | 341 | P(RINT "EXTERNAL_COMPRESSION=%d\n", EXTERNAL_COMPRESSION); |
343 | P(RINT "GENERIC_ENCODE_TABLES=%d\n", GENERIC_ENCODE_TABLES); | 342 | P(RINT "GENERIC_ENCODE_TABLES=%d\n", GENERIC_ENCODE_TABLES); |
344 | P(RINT "GENERIC_ENCODE_TABLES_COMPUTE=%d\n", GENERIC_ENCODE_TABLES_COMPUTE); | 343 | P(RINT "GENERIC_ENCODE_TABLES_COMPUTE=%d\n", GENERIC_ENCODE_TABLES_COMPUTE); |
@@ -367,7 +366,6 @@ main_config (void) | |||
367 | static void | 366 | static void |
368 | reset_defaults(void) | 367 | reset_defaults(void) |
369 | { | 368 | { |
370 | // TODO: this is dumb, use an object | ||
371 | option_stdout = 0; | 369 | option_stdout = 0; |
372 | option_force = 0; | 370 | option_force = 0; |
373 | option_verbose = 0; | 371 | option_verbose = 0; |
@@ -720,20 +718,22 @@ main_file_close (main_file *xfile) | |||
720 | static void | 718 | static void |
721 | main_file_cleanup (main_file *xfile) | 719 | main_file_cleanup (main_file *xfile) |
722 | { | 720 | { |
723 | /* TODO: inconsistent code style here */ | 721 | if (main_file_isopen (xfile)) |
724 | if (main_file_isopen (xfile)) { | 722 | { |
725 | main_file_close (xfile); | 723 | main_file_close (xfile); |
726 | } | 724 | } |
727 | 725 | ||
728 | if (xfile->snprintf_buf != NULL) { | 726 | if (xfile->snprintf_buf != NULL) |
729 | main_free(xfile->snprintf_buf); | 727 | { |
730 | xfile->snprintf_buf = NULL; | 728 | main_free(xfile->snprintf_buf); |
731 | } | 729 | xfile->snprintf_buf = NULL; |
730 | } | ||
732 | 731 | ||
733 | if (xfile->filename_copy != NULL) { | 732 | if (xfile->filename_copy != NULL) |
734 | main_free(xfile->filename_copy); | 733 | { |
735 | xfile->filename_copy = NULL; | 734 | main_free(xfile->filename_copy); |
736 | } | 735 | xfile->filename_copy = NULL; |
736 | } | ||
737 | } | 737 | } |
738 | 738 | ||
739 | static int | 739 | static int |
@@ -795,7 +795,6 @@ main_file_stat (main_file *xfile, xoff_t *size, int err_ifnoseek) | |||
795 | } else { | 795 | } else { |
796 | *size = li.QuadPart; | 796 | *size = li.QuadPart; |
797 | } | 797 | } |
798 | // TODO: check err_ifnoseek | ||
799 | #else | 798 | #else |
800 | struct stat sbuf; | 799 | struct stat sbuf; |
801 | if (fstat (XFNO (xfile), & sbuf) < 0) | 800 | if (fstat (XFNO (xfile), & sbuf) < 0) |
@@ -2457,11 +2456,8 @@ main_input (xd3_cmd cmd, | |||
2457 | config.smatcher_soft.small_look = values[2]; | 2456 | config.smatcher_soft.small_look = values[2]; |
2458 | config.smatcher_soft.small_chain = values[3]; | 2457 | config.smatcher_soft.small_chain = values[3]; |
2459 | config.smatcher_soft.small_lchain = values[4]; | 2458 | config.smatcher_soft.small_lchain = values[4]; |
2460 | config.smatcher_soft.ssmatch = values[5]; | 2459 | config.smatcher_soft.max_lazy = values[5]; |
2461 | config.smatcher_soft.try_lazy = values[6]; | 2460 | config.smatcher_soft.long_enough = values[6]; |
2462 | config.smatcher_soft.max_lazy = values[7]; | ||
2463 | config.smatcher_soft.long_enough = values[8]; | ||
2464 | config.smatcher_soft.promote = values[9]; | ||
2465 | } | 2461 | } |
2466 | else | 2462 | else |
2467 | { | 2463 | { |
@@ -2604,7 +2600,7 @@ main_input (xd3_cmd cmd, | |||
2604 | } | 2600 | } |
2605 | 2601 | ||
2606 | /* Check if we have no source name and need one. */ | 2602 | /* Check if we have no source name and need one. */ |
2607 | /* TODO: this doesn't fire due to cpyblocks_ calculation check */ | 2603 | /* TODO: this doesn't fire due to cpyblocks_ calculation check? */ |
2608 | if (need_src && ! recv_src) | 2604 | if (need_src && ! recv_src) |
2609 | { | 2605 | { |
2610 | XPR(NT "input requires a source file, use -s\n"); | 2606 | XPR(NT "input requires a source file, use -s\n"); |