aboutsummaryrefslogtreecommitdiff
path: root/archival/gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/gzip.c')
-rw-r--r--archival/gzip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index d6737b492..e3dd79291 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -2211,16 +2211,16 @@ int gzip_main(int argc UNUSED_PARAM, char **argv)
2211 2211
2212 /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */ 2212 /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
2213#if ENABLE_FEATURE_GZIP_LONG_OPTIONS 2213#if ENABLE_FEATURE_GZIP_LONG_OPTIONS
2214 opt = getopt32long(argv, "cfkv" IF_FEATURE_GZIP_DECOMPRESS("dt") "qn123456789", gzip_longopts); 2214 opt = getopt32long(argv, BBUNPK_OPTSTR IF_FEATURE_GZIP_DECOMPRESS("dt") "n123456789", gzip_longopts);
2215#else 2215#else
2216 opt = getopt32(argv, "cfkv" IF_FEATURE_GZIP_DECOMPRESS("dt") "qn123456789"); 2216 opt = getopt32(argv, BBUNPK_OPTSTR IF_FEATURE_GZIP_DECOMPRESS("dt") "n123456789");
2217#endif 2217#endif
2218#if ENABLE_FEATURE_GZIP_DECOMPRESS /* gunzip_main may not be visible... */ 2218#if ENABLE_FEATURE_GZIP_DECOMPRESS /* gunzip_main may not be visible... */
2219 if (opt & 0x30) // -d and/or -t 2219 if (opt & (BBUNPK_OPT_DECOMPRESS|BBUNPK_OPT_TEST)) /* -d and/or -t */
2220 return gunzip_main(argc, argv); 2220 return gunzip_main(argc, argv);
2221#endif 2221#endif
2222#if ENABLE_FEATURE_GZIP_LEVELS 2222#if ENABLE_FEATURE_GZIP_LEVELS
2223 opt >>= ENABLE_FEATURE_GZIP_DECOMPRESS ? 8 : 6; /* drop cfkv[dt]qn bits */ 2223 opt >>= (BBUNPK_OPTSTRLEN IF_FEATURE_GZIP_DECOMPRESS(+ 2) + 1); /* drop cfkvq[dt]n bits */
2224 if (opt == 0) 2224 if (opt == 0)
2225 opt = 1 << 6; /* default: 6 */ 2225 opt = 1 << 6; /* default: 6 */
2226 opt = ffs(opt >> 4); /* Maps -1..-4 to [0], -5 to [1] ... -9 to [5] */ 2226 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)
2229 max_lazy_match = gzip_level_config[opt].lazy2 * 2; 2229 max_lazy_match = gzip_level_config[opt].lazy2 * 2;
2230 nice_match = gzip_level_config[opt].nice2 * 2; 2230 nice_match = gzip_level_config[opt].nice2 * 2;
2231#endif 2231#endif
2232 option_mask32 &= 0xf; /* retain only -cfkv */ 2232 option_mask32 &= BBUNPK_OPTSTRMASK; /* retain only -cfkvq */
2233 2233
2234 /* Allocate all global buffers (for DYN_ALLOC option) */ 2234 /* Allocate all global buffers (for DYN_ALLOC option) */
2235 ALLOC(uch, G1.l_buf, INBUFSIZ); 2235 ALLOC(uch, G1.l_buf, INBUFSIZ);