diff options
author | Denys Vlasenko | 2018-02-01 09:13:14 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-02-01 09:13:14 +0100 |
commit | d6f0f03b68fc4cf9ffb8006e192e36f0ebf51ea6 (patch) | |
tree | 24b4adf0a28b91dbcd014cf99527ca07d492003d /archival/gzip.c | |
parent | 99ac1759dd429bd7995feff33dc683589c016c8e (diff) | |
download | busybox-d6f0f03b68fc4cf9ffb8006e192e36f0ebf51ea6.zip busybox-d6f0f03b68fc4cf9ffb8006e192e36f0ebf51ea6.tar.gz |
libarchive: move bbunpack constants to bb_archive.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/gzip.c')
-rw-r--r-- | archival/gzip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index d6737b4..e3dd792 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -2211,16 +2211,16 @@ int gzip_main(int argc UNUSED_PARAM, char **argv) /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */ #if ENABLE_FEATURE_GZIP_LONG_OPTIONS - opt = getopt32long(argv, "cfkv" IF_FEATURE_GZIP_DECOMPRESS("dt") "qn123456789", gzip_longopts); + opt = getopt32long(argv, BBUNPK_OPTSTR IF_FEATURE_GZIP_DECOMPRESS("dt") "n123456789", gzip_longopts); #else - opt = getopt32(argv, "cfkv" IF_FEATURE_GZIP_DECOMPRESS("dt") "qn123456789"); + opt = getopt32(argv, BBUNPK_OPTSTR IF_FEATURE_GZIP_DECOMPRESS("dt") "n123456789"); #endif #if ENABLE_FEATURE_GZIP_DECOMPRESS /* gunzip_main may not be visible... */ - if (opt & 0x30) // -d and/or -t + if (opt & (BBUNPK_OPT_DECOMPRESS|BBUNPK_OPT_TEST)) /* -d and/or -t */ return gunzip_main(argc, argv); #endif #if ENABLE_FEATURE_GZIP_LEVELS - opt >>= ENABLE_FEATURE_GZIP_DECOMPRESS ? 8 : 6; /* drop cfkv[dt]qn bits */ + opt >>= (BBUNPK_OPTSTRLEN IF_FEATURE_GZIP_DECOMPRESS(+ 2) + 1); /* drop cfkvq[dt]n bits */ if (opt == 0) opt = 1 << 6; /* default: 6 */ opt = ffs(opt >> 4); /* Maps -1..-4 to [0], -5 to [1] ... -9 to [5] */ @@ -2229,7 +2229,7 @@ int gzip_main(int argc UNUSED_PARAM, char **argv) max_lazy_match = gzip_level_config[opt].lazy2 * 2; nice_match = gzip_level_config[opt].nice2 * 2; #endif - option_mask32 &= 0xf; /* retain only -cfkv */ + option_mask32 &= BBUNPK_OPTSTRMASK; /* retain only -cfkvq */ /* Allocate all global buffers (for DYN_ALLOC option) */ ALLOC(uch, G1.l_buf, INBUFSIZ); |