Hello community,
here is the log from the commit of package perl-Compress-Bzip2 for
openSUSE:Factory checked in at 2015-02-10 20:21:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Compress-Bzip2 (Old)
and /work/SRC/openSUSE:Factory/.perl-Compress-Bzip2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Compress-Bzip2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Compress-Bzip2/perl-Compress-Bzip2.changes
2014-09-17 17:25:50.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Compress-Bzip2.new/perl-Compress-Bzip2.changes
2015-02-10 20:21:31.000000000 +0100
@@ -1,0 +2,10 @@
+Fri Feb 6 13:13:05 UTC 2015 - [email protected]
+
+- updated to 2.20
+ - fixed generated SIGNATURE (EUMM parallel make issue)
+
+ 2.20 2015-01-15 rurban
+ - Convert README to markdown, mention the preferred IO::Compress::Bzip2 in
+ the docs (done by Pattarawat Chormai, GH PR #2)
+
+-------------------------------------------------------------------
Old:
----
Compress-Bzip2-2.18.tar.gz
New:
----
Compress-Bzip2-2.20.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Compress-Bzip2.spec ++++++
--- /var/tmp/diff_new_pack.eeHxfB/_old 2015-02-10 20:21:33.000000000 +0100
+++ /var/tmp/diff_new_pack.eeHxfB/_new 2015-02-10 20:21:33.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Compress-Bzip2
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: perl-Compress-Bzip2
-Version: 2.18
+Version: 2.20
Release: 0
%define cpan_name Compress-Bzip2
Summary: Interface to Bzip2 compression library
@@ -37,9 +37,9 @@
Requires: bzip2
%description
-The _Compress::Bzip2_ module provides a Perl interface to the _Bzip2_
+The _Compress::Bzip2_ module provides a Perl interface to the *bzip2*
compression library (see the /AUTHOR manpage for details about where to get
-_Bzip2_). A relevant subset of the functionality provided by _Bzip2_ is
+_Bzip2_). A relevant subset of the functionality provided by _bzip2_ is
available in _Compress::Bzip2_.
All string parameters can either be a scalar or a scalar reference.
@@ -48,6 +48,12 @@
in-memory compression/decompression and read/write access to _bzip2_ files.
Each of these areas will be discussed separately below.
+*NOTE*
+
+_Compress::Bzip2_ is just a simple _bzip2_ binding, comparable to the old
+the Compress::Zlib manpage library. It is not well integrated into PerlIO,
+use the preferred the IO::Compress::Bzip2 manpage instead.
+
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644
@@ -66,6 +72,6 @@
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc ANNOUNCE Changes COPYING NEWS README
+%doc ANNOUNCE Changes COPYING NEWS README.md
%changelog
++++++ Compress-Bzip2-2.18.tar.gz -> Compress-Bzip2-2.20.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Compress-Bzip2-2.18/Changes
new/Compress-Bzip2-2.20/Changes
--- old/Compress-Bzip2-2.18/Changes 2014-08-07 01:53:14.000000000 +0200
+++ new/Compress-Bzip2-2.20/Changes 2015-01-15 10:44:41.000000000 +0100
@@ -159,4 +159,11 @@
- [cpan #68572] add ccdlflags for show_bzversion missing -R also, similar
to the
fix in 2.11. Not a EUMM bug.
- require constant 1.04 (since 5.8) to accept hashrefs.
- - add META to MANIFEST
\ No newline at end of file
+ - add META to MANIFEST
+
+2.19 2015-10-24 rurban
+ - fixed generated SIGNATURE (EUMM parallel make issue)
+
+2.20 2015-01-15 rurban
+ - Convert README to markdown, mention the preferred IO::Compress::Bzip2 in
+ the docs (done by Pattarawat Chormai, GH PR #2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Compress-Bzip2-2.18/MANIFEST
new/Compress-Bzip2-2.20/MANIFEST
--- old/Compress-Bzip2-2.18/MANIFEST 2014-08-07 01:53:30.000000000 +0200
+++ new/Compress-Bzip2-2.20/MANIFEST 2015-01-15 10:46:24.000000000 +0100
@@ -1,12 +1,10 @@
-README
+README.md
Changes
MANIFEST
COPYING
INSTALL
ANNOUNCE
NEWS
-META.json
-META.yml
Makefile.PL
config.in
ppport.h
@@ -109,4 +107,6 @@
t/900_perl_minimum_version.t
t/900_pod-coverage.t
t/900_pod.t
+META.yml Module YAML meta-data (added by
MakeMaker)
+META.json Module JSON meta-data (added by
MakeMaker)
SIGNATURE Public-key signature (added by
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Compress-Bzip2-2.18/META.json
new/Compress-Bzip2-2.20/META.json
--- old/Compress-Bzip2-2.18/META.json 2014-08-07 01:53:31.000000000 +0200
+++ new/Compress-Bzip2-2.20/META.json 2015-01-15 10:46:23.000000000 +0100
@@ -4,7 +4,7 @@
"Rob Janes <[email protected]>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter
version 2.142060",
+ "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter
version 2.143240",
"license" : [
"perl_5"
],
@@ -57,5 +57,5 @@
"url" : "https://github.com/rurban/Compress-Bzip2"
}
},
- "version" : "2.18"
+ "version" : "2.20"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Compress-Bzip2-2.18/META.yml
new/Compress-Bzip2-2.20/META.yml
--- old/Compress-Bzip2-2.18/META.yml 2014-08-07 01:53:30.000000000 +0200
+++ new/Compress-Bzip2-2.20/META.yml 2015-01-15 10:46:23.000000000 +0100
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version
2.142060'
+generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version
2.143240'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -33,4 +33,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: https://github.com/rurban/Compress-Bzip2
-version: '2.18'
+version: '2.20'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Compress-Bzip2-2.18/README
new/Compress-Bzip2-2.20/README
--- old/Compress-Bzip2-2.18/README 2014-08-07 01:48:13.000000000 +0200
+++ new/Compress-Bzip2-2.20/README 1970-01-01 01:00:00.000000000 +0100
@@ -1,94 +0,0 @@
-
-Compress::Bzip2
-
-Version 2.17
-
-2013-08-28
-
-The subdirectory bzlib-src contains almost all of the files from the
-1.0.6 distribution of bzip2. What's missing is that I only included
-the html flavour of the documentation. See the README in there for
-more information.
-
-DESCRIPTION
-===========
-
-This module provides a Perl interface to the bzip2 compression algorithms.
-It uses the low level interface to the algorithm, and reimplements all
-high level routines.
-
-What is Bzip2 ?
-===============
-Bzip2 is a portable lossless data compression library written in ANSI C.
-It offers pretty fast compression and fast decompression.
-Bzip2 has very good results, if you want to compress ASCII Documents.
-
-Bzip2 is probably not great for streaming compression. It fills it's
-internal buffer, which depending of parameters is between 100k and 900k
-in size, before it outputs ANY compressed data. It works best compressing
-an entire document.
-
-Streaming decompression on the other hand, gives a steady torrent of bytes.
-
-What is Compress::Bzip2 ?
-====================
-Compress::Bzip2 provided early Bzip2 bindings for Perl5 compatible to
-the old Compress::Zlib library. See Compress::Raw::Bzip2 for the new API
-compatible with IO::Compress.
-
-It's my intent to make this package like the Compress::Zlib package, so
-that code that uses one can fairly easily use the other. The perlxs stuff
-that's visible to perl has methods that have the same names as their
-Compress::Zlib counterparts, except that the "g" is changed to a "b".
-
-Most code that uses Compress::Zlib should be able to use this package.
-Simply change
-
- $gz = Compress::Zlib::gzopen( "filename", "w" );
-
-to
-
- $gz = Compress::Bzip2::gzopen( "filename", "w" );
-
-I made aliases of all the Compress::Zlib functions. Some of them don't
-return anything useful, like crc32 or adler32, cause bzip2 doesn't
-do that sort of thing. Take a look at t/070-gzcomp.t and t/071-gzuncomp.t.
-
-Bug fixes and other feedback are welcome.
-
-Copyright
-=========
-bzip2
-Julian Seward, j s e w a r d a t a c m . o r g
-
-Compress-Bzip2 prior to 2.0 is distributed under the terms of the
-GNU General Public License (GPL). See the file COPYING.
-
-Since version 2.0 Compress-Bzip2 is dual-licensed.
-You can redistribute it and/or modify it under the same terms as Perl
-itself, either Perl version 5.8.3 or, at your option, any later
-version of Perl 5 you may have available.
-
-
-Many Thanks to:
-===============
-
-Author of bzip2:
-Julian Seward, j s e w a r d a t a c m . o r g
-Cambridge, UK
-http://sources.redhat.com/bzip2
-
-Author of Compress::Zlib:
-Paul Marquess, p m q s a t c p a n . o r g
-http://www.cpan.org
-
-Author of 1.x Compress::Bzip2 (1999)
-Gawdi Azem <[email protected]>
-(last known email, no longer valid)
-
-Sisyphus, helped out with win32 compatibility
-s i s y p h u s 1 a t o p t u s n e t . c o m . a u
-
-Marco "Kiko" Carnut, author of Compress::Bzip2 1.03
-k i k o a t t e m p e s t . c o m . b r
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Compress-Bzip2-2.18/README.md
new/Compress-Bzip2-2.20/README.md
--- old/Compress-Bzip2-2.18/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/Compress-Bzip2-2.20/README.md 2015-01-15 10:28:10.000000000 +0100
@@ -0,0 +1,101 @@
+
+# Compress::Bzip2
+
+### DESCRIPTION
+
+This module provides a Compress::Zlib like Perl interface to the bzip2
+library. It uses the low level interface to the bzip2 algorithm, and
+reimplements all high level routines.
+
+### What is Bzip2 ?
+
+bzip2 is a portable lossless data compression library written in ANSI C.
+It offers pretty fast compression and fast decompression.
+bzip2 has very good results, if you want to compress ASCII Documents.
+
+bzip2 is probably not great for streaming compression. It fills it's
+internal buffer, which depending of parameters is between 100k and 900k
+in size, before it outputs ANY compressed data. It works best compressing
+an entire document.
+
+Streaming decompression on the other hand, gives a steady torrent of bytes.
+
+### What is Compress::Bzip2 ?
+
+Compress::Bzip2 provided early bzip2 bindings for Perl5 compatible to
+the old Compress::Zlib library. See Compress::Raw::Bzip2 for the new API
+compatible with IO::Compress.
+
+It's my intent to make this package like the Compress::Zlib package, so
+that code that uses one can fairly easily use the other. The perlxs stuff
+that's visible to perl has methods that have the same names as their
+Compress::Zlib counterparts, except that the "g" is changed to a "b".
+
+Most code that uses Compress::Zlib should be able to use this package.
+Simply change
+```
+
+ $gz = Compress::Zlib::gzopen( "filename", "w" );
+
+```
+
+to
+```
+
+ $gz = Compress::Bzip2::gzopen( "filename", "w" );
+ ```
+
+I made aliases of all the Compress::Zlib functions. Some of them don't
+return anything useful, like crc32 or adler32, cause bzip2 doesn't
+do that sort of thing. Take a look at t/070-gzcomp.t and t/071-gzuncomp.t.
+
+Bug fixes and other feedback are welcome.
+
+### Copyright
+
+bzip2
+
+**Julian Seward**, j s e w a r d a t a c m . o r g
+
+Compress-Bzip2 prior to 2.0 is distributed under the terms of the
+GNU General Public License (GPL). See the file COPYING.
+
+Since version 2.0 Compress-Bzip2 is dual-licensed.
+You can redistribute it and/or modify it under the same terms as Perl
+itself, either Perl version 5.8.3 or, at your option, any later
+version of Perl 5 you may have available.
+
+
+### Many Thanks to:
+
+
+**Author of bzip2**
+
+Julian Seward, j s e w a r d a t a c m . o r g
+
+Cambridge, UK
+
+http://sources.redhat.com/bzip2
+
+**Author of Compress::Zlib**
+
+Paul Marquess, p m q s a t c p a n . o r g
+
+http://www.cpan.org
+
+**Author of 1.x Compress::Bzip2 (1999)**
+
+Gawdi Azem <[email protected]>
+
+(last known email, no longer valid)
+
+**Helped out with win32 compatibility**
+
+Sisyphus, s i s y p h u s 1 a t o p t u s n e t . c o m . a u
+
+**Author of Compress::Bzip2 1.03**
+
+Marco "Kiko" Carnut,
+
+k i k o a t t e m p e s t . c o m . b r
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Compress-Bzip2-2.18/SIGNATURE
new/Compress-Bzip2-2.20/SIGNATURE
--- old/Compress-Bzip2-2.18/SIGNATURE 2014-08-07 01:53:35.000000000 +0200
+++ new/Compress-Bzip2-2.20/SIGNATURE 2015-01-15 10:46:27.000000000 +0100
@@ -17,13 +17,14 @@
SHA1 321030dcade0d87dba537aff99fcba66230971d0 ANNOUNCE
SHA1 d8094d7a2ccce1ff3a3fc69a76c73dd15291cc65 Bzip2.xs
SHA1 ff8688f52f05aa77ac2522c7970e6ab23bf77d0e COPYING
-SHA1 2759edd258cb51dc5332d2d97dc0f114f2a3de76 Changes
+SHA1 3a222be72665a3e8fe654dd2e7b38ce6c2bd8dae Changes
SHA1 06186a4d62ebec3ffac9a4f5457458436d7302c5 INSTALL
-SHA1 a0ef31c0bf72ea93c626ce1e2489b804f671847b MANIFEST
-SHA1 64d2a7088864f27abe77e2589ab065f497ec13ec META.yml
+SHA1 f90f22c21711a4fbcc955998aa47179aac5a32b2 MANIFEST
+SHA1 9f26400242189eaa6c9a0cd003033aae44c0f321 META.json
+SHA1 4d08319df67e788b3fd37063e8d91f2df3928c89 META.yml
SHA1 3711bef030207705a281125394be7eb9627a79a3 Makefile.PL
SHA1 01ca12f980ac0675ebc82d84c432bbf3be80c74c NEWS
-SHA1 53f65a059d9303153d8b54300636fbd81560e639 README
+SHA1 8343eaf8bfc7836c110d55b878ce13b9b56dd468 README.md
SHA1 6bdb898b814cca277ba465b15a14eb50bc458ea8 bzlib-src/CHANGES
SHA1 1c0c6888759a63c32bca7eb63353af2cd9bd5d9e bzlib-src/LICENSE
SHA1 ec798819dffc496d45bab5ee665eabcc6b141c5d bzlib-src/Makefile.PL
@@ -88,7 +89,7 @@
SHA1 7dfc2194e9b344251a52ae5b6399fb1650342905 config.in
SHA1 f51e8905cd4c7ac9abe672ead1f8a52b82fbbad5 fallback/const-c.inc
SHA1 340a622d47ec2642d9631c79432f1c234a6c8c84 fallback/const-xs.inc
-SHA1 333df7e9152240382bb851edf22833c2c9ebcacc lib/Compress/Bzip2.pm
+SHA1 02639505d77fbc88e0f0bec7dbb2e52acf1db01b lib/Compress/Bzip2.pm
SHA1 fb7154b5f5ab3dd33064a2a1ac704f596dc6449a ppport.h
SHA1 f5620dc7bc334bd571a5bceb7012cc11114cccff show_bzversion.c
SHA1 4dd4bbbd10e755857ed1ca2beabfa6410c8ef2ca t/010-useability.t
@@ -127,7 +128,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-iEYEARECAAYFAlPiv/sACgkQmm2SYo/9yUJiSACePKUpvTL+GUwWYzD5OPTBsPBZ
-k/wAmwfYzMz08hPJ7G8NUF5/mhlJFWKI
-=dOHz
+iEYEARECAAYFAlS3jHAACgkQmm2SYo/9yUKNDQCeIhPLl83XTBmtcArVzJJDVTFs
+gPkAn3sUL7kHqGFYL8OHhqB9iMH0+hUz
+=z9XC
-----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Compress-Bzip2-2.18/lib/Compress/Bzip2.pm
new/Compress-Bzip2-2.20/lib/Compress/Bzip2.pm
--- old/Compress-Bzip2-2.18/lib/Compress/Bzip2.pm 2014-08-07
01:52:48.000000000 +0200
+++ new/Compress-Bzip2-2.20/lib/Compress/Bzip2.pm 2015-01-15
10:44:57.000000000 +0100
@@ -1,8 +1,8 @@
# File : Bzip2.pm
# Author : Rob Janes
# Created : 14 April 2005
-# Modified : 2014-08-06 rurban
-# Version : 2.18
+# Modified : 2015-01-15 rurban
+# Version : 2.20
#
# Copyright (c) 2005 Rob Janes. All rights reserved.
# This program is free software; you can redistribute it and/or
@@ -12,7 +12,7 @@
package Compress::Bzip2;
use 5.006;
-our $VERSION = "2.18";
+our $VERSION = "2.20";
use strict;
use warnings;
@@ -360,7 +360,7 @@
print STDERR "Error: failed to stat $infile: '$!'\n";
next;
}
-
+
if ( !_check_stat( $infile, \@statbuf, $opts{f} ) ) {
print STDERR "Error: file $infile stat check fails: $bzerrno\n";
next;
@@ -383,7 +383,7 @@
next;
}
}
-
+
if ( !$read_from_stdin ) {
undef $in;
if ( !open( $in, $infile ) ) {
@@ -445,7 +445,7 @@
}
}
}
-
+
##############################################################################
##############################################################################
## compatibility with Compress::Bzip2 1.03
@@ -705,7 +705,7 @@
$bytesread = $bz->bzread($buffer [,$size]) ;
$bytesread = $bz->bzreadline($line);
$byteswritten = $bz->bzwrite($buffer [,$limit]);
- $errstring = $bz->bzerror();
+ $errstring = $bz->bzerror();
$status = $bz->bzeof();
$status = $bz->bzflush();
$status = $bz->bzclose() ;
@@ -721,9 +721,9 @@
=head1 DESCRIPTION
-The I<Compress::Bzip2> module provides a Perl interface to the I<Bzip2>
+The I<Compress::Bzip2> module provides a Perl interface to the B<bzip2>
compression library (see L</AUTHOR> for details about where to get
-I<Bzip2>). A relevant subset of the functionality provided by I<Bzip2>
+I<Bzip2>). A relevant subset of the functionality provided by I<bzip2>
is available in I<Compress::Bzip2>.
All string parameters can either be a scalar or a scalar reference.
@@ -732,6 +732,13 @@
in-memory compression/decompression and read/write access to I<bzip2>
files. Each of these areas will be discussed separately below.
+B<NOTE>
+
+I<Compress::Bzip2> is just a simple I<bzip2> binding, comparable to the
+old L<Compress::Zlib> library. It is not well integrated into PerlIO,
+use the preferred L<IO::Compress::Bzip2> instead.
+
+
=head1 FILE READ/WRITE INTERFACE
A number of functions are supplied in I<bzlib> for reading and writing
@@ -776,7 +783,7 @@
=head2 B<$bytesread = $bz-E<gt>bzreadline($line) ;>
-Reads the next line from the compressed file into B<$line>.
+Reads the next line from the compressed file into B<$line>.
Returns the number of bytes actually read. On EOF it returns 0 and in
the case of an error, -1.
@@ -1155,7 +1162,7 @@
contents of the buffer parameter are destroyed after calling this
function.
-=head1 STREAM DEFLATE
+=head1 STREAM DEFLATE
The Perl interface will I<always> consume the complete input buffer
before returning. Also the output buffer returned will be
@@ -1165,7 +1172,7 @@
=head2 B<($d, $status) = bzdeflateInit( [PARAMS] )>
-Initialises a deflation stream.
+Initialises a deflation stream.
If successful, it will return the initialised deflation stream, B<$d>
and B<$status> of C<BZ_OK> in a list context. In scalar context it
@@ -1282,18 +1289,18 @@
while (<>)
{
($output, $status) = $x->bzdeflate($_) ;
-
+
$status == BZ_OK
or die "deflation failed\n" ;
-
+
print $output ;
}
-
+
($output, $status) = $x->bzclose() ;
-
+
$status == BZ_OK
or die "deflation failed\n" ;
-
+
print $output ;
=head1 STREAM INFLATE
@@ -1302,7 +1309,7 @@
=head2 B<($i, $status) = inflateInit()>
-Initialises an inflation stream.
+Initialises an inflation stream.
In a list context it returns the inflation stream, B<$i>, and the
I<zlib> status code (B<$status>). In a scalar context it returns the
@@ -1371,27 +1378,27 @@
use strict ;
use warnings ;
-
+
use Compress::Bzip2;
-
+
my $x = bzinflateInit()
or die "Cannot create a inflation stream\n" ;
-
+
my $input = '' ;
binmode STDIN;
binmode STDOUT;
-
+
my ($output, $status) ;
while (read(STDIN, $input, 4096))
{
($output, $status) = $x->bzinflate(\$input) ;
-
- print $output
+
+ print $output
if $status == BZ_OK or $status == BZ_STREAM_END ;
-
+
last if $status != BZ_OK ;
}
-
+
die "inflation failed\n"
unless $status == BZ_STREAM_END ;
@@ -1403,24 +1410,24 @@
use strict ;
use warnings ;
-
+
use Compress::Bzip2 ;
-
+
die "Usage: bzcat file...\n" unless @ARGV ;
-
+
my $file ;
-
+
foreach $file (@ARGV) {
my $buffer ;
-
- my $bz = bzopen($file, "rb")
+
+ my $bz = bzopen($file, "rb")
or die "Cannot open $file: $bzerrno\n" ;
-
+
print $buffer while $bz->bzread($buffer) > 0 ;
-
- die "Error reading from $file: $bzerrno" . ($bzerrno+0) . "\n"
+
+ die "Error reading from $file: $bzerrno" . ($bzerrno+0) . "\n"
if $bzerrno != BZ_STREAM_END ;
-
+
$bz->bzclose() ;
}
@@ -1428,26 +1435,26 @@
use strict ;
use warnings ;
-
+
use Compress::Bzip2 ;
-
+
die "Usage: bzgrep pattern file...\n" unless @ARGV >= 2;
-
+
my $pattern = shift ;
-
+
my $file ;
-
+
foreach $file (@ARGV) {
- my $bz = bzopen($file, "rb")
+ my $bz = bzopen($file, "rb")
or die "Cannot open $file: $bzerrno\n" ;
-
+
while ($bz->bzreadline($_) > 0) {
print if /$pattern/ ;
}
-
- die "Error reading from $file: $bzerrno\n"
+
+ die "Error reading from $file: $bzerrno\n"
if $bzerrno != Z_STREAM_END ;
-
+
$bz->bzclose() ;
}
@@ -1459,14 +1466,14 @@
use strict ;
use warnings ;
-
+
use Compress::Bzip2 ;
-
+
binmode STDOUT; # bzopen only sets it on the fd
-
+
my $bz = bzopen(\*STDOUT, "wb")
or die "Cannot open stdout: $bzerrno\n" ;
-
+
while (<>) {
$bz->bzwrite($_) or die "error writing: $bzerrno\n" ;
}
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]