Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/usr.bin/gzip Update the output counter so "gzip -dv" sho...



details:   https://anonhg.NetBSD.org/src/rev/b0d0c9819ed1
branches:  trunk
changeset: 499316:b0d0c9819ed1
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri Nov 17 01:32:27 2000 +0000

description:
Update the output counter so "gzip -dv" show meaningful results for
decompressing bzip2 files.

diffstat:

 gnu/usr.bin/gzip/unbzip2.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 7a001fc82072 -r b0d0c9819ed1 gnu/usr.bin/gzip/unbzip2.c
--- a/gnu/usr.bin/gzip/unbzip2.c        Fri Nov 17 01:31:26 2000 +0000
+++ b/gnu/usr.bin/gzip/unbzip2.c        Fri Nov 17 01:32:27 2000 +0000
@@ -2,7 +2,7 @@
  */
 
 #ifdef RCSID
-static char rcsid[] = "$Id: unbzip2.c,v 1.2 1999/08/20 00:08:57 simonb Exp $";
+static char rcsid[] = "$Id: unbzip2.c,v 1.3 2000/11/17 01:32:27 simonb Exp $";
 #endif
 
 #define BZ_NO_STDIO
@@ -53,6 +53,7 @@
                                n = write(out, outbuf, OUTBUFSIZ - bzs.avail_out);
                                if (n < 0)
                                        write_error();
+                               bytes_out += n;
                        }
                        break;
                }
@@ -61,6 +62,7 @@
                                read_error();
                        if (!test)
                                n = write(out, outbuf, OUTBUFSIZ - bzs.avail_out);
+                       bytes_out += n;
                }
                else {
                        switch (ret) {



Home | Main Index | Thread Index | Old Index