Merge tag 'upstream/1.5'
authorBdale Garbee <bdale@gag.com>
Tue, 19 Jun 2012 20:01:51 +0000 (14:01 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 19 Jun 2012 20:01:51 +0000 (14:01 -0600)
Upstream version 1.5

Conflicts:
deflate.c
gzip.1
gzip.c
gzip.doc
lib/getdtablesize.c
lib/sys_stat.in.h
m4/getdtablesize.m4
zless.in

1  2 
configure.ac
deflate.c
doc/gzip.texi
gzip.1
gzip.c
gzip.h

diff --cc configure.ac
index 0919132cc5a43de9621a237c6bf589ef12c01dff,4705ce4b386a68bfc2d730fc3ab0c77791a39905..50cb427731c12a9305d67226f31732a85b90a9c1
@@@ -129,14 -130,8 +130,14 @@@ if test "$gl_gcc_warnings" = yes; the
    AC_SUBST([GNULIB_WARN_CFLAGS])
  fi
  
 +gl_FUNC_GETDTABLESIZE
 +if test $HAVE_GETDTABLESIZE = 0; then
 +  AC_LIBOBJ([getdtablesize])
 +fi
 +gl_UNISTD_MODULE_INDICATOR([getdtablesize])
 +
  # cc -E produces incorrect asm files on SVR4, so postprocess it.
- ASCPPPOST="sed '/^ *#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
+ ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
  AC_SUBST([ASCPPPOST])
  
  AC_CACHE_CHECK([for underline in external names], [gzip_cv_underline],
diff --cc deflate.c
index a551fa3a409d640905fed9e329d10038731f13a5,5405f10eff3f1ec546d00dfe4a57aeb9e4f04243..4a0f3d37b28278a00695d6440c7993d91e6e5845
+++ b/deflate.c
@@@ -217,11 -209,9 +217,11 @@@ local unsigned int max_lazy_match
  local int compr_level;
  /* compression level (1..9) */
  
- unsigned near good_match;
+ unsigned good_match;
  /* Use a faster search when the previous match is longer than this */
  
 +local ulg rsync_sum;  /* rolling sum of rsync window */
 +local ulg rsync_chunk_end; /* next rsync sequence point */
  
  /* Values for max_lazy_match, good_match and max_chain_length, depending on
   * the desired pack level (0..9). The values given below have been tuned to
@@@ -698,18 -654,9 +705,18 @@@ local off_t deflate_fast(
              /* No match, output a literal byte */
              Tracevv((stderr,"%c",window[strstart]));
              flush = ct_tally (0, window[strstart]);
 +          RSYNC_ROLL(strstart, 1);
              lookahead--;
-           strstart++;
+             strstart++;
          }
 +        if (rsync && strstart > rsync_chunk_end) {
 +            ush  attr = 0;          /* ascii/binary flag */
 +
 +            flush = 1;
 +            /* Reset huffman tree */
 +            ct_init(&attr, &method);
 +            rsync_chunk_end = 0xFFFFFFFFUL;
 +        }
          if (flush) FLUSH_BLOCK(0), block_start = strstart;
  
          /* Make sure that we always have enough lookahead, except
diff --cc doc/gzip.texi
Simple merge
diff --cc gzip.1
Simple merge
diff --cc gzip.c
index b867350f08ef11bc43ee344a64f2091c52b9dbe8,35b36031f4f3f9739c442578f7e308e7894eed53..38e1373e474edd30a0a71825b7281d8429948a9c
--- 1/gzip.c
--- 2/gzip.c
+++ b/gzip.c
@@@ -437,55 -435,54 +437,57 @@@ int main (int argc, char **argv
      z_len = strlen(z_suffix);
  
      while ((optc = getopt_long (argc, argv, "ab:cdfhH?lLmMnNqrS:tvVZ123456789",
-                               longopts, (int *)0)) != -1) {
-       switch (optc) {
+                                 longopts, (int *)0)) != -1) {
+         switch (optc) {
          case 'a':
              ascii = 1; break;
-       case 'b':
-           maxbits = atoi(optarg);
-           for (; *optarg; optarg++)
-             if (! ('0' <= *optarg && *optarg <= '9'))
-               {
-                 fprintf (stderr, "%s: -b operand is not an integer\n",
-                          program_name);
-                 try_help ();
-               }
-           break;
-       case 'c':
-           to_stdout = 1; break;
-       case 'd':
-           decompress = 1; break;
-       case 'f':
-           force++; break;
-       case 'h': case 'H':
-           help(); do_exit(OK); break;
-       case 'l':
-           list = decompress = to_stdout = 1; break;
-       case 'L':
-           license(); do_exit(OK); break;
-       case 'm': /* undocumented, may change later */
-           no_time = 1; break;
-       case 'M': /* undocumented, may change later */
-           no_time = 0; break;
-       case 'n':
-           no_name = no_time = 1; break;
-       case 'N':
-           no_name = no_time = 0; break;
-       case 'q':
-           quiet = 1; verbose = 0; break;
-       case 'r':
+         case 'b':
+             maxbits = atoi(optarg);
+             for (; *optarg; optarg++)
+               if (! ('0' <= *optarg && *optarg <= '9'))
+                 {
+                   fprintf (stderr, "%s: -b operand is not an integer\n",
+                            program_name);
+                   try_help ();
+                 }
+             break;
+         case 'c':
+             to_stdout = 1; break;
+         case 'd':
+             decompress = 1; break;
+         case 'f':
+             force++; break;
+         case 'h': case 'H':
+             help(); do_exit(OK); break;
+         case 'l':
+             list = decompress = to_stdout = 1; break;
+         case 'L':
+             license(); do_exit(OK); break;
+         case 'm': /* undocumented, may change later */
+             no_time = 1; break;
+         case 'M': /* undocumented, may change later */
+             no_time = 0; break;
+         case 'n':
+             no_name = no_time = 1; break;
+         case 'N':
+             no_name = no_time = 0; break;
+         case PRESUME_INPUT_TTY_OPTION:
+             presume_input_tty = true; break;
+         case 'q':
+             quiet = 1; verbose = 0; break;
+         case 'r':
  #if NO_DIR
-           fprintf (stderr, "%s: -r not supported on this system\n",
-                    program_name);
-           try_help ();
+             fprintf (stderr, "%s: -r not supported on this system\n",
+                      program_name);
+             try_help ();
  #else
-           recursive = 1;
+             recursive = 1;
  #endif
 -            break;
 -        case 'S':
 +          break;
 +        case 'R':
 +          rsync = 1; break;
 +
 +      case 'S':
  #ifdef NO_MULTIPLE_DOTS
              if (*optarg == '.') optarg++;
  #endif
diff --cc gzip.h
Simple merge