udhcpc: fix a problem with binary-encoded options #2
[oweals/busybox.git] / archival / gzip.c
index 0e0b681424e595837d552df974f148c85760e392..31ccab3cd7a5013b3e34ed027c9b7f050676702e 100644 (file)
@@ -55,7 +55,7 @@ aa:      85.1% -- replaced with aa.gz
 //usage:       "-rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
 
 #include "libbb.h"
-#include "archive.h"
+#include "bb_archive.h"
 
 
 /* ===========================================================================
@@ -81,10 +81,14 @@ aa:      85.1% -- replaced with aa.gz
 
 /* ===========================================================================
  */
-#if ENABLE_GZIP_BIG_MEM
+#if   CONFIG_GZIP_FAST == 0
+# define SMALL_MEM
+#elif CONFIG_GZIP_FAST == 1
+# define MEDIUM_MEM
+#elif CONFIG_GZIP_FAST == 2
 # define BIG_MEM
 #else
-# define SMALL_MEM
+# error "Invalid CONFIG_GZIP_FAST value"
 #endif
 
 #ifndef INBUFSIZ
@@ -1175,7 +1179,7 @@ static void gen_codes(ct_data * tree, int max_code)
         * must be all ones.
         */
        Assert(code + G2.bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1,
-                  "inconsistent bit counts");
+                       "inconsistent bit counts");
        Tracev((stderr, "\ngen_codes: max_code %d ", max_code));
 
        for (n = 0; n <= max_code; n++) {
@@ -1523,9 +1527,9 @@ static int ct_tally(int dist, int lc)
                }
                out_length >>= 3;
                Trace((stderr,
-                          "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
-                          G2.last_lit, G2.last_dist, in_length, out_length,
-                          100L - out_length * 100L / in_length));
+                               "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
+                               G2.last_lit, G2.last_dist, in_length, out_length,
+                               100L - out_length * 100L / in_length));
                if (G2.last_dist < G2.last_lit / 2 && out_length < in_length / 2)
                        return 1;
        }
@@ -1617,9 +1621,9 @@ static ulg flush_block(char *buf, ulg stored_len, int eof)
        static_lenb = (G2.static_len + 3 + 7) >> 3;
 
        Trace((stderr,
-                  "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
-                  opt_lenb, G2.opt_len, static_lenb, G2.static_len, stored_len,
-                  G2.last_lit, G2.last_dist));
+                       "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
+                       opt_lenb, G2.opt_len, static_lenb, G2.static_len, stored_len,
+                       G2.last_lit, G2.last_dist));
 
        if (static_lenb <= opt_lenb)
                opt_lenb = static_lenb;
@@ -1657,7 +1661,7 @@ static ulg flush_block(char *buf, ulg stored_len, int eof)
        } else {
                send_bits((DYN_TREES << 1) + eof, 3);
                send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1,
-                                          max_blindex + 1);
+                                       max_blindex + 1);
                compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree);
                G2.compressed_len += 3 + G2.opt_len;
        }
@@ -2011,7 +2015,7 @@ static void zip(ulg time_stamp)
 
 /* ======================================================================== */
 static
-IF_DESKTOP(long long) int FAST_FUNC pack_gzip(unpack_info_t *info UNUSED_PARAM)
+IF_DESKTOP(long long) int FAST_FUNC pack_gzip(transformer_aux_data_t *aux UNUSED_PARAM)
 {
        struct stat s;