Projects
openEuler:Mainline
perl-Compress-Raw-Bzip2
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
_service:tar_scm:perl-Compress-Raw-Bzip2.spec
Changed
@@ -1,5 +1,5 @@ Name: perl-Compress-Raw-Bzip2 -Version: 2.201 +Version: 2.205 Release: 1 Summary: Low-Level Interface to bzip2 compression library License: (GPL or Artistic) and BSD @@ -43,6 +43,9 @@ %{_mandir}/man3/* %changelog +* Thu Jul 20 2023 sunhui <sunhui@kylinos.cn> - 2.205-1 +- Update package to version 2.205 + * Tue Oct 18 2022 renhongxun <renhongxun@h-partners.com> - 2.201-1 - upgrade version to 2.201
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.appveyor.yml
Added
@@ -0,0 +1,17 @@ +# File sourced from http://blogs.perl.org/users/mauke/2017/10/automated-testing-on-windows-with-appveyor.html + +cache: + - C:\strawberry + +install: + - if not exist "C:\strawberry" choco install strawberryperl -y + - set PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH% + - cd %APPVEYOR_BUILD_FOLDER% + - cpanm --quiet --installdeps --with-develop --notest . + +build_script: + - perl Makefile.PL + - gmake + +test_script: + - gmake test
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.cirrus.yml
Added
@@ -0,0 +1,34 @@ +task: + name: FreeBSD + freebsd_instance: + matrix: + # image: freebsd-11-3-release-amd64 + image: freebsd-12-1-release-amd64 + # image: freebsd-13-0-release-amd64 + install_script: + - pkg info + - pkg install -y gcc + - pkg install -y perl5 + - perl -V + - echo|cpan App::cpanminus + - cpanm --installdeps . + build_script: + - perl Makefile.PL + test_script: + - make test + +task: + name: MacOS + osx_instance: + matrix: + image: catalina-xcode-11.3.1 + image: catalina-xcode-11.4.1 + # image: catalina-xcode-11.5 + install_script: + - perl -V + - echo|cpan App::cpanminus + - /Users/anka/perl5/bin/cpanm --installdeps . + build_script: + - perl Makefile.PL + test_script: + - make test
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github
Added
+(directory)
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github/workflows
Added
+(directory)
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github/workflows/linux-upstream-gitlab.yml
Added
@@ -0,0 +1,84 @@ +name: Linux + Upstream Bzip2 1.1 + +on: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '02 02 * * 6' # Run every Saturday + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + perl: + - '5.38' + # - '5.36' + # - '5.34' + # - '5.32' + # - '5.30' + # - '5.28' + # - '5.26' + # - '5.24' + # - '5.22' + # - '5.20' + # - '5.18' + # - '5.16' + # - '5.14' + # - '5.12' + # - '5.10' + # - '5.8' + # - '5.6' + bzip2-version: + - master + + name: Perl ${{ matrix.perl }} + Upstream '${{ matrix.bzip2-version }}' + steps: + - uses: actions/checkout@v3 + + - name: Set Env + run: | + echo "bzip2-source=${GITHUB_WORKSPACE}/upstream-bzip2-source-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "bzip2-install=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BZIP2_LIB=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}/usr/local/lib" >> $GITHUB_ENV + echo "BZIP2_INCLUDE=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}/usr/local/include" >> $GITHUB_ENV + echo "BZIP2_VERSION=${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BUILD_BZIP2=0" >> $GITHUB_ENV + + - name: Checkout upstream bzip2 '${{matrix.bzip2-version}}'' + run: | + mkdir -p ${{ env.bzip2-source }} + cd ${{ env.bzip2-source }} + git clone https://gitlab.com/bzip2/bzip2.git . + + - name: Build upstream bzip2 '${{matrix.bzip2-version}}'' + run: | + mkdir build + cd build + cmake .. + make DESTDIR=${{ env.bzip2-install }} install + make clean + working-directory: ${{ env.bzip2-source }} + + - name: Setup perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + + - name: Perl version + run: perl -V + + # - name: Install dependencies + # run: cpanm --quiet --installdeps --notest . + + - name: Build + run: perl Makefile.PL && make + + - name: Test + run: make test + + - name: Bzip2 Version + run: perl -Mblib -MCompress::Raw::Bzip2 -e 'print Compress::Raw::Bzip2::bzlibversion(). "\n"' \ No newline at end of file
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github/workflows/linux-upstream-sourceware.yml
Added
@@ -0,0 +1,84 @@ +name: Linux + Upstream Bzip2 1.0 + +on: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '02 02 * * 6' # Run every Saturday + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + perl: + - '5.38' + # - '5.36' + # - '5.34' + # - '5.32' + # - '5.30' + # - '5.28' + # - '5.26' + # - '5.24' + # - '5.22' + # - '5.20' + # - '5.18' + # - '5.16' + # - '5.14' + # - '5.12' + # - '5.10' + # - '5.8' + # - '5.6' + bzip2-version: + - master + + name: Perl ${{ matrix.perl }} + Upstream '${{ matrix.bzip2-version }}' + steps: + - uses: actions/checkout@v3 + + - name: Set Env + run: | + echo "bzip2-source=${GITHUB_WORKSPACE}/upstream-bzip2-source-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "bzip2-install=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BZIP2_LIB=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BZIP2_INCLUDE=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BZIP2_VERSION=${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BUILD_BZIP2=0" >> $GITHUB_ENV + + - name: Checkout upstream bzip2 '${{matrix.bzip2-version}}'' + run: | + mkdir -p ${{ env.bzip2-source }} + cd ${{ env.bzip2-source }} + git clone https://sourceware.org/git/bzip2.git . + + - name: Build upstream bzip2 '${{matrix.bzip2-version}}'' + run: | + make -f Makefile-libbz2_so + mkdir -p ${{ env.bzip2-install }} + cp bzlib.h libbz2.so* ${{ env.bzip2-install }} + make clean + rm libbz2.so* + working-directory: ${{ env.bzip2-source }} + + - name: Setup perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + + - name: Perl version + run: perl -V + + - name: Install dependencies + run: cpanm --quiet --installdeps --notest . + + - name: Build + run: perl Makefile.PL && make + + - name: Test + run: make test + + - name: Bzip2 Version + run: perl -Mblib -MCompress::Raw::Bzip2 -e 'print Compress::Raw::Bzip2::bzlibversion(). "\n"' \ No newline at end of file
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github/workflows/linux.yml
Added
@@ -0,0 +1,45 @@ +name: Linux build + +on: push, pull_request, workflow_dispatch + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + perl: + - '5.38' + - '5.36' + - '5.34' + - '5.32' + - '5.30' + - '5.28' + - '5.26' + - '5.24' + - '5.22' + - '5.20' + - '5.18' + - '5.16' + - '5.14' + - '5.12' + - '5.10' + - '5.8' + - '5.6' + + name: Perl ${{ matrix.perl }} + steps: + - uses: actions/checkout@v3 + - name: Setup perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + - name: Perl version + run: perl -V + - name: Install dependencies + run: cpanm --quiet --installdeps --notest . + - name: Build + run: perl Makefile.PL && make + - name: Test + run: make test \ No newline at end of file
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github/workflows/macos-upstream-gitlab.yml
Added
@@ -0,0 +1,81 @@ +name: MacOS + Upstream Bzip2 1.1 + +on: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '02 02 * * 6' # Run every Saturday + +jobs: + build: + + runs-on: macos-latest + + strategy: + matrix: + perl: + - '5.38' + # - '5.36' + # - '5.34' + # - '5.32' + # - '5.30' + # - '5.28' + # - '5.26' + # - '5.24' + # - '5.22' + # - '5.20' + # - '5.18' + # - '5.16' + # - '5.14' + # - '5.12' + # - '5.10' + # - '5.8' + # - '5.6' + bzip2-version: + - master + + name: Perl ${{ matrix.perl }} + Upstream '${{ matrix.bzip2-version }}' + steps: + - uses: actions/checkout@v3 + + - name: Set Env + run: | + echo "bzip2-source=${GITHUB_WORKSPACE}/upstream-bzip2-source-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "bzip2-install=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BZIP2_LIB=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}/usr/local/lib" >> $GITHUB_ENV + echo "BZIP2_INCLUDE=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}/usr/local/include" >> $GITHUB_ENV + echo "BZIP2_VERSION=${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BUILD_BZIP2=0" >> $GITHUB_ENV + + - name: Checkout upstream bzip2 '${{matrix.bzip2-version}}'' + run: | + mkdir -p ${{ env.bzip2-source }} + cd ${{ env.bzip2-source }} + git clone https://gitlab.com/bzip2/bzip2.git . + + - name: Build upstream bzip2 '${{matrix.bzip2-version}}'' + run: | + mkdir build + cd build + cmake .. + make DESTDIR=${{ env.bzip2-install }} install + make clean + working-directory: ${{ env.bzip2-source }} + + - name: Setup perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + + - name: Perl version + run: perl -V + + # - name: Install dependencies + # run: cpanm --quiet --installdeps --notest . + + - name: Build + run: perl Makefile.PL && make + + - name: Test + run: make test \ No newline at end of file
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github/workflows/macos-upstream-sourceware.yml
Added
@@ -0,0 +1,90 @@ +name: MacOS + Upstream Bzip2 1.0 + +on: + workflow_dispatch: + push: + pull_request: + schedule: + - cron: '02 02 * * 6' # Run every Saturday + +jobs: + build: + + runs-on: macos-latest + + strategy: + matrix: + perl: + - '5.38' + # - '5.36' + # - '5.34' + # - '5.32' + # - '5.30' + # - '5.28' + # - '5.26' + # - '5.24' + # - '5.22' + # - '5.20' + # - '5.18' + # - '5.16' + # - '5.14' + # - '5.12' + # - '5.10' + # - '5.8' + # - '5.6' + bzip2-version: + - master + + name: Perl ${{ matrix.perl }} + Upstream '${{ matrix.bzip2-version }}' + steps: + - uses: actions/checkout@v3 + + - name: Set Env + run: | + echo "bzip2-source=${GITHUB_WORKSPACE}/upstream-bzip2-source-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "bzip2-install=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BZIP2_LIB=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BZIP2_INCLUDE=${HOME}/upstream-bzip2-install-${{ matrix.bzip2-version }}" >> $GITHUB_ENV + # echo "BZIP2_VERSION=${{ matrix.bzip2-version }}" >> $GITHUB_ENV + echo "BZIP2_VERSION=1.0.999" >> $GITHUB_ENV + echo "BUILD_BZIP2=0" >> $GITHUB_ENV + + - name: Checkout upstream bzip2 '${{matrix.bzip2-version}}'' + run: | + mkdir -p ${{ env.bzip2-source }} + cd ${{ env.bzip2-source }} + git clone https://sourceware.org/git/bzip2.git . + sed -i -e s'/BZ_VERSION "1.0.8.*"/BZ_VERSION "${{ env.BZIP2_VERSION }}"/' bzlib_private.h + + # mac makefile sourced from https://stackoverflow.com/questions/67179779/building-and-installing-bzip2-with-shared-library-dylib-on-macos + - name: Build upstream bzip2 '${{matrix.bzip2-version}}'' + run: | + #wget -c https://gist.githubusercontent.com/obihill/3278c17bcee41c0c8b59a41ada8c0d35/raw/3bf890e2ad40d0af358e153395c228326f0b44d5/Makefile-libbz2_dylib + #make -f Makefile-libbz2_dylib + gcc --shared -Wl,-install_name -Wl,libbz2.dylib -fpic -fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c -o libbz2.${{ env.BZIP2_VERSION }}.dylib + ln -s libbz2.${{ env.BZIP2_VERSION }}.dylib libbz2.dylib + mkdir -p ${{ env.bzip2-install }} + cp bzlib.h libbz2.${{ env.BZIP2_VERSION }}.dylib libbz2.dylib ${{ env.bzip2-install }} + # make clean + rm libbz2.${{ env.BZIP2_VERSION }}.dylib libbz2.dylib + working-directory: ${{ env.bzip2-source }} + + - name: Setup perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + + - name: Perl version + run: perl -V + + - name: Install dependencies + run: cpanm --quiet --installdeps --notest . + + - name: Build + run: perl Makefile.PL && make + + - name: Test + run: make test + + - name: Bzip2 Version + run: perl -Mblib -MCompress::Raw::Bzip2 -e 'print Compress::Raw::Bzip2::bzlibversion(). "\n"' \ No newline at end of file
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github/workflows/macos.yml
Added
@@ -0,0 +1,45 @@ +name: MacOS build + +on: push, pull_request, workflow_dispatch + +jobs: + build: + + runs-on: macos-latest + + strategy: + matrix: + perl: + - '5.38' + - '5.36' + - '5.34' + - '5.32' + - '5.30' + - '5.28' + - '5.26' + - '5.24' + - '5.22' + - '5.20' + - '5.18' + - '5.16' + - '5.14' + - '5.12' + - '5.10' + - '5.8' + - '5.6' + + name: Perl ${{ matrix.perl }} + steps: + - uses: actions/checkout@v3 + - name: Setup perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + - name: Perl version + run: perl -V + - name: Install dependencies + run: cpanm --quiet --installdeps --notest . + - name: Build + run: perl Makefile.PL && make + - name: Test + run: make test \ No newline at end of file
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.github/workflows/windows.yml
Added
@@ -0,0 +1,45 @@ +name: Windows build + +on: push, pull_request, workflow_dispatch + +jobs: + build: + + runs-on: windows-latest + + strategy: + matrix: + perl: + - '5.38' + - '5.36' + - '5.34' + - '5.32' + - '5.30' + - '5.28' + - '5.26' + - '5.24' + # - '5.22' + # - '5.20' + # - '5.18' + # - '5.16' + # - '5.14' + # - '5.12' + # - '5.10' + # - '5.8' + # - '5.6' + + name: Perl ${{ matrix.perl }} + steps: + - uses: actions/checkout@v3 + - name: Setup perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + - name: Perl version + run: perl -V + - name: Install dependencies + run: cpanm --quiet --installdeps --notest . + - name: Build + run: perl Makefile.PL && make + - name: Test + run: make test \ No newline at end of file
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.gitignore
Added
@@ -0,0 +1,31 @@ +*~ +.* +*.o +/*.c +/*.h +*.bak +*.swp +*.tar +*.tar.gz +*.tmp + +!.appveyor.yml +!.cirrus.yml +!.github +!.gitignore +!.perltidyrc +!.travis.yml + +/Bzip2.bs +/MYMETA.* +/Makefile +/Makefile.old +/archive +/blib +/bugs +/constants.h +/constants.xs +/libraries +/pm_to_blib +/releases +/scratch
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/.travis.yml
Added
@@ -0,0 +1,28 @@ +language: perl + +os: + - linux + +perl: + - "5.6" + - "5.8" + - "5.10" + - "5.12" + - "5.14" + - "5.16" + - "5.18" + - "5.20" + - "5.22" + - "5.24" + - "5.26" + - "5.28" + - "5.30" + - "5.32" + - "blead" + +before_install: + - eval $(curl https://travis-perl.github.io/init) --auto + +install: + - perl -V + - cpan-install --deps
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/Bzip2.xs -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/Bzip2.xs
Changed
@@ -391,7 +391,7 @@ SV* obj = sv_2mortal(newSViv(PTR2IV(s))) ; XPUSHs(obj); } - if (GIMME == G_ARRAY) { + if (GIMME_V == G_ARRAY) { SV * sv = sv_2mortal(newSViv(err)) ; setDUALstatus(sv, err); XPUSHs(sv) ; @@ -447,7 +447,7 @@ SV* obj = sv_2mortal(newSViv(PTR2IV(s))) ; XPUSHs(obj); } - if (GIMME == G_ARRAY) { + if (GIMME_V == G_ARRAY) { SV * sv = sv_2mortal(newSViv(err)) ; setDUALstatus(sv, err); XPUSHs(sv) ;
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/Changes -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/Changes
Changed
@@ -1,6 +1,53 @@ CHANGES ------- + 2.205 8 February 2023 + + * 2.205 + Sun, 16 Jul 2023 16:21:33 +0100 + 62de94af7f8328691abbadbeeb0f2b5effc551b2 + + * Test::More::isn't warns in perl 5.38 + Sun, 9 Jul 2023 21:52:47 +0100 + cab526b7f1d8fed30e30f3a16c07af66d5b4d4b5 + + * Add perl 5.38 & run cron for upstream repos + Sun, 9 Jul 2023 21:49:34 +0100 + 6c9f55033f725eab641411a1ac7f54f26250eeef + + * add on workflow_dispatch + Fri, 9 Jun 2023 16:32:22 +0100 + 4d3a1d1a261be3599eee48ba28c349a7fc0f1750 + + * fix reference to github issue + Mon, 22 May 2023 12:37:07 +0100 + edcb04c0b3bdbc2893654fcc7600474ba090c77a + + * Fix to allow building with C++17 register keyword not allowed in C++17 https://github.com/pmqs/Compress-Raw-Bzip2/issues/11 + Mon, 22 May 2023 12:29:30 +0100 + 9357289d218d14d64fc31cfa8ae5746a6dcbfca3 + + * Silence warnings on HPUX https://github.com/pmqs/Compress-Raw-Bzip2/issues/10 + Thu, 23 Mar 2023 14:05:43 +0000 + 1418b2afd5b16bb9ddbc19e377c16c6af113d64f + + 2.204 8 February 2023 + + * Cast isdigit argument as unsigned char + https://github.com/pmqs/Compress-Raw-Bzip2/pull/9 + 967696b4fa91768fa4d46163f46982bc063a175e + + * Use GIMME_V instead of GIMME + https://github.com/pmqs/Compress-Raw-Bzip2/pull/8 + 54e3c1e18b61f0892056925240bbc80f76e2f038 + + * typos + 12496575c17829506cc9c9fa325e31aab1fcd1c7 + + * Trim trailing spaces from bzip2-src + https://github.com/pmqs/Compress-Raw-Bzip2/pull/7 + 8728d405e8d805cb88685b82a5e5493b62288046 + 2.201 25 June 2022 * 2.201
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/META.json -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/META.json
Changed
@@ -4,13 +4,13 @@ "Paul Marquess <pmqs@cpan.org>" , "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150005", "license" : "perl_5" , "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : 2 + "version" : "2" }, "name" : "Compress-Raw-Bzip2", "no_index" : { @@ -45,6 +45,6 @@ "web" : "https://github.com/pmqs/Compress-Raw-Bzip2" } }, - "version" : "2.201", - "x_serialization_backend" : "JSON::PP version 4.02" + "version" : "2.205", + "x_serialization_backend" : "JSON::PP version 2.27300" }
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/META.yml -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/META.yml
Changed
@@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -23,5 +23,5 @@ bugtracker: https://github.com/pmqs/Compress-Raw-Bzip2/issues homepage: https://github.com/pmqs/Compress-Raw-Bzip2 repository: git://github.com/pmqs/Compress-Raw-Bzip2.git -version: '2.201' +version: '2.205' x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/README -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/README
Changed
@@ -1,11 +1,11 @@ Compress-Raw-Bzip2 - Version 2.201 + Version 2.205 - 25 June 2022 + 16 July 2023 - Copyright (c) 2005-2022 Paul Marquess. All rights reserved. + Copyright (c) 2005-2023 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -172,7 +172,7 @@ If you haven't installed Compress-Raw-Bzip2 then search Compress::Raw::Bzip2.pm for a line like this: - $VERSION = "2.201" ; + $VERSION = "2.205" ; c. The version of bzip2 you have used. If you have successfully installed Compress-Raw-Bzip2, this one-liner
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/bzip2-src/blocksort.c -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/bzip2-src/blocksort.c
Changed
@@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -27,11 +27,11 @@ /*---------------------------------------------*/ /*---------------------------------------------*/ -static +static __inline__ -void fallbackSimpleSort ( UInt32* fmap, - UInt32* eclass, - Int32 lo, +void fallbackSimpleSort ( UInt32* fmap, + UInt32* eclass, + Int32 lo, Int32 hi ) { Int32 i, j, tmp; @@ -90,9 +90,9 @@ static -void fallbackQSort3 ( UInt32* fmap, +void fallbackQSort3 ( UInt32* fmap, UInt32* eclass, - Int32 loSt, + Int32 loSt, Int32 hiSt ) { Int32 unLo, unHi, ltLo, gtHi, n, m; @@ -117,9 +117,9 @@ } /* Random partitioning. Median of 3 sometimes fails to - avoid bad cases. Median of 9 seems to help but + avoid bad cases. Median of 9 seems to help but looks rather expensive. This too seems to work but - is cheaper. Guidance for the magic constants + is cheaper. Guidance for the magic constants 7621 and 32768 is taken from Sedgewick's algorithms book, chapter 35. */ @@ -136,10 +136,10 @@ while (1) { if (unLo > unHi) break; n = (Int32)eclassfmapunLo - (Int32)med; - if (n == 0) { - fswap(fmapunLo, fmapltLo); - ltLo++; unLo++; - continue; + if (n == 0) { + fswap(fmapunLo, fmapltLo); + ltLo++; unLo++; + continue; }; if (n > 0) break; unLo++; @@ -147,10 +147,10 @@ while (1) { if (unLo > unHi) break; n = (Int32)eclassfmapunHi - (Int32)med; - if (n == 0) { - fswap(fmapunHi, fmapgtHi); - gtHi--; unHi--; - continue; + if (n == 0) { + fswap(fmapunHi, fmapgtHi); + gtHi--; unHi--; + continue; }; if (n < 0) break; unHi--; @@ -209,8 +209,8 @@ #define UNALIGNED_BH(zz) ((zz) & 0x01f) static -void fallbackSort ( UInt32* fmap, - UInt32* eclass, +void fallbackSort ( UInt32* fmap, + UInt32* eclass, UInt32* bhtab, Int32 nblock, Int32 verb ) @@ -251,7 +251,7 @@ --*/ /*-- set sentinel bits for block-end detection --*/ - for (i = 0; i < 32; i++) { + for (i = 0; i < 32; i++) { SET_BH(nblock + 2*i); CLEAR_BH(nblock + 2*i + 1); } @@ -260,7 +260,7 @@ H = 1; while (1) { - if (verb >= 4) + if (verb >= 4) VPrintf1 ( " depth %6d has ", H ); j = 0; @@ -305,14 +305,14 @@ } } - if (verb >= 4) + if (verb >= 4) VPrintf1 ( "%6d unresolved strings\n", nNotDone ); H *= 2; if (H > nblock || nNotDone == 0) break; } - /*-- + /*-- Reconstruct the original block in eclass8 0 .. nblock-1, since the previous phase destroyed it. @@ -344,9 +344,9 @@ /*---------------------------------------------*/ static __inline__ -Bool mainGtU ( UInt32 i1, +Bool mainGtU ( UInt32 i1, UInt32 i2, - UChar* block, + UChar* block, UInt16* quadrant, UInt32 nblock, Int32* budget ) @@ -486,8 +486,8 @@ UChar* block, UInt16* quadrant, Int32 nblock, - Int32 lo, - Int32 hi, + Int32 lo, + Int32 hi, Int32 d, Int32* budget ) { @@ -511,8 +511,8 @@ if (i > hi) break; v = ptri; j = i; - while ( mainGtU ( - ptrj-h+d, v+d, block, quadrant, nblock, budget + while ( mainGtU ( + ptrj-h+d, v+d, block, quadrant, nblock, budget ) ) { ptrj = ptrj-h; j = j - h; @@ -525,8 +525,8 @@ if (i > hi) break; v = ptri; j = i; - while ( mainGtU ( - ptrj-h+d, v+d, block, quadrant, nblock, budget + while ( mainGtU ( + ptrj-h+d, v+d, block, quadrant, nblock, budget ) ) { ptrj = ptrj-h; j = j - h; @@ -539,8 +539,8 @@ if (i > hi) break; v = ptri; j = i; - while ( mainGtU ( - ptrj-h+d, v+d, block, quadrant, nblock, budget + while ( mainGtU ( + ptrj-h+d, v+d, block, quadrant, nblock, budget ) ) { ptrj = ptrj-h; j = j - h; @@ -578,13 +578,13 @@ } \ } -static +static __inline__ UChar mmed3 ( UChar a, UChar b, UChar c ) { UChar t; if (a > b) { t = a; a = b; b = t; }; - if (b > c) { + if (b > c) { b = c; if (a > b) b = a; } @@ -622,8 +622,8 @@ UChar* block, UInt16* quadrant, Int32 nblock, - Int32 loSt, - Int32 hiSt, + Int32 loSt, + Int32 hiSt, Int32 dSt, Int32* budget ) { @@ -646,14 +646,14 @@ AssertH ( sp < MAIN_QSORT_STACK_SIZE - 2, 1001 ); mpop ( lo, hi, d ); - if (hi - lo < MAIN_QSORT_SMALL_THRESH || + if (hi - lo < MAIN_QSORT_SMALL_THRESH || d > MAIN_QSORT_DEPTH_THRESH) { mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget ); if (*budget < 0) return; continue; } - med = (Int32) + med = (Int32) mmed3 ( blockptr lo +d, blockptr hi +d, blockptr (lo+hi)>>1 +d ); @@ -665,9 +665,9 @@ while (True) { if (unLo > unHi) break; n = ((Int32)blockptrunLo+d) - med; - if (n == 0) { - mswap(ptrunLo, ptrltLo); - ltLo++; unLo++; continue; + if (n == 0) { + mswap(ptrunLo, ptrltLo); + ltLo++; unLo++; continue; }; if (n > 0) break; unLo++; @@ -675,9 +675,9 @@ while (True) { if (unLo > unHi) break; n = ((Int32)blockptrunHi+d) - med; - if (n == 0) { - mswap(ptrunHi, ptrgtHi); - gtHi--; unHi--; continue; + if (n == 0) { + mswap(ptrunHi, ptrgtHi); + gtHi--; unHi--; continue; }; if (n < 0) break; unHi--; @@ -748,9 +748,9 @@ #define CLEARMASK (~(SETMASK)) static -void mainSort ( UInt32* ptr, +void mainSort ( UInt32* ptr, UChar* block, - UInt16* quadrant, + UInt16* quadrant, UInt32* ftab, Int32 nblock, Int32 verb, @@ -878,7 +878,7 @@ /*-- Step 1: Complete the big bucket ss by quicksorting - any unsorted small buckets ss, j, for j != ss. + any unsorted small buckets ss, j, for j != ss. Hopefully previous pointer-scanning phases have already completed many of the small buckets ss, j, so we don't have to sort them at all. @@ -894,10 +894,10 @@ VPrintf4 ( " qsort 0x%x, 0x%x " "done %d this %d\n", ss, j, numQSorted, hi - lo + 1 ); - mainQSort3 ( - ptr, block, quadrant, nblock, - lo, hi, BZ_N_RADIX, budget - ); + mainQSort3 ( + ptr, block, quadrant, nblock, + lo, hi, BZ_N_RADIX, budget + ); numQSorted += (hi - lo + 1); if (*budget < 0) return; } @@ -929,16 +929,16 @@ for (j = (ftab(ss+1) << 8 & CLEARMASK) - 1; j > copyEndss; j--) { k = ptrj-1; if (k < 0) k += nblock; c1 = blockk; - if (!bigDonec1) + if (!bigDonec1) ptr copyEndc1-- = k; } } AssertH ( (copyStartss-1 == copyEndss) - || + || /* Extremely rare case missing in bzip2-1.0.0 and 1.0.1. - Necessity for this case is demonstrated by compressing - a sequence of approximately 48.5 million of character + Necessity for this case is demonstrated by compressing + a sequence of approximately 48.5 million of character 251; 1.0.0/1.0.1 will then die here. */ (copyStartss == 0 && copyEndss == nblock-1), 1007 ) @@ -955,7 +955,7 @@ updating for the last bucket is pointless. The quadrant array provides a way to incrementally - cache sort orderings, as they appear, so as to + cache sort orderings, as they appear, so as to make subsequent comparisons in fullGtU() complete faster. For repetitive blocks this makes a big difference (but not big enough to be able to avoid @@ -965,9 +965,9 @@ for 0 <= i < nblock and 0 <= j <= nblock - if blocki != blockj, + if blocki != blockj, - then the relative values of quadranti and + then the relative values of quadranti and quadrantj are meaningless. else { @@ -1030,7 +1030,7 @@ */ void BZ2_blockSort ( EState* s ) { - UInt32* ptr = s->ptr; + UInt32* ptr = s->ptr; UChar* block = s->block; UInt32* ftab = s->ftab; Int32 nblock = s->nblock; @@ -1054,8 +1054,8 @@ quadrant = (UInt16*)(&(blocki)); /* (wfact-1) / 3 puts the default-factor-30 - transition point at very roughly the same place as - with v0.1 and v0.9.0. + transition point at very roughly the same place as + with v0.1 and v0.9.0. Not that it particularly matters any more, since the resulting compressed stream is now the same regardless of whether or not we use the main sort or fallback sort. @@ -1066,14 +1066,14 @@ budget = budgetInit; mainSort ( ptr, block, quadrant, ftab, nblock, verb, &budget ); - if (verb >= 3) + if (verb >= 3) VPrintf3 ( " %d work, %d block, ratio %5.2f\n", budgetInit - budget, - nblock, + nblock, (float)(budgetInit - budget) / - (float)(nblock==0 ? 1 : nblock) ); + (float)(nblock==0 ? 1 : nblock) ); if (budget < 0) { - if (verb >= 2) + if (verb >= 2) VPrintf0 ( " too repetitive; using fallback" " sorting algorithm\n" ); fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb );
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/bzip2-src/bzlib.c -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/bzip2-src/bzlib.c
Changed
@@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -40,7 +40,7 @@ #ifndef BZ_NO_STDIO void BZ2_bz__AssertH__fail ( int errcode ) { - fprintf(stderr, + fprintf(stderr, "\n\nbzip2/libbzip2: internal error number %d.\n" "This is a bug in bzip2/libbzip2, %s.\n" "Please report it to: bzip2-devel@sourceware.org. If this happened\n" @@ -103,7 +103,7 @@ { void* v = malloc ( items * size ); ((void)opaque); /* Silence unused parameter warning */ - + return v; } @@ -149,8 +149,8 @@ /*---------------------------------------------------*/ -int BZ_API(BZ2_bzCompressInit) - ( bz_stream* strm, +int BZ_API(BZ2_bzCompressInit) + ( bz_stream* strm, int blockSize100k, int verbosity, int workFactor ) @@ -160,7 +160,7 @@ if (!bz_config_ok()) return BZ_CONFIG_ERROR; - if (strm == NULL || + if (strm == NULL || blockSize100k < 1 || blockSize100k > 9 || workFactor < 0 || workFactor > 250) return BZ_PARAM_ERROR; @@ -303,7 +303,7 @@ /*-- no input? --*/ if (s->strm->avail_in == 0) break; progress_in = True; - ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); + ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); s->strm->next_in++; s->strm->avail_in--; s->strm->total_in_lo32++; @@ -321,7 +321,7 @@ /*-- flush/finish end? --*/ if (s->avail_in_expect == 0) break; progress_in = True; - ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); + ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); s->strm->next_in++; s->strm->avail_in--; s->strm->total_in_lo32++; @@ -367,18 +367,18 @@ Bool progress_in = False; Bool progress_out = False; EState* s = (EState*) strm->state; - + while (True) { if (s->state == BZ_S_OUTPUT) { progress_out |= copy_output_until_stop ( s ); if (s->state_out_pos < s->numZ) break; - if (s->mode == BZ_M_FINISHING && + if (s->mode == BZ_M_FINISHING && s->avail_in_expect == 0 && isempty_RL(s)) break; prepare_new_block ( s ); s->state = BZ_S_INPUT; - if (s->mode == BZ_M_FLUSHING && + if (s->mode == BZ_M_FLUSHING && s->avail_in_expect == 0 && isempty_RL(s)) break; } @@ -427,7 +427,7 @@ if (action == BZ_RUN) { progress = handle_compress ( strm ); return progress ? BZ_RUN_OK : BZ_PARAM_ERROR; - } + } else if (action == BZ_FLUSH) { s->avail_in_expect = strm->avail_in; @@ -440,12 +440,12 @@ s->mode = BZ_M_FINISHING; goto preswitch; } - else + else return BZ_PARAM_ERROR; case BZ_M_FLUSHING: if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR; - if (s->avail_in_expect != s->strm->avail_in) + if (s->avail_in_expect != s->strm->avail_in) return BZ_SEQUENCE_ERROR; progress = handle_compress ( strm ); if (s->avail_in_expect > 0 || !isempty_RL(s) || @@ -455,7 +455,7 @@ case BZ_M_FINISHING: if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR; - if (s->avail_in_expect != s->strm->avail_in) + if (s->avail_in_expect != s->strm->avail_in) return BZ_SEQUENCE_ERROR; progress = handle_compress ( strm ); if (!progress) return BZ_SEQUENCE_ERROR; @@ -482,7 +482,7 @@ if (s->ftab != NULL) BZFREE(s->ftab); BZFREE(strm->state); - strm->state = NULL; + strm->state = NULL; return BZ_OK; } @@ -493,8 +493,8 @@ /*---------------------------------------------------*/ /*---------------------------------------------------*/ -int BZ_API(BZ2_bzDecompressInit) - ( bz_stream* strm, +int BZ_API(BZ2_bzDecompressInit) + ( bz_stream* strm, int verbosity, int small ) { @@ -559,34 +559,34 @@ /* can a new run be started? */ if (s->nblock_used == s->save_nblock+1) return False; - + /* Only caused by corrupt data stream? */ if (s->nblock_used > s->save_nblock+1) return True; - + s->state_out_len = 1; s->state_out_ch = s->k0; - BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; + BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; k1 ^= BZ_RAND_MASK; s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - + s->state_out_len = 2; - BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; + BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; k1 ^= BZ_RAND_MASK; s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - + s->state_out_len = 3; - BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; + BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; k1 ^= BZ_RAND_MASK; s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - - BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; + + BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; k1 ^= BZ_RAND_MASK; s->nblock_used++; s->state_out_len = ((Int32)k1) + 4; - BZ_GET_FAST(s->k0); BZ_RAND_UPD_MASK; + BZ_GET_FAST(s->k0); BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; s->nblock_used++; } @@ -624,7 +624,7 @@ } s_state_out_len_eq_one: { - if (cs_avail_out == 0) { + if (cs_avail_out == 0) { c_state_out_len = 1; goto return_notr; }; *( (UChar*)(cs_next_out) ) = c_state_out_ch; @@ -632,7 +632,7 @@ cs_next_out++; cs_avail_out--; } - } + } /* Only caused by corrupt data stream? */ if (c_nblock_used > s_save_nblockPP) return True; @@ -640,25 +640,25 @@ /* can a new run be started? */ if (c_nblock_used == s_save_nblockPP) { c_state_out_len = 0; goto return_notr; - }; + }; c_state_out_ch = c_k0; BZ_GET_FAST_C(k1); c_nblock_used++; - if (k1 != c_k0) { - c_k0 = k1; goto s_state_out_len_eq_one; + if (k1 != c_k0) { + c_k0 = k1; goto s_state_out_len_eq_one; }; - if (c_nblock_used == s_save_nblockPP) + if (c_nblock_used == s_save_nblockPP) goto s_state_out_len_eq_one; - + c_state_out_len = 2; BZ_GET_FAST_C(k1); c_nblock_used++; if (c_nblock_used == s_save_nblockPP) continue; if (k1 != c_k0) { c_k0 = k1; continue; }; - + c_state_out_len = 3; BZ_GET_FAST_C(k1); c_nblock_used++; if (c_nblock_used == s_save_nblockPP) continue; if (k1 != c_k0) { c_k0 = k1; continue; }; - + BZ_GET_FAST_C(k1); c_nblock_used++; c_state_out_len = ((Int32)k1) + 4; BZ_GET_FAST_C(c_k0); c_nblock_used++; @@ -729,37 +729,37 @@ s->strm->total_out_lo32++; if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; } - + /* can a new run be started? */ if (s->nblock_used == s->save_nblock+1) return False; /* Only caused by corrupt data stream? */ if (s->nblock_used > s->save_nblock+1) return True; - + s->state_out_len = 1; s->state_out_ch = s->k0; - BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; + BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; k1 ^= BZ_RAND_MASK; s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - + s->state_out_len = 2; - BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; + BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; k1 ^= BZ_RAND_MASK; s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - + s->state_out_len = 3; - BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; + BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; k1 ^= BZ_RAND_MASK; s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - - BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; + + BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; k1 ^= BZ_RAND_MASK; s->nblock_used++; s->state_out_len = ((Int32)k1) + 4; - BZ_GET_SMALL(s->k0); BZ_RAND_UPD_MASK; + BZ_GET_SMALL(s->k0); BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; s->nblock_used++; } @@ -778,30 +778,30 @@ s->strm->total_out_lo32++; if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; } - + /* can a new run be started? */ if (s->nblock_used == s->save_nblock+1) return False; /* Only caused by corrupt data stream? */ if (s->nblock_used > s->save_nblock+1) return True; - + s->state_out_len = 1; s->state_out_ch = s->k0; BZ_GET_SMALL(k1); s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - + s->state_out_len = 2; BZ_GET_SMALL(k1); s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - + s->state_out_len = 3; BZ_GET_SMALL(k1); s->nblock_used++; if (s->nblock_used == s->save_nblock+1) continue; if (k1 != s->k0) { s->k0 = k1; continue; }; - + BZ_GET_SMALL(k1); s->nblock_used++; s->state_out_len = ((Int32)k1) + 4; BZ_GET_SMALL(s->k0); s->nblock_used++; @@ -830,14 +830,14 @@ if (corrupt) return BZ_DATA_ERROR; if (s->nblock_used == s->save_nblock+1 && s->state_out_len == 0) { BZ_FINALISE_CRC ( s->calculatedBlockCRC ); - if (s->verbosity >= 3) - VPrintf2 ( " {0x%08x, 0x%08x}", s->storedBlockCRC, + if (s->verbosity >= 3) + VPrintf2 ( " {0x%08x, 0x%08x}", s->storedBlockCRC, s->calculatedBlockCRC ); if (s->verbosity >= 2) VPrintf0 ( "" ); if (s->calculatedBlockCRC != s->storedBlockCRC) return BZ_DATA_ERROR; - s->calculatedCombinedCRC - = (s->calculatedCombinedCRC << 1) | + s->calculatedCombinedCRC + = (s->calculatedCombinedCRC << 1) | (s->calculatedCombinedCRC >> 31); s->calculatedCombinedCRC ^= s->calculatedBlockCRC; s->state = BZ_X_BLKHDR_1; @@ -849,7 +849,7 @@ Int32 r = BZ2_decompress ( s ); if (r == BZ_STREAM_END) { if (s->verbosity >= 3) - VPrintf2 ( "\n combined CRCs: stored = 0x%08x, computed = 0x%08x", + VPrintf2 ( "\n combined CRCs: stored = 0x%08x, computed = 0x%08x", s->storedCombinedCRC, s->calculatedCombinedCRC ); if (s->calculatedCombinedCRC != s->storedCombinedCRC) return BZ_DATA_ERROR; @@ -859,9 +859,7 @@ } } - AssertH ( 0, 6001 ); - - return 0; /*NOTREACHED*/ + /*NOTREACHED*/ } @@ -896,7 +894,7 @@ if (bzf != NULL) bzf->lastErr = eee; \ } -typedef +typedef struct { FILE* handle; Char bufBZ_MAX_UNUSED; @@ -920,10 +918,10 @@ /*---------------------------------------------------*/ -BZFILE* BZ_API(BZ2_bzWriteOpen) - ( int* bzerror, - FILE* f, - int blockSize100k, +BZFILE* BZ_API(BZ2_bzWriteOpen) + ( int* bzerror, + FILE* f, + int blockSize100k, int verbosity, int workFactor ) { @@ -955,23 +953,23 @@ bzf->strm.opaque = NULL; if (workFactor == 0) workFactor = 30; - ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, + ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, verbosity, workFactor ); if (ret != BZ_OK) { BZ_SETERR(ret); free(bzf); return NULL; }; bzf->strm.avail_in = 0; bzf->initialisedOk = True; - return bzf; + return bzf; } /*---------------------------------------------------*/ void BZ_API(BZ2_bzWrite) - ( int* bzerror, - BZFILE* b, - void* buf, + ( int* bzerror, + BZFILE* b, + void* buf, int len ) { Int32 n, n2, ret; @@ -1000,7 +998,7 @@ if (bzf->strm.avail_out < BZ_MAX_UNUSED) { n = BZ_MAX_UNUSED - bzf->strm.avail_out; - n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), + n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), n, bzf->handle ); if (n != n2 || ferror(bzf->handle)) { BZ_SETERR(BZ_IO_ERROR); return; }; @@ -1014,20 +1012,20 @@ /*---------------------------------------------------*/ void BZ_API(BZ2_bzWriteClose) - ( int* bzerror, - BZFILE* b, + ( int* bzerror, + BZFILE* b, int abandon, unsigned int* nbytes_in, unsigned int* nbytes_out ) { - BZ2_bzWriteClose64 ( bzerror, b, abandon, + BZ2_bzWriteClose64 ( bzerror, b, abandon, nbytes_in, NULL, nbytes_out, NULL ); } void BZ_API(BZ2_bzWriteClose64) - ( int* bzerror, - BZFILE* b, + ( int* bzerror, + BZFILE* b, int abandon, unsigned int* nbytes_in_lo32, unsigned int* nbytes_in_hi32, @@ -1059,7 +1057,7 @@ if (bzf->strm.avail_out < BZ_MAX_UNUSED) { n = BZ_MAX_UNUSED - bzf->strm.avail_out; - n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), + n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), n, bzf->handle ); if (n != n2 || ferror(bzf->handle)) { BZ_SETERR(BZ_IO_ERROR); return; }; @@ -1091,9 +1089,9 @@ /*---------------------------------------------------*/ -BZFILE* BZ_API(BZ2_bzReadOpen) - ( int* bzerror, - FILE* f, +BZFILE* BZ_API(BZ2_bzReadOpen) + ( int* bzerror, + FILE* f, int verbosity, int small, void* unused, @@ -1104,7 +1102,7 @@ BZ_SETERR(BZ_OK); - if (f == NULL || + if (f == NULL || (small != 0 && small != 1) || (verbosity < 0 || verbosity > 4) || (unused == NULL && nUnused != 0) || @@ -1115,7 +1113,7 @@ { BZ_SETERR(BZ_IO_ERROR); return NULL; }; bzf = (bzFile*) malloc ( sizeof(bzFile) ); - if (bzf == NULL) + if (bzf == NULL) { BZ_SETERR(BZ_MEM_ERROR); return NULL; }; BZ_SETERR(BZ_OK); @@ -1127,7 +1125,7 @@ bzf->strm.bzalloc = NULL; bzf->strm.bzfree = NULL; bzf->strm.opaque = NULL; - + while (nUnused > 0) { bzf->bufbzf->bufN = *((UChar*)(unused)); bzf->bufN++; unused = ((void*)( 1 + ((UChar*)(unused)) )); @@ -1142,7 +1140,7 @@ bzf->strm.next_in = bzf->buf; bzf->initialisedOk = True; - return bzf; + return bzf; } @@ -1165,10 +1163,10 @@ /*---------------------------------------------------*/ -int BZ_API(BZ2_bzRead) - ( int* bzerror, - BZFILE* b, - void* buf, +int BZ_API(BZ2_bzRead) + ( int* bzerror, + BZFILE* b, + void* buf, int len ) { Int32 n, ret; @@ -1190,11 +1188,11 @@ while (True) { - if (ferror(bzf->handle)) + if (ferror(bzf->handle)) { BZ_SETERR(BZ_IO_ERROR); return 0; }; if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { - n = fread ( bzf->buf, sizeof(UChar), + n = fread ( bzf->buf, sizeof(UChar), BZ_MAX_UNUSED, bzf->handle ); if (ferror(bzf->handle)) { BZ_SETERR(BZ_IO_ERROR); return 0; }; @@ -1208,7 +1206,7 @@ if (ret != BZ_OK && ret != BZ_STREAM_END) { BZ_SETERR(ret); return 0; }; - if (ret == BZ_OK && myfeof(bzf->handle) && + if (ret == BZ_OK && myfeof(bzf->handle) && bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) { BZ_SETERR(BZ_UNEXPECTED_EOF); return 0; }; @@ -1217,7 +1215,7 @@ return len - bzf->strm.avail_out; }; if (bzf->strm.avail_out == 0) { BZ_SETERR(BZ_OK); return len; }; - + } return 0; /*not reached*/ @@ -1225,10 +1223,10 @@ /*---------------------------------------------------*/ -void BZ_API(BZ2_bzReadGetUnused) - ( int* bzerror, - BZFILE* b, - void** unused, +void BZ_API(BZ2_bzReadGetUnused) + ( int* bzerror, + BZFILE* b, + void** unused, int* nUnused ) { bzFile* bzf = (bzFile*)b; @@ -1251,30 +1249,30 @@ /*---------------------------------------------------*/ /*---------------------------------------------------*/ -int BZ_API(BZ2_bzBuffToBuffCompress) - ( char* dest, +int BZ_API(BZ2_bzBuffToBuffCompress) + ( char* dest, unsigned int* destLen, - char* source, + char* source, unsigned int sourceLen, - int blockSize100k, - int verbosity, + int blockSize100k, + int verbosity, int workFactor ) { bz_stream strm; int ret; - if (dest == NULL || destLen == NULL || + if (dest == NULL || destLen == NULL || source == NULL || blockSize100k < 1 || blockSize100k > 9 || verbosity < 0 || verbosity > 4 || - workFactor < 0 || workFactor > 250) + workFactor < 0 || workFactor > 250) return BZ_PARAM_ERROR; if (workFactor == 0) workFactor = 30; strm.bzalloc = NULL; strm.bzfree = NULL; strm.opaque = NULL; - ret = BZ2_bzCompressInit ( &strm, blockSize100k, + ret = BZ2_bzCompressInit ( &strm, blockSize100k, verbosity, workFactor ); if (ret != BZ_OK) return ret; @@ -1288,7 +1286,7 @@ if (ret != BZ_STREAM_END) goto errhandler; /* normal termination */ - *destLen -= strm.avail_out; + *destLen -= strm.avail_out; BZ2_bzCompressEnd ( &strm ); return BZ_OK; @@ -1303,10 +1301,10 @@ /*---------------------------------------------------*/ -int BZ_API(BZ2_bzBuffToBuffDecompress) - ( char* dest, +int BZ_API(BZ2_bzBuffToBuffDecompress) + ( char* dest, unsigned int* destLen, - char* source, + char* source, unsigned int sourceLen, int small, int verbosity ) @@ -1314,10 +1312,10 @@ bz_stream strm; int ret; - if (dest == NULL || destLen == NULL || + if (dest == NULL || destLen == NULL || source == NULL || (small != 0 && small != 1) || - verbosity < 0 || verbosity > 4) + verbosity < 0 || verbosity > 4) return BZ_PARAM_ERROR; strm.bzalloc = NULL; @@ -1347,11 +1345,11 @@ } else { BZ2_bzDecompressEnd ( &strm ); return BZ_OUTBUFF_FULL; - }; + }; errhandler: BZ2_bzDecompressEnd ( &strm ); - return ret; + return ret; } @@ -1403,7 +1401,7 @@ int verbosity = 0; int workFactor = 30; int smallMode = 0; - int nUnused = 0; + int nUnused = 0; if (mode == NULL) return NULL; while (*mode) { @@ -1415,7 +1413,7 @@ case 's': smallMode = 1; break; default: - if (isdigit((int)(*mode))) { + if (isdigit((unsigned char)(*mode))) { blockSize100k = *mode-BZ_HDR_0; } } @@ -1443,7 +1441,7 @@ if (writing) { /* Guard against total chaos and anarchy -- JRS */ if (blockSize100k < 1) blockSize100k = 1; - if (blockSize100k > 9) blockSize100k = 9; + if (blockSize100k > 9) blockSize100k = 9; bzfp = BZ2_bzWriteOpen(&bzerr,fp,blockSize100k, verbosity,workFactor); } else { @@ -1522,7 +1520,7 @@ { int bzerr; FILE *fp; - + if (b==NULL) {return;} fp = ((bzFile *)b)->handle; if(((bzFile*)b)->writing){ @@ -1541,7 +1539,7 @@ /*---------------------------------------------------*/ /*-- - return last error code + return last error code --*/ static const char *bzerrorstrings = { "OK"
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/bzip2-src/compress.c -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/bzip2-src/compress.c
Changed
@@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -22,12 +22,18 @@ /* CHANGES 0.9.0 -- original version. 0.9.0a/b -- no changes in this file. - 0.9.0c -- changed setting of nGroups in sendMTFValues() + 0.9.0c -- changed setting of nGroups in sendMTFValues() so as to do a bit better on small files */ #include "bzlib_private.h" +/* + Perl-specific change to allow building with C++ + The 'register' keyword not allowed from C++17 + see https://github.com/pmqs/Compress-Raw-Bzip2/issues/11 +*/ +#define register /*---------------------------------------------------*/ /*--- Bit stream I/O ---*/ @@ -125,11 +131,11 @@ Int32 wr; Int32 EOB; - /* + /* After sorting (eg, here), s->arr1 0 .. s->nblock-1 holds sorted order, and - ((UChar*)s->arr2) 0 .. s->nblock-1 + ((UChar*)s->arr2) 0 .. s->nblock-1 holds the original block data. The first thing to do is generate the MTF values, @@ -144,7 +150,7 @@ (UChar*) (&((UChar*)s->arr2)s->nblock) These storage aliases are set up in bzCompressInit(), - except for the last one, which is arranged in + except for the last one, which is arranged in compressBlock(). */ UInt32* ptr = s->ptr; @@ -167,7 +173,7 @@ ll_i = s->unseqToSeqblockj; AssertD ( ll_i < s->nInUse, "generateMTFValues(2a)" ); - if (yy0 == ll_i) { + if (yy0 == ll_i) { zPend++; } else { @@ -175,11 +181,11 @@ zPend--; while (True) { if (zPend & 1) { - mtfvwr = BZ_RUNB; wr++; - s->mtfFreqBZ_RUNB++; + mtfvwr = BZ_RUNB; wr++; + s->mtfFreqBZ_RUNB++; } else { - mtfvwr = BZ_RUNA; wr++; - s->mtfFreqBZ_RUNA++; + mtfvwr = BZ_RUNA; wr++; + s->mtfFreqBZ_RUNA++; } if (zPend < 2) break; zPend = (zPend - 2) / 2; @@ -213,11 +219,11 @@ zPend--; while (True) { if (zPend & 1) { - mtfvwr = BZ_RUNB; wr++; - s->mtfFreqBZ_RUNB++; + mtfvwr = BZ_RUNB; wr++; + s->mtfFreqBZ_RUNB++; } else { - mtfvwr = BZ_RUNA; wr++; - s->mtfFreqBZ_RUNA++; + mtfvwr = BZ_RUNA; wr++; + s->mtfFreqBZ_RUNA++; } if (zPend < 2) break; zPend = (zPend - 2) / 2; @@ -240,7 +246,8 @@ { Int32 v, t, i, j, gs, ge, totc, bt, bc, iter; Int32 nSelectors, alphaSize, minLen, maxLen, selCtr; - Int32 nGroups, nBytes; + Int32 nGroups; + Int32 nBytes = 0; /*-- UChar len BZ_N_GROUPSBZ_MAX_ALPHA_SIZE; @@ -261,7 +268,7 @@ ((void)nBytes); /* Silence variable ‘nBytes’ set but not used warning */ if (s->verbosity >= 3) VPrintf3( " %d in block, %d after MTF & 1-2 coding, " - "%d+2 syms in use\n", + "%d+2 syms in use\n", s->nblock, s->nMTF, s->nInUse ); alphaSize = s->nInUse+2; @@ -278,7 +285,7 @@ nGroups = 6; /*--- Generate an initial set of coding tables ---*/ - { + { Int32 nPart, remF, tFreq, aFreq; nPart = nGroups; @@ -293,8 +300,8 @@ aFreq += s->mtfFreqge; } - if (ge > gs - && nPart != nGroups && nPart != 1 + if (ge > gs + && nPart != nGroups && nPart != 1 && ((nGroups-nPart) % 2 == 1)) { aFreq -= s->mtfFreqge; ge--; @@ -303,21 +310,21 @@ if (s->verbosity >= 3) VPrintf5( " initial group %d, %d .. %d, " "has %d syms (%4.1f%%)\n", - nPart, gs, ge, aFreq, + nPart, gs, ge, aFreq, (100.0 * (float)aFreq) / (float)(s->nMTF) ); - + for (v = 0; v < alphaSize; v++) - if (v >= gs && v <= ge) + if (v >= gs && v <= ge) s->lennPart-1v = BZ_LESSER_ICOST; else s->lennPart-1v = BZ_GREATER_ICOST; - + nPart--; gs = ge+1; remF -= aFreq; } } - /*--- + /*--- Iterate up to BZ_N_ITERS times to improve the tables. ---*/ for (iter = 0; iter < BZ_N_ITERS; iter++) { @@ -330,7 +337,7 @@ /*--- Set up an auxiliary length table which is used to fast-track - the common case (nGroups == 6). + the common case (nGroups == 6). ---*/ if (nGroups == 6) { for (v = 0; v < alphaSize; v++) { @@ -347,10 +354,10 @@ /*--- Set group start & end marks. --*/ if (gs >= s->nMTF) break; - ge = gs + BZ_G_SIZE - 1; + ge = gs + BZ_G_SIZE - 1; if (ge >= s->nMTF) ge = s->nMTF-1; - /*-- + /*-- Calculate the cost of this group as coded by each of the coding tables. --*/ @@ -387,13 +394,13 @@ } else { /*--- slow version which correctly handles all situations ---*/ - for (i = gs; i <= ge; i++) { + for (i = gs; i <= ge; i++) { UInt16 icv = mtfvi; for (t = 0; t < nGroups; t++) costt += s->lenticv; } } - - /*-- + + /*-- Find the coding table which is best for this group, and record its identity in the selector table. --*/ @@ -405,7 +412,7 @@ s->selectornSelectors = bt; nSelectors++; - /*-- + /*-- Increment the symbol frequencies for the selected table. --*/ if (nGroups == 6 && 50 == ge-gs+1) { @@ -435,7 +442,7 @@ gs = ge+1; } if (s->verbosity >= 3) { - VPrintf2 ( " pass %d: size is %d, grp uses are ", + VPrintf2 ( " pass %d: size is %d, grp uses are ", iter+1, totc/8 ); for (t = 0; t < nGroups; t++) VPrintf1 ( "%d ", favet ); @@ -445,10 +452,10 @@ /*-- Recompute the tables based on the accumulated frequencies. --*/ - /* maxLen was changed from 20 to 17 in bzip2-1.0.3. See + /* maxLen was changed from 20 to 17 in bzip2-1.0.3. See comment in huffman.c for details. */ for (t = 0; t < nGroups; t++) - BZ2_hbMakeCodeLengths ( &(s->lent0), &(s->rfreqt0), + BZ2_hbMakeCodeLengths ( &(s->lent0), &(s->rfreqt0), alphaSize, 17 /*20*/ ); } @@ -488,19 +495,19 @@ } AssertH ( !(maxLen > 17 /*20*/ ), 3004 ); AssertH ( !(minLen < 1), 3005 ); - BZ2_hbAssignCodes ( &(s->codet0), &(s->lent0), + BZ2_hbAssignCodes ( &(s->codet0), &(s->lent0), minLen, maxLen, alphaSize ); } /*--- Transmit the mapping table. ---*/ - { + { Bool inUse1616; for (i = 0; i < 16; i++) { inUse16i = False; for (j = 0; j < 16; j++) if (s->inUsei * 16 + j) inUse16i = True; } - + nBytes = s->numZ; for (i = 0; i < 16; i++) if (inUse16i) bsW(s,1,1); else bsW(s,1,0); @@ -511,7 +518,7 @@ if (s->inUsei * 16 + j) bsW(s,1,1); else bsW(s,1,0); } - if (s->verbosity >= 3) + if (s->verbosity >= 3) VPrintf1( " bytes: mapping %d, ", s->numZ-nBytes ); } @@ -519,7 +526,7 @@ nBytes = s->numZ; bsW ( s, 3, nGroups ); bsW ( s, 15, nSelectors ); - for (i = 0; i < nSelectors; i++) { + for (i = 0; i < nSelectors; i++) { for (j = 0; j < s->selectorMtfi; j++) bsW(s,1,1); bsW(s,1,0); } @@ -548,14 +555,14 @@ gs = 0; while (True) { if (gs >= s->nMTF) break; - ge = gs + BZ_G_SIZE - 1; + ge = gs + BZ_G_SIZE - 1; if (ge >= s->nMTF) ge = s->nMTF-1; AssertH ( s->selectorselCtr < nGroups, 3006 ); if (nGroups == 6 && 50 == ge-gs+1) { /*--- fast track the common case ---*/ UInt16 mtfv_i; - UChar* s_len_sel_selCtr + UChar* s_len_sel_selCtr = &(s->lens->selectorselCtr0); Int32* s_code_sel_selCtr = &(s->codes->selectorselCtr0); @@ -582,7 +589,7 @@ } else { /*--- slow version which correctly handles all situations ---*/ for (i = gs; i <= ge; i++) { - bsW ( s, + bsW ( s, s->len s->selectorselCtr mtfvi, s->code s->selectorselCtr mtfvi ); } @@ -637,8 +644,8 @@ /*-- Now the block's CRC, so it is in a known place. --*/ bsPutUInt32 ( s, s->blockCRC ); - /*-- - Now a single bit indicating (non-)randomisation. + /*-- + Now a single bit indicating (non-)randomisation. As of version 0.9.5, we use a better sorting algorithm which makes randomisation unnecessary. So always set the randomised bit to 'no'. Of course, the decoder
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/bzip2-src/crctable.c -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/bzip2-src/crctable.c
Changed
@@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/bzip2-src/decompress.c -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/bzip2-src/decompress.c
Changed
@@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -128,7 +128,7 @@ Int32 N; Int32 curr; Int32 zt; - Int32 zn; + Int32 zn; Int32 zvec; Int32 zj; Int32 gSel; @@ -182,7 +182,7 @@ N = s->save_N; curr = s->save_curr; zt = s->save_zt; - zn = s->save_zn; + zn = s->save_zn; zvec = s->save_zvec; zj = s->save_zj; gSel = s->save_gSel; @@ -205,14 +205,14 @@ if (uc != BZ_HDR_h) RETURN(BZ_DATA_ERROR_MAGIC); GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8) - if (s->blockSize100k < (BZ_HDR_0 + 1) || + if (s->blockSize100k < (BZ_HDR_0 + 1) || s->blockSize100k > (BZ_HDR_0 + 9)) RETURN(BZ_DATA_ERROR_MAGIC); s->blockSize100k -= BZ_HDR_0; if (s->smallDecompress) { s->ll16 = (UInt16*) BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) ); - s->ll4 = (UChar*) BZALLOC( - ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) + s->ll4 = (UChar*) BZALLOC( + ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) ); if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR); } else { @@ -238,7 +238,7 @@ s->currBlockNo++; if (s->verbosity >= 2) VPrintf1 ( "\n %d: huff+mtf ", s->currBlockNo ); - + s->storedBlockCRC = 0; GET_UCHAR(BZ_X_BCRC_1, uc); s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); @@ -261,14 +261,14 @@ if (s->origPtr < 0) RETURN(BZ_DATA_ERROR); - if (s->origPtr > 10 + 100000*s->blockSize100k) + if (s->origPtr > 10 + 100000*s->blockSize100k) RETURN(BZ_DATA_ERROR); /*--- Receive the mapping table ---*/ for (i = 0; i < 16; i++) { GET_BIT(BZ_X_MAPPING_1, uc); - if (uc == 1) - s->inUse16i = True; else + if (uc == 1) + s->inUse16i = True; else s->inUse16i = False; } @@ -310,7 +310,7 @@ { UChar posBZ_N_GROUPS, tmp, v; for (v = 0; v < nGroups; v++) posv = v; - + for (i = 0; i < nSelectors; i++) { v = s->selectorMtfi; tmp = posv; @@ -343,10 +343,10 @@ if (s->lenti > maxLen) maxLen = s->lenti; if (s->lenti < minLen) minLen = s->lenti; } - BZ2_hbCreateDecodeTables ( - &(s->limitt0), - &(s->baset0), - &(s->permt0), + BZ2_hbCreateDecodeTables ( + &(s->limitt0), + &(s->baset0), + &(s->permt0), &(s->lent0), minLen, maxLen, alphaSize ); @@ -445,23 +445,23 @@ s->mtfa(z)-3 = s->mtfa(z)-4; nn -= 4; } - while (nn > 0) { - s->mtfa(pp+nn) = s->mtfa(pp+nn)-1; nn--; + while (nn > 0) { + s->mtfa(pp+nn) = s->mtfa(pp+nn)-1; nn--; }; s->mtfapp = uc; - } else { + } else { /* general case */ lno = nn / MTFL_SIZE; off = nn % MTFL_SIZE; pp = s->mtfbaselno + off; uc = s->mtfapp; - while (pp > s->mtfbaselno) { - s->mtfapp = s->mtfapp-1; pp--; + while (pp > s->mtfbaselno) { + s->mtfapp = s->mtfapp-1; pp--; }; s->mtfbaselno++; while (lno > 0) { s->mtfbaselno--; - s->mtfas->mtfbaselno + s->mtfas->mtfbaselno = s->mtfas->mtfbaselno-1 + MTFL_SIZE - 1; lno--; } @@ -556,7 +556,7 @@ if (s->blockRandomised) { BZ_RAND_INIT_MASK; BZ_GET_SMALL(s->k0); s->nblock_used++; - BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; + BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; } else { BZ_GET_SMALL(s->k0); s->nblock_used++; } @@ -575,7 +575,7 @@ if (s->blockRandomised) { BZ_RAND_INIT_MASK; BZ_GET_FAST(s->k0); s->nblock_used++; - BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; + BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; } else { BZ_GET_FAST(s->k0); s->nblock_used++; } @@ -644,7 +644,7 @@ s->save_gBase = gBase; s->save_gPerm = gPerm; - return retVal; + return retVal; }
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/bzip2-src/huffman.c -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/bzip2-src/huffman.c
Changed
@@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -60,7 +60,7 @@ /*---------------------------------------------------*/ -void BZ2_hbMakeCodeLengths ( UChar *len, +void BZ2_hbMakeCodeLengths ( UChar *len, Int32 *freq, Int32 alphaSize, Int32 maxLen ) @@ -74,7 +74,7 @@ Int32 heap BZ_MAX_ALPHA_SIZE + 2 ; Int32 weight BZ_MAX_ALPHA_SIZE * 2 ; - Int32 parent BZ_MAX_ALPHA_SIZE * 2 ; + Int32 parent BZ_MAX_ALPHA_SIZE * 2 ; for (i = 0; i < alphaSize; i++) weighti+1 = (freqi == 0 ? 1 : freqi) << 8; @@ -96,7 +96,7 @@ } AssertH( nHeap < (BZ_MAX_ALPHA_SIZE+2), 2001 ); - + while (nHeap > 1) { n1 = heap1; heap1 = heapnHeap; nHeap--; DOWNHEAP(1); n2 = heap1; heap1 = heapnHeap; nHeap--; DOWNHEAP(1); @@ -119,7 +119,7 @@ leni-1 = j; if (j > maxLen) tooLong = True; } - + if (! tooLong) break; /* 17 Oct 04: keep-going condition for the following loop used
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/bzip2-src/randtable.c -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/bzip2-src/randtable.c
Changed
@@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -23,58 +23,58 @@ /*---------------------------------------------*/ -const Int32 BZ2_rNums512 = { - 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, - 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, - 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, - 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, - 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, - 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, - 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, - 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, - 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, - 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, - 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, - 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, - 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, - 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, - 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, - 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, - 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, - 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, - 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, - 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, - 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, - 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, - 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, - 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, - 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, - 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, - 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, - 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, - 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, - 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, - 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, - 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, - 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, - 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, - 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, - 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, - 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, - 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, - 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, - 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, - 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, - 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, - 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, - 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, - 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, - 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, - 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, - 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, - 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, - 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, - 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, +const Int32 BZ2_rNums512 = { + 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, + 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, + 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, + 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, + 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, + 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, + 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, + 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, + 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, + 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, + 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, + 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, + 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, + 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, + 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, + 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, + 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, + 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, + 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, + 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, + 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, + 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, + 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, + 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, + 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, + 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, + 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, + 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, + 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, + 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, + 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, + 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, + 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, + 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, + 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, + 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, + 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, + 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, + 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, + 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, + 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, + 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, + 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, + 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, + 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, + 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, + 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, + 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, + 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, + 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, + 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, 936, 638 };
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/lib/Compress/Raw/Bzip2.pm -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/lib/Compress/Raw/Bzip2.pm
Changed
@@ -11,7 +11,7 @@ use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD); -$VERSION = '2.201'; +$VERSION = '2.205'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -384,7 +384,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2022 Paul Marquess. All rights reserved. +Copyright (c) 2005-2023 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
View file
_service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/suppressions.asan
Added
@@ -0,0 +1,10 @@ +# suppressions file for address sanitizer + +leak:Perl_yylex +leak:Perl_yyparse +leak:Perl_init_i18nl10n +leak:Perl_newSTATEOP +leak:S_optimize_op +leak:Perl_re_op_compile +leak:S_doeval_compile +leak:Perl_re_dup_guts
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/t/000prereq.t -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/t/000prereq.t
Changed
@@ -19,7 +19,7 @@ if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - my $VERSION = '2.201'; + my $VERSION = '2.205'; my @NAMES = qw( );
View file
_service:tar_scm:Compress-Raw-Bzip2-2.201.tar.gz/t/Test/More.pm -> _service:tar_scm:Compress-Raw-Bzip2-2.205.tar.gz/t/Test/More.pm
Changed
@@ -361,7 +361,7 @@ $Test->isnt_eq(@_); } -*isn't = \&isnt; +# *isn't = \&isnt; =item B<like> @@ -463,9 +463,9 @@ is almost exactly like saying: - ok( Foo->can('this') && - Foo->can('that') && - Foo->can('whatever') + ok( Foo->can('this') && + Foo->can('that') && + Foo->can('whatever') ); only without all the typing and with a better interface. Handy for @@ -498,9 +498,9 @@ } my $name; - $name = @methods == 1 ? "$class->can('$methods0')" + $name = @methods == 1 ? "$class->can('$methods0')" : "$class->can(...)"; - + my $ok = $Test->ok( !@nok, $name ); $Test->diag(map " $class->can('$_') failed\n", @nok); @@ -573,8 +573,8 @@ $diag = "$obj_name isn't a '$class' it's a '$ref'"; } } - - + + my $ok; if( $diag ) { @@ -809,7 +809,7 @@ Sometimes running a test under certain conditions will cause the test script to die. A certain function or method isn't implemented -(such as fork() on MacOS), some resource isn't available (like a +(such as fork() on MacOS), some resource isn't available (like a net connection) or a module isn't available. In these cases it's necessary to skip tests, or declare that they are supposed to fail but will work in the future (a todo test). @@ -1009,7 +1009,7 @@ unless( @_ == 2 or @_ == 3 ) { my $msg = <<WARNING; is_deeply() takes two or three args, you gave %d. -This usually means you passed an array or hash instead +This usually means you passed an array or hash instead of a reference to it WARNING chop $msg; # clip off newline so carp() will put in line/file @@ -1111,7 +1111,7 @@ ok( eq_array(\@this, \@that) ); -C<is_deeply()> can do that better and with diagnostics. +C<is_deeply()> can do that better and with diagnostics. is_deeply( \@this, \@that ); @@ -1171,7 +1171,7 @@ { # Quiet uninitialized value warnings when comparing undefs. - local $^W = 0; + local $^W = 0; $Test->_unoverload(\$e1, \$e2); @@ -1483,7 +1483,7 @@ Copyright 2001, 2002, 2004 by Michael G Schwern E<lt>schwern@pobox.comE<gt>. -This program is free software; you can redistribute it and/or +This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F<http://www.perl.com/perl/misc/Artistic.html>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2