diff options
Diffstat (limited to 'src/xz')
-rw-r--r-- | src/xz/args.c | 9 | ||||
-rw-r--r-- | src/xz/options.c | 61 | ||||
-rw-r--r-- | src/xz/options.h | 7 |
3 files changed, 1 insertions, 76 deletions
diff --git a/src/xz/args.c b/src/xz/args.c index f37f8024..fdd63b44 100644 --- a/src/xz/args.c +++ b/src/xz/args.c @@ -32,8 +32,7 @@ static void parse_real(args_info *args, int argc, char **argv) { enum { - OPT_SUBBLOCK = INT_MIN, - OPT_X86, + OPT_X86 = INT_MIN, OPT_POWERPC, OPT_IA64, OPT_ARM, @@ -92,7 +91,6 @@ parse_real(args_info *args, int argc, char **argv) { "armthumb", optional_argument, NULL, OPT_ARMTHUMB }, { "sparc", optional_argument, NULL, OPT_SPARC }, { "delta", optional_argument, NULL, OPT_DELTA }, - { "subblock", optional_argument, NULL, OPT_SUBBLOCK }, // Other options { "quiet", no_argument, NULL, 'q' }, @@ -234,11 +232,6 @@ parse_real(args_info *args, int argc, char **argv) // Filter setup - case OPT_SUBBLOCK: - coder_add_filter(LZMA_FILTER_SUBBLOCK, - options_subblock(optarg)); - break; - case OPT_X86: coder_add_filter(LZMA_FILTER_X86, options_bcj(optarg)); diff --git a/src/xz/options.c b/src/xz/options.c index 00b34a83..7186f24c 100644 --- a/src/xz/options.c +++ b/src/xz/options.c @@ -139,67 +139,6 @@ parse_options(const char *str, const option_map *opts, } -////////////// -// Subblock // -////////////// - -enum { - OPT_SIZE, - OPT_RLE, - OPT_ALIGN, -}; - - -static void -set_subblock(void *options, uint32_t key, uint64_t value, - const char *valuestr lzma_attribute((unused))) -{ - lzma_options_subblock *opt = options; - - switch (key) { - case OPT_SIZE: - opt->subblock_data_size = value; - break; - - case OPT_RLE: - opt->rle = value; - break; - - case OPT_ALIGN: - opt->alignment = value; - break; - } -} - - -extern lzma_options_subblock * -options_subblock(const char *str) -{ - static const option_map opts[] = { - { "size", NULL, LZMA_SUBBLOCK_DATA_SIZE_MIN, - LZMA_SUBBLOCK_DATA_SIZE_MAX }, - { "rle", NULL, LZMA_SUBBLOCK_RLE_OFF, - LZMA_SUBBLOCK_RLE_MAX }, - { "align",NULL, LZMA_SUBBLOCK_ALIGNMENT_MIN, - LZMA_SUBBLOCK_ALIGNMENT_MAX }, - { NULL, NULL, 0, 0 } - }; - - lzma_options_subblock *options - = xmalloc(sizeof(lzma_options_subblock)); - *options = (lzma_options_subblock){ - .allow_subfilters = false, - .alignment = LZMA_SUBBLOCK_ALIGNMENT_DEFAULT, - .subblock_data_size = LZMA_SUBBLOCK_DATA_SIZE_DEFAULT, - .rle = LZMA_SUBBLOCK_RLE_OFF, - }; - - parse_options(str, opts, &set_subblock, options); - - return options; -} - - /////////// // Delta // /////////// diff --git a/src/xz/options.h b/src/xz/options.h index e7389c8e..61ec8d58 100644 --- a/src/xz/options.h +++ b/src/xz/options.h @@ -10,13 +10,6 @@ // /////////////////////////////////////////////////////////////////////////////// -/// \brief Parser for Subblock options -/// -/// \return Pointer to allocated options structure. -/// Doesn't return on error. -extern lzma_options_subblock *options_subblock(const char *str); - - /// \brief Parser for Delta options /// /// \return Pointer to allocated options structure. |