fix "ifdef ENABLE_foo": should always be "#if ENABLE_foo"

function                                             old     new   delta
pack_gzip                                           1729    1789     +60
fill_window                                          220     216      -4
static.gzip_level_config                              24       -     -24
gzip_main                                            275     192     -83
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/2 up/down: 60/-111)           Total: -51 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-06-15 17:11:59 +02:00
parent 45100b8d07
commit 5d72ae53c9
2 changed files with 5 additions and 5 deletions

View File

@ -275,7 +275,7 @@ enum {
* input file length plus MIN_LOOKAHEAD. * input file length plus MIN_LOOKAHEAD.
*/ */
#ifndef ENABLE_FEATURE_GZIP_LEVELS #if !ENABLE_FEATURE_GZIP_LEVELS
max_chain_length = 4096, max_chain_length = 4096,
/* To speed up deflation, hash chains are never searched beyond this length. /* To speed up deflation, hash chains are never searched beyond this length.
@ -314,7 +314,7 @@ enum {
struct globals { struct globals {
#ifdef ENABLE_FEATURE_GZIP_LEVELS #if ENABLE_FEATURE_GZIP_LEVELS
unsigned max_chain_length; unsigned max_chain_length;
unsigned max_lazy_match; unsigned max_lazy_match;
unsigned good_match; unsigned good_match;
@ -2196,7 +2196,7 @@ int gzip_main(int argc UNUSED_PARAM, char **argv)
#endif #endif
{ {
unsigned opt; unsigned opt;
#ifdef ENABLE_FEATURE_GZIP_LEVELS #if ENABLE_FEATURE_GZIP_LEVELS
static const struct { static const struct {
uint8_t good; uint8_t good;
uint8_t chain_shift; uint8_t chain_shift;
@ -2224,7 +2224,7 @@ int gzip_main(int argc UNUSED_PARAM, char **argv)
if (opt & 0x18) // -d and/or -t if (opt & 0x18) // -d and/or -t
return gunzip_main(argc, argv); return gunzip_main(argc, argv);
#endif #endif
#ifdef ENABLE_FEATURE_GZIP_LEVELS #if ENABLE_FEATURE_GZIP_LEVELS
opt >>= ENABLE_FEATURE_GZIP_DECOMPRESS ? 7 : 5; /* drop cfv[dt]qn bits */ opt >>= ENABLE_FEATURE_GZIP_DECOMPRESS ? 7 : 5; /* drop cfv[dt]qn bits */
if (opt == 0) if (opt == 0)
opt = 1 << 6; /* default: 6 */ opt = 1 << 6; /* default: 6 */

View File

@ -34,7 +34,7 @@
struct child; struct child;
#ifdef ENABLE_FEATURE_SHOW_THREADS #if ENABLE_FEATURE_SHOW_THREADS
/* For threads, we add {...} around the comm, so we need two extra bytes */ /* For threads, we add {...} around the comm, so we need two extra bytes */
# define COMM_DISP_LEN (COMM_LEN + 2) # define COMM_DISP_LEN (COMM_LEN + 2)
#else #else