Compare commits
25 Commits
v0.79.6-pl
...
v0.79.6-pl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
355427b6e0 | ||
|
|
da44e81561 | ||
|
|
9e5ba80e29 | ||
|
|
c72b85bb9a | ||
|
|
97a4df2f21 | ||
|
|
f68efb758e | ||
|
|
66cf0d25ee | ||
|
|
e8eb7824aa | ||
|
|
a3aedbd4a2 | ||
|
|
83acea4684 | ||
|
|
3bd06abbda | ||
|
|
901e87dfcd | ||
|
|
4518992908 | ||
|
|
802e095cfb | ||
|
|
8332b845a7 | ||
|
|
c0de13c027 | ||
|
|
b03bd5d076 | ||
|
|
290097c9b3 | ||
|
|
305f773bd3 | ||
|
|
fc18da7043 | ||
|
|
396c73f5c8 | ||
|
|
93c6a7a887 | ||
|
|
53ddb9a51b | ||
|
|
0521f5271e | ||
|
|
3844c156e5 |
28
.github/workflows/make-dist.sh
vendored
28
.github/workflows/make-dist.sh
vendored
@@ -4,31 +4,20 @@ set -x
|
||||
|
||||
github_ref="$1"
|
||||
|
||||
if [ -n "$GITHUB_EVENT_PATH" ] && [ -f "$GITHUB_EVENT_PATH" ]; then
|
||||
if command -v jq >/dev/null; then
|
||||
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
||||
echo "Upload URL is $upload_url"
|
||||
echo "::set-output name=upload_url::$upload_url"
|
||||
fi
|
||||
else
|
||||
echo "This should only be run from GitHub Actions"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$MSYSTEM" in
|
||||
MINGW64) os=win64; exe=.exe;;
|
||||
MINGW32) os=win32; exe=.exe;;
|
||||
*) os=linux64; exe='';;
|
||||
MINGW64) os=win64; suf=$os-portable; exe=.exe;;
|
||||
MINGW32) os=win32; suf=$os-portable; exe=.exe;;
|
||||
*) os=linux64; suf=$os-static; exe='';;
|
||||
esac
|
||||
|
||||
./dvdisaster$exe --version
|
||||
|
||||
if ./dvdisaster$exe --version | grep -q NOGUI; then
|
||||
GUI=0
|
||||
suffix="$os-cli-only"
|
||||
suffix=$suf-cli-only
|
||||
else
|
||||
GUI=1
|
||||
suffix=$os-static
|
||||
suffix=$suf
|
||||
fi
|
||||
|
||||
archive=dvdisaster-$(echo "$github_ref" | grep -Eo '[^/]+$')-$suffix.zip
|
||||
@@ -39,9 +28,9 @@ mkdir -p dist/locale
|
||||
cp -vr locale/*/ dist/locale/
|
||||
if [ "$os" != "linux64" ]; then
|
||||
if [ "$GUI" = 1 ]; then
|
||||
mkdir -p dist/share/themes
|
||||
mkdir -p dist/share/themes dist/lib/gtk-2.0
|
||||
cp -vr $MINGW_PREFIX/share/themes/MS-Windows dist/share/themes/
|
||||
cp -vr $MINGW_PREFIX/lib/gtk-2.0 dist/lib/
|
||||
cp -vr $MINGW_PREFIX/lib/gtk-2.0/* dist/lib/gtk-2.0/
|
||||
rm -rf dist/lib/gtk-2.0/include
|
||||
fi
|
||||
mkdir -p dist/lib
|
||||
@@ -53,7 +42,8 @@ if [ "$os" != "linux64" ]; then
|
||||
find dist -type f -name "*.a" -delete
|
||||
fi
|
||||
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
||||
cp dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
||||
cp CHANGELOG TODO dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
||||
cp CREDITS.en dist/CREDITS
|
||||
if command -v zip >/dev/null; then
|
||||
mv dist ${archive/.zip/}
|
||||
zip -9r $archive ${archive/.zip/}
|
||||
|
||||
218
.github/workflows/release.yml
vendored
218
.github/workflows/release.yml
vendored
@@ -5,31 +5,53 @@ on:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
|
||||
win64-gui:
|
||||
win:
|
||||
runs-on: windows-2016
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86_64, i686]
|
||||
ui: [cli, gui]
|
||||
include:
|
||||
- arch: x86_64
|
||||
msystem: MINGW64
|
||||
grep: x86-64
|
||||
- arch: i686
|
||||
msystem: MINGW32
|
||||
grep: 386
|
||||
- ui: cli
|
||||
clionly: --with-cli-only
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
msystem: ${{ matrix.msystem }}
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-x86_64-gtk2 mingw-w64-x86_64-glib2 mingw-w64-x86_64-gcc mingw-w64-x86_64-ghostscript mingw-w64-x86_64-jq mingw-w64-x86_64-ntldd-git man zip
|
||||
- run: git config --global core.autocrlf input
|
||||
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
|
||||
- name: install GUI prereqs
|
||||
if: matrix.ui == 'gui'
|
||||
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2
|
||||
- name: git config
|
||||
run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: ./configure
|
||||
run: ./configure ${{ matrix.clionly }}
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version
|
||||
file dvdisaster.exe
|
||||
./dvdisaster.exe --version | grep -q -e dirty -e NOGUI && exit 1
|
||||
file dvdisaster.exe | grep -q 'x86-64, for MS Windows'
|
||||
if ./dvdisaster.exe --version | grep dirty; then exit 1; fi
|
||||
file dvdisaster.exe | grep -q '${{ matrix.grep }}, for MS Windows'
|
||||
- name: check executable (GUI)
|
||||
if: matrix.ui == 'gui'
|
||||
run: if ./dvdisaster.exe --version | grep NOGUI; then exit 1; fi
|
||||
- name: check executable (CLI)
|
||||
if: matrix.ui == 'cli'
|
||||
run: ./dvdisaster.exe --version | grep NOGUI
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
id: dist
|
||||
@@ -44,138 +66,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
win32-gui:
|
||||
runs-on: windows-2016
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW32
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-i686-gtk2 mingw-w64-i686-glib2 mingw-w64-i686-gcc mingw-w64-i686-ghostscript mingw-w64-i686-jq mingw-w64-i686-ntldd-git man zip
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version
|
||||
file dvdisaster.exe
|
||||
./dvdisaster.exe --version | grep -q -e dirty -e NOGUI && exit 1
|
||||
file dvdisaster.exe | grep -q '386, for MS Windows'
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
id: dist
|
||||
- name: check executability of dist from cmd.exe
|
||||
shell: cmd
|
||||
run: |
|
||||
cd dist
|
||||
dvdisaster.exe --version
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
win64-cli:
|
||||
runs-on: windows-2016
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-x86_64-glib2 mingw-w64-x86_64-gcc mingw-w64-x86_64-ghostscript mingw-w64-x86_64-jq mingw-w64-x86_64-ntldd-git man zip
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: env CLI_ONLY=1 ./configure
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version
|
||||
file dvdisaster.exe
|
||||
./dvdisaster.exe --version | grep -q -e dirty && exit 1
|
||||
./dvdisaster.exe --version | grep -q NOGUI
|
||||
file dvdisaster.exe | grep -q 'x86-64, for MS Windows'
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
id: dist
|
||||
- name: check executability of dist from cmd.exe
|
||||
shell: cmd
|
||||
run: |
|
||||
cd dist
|
||||
dvdisaster.exe --version
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
win32-cli:
|
||||
runs-on: windows-2016
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW32
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-i686-glib2 mingw-w64-i686-gcc mingw-w64-i686-ghostscript mingw-w64-i686-jq mingw-w64-i686-ntldd-git man zip
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: env CLI_ONLY=1 ./configure
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version
|
||||
file dvdisaster.exe
|
||||
./dvdisaster.exe --version | grep -q -e dirty && exit 1
|
||||
./dvdisaster.exe --version | grep -q NOGUI
|
||||
file dvdisaster.exe | grep -q '386, for MS Windows'
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
id: dist
|
||||
- name: check executability of dist from cmd.exe
|
||||
shell: cmd
|
||||
run: |
|
||||
cd dist
|
||||
dvdisaster.exe --version
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
@@ -185,9 +76,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install prerequisites
|
||||
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man jq
|
||||
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man
|
||||
- name: configure
|
||||
run: env CLI_ONLY=1 ./configure
|
||||
run: ./configure --with-cli-only
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc) && make static && mv -f dvdisaster-static dvdisaster
|
||||
- name: check executable
|
||||
@@ -204,7 +95,48 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
linux64-appimage:
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install prerequisites
|
||||
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man wget libgtk2.0-dev gtk2-engines-pixbuf gtk2-engines pkg-config gnome-themes-standard
|
||||
- name: configure
|
||||
run: ./configure --prefix=/usr
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc) && make
|
||||
- name: make install
|
||||
run: touch documentation/user-manual/manual.pdf && mkdir /tmp/dist && make install DESTDIR=/tmp/dist
|
||||
- name: copy things to dist
|
||||
run: |
|
||||
install -d /tmp/dist/usr/lib/gtk-2.0
|
||||
cp -va $(pkg-config --variable=libdir gtk+-2.0)/gtk-2.0/$(pkg-config --variable=gtk_binary_version gtk+-2.0)/* /tmp/dist/usr/lib/gtk-2.0
|
||||
- name: get linuxdeploy
|
||||
run: wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod 755 linuxdeploy-x86_64.AppImage
|
||||
- name: build appimage
|
||||
run: |
|
||||
export VERSION=$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')
|
||||
./linuxdeploy-x86_64.AppImage -d contrib/dvdisaster.desktop -i contrib/dvdisaster64.png -i contrib/dvdisaster48.png -i contrib/dvdisaster32.png -i contrib/dvdisaster16.png --icon-filename dvdisaster --custom-apprun=contrib/AppRun.sh --appdir /tmp/dist/ --output appimage
|
||||
- name: test appimage
|
||||
id: dist
|
||||
run: |
|
||||
chmod 755 dvdisaster*.AppImage && ./dvdisaster*.AppImage --version
|
||||
archive=$(ls -1 dvdisaster*.AppImage)
|
||||
echo "::set-output name=archive::$archive"
|
||||
echo "appimage is <$archive>"
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
|
||||
223
.github/workflows/tests.yml
vendored
223
.github/workflows/tests.yml
vendored
@@ -3,185 +3,114 @@ name: non-regression tests
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
win64-gui:
|
||||
win:
|
||||
runs-on: windows-2016
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86_64, i686]
|
||||
ui: [cli, gui]
|
||||
printf: [fmtdbg, normal]
|
||||
include:
|
||||
- arch: x86_64
|
||||
msystem: MINGW64
|
||||
grep: x86-64
|
||||
- arch: i686
|
||||
msystem: MINGW32
|
||||
grep: 386
|
||||
- ui: cli
|
||||
clionly: --with-cli-only
|
||||
- printf: fmtdbg
|
||||
debugprintf: --with-debug-printf-format
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
msystem: ${{ matrix.msystem }}
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-x86_64-gtk2 mingw-w64-x86_64-glib2 mingw-w64-x86_64-gcc mingw-w64-x86_64-ghostscript mingw-w64-x86_64-jq mingw-w64-x86_64-ntldd-git man zip
|
||||
- run: git config --global core.autocrlf input
|
||||
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
|
||||
- name: install GUI prereqs
|
||||
if: matrix.ui == 'gui'
|
||||
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2
|
||||
- name: git config
|
||||
run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: ./configure
|
||||
run: |
|
||||
echo running ./configure ${{ matrix.clionly }}
|
||||
./configure ${{ matrix.clionly }}
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version
|
||||
file dvdisaster.exe
|
||||
./dvdisaster.exe --version | grep -q -e dirty -e NOGUI && exit 1
|
||||
file dvdisaster.exe | grep -q 'x86-64, for MS Windows'
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
id: dist
|
||||
- name: check executability of dist from cmd.exe
|
||||
shell: cmd
|
||||
run: |
|
||||
cd dist
|
||||
dvdisaster.exe --version
|
||||
- name: regression tests
|
||||
run: mkdir /var/tmp/regtest && export REGTEST_NO_UTF8=1 && ./regtest/runtests.sh
|
||||
|
||||
win32-gui:
|
||||
runs-on: windows-2016
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW32
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-i686-gtk2 mingw-w64-i686-glib2 mingw-w64-i686-gcc mingw-w64-i686-ghostscript mingw-w64-i686-jq mingw-w64-i686-ntldd-git man zip
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executable
|
||||
if ./dvdisaster.exe --version | grep dirty; then exit 1; fi
|
||||
file dvdisaster.exe | grep -q '${{ matrix.grep }}, for MS Windows'
|
||||
- name: check executable (GUI)
|
||||
if: matrix.ui == 'gui'
|
||||
run: |
|
||||
./dvdisaster.exe --version
|
||||
file dvdisaster.exe
|
||||
./dvdisaster.exe --version | grep -q -e dirty -e NOGUI && exit 1
|
||||
file dvdisaster.exe | grep -q '386, for MS Windows'
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
id: dist
|
||||
- name: check executability of dist from cmd.exe
|
||||
shell: cmd
|
||||
run: |
|
||||
cd dist
|
||||
dvdisaster.exe --version
|
||||
- name: regression tests
|
||||
run: mkdir /var/tmp/regtest && export REGTEST_NO_UTF8=1 && ./regtest/runtests.sh
|
||||
|
||||
win64-cli:
|
||||
runs-on: windows-2016
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-x86_64-glib2 mingw-w64-x86_64-gcc mingw-w64-x86_64-ghostscript mingw-w64-x86_64-jq mingw-w64-x86_64-ntldd-git man zip
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: env CLI_ONLY=1 ./configure
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executable
|
||||
if ./dvdisaster.exe --version | grep NOGUI; then exit 1; fi
|
||||
- name: check executable (CLI)
|
||||
if: matrix.ui == 'cli'
|
||||
run: |
|
||||
./dvdisaster.exe --version
|
||||
file dvdisaster.exe
|
||||
./dvdisaster.exe --version | grep -q -e dirty && exit 1
|
||||
./dvdisaster.exe --version | grep -q NOGUI
|
||||
file dvdisaster.exe | grep -q 'x86-64, for MS Windows'
|
||||
- name: prepare dist
|
||||
./dvdisaster.exe --version | grep NOGUI
|
||||
- name: try to prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
id: dist
|
||||
- name: check executability of dist from cmd.exe
|
||||
shell: cmd
|
||||
run: |
|
||||
cd dist
|
||||
dvdisaster.exe --version
|
||||
- name: regression tests
|
||||
run: mkdir /var/tmp/regtest && export REGTEST_NO_UTF8=1 && ./regtest/runtests.sh
|
||||
- name: run regression tests
|
||||
if: matrix.printf == 'normal'
|
||||
env:
|
||||
REGTEST_NO_UTF8: 1
|
||||
run: mkdir /var/tmp/regtest && ./regtest/runtests.sh
|
||||
|
||||
win32-cli:
|
||||
runs-on: windows-2016
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW32
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-i686-glib2 mingw-w64-i686-gcc mingw-w64-i686-ghostscript mingw-w64-i686-jq mingw-w64-i686-ntldd-git man zip
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: env CLI_ONLY=1 ./configure
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version
|
||||
file dvdisaster.exe
|
||||
./dvdisaster.exe --version | grep -q -e dirty && exit 1
|
||||
./dvdisaster.exe --version | grep -q NOGUI
|
||||
file dvdisaster.exe | grep -q '386, for MS Windows'
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
id: dist
|
||||
- name: check executability of dist from cmd.exe
|
||||
shell: cmd
|
||||
run: |
|
||||
cd dist
|
||||
dvdisaster.exe --version
|
||||
- name: regression tests
|
||||
run: mkdir /var/tmp/regtest && export REGTEST_NO_UTF8=1 && ./regtest/runtests.sh
|
||||
|
||||
linux64-cli:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ui: [cli, gui]
|
||||
printf: [fmtdbg, normal]
|
||||
include:
|
||||
- ui: cli
|
||||
clionly: --with-cli-only
|
||||
- printf: fmtdbg
|
||||
debugprintf: --with-debug-printf-format
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install prerequisites
|
||||
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man jq
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: sudo apt-get update && sudo apt-get install -y libglib2.0-dev ghostscript man jq
|
||||
- name: install prerequisites (GUI)
|
||||
if: matrix.ui == 'gui'
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: sudo apt-get install -y libgtk2.0-dev
|
||||
- name: configure
|
||||
run: env CLI_ONLY=1 ./configure
|
||||
run: |
|
||||
echo ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
|
||||
./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executability
|
||||
run: ./dvdisaster --version
|
||||
- name: check executable
|
||||
run: file dvdisaster && file dvdisaster | grep -q 'ELF 64'
|
||||
- name: check executable (GUI)
|
||||
if: matrix.ui == 'gui'
|
||||
run: |
|
||||
./dvdisaster --version
|
||||
if ./dvdisaster --version | grep NOGUI; then exit 1; fi
|
||||
- name: check executable (CLI)
|
||||
if: matrix.ui == 'cli'
|
||||
run: |
|
||||
./dvdisaster --version
|
||||
./dvdisaster --version | grep NOGUI
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
- name: regression tests
|
||||
run: mkdir /var/tmp/regtest && export REGTEST_NO_UTF8=1 && ./regtest/runtests.sh
|
||||
|
||||
linux64-gui:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install prerequisites
|
||||
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man jq libgtk2.0-dev
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
- name: check executability
|
||||
run: ./dvdisaster --version
|
||||
- name: check executable
|
||||
run: file dvdisaster && file dvdisaster | grep -q 'ELF 64'
|
||||
- name: prepare dist
|
||||
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
||||
- name: regression tests
|
||||
run: mkdir /var/tmp/regtest && export REGTEST_NO_UTF8=1 && ./regtest/runtests.sh
|
||||
|
||||
if: matrix.printf == 'normal'
|
||||
env:
|
||||
REGTEST_NO_UTF8: 1
|
||||
run: mkdir /var/tmp/regtest && ./regtest/runtests.sh
|
||||
|
||||
20
CHANGELOG
20
CHANGELOG
@@ -1,5 +1,25 @@
|
||||
# dvdisaster changelog -*-text-*-
|
||||
|
||||
0.79.6.patchlevel-6 17-01-2021 *UNOFFICIAL*
|
||||
- fix: allow blank media in Preferences>Error correction>RS02>query medium (#19)
|
||||
- fix: tested compilation under clang, detected a reversed order or arguments in a call to memset(), fixed
|
||||
- fix: printf: added --with-debug-print-format configure option to permit compile-time detection of printf format errors:
|
||||
- fixed some potentially severe ones
|
||||
- replaced %ldd/%ld by PRId64 to remove warnings on all archs
|
||||
- fix: appimage: adjust docdir for help menu
|
||||
- chore: ensure configure works properly even if user adds -Werror to CFLAGS
|
||||
- chore: added --with-werror to configure
|
||||
- chore: replaced CLI_ONLY=1 by --with-cli-only in configure
|
||||
- chore: update locales
|
||||
- chore: debug printf format in GitHub actions tests
|
||||
|
||||
0.79.6.patchlevel-5 12-01-2021 *UNOFFICIAL*
|
||||
- fix: don't error on blank media in medium-info (#19), bug present upstream since 0.79.5
|
||||
- fix: gui: fix the 'SetLabelText() failed' error caption on the medium-info window (#19), bug present upstream since 0.72.3
|
||||
- fix: add CHANGELOG, TODO, CREDITS to dist for the Help menu
|
||||
- chore: appimage: add missing gtk engines and adjust docdir for help menu
|
||||
- chore: enhance packaging, update locales, changelog et al.
|
||||
|
||||
0.79.6.patchlevel-4 04-09-2020 *UNOFFICIAL*
|
||||
- feat: allow adaptive reading again*
|
||||
- feat: add --permissive-medium-type option
|
||||
|
||||
@@ -63,6 +63,12 @@ LIBS = $(INTL_LIBS) $(CAM_LIBS) $(GTK_LIBS) $(EFENCE_LIBS) $(MUDFLAP_LIBS) -lm
|
||||
CFILES = $(CFG_CFILES)
|
||||
OFILES = $(CFG_OFILES)
|
||||
|
||||
# special case for DESTDIR, if BUILDROOT is undef and DESTDIR is,
|
||||
# set BUILDROOT to DESTDIR
|
||||
ifeq "" "$(BUILDROOT)"
|
||||
BUILDROOT = $(DESTDIR)
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
# Compilation related
|
||||
######################################################################
|
||||
|
||||
2
INSTALL
2
INSTALL
@@ -130,7 +130,7 @@ user@host> ./configure
|
||||
If you want to build a CLI-only version, which doesn't depend
|
||||
on the gtk2 libraries, you can run instead:
|
||||
|
||||
user@host> CLI_ONLY=1 ./configure
|
||||
user@host> ./configure --with-cli-only
|
||||
|
||||
The script will possibly print some errors about missing libraries.
|
||||
Type "configure --help" to learn about pointing configure
|
||||
|
||||
5
Makefile
5
Makefile
@@ -5,8 +5,9 @@
|
||||
all:
|
||||
@echo
|
||||
@echo "Please run \`./configure' first."
|
||||
@echo "To build a CLI-only version,"
|
||||
@echo "run \`CLI_ONLY=1 ./configure' instead."
|
||||
@echo
|
||||
@echo "To build a CLI-only version, run `./configure --with-cli-only'."
|
||||
@echo
|
||||
@echo "Note that dvdisaster requires GNU make to build."
|
||||
@echo "Under non-Linux systems, it might be known as \`gmake'."
|
||||
@echo
|
||||
|
||||
@@ -14,12 +14,14 @@ This version is built on top of the latest upstream version, with the following
|
||||
|
||||
- Most Debian patches have been applied, those specific to Debian have been omitted
|
||||
- Windows build supported again, it was dropped upstream a few versions back
|
||||
- A CLI-only version, not depending on gtk (`CLI_ONLY=1 ./configure && make clean && make -j4`)
|
||||
- A CLI-only version, not depending on gtk (`./configure --with-cli-only && make clean && make -j4`)
|
||||
- Regression tests confirmed working on Linux64, Windows32 and Windows64, for normal and CLI-only builds
|
||||
- Added pre-defined sizes for BD-R Triple Layer (100GB), BD-R Quadruple Layer (128GB)
|
||||
|
||||
For more information please refer to the [CHANGELOG](CHANGELOG).
|
||||
|
||||
This version will never break compatibility with upstream versions, the goal is to ensure an optical media protected by upstream dvdisaster will still be able to be repaired with this version 10+ years from now. Regression tests are here to ensure this is the case.
|
||||
|
||||
## 3 available protection modes ("codecs")
|
||||
|
||||
**RS01** creates error correction files which are stored separately from the image they belong to.
|
||||
|
||||
54
configure
vendored
54
configure
vendored
@@ -3,15 +3,11 @@
|
||||
# Load the shell functions needed for the rest of this script.
|
||||
|
||||
BASH_BASED_CONFIGURE=./scripts/bash-based-configure
|
||||
BASH_BASED_CONFIGURE_OPTS="--buildtmp=$(pwd)/build"
|
||||
REQUIRED_CFLAGS="-DPATCHLEVEL=4 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I. -pipe"
|
||||
RECOMMENDED_CFLAGS="-O2 -fomit-frame-pointer -Wall -Wno-deprecated-declarations -Wno-stringop-truncation"
|
||||
BASH_BASED_CONFIGURE_OPTS="--buildtmp=$(pwd)/build $@"
|
||||
REQUIRED_CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I. -pipe"
|
||||
RECOMMENDED_CFLAGS="-O2 -fomit-frame-pointer -Wall -Wno-unknown-warning-option -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-format-zero-length"
|
||||
DEBUG_CFLAGS="-ggdb -Wall"
|
||||
|
||||
if [ "$CLI_ONLY" = 1 ]; then
|
||||
REQUIRED_CFLAGS="-DCLI $REQUIRED_CFLAGS"
|
||||
fi
|
||||
|
||||
CFG_USE_CYGWIN="no" # do not change
|
||||
|
||||
if test -e $BASH_BASED_CONFIGURE; then
|
||||
@@ -25,8 +21,8 @@ fi
|
||||
# Set the package name and version
|
||||
|
||||
PACKAGE dvdisaster 0.79.6
|
||||
CFG_HAVE_OPTIONS="$CFG_HAVE_OPTIONS -DHAVE_UNSTABLE_RELEASE"
|
||||
|
||||
DEFINE_INT PATCHLEVEL 6
|
||||
DEFINE_STRING HAVE_UNSTABLE_RELEASE 1
|
||||
|
||||
# Check for some essential tools.
|
||||
|
||||
@@ -41,19 +37,29 @@ GET_PKGNAME
|
||||
GET_PREFIX /usr/local
|
||||
GET_BINDIR
|
||||
GET_MANDIR
|
||||
GET_DOCDIR /usr/share/doc
|
||||
GET_DOCDIR
|
||||
GET_DIR "$PKGNAME" docsub "Documentation sub"\
|
||||
" put documentation into this subdirectory\n under \$DOCDIR "
|
||||
GET_LOCALEDIR /usr/share/locale
|
||||
GET_LOCALEDIR
|
||||
GET_BUILDROOT
|
||||
GET_BUILDTMP
|
||||
|
||||
PRINT_MESSAGE "\nDetermining build flavor:"
|
||||
|
||||
# old way of specifying --with-cli-only
|
||||
if [ "$CLI_ONLY" = 1 ]; then
|
||||
cfg_with_cli_only=yes
|
||||
unset CLI_ONLY
|
||||
fi
|
||||
|
||||
WITH_OPTION cli-only no "[yes | no]"
|
||||
|
||||
# Look for required libraries
|
||||
|
||||
PRINT_MESSAGE "\nLooking for includes and libraries:"
|
||||
|
||||
REQUIRE_GLIB2 2 32 0
|
||||
if [ "$CLI_ONLY" != 1 ]; then
|
||||
if test "$cfg_with_cli_only" != "yes"; then
|
||||
REQUIRE_GTK2 2 6 0 WITH_THREADS
|
||||
fi
|
||||
echo
|
||||
@@ -117,7 +123,7 @@ if ! EXECUTE_PROGRAM "xgettext --help" xgettext \
|
||||
cfg_force_with_nls=no
|
||||
fi
|
||||
|
||||
if [ "$CLI_ONLY" != 1 ]; then
|
||||
if test "$cfg_with_cli_only" != "yes"; then
|
||||
if ! EXECUTE_PROGRAM "gdk-pixbuf-csource --help" gdk_pixbuf_csource ; then
|
||||
echo "* gdk-pixbuf not installed"
|
||||
echo "* or path to gdk-pixbuf-csource is missing."
|
||||
@@ -135,6 +141,24 @@ WITH_OPTION embedded-src-path yes "[yes | no]"
|
||||
PRINT_MESSAGE "\nDebugging options (do not use in production system):"
|
||||
|
||||
WITH_OPTION memdebug no "[no | yes]"
|
||||
WITH_OPTION debug-printf-format no "[no | yes]"
|
||||
WITH_OPTION werror no "[no | yes]"
|
||||
|
||||
if test "$cfg_with_debug_printf_format" == "yes"; then
|
||||
# don't use the binary compiled with this,
|
||||
# it's only useful to properly get all the build-time
|
||||
# warnings around printf-errors, that are otherwise
|
||||
# not catched by the compiler because of the _() macro
|
||||
DEFINE_STRING DEBUG_PRINTF_FORMAT 1
|
||||
else
|
||||
# warnings given by -Wformat-security are bogus because of _(),
|
||||
# see above comment if you actually want to check for format errors
|
||||
CFG_CFLAGS="$CFG_CFLAGS -Wno-format-security"
|
||||
fi
|
||||
|
||||
if test "$cfg_with_werror" == "yes"; then
|
||||
CFG_CFLAGS="$CFG_CFLAGS -Werror"
|
||||
fi
|
||||
|
||||
if test "$cfg_with_efence" == "yes"; then
|
||||
if ! CHECK_LIBRARY efence malloc efence; then
|
||||
@@ -160,7 +184,7 @@ cfiles="src/method-link.c"
|
||||
ofiles="$BUILDTMP/method-link.o"
|
||||
|
||||
for cfile in src/*.c; do
|
||||
if [ "$CLI_ONLY" = 1 ]; then
|
||||
if test "$cfg_with_cli_only" == "yes"; then
|
||||
grep -q 'DVDISASTER_GUI_FILE' "$cfile" && continue
|
||||
fi
|
||||
cfile_prefix=`echo $cfile | sed -e 's/\.c//'`
|
||||
@@ -172,7 +196,7 @@ done
|
||||
echo
|
||||
echo -e "\nCFG_CFILES = $cfiles" >> Makefile.config
|
||||
echo "CFG_OFILES = $ofiles" >> Makefile.config
|
||||
if [ "$CLI_ONLY" != 1 ]; then
|
||||
if test "$cfg_with_cli_only" != "yes"; then
|
||||
echo "ICONS = src/inlined-icons.h" >> Makefile.config
|
||||
fi
|
||||
|
||||
|
||||
5
contrib/AppRun.sh
Executable file
5
contrib/AppRun.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
DIR="$(readlink -f "$(dirname "$0")")"
|
||||
export GTK_PATH="$DIR/usr/lib/gtk-2.0"
|
||||
export DVDISASTER_DOCDIR="$DIR/usr/share/doc/dvdisaster"
|
||||
exec "$DIR/usr/bin/dvdisaster" "$@"
|
||||
1
documentation/codecs.pdf
Symbolic link
1
documentation/codecs.pdf
Symbolic link
@@ -0,0 +1 @@
|
||||
codec-specs/codecs.pdf
|
||||
@@ -1,76 +0,0 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
body { font-family:Helvetica,Arial,sans-serif,Verdana }
|
||||
|
||||
a:link { font-weight:normal; color:#0000ff; text-decoration:none }
|
||||
a:visited { font-weight:normal; color:#0000ff; text-decoration:none }
|
||||
a:hover { font-weight:normal; background-color:#e0e0e0; color:#0000FF; text-decoration:none }
|
||||
a:active { font-weight:normal; background-color:#e0e0e0; color:#0000FF; text-decoration:none }
|
||||
a:focus { font-weight:normal; background-color:#e0e0e0; color:#0000FF; text-decoration:none }
|
||||
|
||||
table.navigation {width:100%; background-color:#f0f0f0}
|
||||
table.download {width:100%; background-color:#f0f0f0}
|
||||
table.thumbnail {border-width:1px; border-style:solid; border-color:#000000; background-color:#e0e0ff}
|
||||
table.screenshot {width:100%; border-width:0px; background-color:#e0e0ff}
|
||||
|
||||
table.ecompat {border-width:0px}
|
||||
table.ecompat td { border-width:0px; vertical-align:text-top}
|
||||
table.ecompat td.file { border-width:0px; background-color:#ffa0ff}
|
||||
table.ecompat td.iso { border-width:0px; background-color:#a0ffff}
|
||||
table.ecompat td.augment { border-width:0px; background-color:#a0a0ff}
|
||||
|
||||
|
||||
table.compat {width:100%; border-style:solid; border-width:0px; border-collapse:collapse}
|
||||
table.compat th { border-width:1px; padding:8px; border-style:solid; background-color:#b0b0b0 }
|
||||
table.compat th.file { border-width:1px; padding:8px; border-style:solid; background-color:#ffa0ff }
|
||||
table.compat th.iso { border-width:1px; padding:8px; border-style:solid; background-color:#a0ffff }
|
||||
table.compat th.augment { border-width:1px; padding:8px; border-style:solid; background-color:#a0a0ff }
|
||||
|
||||
table.compat td { border-width:1px; padding:4px; border-style:solid; text-align:center}
|
||||
|
||||
table.compat td.noalign { border-width:1px; padding:4px; border-style:solid }
|
||||
table.compat td.fullspan { border-width:1px; padding:0px; border-style:solid; background-color:#e0e0e0 }
|
||||
table.compat td.red { border-width:1px; padding:4px; border-style:solid; background-color:#ff8080; text-align:center}
|
||||
table.compat td.yellow { border-width:1px; padding:4px; border-style:solid; background-color:#ffe0a0; text-align:center}
|
||||
table.compat td.green { border-width:1px; padding:4px; border-style:solid; background-color:#a0ffa0; text-align:center}
|
||||
table.compat td.grey { border-width:1px; padding:4px; border-style:solid; background-color:#e0e0e0; text-align:center}
|
||||
table.compat td.white { border-width:1px; padding:4px; border-style:solid; text-align:center}
|
||||
|
||||
a.active {color:#0000ff; text-decoration:none }
|
||||
a.passive {color:#808080; text-decoration:none }
|
||||
|
||||
img.noborder {border:0px solid transparent;}
|
||||
img.nobordervalignm {border:0px solid transparent; vertical-align:middle;}
|
||||
|
||||
span.fl {font-size:large;}
|
||||
span.fxxl {font-size:xx-large;}
|
||||
span.fs {font-size:small;}
|
||||
span.fxs {font-size:x-small;}
|
||||
span.green {color:green;}
|
||||
span.red {color:red;}
|
||||
span.blue {color:blue;}
|
||||
span.yellow {color:gold;}
|
||||
|
||||
h3.top {margin-top: 0;}
|
||||
|
||||
table {empty-cells:show;} /* display border and background color even for empty table cells */
|
||||
td.hsep {height:1px; width:100%; background-color:black;} /* black horizontal separator */
|
||||
td.vsep {height:100%; width:2px; background-color:black;} /* black vertical separator */
|
||||
td.esep {height:3px;}
|
||||
|
||||
.w10p {width:10%;}
|
||||
.w15p {width:15%;}
|
||||
.w20p {width:20%;}
|
||||
.w50p {width:50%;}
|
||||
.w55p {width:55%;}
|
||||
.w65x {width:65px;}
|
||||
.w100x {width:100px;}
|
||||
.w127x {width:127px;}
|
||||
.w150x {width:150px;}
|
||||
.w200x {width:200px;}
|
||||
|
||||
.valignb {vertical-align:bottom;}
|
||||
.valignm {vertical-align:middle;}
|
||||
.valignt {vertical-align:top;}
|
||||
.valigntt {vertical-align:text-top;}
|
||||
.talignr {text-align:right;}
|
||||
@@ -1,105 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/dvdisaster.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Title header -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<span class="fxxl"><b>dvdisaster</b> </span>
|
||||
<i>Version 0.79.5 (stable) / 0.79.6 (unstable)</i>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="fxxl"> </span>
|
||||
Deutsch <a href="../en/privacy.html">English</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<table class="navigation" width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>Unterseiten:
|
||||
<a href="index.html">Entwickler-Seite</a> ·
|
||||
<a href="verschiedenes.html">Verschiedenes</a>
|
||||
</td>
|
||||
<td align="right">
|
||||
<b>Datenschutz-Erklärung</b> ·
|
||||
<a href="impressum.html">Impressum</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td style="height: 10px"></td></tr>
|
||||
</table>
|
||||
|
||||
<!-- Main body -->
|
||||
|
||||
<b>Datenschutzerklärung für die Internetseiten unter</b><p>
|
||||
|
||||
dvdisaster.com,
|
||||
dvdisaster.de,
|
||||
dvdisaster.net,
|
||||
dvdisaster.org
|
||||
|
||||
<p>
|
||||
|
||||
Das dvdisaster-Projekt (<a href="impressum.html">Anbieter siehe Impressum</a>)
|
||||
ermöglicht Ihnen die Nutzung dieser Internetseiten ohne Registrierung und
|
||||
ohne eine Angabe von personenbezogenen Daten.
|
||||
|
||||
<p>
|
||||
|
||||
<b>Server-Protokoll-Dateien</b><p>
|
||||
|
||||
Die Server dieser Internetseiten führen kein Protokoll über Ihre Seitenzugriffe.
|
||||
|
||||
<p>
|
||||
|
||||
<b>Cookies</b><p>
|
||||
|
||||
Diese Internetseiten verwenden keine Cookies.
|
||||
|
||||
<p>
|
||||
|
||||
<b>Verweise zu anderen Internetseiten</b><p>
|
||||
|
||||
Diese Internetseiten enthalten Verweise (Links) zu externen Seiten,
|
||||
die von anderen Anbietern betrieben werden.
|
||||
Das dvdisaster-Projekt hat keinen Einfluß darauf,
|
||||
ob andere Anbieter diese Datenschutzbestimmungen einhalten.
|
||||
|
||||
<p>
|
||||
|
||||
<b>Weiterentwicklung dieser Internetseiten</b><p>
|
||||
|
||||
Im Zuge der Weiterentwicklung dieser Internetseiten können Änderungen
|
||||
dieser Datenschutzerklärung erforderlich werden. Bitte lesen Sie sich
|
||||
diese Datenschutzerklärung von Zeit zu Zeit erneut durch.
|
||||
|
||||
<!-- Page footer -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" style="width:100%; height:10px;"></td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="fs">
|
||||
<i> Copyright 2004-2017 Carsten Gnörlich.<br>
|
||||
Die unveränderte Vervielfältigung und Verteilung dieses gesamten Artikels in beliebiger Form ist gestattet,
|
||||
sofern dieser Hinweis erhalten bleibt.
|
||||
</i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,88 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/dvdisaster.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Title header -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<span class="fxxl"><b>dvdisaster</b> </span>
|
||||
<i>Version 0.79.5 (stable) / 0.79.6 (unstable)</i>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="fxxl"> </span>
|
||||
Deutsch <a href="../en/imprint.html">English</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<table class="navigation" width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>Unterseiten:
|
||||
<a href="index.html">Entwickler-Seite</a> ·
|
||||
<a href="verschiedenes.html">Verschiedenes</a>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="datenschutz.html">Datenschutz-Erklärung</a> ·
|
||||
<b>Impressum</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td style="height: 10px"></td></tr>
|
||||
</table>
|
||||
|
||||
<!-- Main body -->
|
||||
|
||||
<b>Impressum</b><p>
|
||||
|
||||
Carsten Gnörlich <br>
|
||||
Karl-von-Hahn-Str. 125 <br>
|
||||
72250 Freudenstadt / Deutschland<br>
|
||||
Tel.: +49 172 566 1442 (kein Support, nur für Anfragen im Rahmen des Telemediengesetzes!)
|
||||
|
||||
<p>
|
||||
|
||||
E-Mail: carsten@dvdisaster.org<br>
|
||||
Internet: www.dvdisaster.org
|
||||
|
||||
<p>
|
||||
|
||||
Inhaltlich Verantwortlicher: <br>
|
||||
Carsten Gnörlich (Anschrift wie oben).
|
||||
|
||||
<p>
|
||||
|
||||
Das Impressum gilt für die Internetpräsenz unter den Domänen<br>
|
||||
<a href="http://dvdisaster.com">dvdisaster.com</a>,
|
||||
<a href="http://dvdisaster.de">dvdisaster.de</a>,
|
||||
<a href="https://web.archive.org/web/20180428070843/http://dvdisaster.net">dvdisaster.net</a>,
|
||||
<a href="http://dvdisaster.org">dvdisaster.org</a>.
|
||||
|
||||
<!-- Page footer -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" style="width:100%; height:10px;"></td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="fs">
|
||||
<i> Copyright 2004-2017 Carsten Gnörlich.<br>
|
||||
Die unveränderte Vervielfältigung und Verteilung dieses gesamten Artikels in beliebiger Form ist gestattet,
|
||||
sofern dieser Hinweis erhalten bleibt.
|
||||
</i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,147 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/dvdisaster.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Title header -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<span class="fxxl"><b>dvdisaster</b> </span>
|
||||
<i>Version 0.79.5 (stable) / 0.79.6 (unstable)</i>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="fxxl"> </span>
|
||||
Deutsch <a href="../en/index.html">English</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<table class="navigation" width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>Unterseiten:
|
||||
<b>Entwickler-Seite</b> ·
|
||||
<a href="verschiedenes.html">Verschiedenes</a>
|
||||
</td>
|
||||
<td align="right"><a href="datenschutz.html">Datenschutz-Erklärung</a> · <a href="impressum.html">Impressum</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td style="height: 10px"></td></tr>
|
||||
</table>
|
||||
|
||||
<!-- Main body -->
|
||||
|
||||
|
||||
<b>Entwickler-Seite</a></b><p>
|
||||
|
||||
Auf dieser Seite finden Sie den neuesten Quellkode
|
||||
von <i>dvdisaster</i> für die Betriebssysteme
|
||||
FreeBSD, GNU/Linux und NetBSD. Der Inhalt dieser
|
||||
Seite richtet sich vorwiegend an die Betreuer
|
||||
von Binärpaketen für die genannten Plattformen.
|
||||
Typischerweise ist es bequemer, wenn Sie sich
|
||||
dvdisaster aus dem Paketsystem Ihres Betriebssystems
|
||||
bzw. Ihrer Distribution installieren.
|
||||
Natürlich können Sie sich
|
||||
den Quellkode von dvdisaster aber auch selbst
|
||||
herunterladen und übersetzen, wenn Sie dies
|
||||
lieber möchten.<br>
|
||||
|
||||
Diese Seite enthält <i>keine</i> Informationen
|
||||
über den Sinn und die Benutzung von dvdisaster.
|
||||
Dies ist an anderen Stellen besser beschrieben -
|
||||
zum Beispiel in zahlreichen Foren und (in englischer Sprache) im
|
||||
<a href="verschiedenes.html#manual">Benutzerhandbuch</a>.
|
||||
|
||||
<p>
|
||||
|
||||
<a name="download"></a>
|
||||
<b>Quellkode herunterladen</b>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>dvdisaster unterstützt die Betriebssysteme <b>FreeBSD</b>, <b>GNU/Linux</b> und <b>NetBSD</b>.
|
||||
Es wird Ihnen
|
||||
als <a href="http://www.germany.fsfeurope.org/documents/freesoftware.de.html">freie Software</a>
|
||||
unter der <a href="http://www.gnu.org/licenses/gpl-3.0.txt">GNU General Public License v3</a> zur
|
||||
Verfügung gestellt.
|
||||
</td>
|
||||
<td class="w127x" valign="top"><img src="../images/gplv3-127x51.png" alt="GPLv3-Logo" width="127">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Aktuelle Version: </td>
|
||||
<td><a href="../downloads/dvdisaster-0.79.5.tar.bz2">dvdisaster-0.79.5.tar.bz2</a></td>
|
||||
<td>(<a href="../downloads/dvdisaster-0.79.5.tar.bz2.gpg">digitale Unterschrift</a>,
|
||||
MD5-Prüfsumme: ceef990a2239c43314bc6427c6afb181)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
|
||||
Die Archive können mit einer <a href="verschiedenes.html#pubkey">digitalen Unterschrift</a> auf
|
||||
ihren Ursprungszustand überprüft werden. In den Archiven gibt die Datei
|
||||
<tt>INSTALL</tt> weitere Informationen zum Übersetzen des Programmes.
|
||||
|
||||
<p>
|
||||
|
||||
Die Unterstützung von OS X und Windows wurde eingestellt.
|
||||
Die <a href="verschiedenes.html#windows">letzte veröffentlichte Version 0.72.3 für Windows</a> ist noch verfügbar.
|
||||
|
||||
<p>
|
||||
<b>Die Entwickler-Versionen sind zurück!</b><p>
|
||||
|
||||
Der ursprüngliche Plan, alle paar Monate eine stabile Version zu veröffentlichen, kann derzeit aus Zeitmangel nicht umgesetzt werden. In der Zwischenzeit werden (unstabile) Entwicklerversionen veröffentlicht, wenn sich die Notwendigkeit für eine kurzfristige Aktualisierung ergibt. Bitte beachten Sie, daß diese Versionen nicht dokumentiert sind. Sie können unvollständige oder fehlerhafte Eigenschaften aufweisen. Sie sollten diese Versionen nur nutzen, wenn Sie eine Funktionalität aus der unten aufgeführten Liste benötigen.<p>
|
||||
|
||||
<a href="../downloads/dvdisaster-0.79.6.tar.bz2">dvdisaster-0.79.6.tar.bz2</a></td>
|
||||
<td>(<a href="../downloads/dvdisaster-0.79.6.tar.bz2.gpg">digitale Unterschrift</a>,
|
||||
MD5-Prüfsumme: ceef990a2239c43314bc6427c6afb181)
|
||||
|
||||
<ul>
|
||||
<li> Das "Datenträger-Info"-Werkzeug zeigt nun die korrekte Leerkapazität an (vorher wurde immer Null ausgegeben).</li>
|
||||
<li> Unterstützung für BDXL-TL-Datenträger (dreilagig, 100GB).</li>
|
||||
<li> Sektoren-Prüfsummen und Abbild-Prüfsummen werden während des Lesens von
|
||||
Datenträgern zwischengespeichert und beim Erstellen von Fehlerkorrektur-Daten
|
||||
wiederverwendet. Das Erstellen von Fehlerkorrektur-Daten wird dadurch beschleunigt
|
||||
und RS03-Fehlerkorrektur-Daten enthalten die optionale Abbild-Prüfsumme,
|
||||
wenn der Datenträger vorher einmal komplett eingelesen wurde.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
|
||||
<p>
|
||||
<b>Was ist mit den alten dvdisaster-Seiten passiert?</b><p>
|
||||
|
||||
Bitte schauen Sie in das <i>Vorwort zur Version 0.79.5</i> im
|
||||
englischen <a href="verschiedenes.html#manual">Benutzerhandbuch</a>.
|
||||
|
||||
<!-- Page footer -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" style="width:100%; height:10px;"></td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="fs">
|
||||
<i> Copyright 2004-2017 Carsten Gnörlich.<br>
|
||||
Die unveränderte Vervielfältigung und Verteilung dieses gesamten Artikels in beliebiger Form ist gestattet,
|
||||
sofern dieser Hinweis erhalten bleibt.
|
||||
</i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,140 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/dvdisaster.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Title header -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<span class="fxxl"><b>dvdisaster</b> </span>
|
||||
<i>Version 0.79.5 (stable) / 0.79.6 (unstable)</i>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="fxxl"> </span>
|
||||
Deutsch <a href="../en/misc.html">English</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<table class="navigation" width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>Unterseiten:
|
||||
<a href="index.html">Entwickler-Seite</a> ·
|
||||
<b>Verschiedenes</b>
|
||||
</td>
|
||||
<td align="right"><a href="datenschutz.html">Datenschutz-Erklärung</a> · <a href="impressum.html">Impressum</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td style="height: 10px"></td></tr>
|
||||
</table>
|
||||
|
||||
<!-- Main body -->
|
||||
|
||||
<a name="pubkey"></a>
|
||||
<b>Öffentlicher Schlüssel für die digitale Unterschrift</b><p>
|
||||
|
||||
Die herunterladbaren Pakete enthalten
|
||||
eine mit <a href="http://www.gnupg.org">GnuPG</a> erstellte
|
||||
digitale Unterschrift, damit Sie nachprüfen können,
|
||||
ob sich die Software in ihrem ursprünglichen Zustand befindet.<p>
|
||||
|
||||
Ab Version 0.79.5 werden Pakete mit diesem
|
||||
<a href="../downloads/pubkey2.asc">4096bit RSA-Schlüssel</a> unterschrieben:
|
||||
|
||||
<pre>
|
||||
pub 4096R/64F770B2 2015-10-05
|
||||
Schl.-Fingerabdruck = E3AF E703 96CC C0D9 E5D8 381C B0DB CA7D 64F7 70B2
|
||||
uid dvdisaster (pkg signing key #2)
|
||||
sub 4096R/758BCC23 2015-10-05
|
||||
</pre>
|
||||
|
||||
|
||||
Ältere Versionen (bis zu 0.79.3) wurden mit einem
|
||||
<a href="../downloads/pubkey1.asc">1024bit DSA-Schlüssel</a> unterschrieben,
|
||||
der noch zum Vergleich hier verfügbar ist.
|
||||
|
||||
Sie können den Fingerabdruck der öffentlichen Schlüssel auch direkt von
|
||||
den Entwicklern erhalten, indem Sie eine E-Mail
|
||||
an carsten@dvdisaster.org schreiben. Bitte verwenden Sie
|
||||
den Betreff "GPG finger print".
|
||||
<p>
|
||||
|
||||
<b>Benutzerhandbuch</b><p>
|
||||
<a name="manual"></a>
|
||||
|
||||
Das Benutzerhandbuch zu dvdisaster gibt es - leider aus Zeitgründen nur
|
||||
in englischer Sprache - als <a href="../downloads/manual.pdf">PDF-Dokument (manual.pdf)</a>.
|
||||
Es erläutert die Benutzung von dvdisaster anhand einiger
|
||||
grundlegender Beispiele und enthält weitere Hintergrundinformationen
|
||||
zu seiner Funktionsweise.
|
||||
Sie brauchen das Handbuch hier nicht herunterzuladen, wenn Sie bereits
|
||||
das Quellkode-Archiv haben - dort ist ebenfalls ein Exemplar enthalten.
|
||||
<p>
|
||||
|
||||
<b>Kodierer-Spezifikation</b><p>
|
||||
|
||||
Die Spezifikation der RS01-, RS02- und RS03-Kodierer
|
||||
ist als <a href="../downloads/codecs.pdf">PDF-Dokument (codecs.pdf)</a>
|
||||
verfügbar.
|
||||
|
||||
Dieses Dokument ist zur Diskussion der Kodierer-Implementierung unter
|
||||
den Entwicklern vorgesehen. Er erfordert Kenntnisse in Kodierungstheorie
|
||||
und ist nicht als Endbenutzer-Dokumentation gedacht.
|
||||
|
||||
<table>
|
||||
<tr><td>
|
||||
<a href="http://pdfreaders.org/"><img src="http://pdfreaders.org/graphics/pdfreaders-lang-neutral.png" alt="pdfreaders.org" /></a></td>
|
||||
<td>Programme zum Lesen von PDF-Dokumenten sind bei <a href="http://pdfreaders.org">PDFreaders.org</a> verfügbar.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<b>Letzte Windows-Version</b><p>
|
||||
|
||||
Ein anderer Entwickler hat angefangen, eine Version von dvdisaster direkt für Windows zu
|
||||
erstellen, aber es gibt dazu noch nichts anzukündigen. Verwenden Sie
|
||||
bis dahin bitte weiterhin die letzte veröffentlichte Version für Windows:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Quellkode: </td>
|
||||
<td><a href="../downloads/dvdisaster-0.72.3.tar.bz2">dvdisaster-0.72.3.tar.bz2</a></td>
|
||||
<td>(<a href="../downloads/dvdisaster-0.72.3.tar.bz2.gpg">Digitale Unterschrift</a>,
|
||||
MD5-Prüfsumme: 4eb09c1aa3cdbc1dafdb075148fb471d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Installierbare Binärversion: </td>
|
||||
<td><a href="../downloads/dvdisaster-0.72.3-setup.exe">dvdisaster-0.72.3-setup.exe</a></td>
|
||||
<td>(<a href="../downloads/dvdisaster-0.72.3-setup.exe.gpg">Digitale Unterschrift</a>,
|
||||
MD5-Prüfsumme: b6861ba1e8de6d91a2da5342a14870e0)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Page footer -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" style="width:100%; height:10px;"></td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="fs">
|
||||
<i> Copyright 2004-2017 Carsten Gnörlich.<br>
|
||||
Die unveränderte Vervielfältigung und Verteilung dieses gesamten Artikels in beliebiger Form ist gestattet,
|
||||
sofern dieser Hinweis erhalten bleibt.
|
||||
</i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,24 +0,0 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.2.4 (GNU/Linux)
|
||||
|
||||
mQGiBD9GYJcRBACXa6CzZ0WPqUvit1d7LvnSOqLDxYQiiphnzjQc+ssJvScNxv9+
|
||||
ThELKXHxaKfDpL9/C4+5qh1pfrsEEpuQ7m+RfXFqz5UPZITgza5Ko/5WPhhVRxkh
|
||||
8b8ux7DIeFlbgmd5YSFPoYIwGWCAtI5OiUC6qa149gAq7k0vtgb+hbxn2wCg0lTu
|
||||
XGNjX7qMNggbnx3aBVVd9SMD/RYWIr2c66w6Kt/EYLLgYGqgZL9MkmocuUoJVgiI
|
||||
Y2pi3SPbIvX3enk1OIRBCFbweEgXiVw+FWu6aK09eZrJcDv2Uns4ecTvzz1d83RH
|
||||
gssV7ulB6P5mU3u6NT39CHW6fJ5Xi1HPkw380+y3dbaRxh/1htmk5Ao0DmDGRohL
|
||||
vzgIA/9P/bdqh0WG0j4qY+8pcsNn0/ymiJXPZzvyr2cEc56AaHgLAVZHMUyE3Rd9
|
||||
9rSZjVS+x/oGbkzVOd8IySUSRx7f2Sxve1sxoaNlwdqcE0vq16PH1iMBQ6KJAvUA
|
||||
NAM4QZhAI7Lav9yB/tXblGrHHjll+fwFB/9t6G0hO9JoJDaEgbQmQ2Fyc3RlbiBH
|
||||
bsO2cmxpY2ggKHBrZyBzaWduaW5nIGtleSAjMSmIXgQTEQIAHgUCQCvkqQIbAwYL
|
||||
CQgHAwIDFQIDAxYCAQIeAQIXgAAKCRBaWQ7+9fbEbGfsAJ9NrkdlRobMhtWpAyeW
|
||||
wPUe8XHzsACfYbMooS0D/UmRGo7wW7rBnrVqLxy5AQ0EP0ZgmBAEAKJos9WBWgw1
|
||||
sGFFM/1eKEzZqGYMt8qk2r/djPyZYEIzqT47aR7P9gPIXDTplOmBgL43hU8MlE9K
|
||||
Q92s4RVP/x/OvMWF04vSO3vBEmeR3HncpbIk4AP17MZGuqEGtyAe1e5hcGiho1CL
|
||||
/6fSanYydC2iciKbfyyfzL9oISHedad7AAMFA/4wtrdqwTI2p05NAGxRA2r4egYI
|
||||
m7x+ixyYuHGkzZzHMdos5zDg/dzNRnarib98JgAkZR+EVT6K0Ez6ykz57oteCt6f
|
||||
jyGjOwI9bUyOFa+LyGJ+QRaeVozhqLLu/b4wgKCuBcKNt2ebpKFHi9JKiGE9hOJz
|
||||
4nanjCbtihUJaf1DLIhJBBgRAgAJBQI/RmCYAhsMAAoJEFpZDv719sRsbk4An2JZ
|
||||
q/8GBvugzgfu5AxacsuiZzfgAKCwzLAuoUTw/Sz6bYaAUfec362gFw==
|
||||
=Sidz
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
@@ -1,53 +0,0 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.12 (GNU/Linux)
|
||||
|
||||
mQINBFYS0XkBEACxsIQ1dI0k1TiybBztU6BC3DeQsDGC9TeaGBgYDo+62B8U5uiJ
|
||||
AD9ofBXglj0/DOweAIoLdcVsvFzU0sxk4tUnb84plk09qG+UfU2227DWeKTP3YPv
|
||||
E8A6uWopr6Yoc8WGG9mKl9L1CCiqQmNB4L4Um2/yDPrhtN3TxzpMLBoNUo/f271Q
|
||||
yLxQZMEsUDTZq7JxbEQ9hLbBn69zIptsZHyNJwCerqXqhzQcB11BVqZyLrRC+0ZT
|
||||
eUtO1o10Y/EAEi86ivi1upLsgVi5u2LcP9ICIhTVv6MQ+turhThFOIcEvbw/15Hp
|
||||
4Vlb0yZlBx2j4Hr4tDSrWeQ1lmBNA1qhrLkPOIQv+scXhcyzY5nKIjRDKYS1v8OM
|
||||
uMhfVakK/YS+flN5nyS4Ku0x99sae75+PArMjbLNfP738Zw4ywC4i+i958SEIcky
|
||||
4Bia+kyTCPRZWZ5BJe3+GAPDdI1XntS0D1uXPiwi8u91jg1cAEChwjwe2pr0RG+h
|
||||
8ft5BTezJyAeZ9haU8OyrW5GZNddhyBH4QxdRYvMTdmQIbjxNuTYGpBXl4qgTqKn
|
||||
A7Gxbr24hgdUHKIe//AlDQ41VbBTdyBmgyORGCL+uaSpDerADPXh+bwE2vQsKs13
|
||||
+HcVldLBJmL9tYeRZvpvR/vwFBvfkrgAN8+NdPnSzwvLI0JMrL50DOhapwARAQAB
|
||||
tB9kdmRpc2FzdGVyIChwa2cgc2lnbmluZyBrZXkgIzIpiQI4BBMBAgAiBQJWEtF5
|
||||
AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCw28p9ZPdwsivVD/4wiomj
|
||||
IFNUG0lb4sIvXHZR2sv0rVz1eN74B+Ngefp3viZvjvmXji2cbzPhTsoAq4ys5/nD
|
||||
m9fLnm+mG2TfLKTqXBNRDeEDmknK0aXlFVbdUfgeExvU9Tj1giOORTvTiNPdJpkF
|
||||
qKMrjvtB4t2sHuuL/SNwQAWlWfDUuK52yf1SAZasdFPTAvAuzo+lqfYbi5tnjIY/
|
||||
GkR9e3ZjMEaWvxc0N5CJg7ibKpuX476eo+04oKkNvSbyE7Lpcho4AHy6e4UoJ9e+
|
||||
UBL3o84MtChwrlP5HmMPan1hIL5iyswDUrxUfL36GqAEcAM8tIbZ6A6CfQT+FgnI
|
||||
e/E1dm3FWEje8F7uD2xkCGRBYTN8BG5+UMTF9MaQGU3kxBMPt8xvHmCNZHR6QrdL
|
||||
+vysa+02QmSM1jZz4J37yctM69WY1x3JDC+HGHMxCX3G+BrDntLG3yQkox1nBi2l
|
||||
8JiKTdoX7LhRn1xCijIpYdbszMao0lN/XEiOgx2eygG9a3fQDOqR/yi9tTqmKQM4
|
||||
H/il88tkdsaioWXspWEhrS+8MhiUdr8yz3LA9+DawddnW8ZbTee2R4ARMlKhfXBE
|
||||
kvXO2L37Ub2sX97S9qbKkwaYIs2PHn7NFNRB6OP8Oz0scMuritvUZrNfNjaGba3e
|
||||
YNgR36NFvroM3R2a+Yr0zjbY+rqjJSdNSfcsxIhGBBARAgAGBQJWEtXYAAoJEFpZ
|
||||
Dv719sRsj6kAoL8AIsw7wF1F/LBHOZc/56GmYlAfAJ4nYQAjhx0Hh3fLpsjxtoH7
|
||||
oIuwCLkCDQRWEtF5ARAA3KvEpeB7vbCxolIlzxuF/RHJ770GUYSfTVbYIKSl4Hby
|
||||
wrDak7uXlDWIJ/u1lunu5+albUEHIaduYolrzaTG6A/sslXHgk8RUxZonzAw2/8C
|
||||
0fQCBAPjs2nlwzt61g75/EPJlESocapdRi97EleGmGGK5L6N2CyTX8pjj1DkXwiW
|
||||
X95EOcgWRoLXpf/bpThqFCsRjoJfHO7zcA0b5iIR7LQenMG/3AeGFRr1Oh2UzAL6
|
||||
0MuPypu8NBv3IUXZ6mXdFTNM4bQc/RlmVDoB8B8mz4M1IL0fP98LN+b9ZfUUDz1z
|
||||
k9W8H+OCvfdOVj1srDq+uhaSwDC6jDu7wTaFlaJaPBoqCXCk7xGbVxKdZot6oN5Z
|
||||
rAvMMnD0Jc+QX+MKSodMk5LQRFB+WGI82IwgeS7kqQX2Bt0w7d4xL/3AKTNgQQAG
|
||||
zXRi7dzXR//diKEmESSmaRccVpLZYtR4PdUuY6ZXyayEvZCosV6B7P+lV842lN9Q
|
||||
/KgrZjH09SYKK8pzqRPoAIvPJNT4fP8FeTztnKu9gfS0Zs2MnkKjEK85E8OMSidp
|
||||
ISqn0xgHeuldMPL7gGxJKj95BF4jFUs4fQa8nD1jnnUbKdAsGd5ujpEAjAfV+kkG
|
||||
ZPUyVrJokhGlCLLt2dG4PrgZ4tNXdEQwVGNskHYjs6YU+CGYjzfopvrUPast+cUA
|
||||
EQEAAYkCHwQYAQIACQUCVhLReQIbDAAKCRCw28p9ZPdwsrmqD/sFsulD6nl5DRzn
|
||||
ofkqBJwwl6zdtNN9OKsEi8UKc10iuq+ZvynWFbcARqW9sgbBCoCM5KuA5zMIQ0hv
|
||||
rvlb+HOt8v7DA2D0d/IPU1BPnxoEuMDq5g+a3MYzmP+4Wmp8r6NNAW0ArWhazQsN
|
||||
dIhAVv4ItUCos7+S7q8srsflpEVG78/fC4Fw4sRjAaCd1NsP6D3vHwENtbuoQaT6
|
||||
3kyfPK+r6EADTxmeFe7anovQo6MirRCnLoo3NdPVfQlgXkdL3wiBpwm7W/PYY+9Z
|
||||
6HIfE2AIBs+C5SdxYPR+tVz3+3QC9998egxTRnJMaKkDQ+nG/ROSVpCqXwhzob6H
|
||||
lrKhoe7H7GKVZyl/IVllpUQHKi5C03S8JQxpaJoB85/C5ZlcMtb0e1YUYeVhTKWI
|
||||
REFsx5FlxXcJh5CLVplZKxfn0oiIgnyKHtCOeNcXP2mOYClN8RmhW+/Z198bTmzM
|
||||
rB2jq7a3xbLGWKJqfgfZ6EPwCEu/jZTBSQgyssrrGahyyOIDadEcyfYV+r5pUm1+
|
||||
+1YxSe0/hZ89RjGAIneWmo6sDLwPd44GLKAAb/E/yS/320bu031426gU8Zdw7bK1
|
||||
dVNVQxWOpRc/RTRjmVjrO9NIN+7DSNOFnvep13/48UEDSFXkNnh+VgxGpvpOouw2
|
||||
xUBVNZuhjPr589pvAEQFUyxCTI0uwQ==
|
||||
=sd4U
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
@@ -1,87 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/dvdisaster.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Title header -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<span class="fxxl"><b>dvdisaster</b> </span>
|
||||
<i>Version 0.79.5 (stable) / 0.79.6 (unstable)</i>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="fxxl"> </span>
|
||||
<a href="../de/impressum.html">Deutsch</a> English
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<table class="navigation" width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>Navigation:
|
||||
<a href="index.html">Developer site</a> ·
|
||||
<a href="misc.html">Miscellaneous</a>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="privacy.html">Privacy policy</a> ·
|
||||
<b>Contact information</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td style="height: 10px"></td></tr>
|
||||
</table>
|
||||
|
||||
<!-- Main body -->
|
||||
|
||||
<b>Contact information</b><p>
|
||||
|
||||
Carsten Gnörlich <br>
|
||||
Karl-von-Hahn-Str. 125 <br>
|
||||
72250 Freudenstadt / Germany<br>
|
||||
Tel.: +49 172 566 1442
|
||||
|
||||
<p>
|
||||
|
||||
E-Mail: carsten@dvdisaster.org<br>
|
||||
Internet: www.dvdisaster.org
|
||||
|
||||
<p>
|
||||
|
||||
Responsible for the website content: <br>
|
||||
Carsten Gnörlich (see above for address).
|
||||
|
||||
<p>
|
||||
|
||||
This notice covers the web sites under the domains<br>
|
||||
<a href="http://dvdisaster.com">dvdisaster.com</a>,
|
||||
<a href="http://dvdisaster.de">dvdisaster.de</a>,
|
||||
<a href="https://web.archive.org/web/20180428070843/http://dvdisaster.net">dvdisaster.net</a>,
|
||||
<a href="http://dvdisaster.org">dvdisaster.org</a>.<br>
|
||||
|
||||
<!-- Page footer -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" style="width:100%; height:10px;"></td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="fs">
|
||||
<i> Copyright 2004-2017 Carsten Gnörlich.<br>
|
||||
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
|
||||
</i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,139 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/dvdisaster.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Title header -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<span class="fxxl"><b>dvdisaster</b> </span>
|
||||
<i>Version 0.79.5 (stable) / 0.79.6 (unstable)</i>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="fxxl"> </span>
|
||||
<a href="../de/index.html">Deutsch</a> English
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<table class="navigation" width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>Navigation:
|
||||
<b>Developer site</b> ·
|
||||
<a href="misc.html">Miscellaneous</a>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="privacy.html">Privacy policy</a> ·
|
||||
<a href="imprint.html">Contact information</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td style="height: 10px"></td></tr>
|
||||
</table>
|
||||
|
||||
<!-- Main body -->
|
||||
|
||||
<b>Developer site</b><p>
|
||||
|
||||
This site provides the latest source code release of dvdisaster for the
|
||||
FreeBSD, GNU/Linux and NetBSD operating systems. It is mostly aimed at
|
||||
maintainers of binary packages for the beforementioned platforms.
|
||||
End users might find it more convenient to install dvdisaster from the
|
||||
package system of their operating system bundle or distribution.
|
||||
But if you prefer to download and compile the source package on your own,
|
||||
you're welcome, too.<br>
|
||||
|
||||
This site does <i>not</i> provide information on the purpose and usage
|
||||
of dvdisaster. This is better described at other places, e.g.
|
||||
in the <a href="misc.html#manual">user manual</a> and numerous online
|
||||
forums.
|
||||
<p>
|
||||
|
||||
<a name="download"></a>
|
||||
<b>Download the source code</b>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>dvdisaster is available for the <b>FreeBSD</b>, <b>GNU/Linux</b> und <b>NetBSD</b>
|
||||
operating systems.
|
||||
It is provided as
|
||||
<a href="http://fsfe.org/about/basics/freesoftware.en.html">free software</a>
|
||||
under the <a href="http://www.gnu.org/licenses/gpl-3.0.txt">GNU General Public License v3</a>. </td>
|
||||
<td class="w127x" valign="top"><img src="../images/gplv3-127x51.png" alt="GPLv3-Logo" width="127">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Current stable version: </td>
|
||||
<td><a href="../downloads/dvdisaster-0.79.5.tar.bz2">dvdisaster-0.79.5.tar.bz2</a></td>
|
||||
<td>(<a href="../downloads/dvdisaster-0.79.5.tar.bz2.gpg">digital signature</a>,
|
||||
MD5 sum: ceef990a2239c43314bc6427c6afb181)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
|
||||
A <a href="misc.html#pubkey">digital signature</a> is provided for
|
||||
verification that the packages are in their original state. The archives
|
||||
contain a file <tt>INSTALL</tt> with further instructions for building dvdisaster.
|
||||
|
||||
<p>
|
||||
OS X and Windows are no longer supported.
|
||||
The <a href="misc.html#windows">last published version for Windows (0.72.3)</a> is still available.
|
||||
|
||||
<p>
|
||||
<b>The developer versions are back!</b><p>
|
||||
|
||||
The original plan of publishing stable versions every few months did not work out due to continued lack of time. In the mean time, developer (unstable) versions are published whenever the need arises for a current update. Please be aware that developer versions are undocumented and may contain unfinished or otherwise defective functionality. You should only use them if you need some of the features detailed in the list below.<p>
|
||||
|
||||
|
||||
<a href="../downloads/dvdisaster-0.79.6.tar.bz2">dvdisaster-0.79.6.tar.bz2</a></td>
|
||||
<td>(<a href="../downloads/dvdisaster-0.79.6.tar.bz2.gpg">digital signature</a>,
|
||||
MD5 sum: ceef990a2239c43314bc6427c6afb181)
|
||||
|
||||
<ul>
|
||||
<li> The "medium info" tool will now correctly show the blank capacity (was previously always shown as zero)</li>
|
||||
<li> added support for BDXL-TL (triple layer, 100GB) media</li>
|
||||
<li> Sector CRC sums and the image MD5 sums are collected during
|
||||
reading the medium and can be re-used by the ecc data creation
|
||||
process. Speeds up ecc generation and enables RS03 image
|
||||
checksums when generating ecc data was preceeded by a read.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<b>What happened to the old dvdisaster site?</b><p>
|
||||
|
||||
Please see the <i>Preface for version 0.79.5</i> in the <a href="misc.html#manual">user manual</a>.
|
||||
|
||||
|
||||
|
||||
<!-- Page footer -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" style="width:100%; height:10px;"></td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="fs">
|
||||
<i> Copyright 2004-2017 Carsten Gnörlich.<br>
|
||||
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
|
||||
</i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,138 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/dvdisaster.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Title header -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<span class="fxxl"><b>dvdisaster</b> </span>
|
||||
<i>Version 0.79.5 (stable) / 0.79.6 (unstable)</i>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="fxxl"> </span>
|
||||
<a href="../de/verschiedenes.html">Deutsch</a> English
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<table class="navigation" width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>Navigation:
|
||||
<a href="index.html">Developer site</a> ·
|
||||
<b>Miscellaneous</b>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="privacy.html">Privacy policy</a> ·
|
||||
<a href="imprint.html">Contact information</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td style="height: 10px"></td></tr>
|
||||
</table>
|
||||
|
||||
<!-- Main body -->
|
||||
|
||||
<b>Public key for the digital signature</b><p>
|
||||
|
||||
The downloadable dvdisaster packages have been digitally signed using
|
||||
<a href="http://www.gnupg.org">GnuPG</a> so that you can verify
|
||||
that the software is in its original state.<p>
|
||||
|
||||
Starting with version 0.79.5, releases are signed with this
|
||||
<a href="../downloads/pubkey2.asc">4096bit RSA key</a>:
|
||||
|
||||
<pre>
|
||||
pub 4096R/64F770B2 2015-10-05
|
||||
Key fingerprint = E3AF E703 96CC C0D9 E5D8 381C B0DB CA7D 64F7 70B2
|
||||
uid dvdisaster (pkg signing key #2)
|
||||
sub 4096R/758BCC23 2015-10-05
|
||||
|
||||
</pre>
|
||||
|
||||
|
||||
The <a href="../downloads/pubkey1.asc">1024bit DSA key</a> used to sign releases up to version 0.79.3 is
|
||||
still available for reference.
|
||||
Feel free to send an email to carsten@dvdisaster.org to obtain
|
||||
any of these fingerprints directly from the developers.
|
||||
Please include "GPG finger print" in the subject line.
|
||||
|
||||
<p>
|
||||
|
||||
<b>User's manual</b><p>
|
||||
<a name="manual"></a>
|
||||
|
||||
|
||||
The user manual is provided as a <a href="../downloads/manual.pdf">PDF document (manual.pdf)</a>.
|
||||
It contains several basic examples of using dvdisaster and some background
|
||||
information on its way of working.
|
||||
You do not need to download the manual if you already have the
|
||||
source code archive - a copy of the manual is contained there.
|
||||
<p>
|
||||
|
||||
<b>Codec specification</b><p>
|
||||
|
||||
The specification of the RS01, RS02 and RS03 codec
|
||||
is available as a <a href="../downloads/codecs.pdf">PDF document (codecs.pdf)</a>.
|
||||
|
||||
This document is meant to discuss the codec implementation among developers.
|
||||
It requires knowledge in the area of coding theory and is not meant as end
|
||||
user documentation.
|
||||
|
||||
<table>
|
||||
<tr><td>
|
||||
<a href="http://pdfreaders.org/"><img src="http://pdfreaders.org/graphics/pdfreaders-lang-neutral.png" alt="pdfreaders.org" /></a></td>
|
||||
<td>Software for reading the PDF document is available at <a href="http://pdfreaders.org">PDFreaders.org</a>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<b>Last Windows release</b><p>
|
||||
<a name="windows"></a>
|
||||
|
||||
A native Windows fork of dvdisaster will be started soon by another developer,
|
||||
but there is nothing to announce yet.
|
||||
In the mean time, please continue using the last published version for Windows (0.72.3):
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Source code: </td>
|
||||
<td><a href="../downloads/dvdisaster-0.72.3.tar.bz2">dvdisaster-0.72.3.tar.bz2</a></td>
|
||||
<td>(<a href="../downloads/dvdisaster-0.72.3.tar.bz2.gpg">digital signature</a>,
|
||||
MD5 checksum: 4eb09c1aa3cdbc1dafdb075148fb471d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Binary installer: </td>
|
||||
<td><a href="../downloads/dvdisaster-0.72.3-setup.exe">dvdisaster-0.72.3-setup.exe</a></td>
|
||||
<td>(<a href="../downloads/dvdisaster-0.72.3-setup.exe.gpg">digital signature</a>,
|
||||
MD5 checksum: b6861ba1e8de6d91a2da5342a14870e0)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Page footer -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" style="width:100%; height:10px;"></td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="fs">
|
||||
<i> Copyright 2004-2017 Carsten Gnörlich.<br>
|
||||
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
|
||||
</i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,102 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/dvdisaster.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Title header -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<span class="fxxl"><b>dvdisaster</b> </span>
|
||||
<i>Version 0.79.5 (stable) / 0.79.6 (unstable)</i>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="fxxl"> </span>
|
||||
<a href="../de/datenschutz.html">Deutsch</a> English
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<table class="navigation" width="100%" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>Navigation:
|
||||
<a href="index.html">Developer site</a> ·
|
||||
<a href="misc.html">Miscellaneous</a>
|
||||
</td>
|
||||
<td align="right">
|
||||
<b>Privacy policy</b> ·
|
||||
<a href="imprint.html">Contact information</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr><td style="height: 10px"></td></tr>
|
||||
</table>
|
||||
|
||||
<!-- Main body -->
|
||||
|
||||
<b>Privacy statement for the web sites</b><p>
|
||||
|
||||
dvdisaster.com,
|
||||
dvdisaster.de,
|
||||
dvdisaster.net,
|
||||
dvdisaster.org
|
||||
|
||||
<p>
|
||||
|
||||
The dvdisaster project (<a href="imprint.html">see the contact page for representatives</a>)
|
||||
provides its internet sites to you without requiring a registration or entering personal data.
|
||||
|
||||
<p>
|
||||
|
||||
<b>Server log files</b><p>
|
||||
|
||||
The servers of this internet site create no logs about your visit.
|
||||
|
||||
<p>
|
||||
|
||||
<b>Cookies</b><p>
|
||||
|
||||
This internet site does not use cookies.
|
||||
|
||||
<p>
|
||||
|
||||
<b>Links to other internet sites</b><p>
|
||||
|
||||
Our internet pages contain links to other internet sites.
|
||||
The dvdisaster project has no control over their publishers,
|
||||
and whether they follow our privacy policy.
|
||||
|
||||
<p>
|
||||
|
||||
<b>Further development of these internet pages</b><p>
|
||||
|
||||
Further development of these internet pages may require our privacy policy
|
||||
to be changed. Please revisit this policy statement occasionally and watch for
|
||||
change notices.
|
||||
|
||||
<!-- Page footer -->
|
||||
|
||||
<table width="100%" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" style="width:100%; height:10px;"></td></tr>
|
||||
<tr><td colspan="2" class="hsep"></td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="fs">
|
||||
<i> Copyright 2004-2017 Carsten Gnörlich.<br>
|
||||
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
|
||||
</i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="hsep"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB |
1493
locale/cs.po
1493
locale/cs.po
File diff suppressed because it is too large
Load Diff
1538
locale/de.po
1538
locale/de.po
File diff suppressed because it is too large
Load Diff
1072
locale/it.po
1072
locale/it.po
File diff suppressed because it is too large
Load Diff
1334
locale/pt_BR.po
1334
locale/pt_BR.po
File diff suppressed because it is too large
Load Diff
1343
locale/ru.po
1343
locale/ru.po
File diff suppressed because it is too large
Load Diff
1180
locale/sv.po
1180
locale/sv.po
File diff suppressed because it is too large
Load Diff
@@ -470,7 +470,7 @@ function PACKAGE()
|
||||
echo "CFG_VERSION = $VERSION" >> Makefile.config
|
||||
}
|
||||
|
||||
# Add -D$1=$2 to CFG_OTHER_OPTIONS
|
||||
# Add -D$1="$2" to CFG_OTHER_OPTIONS
|
||||
|
||||
function DEFINE_STRING()
|
||||
{
|
||||
@@ -483,6 +483,19 @@ function DEFINE_STRING()
|
||||
CFG_OTHER_OPTIONS="$CFG_OTHER_OPTIONS -D$1=\\\"$2\\\""
|
||||
}
|
||||
|
||||
# Add -D$1=$2 to CFG_OTHER_OPTIONS
|
||||
|
||||
function DEFINE_INT()
|
||||
{
|
||||
if test -z "$1" || test -z "$2"; then
|
||||
echo "DEFINE_INT $1 $2:"
|
||||
echo " needs two arguments"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
CFG_OTHER_OPTIONS="$CFG_OTHER_OPTIONS -D$1=$2"
|
||||
}
|
||||
|
||||
# Add CFG_$1 = $2 to makefile
|
||||
|
||||
function DEFINE_VAR()
|
||||
@@ -602,7 +615,7 @@ function GET_BINDIR()
|
||||
function GET_DOCDIR()
|
||||
{ local default="$1"
|
||||
|
||||
path_from_default "doc" "$default" $cfg_docdir
|
||||
path_from_default "share/doc" "$default" $cfg_docdir
|
||||
DOCDIR=$ret_path
|
||||
|
||||
if test -n "$cfg_help_mode"; then
|
||||
@@ -620,7 +633,7 @@ function GET_DOCDIR()
|
||||
function GET_LOCALEDIR()
|
||||
{ local default="$1"
|
||||
|
||||
path_from_default "locale" "$default" $cfg_localedir
|
||||
path_from_default "share/locale" "$default" $cfg_localedir
|
||||
LOCALEDIR=$ret_path
|
||||
|
||||
if test -n "$cfg_help_mode"; then
|
||||
@@ -638,7 +651,7 @@ function GET_LOCALEDIR()
|
||||
function GET_MANDIR()
|
||||
{ local default="$1"
|
||||
|
||||
path_from_default "man" "$default" $cfg_mandir
|
||||
path_from_default "share/man" "$default" $cfg_mandir
|
||||
MANDIR=$ret_path
|
||||
|
||||
if test -n "$cfg_help_mode"; then
|
||||
@@ -729,15 +742,15 @@ function GET_DIR()
|
||||
# Try to compile conftest.c
|
||||
|
||||
function try_compile()
|
||||
{ echo "$CC $CFG_CFLAGS conftest.c $CFG_LDFLAGS $CFG_LIBS -lm -o conftest" >>$LOGFILE
|
||||
{ echo "$CC $CFG_CFLAGS -Wno-error conftest.c $CFG_LDFLAGS $CFG_LIBS -lm -o conftest" >>$LOGFILE
|
||||
cat conftest.c >>$LOGFILE
|
||||
{ (eval "$CC $CFG_CFLAGS conftest.c $CFG_LDFLAGS $CFG_LIBS -lm -o conftest") 2>>$LOGFILE; } && test -s conftest
|
||||
{ (eval "$CC $CFG_CFLAGS -Wno-error conftest.c $CFG_LDFLAGS $CFG_LIBS -lm -o conftest") 2>>$LOGFILE; } && test -s conftest
|
||||
}
|
||||
|
||||
function try_preprocess()
|
||||
{ echo "$CC $CFG_CFLAGS -E conftest.c -o conftest.out" >>$LOGFILE
|
||||
{ echo "$CC $CFG_CFLAGS -Wno-error -E conftest.c -o conftest.out" >>$LOGFILE
|
||||
cat conftest.c >>$LOGFILE
|
||||
{ (eval "$CC $CFG_CFLAGS -E conftest.c -o conftest.out") 2>>$LOGFILE; } && test -s conftest.out
|
||||
{ (eval "$CC $CFG_CFLAGS -Wno-error -E conftest.c -o conftest.out") 2>>$LOGFILE; } && test -s conftest.out
|
||||
}
|
||||
|
||||
# Try to compile a main() with a given function
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
build=$(grep BUILDNUM $1 2>/dev/null | cut -d\ -f3)
|
||||
build=$((build+1))
|
||||
cat >$1 <<EOF
|
||||
#ifdef CLI
|
||||
#ifdef WITH_CLI_ONLY_YES
|
||||
#define FLAVOR NOGUI
|
||||
#else
|
||||
#define FLAVOR GUI
|
||||
|
||||
@@ -91,6 +91,12 @@ static void get_base_dirs()
|
||||
Verbose("Using path from get_exe_path() = %s\n", Closure->binDir);
|
||||
#endif
|
||||
|
||||
/* for AppImage, get docdir from env if there */
|
||||
if (g_getenv("DVDISASTER_DOCDIR"))
|
||||
{ if (Closure->docDir)
|
||||
g_free(Closure->docDir);
|
||||
Closure->docDir = g_strdup(g_getenv("DVDISASTER_DOCDIR"));
|
||||
}
|
||||
|
||||
/*** The location of the dotfile depends on the operating system.
|
||||
Under Unix the users home directory is used. */
|
||||
@@ -131,7 +137,7 @@ find_dotfile:
|
||||
* Update color string for the <span color="#f00baa">...</span> string
|
||||
*/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void UpdateMarkup(char **string, GdkColor *color)
|
||||
{ int hexval;
|
||||
|
||||
@@ -333,7 +339,7 @@ void ReadDotfile()
|
||||
if(!strcmp(symbol, "verbose")) { Closure->verbose = atoi(value); continue; }
|
||||
if(!strcmp(symbol, "welcome-msg")) { Closure->welcomeMessage = atoi(value); continue; }
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!strcmp(symbol, "positive-text")) { get_color(Closure->greenText, value);
|
||||
UpdateMarkup(&Closure->greenMarkup, Closure->greenText);
|
||||
continue;
|
||||
@@ -439,7 +445,7 @@ static void update_dotfile()
|
||||
g_fprintf(dotfile, "verbose: %d\n", Closure->verbose);
|
||||
g_fprintf(dotfile, "welcome-msg: %d\n\n", Closure->welcomeMessage);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
save_colors(dotfile, "positive-text", Closure->greenText);
|
||||
save_colors(dotfile, "negative-text", Closure->redText);
|
||||
save_colors(dotfile, "bar-color", Closure->barColor);
|
||||
@@ -560,7 +566,7 @@ void InitClosure()
|
||||
Closure->bdSize3 = Closure->savedBDSize3 = BDXL_TL_SIZE;
|
||||
Closure->bdSize4 = Closure->savedBDSize4 = BDXL_QL_SIZE;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->logString = g_string_sized_new(1024);
|
||||
Closure->logLock = g_malloc0(sizeof(GMutex));
|
||||
g_mutex_init(Closure->logLock);
|
||||
@@ -627,7 +633,7 @@ void cond_free_ptr_array(GPtrArray *a)
|
||||
|
||||
void FreeClosure()
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
#endif
|
||||
/* in CLI-only mode, always update dotfile */
|
||||
@@ -658,7 +664,7 @@ void FreeClosure()
|
||||
cond_free(Closure->dDumpDir);
|
||||
cond_free(Closure->dDumpPrefix);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->prefsContext)
|
||||
FreePreferences(Closure->prefsContext);
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ void PrintCrcBuf(CrcBuf *cb)
|
||||
return;
|
||||
|
||||
PrintLog("CrcBuf contents, image path %s:\n", cb->imageName ? cb->imageName : "none (medium)" );
|
||||
PrintLog(" crcSize: %lld, dataSectors: %lld, coveredSectors: %lld, allSectors: %lld\n",
|
||||
PrintLog(" crcSize: %" PRId64 ", dataSectors: %" PRId64 ", coveredSectors: %" PRId64 ", allSectors: %" PRId64 "\n",
|
||||
cb->crcSize, cb->dataSectors, cb->coveredSectors, cb->allSectors);
|
||||
|
||||
PrintLog(" md5State:");
|
||||
@@ -258,5 +258,5 @@ void PrintCrcBuf(CrcBuf *cb)
|
||||
if(!GetBit(cb->valid, i))
|
||||
{ missing++;
|
||||
}
|
||||
PrintLog(" missing crcs: %lld\n", missing);
|
||||
PrintLog(" missing crcs: %" PRId64 "\n", missing);
|
||||
}
|
||||
|
||||
116
src/debug.c
116
src/debug.c
@@ -100,7 +100,7 @@ static void random_error1(Image *image, char *arg)
|
||||
|
||||
if(block_sel[i] && block_idx[i]<image->sectorSize)
|
||||
{ if(!LargeSeek(image->file, (gint64)(2048*block_idx[i])))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),block_idx[i],strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),block_idx[i],strerror(errno));
|
||||
|
||||
CreateMissingSector(missing, block_idx[i], image->imageFP, FINGERPRINT_SECTOR, NULL);
|
||||
|
||||
@@ -108,7 +108,7 @@ static void random_error1(Image *image, char *arg)
|
||||
write_size = image->inLast;
|
||||
|
||||
if(LargeWrite(image->file, missing, write_size) != write_size)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"),block_idx[i],strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"),block_idx[i],strerror(errno));
|
||||
}
|
||||
|
||||
block_idx[i]++;
|
||||
@@ -188,12 +188,12 @@ static void random_error2(Image *image, char *arg)
|
||||
{ unsigned char missing[2048];
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
|
||||
CreateMissingSector(missing, s, image->imageFP, image->fpSector, NULL);
|
||||
|
||||
if(LargeWrite(image->file, missing, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,11 +236,11 @@ static void random_error2(Image *image, char *arg)
|
||||
else s = RS02EccSectorIndex(lay, i-eh->dataBytes, si);
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
|
||||
CreateMissingSector(missing, s, image->imageFP, image->fpSector, NULL);
|
||||
if(LargeWrite(image->file, missing, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,12 +360,12 @@ static void random_error3(Image *image, char *arg)
|
||||
}
|
||||
|
||||
if(!LargeSeek(file, (gint64)(2048*file_s))) // FIXME: wrong for ecc files
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
|
||||
CreateMissingSector(missing, s, image->imageFP, image->fpSector, NULL);
|
||||
|
||||
if(LargeWrite(file, missing, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ void Byteset(char *arg)
|
||||
byte = atoi(cpos+1);
|
||||
|
||||
if(s<0 || s>=image->sectorSize)
|
||||
Stop(_("Sector must be in range [0..%lld]\n"),image->sectorSize-1);
|
||||
Stop(_("Sector must be in range [0..%" PRId64 "]\n"),image->sectorSize-1);
|
||||
|
||||
if(i<0 || i>=2048)
|
||||
Stop(_("Byte position must be in range [0..2047]"));
|
||||
@@ -467,7 +467,7 @@ void Byteset(char *arg)
|
||||
if(byte<0 || byte>=256)
|
||||
Stop(_("Byte value must be in range [0..255]"));
|
||||
|
||||
PrintLog(_("Setting byte %d in sector %lld to value %d.\n"), i, s, byte);
|
||||
PrintLog(_("Setting byte %d in sector %" PRId64 " to value %d.\n"), i, s, byte);
|
||||
|
||||
/*** Set the byte */
|
||||
|
||||
@@ -521,9 +521,9 @@ void Erase(char *arg)
|
||||
else start = end = atoi(arg);
|
||||
|
||||
if(start>end || start < 0 || end >= image->sectorSize)
|
||||
Stop(_("Sectors must be in range [0..%lld].\n"),image->sectorSize-1);
|
||||
Stop(_("Sectors must be in range [0..%" PRId64 "].\n"),image->sectorSize-1);
|
||||
|
||||
PrintLog(_("Erasing sectors [%lld,%lld]\n"),start,end);
|
||||
PrintLog(_("Erasing sectors [%" PRId64 ",%" PRId64 "]\n"),start,end);
|
||||
|
||||
/*** Erase them. */
|
||||
|
||||
@@ -542,7 +542,7 @@ void Erase(char *arg)
|
||||
n = LargeWrite(image->file, missing, m);
|
||||
|
||||
if(n != m)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"),s,strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"),s,strerror(errno));
|
||||
}
|
||||
|
||||
/*** Clean up */
|
||||
@@ -569,9 +569,9 @@ void TruncateImageFile(char *arg)
|
||||
end = atoi(arg);
|
||||
|
||||
if(end >= image->sectorSize)
|
||||
Stop(_("New length must be in range [0..%lld].\n"),image->sectorSize-1);
|
||||
Stop(_("New length must be in range [0..%" PRId64 "].\n"),image->sectorSize-1);
|
||||
|
||||
PrintLog(_("Truncating image to %lld sectors.\n"),end);
|
||||
PrintLog(_("Truncating image to %" PRId64 " sectors.\n"),end);
|
||||
|
||||
/*** Truncate it. */
|
||||
|
||||
@@ -607,10 +607,10 @@ void RandomImage(char *image_name, char *n_sectors, int mark)
|
||||
|
||||
/*** Print banner */
|
||||
|
||||
PrintLog(_("\nCreating random image with %lld sectors.\n\n"
|
||||
PrintLog(_("\nCreating random image with %" PRId64 " sectors.\n\n"
|
||||
"There is no need for permanently storing this image;\n"
|
||||
"you can always reproduce it by calling\n"
|
||||
"dvdisaster --debug %s %lld --random-seed %d\n\n"),
|
||||
"dvdisaster --debug %s %" PRId64 " --random-seed %d\n\n"),
|
||||
sectors,
|
||||
mark ? "--marked-image" : "--random-image",
|
||||
sectors, Closure->randomSeed);
|
||||
@@ -659,7 +659,7 @@ void RandomImage(char *image_name, char *n_sectors, int mark)
|
||||
s++;
|
||||
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"),s,strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"),s,strerror(errno));
|
||||
|
||||
percent = (100*s)/sectors;
|
||||
if(last_percent != percent)
|
||||
@@ -697,20 +697,20 @@ void ZeroUnreadable(void)
|
||||
{ int n = LargeRead(image->file, buf, 2048);
|
||||
|
||||
if(n != 2048)
|
||||
Stop(_("Could not read image sector %lld:\n%s\n"),s,strerror(errno));
|
||||
Stop(_("Could not read image sector %" PRId64 ":\n%s\n"),s,strerror(errno));
|
||||
|
||||
/* Replace the dead sector marker */
|
||||
|
||||
if(CheckForMissingSector(buf, s, image->imageFP, FINGERPRINT_SECTOR) != SECTOR_PRESENT)
|
||||
{
|
||||
if(!LargeSeek(image->file, (gint64)(2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),s,strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),s,strerror(errno));
|
||||
|
||||
n = LargeWrite(image->file, zeros, 2048);
|
||||
n=2048;
|
||||
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"),s,strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"),s,strerror(errno));
|
||||
|
||||
cnt++;
|
||||
}
|
||||
@@ -722,7 +722,7 @@ void ZeroUnreadable(void)
|
||||
}
|
||||
}
|
||||
|
||||
PrintProgress(_("%lld \"unreadable sector\" markers replaced.\n"), cnt);
|
||||
PrintProgress(_("%" PRId64 " \"unreadable sector\" markers replaced.\n"), cnt);
|
||||
|
||||
CloseImage(image);
|
||||
}
|
||||
@@ -799,16 +799,16 @@ void ShowHeader(char *arg)
|
||||
sector = atoi(arg);
|
||||
|
||||
if(sector < 0 || sector >= image->sectorSize)
|
||||
Stop(_("Sector must be in range [0..%lld]\n"),image->sectorSize-1);
|
||||
Stop(_("Sector must be in range [0..%" PRId64 "]\n"),image->sectorSize-1);
|
||||
|
||||
/*** Load it. */
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*sector)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),sector,strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),sector,strerror(errno));
|
||||
|
||||
n = LargeRead(image->file, eh, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),sector,strerror(errno));
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),sector,strerror(errno));
|
||||
|
||||
/*** Clean up */
|
||||
|
||||
@@ -840,18 +840,18 @@ void ShowSector(char *arg)
|
||||
sector = atoi(arg);
|
||||
|
||||
if(sector < 0 || sector >= image->sectorSize)
|
||||
Stop(_("Sector must be in range [0..%lld]\n"),image->sectorSize-1);
|
||||
Stop(_("Sector must be in range [0..%" PRId64 "]\n"),image->sectorSize-1);
|
||||
|
||||
PrintLog(_("Contents of sector %lld:\n\n"),sector);
|
||||
PrintLog(_("Contents of sector %" PRId64 ":\n\n"),sector);
|
||||
|
||||
/*** Show it. */
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*sector)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),sector,strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),sector,strerror(errno));
|
||||
|
||||
n = LargeRead(image->file, buf, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),sector,strerror(errno));
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),sector,strerror(errno));
|
||||
|
||||
if(Closure->debugCDump)
|
||||
CDump(buf, sector, 2048, 16);
|
||||
@@ -877,7 +877,7 @@ void ReadSector(char *arg)
|
||||
|
||||
/*** Open the device */
|
||||
|
||||
image = OpenImageFromDevice(Closure->device);
|
||||
image = OpenImageFromDevice(Closure->device, 0);
|
||||
if(!image)
|
||||
Stop(_("Can't open %s:\n%s"), Closure->imageName, strerror(errno));
|
||||
|
||||
@@ -888,10 +888,10 @@ void ReadSector(char *arg)
|
||||
if(sector < 0 || sector >= image->dh->sectors)
|
||||
{ CloseImage(image);
|
||||
FreeAlignedBuffer(ab);
|
||||
Stop(_("Sector must be in range [0..%lld]\n"),image->dh->sectors-1);
|
||||
Stop(_("Sector must be in range [0..%" PRId64 "]\n"),image->dh->sectors-1);
|
||||
}
|
||||
|
||||
PrintLog(_("Contents of sector %lld:\n\n"),sector);
|
||||
PrintLog(_("Contents of sector %" PRId64 ":\n\n"),sector);
|
||||
|
||||
/*** Read it. */
|
||||
|
||||
@@ -902,7 +902,7 @@ void ReadSector(char *arg)
|
||||
if(status)
|
||||
{ CloseImage(image);
|
||||
FreeAlignedBuffer(ab);
|
||||
Stop(_("Failed reading sector %lld: %s"),sector,strerror(errno));
|
||||
Stop(_("Failed reading sector %" PRId64 ": %s"),sector,strerror(errno));
|
||||
}
|
||||
|
||||
if(Closure->debugCDump)
|
||||
@@ -931,7 +931,7 @@ void RawSector(char *arg)
|
||||
|
||||
/*** Open the device */
|
||||
|
||||
image = OpenImageFromDevice(Closure->device);
|
||||
image = OpenImageFromDevice(Closure->device, 0);
|
||||
if(!image)
|
||||
Stop(_("Can't open %s:\n%s"), Closure->imageName, strerror(errno));
|
||||
sense = &image->dh->sense;
|
||||
@@ -951,10 +951,10 @@ void RawSector(char *arg)
|
||||
if(lba < 0 || lba >= image->dh->sectors)
|
||||
{ CloseImage(image);
|
||||
FreeAlignedBuffer(ab);
|
||||
Stop(_("Sector must be in range [0..%lld]\n"),image->dh->sectors-1);
|
||||
Stop(_("Sector must be in range [0..%" PRId64 "]\n"),image->dh->sectors-1);
|
||||
}
|
||||
|
||||
PrintLog(_("Contents of sector %lld:\n\n"),lba);
|
||||
PrintLog(_("Contents of sector %" PRId64 ":\n\n"),lba);
|
||||
|
||||
/*** Try the raw read */
|
||||
|
||||
@@ -1162,7 +1162,7 @@ void CopySector(char *arg)
|
||||
|
||||
LargeStat(from_path, §ors); sectors /= 2048;
|
||||
if(from_sector<0 || from_sector>sectors-1)
|
||||
Stop(_("Source sector must be in range [0..%lld]\n"), sectors-1);
|
||||
Stop(_("Source sector must be in range [0..%" PRId64 "]\n"), sectors-1);
|
||||
|
||||
|
||||
if(!(to = LargeOpen(to_path, O_WRONLY, IMG_PERMS)))
|
||||
@@ -1170,27 +1170,27 @@ void CopySector(char *arg)
|
||||
|
||||
LargeStat(to_path, §ors); sectors /= 2048;
|
||||
if(to_sector<0 || to_sector>sectors-1)
|
||||
Stop(_("Destination sector must be in range [0..%lld]\n"), sectors-1);
|
||||
Stop(_("Destination sector must be in range [0..%" PRId64 "]\n"), sectors-1);
|
||||
|
||||
/*** Copy the sector */
|
||||
|
||||
PrintLog(_("Copying sector %lld from %s to sector %lld in %s.\n"),
|
||||
PrintLog(_("Copying sector %" PRId64 " from %s to sector %" PRId64 " in %s.\n"),
|
||||
from_sector, from_path, to_sector, to_path);
|
||||
|
||||
if(!LargeSeek(from, (gint64)(2048*from_sector)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),
|
||||
from_sector, strerror(errno));
|
||||
|
||||
if(LargeRead(from, buf, 2048) != 2048)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),
|
||||
from_sector, strerror(errno));
|
||||
|
||||
if(!LargeSeek(to, (gint64)(2048*to_sector)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),
|
||||
to_sector, strerror(errno));
|
||||
|
||||
if(LargeWrite(to, buf, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"),
|
||||
to_sector, strerror(errno));
|
||||
|
||||
/*** Clean up */
|
||||
@@ -1233,9 +1233,9 @@ void MergeImages(char *arg, int mode)
|
||||
|
||||
/*** Compare/merge the images */
|
||||
|
||||
if(!mode) PrintLog("Comparing %s (%lld sectors) with %s (%lld sectors).\n",
|
||||
if(!mode) PrintLog("Comparing %s (%" PRId64 " sectors) with %s (%" PRId64 " sectors).\n",
|
||||
left_path, left_sectors, right_path, right_sectors);
|
||||
else PrintLog("Merging %s (%lld sectors) with %s (%lld sectors).\n",
|
||||
else PrintLog("Merging %s (%" PRId64 " sectors) with %s (%" PRId64 " sectors).\n",
|
||||
left_path, left_sectors, right_path, right_sectors);
|
||||
|
||||
/*** Compare them */
|
||||
@@ -1249,33 +1249,33 @@ void MergeImages(char *arg, int mode)
|
||||
{ unsigned char left_buf[2048], right_buf[2048];
|
||||
|
||||
if(LargeRead(left, left_buf, 2048) != 2048)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),
|
||||
s, strerror(errno));
|
||||
|
||||
if(LargeRead(right, right_buf, 2048) != 2048)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),
|
||||
s, strerror(errno));
|
||||
|
||||
if(memcmp(left_buf, right_buf, 2048))
|
||||
{
|
||||
if(CheckForMissingSector(left_buf, s, NULL, 0) != SECTOR_PRESENT)
|
||||
{ if(!mode) PrintLog("< Sector %lld missing\n", s);
|
||||
{ if(!mode) PrintLog("< Sector %" PRId64 " missing\n", s);
|
||||
else
|
||||
{ PrintLog("< Sector %lld missing; copied from %s.\n", s, right_path);
|
||||
{ PrintLog("< Sector %" PRId64 " missing; copied from %s.\n", s, right_path);
|
||||
if(!LargeSeek(left, (2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),
|
||||
s, strerror(errno));
|
||||
|
||||
if(LargeWrite(left, right_buf, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"),
|
||||
s, strerror(errno));
|
||||
}
|
||||
}
|
||||
else if(CheckForMissingSector(right_buf, s, NULL, 0) != SECTOR_PRESENT)
|
||||
{ PrintLog("> Sector %lld missing\n", s);
|
||||
{ PrintLog("> Sector %" PRId64 " missing\n", s);
|
||||
}
|
||||
else
|
||||
{ PrintLog("! Sector %lld differs in images\n", s);
|
||||
{ PrintLog("! Sector %" PRId64 " differs in images\n", s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1287,27 +1287,27 @@ void MergeImages(char *arg, int mode)
|
||||
}
|
||||
|
||||
if(left_sectors > right_sectors)
|
||||
{ PrintLog("%lld sectors missing at the end of %s\n",
|
||||
{ PrintLog("%" PRId64 " sectors missing at the end of %s\n",
|
||||
left_sectors-right_sectors, right_path);
|
||||
}
|
||||
|
||||
if(left_sectors < right_sectors)
|
||||
{ if(!mode)
|
||||
PrintLog("%lld sectors missing at the end of %s\n",
|
||||
PrintLog("%" PRId64 " sectors missing at the end of %s\n",
|
||||
right_sectors-left_sectors, left_path);
|
||||
else
|
||||
{ unsigned char buf[2048];
|
||||
|
||||
PrintLog("Transferring %lld sectors from the end of %s to %s.\n",
|
||||
PrintLog("Transferring %" PRId64 " sectors from the end of %s to %s.\n",
|
||||
right_sectors-left_sectors, right_path, left_path);
|
||||
|
||||
for(s=left_sectors; s<right_sectors; s++)
|
||||
{ if(LargeRead(right, buf, 2048) != 2048)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),
|
||||
s, strerror(errno));
|
||||
|
||||
if(LargeWrite(left, buf, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"),
|
||||
s, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ int CheckForMissingSectors(unsigned char *buf, guint64 sector,
|
||||
*** Dialogue for indicating problem with the missing sector
|
||||
***/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
static void insert_buttons(GtkDialog *dialog)
|
||||
{
|
||||
gtk_dialog_add_buttons(dialog,
|
||||
@@ -271,7 +271,7 @@ static void insert_buttons(GtkDialog *dialog)
|
||||
|
||||
void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int source_type, int *number)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int answer;
|
||||
#endif
|
||||
guint64 recorded_number;
|
||||
@@ -293,7 +293,7 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
|
||||
/* In CLI mode, only report the first unrecoverable sector unless verbose is given. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode && !Closure->verbose && *number > 0)
|
||||
#else
|
||||
if(!Closure->verbose && *number > 0)
|
||||
@@ -313,7 +313,7 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
vol_label = get_volume_label(buf);
|
||||
if(vol_label)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
label_msg = g_strdup_printf(_("\n\nThe label of the original (defective) medium was:\n%s\n\n"), vol_label);
|
||||
else
|
||||
@@ -339,11 +339,11 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
"repaired by dvdisaster. Also it will not be possible to create\n"
|
||||
"error correction data for it. Sorry for the bad news.\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLogWithAsterisks(msg,sector, recorded_number, label_msg);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ answer = ModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector, recorded_number, label_msg);
|
||||
@@ -366,11 +366,11 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
"repaired by dvdisaster. Also it will not be possible to create\n"
|
||||
"error correction data for it. Sorry for the bad news.\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLogWithAsterisks(msg,sector, label_msg);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ answer = ModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector, label_msg);
|
||||
@@ -395,11 +395,11 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
"repaired by dvdisaster. Also it will not be possible to create\n"
|
||||
"error correction data for it. Sorry for the bad news.\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLogWithAsterisks(msg, sector);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ answer = ModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector);
|
||||
@@ -419,11 +419,11 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
"in the ecc file are missing and its error correction\n"
|
||||
"capacity will be reduced.\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLogWithAsterisks(msg, sector);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ answer = ModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector);
|
||||
|
||||
@@ -114,7 +114,7 @@ typedef enum
|
||||
int main(int argc, char *argv[])
|
||||
{ int mode = MODE_NONE;
|
||||
int sequence = MODE_NONE;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int devices_queried = FALSE;
|
||||
#endif
|
||||
char *debug_arg = NULL;
|
||||
@@ -196,7 +196,7 @@ int main(int argc, char *argv[])
|
||||
wrong packing. */
|
||||
|
||||
if(sizeof(EccHeader) != 4096)
|
||||
Stop("sizeof(EccHeader) is %d, but must be 4096.\n", sizeof(EccHeader));
|
||||
Stop("sizeof(EccHeader) is %zu, but must be 4096.\n", sizeof(EccHeader));
|
||||
|
||||
/*** CPU type detection. Must be done before parsing the options
|
||||
as some may be CPU-related. */
|
||||
@@ -534,7 +534,7 @@ int main(int argc, char *argv[])
|
||||
Closure->prefetchSectors = atoi(optarg);
|
||||
if( Closure->prefetchSectors < 32
|
||||
|| Closure->prefetchSectors > MAX_PREFETCH_CACHE_SIZE)
|
||||
Stop(_("--prefetch-sectors must be in range 32...%s"),
|
||||
Stop(_("--prefetch-sectors must be in range 32...%d"),
|
||||
MAX_PREFETCH_CACHE_SIZE);
|
||||
break;
|
||||
case MODIFIER_RANDOM_SEED:
|
||||
@@ -763,7 +763,7 @@ int main(int argc, char *argv[])
|
||||
if(!Closure->device && mode == MODE_SEQUENCE
|
||||
&& (sequence & (1<<MODE_READ | 1<<MODE_SCAN)))
|
||||
{ Closure->device = DefaultDevice();
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
devices_queried = TRUE;
|
||||
#endif
|
||||
}
|
||||
@@ -806,8 +806,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{ if(image->inLast == 2048)
|
||||
PrintLog(_(": %lld medium sectors.\n"), image->sectorSize);
|
||||
else PrintLog(_(": %lld medium sectors and %d bytes.\n"),
|
||||
PrintLog(_(": %" PRId64 " medium sectors.\n"), image->sectorSize);
|
||||
else PrintLog(_(": %" PRId64 " medium sectors and %d bytes.\n"),
|
||||
image->sectorSize-1, image->inLast);
|
||||
}
|
||||
image = OpenEccFileForImage(image, Closure->eccName, O_RDWR, IMG_PERMS);
|
||||
@@ -920,7 +920,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/*** If no mode was selected, print the help screen. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(mode == MODE_HELP)
|
||||
#else
|
||||
if(mode == MODE_HELP || mode == MODE_NONE)
|
||||
@@ -1019,7 +1019,7 @@ int main(int argc, char *argv[])
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/* If no mode was selected at the command line,
|
||||
start the graphical user interface. */
|
||||
|
||||
|
||||
119
src/dvdisaster.h
119
src/dvdisaster.h
@@ -38,9 +38,22 @@
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
/* under MinGW, __attribute__ format printf doesn't work and outputs warnings for %lld,
|
||||
* even if it's supported and doesn't output any warning under -Wformat when directly
|
||||
* used with the real printf() func. However 'gnu_printf' works, see
|
||||
* https://github.com/ocornut/imgui/issues/3592
|
||||
*/
|
||||
#ifdef __MINGW32__ /* defined under 32 and 64 bits mingw */
|
||||
# define PRINTF_FLAVOR gnu_printf
|
||||
#else
|
||||
# define PRINTF_FLAVOR printf
|
||||
#endif
|
||||
#define PRINTF_FORMAT2(ARG1,ARG2) __attribute__((format(PRINTF_FLAVOR, ARG1, ARG2)))
|
||||
#define PRINTF_FORMAT(ARG) PRINTF_FORMAT2(ARG,ARG+1)
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gprintf.h>
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
@@ -48,6 +61,7 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <inttypes.h> /* PRId64 et. al */
|
||||
#ifdef WITH_NLS_YES
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
@@ -72,8 +86,15 @@
|
||||
Note that these functions are even required when
|
||||
WITH_NLS_NO is set! */
|
||||
|
||||
#define _(string) sgettext(string)
|
||||
#define _utf(string) sgettext_utf8(string)
|
||||
#ifndef WITH_DEBUG_PRINTF_FORMAT_YES
|
||||
#define _(string) sgettext(string)
|
||||
#define _utf(string) sgettext_utf8(string)
|
||||
#else
|
||||
/* disable sgettext() calls so that the compiler
|
||||
can analyze printf format strings */
|
||||
#define _(string) string
|
||||
#define _utf(string) string
|
||||
#endif
|
||||
|
||||
/* File permissions for images */
|
||||
|
||||
@@ -89,7 +110,7 @@
|
||||
#define round(x) rint(x)
|
||||
#endif
|
||||
|
||||
#ifdef CLI
|
||||
#ifdef WITH_CLI_ONLY_YES
|
||||
#define STATUS_LABEL_OR_NULL NULL
|
||||
#else
|
||||
#define STATUS_LABEL_OR_NULL Closure->status
|
||||
@@ -290,7 +311,7 @@ typedef struct _GlobalClosure
|
||||
|
||||
struct _CrcBuf *crcBuf; /* crcBuf of last image read */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/*** GUI-related things */
|
||||
|
||||
int guiMode; /* TRUE if GUI is active */
|
||||
@@ -298,7 +319,7 @@ typedef struct _GlobalClosure
|
||||
#endif
|
||||
int noMissingWarnings; /* suppress warnings about inconsistent missing sectors */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
GtkWidget *logWidget; /* Dialog for the log display */
|
||||
GtkScrolledWindow *logScroll; /* and its scrolled window */
|
||||
GtkTextBuffer *logBuffer; /* Text buffer for the log output */
|
||||
@@ -381,7 +402,7 @@ typedef struct _GlobalClosure
|
||||
GtkWidget *readLinearFootlineBox;
|
||||
#endif
|
||||
gint64 crcErrors, readErrors; /* these are passed between threads and must therefore be global */
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
|
||||
/*** Widgets for the adaptive reading action */
|
||||
|
||||
@@ -529,7 +550,7 @@ int ProbeCacheLineSize();
|
||||
|
||||
void InitClosure(void);
|
||||
void LocalizedFileDefaults(void);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void UpdateMarkup(char**, GdkColor*);
|
||||
void DefaultColors(void);
|
||||
#endif
|
||||
@@ -552,9 +573,9 @@ guint32 EDCCrc32(unsigned char*, int);
|
||||
/* Flags for CrcBuf->md5State */
|
||||
|
||||
#define MD5_INVALID 0
|
||||
#define MD5_BUILDING 1<<0
|
||||
#define MD5_DATA_COMPLETE 1<<1
|
||||
#define MD5_IMAGE_COMPLETE 1<<2
|
||||
#define MD5_BUILDING (1<<0)
|
||||
#define MD5_DATA_COMPLETE (1<<1)
|
||||
#define MD5_IMAGE_COMPLETE (1<<2)
|
||||
#define MD5_COMPLETE (MD5_DATA_COMPLETE | MD5_IMAGE_COMPLETE)
|
||||
|
||||
typedef struct _CrcBuf
|
||||
@@ -604,7 +625,7 @@ int CrcBufValid(CrcBuf*, struct _Image*, EccHeader*);
|
||||
|
||||
void PrintCrcBuf(CrcBuf*);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/***
|
||||
*** curve.c
|
||||
***/
|
||||
@@ -656,7 +677,7 @@ void RedrawCurve(Curve*, int);
|
||||
|
||||
void HexDump(unsigned char*, int, int);
|
||||
void LaTeXify(gint32*, int, int);
|
||||
void AppendToTextFile(char*,char*, ...);
|
||||
void AppendToTextFile(char*,char*, ...) PRINTF_FORMAT(2);
|
||||
void CopySector(char*);
|
||||
void Byteset(char*);
|
||||
void Erase(char*);
|
||||
@@ -715,7 +736,7 @@ void PrintEccHeader(EccHeader*);
|
||||
*** fix-window.c
|
||||
***/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void CreateFixWindow(GtkWidget*);
|
||||
#endif
|
||||
|
||||
@@ -775,7 +796,7 @@ void FreeGaloisTables(GaloisTables*);
|
||||
ReedSolomonTables *CreateReedSolomonTables(GaloisTables*, gint32, gint32, int);
|
||||
void FreeReedSolomonTables(ReedSolomonTables*);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/***
|
||||
*** help-dialogs.c
|
||||
***/
|
||||
@@ -801,8 +822,8 @@ LabelWithOnlineHelp* CreateLabelWithOnlineHelp(char*, char*);
|
||||
LabelWithOnlineHelp* CloneLabelWithOnlineHelp(LabelWithOnlineHelp*, char*);
|
||||
void FreeLabelWithOnlineHelp(LabelWithOnlineHelp*);
|
||||
void SetOnlineHelpLinkText(LabelWithOnlineHelp*, char*);
|
||||
void AddHelpListItem(LabelWithOnlineHelp*, char*, ...);
|
||||
void AddHelpParagraph(LabelWithOnlineHelp*, char*, ...);
|
||||
void AddHelpListItem(LabelWithOnlineHelp*, char*, ...) PRINTF_FORMAT(2);
|
||||
void AddHelpParagraph(LabelWithOnlineHelp*, char*, ...) PRINTF_FORMAT(2);
|
||||
void AddHelpWidget(LabelWithOnlineHelp*, GtkWidget*);
|
||||
|
||||
/* Specific online help dialogs */
|
||||
@@ -813,7 +834,7 @@ void ShowLog();
|
||||
void UpdateLog();
|
||||
void AboutDialog();
|
||||
|
||||
void AboutText(GtkWidget*, char*, ...);
|
||||
void AboutText(GtkWidget*, char*, ...) PRINTF_FORMAT(2);
|
||||
void AboutLink(GtkWidget*, char*, char*);
|
||||
void AboutTextWithLink(GtkWidget*, char*, char*);
|
||||
#endif
|
||||
@@ -894,7 +915,7 @@ typedef struct _Image
|
||||
} Image;
|
||||
|
||||
Image* OpenImageFromFile(char*, int, mode_t);
|
||||
Image* OpenImageFromDevice(char*); /* really in scsi-layer.h */
|
||||
Image* OpenImageFromDevice(char*, int); /* really in scsi-layer.h */
|
||||
Image* OpenEccFileForImage(Image*, char*, int, mode_t);
|
||||
int ReportImageEccInconsistencies(Image*);
|
||||
int GetImageFingerprint(Image*, guint8*, guint64);
|
||||
@@ -964,7 +985,7 @@ int CountC2Errors(unsigned char*);
|
||||
|
||||
void DefaultLogFile();
|
||||
void VPrintLogFile(char*, va_list);
|
||||
void PrintLogFile(char*, ...);
|
||||
void PrintLogFile(char*, ...) PRINTF_FORMAT(1);
|
||||
|
||||
/***
|
||||
*** maintenance.c
|
||||
@@ -1043,7 +1064,7 @@ void* malloc_ext(int,char*,int);
|
||||
void* realloc_ext(void*, int, char*, int);
|
||||
void* try_malloc_ext(int,char*,int);
|
||||
char* strdup_ext(const char*,char*,int);
|
||||
char* strdup_printf_ext(char*, char*, int, ...);
|
||||
char* strdup_printf_ext(char*, char*, int, ...) PRINTF_FORMAT2(2,4);
|
||||
char* strdup_vprintf_ext(char*, va_list, char*, int);
|
||||
gchar* g_locale_to_utf8_ext(const gchar*, gssize, gsize*, gsize*, GError**, char*, int);
|
||||
void free_ext(void*,char*,int);
|
||||
@@ -1053,7 +1074,7 @@ int forget(void*);
|
||||
|
||||
void check_memleaks(void);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/***
|
||||
*** menubar.c
|
||||
***/
|
||||
@@ -1089,7 +1110,7 @@ typedef struct _Method
|
||||
void (*updateCksums)(Image*, gint64, unsigned char*);/* checksum while reading an image */
|
||||
int (*finalizeCksums)(Image*);
|
||||
void *ckSumClosure; /* working closure for above */
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void (*createVerifyWindow)(struct _Method*, GtkWidget*);
|
||||
void (*createCreateWindow)(struct _Method*, GtkWidget*);
|
||||
void (*createFixWindow)(struct _Method*, GtkWidget*);
|
||||
@@ -1101,7 +1122,7 @@ typedef struct _Method
|
||||
void (*readPreferences)(struct _Method*);
|
||||
#endif
|
||||
void (*destroy)(struct _Method*);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int tabWindowIndex; /* our position in the (invisible) notebook */
|
||||
void *widgetList; /* linkage to window system */
|
||||
#endif
|
||||
@@ -1128,59 +1149,59 @@ void gint64_to_uchar(unsigned char*, gint64);
|
||||
|
||||
void CalcSectors(guint64, guint64*, int*);
|
||||
|
||||
void PrintCLI(char*, ...);
|
||||
void PrintLog(char*, ...);
|
||||
void PrintLogWithAsterisks(char*, ...);
|
||||
void Verbose(char*, ...);
|
||||
void PrintTimeToLog(GTimer*, char*, ...);
|
||||
void PrintProgress(char*, ...);
|
||||
void PrintCLI(char*, ...) PRINTF_FORMAT(1);
|
||||
void PrintLog(char*, ...) PRINTF_FORMAT(1);
|
||||
void PrintLogWithAsterisks(char*, ...) PRINTF_FORMAT(1);
|
||||
void Verbose(char*, ...) PRINTF_FORMAT(1);
|
||||
void PrintTimeToLog(GTimer*, char*, ...) PRINTF_FORMAT(2);
|
||||
void PrintProgress(char*, ...) PRINTF_FORMAT(1);
|
||||
void ClearProgress(void);
|
||||
#ifndef CLI
|
||||
void PrintCLIorLabel(GtkLabel*, char*, ...);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void PrintCLIorLabel(GtkLabel*, char*, ...) PRINTF_FORMAT(2);
|
||||
#else
|
||||
void PrintCLIorLabel(void*, char*, ...);
|
||||
void PrintCLIorLabel(void*, char*, ...) PRINTF_FORMAT(2);
|
||||
#endif
|
||||
int GetLongestTranslation(char*, ...);
|
||||
|
||||
void LogWarning(char*, ...);
|
||||
void Stop(char*, ...);
|
||||
void LogWarning(char*, ...) PRINTF_FORMAT(1);
|
||||
void Stop(char*, ...) PRINTF_FORMAT(1);
|
||||
void RegisterCleanup(char*, void (*)(gpointer), gpointer);
|
||||
void UnregisterCleanup(void);
|
||||
|
||||
GThread* CreateGThread(GThreadFunc, gpointer);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void ShowWidget(GtkWidget*);
|
||||
void AllowActions(gboolean);
|
||||
|
||||
void ShowMessage(GtkWindow*, char*, GtkMessageType);
|
||||
GtkWidget* CreateMessage(char*, GtkMessageType, ...);
|
||||
void SetLabelText(GtkLabel*, char*, ...);
|
||||
GtkWidget* CreateMessage(char*, GtkMessageType, ...) PRINTF_FORMAT2(1,3);
|
||||
void SetLabelText(GtkLabel*, char*, ...) PRINTF_FORMAT(2);
|
||||
void SetProgress(GtkWidget*, int, int);
|
||||
|
||||
int ModalDialog(GtkMessageType, GtkButtonsType, void (*)(GtkDialog*), char*, ...);
|
||||
int ModalWarning(GtkMessageType, GtkButtonsType, void (*)(GtkDialog*), char*, ...);
|
||||
int ModalDialog(GtkMessageType, GtkButtonsType, void (*)(GtkDialog*), char*, ...) PRINTF_FORMAT(4);
|
||||
int ModalWarning(GtkMessageType, GtkButtonsType, void (*)(GtkDialog*), char*, ...) PRINTF_FORMAT(4);
|
||||
#define ModalWarningOrCLI(a,b,c,d,...) ModalWarning(a,b,c,d,__VA_ARGS__)
|
||||
#else
|
||||
int ModalWarning(char*, ...);
|
||||
int ModalWarning(char*, ...) PRINTF_FORMAT(1);
|
||||
#define ModalWarningOrCLI(a,b,c,d,...) ModalWarning(d,__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void SetText(PangoLayout*, char*, int*, int*);
|
||||
void SwitchAndSetFootline(GtkWidget*, int, GtkWidget*, char*, ...);
|
||||
void SwitchAndSetFootline(GtkWidget*, int, GtkWidget*, char*, ...) PRINTF_FORMAT(4);
|
||||
|
||||
void ReverseCancelOK(GtkDialog*);
|
||||
void TimedInsensitive(GtkWidget*, int);
|
||||
|
||||
int GetLabelWidth(GtkLabel*, char*, ...);
|
||||
void LockLabelSize(GtkLabel*, char*, ...);
|
||||
int GetLabelWidth(GtkLabel*, char*, ...) PRINTF_FORMAT(2);
|
||||
void LockLabelSize(GtkLabel*, char*, ...) PRINTF_FORMAT(2);
|
||||
#endif
|
||||
|
||||
int ConfirmImageDeletion(char *);
|
||||
int ConfirmEccDeletion(char *);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/***
|
||||
*** preferences.c
|
||||
***/
|
||||
@@ -1250,7 +1271,7 @@ void ReadDefectiveSectorFile(DefectiveSectorHeader *, struct _RawBuffer*, char*)
|
||||
|
||||
void ReadMediumLinear(gpointer);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/***
|
||||
*** read-linear-window.c
|
||||
***/
|
||||
@@ -1272,7 +1293,7 @@ void GetReadingRange(gint64, gint64*, gint64*);
|
||||
|
||||
void ReadMediumAdaptive(gpointer);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/***
|
||||
*** read-adaptive-window.c
|
||||
***/
|
||||
@@ -1453,7 +1474,7 @@ void *PrepareIterativeSmartLEC(RawBuffer*);
|
||||
void SmartLECIteration(void*, char*);
|
||||
void EndIterativeSmartLEC(void*);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/***
|
||||
*** spiral.c
|
||||
***/
|
||||
|
||||
@@ -53,7 +53,7 @@ void register_rs01(void)
|
||||
method->finalizeCksums = RS01FinalizeCksums;
|
||||
method->expectedImageSize = RS01ExpectedImageSize;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/*** Linkage to rs01-window.c */
|
||||
|
||||
method->createCreateWindow = CreateRS01EWindow;
|
||||
@@ -80,13 +80,13 @@ void register_rs01(void)
|
||||
|
||||
static void destroy(Method *method)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS01Widgets *wl = (RS01Widgets*)method->widgetList;
|
||||
#endif
|
||||
|
||||
g_free(method->ckSumClosure);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(wl)
|
||||
{ if(wl->fixCurve) FreeCurve(wl->fixCurve);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ void register_rs02(void)
|
||||
method->finalizeCksums = RS02FinalizeCksums;
|
||||
method->expectedImageSize = RS02ExpectedImageSize;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/*** Linkage to rs02-window.c */
|
||||
|
||||
method->createCreateWindow = CreateRS02EncWindow;
|
||||
@@ -82,7 +82,7 @@ void register_rs02(void)
|
||||
|
||||
static void destroy(Method *method)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS02Widgets *wl = (RS02Widgets*)method->widgetList;
|
||||
#endif
|
||||
RS02CksumClosure *csc = (RS02CksumClosure*)method->ckSumClosure;
|
||||
@@ -91,7 +91,7 @@ static void destroy(Method *method)
|
||||
g_free(csc->lay);
|
||||
g_free(method->ckSumClosure);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(wl)
|
||||
{ if(wl->fixCurve) FreeCurve(wl->fixCurve);
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void register_rs03(void)
|
||||
method->recognizeEccFile = RS03RecognizeFile;
|
||||
method->recognizeEccImage = RS03RecognizeImage;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/*** Linkage to rs03-window.c */
|
||||
|
||||
method->createCreateWindow = CreateRS03EncWindow;
|
||||
@@ -83,7 +83,7 @@ void register_rs03(void)
|
||||
|
||||
static void destroy(Method *method)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS03Widgets *wl = (RS03Widgets*)method->widgetList;
|
||||
#endif
|
||||
RS03CksumClosure *csc = (RS03CksumClosure*)method->ckSumClosure;
|
||||
@@ -92,7 +92,7 @@ static void destroy(Method *method)
|
||||
g_free(csc->lay);
|
||||
g_free(method->ckSumClosure);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(wl)
|
||||
{ if(wl->fixCurve) FreeCurve(wl->fixCurve);
|
||||
|
||||
|
||||
12
src/endian.c
12
src/endian.c
@@ -62,7 +62,7 @@ guint64 SwapBytes64(guint64 in)
|
||||
*/
|
||||
|
||||
void print_hex(char *label, guint8 *values, int n)
|
||||
{ PrintCLI(label);
|
||||
{ PrintCLI("%s", label);
|
||||
|
||||
while(n--)
|
||||
PrintCLI("%02x ",*values++);
|
||||
@@ -84,7 +84,7 @@ void PrintEccHeader(EccHeader *eh)
|
||||
print_hex("mediumSum ", eh->mediumSum, 16);
|
||||
print_hex("eccSum ", eh->eccSum, 16);
|
||||
print_hex("sectors ", eh->sectors, 8);
|
||||
PrintCLI("sectors (native) %lld\n", uchar_to_gint64(eh->sectors));
|
||||
PrintCLI("sectors (native) %" PRId64 "\n", uchar_to_gint64(eh->sectors));
|
||||
PrintCLI("dataBytes %8x\n", eh->dataBytes);
|
||||
PrintCLI("eccBytes %8x\n", eh->eccBytes);
|
||||
PrintCLI("creatorVersion %8x\n", eh->creatorVersion);
|
||||
@@ -93,8 +93,8 @@ void PrintEccHeader(EccHeader *eh)
|
||||
PrintCLI("selfCRC %8x\n", eh->selfCRC);
|
||||
print_hex("crcSum ", eh->crcSum, 16);
|
||||
PrintCLI("inLast %8x\n", eh->inLast);
|
||||
PrintCLI("sectorsPerLayer %lld\n", eh->sectorsPerLayer);
|
||||
PrintCLI("sectorsAddedByEcc %lld\n", eh->sectorsAddedByEcc);
|
||||
PrintCLI("sectorsPerLayer %" PRId64 "\n", eh->sectorsPerLayer);
|
||||
PrintCLI("sectorsAddedByEcc %" PRId64 "\n", eh->sectorsAddedByEcc);
|
||||
|
||||
PrintCLI("\n");
|
||||
}
|
||||
@@ -114,11 +114,11 @@ void print_crc_block(CrcBlock *cb)
|
||||
PrintCLI("fpSector %8x\n", cb->fpSector);
|
||||
print_hex("mediumFP ", cb->mediumFP, 16);
|
||||
print_hex("mediumSum ", cb->mediumSum, 16);
|
||||
PrintCLI("dataSectors %ll16x\n ",cb->dataSectors);
|
||||
PrintCLI("dataSectors %16" PRIx64 "\n",cb->dataSectors);
|
||||
PrintCLI("inLast %8x\n", cb->inLast);
|
||||
PrintCLI("dataBytes %8x\n", cb->dataBytes);
|
||||
PrintCLI("eccBytes %8x\n", cb->eccBytes);
|
||||
PrintCLI("sectorsPerLayer %lld\n", cb->sectorsPerLayer);
|
||||
PrintCLI("sectorsPerLayer %" PRId64 "\n", cb->sectorsPerLayer);
|
||||
PrintCLI("selfCRC %8x\n", cb->selfCRC);
|
||||
|
||||
PrintCLI("\n");
|
||||
|
||||
@@ -707,7 +707,7 @@ void AboutTextWithLink(GtkWidget *parent, char *text, char *action)
|
||||
g_free(utf);
|
||||
}
|
||||
}
|
||||
else AboutText(parent, head);
|
||||
else AboutText(parent, "%s", head);
|
||||
|
||||
if(end_of_line) head = end_of_line+1;
|
||||
else break;
|
||||
@@ -739,13 +739,13 @@ void AboutDialog()
|
||||
text = g_strdup_printf("<span weight=\"bold\" size=\"xx-large\">dvdisaster</span><i> "
|
||||
"Version %s</i>",
|
||||
Closure->cookedVersion);
|
||||
AboutText(vbox, text);
|
||||
AboutText(vbox, "%s", text);
|
||||
g_free(text);
|
||||
|
||||
#ifdef MODIFIED_SOURCE
|
||||
AboutTextWithLink(vbox,
|
||||
_("[Modified version]\n"
|
||||
"Copyright 2019-2020 Stephane Lesimple\n"
|
||||
"Copyright 2019-2021 Stephane Lesimple\n"
|
||||
"Copyright 2005-2017 Debian Optical Media Tools Team\n"
|
||||
"Copyright 2004-2017 Carsten Gnoerlich"),
|
||||
"MODIFYING");
|
||||
|
||||
16
src/image.c
16
src/image.c
@@ -148,7 +148,7 @@ int ReportImageEccInconsistencies(Image *image)
|
||||
|
||||
if(!image || image->type == IMAGE_NONE)
|
||||
{ if(image) CloseImage(image);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ CreateMessage(_("Image file %s not present or permission denied.\n"), GTK_MESSAGE_ERROR, Closure->imageName);
|
||||
return TRUE;
|
||||
@@ -163,7 +163,7 @@ int ReportImageEccInconsistencies(Image *image)
|
||||
|
||||
if(image->eccFile && !image->eccFileMethod)
|
||||
{ CloseImage(image);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ CreateMessage(_("\nError correction file type unknown.\n"), GTK_MESSAGE_ERROR);
|
||||
return TRUE;
|
||||
@@ -178,7 +178,7 @@ int ReportImageEccInconsistencies(Image *image)
|
||||
|
||||
if(!image->eccFile && image->eccFileState == ECCFILE_NOPERM)
|
||||
{ CloseImage(image);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ CreateMessage(_("\nPermission denied on ecc file (perhaps not writeable?).\n"),
|
||||
GTK_MESSAGE_ERROR);
|
||||
@@ -195,7 +195,7 @@ int ReportImageEccInconsistencies(Image *image)
|
||||
|
||||
if(!image->eccFile && !image->eccMethod)
|
||||
{ CloseImage(image);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ CreateMessage(_("\nNo error correction file present.\n"
|
||||
"No error correction data recognized in image.\n"), GTK_MESSAGE_ERROR);
|
||||
@@ -266,12 +266,12 @@ int GetImageFingerprint(Image *image, guint8 *fp_out, guint64 sector)
|
||||
case 1: /* unreadable */
|
||||
if(fp_out)
|
||||
memset(fp_out, 0, 16);
|
||||
Verbose("GetImageFingerprint(%lld): cached unreadable\n", sector);
|
||||
Verbose("GetImageFingerprint(%" PRId64 "): cached unreadable\n", sector);
|
||||
return FALSE;
|
||||
case 2: /* already cached */
|
||||
if(fp_out)
|
||||
memcpy(fp_out, image->imageFP, 16);
|
||||
Verbose("GetImageFingerprint(%lld): cached\n", sector);
|
||||
Verbose("GetImageFingerprint(%" PRId64 "): cached\n", sector);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ int GetImageFingerprint(Image *image, guint8 *fp_out, guint64 sector)
|
||||
image->fpSector = sector;
|
||||
if(status != 1) /* read error */
|
||||
{ image->fpState = 1;
|
||||
Verbose("GetImageFingerprint(%lld): not readable\n", sector);
|
||||
Verbose("GetImageFingerprint(%" PRId64 "): not readable\n", sector);
|
||||
}
|
||||
else
|
||||
{ struct MD5Context md5ctxt;
|
||||
@@ -293,7 +293,7 @@ int GetImageFingerprint(Image *image, guint8 *fp_out, guint64 sector)
|
||||
MD5Final(image->imageFP, &md5ctxt);
|
||||
if(fp_out)
|
||||
memcpy(fp_out, image->imageFP, 16);
|
||||
Verbose("GetImageFingerprint(%lld): read & cached\n", sector);
|
||||
Verbose("GetImageFingerprint(%" PRId64 "): read & cached\n", sector);
|
||||
}
|
||||
|
||||
FreeAlignedBuffer(ab);
|
||||
|
||||
@@ -211,7 +211,7 @@ ssize_t LargeRead(LargeFile *lf, void *buf, size_t count)
|
||||
* Writing large files
|
||||
*/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
static void insert_buttons(GtkDialog *dialog)
|
||||
{
|
||||
gtk_dialog_add_buttons(dialog,
|
||||
@@ -226,7 +226,7 @@ static ssize_t xwrite(int fdes, void *buf_base, size_t count)
|
||||
|
||||
/* Simply fail when going out of space in command line mode */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
{ while(count)
|
||||
@@ -243,7 +243,7 @@ static ssize_t xwrite(int fdes, void *buf_base, size_t count)
|
||||
return total;
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/* Give the user a chance to free more space in GUI mode.
|
||||
When running out of space, the last write() may complete
|
||||
with n<count but no error condition, so we try writing
|
||||
@@ -260,7 +260,7 @@ static ssize_t xwrite(int fdes, void *buf_base, size_t count)
|
||||
answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, insert_buttons,
|
||||
_("Error while writing the file:\n\n%s\n\n"
|
||||
"You can redo this operation after freeing some space."),
|
||||
strerror(errno),n);
|
||||
strerror(errno));
|
||||
|
||||
if(!answer) return total;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "scsi-layer.h"
|
||||
#include "udf.h"
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/*
|
||||
* Local data
|
||||
*/
|
||||
@@ -85,26 +85,26 @@ static void print_tab(char *label, int tab_width)
|
||||
void PrintMediumInfo(void *mi_ptr)
|
||||
{ Image *image;
|
||||
DeviceHandle *dh;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
medium_info *mi=(medium_info*)mi_ptr;
|
||||
#endif
|
||||
char *disc_status;
|
||||
char *sess_status;
|
||||
int tab_width=30;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!mi) /* create dummy medium_info in CLI mode so that PrintCLIorLabel() won't crash */
|
||||
{ mi=alloca(sizeof(medium_info));
|
||||
memset(mi, 0, sizeof(medium_info));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
print_defaults(mi);
|
||||
#endif
|
||||
|
||||
image = OpenImageFromDevice(Closure->device);
|
||||
image = OpenImageFromDevice(Closure->device, 2 /* allow blanks, see comment in OpenImageFromDevice() */);
|
||||
if(!image) return;
|
||||
dh = image->dh;
|
||||
QueryBlankCapacity(dh);
|
||||
@@ -125,7 +125,7 @@ void PrintMediumInfo(void *mi_ptr)
|
||||
|
||||
print_tab("Medium type:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->physicalType,
|
||||
#else
|
||||
NULL,
|
||||
@@ -133,7 +133,7 @@ NULL,
|
||||
"%s\n", dh->typeDescr);
|
||||
print_tab("Book type:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->bookType,
|
||||
#else
|
||||
NULL,
|
||||
@@ -141,7 +141,7 @@ NULL,
|
||||
"%s\n", dh->bookDescr);
|
||||
print_tab("Manuf.-ID:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->manufID,
|
||||
#else
|
||||
NULL,
|
||||
@@ -149,7 +149,7 @@ NULL,
|
||||
"%s\n", dh->manuID);
|
||||
print_tab("Drive profile:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->profileDescr,
|
||||
#else
|
||||
NULL,
|
||||
@@ -172,7 +172,7 @@ NULL,
|
||||
|
||||
print_tab("Disc status:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->discStatus,
|
||||
#else
|
||||
NULL,
|
||||
@@ -184,31 +184,31 @@ NULL,
|
||||
|
||||
print_tab("Used sectors:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->usedCapacity1,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_("%lld sectors (%lld MiB), from READ CAPACITY\n"),
|
||||
_("%" PRId64 " sectors (%" PRId64 " MiB), from READ CAPACITY\n"),
|
||||
dh->readCapacity+1, (dh->readCapacity+1)>>9);
|
||||
print_tab(" ",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->usedCapacity2,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_("%lld sectors (%lld MiB), from DVD structure\n"),
|
||||
_("%" PRId64 " sectors (%" PRId64 " MiB), from DVD structure\n"),
|
||||
dh->userAreaSize, dh->userAreaSize>>9);
|
||||
|
||||
print_tab("Blank capacity:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->blankCapacity,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_("%lld sectors (%lld MiB)\n"),
|
||||
_("%" PRId64 " sectors (%" PRId64 " MiB)\n"),
|
||||
dh->blankCapacity, (dh->blankCapacity)>>9);
|
||||
|
||||
/* Filesystem properties */
|
||||
@@ -225,7 +225,7 @@ NULL,
|
||||
|
||||
print_tab("Medium label:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->isoLabel,
|
||||
#else
|
||||
NULL,
|
||||
@@ -233,16 +233,16 @@ NULL,
|
||||
"%s\n", image->isoInfo->volumeLabel);
|
||||
print_tab("File system size:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->isoSize,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_("%d sectors (%lld MiB)\n"),
|
||||
_("%d sectors (%" PRId64 " MiB)\n"),
|
||||
image->isoInfo->volumeSize, (gint64)image->isoInfo->volumeSize>>9);
|
||||
print_tab("Creation time:",tab_width);
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mi->isoTime,
|
||||
#else
|
||||
NULL,
|
||||
@@ -271,7 +271,7 @@ NULL,
|
||||
memcpy(method, eh->method, 4);
|
||||
method[4] = 0;
|
||||
print_tab("Error correction data:",tab_width);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
PrintCLIorLabel(mi->eccState, _("%s, %d roots, %4.1f%% redundancy.\n"),
|
||||
#else
|
||||
PrintCLIorLabel(NULL, _("%s, %d roots, %4.1f%% redundancy.\n"),
|
||||
@@ -279,23 +279,23 @@ NULL,
|
||||
method, eh->eccBytes,
|
||||
((double)eh->eccBytes*100.0)/(double)eh->dataBytes);
|
||||
print_tab("Augmented image size:",tab_width);
|
||||
#ifndef CLI
|
||||
PrintCLIorLabel(mi->eccSize, _("%lld sectors (%lld MiB)\n"),
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
PrintCLIorLabel(mi->eccSize, _("%" PRIu64 " sectors (%" PRId64 " MiB)\n"),
|
||||
#else
|
||||
PrintCLIorLabel(NULL, _("%lld sectors (%lld MiB)\n"),
|
||||
PrintCLIorLabel(NULL, _("%" PRId64 " sectors (%" PRId64 " MiB)\n"),
|
||||
#endif
|
||||
image->expectedSectors, image->expectedSectors>>9);
|
||||
|
||||
print_tab("dvdisaster version:", tab_width);
|
||||
|
||||
if(micro)
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
PrintCLIorLabel(mi->eccVersion, "%d.%d.%d", major, minor, micro);
|
||||
#else
|
||||
PrintCLIorLabel(NULL, "%d.%d.%d", major, minor, micro);
|
||||
#endif
|
||||
else
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
PrintCLIorLabel(mi->eccVersion, "%d.%d", major, minor);
|
||||
#else
|
||||
PrintCLIorLabel(NULL, "%d.%d", major, minor);
|
||||
@@ -310,7 +310,7 @@ NULL,
|
||||
/***
|
||||
*** GUI callbacks
|
||||
***/
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
|
||||
/*
|
||||
* Callback for drive selection
|
||||
|
||||
50
src/misc.c
50
src/misc.c
@@ -58,7 +58,7 @@ char *sgettext(char *msgid)
|
||||
|
||||
char *sgettext_utf8(char *msgid)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
static gchar ringbuf[20][1024];
|
||||
static int ringptr;
|
||||
#endif
|
||||
@@ -80,7 +80,7 @@ char *sgettext_utf8(char *msgid)
|
||||
|
||||
/*** If we are running the GUI, convert to UTF8 for Gtk+ */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ char *msg_utf8 = g_locale_to_utf8(msgval, -1, NULL, NULL, NULL);
|
||||
|
||||
@@ -148,7 +148,7 @@ void CalcSectors(guint64 size, guint64 *sectors, int *in_last)
|
||||
* Append message to the log window.
|
||||
*/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
|
||||
#define MAX_LOG_WIN_SIZE 10240
|
||||
|
||||
@@ -241,7 +241,7 @@ void PrintCLI(char *format, ...)
|
||||
va_end(argp);
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(Closure->verbose)
|
||||
{ va_start(argp, format);
|
||||
@@ -271,7 +271,7 @@ void PrintProgress(char *format, ...)
|
||||
va_list argp;
|
||||
int n;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
return;
|
||||
#endif
|
||||
@@ -338,7 +338,7 @@ void PrintLog(char *format, ...)
|
||||
|
||||
va_start(argp, format);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
log_window_vprintf(format, argp);
|
||||
else
|
||||
@@ -389,7 +389,7 @@ void PrintLogWithAsterisks(char *format, ...)
|
||||
|
||||
va_start(argp, format);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
log_window_vprintf(new_format, argp);
|
||||
else
|
||||
@@ -423,7 +423,7 @@ void Verbose(char *format, ...)
|
||||
|
||||
va_start(argp, format);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
log_window_vprintf(format, argp);
|
||||
else
|
||||
@@ -459,7 +459,7 @@ void PrintTimeToLog(GTimer *timer, char *format, ...)
|
||||
tmp2 = g_strdup_printf("%02d:%02d:%04.1f %s", hours, minutes, seconds, tmp1);
|
||||
va_end(argp);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{
|
||||
log_window_append(tmp2);
|
||||
@@ -480,7 +480,7 @@ void PrintTimeToLog(GTimer *timer, char *format, ...)
|
||||
* or show it in the given label
|
||||
*/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void PrintCLIorLabel(GtkLabel *label, char *format, ...)
|
||||
#else
|
||||
void PrintCLIorLabel(void *unused, char *format, ...)
|
||||
@@ -495,7 +495,7 @@ void PrintCLIorLabel(void *unused, char *format, ...)
|
||||
|
||||
va_start(argp, format);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ char *c,*tmp;
|
||||
|
||||
@@ -508,7 +508,7 @@ void PrintCLIorLabel(void *unused, char *format, ...)
|
||||
while(*c == '\n') /* Remove trailing newlines */
|
||||
*c-- = 0;
|
||||
|
||||
SetLabelText(label, tmp); /* converts to utf8 by itself */
|
||||
SetLabelText(label, "%s", tmp); /* converts to utf8 by itself */
|
||||
|
||||
g_free(tmp);
|
||||
}
|
||||
@@ -562,7 +562,7 @@ static void vlog_warning(char *format, va_list argp)
|
||||
prefix[len] = 0;
|
||||
|
||||
str = g_string_sized_new(256);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
g_string_append_printf(str,"* %s:%c", warn, Closure->guiMode ? '\n' : ' ');
|
||||
#else
|
||||
g_string_append_printf(str,"* %s: ", warn);
|
||||
@@ -570,7 +570,7 @@ static void vlog_warning(char *format, va_list argp)
|
||||
do
|
||||
{ c = strchr(line,'\n');
|
||||
if(c) *c=0;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode) g_string_append_printf(str,"* %s\n",line);
|
||||
else
|
||||
#endif
|
||||
@@ -584,7 +584,7 @@ static void vlog_warning(char *format, va_list argp)
|
||||
if(Closure->logFileEnabled)
|
||||
PrintLogFile("%s", str->str);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ log_window_append(str->str);
|
||||
}
|
||||
@@ -637,7 +637,7 @@ void Stop(char *format, ...)
|
||||
|
||||
/*** CLI mode */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
{ g_printf("%s", _("\n*\n* dvdisaster - can not continue:\n*\n"));
|
||||
@@ -650,7 +650,7 @@ void Stop(char *format, ...)
|
||||
|
||||
/*** GUI mode */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ char *titled,*msg,*utf_msg;
|
||||
int idx;
|
||||
@@ -710,7 +710,7 @@ void Stop(char *format, ...)
|
||||
|
||||
/* see above: possibly unreachable in GUI mode! */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
{ FreeClosure();
|
||||
@@ -782,7 +782,7 @@ void CallIdleFunc(gboolean (*idle_func)(gpointer), gpointer data)
|
||||
/***
|
||||
*** Graphical user interface convenience
|
||||
***/
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
|
||||
/*
|
||||
* Show the given widget
|
||||
@@ -1111,7 +1111,7 @@ int ModalWarning(char *msg, ...)
|
||||
vlog_warning(msg, argp);
|
||||
va_end(argp);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ va_start(argp, msg);
|
||||
result = vmodal_dialog(mt, bt, button_fn, msg, argp);
|
||||
@@ -1126,7 +1126,7 @@ int ModalWarning(char *msg, ...)
|
||||
* Set the text in the pango layout and retrieve its extents.
|
||||
*/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void SetText(PangoLayout *layout, char *text, int *w, int *h)
|
||||
{ PangoRectangle rect;
|
||||
char *t = g_locale_to_utf8(text, -1, NULL, NULL, NULL);
|
||||
@@ -1316,12 +1316,12 @@ static void insert_button(GtkDialog *dialog)
|
||||
#endif
|
||||
int ConfirmImageDeletion(char *file)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode) /* Always delete it in command line mode */
|
||||
#endif
|
||||
return TRUE;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->confirmDeletion) /* I told you so... */
|
||||
return TRUE;
|
||||
|
||||
@@ -1338,12 +1338,12 @@ int ConfirmImageDeletion(char *file)
|
||||
|
||||
int ConfirmEccDeletion(char *file)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode) /* Always delete it in command line mode */
|
||||
#endif
|
||||
return TRUE;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->confirmDeletion) /* I told you so... */
|
||||
return TRUE;
|
||||
|
||||
|
||||
@@ -1490,7 +1490,7 @@ void CreatePreferencesWindow(void)
|
||||
"- reading defective media\n"
|
||||
"- if (and only if) error correction data is available.\n\n"
|
||||
"Using the adaptive strategy without error correction data "
|
||||
"is possible but it is recommended to use linear reading in that case."), Closure->invisibleDash);
|
||||
"is possible but it is recommended to use linear reading in that case."));
|
||||
|
||||
/* Reading range */
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ static void file_select_cb(GtkWidget *widget, gpointer data)
|
||||
calculate_failures(rec);
|
||||
evaluate_vectors(rec);
|
||||
render_sector(rec);
|
||||
SetLabelText(GTK_LABEL(rec->rightLabel), _("%s loaded, LBA %lld, %d samples."),
|
||||
SetLabelText(GTK_LABEL(rec->rightLabel), _("%s loaded, LBA %" PRId64 ", %d samples."),
|
||||
rec->filepath, rec->rb->lba, rec->rb->samplesRead);
|
||||
break;
|
||||
|
||||
@@ -387,14 +387,14 @@ static void save_sector(raw_editor_context *rec)
|
||||
|
||||
if(!LargeSeek(image, (gint64)(2048*rb->lba)))
|
||||
{ LargeClose(image);
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
rb->lba, "raw-editor", strerror(errno));
|
||||
}
|
||||
|
||||
n = LargeWrite(image, rb->recovered+rb->dataOffset, 2048);
|
||||
if(n != 2048)
|
||||
{ LargeClose(image);
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
rb->lba, "raw-editor", strerror(errno));
|
||||
}
|
||||
|
||||
@@ -839,7 +839,7 @@ static void action_cb(GtkWidget *widget, gpointer data)
|
||||
|
||||
switch(action)
|
||||
{ case ACTION_BROWSE_LOAD:
|
||||
file_select_cb(NULL, ACTION_BROWSE_LOAD);
|
||||
file_select_cb(NULL, GINT_TO_POINTER(ACTION_BROWSE_LOAD));
|
||||
break;
|
||||
|
||||
case ACTION_BROWSE_SAVE:
|
||||
|
||||
@@ -195,7 +195,7 @@ int SaveDefectiveSector(RawBuffer *rb, int can_c2_scan)
|
||||
if(!LargeStat(filename, &length))
|
||||
{
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->status,
|
||||
#else
|
||||
NULL,
|
||||
@@ -272,12 +272,12 @@ int SaveDefectiveSector(RawBuffer *rb, int can_c2_scan)
|
||||
LargeClose(file);
|
||||
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->status,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_(" [Appended %d/%d sectors to cache file %s; LBA=%lld, ssize=%d, %d sectors]\n"),
|
||||
_(" [Appended %d/%d sectors to cache file %s; LBA=%" PRId64 ", ssize=%d, %d sectors]\n"),
|
||||
count, rb->samplesRead, filename, dsh->lba, dsh->sectorSize, dsh->nSectors);
|
||||
|
||||
g_free(filename);
|
||||
@@ -327,7 +327,7 @@ int TryDefectiveSectorCache(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(!status)
|
||||
{
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->status,
|
||||
#else
|
||||
NULL,
|
||||
|
||||
@@ -368,7 +368,7 @@ static void cleanup(gpointer data)
|
||||
}
|
||||
|
||||
bail_out:
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(rc->earlyTermination)
|
||||
SetAdaptiveReadFootline(_("Aborted by unrecoverable error."), Closure->redText);
|
||||
@@ -401,7 +401,7 @@ bail_out:
|
||||
|
||||
g_free(rc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -490,7 +490,7 @@ static void print_progress(read_closure *rc, int immediate)
|
||||
int total = rc->readable+rc->correctable;
|
||||
int percent = (int)((1000LL*(long long)total)/rc->expectedSectors);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
return;
|
||||
#endif
|
||||
@@ -507,12 +507,12 @@ static void print_progress(read_closure *rc, int immediate)
|
||||
|
||||
if(rc->ei)
|
||||
n = g_snprintf(rc->progressMsg, 256,
|
||||
_("Repairable: %2d.%1d%% (correctable: %lld; now reading [%lld..%lld], size %lld)"),
|
||||
_("Repairable: %2d.%1d%% (correctable: %" PRId64 "; now reading [%" PRId64 "..%" PRId64 "], size %" PRId64 ")"),
|
||||
percent/10, percent%10, rc->correctable,
|
||||
rc->intervalStart, rc->intervalStart+rc->intervalSize-1, rc->intervalSize);
|
||||
else
|
||||
n = g_snprintf(rc->progressMsg, 256,
|
||||
_("Repairable: %2d.%1d%% (missing: %lld; now reading [%lld..%lld], size %lld)"),
|
||||
_("Repairable: %2d.%1d%% (missing: %" PRId64 "; now reading [%" PRId64 "..%" PRId64 "], size %" PRId64 ")"),
|
||||
percent/10, percent%10, rc->expectedSectors-rc->readable,
|
||||
rc->intervalStart, rc->intervalStart+rc->intervalSize-1, rc->intervalSize);
|
||||
|
||||
@@ -542,7 +542,7 @@ static void print_progress(read_closure *rc, int immediate)
|
||||
static void clear_progress(read_closure *rc)
|
||||
{
|
||||
if(!rc->progressMsgLen ||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->guiMode)
|
||||
#else
|
||||
0)
|
||||
@@ -564,7 +564,7 @@ static void clear_progress(read_closure *rc)
|
||||
* Sector markup in the spiral
|
||||
*/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
static void mark_sector(read_closure *rc, gint64 sector, GdkColor *color)
|
||||
{ int segment;
|
||||
int changed = FALSE;
|
||||
@@ -626,7 +626,7 @@ static void open_and_determine_mode(read_closure *rc)
|
||||
|
||||
/* open the device */
|
||||
|
||||
rc->medium = OpenImageFromDevice(Closure->device);
|
||||
rc->medium = OpenImageFromDevice(Closure->device, 0);
|
||||
rc->dh = rc->medium->dh;
|
||||
rc->readMode = IMAGE_ONLY;
|
||||
|
||||
@@ -654,7 +654,7 @@ static void open_and_determine_mode(read_closure *rc)
|
||||
|
||||
PrintLog(_("%s-type ECC found\n"), "RS01");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadMinimumPercentage((1000*(rc->eh->dataBytes-rc->eh->eccBytes))/rc->eh->dataBytes);
|
||||
#endif
|
||||
}
|
||||
@@ -664,7 +664,7 @@ static void open_and_determine_mode(read_closure *rc)
|
||||
rc->eh = rc->medium->eccHeader;
|
||||
rc->lay = RS02LayoutFromImage(rc->medium);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadMinimumPercentage((1000*rc->lay->ndata)/255);
|
||||
#endif
|
||||
|
||||
@@ -686,10 +686,10 @@ static void open_and_determine_mode(read_closure *rc)
|
||||
sinv = RS02SectorIndex(rc->lay, slice, idx);
|
||||
|
||||
if(slice == -1)
|
||||
Verbose("Header %lld found at sector %lld\n", idx, s);
|
||||
Verbose("Header %" PRId64 " found at sector %" PRId64 "\n", idx, s);
|
||||
else
|
||||
if(s != sinv) Verbose("Failed for sector %lld / %lld:\n"
|
||||
"slice %lld, idx %lld\n",
|
||||
if(s != sinv) Verbose("Failed for sector %" PRId64 " / %" PRId64 ":\n"
|
||||
"slice %" PRId64 ", idx %" PRId64 "\n",
|
||||
s, sinv, slice, idx);
|
||||
}
|
||||
Verbose("RS02SliceIndex() verification finished.\n");
|
||||
@@ -706,7 +706,7 @@ static void open_and_determine_mode(read_closure *rc)
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadFootline(_("Aborted by user request!"), Closure->redText);
|
||||
#endif
|
||||
rc->earlyTermination = FALSE;
|
||||
@@ -761,15 +761,15 @@ static void check_size(read_closure *rc)
|
||||
int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Medium contains %lld sectors more as recorded in the .ecc file\n"
|
||||
"(Medium: %lld sectors; expected from .ecc file: %lld sectors).\n"
|
||||
"Only the first %lld medium sectors will be processed.\n"),
|
||||
_("Medium contains %" PRId64 " sectors more as recorded in the .ecc file\n"
|
||||
"(Medium: %" PRId64 " sectors; expected from .ecc file: %" PRId64 " sectors).\n"
|
||||
"Only the first %" PRId64 " medium sectors will be processed.\n"),
|
||||
rc->dh->sectors-rc->sectors, rc->dh->sectors, rc->sectors,
|
||||
rc->sectors);
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadFootline(_("Aborted by user request!"), Closure->redText);
|
||||
#endif
|
||||
rc->earlyTermination = FALSE;
|
||||
@@ -782,14 +782,13 @@ static void check_size(read_closure *rc)
|
||||
int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Medium contains %lld sectors less as recorded in the .ecc file\n"
|
||||
"(Medium: %lld sectors; expected from .ecc file: %lld sectors).\n"),
|
||||
rc->sectors-rc->dh->sectors, rc->dh->sectors, rc->sectors,
|
||||
rc->sectors);
|
||||
_("Medium contains %" PRId64 " sectors less as recorded in the .ecc file\n"
|
||||
"(Medium: %" PRId64 " sectors; expected from .ecc file: %" PRId64 " sectors).\n"),
|
||||
rc->sectors - rc->dh->sectors, rc->dh->sectors, rc->sectors);
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadFootline(_("Aborted by user request!"), Closure->redText);
|
||||
#endif
|
||||
rc->earlyTermination = FALSE;
|
||||
@@ -809,13 +808,13 @@ void GetReadingRange(gint64 sectors, gint64 *firstSector, gint64 *lastSector)
|
||||
|
||||
if(Closure->readStart || Closure->readEnd)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode) /* more range checks are made below */
|
||||
#endif
|
||||
{ first = Closure->readStart;
|
||||
last = Closure->readEnd < 0 ? sectors-1 : Closure->readEnd;
|
||||
}
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else /* be more permissive in GUI mode */
|
||||
{ first = 0;
|
||||
last = sectors-1;
|
||||
@@ -828,9 +827,9 @@ void GetReadingRange(gint64 sectors, gint64 *firstSector, gint64 *lastSector)
|
||||
#endif
|
||||
|
||||
if(first > last || first < 0 || last >= sectors)
|
||||
Stop(_("Sectors must be in range [0..%lld].\n"), sectors-1);
|
||||
Stop(_("Sectors must be in range [0..%" PRId64 "].\n"), sectors-1);
|
||||
|
||||
PrintLog(_("Limiting sector range to [%lld,%lld].\n"), first, last);
|
||||
PrintLog(_("Limiting sector range to [%" PRId64 ",%" PRId64 "].\n"), first, last);
|
||||
}
|
||||
else
|
||||
{ first = 0;
|
||||
@@ -862,7 +861,7 @@ static void check_ecc_fingerprint(read_closure *rc)
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadFootline(_("Aborted by user request!"), Closure->redText);
|
||||
#endif
|
||||
rc->earlyTermination = FALSE;
|
||||
@@ -912,11 +911,11 @@ int check_image_fingerprint(read_closure *rc)
|
||||
|
||||
if(memcmp(image_fp, medium_fp, 16))
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
Stop(_("Image file does not match the optical disc."));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ int answer = ConfirmImageDeletion(Closure->imageName);
|
||||
|
||||
@@ -950,14 +949,14 @@ void check_image_size(read_closure *rc, gint64 image_file_sectors)
|
||||
int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Image file is %lld sectors longer than inserted medium\n"
|
||||
"(Image file: %lld sectors; medium: %lld sectors).\n"),
|
||||
_("Image file is %" PRId64 " sectors longer than inserted medium\n"
|
||||
"(Image file: %" PRId64 " sectors; medium: %" PRId64 " sectors).\n"),
|
||||
image_file_sectors-rc->expectedSectors,
|
||||
image_file_sectors, rc->expectedSectors);
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadFootline(_("Aborted by user request!"), Closure->redText);
|
||||
#endif
|
||||
rc->earlyTermination = FALSE;
|
||||
@@ -977,13 +976,13 @@ static void load_crc_buf(read_closure *rc)
|
||||
{
|
||||
switch(rc->readMode)
|
||||
{ case ECC_IN_FILE:
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadSubtitle(_utf("Loading CRC data."));
|
||||
#endif
|
||||
rc->crcBuf = GetCRCFromRS01_obsolete(rc->ei);
|
||||
break;
|
||||
case ECC_IN_IMAGE:
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SetAdaptiveReadSubtitle(_utf("Loading CRC data."));
|
||||
#endif
|
||||
rc->crcBuf = GetCRCFromRS02_obsolete(rc->lay, rc->dh, rc->image);
|
||||
@@ -1016,7 +1015,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
Check them for "dead sector markers"
|
||||
and for checksum failures if ecc data is present. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadSubtitle(_("Analysing existing image file"));
|
||||
#endif
|
||||
@@ -1026,7 +1025,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
|
||||
/* Check for user interruption. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ SetAdaptiveReadFootline(_("Aborted by user request!"), Closure->redText);
|
||||
rc->earlyTermination = FALSE;
|
||||
@@ -1046,7 +1045,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
|
||||
if(current_missing)
|
||||
{ int fixme=0;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, s, Closure->redSector);
|
||||
#endif
|
||||
ExplainMissingSector(rc->buf, s, current_missing, SOURCE_IMAGE, &fixme);
|
||||
@@ -1068,7 +1067,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
make it missing due to the CRC failure. */
|
||||
if(!current_missing)
|
||||
{ current_missing = 1;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, s, Closure->yellowSector);
|
||||
#endif
|
||||
}
|
||||
@@ -1085,7 +1084,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
if(rc->map)
|
||||
SetBit(rc->map, s);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, s, Closure->greenSector);
|
||||
#endif
|
||||
|
||||
@@ -1122,7 +1121,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
percent = (100*s)/(rc->highestWrittenSector+1);
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintProgress(_("Analysing existing image file: %2d%%"),percent);
|
||||
@@ -1152,7 +1151,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
/*** Now that all readable sectors are known,
|
||||
determine those which can already be corrected. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadSubtitle(_("Determining correctable sectors"));
|
||||
#endif
|
||||
@@ -1187,7 +1186,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
#ifdef CHECK_VISITED
|
||||
rc->count[layer_idx]++;
|
||||
#endif
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, layer_idx, Closure->greenSector);
|
||||
#endif
|
||||
}
|
||||
@@ -1222,7 +1221,7 @@ static void build_interval_from_image(read_closure *rc)
|
||||
&& !GetBit(rc->map, sector))
|
||||
{ SetBit(rc->map, sector);
|
||||
rc->correctable++;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, sector, Closure->greenSector);
|
||||
#endif
|
||||
}
|
||||
@@ -1234,12 +1233,12 @@ static void build_interval_from_image(read_closure *rc)
|
||||
/*** Tell user results of image file analysis */
|
||||
|
||||
if(rc->readMode == ECC_IN_FILE || rc->readMode == ECC_IN_IMAGE)
|
||||
PrintLog(_("Analysing existing image file: %lld readable, %lld correctable, %lld still missing.\n"),
|
||||
PrintLog(_("Analysing existing image file: %" PRId64 " readable, %" PRId64 " correctable, %" PRId64 " still missing.\n"),
|
||||
rc->readable, rc->correctable, rc->expectedSectors-rc->readable-rc->correctable);
|
||||
else PrintLog(_("Analysing existing image file: %lld readable, %lld still missing.\n"),
|
||||
else PrintLog(_("Analysing existing image file: %" PRId64 " readable, %" PRId64 " still missing.\n"),
|
||||
rc->readable, rc->expectedSectors-rc->readable-rc->correctable);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
UpdateAdaptiveResults(rc->readable, rc->correctable,
|
||||
rc->expectedSectors-rc->readable-rc->correctable,
|
||||
@@ -1268,14 +1267,14 @@ static void mark_rs02_headers(read_closure *rc)
|
||||
while(hpos < end)
|
||||
{ if(!GetBit(rc->map, hpos))
|
||||
{ SetBit(rc->map, hpos);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, hpos, Closure->greenSector);
|
||||
#endif
|
||||
rc->correctable++;
|
||||
}
|
||||
if(!GetBit(rc->map, hpos+1))
|
||||
{ SetBit(rc->map, hpos+1);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, hpos+1, Closure->greenSector);
|
||||
#endif
|
||||
rc->correctable++;
|
||||
@@ -1289,7 +1288,7 @@ static void mark_rs02_headers(read_closure *rc)
|
||||
*** Main routine for adaptive reading
|
||||
***/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
static void insert_buttons(GtkDialog *dialog)
|
||||
{
|
||||
gtk_dialog_add_buttons(dialog,
|
||||
@@ -1331,22 +1330,22 @@ void fill_gap(read_closure *rc)
|
||||
|
||||
/*** Tell user what's going on */
|
||||
|
||||
t = g_strdup_printf(_("Filling image area [%lld..%lld]"),
|
||||
t = g_strdup_printf(_("Filling image area [%" PRId64 "..%" PRId64 "]"),
|
||||
firstUnwritten, rc->intervalStart-1);
|
||||
clear_progress(rc);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetAdaptiveReadSubtitle(t);
|
||||
ChangeSpiralCursor(Closure->readAdaptiveSpiral, -1);
|
||||
}
|
||||
#endif
|
||||
PrintCLI(t);
|
||||
PrintCLI("%s", t);
|
||||
g_free(t);
|
||||
|
||||
/*** Seek to end of image */
|
||||
|
||||
if(!LargeSeek(rc->image, (gint64)(2048*firstUnwritten)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
firstUnwritten, "fill", strerror(errno));
|
||||
|
||||
/*** Fill image with dead sector markers until rc->intervalStart */
|
||||
@@ -1360,12 +1359,12 @@ void fill_gap(read_closure *rc)
|
||||
CreateMissingSector(buf, i, rc->fingerprint, FINGERPRINT_SECTOR, rc->volumeLabel);
|
||||
n = LargeWrite(rc->image, buf, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
i, "fill", strerror(errno));
|
||||
|
||||
/* Check whether user hit the Stop button */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{
|
||||
if(Closure->guiMode)
|
||||
@@ -1381,7 +1380,7 @@ void fill_gap(read_closure *rc)
|
||||
if(j++ % 2000)
|
||||
{ int seq = (j/2000)%10;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
{ g_printf("%s", anim[seq]);
|
||||
@@ -1391,7 +1390,7 @@ void fill_gap(read_closure *rc)
|
||||
|
||||
/* Show progress in the spiral */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ int segment = i / rc->sectorsPerSegment;
|
||||
|
||||
@@ -1404,7 +1403,7 @@ void fill_gap(read_closure *rc)
|
||||
PrintCLI(" \n");
|
||||
rc->highestWrittenSector = rc->intervalStart-1;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode) /* remove temporary fill markers */
|
||||
{ RemoveFillMarkers();
|
||||
SetAdaptiveReadSubtitle(rc->subtitle);
|
||||
@@ -1426,13 +1425,13 @@ void fill_correctable_gap(read_closure *rc, gint64 correctable)
|
||||
unsigned char buf[2048];
|
||||
|
||||
if(!LargeSeek(rc->image, (gint64)(2048*ds)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
ds, "skip-corr", strerror(errno));
|
||||
|
||||
for(ds=rc->highestWrittenSector+1; ds<=correctable; ds++)
|
||||
{ CreateMissingSector(buf, ds, rc->fingerprint, FINGERPRINT_SECTOR, rc->volumeLabel);
|
||||
if(LargeWrite(rc->image, buf, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
ds, "skip-corr", strerror(errno));
|
||||
}
|
||||
rc->highestWrittenSector = correctable;
|
||||
@@ -1464,7 +1463,7 @@ void ReadMediumAdaptive(gpointer data)
|
||||
rc->earlyTermination = TRUE;
|
||||
|
||||
RegisterCleanup(_("Reading aborted"), cleanup, rc);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readAdaptiveHeadline), "<big>%s</big>\n<i>%s</i>",
|
||||
_("Preparing for reading the medium image."),
|
||||
@@ -1529,7 +1528,7 @@ void ReadMediumAdaptive(gpointer data)
|
||||
|
||||
/*** Initialize segment state counters (only in GUI mode) */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ //rc->sectorsPerSegment = 1 + (rc->sectors / ADAPTIVE_READ_SPIRAL_SIZE);
|
||||
rc->sectorsPerSegment = ((rc->expectedSectors+ADAPTIVE_READ_SPIRAL_SIZE-1) / ADAPTIVE_READ_SPIRAL_SIZE);
|
||||
@@ -1553,7 +1552,7 @@ reopen_image:
|
||||
Stop(_("Can't open %s:\n%s"),Closure->imageName,strerror(errno));
|
||||
|
||||
PrintLog(_("Creating new %s image.\n"),Closure->imageName);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readAdaptiveHeadline),
|
||||
"<big>%s</big>\n<i>%s</i>",
|
||||
@@ -1575,7 +1574,7 @@ reopen_image:
|
||||
else
|
||||
{ int reopen;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readAdaptiveHeadline),
|
||||
"<big>%s</big>\n<i>%s</i>",
|
||||
@@ -1616,8 +1615,8 @@ reopen_image:
|
||||
{ char *t = _("\nSufficient data for reconstructing the image is available.\n");
|
||||
|
||||
if(rc->readMode != IMAGE_ONLY)
|
||||
{ PrintLog(t);
|
||||
#ifndef CLI
|
||||
{ PrintLog("%s", t);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadFootline(t, Closure->greenText);
|
||||
#endif
|
||||
@@ -1638,7 +1637,7 @@ reopen_image:
|
||||
|
||||
/*** Read the medium image. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadSubtitle(rc->subtitle);
|
||||
#endif
|
||||
@@ -1646,7 +1645,7 @@ reopen_image:
|
||||
for(;;)
|
||||
{ int cluster_mask = rc->dh->clusterSize-1;
|
||||
|
||||
Verbose("... Processing Interval [%lld..%lld], size %d\n",
|
||||
Verbose("... Processing Interval [%" PRId64 "..%" PRId64 "], size %" PRId64 "\n",
|
||||
rc->intervalStart, rc->intervalStart+rc->intervalSize-1, rc->intervalSize);
|
||||
|
||||
/* If we jumped beyond the highest writtensector,
|
||||
@@ -1666,7 +1665,7 @@ reopen_image:
|
||||
for(s=rc->intervalStart; s<=rc->intervalEnd; ) /* s is incremented elsewhere */
|
||||
{ int nsectors,cnt;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* somebody hit the Stop button */
|
||||
{ if(Closure->guiMode)
|
||||
SetAdaptiveReadFootline(_("Aborted by user request!"), Closure->redText);
|
||||
@@ -1724,18 +1723,18 @@ reread:
|
||||
&& rc->dh->sense.sense_key
|
||||
&& rc->dh->sense.sense_key != 3 && rc->dh->sense.sense_key != 5)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int answer;
|
||||
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
Stop(_("Sector %lld: %s\nCan not recover from above error.\n"
|
||||
Stop(_("Sector %" PRId64 ": %s\nCan not recover from above error.\n"
|
||||
"Use the --ignore-fatal-sense option to override."),
|
||||
s, GetLastSenseString(FALSE));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, insert_buttons,
|
||||
_("Sector %lld: %s\n\n"
|
||||
_("Sector %" PRId64 ": %s\n\n"
|
||||
"It may not be possible to recover from this error.\n"
|
||||
"Should the reading continue and ignore this error?"),
|
||||
s, GetLastSenseString(FALSE));
|
||||
@@ -1768,7 +1767,7 @@ reread:
|
||||
{ gint64 b;
|
||||
|
||||
if(!LargeSeek(rc->image, (gint64)(2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
s,"store",strerror(errno));
|
||||
|
||||
/* Store sector(s) in the image file if they pass the CRC test,
|
||||
@@ -1791,7 +1790,7 @@ reread:
|
||||
{ //unsigned char buf[2048];
|
||||
|
||||
PrintCLI("\n");
|
||||
PrintCLI(_("CRC error in sector %lld\n"),b);
|
||||
PrintCLI(_("CRC error in sector %" PRId64 "\n"),b);
|
||||
print_progress(rc, TRUE);
|
||||
|
||||
#if 0 // remark: Do we still need to mark CRC defects as completely missing?
|
||||
@@ -1800,10 +1799,10 @@ reread:
|
||||
#endif
|
||||
n = LargeWrite(rc->image, rc->buf+i*2048, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
b, "unv", strerror(errno));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, b, Closure->yellowSector);
|
||||
#endif
|
||||
|
||||
@@ -1815,14 +1814,14 @@ reread:
|
||||
case CRC_GOOD:
|
||||
n = LargeWrite(rc->image, rc->buf+i*2048, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
b, "store", strerror(errno));
|
||||
|
||||
if(rc->map)
|
||||
SetBit(rc->map, b);
|
||||
rc->readable++;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, b, Closure->greenSector);
|
||||
#endif
|
||||
|
||||
@@ -1877,7 +1876,7 @@ reread:
|
||||
&& !GetBit(rc->map, layer_idx))
|
||||
{ SetBit(rc->map, layer_idx);
|
||||
rc->correctable++;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, layer_idx, Closure->greenSector);
|
||||
#endif
|
||||
|
||||
@@ -1922,7 +1921,7 @@ reread:
|
||||
&& !GetBit(rc->map, sector))
|
||||
{ SetBit(rc->map, sector);
|
||||
rc->correctable++;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, sector, Closure->greenSector);
|
||||
#endif
|
||||
fill_correctable_gap(rc, sector);
|
||||
@@ -1948,8 +1947,8 @@ reread:
|
||||
|
||||
print_progress(rc, TRUE);
|
||||
if(rc->readMode != IMAGE_ONLY)
|
||||
{ PrintLog(t);
|
||||
#ifndef CLI
|
||||
{ PrintLog("%s", t);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && rc->ei)
|
||||
SetAdaptiveReadFootline(t, Closure->foreground);
|
||||
#endif
|
||||
@@ -1965,20 +1964,20 @@ reread:
|
||||
|
||||
PrintCLI("\n");
|
||||
if(nsectors>1) PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->status,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_("Sectors %lld-%lld: %s\n"),
|
||||
_("Sectors %" PRId64 "-%" PRId64 ": %s\n"),
|
||||
s, s+nsectors-1, GetLastSenseString(FALSE));
|
||||
else PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->status,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_("Sector %lld: %s\n"),
|
||||
_("Sector %" PRId64 ": %s\n"),
|
||||
s, GetLastSenseString(FALSE));
|
||||
|
||||
rc->unreadable += nsectors;
|
||||
@@ -1986,7 +1985,7 @@ NULL,
|
||||
/* Write nsectors of "dead sector" markers */
|
||||
|
||||
if(!LargeSeek(rc->image, (gint64)(2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
s, "nds", strerror(errno));
|
||||
|
||||
for(i=0; i<nsectors; i++)
|
||||
@@ -1994,10 +1993,10 @@ NULL,
|
||||
|
||||
n = LargeWrite(rc->image, buf, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
s, "nds", strerror(errno));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
mark_sector(rc, s+i, Closure->redSector);
|
||||
#endif
|
||||
}
|
||||
@@ -2009,13 +2008,13 @@ NULL,
|
||||
Store the remainder of the current interval in the queue. */
|
||||
|
||||
if(s+nsectors-1 >= rc->intervalEnd) /* This was the last sector; interval used up */
|
||||
{ Verbose("... Interval [%lld..%lld] used up\n", rc->intervalStart, rc->intervalEnd);
|
||||
{ Verbose("... Interval [%" PRId64 "..%" PRId64 "] used up\n", rc->intervalStart, rc->intervalEnd);
|
||||
}
|
||||
else /* Insert remainder of interval into queue */
|
||||
{ rc->intervalStart = s+nsectors;
|
||||
rc->intervalSize = rc->intervalEnd-rc->intervalStart+1;
|
||||
|
||||
Verbose("... Interval %lld [%lld..%lld] added\n",
|
||||
Verbose("... Interval %" PRId64 " [%" PRId64 "..%" PRId64 "] added\n",
|
||||
rc->intervalSize, rc->intervalStart, rc->intervalStart+rc->intervalSize-1);
|
||||
|
||||
add_interval(rc, rc->intervalStart, rc->intervalSize);
|
||||
@@ -2051,7 +2050,7 @@ NULL,
|
||||
/* Split the new interval */
|
||||
|
||||
if(rc->intervalSize>1)
|
||||
{ Verbose("*** Splitting [%lld..%lld]\n",
|
||||
{ Verbose("*** Splitting [%" PRId64 "..%" PRId64 "]\n",
|
||||
rc->intervalStart,rc->intervalStart+rc->intervalSize-1);
|
||||
|
||||
add_interval(rc, rc->intervalStart, rc->intervalSize/2);
|
||||
@@ -2061,7 +2060,7 @@ NULL,
|
||||
else /* 1 sector intervals can't be split further */
|
||||
{
|
||||
rc->intervalEnd = rc->intervalStart;
|
||||
Verbose("*** Popped [%lld]\n",rc->intervalStart);
|
||||
Verbose("*** Popped [%" PRId64 "]\n",rc->intervalStart);
|
||||
}
|
||||
|
||||
//print_intervals(rc);
|
||||
@@ -2094,7 +2093,7 @@ finished:
|
||||
|
||||
/* Force output of final results */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ ChangeSpiralCursor(Closure->readAdaptiveSpiral, -1);
|
||||
mark_sector(rc, 0, NULL);
|
||||
@@ -2113,9 +2112,9 @@ finished:
|
||||
percent/10, percent%10);
|
||||
|
||||
PrintLog(_("\n%s\n"
|
||||
"(%lld readable, %lld correctable, %lld still missing).\n"),
|
||||
"(%" PRId64 " readable, %" PRId64 " correctable, %" PRId64 " still missing).\n"),
|
||||
t, rc->readable, rc->correctable, rc->expectedSectors-total);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadFootline(t, Closure->foreground);
|
||||
#endif
|
||||
@@ -2129,8 +2128,8 @@ finished:
|
||||
if(rc->readMode == IMAGE_ONLY)
|
||||
{ if(rc->readable == rc->expectedSectors)
|
||||
{ char *t = _("\nGood! All sectors have been read.\n");
|
||||
PrintLog(t);
|
||||
#ifndef CLI
|
||||
PrintLog("%s", t);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadFootline(t, Closure->foreground);
|
||||
#endif
|
||||
@@ -2143,10 +2142,10 @@ finished:
|
||||
Closure->sectorSkip);
|
||||
|
||||
PrintLog(_("\n%s\n"
|
||||
"%2d.%1d%% of the image have been read (%lld sectors).\n"),
|
||||
"%2d.%1d%% of the image have been read (%" PRId64 " sectors).\n"),
|
||||
t, percent/10, percent%10, rc->readable);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadFootline(t, Closure->foreground);
|
||||
#endif
|
||||
@@ -2167,7 +2166,7 @@ finished:
|
||||
|
||||
rc->earlyTermination = FALSE;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
terminate:
|
||||
#endif
|
||||
cleanup((gpointer)rc);
|
||||
|
||||
@@ -101,7 +101,7 @@ static gboolean curve_idle_func(gpointer data)
|
||||
gtk_label_set_text(GTK_LABEL(Closure->readLinearSpeed), utf);
|
||||
g_free(utf);
|
||||
|
||||
g_snprintf(buf, 80, _("Unreadable / skipped sectors: %lld"), Closure->readErrors);
|
||||
g_snprintf(buf, 80, _("Unreadable / skipped sectors: %" PRId64 ""), Closure->readErrors);
|
||||
|
||||
utf = g_locale_to_utf8(buf, -1, NULL, NULL, NULL);
|
||||
gtk_label_set_text(GTK_LABEL(Closure->readLinearErrors), utf);
|
||||
|
||||
@@ -57,7 +57,7 @@ static void send_eof(read_closure *rc)
|
||||
|
||||
static void cleanup(gpointer data)
|
||||
{ read_closure *rc = (read_closure*)data;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int full_read = FALSE;
|
||||
int aborted = rc->earlyTermination;
|
||||
int scan_mode = rc->scanMode;
|
||||
@@ -73,7 +73,7 @@ static void cleanup(gpointer data)
|
||||
in that case. */
|
||||
|
||||
while(renderers_left
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
&& Closure->stopActions != STOP_SHUTDOWN_ALL
|
||||
#endif
|
||||
)
|
||||
@@ -112,18 +112,18 @@ static void cleanup(gpointer data)
|
||||
|
||||
/* Clean up reader thread */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(rc->image)
|
||||
full_read = (rc->readOK == rc->image->dh->sectors && !Closure->crcErrors);
|
||||
#endif
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(rc->unreportedError)
|
||||
SwitchAndSetFootline(Closure->readLinearNotebook, 1, Closure->readLinearFootline,
|
||||
_("<span %s>Aborted by unrecoverable error.</span> %lld sectors read, %lld sectors unreadable/skipped so far."),
|
||||
_("<span %s>Aborted by unrecoverable error.</span> %" PRId64 " sectors read, %" PRId64 " sectors unreadable/skipped so far."),
|
||||
Closure->redMarkup, rc->readOK, Closure->readErrors);
|
||||
}
|
||||
#endif
|
||||
@@ -167,13 +167,13 @@ static void cleanup(gpointer data)
|
||||
}
|
||||
|
||||
/* trigger failure if some threads are still accessing this */
|
||||
memset(rc, sizeof(read_closure), 0xff);
|
||||
memset(rc, 0xff, sizeof(read_closure));
|
||||
g_free(rc);
|
||||
|
||||
/* Continue with ecc file creation after read.
|
||||
NOTE: Images are NOT automatically augmented after a read. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->readAndCreate && Closure->guiMode && !scan_mode && !aborted) /* General prerequisites */
|
||||
{ if( !strncmp(Closure->methodName, "RS01", 4) /* codec prerequisites */
|
||||
|| (!strncmp(Closure->methodName, "RS03", 4) && Closure->eccTarget == ECC_FILE) )
|
||||
@@ -211,7 +211,7 @@ static void register_reader(read_closure *rc)
|
||||
{
|
||||
if(rc->scanMode) /* Output messages differ in read and scan mode */
|
||||
{ RegisterCleanup(_("Scanning aborted"), cleanup, rc);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readLinearHeadline),
|
||||
"<big>%s</big>\n<i>%s</i>",
|
||||
@@ -221,7 +221,7 @@ static void register_reader(read_closure *rc)
|
||||
}
|
||||
else
|
||||
{ RegisterCleanup(_("Reading aborted"), cleanup, rc);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readLinearHeadline),
|
||||
"<big>%s</big>\n<i>%s</i>",
|
||||
@@ -252,7 +252,7 @@ static void determine_mode(read_closure *rc)
|
||||
rc->msg = g_strdup(_("Scanning medium for read errors."));
|
||||
|
||||
PrintLog("%s\n", rc->msg);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(rc->eccMethod)
|
||||
SetLabelText(GTK_LABEL(Closure->readLinearHeadline),
|
||||
@@ -267,7 +267,7 @@ static void determine_mode(read_closure *rc)
|
||||
|
||||
rc->readMarker = 0;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
InitializeCurve(rc, rc->image->dh->maxRate, rc->image->dh->canC2Scan);
|
||||
#endif
|
||||
@@ -277,7 +277,7 @@ static void determine_mode(read_closure *rc)
|
||||
|
||||
/*** If no image file exists, open a new one. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
reopen_image:
|
||||
#endif
|
||||
if(!LargeStat(Closure->imageName, &image_size))
|
||||
@@ -291,7 +291,7 @@ reopen_image:
|
||||
Stop(_("Can't open %s:\n%s"),Closure->imageName,strerror(errno));
|
||||
|
||||
PrintLog(_("Creating new %s image.\n"),Closure->imageName);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(rc->eccMethod)
|
||||
SetLabelText(GTK_LABEL(Closure->readLinearHeadline),
|
||||
@@ -305,7 +305,7 @@ reopen_image:
|
||||
rc->rereading = FALSE;
|
||||
rc->readMarker = 0;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
InitializeCurve(rc, rc->image->dh->maxRate, rc->image->dh->canC2Scan);
|
||||
#endif
|
||||
@@ -354,11 +354,11 @@ reopen_image:
|
||||
|
||||
if(!unknown_fingerprint && memcmp(image_fp, medium_fp, 16))
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
Stop(_("Image file does not match the optical disc."));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ int answer = ConfirmImageDeletion(Closure->imageName);
|
||||
|
||||
@@ -385,21 +385,21 @@ reopen_image:
|
||||
|
||||
if(!Closure->readStart && !Closure->readEnd
|
||||
&& rc->readMarker < rc->image->dh->sectors-1 && Closure->readingPasses <= 1)
|
||||
{ PrintLog(_("Completing image %s. Continuing with sector %lld.\n"),
|
||||
{ PrintLog(_("Completing image %s. Continuing with sector %" PRId64 ".\n"),
|
||||
Closure->imageName, rc->readMarker);
|
||||
rc->firstSector = rc->readMarker;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->additionalSpiralColor = 0; /* blue */
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("Completing image %s. Only missing sectors will be read.\n"), Closure->imageName);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->additionalSpiralColor = 3; /* dark green*/
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readLinearHeadline),
|
||||
"<big>%s</big>\n<i>%s</i>",rc->msg,rc->image->dh->mediumDescr);
|
||||
@@ -423,7 +423,7 @@ static void fill_gap(read_closure *rc)
|
||||
s = rc->readMarker;
|
||||
|
||||
if(!LargeSeek(rc->writerImage, (gint64)(2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
s, "fill", strerror(errno));
|
||||
|
||||
while(s < rc->firstSector)
|
||||
@@ -432,7 +432,7 @@ static void fill_gap(read_closure *rc)
|
||||
CreateMissingSector(buf, s, rc->image->imageFP, FINGERPRINT_SECTOR, rc->volumeLabel);
|
||||
n = LargeWrite(rc->writerImage, buf, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
s, "fill", strerror(errno));
|
||||
s++;
|
||||
}
|
||||
@@ -463,7 +463,7 @@ static void prepare_crc_cache(read_closure *rc)
|
||||
|
||||
// FIXME: reuse CrcBuf and write respective message
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readLinearHeadline),
|
||||
"<big>%s</big>\n<i>%s</i>",
|
||||
@@ -474,7 +474,7 @@ static void prepare_crc_cache(read_closure *rc)
|
||||
if(rc->eccMethod->getCrcBuf)
|
||||
{ Closure->crcBuf = rc->eccMethod->getCrcBuf(rc->image);
|
||||
Closure->crcBuf->crcCached = TRUE;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
RedrawReadLinearWindow();
|
||||
#endif
|
||||
@@ -493,7 +493,7 @@ static void prepare_crc_cache(read_closure *rc)
|
||||
rc->eccMethod->resetCksums(rc->image);
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readLinearHeadline),
|
||||
"<big>%s</big>\n<i>%s</i>", rc->msg, rc->image->dh->mediumDescr);
|
||||
@@ -516,7 +516,7 @@ static void prepare_crc_cache(read_closure *rc)
|
||||
|
||||
static void prepare_timer(read_closure *rc)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && Closure->spinupDelay)
|
||||
SwitchAndSetFootline(Closure->readLinearNotebook, 1, Closure->readLinearFootline,
|
||||
_("Waiting %d seconds for drive to spin up...\n"), Closure->spinupDelay);
|
||||
@@ -524,7 +524,7 @@ static void prepare_timer(read_closure *rc)
|
||||
|
||||
SpinupDevice(rc->image->dh);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && Closure->spinupDelay)
|
||||
SwitchAndSetFootline(Closure->readLinearNotebook, 0, Closure->readLinearFootline, "ignore");
|
||||
#endif
|
||||
@@ -542,10 +542,10 @@ static void prepare_timer(read_closure *rc)
|
||||
static void show_progress(read_closure *rc)
|
||||
{ int percent;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && rc->lastErrorsPrinted != Closure->readErrors)
|
||||
{ SetLabelText(GTK_LABEL(Closure->readLinearErrors),
|
||||
_("Unreadable / skipped sectors: %lld"), Closure->readErrors);
|
||||
_("Unreadable / skipped sectors: %" PRId64 ""), Closure->readErrors);
|
||||
rc->lastErrorsPrinted = Closure->readErrors;
|
||||
}
|
||||
#endif
|
||||
@@ -555,7 +555,7 @@ static void show_progress(read_closure *rc)
|
||||
|
||||
if(rc->lastPercent != percent)
|
||||
{ gulong ignore;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int color;
|
||||
|
||||
if(Closure->guiMode)
|
||||
@@ -564,7 +564,7 @@ static void show_progress(read_closure *rc)
|
||||
|
||||
if(rc->readOK <= rc->lastReadOK) /* nothing read since last sample? */
|
||||
{ rc->speed = 0.0;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->readErrors - rc->previousReadErrors > 0)
|
||||
color = 2;
|
||||
else if(Closure->crcErrors - rc->previousCRCErrors > 0)
|
||||
@@ -585,7 +585,7 @@ static void show_progress(read_closure *rc)
|
||||
double elapsed = g_timer_elapsed(rc->speedTimer, &ignore);
|
||||
double kb_sec = kb_read / elapsed;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->readErrors - rc->previousReadErrors > 0)
|
||||
color = 2;
|
||||
else if(Closure->crcErrors - rc->previousCRCErrors > 0)
|
||||
@@ -596,7 +596,7 @@ static void show_progress(read_closure *rc)
|
||||
if(rc->firstSpeedValue)
|
||||
{ rc->speed = kb_sec / rc->image->dh->singleRate;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ AddCurveValues(rc, rc->lastPercent, color, rc->maxC2);
|
||||
AddCurveValues(rc, percent, color, rc->maxC2);
|
||||
@@ -624,7 +624,7 @@ static void show_progress(read_closure *rc)
|
||||
cut_peaks=3;
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
AddCurveValues(rc, percent, color, rc->maxC2);
|
||||
#endif
|
||||
@@ -636,10 +636,10 @@ static void show_progress(read_closure *rc)
|
||||
|
||||
if(sp >= Closure->speedWarning)
|
||||
{ if(delta > 0.0)
|
||||
PrintCLI(_("Sector %lld: Speed increased to %4.1fx\n"),
|
||||
PrintCLI(_("Sector %" PRId64 ": Speed increased to %4.1fx\n"),
|
||||
rc->readPos, fabs(rc->speed));
|
||||
else
|
||||
PrintCLI(_("Sector %lld: Speed dropped to %4.1fx\n"),
|
||||
PrintCLI(_("Sector %" PRId64 ": Speed dropped to %4.1fx\n"),
|
||||
rc->readPos, fabs(rc->speed));
|
||||
}
|
||||
}
|
||||
@@ -700,14 +700,14 @@ static gpointer worker_thread(read_closure *rc)
|
||||
{ int n;
|
||||
|
||||
if(!LargeSeek(rc->writerImage, (gint64)(2048*s)))
|
||||
{ rc->workerError = g_strdup_printf(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
{ rc->workerError = g_strdup_printf(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
s, "store", strerror(errno));
|
||||
goto update_mutex;
|
||||
}
|
||||
|
||||
n = LargeWrite(rc->writerImage, rc->alignedBuf[rc->writePtr]->buf, 2048*nsectors);
|
||||
if(n != 2048*nsectors)
|
||||
{ rc->workerError = g_strdup_printf(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
{ rc->workerError = g_strdup_printf(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
s, "store", strerror(errno));
|
||||
goto update_mutex;
|
||||
}
|
||||
@@ -777,7 +777,7 @@ update_mutex:
|
||||
*** The reader part
|
||||
***/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
static void insert_buttons(GtkDialog *dialog)
|
||||
{
|
||||
gtk_dialog_add_buttons(dialog,
|
||||
@@ -832,7 +832,7 @@ void ReadMediumLinear(gpointer data)
|
||||
and possibly the respective ecc file.
|
||||
The on disk image is maintained in rc->reader|writerImage. */
|
||||
|
||||
rc->image = OpenImageFromDevice(Closure->device);
|
||||
rc->image = OpenImageFromDevice(Closure->device, 0);
|
||||
Closure->readErrors = Closure->crcErrors = rc->readOK = 0;
|
||||
|
||||
/*** Save some useful information for the missing sector marker */
|
||||
@@ -888,9 +888,9 @@ void ReadMediumLinear(gpointer data)
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SwitchAndSetFootline(Closure->readLinearNotebook, 1, Closure->readLinearFootline,
|
||||
_("<span %s>Aborted by user request!</span>"),
|
||||
_("<span %s>Aborted by user request!</span> %" PRId64 " sectors read, %" PRId64 " sectors unreadable/skipped so far."),
|
||||
Closure->redMarkup, rc->readOK,Closure->readErrors);
|
||||
#endif
|
||||
rc->unreportedError = FALSE; /* suppress respective error message */
|
||||
@@ -901,7 +901,7 @@ void ReadMediumLinear(gpointer data)
|
||||
/*** See if user wants to limit the read range. */
|
||||
|
||||
GetReadingRange(rc->image->dh->sectors, &rc->firstSector, &rc->lastSector);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(rc->firstSector > 0) /* Mark skipped sectors */
|
||||
Closure->additionalSpiralColor = 0; /* blue */
|
||||
#endif
|
||||
@@ -969,7 +969,7 @@ next_reading_pass:
|
||||
break;
|
||||
}
|
||||
Closure->sectorSkip = 0;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
MarkExistingSectors();
|
||||
#endif
|
||||
@@ -989,12 +989,12 @@ next_reading_pass:
|
||||
while(rc->readPos<=rc->lastSector)
|
||||
{ int cluster_mask = rc->image->dh->clusterSize-1;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* somebody hit the Stop button */
|
||||
{
|
||||
if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
{ SwitchAndSetFootline(Closure->readLinearNotebook, 1, Closure->readLinearFootline,
|
||||
_("<span %s>Aborted by user request!</span> %lld sectors read, %lld sectors unreadable/skipped so far."),
|
||||
_("<span %s>Aborted by user request!</span> %" PRId64 " sectors read, %" PRId64 " sectors unreadable/skipped so far."),
|
||||
Closure->redMarkup, rc->readOK,Closure->readErrors);
|
||||
}
|
||||
rc->unreportedError = FALSE; /* suppress respective error message */
|
||||
@@ -1040,7 +1040,7 @@ reread:
|
||||
|
||||
else
|
||||
{ if(!LargeSeek(rc->readerImage, (gint64)(2048*rc->readPos)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
rc->readPos, "reread", strerror(errno));
|
||||
|
||||
if(rc->readPos+nsectors > rc->readMarker)
|
||||
@@ -1052,7 +1052,7 @@ reread:
|
||||
|
||||
n = LargeRead(rc->readerImage, sector_buf, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("unexpected read error in image for sector %lld"),rc->readPos);
|
||||
Stop(_("unexpected read error in image for sector %" PRId64 ""),rc->readPos);
|
||||
err = CheckForMissingSector(sector_buf, rc->readPos+i,
|
||||
rc->image->fpState == 2 ? rc->image->imageFP : NULL,
|
||||
rc->image->fpSector);
|
||||
@@ -1087,7 +1087,7 @@ reread:
|
||||
g_mutex_lock(rc->mutex);
|
||||
if(rc->workerError) /* something went wrong in the worker thread */
|
||||
{ g_mutex_unlock(rc->mutex);
|
||||
Stop(rc->workerError);
|
||||
Stop("%s", rc->workerError);
|
||||
}
|
||||
while(rc->bufState[rc->readPtr] != BUF_EMPTY)
|
||||
{ g_cond_wait(rc->canRead, rc->mutex);
|
||||
@@ -1102,18 +1102,18 @@ reread:
|
||||
if(status && !Closure->ignoreFatalSense
|
||||
&& rc->image->dh->sense.sense_key && rc->image->dh->sense.sense_key != 3 && rc->image->dh->sense.sense_key != 5)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int answer;
|
||||
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
Stop(_("Sector %lld: %s\nCan not recover from above error.\n"
|
||||
Stop(_("Sector %" PRId64 ": %s\nCan not recover from above error.\n"
|
||||
"Use the --ignore-fatal-sense option to override."),
|
||||
rc->readPos, GetLastSenseString(FALSE));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, insert_buttons,
|
||||
_("Sector %lld: %s\n\n"
|
||||
_("Sector %" PRId64 ": %s\n\n"
|
||||
"It may not be possible to recover from this error.\n"
|
||||
"Should the reading continue and ignore this error?"),
|
||||
rc->readPos, GetLastSenseString(FALSE));
|
||||
@@ -1124,7 +1124,7 @@ reread:
|
||||
if(!answer)
|
||||
{
|
||||
SwitchAndSetFootline(Closure->readLinearNotebook, 1, Closure->readLinearFootline,
|
||||
_("<span %s>Aborted by user request!</span> %lld sectors read, %lld sectors unreadable/skipped so far."),
|
||||
_("<span %s>Aborted by user request!</span> %" PRId64 " sectors read, %" PRId64 " sectors unreadable/skipped so far."),
|
||||
Closure->redMarkup, rc->readOK,Closure->readErrors);
|
||||
rc->unreportedError = FALSE; /* suppress respective error message */
|
||||
goto terminate;
|
||||
@@ -1140,7 +1140,7 @@ reread:
|
||||
for(i=0; i<nsectors; i++)
|
||||
{ if(rc->image->dh->c2[i])
|
||||
{ if(!status) /* Do not print C2 and error messages together */
|
||||
PrintCLI(_("Sector %lld: %3d C2 errors.%s\n"),
|
||||
PrintCLI(_("Sector %" PRId64 ": %3d C2 errors.%s\n"),
|
||||
rc->readPos+i, rc->image->dh->c2[i], " ");
|
||||
|
||||
if(rc->image->dh->c2[i] > rc->maxC2) /* remember highest value */
|
||||
@@ -1240,7 +1240,7 @@ reread:
|
||||
g_mutex_lock(rc->mutex);
|
||||
if(rc->workerError) /* something went wrong in the worker thread */
|
||||
{ g_mutex_unlock(rc->mutex);
|
||||
Stop(rc->workerError);
|
||||
Stop("%s", rc->workerError);
|
||||
}
|
||||
|
||||
while(rc->bufState[rc->readPtr] != BUF_EMPTY)
|
||||
@@ -1272,12 +1272,12 @@ reread:
|
||||
{ int i;
|
||||
|
||||
PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->status,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_("Sector %lld: %s Skipping %d sectors.\n"),
|
||||
_("Sector %" PRId64 ": %s Skipping %d sectors.\n"),
|
||||
rc->readPos, GetLastSenseString(FALSE), nfill-1);
|
||||
for(i=0; i<nfill; i++) /* workaround: large values for nfill */
|
||||
{ Closure->readErrors++; /* would exceed sampling of green/red */
|
||||
@@ -1305,12 +1305,12 @@ NULL,
|
||||
}
|
||||
else
|
||||
{ PrintCLIorLabel(
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Closure->status,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
_("Sector %lld: %s\n"),
|
||||
_("Sector %" PRId64 ": %s\n"),
|
||||
rc->readPos, GetLastSenseString(FALSE));
|
||||
if(rc->readPos >= rc->image->dh->sectors - 2) tao_tail++;
|
||||
Closure->readErrors++;
|
||||
@@ -1332,7 +1332,7 @@ step_counter:
|
||||
to checksum means we have ecc data - we can fix the image using ecc
|
||||
rather than by re-reading it. */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
ChangeSpiralCursor(Closure->readLinearSpiral, -1); /* switch cursor off */
|
||||
#endif
|
||||
@@ -1345,7 +1345,7 @@ step_counter:
|
||||
&& rc->pass < Closure->readingPasses)
|
||||
{ int renderers_left = TRUE;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(Closure->readLinearHeadline),
|
||||
_("<big>Trying to complete image, reading pass %d of %d.</big>\n%s"),
|
||||
@@ -1389,8 +1389,8 @@ step_counter:
|
||||
/* We were re-reading an incomplete image */
|
||||
|
||||
if(rc->rereading)
|
||||
{ if(!Closure->readErrors) t = g_strdup_printf(_("%lld sectors read. "),rc->readOK);
|
||||
else t = g_strdup_printf(_("%lld sectors read; %lld unreadable sectors."),rc->readOK,Closure->readErrors);
|
||||
{ if(!Closure->readErrors) t = g_strdup_printf(_("%" PRId64 " sectors read. "),rc->readOK);
|
||||
else t = g_strdup_printf(_("%" PRId64 " sectors read; %" PRId64 " unreadable sectors."),rc->readOK,Closure->readErrors);
|
||||
}
|
||||
|
||||
/* We were reading the image for the first time */
|
||||
@@ -1402,7 +1402,7 @@ step_counter:
|
||||
{
|
||||
if(rc->image->eccFile) /* ...maybe wrong image size? */
|
||||
{ if(rc->image->dh->sectors != rc->image->expectedSectors)
|
||||
t = g_strdup_printf(_("All sectors successfully read, but wrong image length (%lld sectors difference)"), rc->image->dh->sectors - rc->image->expectedSectors);
|
||||
t = g_strdup_printf(_("All sectors successfully read, but wrong image length (%" PRId64 " sectors difference)"), rc->image->dh->sectors - rc->image->expectedSectors);
|
||||
}
|
||||
/* ...or bad ecc md5 sum (theoretically impossible by now)? */
|
||||
if( rc->readOK == rc->image->dh->sectors /* no user limited range */
|
||||
@@ -1422,20 +1422,20 @@ step_counter:
|
||||
}
|
||||
else /* we have unreadable or damaged sectors */
|
||||
{ if(Closure->readErrors && !Closure->crcErrors)
|
||||
t = g_strdup_printf(_("%lld unreadable sectors."),Closure->readErrors);
|
||||
t = g_strdup_printf(_("%" PRId64 " unreadable sectors."),Closure->readErrors);
|
||||
else if(!Closure->readErrors && Closure->crcErrors)
|
||||
{ if(md5_failure & CRC_MD5_BAD)
|
||||
t = g_strdup_printf(_("%lld CRC errors and a md5sum mismatch in the CRC section."),Closure->crcErrors);
|
||||
t = g_strdup_printf(_("%" PRId64 " CRC errors and a md5sum mismatch in the CRC section."),Closure->crcErrors);
|
||||
else
|
||||
t = g_strdup_printf(_("%lld CRC errors."),Closure->crcErrors);
|
||||
t = g_strdup_printf(_("%" PRId64 " CRC errors."),Closure->crcErrors);
|
||||
}
|
||||
else t = g_strdup_printf(_("%lld CRC errors, %lld unreadable sectors."),
|
||||
else t = g_strdup_printf(_("%" PRId64 " CRC errors, %" PRId64 " unreadable sectors."),
|
||||
Closure->crcErrors, Closure->readErrors);
|
||||
}
|
||||
}
|
||||
|
||||
PrintLog("\n%s\n",t);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(rc->scanMode) SwitchAndSetFootline(Closure->readLinearNotebook, 1, Closure->readLinearFootline,
|
||||
"%s%s",_("Scanning finished: "),t);
|
||||
@@ -1451,7 +1451,7 @@ step_counter:
|
||||
if(rc->image->dh->mainType == CD && tao_tail && tao_tail == Closure->readErrors && !Closure->noTruncate)
|
||||
{ int answer;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("%d sectors missing at the end of the disc.\n"
|
||||
|
||||
@@ -62,7 +62,7 @@ void DumpSector(RawBuffer *rb, char *path)
|
||||
|
||||
fclose(file);
|
||||
|
||||
PrintCLI(_("Sector %lld dumped to %s\n"), rb->lba, filename);
|
||||
PrintCLI(_("Sector %" PRId64 " dumped to %s\n"), rb->lba, filename);
|
||||
|
||||
g_free(filename);
|
||||
}
|
||||
@@ -477,7 +477,7 @@ static int simple_lec(RawBuffer *rb, unsigned char *frame, char *msg)
|
||||
if(q_failures || p_failures || q_corrected || p_corrected)
|
||||
{
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld L-EC P/Q results: %d/%d failures, %d/%d corrected (%s).\n",
|
||||
"Sector %" PRId64 " L-EC P/Q results: %d/%d failures, %d/%d corrected (%s).\n",
|
||||
rb->lba, p_failures, q_failures, p_corrected, q_corrected, msg);
|
||||
return 1;
|
||||
}
|
||||
@@ -559,7 +559,7 @@ int ValidateRawSector(RawBuffer *rb, unsigned char *frame, char *msg)
|
||||
|
||||
if(lec_did_sth)
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by L-EC.\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by L-EC.\n",
|
||||
rb->lba);
|
||||
|
||||
return TRUE;
|
||||
@@ -892,7 +892,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Good. Data section passes EDC test.\n",
|
||||
"Sector %" PRId64 ": Good. Data section passes EDC test.\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
@@ -908,7 +908,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader after correcting sync pattern.\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader after correcting sync pattern.\n",
|
||||
rb->lba);
|
||||
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -925,7 +925,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by iterative L-EC.\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by iterative L-EC.\n",
|
||||
rb->lba);
|
||||
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -960,7 +960,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by plausible sector search (0).\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by plausible sector search (0).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
@@ -971,7 +971,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by brute force plausible sector search (0).\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by brute force plausible sector search (0).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
@@ -982,7 +982,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by mutual ack heuristic (0).\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by mutual ack heuristic (0).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
@@ -993,7 +993,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by heuristic L-EC (0).\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by heuristic L-EC (0).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
@@ -1004,7 +1004,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by plausible sector search (1).\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by plausible sector search (1).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
@@ -1015,7 +1015,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by brute force plausible sector search (1).\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by brute force plausible sector search (1).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
@@ -1026,7 +1026,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by mutual ack heuristic (1).\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by mutual ack heuristic (1).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
@@ -1037,7 +1037,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by heuristic L-EC (1).\n",
|
||||
"Sector %" PRId64 ": Recovered in raw reader by heuristic L-EC (1).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
return 0;
|
||||
|
||||
@@ -172,7 +172,7 @@ void RS01ReadSector(Image *image, unsigned char *buf, gint64 s)
|
||||
{ int n,expected;
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),
|
||||
s, strerror(errno));
|
||||
|
||||
/* Prepare for short reads at the last image sector.
|
||||
@@ -188,7 +188,7 @@ void RS01ReadSector(Image *image, unsigned char *buf, gint64 s)
|
||||
|
||||
n = LargeRead(image->file, buf, expected);
|
||||
if(n != expected)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),s,strerror(errno));
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),s,strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ void RS01ReadSector(Image *image, unsigned char *buf, gint64 s)
|
||||
|
||||
void RS01ScanImage(Method *method, Image* image, struct MD5Context *ecc_ctxt, int mode)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS01Widgets *wl = NULL;
|
||||
#endif
|
||||
unsigned char buf[2048];
|
||||
@@ -216,7 +216,7 @@ void RS01ScanImage(Method *method, Image* image, struct MD5Context *ecc_ctxt, in
|
||||
int crcidx = 0;
|
||||
struct MD5Context image_md5;
|
||||
gint64 s, first_missing, last_missing;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
gint64 prev_missing = 0;
|
||||
gint64 prev_crc_errors = 0;
|
||||
#endif
|
||||
@@ -225,7 +225,7 @@ void RS01ScanImage(Method *method, Image* image, struct MD5Context *ecc_ctxt, in
|
||||
|
||||
/* Extract widget list from method */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(method->widgetList)
|
||||
wl = (RS01Widgets*)method->widgetList;
|
||||
#endif
|
||||
@@ -263,7 +263,7 @@ void RS01ScanImage(Method *method, Image* image, struct MD5Context *ecc_ctxt, in
|
||||
|
||||
/* Check for user interruption */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ image->sectorsMissing += image->sectorSize - s;
|
||||
if(crcbuf) g_free(crcbuf);
|
||||
@@ -305,8 +305,8 @@ void RS01ScanImage(Method *method, Image* image, struct MD5Context *ecc_ctxt, in
|
||||
if(!current_missing || s==image->sectorSize-1)
|
||||
{ if(first_missing>=0)
|
||||
{ if(first_missing == last_missing)
|
||||
PrintCLI(_("* missing sector : %lld\n"), first_missing);
|
||||
else PrintCLI(_("* missing sectors : %lld - %lld\n"), first_missing, last_missing);
|
||||
PrintCLI(_("* missing sector : %" PRId64 "\n"), first_missing);
|
||||
else PrintCLI(_("* missing sectors : %" PRId64 " - %" PRId64 "\n"), first_missing, last_missing);
|
||||
first_missing = -1;
|
||||
}
|
||||
}
|
||||
@@ -353,7 +353,7 @@ void RS01ScanImage(Method *method, Image* image, struct MD5Context *ecc_ctxt, in
|
||||
}
|
||||
|
||||
if(crc != crcbuf[crcidx++] && !current_missing)
|
||||
{ PrintCLI(_("* CRC error, sector: %lld\n"), s);
|
||||
{ PrintCLI(_("* CRC error, sector: %" PRId64 "\n"), s);
|
||||
image->crcErrors++;
|
||||
}
|
||||
}
|
||||
@@ -361,7 +361,7 @@ void RS01ScanImage(Method *method, Image* image, struct MD5Context *ecc_ctxt, in
|
||||
|
||||
MD5Update(&image_md5, buf, n); /* update image md5sum */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && mode & PRINT_MODE)
|
||||
percent = (VERIFY_IMAGE_SEGMENTS*(s+1))/image->sectorSize;
|
||||
else
|
||||
@@ -370,7 +370,7 @@ void RS01ScanImage(Method *method, Image* image, struct MD5Context *ecc_ctxt, in
|
||||
if(last_percent != percent)
|
||||
{ PrintProgress(msg,percent);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && mode & CREATE_CRC)
|
||||
SetProgress(wl->encPBar1, percent, 100);
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ static int calculate_redundancy(char *image_name)
|
||||
|
||||
fs = strtoll(Closure->redundancy, NULL, 10);
|
||||
if(fs < ecc_file_size(sectors, 8) || fs > ecc_file_size(sectors, 100))
|
||||
Stop(_("Ecc file size %lldm out of useful range [%lld .. %lld]"),
|
||||
Stop(_("Ecc file size %" PRId64 "m out of useful range [%" PRId64 " .. %" PRId64 "]"),
|
||||
fs, ecc_file_size(sectors, 8), ecc_file_size(sectors, 100));
|
||||
for(nr=100; nr>8; nr--)
|
||||
if(fs >= ecc_file_size(sectors, nr))
|
||||
@@ -97,7 +97,7 @@ static int calculate_redundancy(char *image_name)
|
||||
*** Remove the image file
|
||||
***/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
static void unlink_image(GtkWidget *label)
|
||||
#else
|
||||
static void unlink_image(void *label)
|
||||
@@ -106,7 +106,7 @@ static void unlink_image(void *label)
|
||||
if(LargeUnlink(Closure->imageName))
|
||||
{ PrintLog(_("\nImage file %s deleted.\n"),Closure->imageName);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(label),
|
||||
_("\nImage file %s deleted.\n"), Closure->imageName);
|
||||
@@ -114,7 +114,7 @@ static void unlink_image(void *label)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLog("\n");
|
||||
@@ -135,7 +135,7 @@ static void unlink_image(void *label)
|
||||
|
||||
typedef struct
|
||||
{ Method *self;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS01Widgets *wl;
|
||||
#endif
|
||||
GaloisTables *gt;
|
||||
@@ -153,7 +153,7 @@ static void ecc_cleanup(gpointer data)
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(ec->earlyTermination)
|
||||
SetLabelText(GTK_LABEL(ec->wl->encFootline),
|
||||
@@ -176,14 +176,14 @@ static void ecc_cleanup(gpointer data)
|
||||
|
||||
if(Closure->enableCurveSwitch)
|
||||
{ Closure->enableCurveSwitch = FALSE;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS01ShowCurveButton(ec->self);
|
||||
#endif
|
||||
}
|
||||
|
||||
g_free(ec);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -197,7 +197,7 @@ enum { NORMAL, HIGH, GENERIC };
|
||||
|
||||
void RS01Create(void)
|
||||
{ Method *self = FindMethod("RS01");
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS01Widgets *wl = (RS01Widgets*)self->widgetList;
|
||||
#endif
|
||||
GaloisTables *gt;
|
||||
@@ -224,7 +224,7 @@ void RS01Create(void)
|
||||
/*** Register the cleanup procedure for GUI mode */
|
||||
|
||||
ec->self = self;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
ec->wl = wl;
|
||||
#endif
|
||||
ec->earlyTermination = TRUE;
|
||||
@@ -255,7 +255,7 @@ void RS01Create(void)
|
||||
nroots,
|
||||
((double)nroots*100.0)/(double)ndata);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->encHeadline),
|
||||
_("<big>Creating the error correction file.</big>\n<i>%s</i>"), ec->msg);
|
||||
@@ -269,7 +269,7 @@ void RS01Create(void)
|
||||
{
|
||||
if(ConfirmEccDeletion(Closure->eccName))
|
||||
LargeUnlink(Closure->eccName);
|
||||
#ifndef CLI /* ConfirmEccDeletion always return true if CLI */
|
||||
#ifndef WITH_CLI_ONLY_YES /* ConfirmEccDeletion always return true if CLI */
|
||||
else
|
||||
{ SetLabelText(GTK_LABEL(ec->wl->encFootline),
|
||||
_("<span %s>Aborted to keep existing ecc file.</span>"),
|
||||
@@ -291,8 +291,8 @@ void RS01Create(void)
|
||||
Stop(_("Image file %s: %s."),Closure->imageName, strerror(errno));
|
||||
}
|
||||
if(image->inLast == 2048)
|
||||
PrintLog(_(": %lld medium sectors.\n"), image->sectorSize);
|
||||
else PrintLog(_(": %lld medium sectors and %d bytes.\n"),
|
||||
PrintLog(_(": %" PRId64 " medium sectors.\n"), image->sectorSize);
|
||||
else PrintLog(_(": %" PRId64 " medium sectors and %d bytes.\n"),
|
||||
image->sectorSize-1, image->inLast);
|
||||
|
||||
if(!Closure->eccName || !strlen(Closure->eccName))
|
||||
@@ -311,7 +311,7 @@ void RS01Create(void)
|
||||
int percent, last_percent = 0;
|
||||
char *msg = _("Writing sector checksums: %3d%%");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->encLabel1),
|
||||
_("<b>1. Writing image sector checksums:</b>"));
|
||||
@@ -346,7 +346,7 @@ void RS01Create(void)
|
||||
if(last_percent != percent)
|
||||
{ PrintProgress(msg,percent);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(wl->encPBar1, percent, 100);
|
||||
#endif
|
||||
@@ -363,7 +363,7 @@ void RS01Create(void)
|
||||
Checksums are only computed locally and not provided in the cache. */
|
||||
else
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->encLabel1),
|
||||
_("<b>1. Calculating image sector checksums:</b>"));
|
||||
@@ -380,7 +380,7 @@ void RS01Create(void)
|
||||
|
||||
LargeUnlink(Closure->eccName); /* Do not leave a CRC-only .ecc file behind */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{
|
||||
if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
@@ -393,19 +393,19 @@ void RS01Create(void)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(wl->encPBar1, 100, 100);
|
||||
#endif
|
||||
|
||||
Stop(_("%lld sectors unread or missing due to errors.\n"), image->sectorsMissing);
|
||||
Stop(_("%" PRId64 " sectors unread or missing due to errors.\n"), image->sectorsMissing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PrintTimeToLog(ec->timer, "for CRC writing/generation.\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetProgress(wl->encPBar1, 100, 100);
|
||||
ShowWidget(wl->encPBar2);
|
||||
@@ -531,7 +531,7 @@ void RS01Create(void)
|
||||
{ int offset = 0;
|
||||
unsigned char *par_idx = ec->parity;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
@@ -611,7 +611,7 @@ void RS01Create(void)
|
||||
percent = (1000*progress)/max_percent;
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(wl->encPBar2, percent, 1000);
|
||||
else
|
||||
@@ -629,7 +629,7 @@ void RS01Create(void)
|
||||
{ int offset = 0;
|
||||
unsigned char *par_idx = ec->parity;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
@@ -741,7 +741,7 @@ void RS01Create(void)
|
||||
percent = (1000*progress)/max_percent;
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(wl->encPBar2, percent, 1000);
|
||||
else
|
||||
@@ -762,7 +762,7 @@ void RS01Create(void)
|
||||
{ int offset = 0;
|
||||
unsigned char *par_idx = ec->parity;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
@@ -1041,7 +1041,7 @@ void RS01Create(void)
|
||||
percent = (1000*progress)/max_percent;
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(wl->encPBar2, percent, 1000);
|
||||
else
|
||||
@@ -1087,7 +1087,7 @@ void RS01Create(void)
|
||||
"Make sure to keep this file on a reliable medium.\n"),
|
||||
Closure->eccName);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetProgress(wl->encPBar2, 100, 100);
|
||||
|
||||
@@ -1103,7 +1103,7 @@ void RS01Create(void)
|
||||
if(Closure->unlinkImage)
|
||||
{ if(ec->image) CloseImage(ec->image);
|
||||
ec->image = NULL;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
unlink_image(Closure->guiMode ? wl->encFootline2 : NULL);
|
||||
#else
|
||||
unlink_image(NULL);
|
||||
@@ -1114,7 +1114,7 @@ void RS01Create(void)
|
||||
|
||||
ec->earlyTermination = FALSE;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
terminate:
|
||||
#endif
|
||||
ecc_cleanup((gpointer)ec);
|
||||
|
||||
@@ -55,7 +55,7 @@ static void read_crc(LargeFile *ecc, guint32 *buf, int first_sector, int n_secto
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS01Widgets *wl;
|
||||
#endif
|
||||
GaloisTables *gt;
|
||||
@@ -73,7 +73,7 @@ static void fix_cleanup(gpointer data)
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(fc->earlyTermination)
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
@@ -101,7 +101,7 @@ static void fix_cleanup(gpointer data)
|
||||
|
||||
g_free(fc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -113,7 +113,7 @@ static void fix_cleanup(gpointer data)
|
||||
|
||||
void RS01Fix(Image *image)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Method *method = FindMethod("RS01");
|
||||
RS01Widgets *wl = (RS01Widgets*)method->widgetList;
|
||||
#endif
|
||||
@@ -141,7 +141,7 @@ void RS01Fix(Image *image)
|
||||
/*** Register the cleanup procedure for GUI mode */
|
||||
|
||||
fc->image = image;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
fc->wl = wl;
|
||||
#endif
|
||||
fc->earlyTermination = TRUE;
|
||||
@@ -155,7 +155,7 @@ void RS01Fix(Image *image)
|
||||
eh->eccBytes,
|
||||
((double)eh->eccBytes*100.0)/(double)eh->dataBytes);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->fixHeadline),
|
||||
_("<big>Repairing the image.</big>\n<i>%s</i>"),fc->msg);
|
||||
@@ -192,7 +192,7 @@ void RS01Fix(Image *image)
|
||||
image->file->size += n;
|
||||
image->inLast += n;
|
||||
if(n != padding)
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
image->sectorSize, "SC", strerror(errno));
|
||||
}
|
||||
|
||||
@@ -206,14 +206,14 @@ void RS01Fix(Image *image)
|
||||
if(diff>0 && diff<=2)
|
||||
{
|
||||
int answer = ModalWarningOrCLI(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Image file is %lld sectors longer than expected.\n"
|
||||
_("Image file is %" PRId64 " sectors longer than expected.\n"
|
||||
"Assuming this is a TAO mode medium.\n"
|
||||
"%lld sectors will be removed from the image end.\n"),
|
||||
"%" PRId64 " sectors will be removed from the image end.\n"),
|
||||
diff, diff);
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
fc->wl->fixFootline,
|
||||
_("<span %s>Aborted by user request!</span>"),
|
||||
@@ -230,7 +230,7 @@ void RS01Fix(Image *image)
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(diff>2 && Closure->guiMode)
|
||||
{ int answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
trans,
|
||||
@@ -252,12 +252,12 @@ void RS01Fix(Image *image)
|
||||
if(!LargeTruncate(image->file, expected_image_size))
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
|
||||
PrintLog(_("Image has been truncated by %lld sectors.\n"), diff);
|
||||
PrintLog(_("Image has been truncated by %" PRId64 " sectors.\n"), diff);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(diff>2 &&
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
!Closure->guiMode)
|
||||
#else
|
||||
1)
|
||||
@@ -274,14 +274,14 @@ void RS01Fix(Image *image)
|
||||
if(!LargeTruncate(image->file, expected_image_size))
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
|
||||
PrintLog(_("Image has been truncated by %lld sectors.\n"), diff);
|
||||
PrintLog(_("Image has been truncated by %" PRId64 " sectors.\n"), diff);
|
||||
}
|
||||
}
|
||||
|
||||
if(image->sectorSize == image->expectedSectors && image->inLast > eh->inLast)
|
||||
{ int difference = image->inLast - eh->inLast;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ int answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("The image file is %d bytes longer than noted\n"
|
||||
@@ -300,7 +300,7 @@ void RS01Fix(Image *image)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode && !Closure->truncate)
|
||||
#else
|
||||
if(!Closure->truncate)
|
||||
@@ -322,11 +322,11 @@ void RS01Fix(Image *image)
|
||||
{ int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Image file appears to be truncated.\n"
|
||||
"Consider completing it with another reading pass before going on.\n"), NULL);
|
||||
"%s",_("Image file appears to be truncated.\n"
|
||||
"Consider completing it with another reading pass before going on.\n"));
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
fc->wl->fixFootline,
|
||||
_("<span %s>Aborted by user request!</span>"),
|
||||
@@ -346,7 +346,7 @@ void RS01Fix(Image *image)
|
||||
eh->fpSector);
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
fc->wl->fixFootline,
|
||||
_("<span %s>Aborted by user request!</span>"),
|
||||
@@ -399,7 +399,7 @@ void RS01Fix(Image *image)
|
||||
|
||||
for(si=0; si<s; si++)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
@@ -448,7 +448,7 @@ void RS01Fix(Image *image)
|
||||
else if(crc != fc->crcBuf[i][cache_sector])
|
||||
{ erasure_map[i] = 3;
|
||||
erasure_list[erasure_count++] = i;
|
||||
PrintCLI(_("CRC error in sector %lld\n"),block_idx[i]);
|
||||
PrintCLI(_("CRC error in sector %" PRId64 "\n"),block_idx[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -473,13 +473,13 @@ void RS01Fix(Image *image)
|
||||
|
||||
if(erasure_count>nroots) /* uncorrectable */
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
{ PrintCLI(_("* %3d unrepairable sectors: "), erasure_count);
|
||||
|
||||
for(i=0; i<erasure_count; i++)
|
||||
PrintCLI("%lld ", block_idx[erasure_list[i]]);
|
||||
PrintCLI("%" PRId64 " ", block_idx[erasure_list[i]]);
|
||||
|
||||
PrintCLI("\n");
|
||||
}
|
||||
@@ -498,14 +498,14 @@ void RS01Fix(Image *image)
|
||||
continue; /* It's (already) dead, Jim ;-) */
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*idx)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
idx, "FD", strerror(errno));
|
||||
|
||||
CreateMissingSector(buf, idx, eh->mediumFP, eh->fpSector, NULL);
|
||||
|
||||
n = LargeWrite(image->file, buf, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image [%s]: %s"),
|
||||
idx, "WD", strerror(errno));
|
||||
}
|
||||
}
|
||||
@@ -670,7 +670,7 @@ void RS01Fix(Image *image)
|
||||
for(i=0; i<erasure_count; i++)
|
||||
{ gint64 idx = block_idx[erasure_list[i]];
|
||||
|
||||
PrintLog("%lld ", idx);
|
||||
PrintLog("%" PRId64 " ", idx);
|
||||
}
|
||||
PrintLog("\n");
|
||||
break;
|
||||
@@ -724,14 +724,14 @@ void RS01Fix(Image *image)
|
||||
{ int old = fc->imgBlock[location][offset];
|
||||
int new = old ^ gf_alpha_to[mod_fieldmax(gf_index_of[num1] + gf_index_of[num2] + GF_FIELDMAX - gf_index_of[den])];
|
||||
|
||||
PrintCLI(_("-> Error located in sector %lld at byte %4d (value %02x '%c', expected %02x '%c')\n"),
|
||||
PrintCLI(_("-> Error located in sector %" PRId64 " at byte %4d (value %02x '%c', expected %02x '%c')\n"),
|
||||
block_idx[location], bi,
|
||||
old, canprint(old) ? old : '.',
|
||||
new, canprint(new) ? new : '.');
|
||||
}
|
||||
|
||||
if(!erasure_map[location])
|
||||
PrintLog(_("Unexpected byte error in sector %lld, byte %d\n"),
|
||||
PrintLog(_("Unexpected byte error in sector %" PRId64 ", byte %d\n"),
|
||||
block_idx[location], bi);
|
||||
|
||||
fc->imgBlock[location][offset] ^= gf_alpha_to[mod_fieldmax(gf_index_of[num1] + gf_index_of[num2] + GF_FIELDMAX - gf_index_of[den])];
|
||||
@@ -753,12 +753,12 @@ void RS01Fix(Image *image)
|
||||
{ gint64 idx = block_idx[erasure_list[i]];
|
||||
int length;
|
||||
|
||||
PrintCLI("%lld ", idx);
|
||||
PrintCLI("%" PRId64 " ", idx);
|
||||
|
||||
/* Write the recovered sector */
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*idx)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
idx, "FW", strerror(errno));
|
||||
|
||||
if(idx < image->expectedSectors-1) length = 2048;
|
||||
@@ -766,7 +766,7 @@ void RS01Fix(Image *image)
|
||||
|
||||
n = LargeWrite(image->file, cache_offset+fc->imgBlock[erasure_list[i]], length);
|
||||
if(n != length)
|
||||
Stop(_("could not write medium sector %lld:\n%s"),idx,strerror(errno));
|
||||
Stop(_("could not write medium sector %" PRId64 ":\n%s"),idx,strerror(errno));
|
||||
}
|
||||
|
||||
PrintCLI("\n");
|
||||
@@ -785,7 +785,7 @@ skip:
|
||||
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{
|
||||
RS01AddFixValues(wl, percent, local_plot_max);
|
||||
@@ -808,14 +808,14 @@ skip:
|
||||
/*** Print results */
|
||||
|
||||
PrintProgress(_("Ecc progress: 100.0%%\n"));
|
||||
if(corrected > 0) PrintLog(_("Repaired sectors: %lld \n"),corrected);
|
||||
if(corrected > 0) PrintLog(_("Repaired sectors: %" PRId64 " \n"),corrected);
|
||||
if(uncorrected > 0)
|
||||
{ PrintLog(_("Unrepaired sectors: %lld\n"), uncorrected);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("Unrepaired sectors: %" PRId64 "\n"), uncorrected);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->fixNotebook, 1, wl->fixFootline,
|
||||
_("Image sectors could not be fully restored "
|
||||
"(%lld repaired; <span %s>%lld unrepaired</span>)"),
|
||||
"(%" PRId64 " repaired; <span %s>%" PRId64 " unrepaired</span>)"),
|
||||
corrected, Closure->redMarkup, uncorrected);
|
||||
#endif
|
||||
}
|
||||
@@ -833,7 +833,7 @@ skip:
|
||||
PrintLog(_("Erasure counts per ecc block: avg = %.1f; worst = %d.\n"),
|
||||
(double)damaged_sec/(double)damaged_ecc,worst_ecc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && t)
|
||||
SwitchAndSetFootline(wl->fixNotebook, 1, wl->fixFootline,
|
||||
"%s %s", _("Repair results:"), t);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef RS01INCLUDES_H
|
||||
#define RS01INCLUDES_H
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/* Data structs from rs01-window.c */
|
||||
|
||||
typedef struct
|
||||
@@ -107,7 +107,7 @@ typedef struct
|
||||
{ struct MD5Context md5ctxt; /* Complete image checksum */
|
||||
} RS01CksumClosure;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/*
|
||||
* These are exported via the Method struct
|
||||
*/
|
||||
@@ -159,7 +159,7 @@ void RS01Create(void);
|
||||
|
||||
void RS01Fix(Image*);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/* rs01-window.c */
|
||||
|
||||
void RS01AddFixValues(RS01Widgets*, int, int);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "rs01-includes.h"
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
|
||||
/***
|
||||
*** Reset the verify output window
|
||||
@@ -92,11 +92,11 @@ void RS01AddVerifyValues(Method *method, int percent,
|
||||
return;
|
||||
|
||||
if(newMissing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpMissingSectors), "<span %s>%lld</span>",
|
||||
SetLabelText(GTK_LABEL(wl->cmpMissingSectors), "<span %s>%" PRId64 "</span>",
|
||||
Closure->redMarkup, totalMissing);
|
||||
|
||||
if(newCrcErrors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpChkSumErrors), "<span %s>%lld</span>",
|
||||
SetLabelText(GTK_LABEL(wl->cmpChkSumErrors), "<span %s>%" PRId64 "</span>",
|
||||
Closure->redMarkup, totalCrcErrors);
|
||||
|
||||
sii->cmpSpiral = wl->cmpSpiral;
|
||||
@@ -356,7 +356,7 @@ static void cleanup(gpointer data)
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
AllowActions(TRUE);
|
||||
#endif
|
||||
@@ -364,7 +364,7 @@ static void cleanup(gpointer data)
|
||||
if(vc->image) CloseImage(vc->image);
|
||||
g_free(vc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -373,12 +373,12 @@ static void cleanup(gpointer data)
|
||||
void RS01Verify(Image *image)
|
||||
{ verify_closure *vc = g_malloc0(sizeof(verify_closure));
|
||||
Method *self = FindMethod("RS01");
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS01Widgets *wl = (RS01Widgets*)self->widgetList;
|
||||
#endif
|
||||
char idigest[33],edigest[33];
|
||||
gint64 excess_sectors = 0;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
char *ecc_advice = NULL;
|
||||
#endif
|
||||
|
||||
@@ -399,7 +399,7 @@ void RS01Verify(Image *image)
|
||||
|
||||
/*** Examine the .iso file */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpHeadline), "<big>%s</big>\n<i>%s</i>",
|
||||
_("Comparing image and error correction files."),
|
||||
@@ -407,7 +407,7 @@ void RS01Verify(Image *image)
|
||||
#endif
|
||||
|
||||
vc->image = image;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(image && image->eccFile)
|
||||
{ if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpChkSumErrors), "0");
|
||||
@@ -423,7 +423,7 @@ void RS01Verify(Image *image)
|
||||
if(!image || !image->file)
|
||||
{ PrintLog(_("not present\n"));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->cmpImageNotebook, 0, NULL, NULL);
|
||||
#endif
|
||||
@@ -431,18 +431,18 @@ void RS01Verify(Image *image)
|
||||
}
|
||||
|
||||
if(image->inLast == 2048)
|
||||
{ PrintLog(_("present, contains %lld medium sectors.\n"), image->sectorSize);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("present, contains %" PRId64 " medium sectors.\n"), image->sectorSize);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), "%lld", image->sectorSize);
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), "%" PRId64 "", image->sectorSize);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("present, contains %lld medium sectors and %d bytes.\n"),
|
||||
{ PrintLog(_("present, contains %" PRId64 " medium sectors and %d bytes.\n"),
|
||||
image->sectorSize-1, image->inLast);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("%lld sectors + %d bytes"),
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("%" PRId64 " sectors + %d bytes"),
|
||||
image->sectorSize-1, image->inLast);
|
||||
#endif
|
||||
}
|
||||
@@ -450,7 +450,7 @@ void RS01Verify(Image *image)
|
||||
if(!Closure->quickVerify)
|
||||
RS01ScanImage(self, image, NULL, PRINT_MODE);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageResult),
|
||||
@@ -468,11 +468,11 @@ void RS01Verify(Image *image)
|
||||
if(image->sectorSize < image->expectedSectors)
|
||||
{ diff = image->expectedSectors - image->sectorSize;
|
||||
|
||||
PrintLog(_("* truncated image : %lld sectors too short\n"), diff);
|
||||
#ifndef CLI
|
||||
PrintLog(_("* truncated image : %" PRId64 " sectors too short\n"), diff);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors),
|
||||
_("<span %s>%lld (%lld sectors too short)</span>"),
|
||||
_("<span %s>%" PRId64 " (%" PRId64 " sectors too short)</span>"),
|
||||
Closure->redMarkup, image->sectorSize, diff);
|
||||
#endif
|
||||
image->sectorsMissing += diff;
|
||||
@@ -484,23 +484,23 @@ void RS01Verify(Image *image)
|
||||
|
||||
/*** Show summary of image read */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(image->crcErrors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpChkSumErrors),
|
||||
"<span %s>%lld</span>", Closure->redMarkup, image->crcErrors);
|
||||
"<span %s>%" PRId64 "</span>", Closure->redMarkup, image->crcErrors);
|
||||
if(image->sectorsMissing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpMissingSectors),
|
||||
"<span %s>%lld</span>", Closure->redMarkup, image->sectorsMissing);
|
||||
"<span %s>%" PRId64 "</span>", Closure->redMarkup, image->sectorsMissing);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(excess_sectors)
|
||||
{ PrintLog(_("* image too long : %lld excess sectors\n"), excess_sectors);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("* image too long : %" PRId64 " excess sectors\n"), excess_sectors);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageSectors),
|
||||
_("<span %s>%lld (%lld excess sectors)</span>"),
|
||||
_("<span %s>%" PRId64 " (%" PRId64 " excess sectors)</span>"),
|
||||
Closure->redMarkup, image->sectorSize, excess_sectors);
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageResult),
|
||||
_("<span %s>Bad image.</span>"),
|
||||
@@ -519,7 +519,7 @@ void RS01Verify(Image *image)
|
||||
if(!image->crcErrors)
|
||||
{ PrintLog(_("- good image : all sectors present\n"
|
||||
"- image md5sum : %s\n"),idigest);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult),_("<span %s>Good image.</span>"), Closure->greenMarkup);
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageMd5Sum), "%s", idigest);
|
||||
@@ -527,10 +527,10 @@ void RS01Verify(Image *image)
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("* suspicious image : all sectors present, but %lld CRC errors\n"
|
||||
{ PrintLog(_("* suspicious image : all sectors present, but %" PRId64 " CRC errors\n"
|
||||
"- image md5sum : %s\n"),image->crcErrors,idigest);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), _("<span %s>Image complete, but contains checksum errors!</span>"), Closure->redMarkup);
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageMd5Sum), "%s", idigest);
|
||||
@@ -540,10 +540,10 @@ void RS01Verify(Image *image)
|
||||
}
|
||||
else /* sectors are missing */
|
||||
{ if(!image->crcErrors)
|
||||
PrintLog(_("* BAD image : %lld sectors missing\n"), image->sectorsMissing);
|
||||
else PrintLog(_("* BAD image : %lld sectors missing, %lld CRC errors\n"),
|
||||
PrintLog(_("* BAD image : %" PRId64 " sectors missing\n"), image->sectorsMissing);
|
||||
else PrintLog(_("* BAD image : %" PRId64 " sectors missing, %" PRId64 " CRC errors\n"),
|
||||
image->sectorsMissing, image->crcErrors);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageResult),
|
||||
_("<span %s>Bad image.</span>"), Closure->redMarkup);
|
||||
@@ -554,7 +554,7 @@ void RS01Verify(Image *image)
|
||||
/*** The .ecc file */
|
||||
|
||||
process_ecc:
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpHeadline), "<big>%s</big>\n<i>%s</i>",
|
||||
_("Comparing image and error correction files."),
|
||||
@@ -565,7 +565,7 @@ process_ecc:
|
||||
|
||||
if(!image)
|
||||
{ PrintLog(_("not present\n"));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->cmpEccNotebook, 0,
|
||||
wl->cmpEccEmptyMsg,_("No error correction file present."));
|
||||
@@ -595,7 +595,7 @@ process_ecc:
|
||||
PrintLog(_("unusable\n"));
|
||||
break;
|
||||
}
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->cmpEccNotebook, 0,
|
||||
wl->cmpEccEmptyMsg,_("No error correction file present."));
|
||||
@@ -625,7 +625,7 @@ process_ecc:
|
||||
PrintLog(format, _("created by dvdisaster"), major, minor, micro, unstable);
|
||||
PrintLog("\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SwitchAndSetFootline(wl->cmpEccNotebook, 1,
|
||||
wl->cmpEccCreatedBy,
|
||||
@@ -639,7 +639,7 @@ process_ecc:
|
||||
PrintLog(format, _("created by dvdisaster"),
|
||||
major, minor, unstable);
|
||||
PrintLog("\n");
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->cmpEccNotebook, 1,
|
||||
wl->cmpEccCreatedBy, format, "dvdisaster",
|
||||
@@ -649,7 +649,7 @@ process_ecc:
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("created by dvdisaster-0.41.x.\n"));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->cmpEccNotebook, 1,
|
||||
wl->cmpEccCreatedBy, "dvdisaster-0.41.x");
|
||||
@@ -663,7 +663,7 @@ process_ecc:
|
||||
PrintLog(_("- method : %4s, %d roots, %4.1f%% redundancy.\n"),
|
||||
method, eh->eccBytes,
|
||||
((double)eh->eccBytes*100.0)/(double)eh->dataBytes);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMethod), _("%4s, %d roots, %4.1f%% redundancy"),
|
||||
method, eh->eccBytes,
|
||||
@@ -676,7 +676,7 @@ process_ecc:
|
||||
{ PrintLog(_("- requires : dvdisaster-%d.%d (good)\n"),
|
||||
eh->neededVersion/10000,
|
||||
(eh->neededVersion%10000)/100);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccRequires), "dvdisaster-%d.%d",
|
||||
eh->neededVersion/10000,
|
||||
@@ -690,7 +690,7 @@ process_ecc:
|
||||
eh->neededVersion/10000,
|
||||
(eh->neededVersion%10000)/100);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccRequires),
|
||||
"<span %s>dvdisaster-%d.%d</span>",
|
||||
@@ -711,19 +711,19 @@ process_ecc:
|
||||
|
||||
if(!image->file)
|
||||
{ if(!ecc_in_last)
|
||||
{ PrintLog(_("- medium sectors : %lld\n"), image->expectedSectors);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("- medium sectors : %" PRId64 "\n"), image->expectedSectors);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "%lld", image->expectedSectors);
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "%" PRId64 "", image->expectedSectors);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("- medium sectors : %lld sectors + %d bytes\n"),
|
||||
{ PrintLog(_("- medium sectors : %" PRId64 " sectors + %d bytes\n"),
|
||||
image->expectedSectors-1, ecc_in_last);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors),
|
||||
_("%lld sectors + %d bytes"),
|
||||
_("%" PRId64 " sectors + %d bytes"),
|
||||
image->expectedSectors-1, ecc_in_last);
|
||||
#endif
|
||||
}
|
||||
@@ -734,19 +734,19 @@ process_ecc:
|
||||
if(image->sectorSize == image->expectedSectors
|
||||
&& (!ecc_in_last || image->inLast == eh->inLast))
|
||||
{ if(!ecc_in_last)
|
||||
{ PrintLog(_("- medium sectors : %lld (good)\n"), image->expectedSectors);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("- medium sectors : %" PRId64 " (good)\n"), image->expectedSectors);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "%lld", image->expectedSectors);
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "%" PRId64 "", image->expectedSectors);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("- medium sectors : %lld sectors + %d bytes (good)\n"),
|
||||
{ PrintLog(_("- medium sectors : %" PRId64 " sectors + %d bytes (good)\n"),
|
||||
image->expectedSectors-1, ecc_in_last);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors),
|
||||
_("%lld sectors + %d bytes"),
|
||||
_("%" PRId64 " sectors + %d bytes"),
|
||||
image->expectedSectors-1, ecc_in_last);
|
||||
#endif
|
||||
}
|
||||
@@ -755,23 +755,23 @@ process_ecc:
|
||||
else /* sector sizes differ */
|
||||
{ /* TAO case (1 or 2 sectors more than expected) */
|
||||
if(image->sectorSize > image->expectedSectors && image->sectorSize - image->expectedSectors <= 2)
|
||||
{ PrintLog(_("* medium sectors : %lld (BAD, perhaps TAO/DAO mismatch)\n"), image->expectedSectors);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("* medium sectors : %" PRId64 " (BAD, perhaps TAO/DAO mismatch)\n"), image->expectedSectors);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(!ecc_in_last)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "<span %s>%lld</span>",
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "<span %s>%" PRId64 "</span>",
|
||||
Closure->redMarkup, image->expectedSectors);
|
||||
else SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "<span %s>%lld sectors + %d bytes</span>",
|
||||
else SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "<span %s>%" PRId64 " sectors + %d bytes</span>",
|
||||
Closure->redMarkup, image->expectedSectors-1, ecc_in_last);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else /* more than 2 Sectors difference */
|
||||
{ if(!ecc_in_last)
|
||||
{ PrintLog(_("* medium sectors : %lld (BAD)\n"), image->expectedSectors);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("* medium sectors : %" PRId64 " (BAD)\n"), image->expectedSectors);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "<span %s>%lld</span>",
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "<span %s>%" PRId64 "</span>",
|
||||
Closure->redMarkup, image->expectedSectors);
|
||||
if(!ecc_advice)
|
||||
ecc_advice = g_strdup_printf(_("<span %s>Image size does not match error correction file.</span>"), Closure->redMarkup);
|
||||
@@ -779,12 +779,12 @@ process_ecc:
|
||||
#endif
|
||||
}
|
||||
else /* byte size difference */
|
||||
{ PrintLog(_("* medium sectors : %lld sectors + %d bytes (BAD)\n"),
|
||||
{ PrintLog(_("* medium sectors : %" PRId64 " sectors + %d bytes (BAD)\n"),
|
||||
image->expectedSectors-1, ecc_in_last);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors),
|
||||
_("<span %s>%lld sectors + %d bytes</span>"),
|
||||
_("<span %s>%" PRId64 " sectors + %d bytes</span>"),
|
||||
Closure->redMarkup, image->expectedSectors-1, ecc_in_last);
|
||||
if(!ecc_advice)
|
||||
ecc_advice = g_strdup_printf(_("<span %s>Image size does not match error correction file.</span>"), Closure->redMarkup);
|
||||
@@ -803,7 +803,7 @@ process_ecc:
|
||||
{ int n = !memcmp(eh->mediumSum, image->mediumSum, 16);
|
||||
if(n) PrintLog(_("- image md5sum : %s (good)\n"),edigest);
|
||||
else PrintLog(_("* image md5sum : %s (BAD)\n"),edigest);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(n) SetLabelText(GTK_LABEL(wl->cmpEccImgMd5Sum), "%s", edigest);
|
||||
else
|
||||
@@ -815,7 +815,7 @@ process_ecc:
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("- image md5sum : %s\n"),edigest);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccImgMd5Sum), "%s", edigest);
|
||||
#endif
|
||||
@@ -825,7 +825,7 @@ process_ecc:
|
||||
if(image && image->file)
|
||||
{ if(image->fpState != FP_PRESENT)
|
||||
{ PrintLog(_("* fingerprint match: NOT POSSIBLE - related sector is missing in image!\n"));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccFingerprint), _("<span %s>missing sector prevents calculation</span>"), Closure->redMarkup);
|
||||
#endif
|
||||
@@ -835,7 +835,7 @@ process_ecc:
|
||||
if(memcmp(image->imageFP, eh->mediumFP, 16))
|
||||
{ PrintLog(_("* fingerprint match: MISMATCH - .iso and .ecc don't belong together!\n"));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccFingerprint),
|
||||
_("<span %s>mismatch</span>"), Closure->redMarkup);
|
||||
@@ -847,7 +847,7 @@ process_ecc:
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("- fingerprint match: good\n"));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccFingerprint), _("good"));
|
||||
#endif
|
||||
@@ -866,17 +866,17 @@ process_ecc:
|
||||
ecc_blocks = (image->eccFile->size-image->expectedSectors*sizeof(guint32)-sizeof(EccHeader))/eh->eccBytes;
|
||||
|
||||
if(ecc_expected == ecc_blocks)
|
||||
{ PrintLog(_("- ecc blocks : %lld (good)\n"),ecc_blocks);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("- ecc blocks : %" PRId64 " (good)\n"),ecc_blocks);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccBlocks), "%lld", ecc_blocks);
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccBlocks), "%" PRId64 "", ecc_blocks);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("* ecc blocks : %lld (BAD, expected %lld)\n"),ecc_blocks,ecc_expected);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("* ecc blocks : %" PRId64 " (BAD, expected %" PRId64 ")\n"),ecc_blocks,ecc_expected);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccBlocks), _("<span %s>%lld (bad, expected %lld)</span>"),Closure->redMarkup,ecc_blocks,ecc_expected);
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccBlocks), _("<span %s>%" PRId64 " (bad, expected %" PRId64 ")</span>"),Closure->redMarkup,ecc_blocks,ecc_expected);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -899,17 +899,17 @@ process_ecc:
|
||||
percent = (100*count)/image->eccFile->size;
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintProgress(_("- ecc md5sum : %3d%%"),percent);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else SetLabelText(GTK_LABEL(wl->cmpEccMd5Sum), "%3d%%", percent);
|
||||
#endif
|
||||
last_percent = percent;
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccResult),
|
||||
@@ -924,7 +924,7 @@ process_ecc:
|
||||
|
||||
if(memcmp(eh->eccSum, digest, 16))
|
||||
{ PrintLog(_("* ecc md5sum : BAD, ecc file may be damaged!\n"));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccMd5Sum), _("<span %s>bad</span>"), Closure->redMarkup);
|
||||
if(!ecc_advice)
|
||||
@@ -934,7 +934,7 @@ process_ecc:
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("- ecc md5sum : %s (good)\n"),edigest);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMd5Sum), "%s", edigest);
|
||||
#endif
|
||||
@@ -943,10 +943,10 @@ process_ecc:
|
||||
skip_ecc:
|
||||
PrintLog("\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(ecc_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), ecc_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), "%s", ecc_advice);
|
||||
g_free(ecc_advice);
|
||||
}
|
||||
else SetLabelText(GTK_LABEL(wl->cmpEccResult),
|
||||
|
||||
@@ -200,8 +200,8 @@ void RS01SetFixMaxValues(RS01Widgets *wl, int data_bytes, int ecc_bytes, gint64
|
||||
static gboolean results_idle_func(gpointer data)
|
||||
{ RS01Widgets *wl = (RS01Widgets*)data;
|
||||
|
||||
SetLabelText(GTK_LABEL(wl->fixCorrected), _("Repaired: %lld"), wl->corrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixUncorrected), _("Unrepairable: <span %s>%lld</span>"),Closure->redMarkup, wl->uncorrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixCorrected), _("Repaired: %" PRId64 ""), wl->corrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixUncorrected), _("Unrepairable: <span %s>%" PRId64 "</span>"),Closure->redMarkup, wl->uncorrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixProgress), _("Progress: %3d.%1d%%"), wl->percent/10, wl->percent%10);
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -236,12 +236,12 @@ void RS02ReadSector(Image *image, RS02Layout *lay, unsigned char *buf, gint64 s)
|
||||
/* Read a real sector */
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*s)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),
|
||||
s, strerror(errno));
|
||||
|
||||
n = LargeRead(image->file, buf, 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),s,strerror(errno));
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),s,strerror(errno));
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -432,7 +432,7 @@ RS02Layout *CalcRS02Layout(Image *image)
|
||||
|
||||
/* See if user wants to pick a certain redundancy */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode && Closure->redundancy)
|
||||
#else
|
||||
if(Closure->redundancy)
|
||||
@@ -527,20 +527,20 @@ RS02Layout *CalcRS02Layout(Image *image)
|
||||
|
||||
Verbose("Calculated layout for RS02 image:\n");
|
||||
|
||||
Verbose("data sectors = %lld\n", lay->dataSectors);
|
||||
Verbose("crc sectors = %lld\n", lay->crcSectors);
|
||||
Verbose("protected sectors = %lld (incl. 2 hdr sectors)\n", lay->protectedSectors);
|
||||
Verbose("reed solomon secs = %lld (%d roots, %d data)\n", lay->rsSectors,lay->nroots,lay->ndata);
|
||||
Verbose("header repeats = %lld (using modulo %lld)\n", lay->headers, lay->headerModulo);
|
||||
Verbose("added sectors = %lld\n", lay->eccSectors);
|
||||
Verbose("total image size = %lld\n", lay->eccSectors+lay->dataSectors);
|
||||
Verbose("data sectors = %" PRId64 "\n", lay->dataSectors);
|
||||
Verbose("crc sectors = %" PRId64 "\n", lay->crcSectors);
|
||||
Verbose("protected sectors = %" PRId64 " (incl. 2 hdr sectors)\n", lay->protectedSectors);
|
||||
Verbose("reed solomon secs = %" PRId64 " (%d roots, %d data)\n", lay->rsSectors,lay->nroots,lay->ndata);
|
||||
Verbose("header repeats = %" PRId64 " (using modulo %" PRId64 ")\n", lay->headers, lay->headerModulo);
|
||||
Verbose("added sectors = %" PRId64 "\n", lay->eccSectors);
|
||||
Verbose("total image size = %" PRId64 "\n", lay->eccSectors+lay->dataSectors);
|
||||
if(requested_roots > 0)
|
||||
Verbose("medium capacity = n.a.\n");
|
||||
else Verbose("medium capacity = %lld\n", lay->mediumCapacity);
|
||||
else Verbose("medium capacity = %" PRId64 "\n", lay->mediumCapacity);
|
||||
|
||||
Verbose("\nInterleaving layout:\n");
|
||||
Verbose("%lld sectors per ecc layer\n",lay->sectorsPerLayer);
|
||||
Verbose("first layer sector with CRC data %lld (sector# %lld)\n",
|
||||
Verbose("%" PRId64 " sectors per ecc layer\n",lay->sectorsPerLayer);
|
||||
Verbose("first layer sector with CRC data %" PRId64 " (sector# %" PRId64 ")\n",
|
||||
lay->firstCrcLayerIndex, lay->dataSectors+2);
|
||||
Verbose("\n");
|
||||
|
||||
@@ -577,11 +577,11 @@ void WriteRS02Headers(LargeFile *file, RS02Layout *lay, EccHeader *eh)
|
||||
int n;
|
||||
|
||||
if(!LargeSeek(file, 2048*lay->firstEccHeader))
|
||||
Stop(_("Failed seeking to ecc header at %lld: %s\n"), lay->firstEccHeader, strerror(errno));
|
||||
Stop(_("Failed seeking to ecc header at %" PRId64 ": %s\n"), lay->firstEccHeader, strerror(errno));
|
||||
|
||||
n = LargeWrite(file, eh, sizeof(EccHeader));
|
||||
if(n != sizeof(EccHeader))
|
||||
Stop(_("Failed writing ecc header at %lld: %s\n"), lay->firstEccHeader, strerror(errno));
|
||||
Stop(_("Failed writing ecc header at %" PRId64 ": %s\n"), lay->firstEccHeader, strerror(errno));
|
||||
|
||||
hpos = (lay->protectedSectors + lay->headerModulo - 1) / lay->headerModulo;
|
||||
hpos *= lay->headerModulo;
|
||||
@@ -589,11 +589,11 @@ void WriteRS02Headers(LargeFile *file, RS02Layout *lay, EccHeader *eh)
|
||||
while(hpos < end)
|
||||
{
|
||||
if(!LargeSeek(file, 2048*hpos))
|
||||
Stop(_("Failed seeking to ecc header at %lld: %s\n"), hpos, strerror(errno));
|
||||
Stop(_("Failed seeking to ecc header at %" PRId64 ": %s\n"), hpos, strerror(errno));
|
||||
|
||||
n = LargeWrite(file, eh, sizeof(EccHeader));
|
||||
if(n != sizeof(EccHeader))
|
||||
Stop(_("Failed writing ecc header at %lld: %s\n"), hpos, strerror(errno));
|
||||
Stop(_("Failed writing ecc header at %" PRId64 ": %s\n"), hpos, strerror(errno));
|
||||
|
||||
hpos += lay->headerModulo;
|
||||
}
|
||||
@@ -790,18 +790,18 @@ RS02Layout *RS02LayoutFromImage(Image *image)
|
||||
finish:
|
||||
Verbose("Calculated layout for RS02 image:\n");
|
||||
|
||||
Verbose("data sectors = %lld\n", lay->dataSectors);
|
||||
Verbose("crc sectors = %lld\n", lay->crcSectors);
|
||||
Verbose("protected sectors = %lld (incl. 2 hdr sectors)\n", lay->protectedSectors);
|
||||
Verbose("reed solomon secs = %lld (%d roots, %d data)\n", lay->rsSectors,lay->nroots,lay->ndata);
|
||||
Verbose("header repeats = %lld (using modulo %lld)\n", lay->headers, lay->headerModulo);
|
||||
Verbose("added sectors = %lld\n", lay->eccSectors);
|
||||
Verbose("total image size = %lld\n", lay->eccSectors+lay->dataSectors);
|
||||
Verbose("data sectors = %" PRId64 "\n", lay->dataSectors);
|
||||
Verbose("crc sectors = %" PRId64 "\n", lay->crcSectors);
|
||||
Verbose("protected sectors = %" PRId64 " (incl. 2 hdr sectors)\n", lay->protectedSectors);
|
||||
Verbose("reed solomon secs = %" PRId64 " (%d roots, %d data)\n", lay->rsSectors,lay->nroots,lay->ndata);
|
||||
Verbose("header repeats = %" PRId64 " (using modulo %" PRId64 ")\n", lay->headers, lay->headerModulo);
|
||||
Verbose("added sectors = %" PRId64 "\n", lay->eccSectors);
|
||||
Verbose("total image size = %" PRId64 "\n", lay->eccSectors+lay->dataSectors);
|
||||
Verbose("medium capacity = n.a.\n");
|
||||
|
||||
Verbose("\nInterleaving layout:\n");
|
||||
Verbose("%lld sectors per ecc layer\n",lay->sectorsPerLayer);
|
||||
Verbose("first layer sector with CRC data %lld (sector# %lld)\n",
|
||||
Verbose("%" PRId64 " sectors per ecc layer\n",lay->sectorsPerLayer);
|
||||
Verbose("first layer sector with CRC data %" PRId64 " (sector# %" PRId64 ")\n",
|
||||
lay->firstCrcLayerIndex, lay->dataSectors+2);
|
||||
Verbose("\n");
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
typedef struct
|
||||
{ Image *image;
|
||||
Method *self;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS02Widgets *wl;
|
||||
#endif
|
||||
RS02Layout *lay;
|
||||
@@ -56,7 +56,7 @@ static void ecc_cleanup(gpointer data)
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(ec->earlyTermination && ec->wl)
|
||||
SetLabelText(GTK_LABEL(ec->wl->encFootline),
|
||||
@@ -92,7 +92,7 @@ static void ecc_cleanup(gpointer data)
|
||||
|
||||
g_free(ec);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -108,7 +108,7 @@ static void ecc_cleanup(gpointer data)
|
||||
|
||||
static void abort_encoding(ecc_closure *ec, int truncate)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS02Widgets *wl = ec->wl;
|
||||
#endif
|
||||
|
||||
@@ -116,14 +116,14 @@ static void abort_encoding(ecc_closure *ec, int truncate)
|
||||
{ if(!LargeTruncate(ec->image->file, (gint64)(2048*ec->lay->dataSectors)))
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions == STOP_CURRENT_ACTION)
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
_("<span %s>Aborted by user request!</span> (partial ecc data removed from image)"),
|
||||
Closure->redMarkup);
|
||||
#endif
|
||||
}
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION)
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
@@ -149,14 +149,14 @@ static void remove_old_ecc(ecc_closure *ec)
|
||||
guint64 data_bytes;
|
||||
int answer;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->confirmDeletion || !Closure->guiMode)
|
||||
#endif
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Image \"%s\" already contains error correction information.\n"
|
||||
"Truncating image to data part (%lld sectors).\n"),
|
||||
"Truncating image to data part (%" PRId64 " sectors).\n"),
|
||||
Closure->imageName, data_sectors);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else answer = TRUE;
|
||||
#endif
|
||||
|
||||
@@ -172,8 +172,8 @@ static void remove_old_ecc(ecc_closure *ec)
|
||||
|
||||
PrintLog(_("Image size is now"));
|
||||
if(ec->image->inLast == 2048)
|
||||
PrintLog(_(": %lld medium sectors.\n"), ec->image->sectorSize);
|
||||
else PrintLog(_(": %lld medium sectors and %d bytes.\n"),
|
||||
PrintLog(_(": %" PRId64 " medium sectors.\n"), ec->image->sectorSize);
|
||||
else PrintLog(_(": %" PRId64 " medium sectors and %d bytes.\n"),
|
||||
ec->image->sectorSize-1, ec->image->inLast);
|
||||
}
|
||||
}
|
||||
@@ -213,7 +213,7 @@ static void check_image(ecc_closure *ec)
|
||||
{ unsigned char buf[2048];
|
||||
int expected,n,err;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
abort_encoding(ec, FALSE);
|
||||
#endif
|
||||
@@ -226,7 +226,7 @@ static void check_image(ecc_closure *ec)
|
||||
|
||||
n = LargeRead(image->file, buf, expected);
|
||||
if(n != expected)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),sectors,strerror(errno));
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),sectors,strerror(errno));
|
||||
|
||||
/* Look for the dead sector marker */
|
||||
|
||||
@@ -237,14 +237,14 @@ static void check_image(ecc_closure *ec)
|
||||
"Error correction information can only be\n"
|
||||
"appended to complete (undamaged) images.\n"));
|
||||
else
|
||||
Stop(_("Sector %lld in the image is marked unreadable\n"
|
||||
Stop(_("Sector %" PRId64 " in the image is marked unreadable\n"
|
||||
"and seems to come from a different medium.\n\n"
|
||||
"The image was probably mastered from defective content.\n"
|
||||
"For example it might contain one or more files which came\n"
|
||||
"from a damaged medium which was NOT fully recovered.\n"
|
||||
"This means that some files may have been silently corrupted.\n\n"
|
||||
"Error correction information can only be\n"
|
||||
"appended to complete (undamaged) images.\n"));
|
||||
"appended to complete (undamaged) images.\n"), sectors);
|
||||
}
|
||||
|
||||
/* Update and cache the CRC sums */
|
||||
@@ -256,7 +256,7 @@ static void check_image(ecc_closure *ec)
|
||||
if(last_percent != percent)
|
||||
{ PrintProgress(_("Preparing image (checksums, adding space): %3d%%") ,percent);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(ec->wl->encPBar1, percent, 100);
|
||||
#endif
|
||||
@@ -308,7 +308,7 @@ static void expand_image(ecc_closure *ec)
|
||||
{ unsigned char buf[2048];
|
||||
int n;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
abort_encoding(ec, TRUE);
|
||||
#endif
|
||||
@@ -326,7 +326,7 @@ static void expand_image(ecc_closure *ec)
|
||||
PrintProgress(_("Preparing image (checksums taken from cache, adding space): %3d%%") ,percent);
|
||||
else PrintProgress(_("Preparing image (checksums, adding space): %3d%%"), percent);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(ec->wl->encPBar1, percent, 100);
|
||||
#endif
|
||||
@@ -340,7 +340,7 @@ static void expand_image(ecc_closure *ec)
|
||||
else PrintProgress(_("Preparing image (checksums, adding space): %3d%%"), 100);
|
||||
PrintProgress("\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(ec->wl->encPBar1, 100, 100);
|
||||
#endif
|
||||
@@ -374,7 +374,7 @@ static void write_crc(ecc_closure *ec)
|
||||
/*** Calculate the CRCs */
|
||||
|
||||
if(!LargeSeek(image->file, 2048*crc_sector))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"), crc_sector, strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"), crc_sector, strerror(errno));
|
||||
|
||||
for(layer_sector=0; layer_sector<lay->sectorsPerLayer; layer_sector++)
|
||||
{ gint64 layer_index = (layer_sector + layer_offset) % lay->sectorsPerLayer;
|
||||
@@ -397,7 +397,7 @@ static void write_crc(ecc_closure *ec)
|
||||
{ int n = LargeWrite(image->file, crc_buf, 2048);
|
||||
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), crc_sector, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), crc_sector, strerror(errno));
|
||||
MD5Update(&md5ctxt, (unsigned char*)crc_buf, n);
|
||||
|
||||
crc_sector++;
|
||||
@@ -423,7 +423,7 @@ static void write_crc(ecc_closure *ec)
|
||||
n = LargeWrite(image->file, crc_buf, 2048);
|
||||
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), crc_sector, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), crc_sector, strerror(errno));
|
||||
|
||||
MD5Update(&md5ctxt, (unsigned char*)crc_buf, n);
|
||||
}
|
||||
@@ -495,7 +495,7 @@ static gint32 *enc_alpha_to;
|
||||
|
||||
/*** Show the second progress bar */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ ShowWidget(ec->wl->encPBar2);
|
||||
ShowWidget(ec->wl->encLabel2);
|
||||
@@ -607,7 +607,7 @@ static gint32 *enc_alpha_to;
|
||||
{ int offset = 0;
|
||||
unsigned char *par_idx = ec->parity;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
abort_encoding(ec, TRUE);
|
||||
#endif
|
||||
@@ -997,7 +997,7 @@ static gint32 *enc_alpha_to;
|
||||
percent = (1000*progress)/max_percent;
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(ec->wl->encPBar2, percent, 1000);
|
||||
else
|
||||
@@ -1029,10 +1029,10 @@ static gint32 *enc_alpha_to;
|
||||
{ gint64 s = RS02EccSectorIndex(lay, k, chunk + si);
|
||||
|
||||
if(!LargeSeek(image->file, 2048*s))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
|
||||
if(LargeWrite(image->file, ec->slice[k]+idx, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
|
||||
MD5Update(&ec->md5Ctxt[k], ec->slice[k]+idx, 2048);
|
||||
}
|
||||
@@ -1060,7 +1060,7 @@ static gint32 *enc_alpha_to;
|
||||
|
||||
void RS02Create(void)
|
||||
{ Method *self = FindMethod("RS02");
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS02Widgets *wl = (RS02Widgets*)self->widgetList;
|
||||
#endif
|
||||
Image *image = NULL;
|
||||
@@ -1082,21 +1082,21 @@ void RS02Create(void)
|
||||
}
|
||||
|
||||
if(image->inLast == 2048)
|
||||
PrintLog(_(": %lld medium sectors.\n"), image->sectorSize);
|
||||
else PrintLog(_(": %lld medium sectors and %d bytes.\n"),
|
||||
PrintLog(_(": %" PRId64 " medium sectors.\n"), image->sectorSize);
|
||||
else PrintLog(_(": %" PRId64 " medium sectors and %d bytes.\n"),
|
||||
image->sectorSize-1, image->inLast);
|
||||
|
||||
/*** Register the cleanup procedure for GUI mode */
|
||||
|
||||
ec->image = image;
|
||||
ec->self = self;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
ec->wl = wl;
|
||||
#endif
|
||||
ec->eh = g_malloc0(sizeof(EccHeader));
|
||||
ec->timer = g_timer_new();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode) /* Preliminary fill text for the head line */
|
||||
SetLabelText(GTK_LABEL(wl->encHeadline),
|
||||
_("<big>Augmenting the image with error correction data.</big>\n<i>%s</i>"),
|
||||
@@ -1113,9 +1113,9 @@ void RS02Create(void)
|
||||
|
||||
/*** Announce what we are going to do */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode) /* Preliminary fill text for the head line */
|
||||
{ ec->msg = g_strdup_printf(_("Encoding with Method RS02: %lld MiB data, %lld MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
{ ec->msg = g_strdup_printf(_("Encoding with Method RS02: %" PRId64 " MiB data, %" PRId64 " MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
lay->dataSectors/512, lay->eccSectors/512, lay->nroots, lay->redundancy);
|
||||
|
||||
SetLabelText(GTK_LABEL(wl->encHeadline),
|
||||
@@ -1124,7 +1124,7 @@ void RS02Create(void)
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ ec->msg = g_strdup_printf(_("Augmenting image with Method RS02:\n %lld MiB data, %lld MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
{ ec->msg = g_strdup_printf(_("Augmenting image with Method RS02:\n %" PRId64 " MiB data, %" PRId64 " MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
lay->dataSectors/512, lay->eccSectors/512, lay->nroots, lay->redundancy);
|
||||
|
||||
PrintLog("%s\n",ec->msg);
|
||||
@@ -1134,7 +1134,7 @@ void RS02Create(void)
|
||||
|
||||
if(lay->nroots < 8)
|
||||
Stop(_("Not enough space on medium left for error correction data.\n"
|
||||
"Data portion of image: %lld sect.; maximum possible size: %lld sect.\n"
|
||||
"Data portion of image: %" PRId64 " sect.; maximum possible size: %" PRId64 " sect.\n"
|
||||
"If reducing the image size or using a larger medium is\n"
|
||||
"not an option, please create a separate error correction file."),
|
||||
lay->dataSectors, lay->mediumCapacity);
|
||||
@@ -1143,8 +1143,8 @@ void RS02Create(void)
|
||||
{ int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Using redundancies below 20%% may not give\n"
|
||||
"the expected data loss protection.\n"), NULL);
|
||||
"%s", _("Using redundancies below 20% may not give\n"
|
||||
"the expected data loss protection.\n"));
|
||||
|
||||
if(!answer)
|
||||
abort_encoding(ec, FALSE);
|
||||
@@ -1176,17 +1176,17 @@ void RS02Create(void)
|
||||
|
||||
PrintProgress(_("Ecc generation: 100.0%%\n"));
|
||||
PrintLog(_("Image has been augmented with error correction data.\n"
|
||||
"New image size is %lld MiB (%lld sectors).\n"),
|
||||
"New image size is %" PRId64 " MiB (%" PRId64 " sectors).\n"),
|
||||
(lay->dataSectors + lay->eccSectors)/512,
|
||||
lay->dataSectors+lay->eccSectors);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetProgress(wl->encPBar2, 100, 100);
|
||||
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
_("Image has been augmented with error correction data.\n"
|
||||
"New image size is %lld MiB (%lld sectors).\n"),
|
||||
"New image size is %" PRId64 " MiB (%" PRId64 " sectors).\n"),
|
||||
(lay->dataSectors + lay->eccSectors)/512,
|
||||
lay->dataSectors+lay->eccSectors);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
typedef struct
|
||||
{ Image *image;
|
||||
EccHeader *eh;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS02Widgets *wl;
|
||||
#endif
|
||||
RS02Layout *lay;
|
||||
@@ -49,7 +49,7 @@ static void fix_cleanup(gpointer data)
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(fc->earlyTermination)
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
@@ -77,7 +77,7 @@ static void fix_cleanup(gpointer data)
|
||||
|
||||
g_free(fc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -111,7 +111,7 @@ static void expand_image(fix_closure *fc, gint64 new_size)
|
||||
percent = (100*sectors) / new_sectors;
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
;
|
||||
else
|
||||
@@ -121,7 +121,7 @@ static void expand_image(fix_closure *fc, gint64 new_size)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
;
|
||||
else
|
||||
@@ -141,7 +141,7 @@ static void expand_image(fix_closure *fc, gint64 new_size)
|
||||
|
||||
void RS02Fix(Image *image)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Method *self = FindMethod("RS02");
|
||||
RS02Widgets *wl = (RS02Widgets*)self->widgetList;
|
||||
#endif
|
||||
@@ -183,7 +183,7 @@ void RS02Fix(Image *image)
|
||||
/*** Register the cleanup procedure for GUI mode */
|
||||
|
||||
fc->image = image;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
fc->wl = wl;
|
||||
#endif
|
||||
fc->earlyTermination = TRUE;
|
||||
@@ -191,7 +191,7 @@ void RS02Fix(Image *image)
|
||||
|
||||
/*** Open the image file */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->fixHeadline),
|
||||
_("<big>Repairing the image.</big>\n<i>%s</i>"),
|
||||
@@ -219,7 +219,7 @@ void RS02Fix(Image *image)
|
||||
|
||||
/*** Announce what we going to do */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ char *msg = g_strdup_printf(_("Image contains error correction data: Method RS02, %d roots, %4.1f%% redundancy."),
|
||||
eh->eccBytes,
|
||||
@@ -247,14 +247,14 @@ void RS02Fix(Image *image)
|
||||
if(diff>0 && diff<=2)
|
||||
{ int answer;
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Image file is %lld sectors longer than expected.\n"
|
||||
_("Image file is %" PRId64 " sectors longer than expected.\n"
|
||||
"Assuming this is a TAO mode medium.\n"
|
||||
"%lld sectors will be removed from the image end.\n"),
|
||||
"%" PRId64 " sectors will be removed from the image end.\n"),
|
||||
diff, diff);
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
fc->wl->fixFootline,
|
||||
_("<span %s>Aborted by user request!</span>"),
|
||||
@@ -268,7 +268,7 @@ void RS02Fix(Image *image)
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(diff>2 && Closure->guiMode)
|
||||
{ int answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
trans,
|
||||
@@ -287,11 +287,11 @@ void RS02Fix(Image *image)
|
||||
if(!TruncateImage(image, (gint64)(2048*expected_sectors)))
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
|
||||
PrintLog(_("Image has been truncated by %lld sectors.\n"), diff);
|
||||
PrintLog(_("Image has been truncated by %" PRId64 " sectors.\n"), diff);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(diff>2 && !Closure->guiMode)
|
||||
#else
|
||||
if(diff>2)
|
||||
@@ -305,7 +305,7 @@ void RS02Fix(Image *image)
|
||||
if(!TruncateImage(image, (gint64)(2048*expected_sectors)))
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
|
||||
PrintLog(_("Image has been truncated by %lld sectors.\n"), diff);
|
||||
PrintLog(_("Image has been truncated by %" PRId64 " sectors.\n"), diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ void RS02Fix(Image *image)
|
||||
|
||||
/* See if user hit the Stop button */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
@@ -411,10 +411,10 @@ void RS02Fix(Image *image)
|
||||
{ gint64 esi = RS02EccSectorIndex(lay, i, ecc_idx+j);
|
||||
|
||||
if(!LargeSeek(image->file, 2048*esi))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"), esi, strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"), esi, strerror(errno));
|
||||
|
||||
if(LargeRead(image->file, fc->imgBlock[i+ndata]+offset, 2048) != 2048)
|
||||
Stop(_("Failed reading sector %lld in image: %s"), esi, strerror(errno));
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"), esi, strerror(errno));
|
||||
|
||||
offset += 2048;
|
||||
}
|
||||
@@ -461,7 +461,7 @@ void RS02Fix(Image *image)
|
||||
if(crc_valid && !erasure_map[i] && crc != crc_buf[crc_idx])
|
||||
{ erasure_map[i] = 3;
|
||||
erasure_list[erasure_count++] = i;
|
||||
PrintCLI(_("CRC error in sector %lld\n"),block_idx[i]);
|
||||
PrintCLI(_("CRC error in sector %" PRId64 "\n"),block_idx[i]);
|
||||
damaged_sectors++;
|
||||
crc_errors++;
|
||||
}
|
||||
@@ -493,16 +493,16 @@ void RS02Fix(Image *image)
|
||||
|
||||
if(erasure_count>lay->nroots) /* uncorrectable */
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
{ PrintCLI(_("* Ecc block %lld: %3d unrepairable sectors: "), s, erasure_count);
|
||||
{ PrintCLI(_("* Ecc block %" PRId64 ": %3d unrepairable sectors: "), s, erasure_count);
|
||||
|
||||
for(i=0; i<erasure_count; i++)
|
||||
{ gint64 loc = erasure_list[i];
|
||||
|
||||
if(loc < ndata) PrintCLI("%lld ", block_idx[loc]);
|
||||
else PrintCLI("%lld ", RS02EccSectorIndex(lay, loc-ndata, ecc_idx));
|
||||
if(loc < ndata) PrintCLI("%" PRId64 " ", block_idx[loc]);
|
||||
else PrintCLI("%" PRId64 " ", RS02EccSectorIndex(lay, loc-ndata, ecc_idx));
|
||||
|
||||
}
|
||||
PrintCLI("\n");
|
||||
@@ -660,8 +660,8 @@ void RS02Fix(Image *image)
|
||||
for(i=0; i<erasure_count; i++)
|
||||
{ gint64 loc = erasure_list[i];
|
||||
|
||||
if(loc < ndata) PrintLog("%lld ", block_idx[loc]);
|
||||
else PrintLog("%lld ", RS02EccSectorIndex(lay, loc-ndata, ecc_idx));
|
||||
if(loc < ndata) PrintLog("%" PRId64 " ", block_idx[loc]);
|
||||
else PrintLog("%" PRId64 " ", RS02EccSectorIndex(lay, loc-ndata, ecc_idx));
|
||||
}
|
||||
PrintLog("\n");
|
||||
uncorrected += erasure_count;
|
||||
@@ -778,12 +778,12 @@ void RS02Fix(Image *image)
|
||||
|
||||
corrected++;
|
||||
|
||||
PrintCLI("%lld%c ", sec, type);
|
||||
PrintCLI("%" PRId64 "%c ", sec, type);
|
||||
|
||||
/* Write the recovered sector */
|
||||
|
||||
if(!LargeSeek(image->file, (gint64)(2048*sec)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
sec, "FW", strerror(errno));
|
||||
|
||||
/* augmented images can not have sizes not a multiple of 2048,
|
||||
@@ -791,7 +791,7 @@ void RS02Fix(Image *image)
|
||||
|
||||
n = LargeWrite(image->file, cache_offset+fc->imgBlock[i], 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("could not write medium sector %lld:\n%s"), sec, strerror(errno));
|
||||
Stop(_("could not write medium sector %" PRId64 ":\n%s"), sec, strerror(errno));
|
||||
|
||||
}
|
||||
|
||||
@@ -821,7 +821,7 @@ skip:
|
||||
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{
|
||||
RS02AddFixValues(wl, percent, local_plot_max);
|
||||
@@ -848,15 +848,15 @@ skip:
|
||||
|
||||
PrintProgress(_("Ecc progress: 100.0%%\n"));
|
||||
|
||||
if(corrected > 0) PrintLog(_("Repaired sectors: %lld (%lld data, %lld ecc)\n"),
|
||||
if(corrected > 0) PrintLog(_("Repaired sectors: %" PRId64 " (%" PRId64 " data, %" PRId64 " ecc)\n"),
|
||||
corrected, data_corr, ecc_corr);
|
||||
if(uncorrected > 0)
|
||||
{ PrintLog(_("Unrepaired sectors: %lld\n"), uncorrected);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("Unrepaired sectors: %" PRId64 "\n"), uncorrected);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->fixNotebook, 1, wl->fixFootline,
|
||||
_("Image sectors could not be fully restored "
|
||||
"(%lld repaired; <span %s>%lld unrepaired</span>)"),
|
||||
"(%" PRId64 " repaired; <span %s>%" PRId64 " unrepaired</span>)"),
|
||||
corrected, Closure->redMarkup, uncorrected);
|
||||
#endif
|
||||
}
|
||||
@@ -874,16 +874,16 @@ skip:
|
||||
PrintLog(_("Erasure counts per ecc block: avg = %.1f; worst = %d.\n"),
|
||||
(double)damaged_sectors/(double)damaged_eccsecs,worst_ecc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && t)
|
||||
SwitchAndSetFootline(wl->fixNotebook, 1, wl->fixFootline,
|
||||
"%s %s", _("Repair results:"), t);
|
||||
#endif
|
||||
|
||||
Verbose("\nSummary of processed sectors:\n");
|
||||
Verbose("%lld damaged sectors\n", damaged_sectors);
|
||||
Verbose("%lld CRC errors\n", crc_errors);
|
||||
Verbose("%lld of %lld ecc blocks damaged (%lld / %lld sectors)\n",
|
||||
Verbose("%" PRId64 " damaged sectors\n", damaged_sectors);
|
||||
Verbose("%" PRId64 " CRC errors\n", crc_errors);
|
||||
Verbose("%" PRId64 " of %" PRId64 " ecc blocks damaged (%" PRId64 " / %" PRId64 " sectors)\n",
|
||||
damaged_eccblocks, 2048*lay->sectorsPerLayer,
|
||||
damaged_eccsecs, lay->sectorsPerLayer);
|
||||
if(data_count != lay->dataSectors)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef RS02INCLUDES_H
|
||||
#define RS02INCLUDES_H
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/* Data structs from rs02-window.c */
|
||||
|
||||
typedef struct
|
||||
@@ -122,7 +122,7 @@ typedef struct
|
||||
* These are exported via the Method struct
|
||||
*/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void CreateRS02EncWindow(Method*, GtkWidget*);
|
||||
void CreateRS02FixWindow(Method*, GtkWidget*);
|
||||
void CreateRS02PrefsPage(Method*, GtkWidget*);
|
||||
@@ -188,7 +188,7 @@ void RS02Fix(Image*);
|
||||
|
||||
int RS02Recognize(Image*);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/* rs02-window.c */
|
||||
|
||||
void RS02AddFixValues(RS02Widgets*, int, int);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*** Recognize RS02 error correction data in the image
|
||||
***/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
|
||||
/*
|
||||
* Dialog components for disabling RS02 search
|
||||
@@ -78,7 +78,7 @@ static int try_sector(Image *image, gint64 pos, EccHeader **ehptr, unsigned char
|
||||
|
||||
/* Try reading the sector */
|
||||
|
||||
Verbose("try_sector: trying sector %lld\n", pos);
|
||||
Verbose("try_sector: trying sector %" PRId64 "\n", pos);
|
||||
|
||||
if(ImageReadSectors(image, secbuf, pos, 2) != 2)
|
||||
{ Verbose("try_sector: read error, trying next header\n");
|
||||
@@ -244,23 +244,23 @@ int RS02Recognize(Image *image)
|
||||
while(header_modulo >= 32)
|
||||
{ pos = max_sectors & ~(header_modulo - 1);
|
||||
|
||||
Verbose("FindHeaderInMedium: Trying modulo %lld\n", header_modulo);
|
||||
Verbose("FindHeaderInMedium: Trying modulo %" PRId64 "\n", header_modulo);
|
||||
|
||||
while(pos > 0)
|
||||
{ int result;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
goto bail_out;
|
||||
#endif
|
||||
|
||||
if(GetBit(try_next_header, pos))
|
||||
{ Verbose("Sector %lld cached; skipping\n", pos);
|
||||
{ Verbose("Sector %" PRId64 " cached; skipping\n", pos);
|
||||
goto check_next_header;
|
||||
}
|
||||
|
||||
if(GetBit(try_next_modulo, pos))
|
||||
{ Verbose("Sector %lld cached; skipping modulo\n", pos);
|
||||
{ Verbose("Sector %" PRId64 " cached; skipping modulo\n", pos);
|
||||
goto check_next_modulo;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ int RS02Recognize(Image *image)
|
||||
read_count++;
|
||||
if(!answered_continue && read_count > 5)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ int answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, insert_buttons,
|
||||
_("Faster medium initialization\n\n"
|
||||
@@ -304,7 +304,7 @@ int RS02Recognize(Image *image)
|
||||
header_modulo >>= 1;
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
bail_out:
|
||||
#endif
|
||||
FreeBitmap(try_next_header);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
*** Reset the verify output window
|
||||
***/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
|
||||
void ResetRS02VerifyWindow(Method *self)
|
||||
{ RS02Widgets *wl = (RS02Widgets*)self->widgetList;
|
||||
@@ -344,7 +344,7 @@ typedef struct
|
||||
{ Image *image;
|
||||
EccHeader *eh;
|
||||
RS02Layout *lay;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS02Widgets *wl;
|
||||
#endif
|
||||
Bitmap *map;
|
||||
@@ -358,7 +358,7 @@ static void cleanup(gpointer data)
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
AllowActions(TRUE);
|
||||
#endif
|
||||
@@ -371,7 +371,7 @@ static void cleanup(gpointer data)
|
||||
|
||||
g_free(cc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -401,7 +401,7 @@ static void read_crc(verify_closure *cc, RS02Layout *lay)
|
||||
/* First sector containing crc data */
|
||||
|
||||
if(!LargeSeek(cc->image->file, 2048*(lay->dataSectors+2)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),
|
||||
lay->dataSectors+2, strerror(errno));
|
||||
crc_sector = lay->dataSectors+2;
|
||||
|
||||
@@ -512,10 +512,10 @@ static int prognosis(verify_closure *vc, gint64 missing, gint64 expected)
|
||||
PrintLog(_("- erasure counts : avg = %.1f; worst = %d per ecc block.\n"),
|
||||
(double)damaged_sectors/(double)damaged_eccsecs,worst_ecc);
|
||||
|
||||
PrintLog(_("- prognosis : %lld of %lld sectors recoverable (%d.%d%%)\n"),
|
||||
PrintLog(_("- prognosis : %" PRId64 " of %" PRId64 " sectors recoverable (%d.%d%%)\n"),
|
||||
recoverable, expected, percentage/10, percentage%10);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(vc->wl->cmpEcc1Name), "");
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpEcc1Msg), "");
|
||||
@@ -528,7 +528,7 @@ static int prognosis(verify_closure *vc, gint64 missing, gint64 expected)
|
||||
(double)damaged_sectors/(double)damaged_eccsecs,worst_ecc);
|
||||
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpEcc3Msg),
|
||||
_("<span %s>%lld of %lld sectors recoverable (%d.%d%%)</span>"),
|
||||
_("<span %s>%" PRId64 " of %" PRId64 " sectors recoverable (%d.%d%%)</span>"),
|
||||
recoverable < expected ? Closure->redMarkup : Closure->greenMarkup,
|
||||
recoverable, expected, percentage/10, percentage%10);
|
||||
}
|
||||
@@ -548,7 +548,7 @@ static int prognosis(verify_closure *vc, gint64 missing, gint64 expected)
|
||||
|
||||
void RS02Verify(Image *image)
|
||||
{ verify_closure *cc = g_malloc0(sizeof(verify_closure));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Method *self = FindMethod("RS02");
|
||||
RS02Widgets *wl = self->widgetList;
|
||||
#endif
|
||||
@@ -574,7 +574,7 @@ void RS02Verify(Image *image)
|
||||
gint64 hdr_missing, hdr_crc_errors;
|
||||
gint64 hdr_ok,hdr_pos,hdr_correctable;
|
||||
gint64 ecc_sector,expected_sectors;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int ecc_md5_failure = FALSE;
|
||||
#endif
|
||||
int ecc_slice;
|
||||
@@ -583,7 +583,7 @@ void RS02Verify(Image *image)
|
||||
char method[5];
|
||||
char *img_advice = NULL;
|
||||
char *ecc_advice = NULL;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int try_it;
|
||||
#endif
|
||||
int unrecoverable_sectors = 0;
|
||||
@@ -591,7 +591,7 @@ void RS02Verify(Image *image)
|
||||
/*** Prepare for early termination */
|
||||
|
||||
RegisterCleanup(_("Check aborted"), cleanup, cc);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
cc->wl = wl;
|
||||
#endif
|
||||
|
||||
@@ -609,7 +609,7 @@ void RS02Verify(Image *image)
|
||||
|
||||
/*** Print information on image size */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpHeadline), "<big>%s</big>\n<i>%s</i>",
|
||||
_("Checking the image file."),
|
||||
@@ -617,19 +617,19 @@ void RS02Verify(Image *image)
|
||||
#endif
|
||||
|
||||
PrintLog("\n%s: ",Closure->imageName);
|
||||
PrintLog(_("present, contains %lld medium sectors.\n"),image->sectorSize);
|
||||
PrintLog(_("present, contains %" PRId64 " medium sectors.\n"),image->sectorSize);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(expected_sectors == image->sectorSize)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageSectors), "%lld", image->sectorSize);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageSectors), "%" PRId64 "", image->sectorSize);
|
||||
}
|
||||
else
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageSectors), "<span %s>%lld</span>",
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageSectors), "<span %s>%" PRId64 "</span>",
|
||||
Closure->redMarkup, image->sectorSize);
|
||||
if(expected_sectors > image->sectorSize)
|
||||
img_advice = g_strdup_printf(_("<span %s>Image file is %lld sectors shorter than expected.</span>"), Closure->redMarkup, expected_sectors - image->sectorSize);
|
||||
else img_advice = g_strdup_printf(_("<span %s>Image file is %lld sectors longer than expected.</span>"), Closure->redMarkup, image->sectorSize - expected_sectors);
|
||||
img_advice = g_strdup_printf(_("<span %s>Image file is %" PRId64 " sectors shorter than expected.</span>"), Closure->redMarkup, expected_sectors - image->sectorSize);
|
||||
else img_advice = g_strdup_printf(_("<span %s>Image file is %" PRId64 " sectors longer than expected.</span>"), Closure->redMarkup, image->sectorSize - expected_sectors);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -646,11 +646,11 @@ void RS02Verify(Image *image)
|
||||
{ int n;
|
||||
|
||||
if(!LargeSeek(image->file, 2048*hdr_pos))
|
||||
Stop(_("Failed seeking to ecc header at %lld: %s\n"), hdr_pos, strerror(errno));
|
||||
Stop(_("Failed seeking to ecc header at %" PRId64 ": %s\n"), hdr_pos, strerror(errno));
|
||||
|
||||
n = LargeRead(image->file, &eh, sizeof(EccHeader));
|
||||
if(n != sizeof(EccHeader))
|
||||
Stop(_("Failed reading ecc header at %lld: %s\n"), hdr_pos, strerror(errno));
|
||||
Stop(_("Failed reading ecc header at %" PRId64 ": %s\n"), hdr_pos, strerror(errno));
|
||||
|
||||
/* Missing header blocks are always recoverable by copying information
|
||||
from the surviving headers */
|
||||
@@ -689,12 +689,12 @@ void RS02Verify(Image *image)
|
||||
hdr_pos = (lay->protectedSectors + lay->headerModulo - 1) & ~(lay->headerModulo-1);
|
||||
else hdr_pos += lay->headerModulo;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(!hdr_crc_errors && !hdr_missing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccHeaders), _("complete"));
|
||||
else
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccHeaders), _("<span %s>%lld ok, %lld CRC errors, %lld missing</span>"),
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccHeaders), _("<span %s>%" PRId64 " ok, %" PRId64 " CRC errors, %" PRId64 " missing</span>"),
|
||||
Closure->redMarkup, hdr_ok, hdr_crc_errors, hdr_missing);
|
||||
}
|
||||
}
|
||||
@@ -734,7 +734,7 @@ void RS02Verify(Image *image)
|
||||
|
||||
/* Check for user interruption */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageResult),
|
||||
@@ -781,8 +781,8 @@ void RS02Verify(Image *image)
|
||||
if(!current_missing || s==expected_sectors-1)
|
||||
{ if(first_missing>=0)
|
||||
{ if(first_missing == last_missing)
|
||||
PrintCLI(_("* missing sector : %lld\n"), first_missing);
|
||||
else PrintCLI(_("* missing sectors : %lld - %lld\n"), first_missing, last_missing);
|
||||
PrintCLI(_("* missing sector : %" PRId64 "\n"), first_missing);
|
||||
else PrintCLI(_("* missing sectors : %" PRId64 " - %" PRId64 "\n"), first_missing, last_missing);
|
||||
first_missing = -1;
|
||||
}
|
||||
}
|
||||
@@ -794,7 +794,7 @@ void RS02Verify(Image *image)
|
||||
{ guint32 crc = Crc32(buf, 2048);
|
||||
|
||||
if(cc->crcValid[crc_idx] && crc != cc->crcBuf[crc_idx])
|
||||
{ PrintCLI(_("* CRC error, sector: %lld\n"), s);
|
||||
{ PrintCLI(_("* CRC error, sector: %" PRId64 "\n"), s);
|
||||
data_crc_errors++;
|
||||
new_crc_errors++;
|
||||
defective = TRUE;
|
||||
@@ -820,7 +820,7 @@ void RS02Verify(Image *image)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
percent = (VERIFY_IMAGE_SEGMENTS*(s+1))/expected_sectors;
|
||||
else
|
||||
@@ -829,20 +829,20 @@ void RS02Verify(Image *image)
|
||||
|
||||
if(last_percent != percent)
|
||||
{ PrintProgress(_("- testing sectors : %3d%%") ,percent);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ add_verify_values(self, percent, new_missing, new_crc_errors);
|
||||
if(data_missing || data_crc_errors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpDataSection),
|
||||
_("<span %s>%lld sectors missing; %lld CRC errors</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing; %" PRId64 " CRC errors</span>"),
|
||||
Closure->redMarkup, data_missing, data_crc_errors);
|
||||
if(crc_missing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpCrcSection),
|
||||
_("<span %s>%lld sectors missing</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing</span>"),
|
||||
Closure->redMarkup, crc_missing);
|
||||
if(ecc_missing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccSection),
|
||||
_("<span %s>%lld sectors missing</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing</span>"),
|
||||
Closure->redMarkup, ecc_missing);
|
||||
}
|
||||
#endif
|
||||
@@ -853,19 +853,19 @@ void RS02Verify(Image *image)
|
||||
|
||||
/* Complete damage summary */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(data_missing || data_crc_errors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpDataSection),
|
||||
_("<span %s>%lld sectors missing; %lld CRC errors</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing; %" PRId64 " CRC errors</span>"),
|
||||
Closure->redMarkup, data_missing, data_crc_errors);
|
||||
if(crc_missing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpCrcSection),
|
||||
_("<span %s>%lld sectors missing</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing</span>"),
|
||||
Closure->redMarkup, crc_missing);
|
||||
if(ecc_missing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccSection),
|
||||
_("<span %s>%lld sectors missing</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing</span>"),
|
||||
Closure->redMarkup, ecc_missing);
|
||||
}
|
||||
#endif
|
||||
@@ -889,25 +889,25 @@ void RS02Verify(Image *image)
|
||||
PrintLog(_("* suspicious image : contains damaged ecc headers\n"));
|
||||
else
|
||||
{ if(!total_crc_errors)
|
||||
PrintLog(_("* BAD image : %lld sectors missing\n"), total_missing);
|
||||
PrintLog(_("* BAD image : %" PRId64 " sectors missing\n"), total_missing);
|
||||
if(!total_missing)
|
||||
PrintLog(_("* suspicious image : all sectors present, but %lld CRC errors\n"), total_crc_errors);
|
||||
PrintLog(_("* suspicious image : all sectors present, but %" PRId64 " CRC errors\n"), total_crc_errors);
|
||||
if(total_missing && total_crc_errors)
|
||||
PrintLog(_("* BAD image : %lld sectors missing, %lld CRC errors\n"),
|
||||
PrintLog(_("* BAD image : %" PRId64 " sectors missing, %" PRId64 " CRC errors\n"),
|
||||
total_missing, total_crc_errors);
|
||||
}
|
||||
|
||||
PrintLog(_(" ... ecc headers : %lld ok, %lld CRC errors, %lld missing\n"),
|
||||
PrintLog(_(" ... ecc headers : %" PRId64 " ok, %" PRId64 " CRC errors, %" PRId64 " missing\n"),
|
||||
hdr_ok, hdr_crc_errors, hdr_missing);
|
||||
PrintLog(_(" ... data section : %lld sectors missing; %lld CRC errors\n"),
|
||||
PrintLog(_(" ... data section : %" PRId64 " sectors missing; %" PRId64 " CRC errors\n"),
|
||||
data_missing, data_crc_errors);
|
||||
if(!data_missing)
|
||||
PrintLog(_(" ... data md5sum : %s\n"), data_digest);
|
||||
PrintLog(_(" ... crc section : %lld sectors missing\n"), crc_missing);
|
||||
PrintLog(_(" ... ecc section : %lld sectors missing\n"), ecc_missing);
|
||||
PrintLog(_(" ... crc section : %" PRId64 " sectors missing\n"), crc_missing);
|
||||
PrintLog(_(" ... ecc section : %" PRId64 " sectors missing\n"), ecc_missing);
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(!data_missing && !data_crc_errors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpDataSection), _("complete"));
|
||||
@@ -917,7 +917,7 @@ void RS02Verify(Image *image)
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageMd5Sum), "%s", data_missing ? "-" : data_digest);
|
||||
|
||||
if(img_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), img_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), "%s", img_advice);
|
||||
g_free(img_advice);
|
||||
}
|
||||
else
|
||||
@@ -935,7 +935,7 @@ void RS02Verify(Image *image)
|
||||
#endif
|
||||
{
|
||||
if(img_advice)
|
||||
{ PrintLog(img_advice);
|
||||
{ PrintLog("%s", img_advice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -957,7 +957,7 @@ continue_with_ecc:
|
||||
PrintLog(format, _("created by dvdisaster"), major, minor, micro, unstable);
|
||||
PrintLog("\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SwitchAndSetFootline(wl->cmpEccNotebook, 1,
|
||||
wl->cmpEccCreatedBy,
|
||||
@@ -972,7 +972,7 @@ continue_with_ecc:
|
||||
PrintLog(format, _("created by dvdisaster"), major, minor, unstable);
|
||||
PrintLog("\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->cmpEccNotebook, 1,
|
||||
wl->cmpEccCreatedBy,
|
||||
@@ -989,7 +989,7 @@ continue_with_ecc:
|
||||
method, eh->eccBytes,
|
||||
((double)eh->eccBytes*100.0)/(double)eh->dataBytes);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMethod), _("%4s, %d roots, %4.1f%% redundancy"),
|
||||
method, eh->eccBytes,
|
||||
@@ -1004,7 +1004,7 @@ continue_with_ecc:
|
||||
(eh->neededVersion%10000)/100);
|
||||
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccRequires), "dvdisaster-%d.%d",
|
||||
eh->neededVersion/10000,
|
||||
@@ -1019,7 +1019,7 @@ continue_with_ecc:
|
||||
(eh->neededVersion%10000)/100);
|
||||
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccRequires),
|
||||
"<span %s>dvdisaster-%d.%d</span>",
|
||||
@@ -1040,25 +1040,25 @@ continue_with_ecc:
|
||||
/* Number of sectors medium is supposed to have */
|
||||
|
||||
if(image->sectorSize == expected_sectors)
|
||||
{ PrintLog(_("- medium sectors : %lld / %lld (good)\n"),
|
||||
{ PrintLog(_("- medium sectors : %" PRId64 " / %" PRId64 " (good)\n"),
|
||||
expected_sectors, lay->dataSectors);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "%lld / %lld",
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors), "%" PRId64 " / %" PRId64 "",
|
||||
expected_sectors, lay->dataSectors);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ if(image->sectorSize > expected_sectors && image->sectorSize - expected_sectors <= 2)
|
||||
PrintLog(_("* medium sectors : %lld (BAD, perhaps TAO/DAO mismatch)\n"),
|
||||
PrintLog(_("* medium sectors : %" PRId64 " (BAD, perhaps TAO/DAO mismatch)\n"),
|
||||
expected_sectors);
|
||||
else PrintLog(_("* medium sectors : %lld (BAD)\n"),expected_sectors);
|
||||
else PrintLog(_("* medium sectors : %" PRId64 " (BAD)\n"),expected_sectors);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccMediumSectors),
|
||||
"<span %s>%lld</span>", Closure->redMarkup, expected_sectors);
|
||||
"<span %s>%" PRId64 "</span>", Closure->redMarkup, expected_sectors);
|
||||
if(!ecc_advice && image->sectorSize > expected_sectors)
|
||||
ecc_advice = g_strdup_printf(_("<span %s>Image size does not match recorded size.</span>"), Closure->redMarkup);
|
||||
}
|
||||
@@ -1078,7 +1078,7 @@ continue_with_ecc:
|
||||
if(n) PrintLog(_("- data md5sum : %s (good)\n"),hdr_digest);
|
||||
else PrintLog(_("* data md5sum : %s (BAD)\n"),hdr_digest);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(n) SetLabelText(GTK_LABEL(wl->cmpEcc1Msg), "%s", hdr_digest);
|
||||
else
|
||||
@@ -1091,7 +1091,7 @@ continue_with_ecc:
|
||||
else
|
||||
{ PrintLog(_("- data md5sum : %s\n"), "-");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEcc1Msg), "%s", "-");
|
||||
#endif
|
||||
@@ -1104,14 +1104,14 @@ continue_with_ecc:
|
||||
if(!crc_missing)
|
||||
{ if(!memcmp(eh->crcSum, cc->crcSum, 16))
|
||||
{ PrintLog(_("- crc md5sum : %s (good)\n"),digest);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEcc2Msg), "%s", digest);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("* crc md5sum : %s (BAD)\n"),digest);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEcc2Msg), "<span %s>%s</span>", Closure->redMarkup, digest);
|
||||
}
|
||||
@@ -1122,7 +1122,7 @@ continue_with_ecc:
|
||||
else
|
||||
{ PrintLog(_("- crc md5sum : %s\n"), "-");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEcc2Msg), "%s", "-");
|
||||
#endif
|
||||
@@ -1135,14 +1135,14 @@ continue_with_ecc:
|
||||
if(!ecc_missing)
|
||||
{ if(!memcmp(eh->eccSum, ecc_sum, 16))
|
||||
{ PrintLog(_("- ecc md5sum : %s (good)\n"),digest);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEcc3Msg), "%s", digest);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("* ecc md5sum : %s (BAD)\n"),digest);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEcc3Msg), "<span %s>%s</span>", Closure->redMarkup, digest);
|
||||
}
|
||||
@@ -1153,7 +1153,7 @@ continue_with_ecc:
|
||||
else
|
||||
{ PrintLog(_("- ecc md5sum : %s\n"), "-");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEcc3Msg), "%s", "-");
|
||||
#endif
|
||||
@@ -1162,15 +1162,15 @@ continue_with_ecc:
|
||||
|
||||
/*** Print final results */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
try_it =
|
||||
#endif
|
||||
prognosis(cc, total_missing + data_crc_errors - hdr_correctable, expected_sectors);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(ecc_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), ecc_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), "%s", ecc_advice);
|
||||
g_free(ecc_advice);
|
||||
}
|
||||
else
|
||||
@@ -1190,7 +1190,7 @@ continue_with_ecc:
|
||||
else
|
||||
#endif
|
||||
{ if(ecc_advice)
|
||||
{ PrintLog(ecc_advice);
|
||||
{ PrintLog("%s", ecc_advice);
|
||||
g_free(ecc_advice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,8 +138,8 @@ void RS02SetFixMaxValues(RS02Widgets *wl, int data_bytes, int ecc_bytes, gint64
|
||||
static gboolean results_idle_func(gpointer data)
|
||||
{ RS02Widgets *wl = (RS02Widgets*)data;
|
||||
|
||||
SetLabelText(GTK_LABEL(wl->fixCorrected), _("Repaired: %lld"), wl->corrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixUncorrected), _("Unrepairable: <span %s>%lld</span>"),Closure->redMarkup, wl->uncorrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixCorrected), _("Repaired: %" PRId64 ""), wl->corrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixUncorrected), _("Unrepairable: <span %s>%" PRId64 "</span>"),Closure->redMarkup, wl->uncorrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixProgress), _("Progress: %3d.%1d%%"), wl->percent/10, wl->percent%10);
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -195,9 +195,9 @@ void RS03ReadSectors(Image *image, RS03Layout *lay, unsigned char *buf,
|
||||
gint64 n;
|
||||
|
||||
if(layer < 0 || layer > 255)
|
||||
Stop("RS03ReadSectors: layer %lld out of range 0 .. 255\n", layer);
|
||||
Stop("RS03ReadSectors: layer %" PRId64 " out of range 0 .. 255\n", layer);
|
||||
if(layer_sector < 0 || layer_sector >= lay->sectorsPerLayer)
|
||||
Stop("RS03ReadSectors: offset %lld out of range 0 .. %lld)\n",
|
||||
Stop("RS03ReadSectors: offset %" PRId64 " out of range 0 .. %" PRId64 ")\n",
|
||||
layer_sector, lay->sectorsPerLayer-1);
|
||||
|
||||
/* "Image" file size may not be a multiple of 2048 */
|
||||
@@ -244,7 +244,7 @@ void RS03ReadSectors(Image *image, RS03Layout *lay, unsigned char *buf,
|
||||
stop_sector = start_sector + how_many - 1;
|
||||
|
||||
if(stop_sector >= (layer+1)*lay->sectorsPerLayer)
|
||||
Stop("RS03ReadSectors: range %lld..%lld crosses layer boundary\n",
|
||||
Stop("RS03ReadSectors: range %" PRId64 "..%" PRId64 " crosses layer boundary\n",
|
||||
start_sector, stop_sector);
|
||||
target_file = image->file;
|
||||
}
|
||||
@@ -337,12 +337,12 @@ void RS03ReadSectors(Image *image, RS03Layout *lay, unsigned char *buf,
|
||||
/* All sectors are consecutively readable in image case */
|
||||
|
||||
if(!LargeSeek(target_file, (gint64)(2048*start_sector)))
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"),
|
||||
start_sector, strerror(errno));
|
||||
|
||||
n = LargeRead(target_file, buf, byte_size);
|
||||
if(n != byte_size)
|
||||
Stop(_("Failed reading sector %lld in image: %s"),
|
||||
Stop(_("Failed reading sector %" PRId64 " in image: %s"),
|
||||
start_sector, strerror(errno));
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ RS03Layout *CalcRS03Layout(Image *image, int target)
|
||||
ecc_size = strtoll(Closure->redundancy, NULL, 10);
|
||||
if( ecc_size < ecc_file_size(lay->dataSectors, 8)
|
||||
|| ecc_size > ecc_file_size(lay->dataSectors, 170))
|
||||
Stop(_("Ecc file size %lldm out of useful range [%lld .. %lld]"),
|
||||
Stop(_("Ecc file size %" PRId64 "m out of useful range [%" PRId64 " .. %" PRId64 "]"),
|
||||
ecc_size,
|
||||
ecc_file_size(lay->dataSectors, 8),
|
||||
ecc_file_size(lay->dataSectors, 170));
|
||||
@@ -522,7 +522,7 @@ RS03Layout *CalcRS03Layout(Image *image, int target)
|
||||
{ dataSectors = image->sectorSize;
|
||||
if(Closure->debugMode && Closure->mediumSize)
|
||||
{ if(dataSectors >= Closure->mediumSize)
|
||||
Stop(_("Medium size smaller than image size (%lld < %lld)"), Closure->mediumSize, dataSectors);
|
||||
Stop(_("Medium size smaller than image size (%" PRId64 " < %" PRId64 ")"), Closure->mediumSize, dataSectors);
|
||||
lay->mediumCapacity = Closure->mediumSize;
|
||||
}
|
||||
else
|
||||
@@ -591,14 +591,14 @@ RS03Layout *CalcRS03Layout(Image *image, int target)
|
||||
Verbose("Calculated layout for RS03 file:\n");
|
||||
else Verbose("Calculated layout for RS03 image:\n");
|
||||
|
||||
Verbose("data sectors = %lld\n", lay->dataSectors);
|
||||
Verbose("data padding = %lld\n", lay->dataPadding);
|
||||
Verbose("layer size = %lld\n", lay->sectorsPerLayer);
|
||||
Verbose("total sectors = %lld\n", lay->totalSectors);
|
||||
Verbose("medium capacity = %lld\n", lay->mediumCapacity);
|
||||
Verbose("header position = %lld\n", lay->eccHeaderPos);
|
||||
Verbose("first CRC sector = %lld\n", lay->firstCrcPos);
|
||||
Verbose("first ECC sector = %lld\n", lay->firstEccPos);
|
||||
Verbose("data sectors = %" PRId64 "\n", lay->dataSectors);
|
||||
Verbose("data padding = %" PRId64 "\n", lay->dataPadding);
|
||||
Verbose("layer size = %" PRId64 "\n", lay->sectorsPerLayer);
|
||||
Verbose("total sectors = %" PRId64 "\n", lay->totalSectors);
|
||||
Verbose("medium capacity = %" PRId64 "\n", lay->mediumCapacity);
|
||||
Verbose("header position = %" PRId64 "\n", lay->eccHeaderPos);
|
||||
Verbose("first CRC sector = %" PRId64 "\n", lay->firstCrcPos);
|
||||
Verbose("first ECC sector = %" PRId64 "\n", lay->firstEccPos);
|
||||
Verbose("ndata = %d\n", lay->ndata);
|
||||
Verbose("nroots = %d (%4.1f%%)\n", lay->nroots, lay->redundancy);
|
||||
Verbose("\n");
|
||||
@@ -640,11 +640,11 @@ void WriteRS03Header(LargeFile *file, RS03Layout *lay, EccHeader *eh)
|
||||
{ int n;
|
||||
|
||||
if(!LargeSeek(file, 2048*lay->eccHeaderPos))
|
||||
Stop(_("Failed seeking to ecc header at %lld: %s\n"), lay->eccHeaderPos, strerror(errno));
|
||||
Stop(_("Failed seeking to ecc header at %" PRId64 ": %s\n"), lay->eccHeaderPos, strerror(errno));
|
||||
|
||||
n = LargeWrite(file, eh, sizeof(EccHeader));
|
||||
if(n != sizeof(EccHeader))
|
||||
Stop(_("Failed writing ecc header at %lld: %s\n"), lay->eccHeaderPos, strerror(errno));
|
||||
Stop(_("Failed writing ecc header at %" PRId64 ": %s\n"), lay->eccHeaderPos, strerror(errno));
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
typedef struct
|
||||
{ Method *self;
|
||||
Image *image;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS03Widgets *wl;
|
||||
#endif
|
||||
RS03Layout *lay;
|
||||
@@ -147,7 +147,7 @@ static void ecc_cleanup(gpointer data)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(ec->earlyTermination)
|
||||
SetLabelText(GTK_LABEL(ec->wl->encFootline),
|
||||
@@ -229,7 +229,7 @@ static void ecc_cleanup(gpointer data)
|
||||
if(ec->encoderData) g_free(ec->encoderData);
|
||||
g_free(ec);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -245,7 +245,7 @@ static void ecc_cleanup(gpointer data)
|
||||
|
||||
static void abort_encoding(ecc_closure *ec, int truncate)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS03Widgets *wl = ec->wl;
|
||||
#endif
|
||||
|
||||
@@ -255,14 +255,14 @@ static void abort_encoding(ecc_closure *ec, int truncate)
|
||||
else if(!LargeTruncate(ec->image->file, (gint64)(2048*ec->lay->dataSectors)))
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
_("<span %s>Aborted by user request!</span> (partial ecc data removed from image)"),
|
||||
Closure->redMarkup);
|
||||
#endif
|
||||
}
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
@@ -291,7 +291,7 @@ static void remove_old_ecc(ecc_closure *ec)
|
||||
{
|
||||
if(ConfirmEccDeletion(Closure->eccName))
|
||||
LargeUnlink(Closure->eccName);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ SetLabelText(GTK_LABEL(ec->wl->encFootline),
|
||||
_("<span %s>Aborted to keep existing ecc file.</span>"),
|
||||
@@ -311,14 +311,14 @@ static void remove_old_ecc(ecc_closure *ec)
|
||||
guint64 data_bytes;
|
||||
int answer;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->confirmDeletion || !Closure->guiMode)
|
||||
#endif
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Image \"%s\" already contains error correction information.\n"
|
||||
"Truncating image to data part (%lld sectors).\n"),
|
||||
"Truncating image to data part (%" PRId64 " sectors).\n"),
|
||||
Closure->imageName, data_sectors);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else answer = TRUE;
|
||||
#endif
|
||||
|
||||
@@ -346,8 +346,8 @@ static void remove_old_ecc(ecc_closure *ec)
|
||||
|
||||
PrintLog(_("Image size is now"));
|
||||
if(ec->image->inLast == 2048)
|
||||
PrintLog(_(": %lld medium sectors.\n"), ec->image->sectorSize);
|
||||
else PrintLog(_(": %lld medium sectors and %d bytes.\n"),
|
||||
PrintLog(_(": %" PRId64 " medium sectors.\n"), ec->image->sectorSize);
|
||||
else PrintLog(_(": %" PRId64 " medium sectors and %d bytes.\n"),
|
||||
ec->image->sectorSize-1, ec->image->inLast);
|
||||
}
|
||||
}
|
||||
@@ -514,7 +514,7 @@ static void expand_image(ecc_closure *ec)
|
||||
{ unsigned char dead_sector[2048];
|
||||
int n;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
abort_encoding(ec, TRUE);
|
||||
#endif
|
||||
@@ -531,7 +531,7 @@ static void expand_image(ecc_closure *ec)
|
||||
if(last_percent != percent)
|
||||
{ PrintProgress(_(progress_msg), percent);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(ec->wl->encPBar1, percent, 100);
|
||||
#endif
|
||||
@@ -543,7 +543,7 @@ static void expand_image(ecc_closure *ec)
|
||||
PrintProgress(_(progress_msg), 100);
|
||||
PrintProgress("\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetProgress(ec->wl->encPBar1, 100, 100);
|
||||
#endif
|
||||
@@ -629,7 +629,7 @@ static void read_next_chunk(ecc_closure *ec, guint64 chunk)
|
||||
guint64 page_offset;
|
||||
#endif
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* User hit the Stop button */
|
||||
{ ec->abortImmediately = TRUE;
|
||||
abort_encoding(ec, TRUE);
|
||||
@@ -716,7 +716,7 @@ static void read_next_chunk(ecc_closure *ec, guint64 chunk)
|
||||
|
||||
Stop(_("Incomplete image\n\n"
|
||||
"The image contains missing sectors,\n"
|
||||
"e.g. sector %lld.\n%s"
|
||||
"e.g. sector %" PRId64 ".\n%s"
|
||||
"Error correction data works like a backup; it must\n"
|
||||
"be created when the image is still fully readable.\n"
|
||||
"Exiting and removing partial error correction data."),
|
||||
@@ -753,12 +753,12 @@ static void flush_crc(ecc_closure *ec, LargeFile *file_out)
|
||||
if(!LargeSeek(file_out, crc_sect))
|
||||
{ ec->abortImmediately = TRUE;
|
||||
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"), crc_sect, strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"), crc_sect, strerror(errno));
|
||||
}
|
||||
for(i=0; i<ec->encoderLayerSectors; i++)
|
||||
if(LargeWrite(file_out, ec->encoderCrc+512*i, 2048) != 2048)
|
||||
{ ec->abortImmediately = TRUE;
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), crc_sect, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), crc_sect, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -778,11 +778,11 @@ static void flush_parity(ecc_closure *ec, LargeFile *file_out)
|
||||
|
||||
if(!LargeSeek(file_out, 2048*s))
|
||||
{ ec->abortImmediately = TRUE;
|
||||
Stop(_("Failed seeking to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
}
|
||||
if(LargeWrite(file_out, ec->slice[k]+idx, 2048) != 2048)
|
||||
{ ec->abortImmediately = TRUE;
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), s, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), s, strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -860,7 +860,7 @@ static gpointer io_thread(ecc_closure *ec)
|
||||
|
||||
for(chunk=0; chunk<lay->sectorsPerLayer; chunk+=ec->chunkSize)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int cpu_bound = 0;
|
||||
#endif
|
||||
|
||||
@@ -917,7 +917,7 @@ static gpointer io_thread(ecc_closure *ec)
|
||||
/* Wait until the encoders have finished */
|
||||
|
||||
g_mutex_lock(ec->lock);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
cpu_bound = ec->buffersToEncode;
|
||||
#endif
|
||||
while(ec->buffersToEncode)
|
||||
@@ -930,7 +930,7 @@ static gpointer io_thread(ecc_closure *ec)
|
||||
|
||||
verbose("IO: chunk %d finished\n", ec->ioChunk);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(cpu_bound)
|
||||
{ SetLabelText(GTK_LABEL(ec->wl->encBottleneck), _("CPU bound"));
|
||||
@@ -1137,7 +1137,7 @@ static gpointer encoder_thread(ecc_closure *ec)
|
||||
{
|
||||
ec->lastPercent = percent;
|
||||
g_mutex_unlock(ec->lock);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ gdouble elapsed;
|
||||
gulong ignore;
|
||||
@@ -1178,14 +1178,14 @@ static void create_reed_solomon(ecc_closure *ec)
|
||||
{ int nroots = ec->lay->nroots;
|
||||
int ndata = ec->lay->ndata;
|
||||
int i;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
char *alg="none";
|
||||
char *iostrat="none";
|
||||
#endif
|
||||
|
||||
/*** Show the second progress bar */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ ShowWidget(ec->wl->encPBar2);
|
||||
ShowWidget(ec->wl->encLabel2);
|
||||
@@ -1289,7 +1289,7 @@ static void create_reed_solomon(ecc_closure *ec)
|
||||
void RS03Create(void)
|
||||
{ Method *method = FindMethod("RS03");
|
||||
Image *image = NULL;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS03Widgets *wl = (RS03Widgets*)method->widgetList;
|
||||
#endif
|
||||
RS03Layout *lay;
|
||||
@@ -1301,14 +1301,14 @@ void RS03Create(void)
|
||||
/*** Register the cleanup procedure for GUI mode */
|
||||
|
||||
ec->self = method;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
ec->wl = wl;
|
||||
#endif
|
||||
ec->earlyTermination = TRUE;
|
||||
|
||||
RegisterCleanup(_("Error correction data creation aborted"), ecc_cleanup, ec);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode) /* Preliminary fill text for the head line */
|
||||
SetLabelText(GTK_LABEL(wl->encHeadline),
|
||||
_("<big>Augmenting the image with error correction data.</big>\n<i>%s</i>"),
|
||||
@@ -1332,8 +1332,8 @@ void RS03Create(void)
|
||||
ec->image = image;
|
||||
|
||||
if(image->inLast == 2048)
|
||||
PrintLog(_(": %lld medium sectors.\n"), image->sectorSize);
|
||||
else PrintLog(_(": %lld medium sectors and %d bytes.\n"),
|
||||
PrintLog(_(": %" PRId64 " medium sectors.\n"), image->sectorSize);
|
||||
else PrintLog(_(": %" PRId64 " medium sectors and %d bytes.\n"),
|
||||
image->sectorSize-1, image->inLast);
|
||||
|
||||
/*** If the image already contains error correction information, remove it. */
|
||||
@@ -1359,9 +1359,9 @@ void RS03Create(void)
|
||||
/*** Announce what we are going to do */
|
||||
|
||||
ecc_sectors = lay->nroots*lay->sectorsPerLayer;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode) /* Preliminary fill text for the head line */
|
||||
{ ec->msg = g_strdup_printf(_("Encoding with Method RS03: %lld MiB data, %lld MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
{ ec->msg = g_strdup_printf(_("Encoding with Method RS03: %" PRId64 " MiB data, %" PRId64 " MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
lay->dataSectors/512, ecc_sectors/512, lay->nroots, lay->redundancy);
|
||||
|
||||
if(lay->target == ECC_IMAGE)
|
||||
@@ -1381,12 +1381,12 @@ void RS03Create(void)
|
||||
|
||||
if(Closure->eccTarget == ECC_IMAGE)
|
||||
ec->msg = g_strdup_printf(_("Augmenting image with Method RS03 [%d threads, %s, %s I/O]:\n"
|
||||
"%lld MiB data, %lld MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
"%" PRId64 " MiB data, %" PRId64 " MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
Closure->codecThreads, alg, iostrat,
|
||||
lay->dataSectors/512, ecc_sectors/512, lay->nroots, lay->redundancy);
|
||||
else
|
||||
ec->msg = g_strdup_printf(_("Creating the error correction file with Method RS03 [%d threads, %s, %s I/O]:\n"
|
||||
"%lld MiB data, %lld MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
"%" PRId64 " MiB data, %" PRId64 " MiB ecc (%d roots; %4.1f%% redundancy)."),
|
||||
Closure->codecThreads, alg, iostrat,
|
||||
lay->dataSectors/512, ecc_sectors/512, lay->nroots, lay->redundancy);
|
||||
|
||||
@@ -1397,7 +1397,7 @@ void RS03Create(void)
|
||||
|
||||
if(Closure->eccTarget == ECC_IMAGE && lay->nroots < 8)
|
||||
Stop(_("Not enough space on medium left for error correction data.\n"
|
||||
"Data portion of image: %lld sect.; maximum possible size: %lld sect.\n"
|
||||
"Data portion of image: %" PRId64 " sect.; maximum possible size: %" PRId64 " sect.\n"
|
||||
"If reducing the image size or using a larger medium is not\n"
|
||||
"an option, please create a separate error correction file."),
|
||||
lay->dataSectors, lay->mediumCapacity);
|
||||
@@ -1406,8 +1406,8 @@ void RS03Create(void)
|
||||
{ int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Using redundancies below 20%% may not give\n"
|
||||
"the expected data loss protection.\n"), NULL);
|
||||
"%s", _("Using redundancies below 20% may not give\n"
|
||||
"the expected data loss protection.\n"));
|
||||
|
||||
if(!answer)
|
||||
abort_encoding(ec, FALSE);
|
||||
@@ -1422,8 +1422,8 @@ void RS03Create(void)
|
||||
{ int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("BD-R size with no defect management enabled,\n"
|
||||
"remember it should you need to repair this image later!\n"), NULL);
|
||||
"%s", _("BD-R size with no defect management enabled,\n"
|
||||
"remember it should you need to repair this image later!\n"));
|
||||
|
||||
if(!answer)
|
||||
abort_encoding(ec, FALSE);
|
||||
@@ -1446,7 +1446,7 @@ void RS03Create(void)
|
||||
PrintProgress(_("Ecc generation: 100.0%%\n"));
|
||||
if(Closure->eccTarget == ECC_IMAGE)
|
||||
PrintLog(_("Image has been augmented with error correction data.\n"
|
||||
"New image size is %lld MiB (%lld sectors).\n"),
|
||||
"New image size is %" PRId64 " MiB (%" PRId64 " sectors).\n"),
|
||||
(lay->totalSectors)/512,
|
||||
lay->totalSectors);
|
||||
else
|
||||
@@ -1458,7 +1458,7 @@ void RS03Create(void)
|
||||
mbs = ((double)lay->ndata*lay->sectorsPerLayer)/(512.0*elapsed);
|
||||
PrintLog(_("Avg performance: %5.2fs (%5.2fMiB/s) total\n"),
|
||||
elapsed, mbs);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->encPerformance), _("%5.2fMiB/s average"), mbs);
|
||||
SetLabelText(GTK_LABEL(ec->wl->encBottleneck),
|
||||
@@ -1467,14 +1467,14 @@ void RS03Create(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetProgress(wl->encPBar2, 100, 100);
|
||||
|
||||
if(Closure->eccTarget == ECC_IMAGE)
|
||||
SetLabelText(GTK_LABEL(wl->encFootline),
|
||||
_("Image has been augmented with error correction data.\n"
|
||||
"New image size is %lld MiB (%lld sectors).\n"),
|
||||
"New image size is %" PRId64 " MiB (%" PRId64 " sectors).\n"),
|
||||
(lay->totalSectors)/512,
|
||||
lay->totalSectors);
|
||||
else
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS03Widgets *wl;
|
||||
#endif
|
||||
RS03Layout *lay;
|
||||
@@ -49,7 +49,7 @@ static void fix_cleanup(gpointer data)
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(fc->earlyTermination)
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
@@ -76,7 +76,7 @@ static void fix_cleanup(gpointer data)
|
||||
|
||||
g_free(fc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -114,7 +114,7 @@ static void expand_image(Image *image, EccHeader *eh, gint64 new_size)
|
||||
percent = (100*sectors) / new_sectors;
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
;
|
||||
else
|
||||
@@ -124,7 +124,7 @@ static void expand_image(Image *image, EccHeader *eh, gint64 new_size)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
;
|
||||
else
|
||||
@@ -141,7 +141,7 @@ static void expand_image(Image *image, EccHeader *eh, gint64 new_size)
|
||||
|
||||
void RS03Fix(Image *image)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
Method *self = FindMethod("RS03");
|
||||
RS03Widgets *wl = (RS03Widgets*)self->widgetList;
|
||||
#endif
|
||||
@@ -175,14 +175,14 @@ void RS03Fix(Image *image)
|
||||
gint64 damaged_eccsecs=0;
|
||||
gint64 expected_sectors;
|
||||
char *t=NULL;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
char *msg;
|
||||
#endif
|
||||
|
||||
/*** Register the cleanup procedure for GUI mode */
|
||||
|
||||
fc->image = image;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
fc->wl = wl;
|
||||
#endif
|
||||
fc->earlyTermination = TRUE;
|
||||
@@ -194,7 +194,7 @@ void RS03Fix(Image *image)
|
||||
|
||||
/*** Open the image file */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->fixHeadline),
|
||||
_("<big>Repairing the image.</big>\n<i>%s</i>"),
|
||||
@@ -237,7 +237,7 @@ void RS03Fix(Image *image)
|
||||
|
||||
/*** Announce what we are going to do */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(eh->methodFlags[0] & MFLAG_ECC_FILE)
|
||||
msg = g_strdup_printf(_("Error correction file using Method RS03, %d roots, %4.1f%% redundancy."),
|
||||
@@ -264,7 +264,7 @@ void RS03Fix(Image *image)
|
||||
{ int difference = image->inLast - eh->inLast;
|
||||
guint64 expected_image_size = 2048*(expected_sectors-1)+eh->inLast;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ int answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("The image file is %d bytes longer than noted\n"
|
||||
@@ -283,7 +283,7 @@ void RS03Fix(Image *image)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode && !Closure->truncate)
|
||||
#else
|
||||
if(!Closure->truncate)
|
||||
@@ -314,14 +314,14 @@ void RS03Fix(Image *image)
|
||||
if(diff>0 && diff<=2)
|
||||
{ int answer;
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Image file is %lld sectors longer than expected.\n"
|
||||
_("Image file is %" PRId64 " sectors longer than expected.\n"
|
||||
"Assuming this is a TAO mode medium.\n"
|
||||
"%lld sectors will be removed from the image end.\n"),
|
||||
"%" PRId64 " sectors will be removed from the image end.\n"),
|
||||
diff, diff);
|
||||
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
fc->wl->fixFootline,
|
||||
_("<span %s>Aborted by user request!</span>"),
|
||||
@@ -337,7 +337,7 @@ void RS03Fix(Image *image)
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(diff>2 && Closure->guiMode)
|
||||
{ int answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
trans,
|
||||
@@ -358,11 +358,11 @@ void RS03Fix(Image *image)
|
||||
if(!LargeTruncate(image->file, (gint64)expected_image_size))
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
|
||||
PrintLog(_("Image has been truncated by %lld sectors.\n"), diff);
|
||||
PrintLog(_("Image has been truncated by %" PRId64 " sectors.\n"), diff);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(diff>2 && !Closure->guiMode)
|
||||
#else
|
||||
if(diff>2)
|
||||
@@ -378,7 +378,7 @@ void RS03Fix(Image *image)
|
||||
if(!LargeTruncate(image->file, (gint64)expected_image_size))
|
||||
Stop(_("Could not truncate %s: %s\n"),Closure->imageName,strerror(errno));
|
||||
|
||||
PrintLog(_("Image has been truncated by %lld sectors.\n"), diff);
|
||||
PrintLog(_("Image has been truncated by %" PRId64 " sectors.\n"), diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ void RS03Fix(Image *image)
|
||||
|
||||
/* See if user hit the Stop button */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SwitchAndSetFootline(fc->wl->fixNotebook, 1,
|
||||
@@ -519,7 +519,7 @@ void RS03Fix(Image *image)
|
||||
if(crc_valid && !erasure_map[i] && crc != crc_buf[crc_idx])
|
||||
{ erasure_map[i] = 3;
|
||||
erasure_list[erasure_count++] = i;
|
||||
PrintCLI(_("CRC error in sector %lld\n"),block_idx[i]);
|
||||
PrintCLI(_("CRC error in sector %" PRId64 "\n"),block_idx[i]);
|
||||
damaged_sectors++;
|
||||
crc_errors++;
|
||||
}
|
||||
@@ -551,12 +551,12 @@ void RS03Fix(Image *image)
|
||||
|
||||
if(erasure_count>lay->nroots) /* uncorrectable */
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
{ int sep_printed = 0;
|
||||
|
||||
PrintCLI(_("* Ecc block %lld: %3d unrepairable sectors: "), s, erasure_count);
|
||||
PrintCLI(_("* Ecc block %" PRId64 ": %3d unrepairable sectors: "), s, erasure_count);
|
||||
|
||||
for(i=0; i<erasure_count; i++)
|
||||
{ /* sector counting wraps to 0 for ecc files after the data layer */
|
||||
@@ -564,7 +564,7 @@ void RS03Fix(Image *image)
|
||||
{ PrintCLI("; ecc file: ");
|
||||
sep_printed = 1;
|
||||
}
|
||||
PrintCLI("%lld ", RS03SectorIndex(lay, erasure_list[i], s));
|
||||
PrintCLI("%" PRId64 " ", RS03SectorIndex(lay, erasure_list[i], s));
|
||||
}
|
||||
PrintCLI("\n");
|
||||
}
|
||||
@@ -725,7 +725,7 @@ void RS03Fix(Image *image)
|
||||
{ PrintCLI(_("; ecc file: "));
|
||||
sep_printed = 1;
|
||||
}
|
||||
PrintCLI("%lld ", RS03SectorIndex(lay, erasure_list[i], s));
|
||||
PrintCLI("%" PRId64 " ", RS03SectorIndex(lay, erasure_list[i], s));
|
||||
}
|
||||
PrintCLI("\n");
|
||||
uncorrected += erasure_count;
|
||||
@@ -849,7 +849,7 @@ void RS03Fix(Image *image)
|
||||
{ PrintCLI(_("; ecc file: "));
|
||||
sep_printed = 1;
|
||||
}
|
||||
PrintCLI("%lld%c ", sec, type);
|
||||
PrintCLI("%" PRId64 "%c ", sec, type);
|
||||
|
||||
/* Write the recovered sector */
|
||||
|
||||
@@ -862,12 +862,12 @@ void RS03Fix(Image *image)
|
||||
|| i < ndata-1)
|
||||
{
|
||||
if(!LargeSeek(image->file, (gint64)(2048*sec)))
|
||||
Stop(_("Failed seeking to sector %lld in image [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in image [%s]: %s"),
|
||||
sec, "FW", strerror(errno));
|
||||
|
||||
n = LargeWrite(image->file, cache_offset+fc->imgBlock[i], length);
|
||||
if(n != length)
|
||||
Stop(_("could not write medium sector %lld:\n%s"), sec, strerror(errno));
|
||||
Stop(_("could not write medium sector %" PRId64 ":\n%s"), sec, strerror(errno));
|
||||
}
|
||||
|
||||
/* Write back into the error correction file
|
||||
@@ -878,12 +878,12 @@ void RS03Fix(Image *image)
|
||||
if(lay->target == ECC_FILE && i >= ndata-1)
|
||||
{
|
||||
if(!LargeSeek(image->eccFile, (gint64)(2048*sec)))
|
||||
Stop(_("Failed seeking to sector %lld in ecc file [%s]: %s"),
|
||||
Stop(_("Failed seeking to sector %" PRId64 " in ecc file [%s]: %s"),
|
||||
sec, "FW", strerror(errno));
|
||||
|
||||
n = LargeWrite(image->eccFile, cache_offset+fc->imgBlock[i], 2048);
|
||||
if(n != 2048)
|
||||
Stop(_("could not write ecc file sector %lld:\n%s"),
|
||||
Stop(_("could not write ecc file sector %" PRId64 ":\n%s"),
|
||||
sec, strerror(errno));
|
||||
}
|
||||
}
|
||||
@@ -913,7 +913,7 @@ skip:
|
||||
|
||||
if(last_percent != percent)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{
|
||||
RS03AddFixValues(wl, percent, local_plot_max);
|
||||
@@ -938,15 +938,15 @@ skip:
|
||||
|
||||
PrintProgress(_("Ecc progress: 100.0%%\n"));
|
||||
|
||||
if(corrected > 0) PrintLog(_("Repaired sectors: %lld (%lld data, %lld ecc)\n"),
|
||||
if(corrected > 0) PrintLog(_("Repaired sectors: %" PRId64 " (%" PRId64 " data, %" PRId64 " ecc)\n"),
|
||||
corrected, data_corr, ecc_corr);
|
||||
if(uncorrected > 0)
|
||||
{ PrintLog(_("Unrepaired sectors: %lld\n"), uncorrected);
|
||||
#ifndef CLI
|
||||
{ PrintLog(_("Unrepaired sectors: %" PRId64 "\n"), uncorrected);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->fixNotebook, 1, wl->fixFootline,
|
||||
_("Image sectors could not be fully restored "
|
||||
"(%lld repaired; <span %s>%lld unrepaired</span>)"),
|
||||
"(%" PRId64 " repaired; <span %s>%" PRId64 " unrepaired</span>)"),
|
||||
corrected, Closure->redMarkup, uncorrected);
|
||||
#endif
|
||||
exitCode = 2;
|
||||
@@ -967,16 +967,16 @@ skip:
|
||||
PrintLog(_("Erasure counts per ecc block: avg = %.1f; worst = %d.\n"),
|
||||
(double)damaged_sectors/(double)damaged_eccsecs,worst_ecc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode && t)
|
||||
SwitchAndSetFootline(wl->fixNotebook, 1, wl->fixFootline,
|
||||
"%s %s", _("Repair results:"), t);
|
||||
#endif
|
||||
|
||||
Verbose("\nSummary of processed sectors:\n");
|
||||
Verbose("%lld damaged sectors\n", damaged_sectors);
|
||||
Verbose("%lld CRC errors\n", crc_errors);
|
||||
Verbose("%lld of %lld ecc blocks damaged (%lld / %lld sectors)\n",
|
||||
Verbose("%" PRId64 " damaged sectors\n", damaged_sectors);
|
||||
Verbose("%" PRId64 " CRC errors\n", crc_errors);
|
||||
Verbose("%" PRId64 " of %" PRId64 " ecc blocks damaged (%" PRId64 " / %" PRId64 " sectors)\n",
|
||||
damaged_eccblocks, 2048*lay->sectorsPerLayer,
|
||||
damaged_eccsecs, lay->sectorsPerLayer);
|
||||
if(data_count != (ndata-1)*lay->sectorsPerLayer)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef RS03INCLUDES_H
|
||||
#define RS03INCLUDES_H
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/* Data structs from rs03-window.c */
|
||||
|
||||
typedef struct
|
||||
@@ -133,7 +133,7 @@ typedef struct
|
||||
* These are exported via the Method struct
|
||||
*/
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void CreateRS03EncWindow(Method*, GtkWidget*);
|
||||
void CreateRS03FixWindow(Method*, GtkWidget*);
|
||||
void CreateRS03PrefsPage(Method*, GtkWidget*);
|
||||
@@ -200,7 +200,7 @@ void RS03Fix(Image*);
|
||||
int RS03RecognizeFile(LargeFile*, EccHeader**);
|
||||
int RS03RecognizeImage(Image*);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
/* rs03-window.c */
|
||||
|
||||
void RS03AddFixValues(RS03Widgets*, int, int);
|
||||
@@ -217,7 +217,7 @@ void RS03Verify(Image*);
|
||||
/* temporary single threaded versions */
|
||||
|
||||
void RS03SCreate(void);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
void CreateRS03SEncWindow(Method*, GtkWidget*);
|
||||
void ResetRS03SEncWindow(Method*);
|
||||
#endif
|
||||
|
||||
@@ -413,7 +413,7 @@ int RS03RecognizeImage(Image *image)
|
||||
|
||||
if(Closure->debugMode && Closure->mediumSize > 170)
|
||||
{ layer_size = Closure->mediumSize/GF_FIELDMAX;
|
||||
Verbose("Warning: image size set to %lld for debugging!\n", Closure->mediumSize);
|
||||
Verbose("Warning: image size set to %" PRId64 " for debugging!\n", Closure->mediumSize);
|
||||
}
|
||||
else
|
||||
{ if(image_sectors < CDR_SIZE) layer_size = CDR_SIZE/GF_FIELDMAX;
|
||||
@@ -428,7 +428,7 @@ int RS03RecognizeImage(Image *image)
|
||||
else layer_size = (Closure->noBdrDefectManagement ? BDXL_QL_SIZE_NODM : BDXL_QL_SIZE)/GF_FIELDMAX;
|
||||
}
|
||||
|
||||
Verbose(".. trying layer size %lld\n", layer_size);
|
||||
Verbose(".. trying layer size %" PRId64 "\n", layer_size);
|
||||
|
||||
/*
|
||||
* Try a quick scan for the CRC sectors in order
|
||||
@@ -499,7 +499,7 @@ int RS03RecognizeImage(Image *image)
|
||||
|
||||
if(crc_state == 1) /* corrupted crc header, try this layer again later */
|
||||
continue;
|
||||
Verbose("** Success: sector %lld, rediscovered format with %d roots\n",
|
||||
Verbose("** Success: sector %" PRId64 ", rediscovered format with %d roots\n",
|
||||
sector, nroots);
|
||||
image->eccHeader = g_malloc(sizeof(EccHeader));
|
||||
ReconstructRS03Header(image->eccHeader, cb);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/***
|
||||
*** Reset the verify output window
|
||||
***/
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
|
||||
void ResetRS03VerifyWindow(Method *self)
|
||||
{ RS03Widgets *wl = (RS03Widgets*)self->widgetList;
|
||||
@@ -376,7 +376,7 @@ typedef struct
|
||||
{ Image *image;
|
||||
EccHeader *eh;
|
||||
RS03Layout *lay;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS03Widgets *wl;
|
||||
#endif
|
||||
CrcBuf *crcBuf;
|
||||
@@ -393,7 +393,7 @@ static void cleanup(gpointer data)
|
||||
|
||||
UnregisterCleanup();
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
AllowActions(TRUE);
|
||||
#endif
|
||||
@@ -414,7 +414,7 @@ static void cleanup(gpointer data)
|
||||
|
||||
g_free(vc);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
g_thread_exit(0);
|
||||
#endif
|
||||
@@ -457,10 +457,10 @@ static int prognosis(verify_closure *vc, gint64 missing, gint64 expected)
|
||||
PrintLog(_("- erasure counts : avg = %.1f; worst = %d per ecc block.\n"),
|
||||
(double)damaged_sectors/(double)damaged_eccsecs,worst_ecc);
|
||||
|
||||
PrintLog(_("- prognosis : %lld of %lld sectors recoverable (%d.%d%%)\n"),
|
||||
PrintLog(_("- prognosis : %" PRId64 " of %" PRId64 " sectors recoverable (%d.%d%%)\n"),
|
||||
recoverable, expected, percentage/10, percentage%10);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(vc->wl->cmpImageErasure), _("Erasure counts:"));
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpImagePrognosis), _("Prognosis:"));
|
||||
@@ -471,7 +471,7 @@ static int prognosis(verify_closure *vc, gint64 missing, gint64 expected)
|
||||
(double)damaged_sectors/(double)damaged_eccsecs,worst_ecc);
|
||||
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpImagePrognosisMsg),
|
||||
_("<span %s>%lld of %lld sectors recoverable (%d.%d%%)</span>"),
|
||||
_("<span %s>%" PRId64 " of %" PRId64 " sectors recoverable (%d.%d%%)</span>"),
|
||||
recoverable < expected ? Closure->redMarkup : Closure->greenMarkup,
|
||||
recoverable, expected, percentage/10, percentage%10);
|
||||
}
|
||||
@@ -497,7 +497,7 @@ static int check_syndromes(verify_closure *vc)
|
||||
int bad_counted;
|
||||
int layer,i,j;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpHeadline), "<big>%s</big>\n<i>%s</i>",
|
||||
_("Checking the image and error correction files."),
|
||||
@@ -515,7 +515,7 @@ static int check_syndromes(verify_closure *vc)
|
||||
for(j=0; j<i; j++)
|
||||
g_free(vc->eccBlock[j]);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpEccSyndromes),
|
||||
_("<span %s>Out of memory; try reducing sector prefetch!</span>"),
|
||||
@@ -541,7 +541,7 @@ static int check_syndromes(verify_closure *vc)
|
||||
|
||||
/* Check for user interruption */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpEccSyndromes),
|
||||
@@ -603,7 +603,7 @@ static int check_syndromes(verify_closure *vc)
|
||||
|
||||
if(!ecc_bad)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpEccSyndromes),
|
||||
_("%d%% tested"),
|
||||
@@ -614,13 +614,13 @@ static int check_syndromes(verify_closure *vc)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpEccSyndromes),
|
||||
_("<span %s>%lld good, %lld bad; %d%% tested</span>"),
|
||||
_("<span %s>%" PRId64 " good, %" PRId64 " bad; %d%% tested</span>"),
|
||||
Closure->redMarkup, ecc_good, ecc_bad, percent);
|
||||
#endif
|
||||
PrintProgress(_("* Ecc block test : %lld good, %lld bad; %d%% tested")
|
||||
PrintProgress(_("* Ecc block test : %" PRId64 " good, %" PRId64 " bad; %d%% tested")
|
||||
, ecc_good, ecc_bad, percent);
|
||||
}
|
||||
}
|
||||
@@ -630,7 +630,7 @@ static int check_syndromes(verify_closure *vc)
|
||||
|
||||
if(!ecc_bad)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpEccSyndromes),_("pass"));
|
||||
#endif
|
||||
@@ -639,13 +639,13 @@ static int check_syndromes(verify_closure *vc)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(vc->wl->cmpEccSyndromes),
|
||||
_("<span %s>%lld good, %lld bad; %lld bad sub blocks</span>"),
|
||||
_("<span %s>%" PRId64 " good, %" PRId64 " bad; %" PRId64 " bad sub blocks</span>"),
|
||||
Closure->redMarkup, ecc_good, ecc_bad, ecc_bad_sub);
|
||||
#endif
|
||||
PrintLog(_("* Ecc block test : %lld good, %lld bad; %lld bad sub blocks\n"),
|
||||
PrintLog(_("* Ecc block test : %" PRId64 " good, %" PRId64 " bad; %" PRId64 " bad sub blocks\n"),
|
||||
ecc_good, ecc_bad, ecc_bad_sub);
|
||||
|
||||
exitCode = EXIT_CODE_SYNDROME_ERROR;
|
||||
@@ -660,7 +660,7 @@ static int check_syndromes(verify_closure *vc)
|
||||
void RS03Verify(Image *image)
|
||||
{ Method *self = FindMethod("RS03");
|
||||
verify_closure *vc = g_malloc0(sizeof(verify_closure));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
RS03Widgets *wl = self->widgetList;
|
||||
#endif
|
||||
EccHeader *eh = NULL;
|
||||
@@ -683,12 +683,12 @@ void RS03Verify(Image *image)
|
||||
char *unstable="";
|
||||
|
||||
char method[5];
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
char *img_advice = NULL;
|
||||
char *ecc_advice = NULL;
|
||||
#endif
|
||||
char *version;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int syn_error = 0;
|
||||
int try_it;
|
||||
#endif
|
||||
@@ -699,7 +699,7 @@ void RS03Verify(Image *image)
|
||||
|
||||
RegisterCleanup(_("Check aborted"), cleanup, vc);
|
||||
vc->image = image;
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
vc->wl = wl;
|
||||
#endif
|
||||
|
||||
@@ -722,7 +722,7 @@ void RS03Verify(Image *image)
|
||||
else /* may only happen when ecc file is present */
|
||||
{ PrintLog("\n%s not present.\n", Closure->imageName);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SwitchAndSetFootline(wl->cmpImageNotebook, 0, NULL, NULL);
|
||||
#endif
|
||||
@@ -730,7 +730,7 @@ void RS03Verify(Image *image)
|
||||
|
||||
if(eh->methodFlags[0] & MFLAG_ECC_FILE)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpHeadline), "<big>%s</big>\n<i>%s</i>",
|
||||
_("Checking the image and error correction files."),
|
||||
@@ -741,7 +741,7 @@ void RS03Verify(Image *image)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpHeadline), "<big>%s</big>\n<i>%s</i>",
|
||||
_("Checking the image file."),
|
||||
@@ -769,12 +769,12 @@ void RS03Verify(Image *image)
|
||||
{ char *msg;
|
||||
|
||||
if(expected_eccfile_sectors > eccfile_sectors)
|
||||
msg = g_strdup_printf(_("Ecc file is %lld sectors shorter than expected."),
|
||||
msg = g_strdup_printf(_("Ecc file is %" PRId64 " sectors shorter than expected."),
|
||||
expected_eccfile_sectors - eccfile_sectors);
|
||||
else msg = g_strdup_printf(_("Ecc file is %lld sectors longer than expected."),
|
||||
else msg = g_strdup_printf(_("Ecc file is %" PRId64 " sectors longer than expected."),
|
||||
eccfile_sectors - expected_eccfile_sectors);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
ecc_advice = g_strdup_printf("<span %s>%s</span>", Closure->redMarkup, msg);
|
||||
#endif
|
||||
@@ -791,7 +791,7 @@ void RS03Verify(Image *image)
|
||||
PrintLog(_("- type : Error correction file\n"));
|
||||
else PrintLog(_("- type : Augmented image\n"));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(eh->methodFlags[0] & MFLAG_ECC_FILE)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccType), _("Error correction file"));
|
||||
@@ -807,7 +807,7 @@ void RS03Verify(Image *image)
|
||||
method, eh->eccBytes,
|
||||
((double)eh->eccBytes*100.0)/(double)eh->dataBytes);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccMethod), _("%4s, %d roots, %4.1f%% redundancy"),
|
||||
method, eh->eccBytes,
|
||||
@@ -830,7 +830,7 @@ void RS03Verify(Image *image)
|
||||
PrintLog(format, _("- created by : dvdisaster"), major, minor, micro, unstable);
|
||||
PrintLog("\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccCreatedBy), format,
|
||||
"dvdisaster", major, minor, micro, unstable);
|
||||
@@ -842,7 +842,7 @@ void RS03Verify(Image *image)
|
||||
PrintLog(format, _("- created by : dvdisaster"), major, minor, unstable);
|
||||
PrintLog("\n");
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccCreatedBy), format,
|
||||
"dvdisaster", major, minor, unstable);
|
||||
@@ -863,7 +863,7 @@ void RS03Verify(Image *image)
|
||||
if(Closure->version >= eh->neededVersion)
|
||||
{ PrintLog(_("- requires : dvdisaster-%s\n"), version);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccRequires), "dvdisaster-%s", version);
|
||||
#endif
|
||||
@@ -874,7 +874,7 @@ void RS03Verify(Image *image)
|
||||
"* : Please visit http://www.dvdisaster.org for an upgrade.\n"),
|
||||
version);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccRequires),
|
||||
"<span %s>dvdisaster-%s</span>",
|
||||
@@ -897,7 +897,7 @@ void RS03Verify(Image *image)
|
||||
|
||||
PrintLog(_("- data md5sum : %s\n"),hdr_digest);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccDataCrcVal), "%s", hdr_digest);
|
||||
#endif
|
||||
@@ -909,7 +909,7 @@ void RS03Verify(Image *image)
|
||||
{ if(image->fpState != FP_PRESENT)
|
||||
{ PrintLog(_("* fingerprint match: NOT POSSIBLE - related sector is missing in image!\n"));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccFingerprint), _("<span %s>missing sector prevents calculation</span>"), Closure->redMarkup);
|
||||
#endif
|
||||
@@ -919,7 +919,7 @@ void RS03Verify(Image *image)
|
||||
if(memcmp(image->imageFP, eh->mediumFP, 16))
|
||||
{ PrintLog(_("* fingerprint match: MISMATCH - .iso and .ecc don't belong together!\n"));
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccFingerprint),
|
||||
_("<span %s>mismatch</span>"), Closure->redMarkup);
|
||||
@@ -931,7 +931,7 @@ void RS03Verify(Image *image)
|
||||
}
|
||||
else
|
||||
{ PrintLog(_("- fingerprint match: good\n"));
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccFingerprint), _("good"));
|
||||
#endif
|
||||
@@ -942,10 +942,10 @@ void RS03Verify(Image *image)
|
||||
|
||||
/* print advice collected from above tests */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(ecc_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), ecc_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), "%s", ecc_advice);
|
||||
g_free(ecc_advice);
|
||||
}
|
||||
else SetLabelText(GTK_LABEL(wl->cmpEccResult),
|
||||
@@ -985,31 +985,31 @@ void RS03Verify(Image *image)
|
||||
if(expected_image_sectors == image->sectorSize && matching_byte_size)
|
||||
{ if(lay->target == ECC_FILE)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(image->inLast == 2048)
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("%lld in image; %lld in ecc file"),
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("%" PRId64 " in image; %" PRId64 " in ecc file"),
|
||||
image->sectorSize, eccfile_sectors);
|
||||
else
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("%lld sectors + %d bytes in image; %lld in ecc file"),
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("%" PRId64 " sectors + %d bytes in image; %" PRId64 " in ecc file"),
|
||||
image->sectorSize-1, image->inLast, eccfile_sectors);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(image->inLast == 2048)
|
||||
PrintLog(_("- sectors : %lld in image; "), image->sectorSize);
|
||||
else PrintLog(_("- sectors : %lld sectors + %d bytes in image; "), image->sectorSize-1, image->inLast);
|
||||
PrintLog(_("- sectors : %" PRId64 " in image; "), image->sectorSize);
|
||||
else PrintLog(_("- sectors : %" PRId64 " sectors + %d bytes in image; "), image->sectorSize-1, image->inLast);
|
||||
|
||||
PrintLog(_("%lld in ecc file\n"), eccfile_sectors);
|
||||
PrintLog(_("%" PRId64 " in ecc file\n"), eccfile_sectors);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("%lld total / %lld data"),
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("%" PRId64 " total / %" PRId64 " data"),
|
||||
image->sectorSize, lay->dataSectors);
|
||||
#endif
|
||||
PrintLog(_("- medium sectors : %lld total / %lld data\n"),
|
||||
PrintLog(_("- medium sectors : %" PRId64 " total / %" PRId64 " data\n"),
|
||||
image->sectorSize, lay->dataSectors);
|
||||
}
|
||||
}
|
||||
@@ -1024,7 +1024,7 @@ void RS03Verify(Image *image)
|
||||
expected_size = g_strdup_printf("%lld", (long long int)expected_image_sectors);
|
||||
else expected_size = g_strdup_printf("%lld sectors + %d bytes", (long long int)expected_image_sectors-1, eh->inLast);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageSectors), _("<span %s>%s (%s expected)</span>"),
|
||||
Closure->redMarkup, image_size, expected_size);
|
||||
@@ -1038,16 +1038,16 @@ void RS03Verify(Image *image)
|
||||
}
|
||||
|
||||
if(expected_image_sectors > image->sectorSize)
|
||||
img_advice = g_strdup_printf(_("<span %s>Image file is %lld sectors shorter than expected.</span>"),
|
||||
img_advice = g_strdup_printf(_("<span %s>Image file is %" PRId64 " sectors shorter than expected.</span>"),
|
||||
Closure->redMarkup, expected_image_sectors - image->sectorSize);
|
||||
if(expected_image_sectors < image->sectorSize)
|
||||
img_advice = g_strdup_printf(_("<span %s>Image file is %lld sectors longer than expected.</span>"),
|
||||
img_advice = g_strdup_printf(_("<span %s>Image file is %" PRId64 " sectors longer than expected.</span>"),
|
||||
Closure->redMarkup, image->sectorSize - expected_image_sectors);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(lay->target == ECC_FILE)
|
||||
PrintLog(_("* sectors : %s (%s expected); %lld sectors in ecc file\n"),
|
||||
PrintLog(_("* sectors : %s (%s expected); %" PRId64 " sectors in ecc file\n"),
|
||||
image_size, expected_size, eccfile_sectors);
|
||||
else
|
||||
PrintLog(_("* medium sectors : %s (%s expected)\n"),
|
||||
@@ -1089,7 +1089,7 @@ void RS03Verify(Image *image)
|
||||
|
||||
/* Check for user interruption */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
{ if(Closure->stopActions == STOP_CURRENT_ACTION) /* suppress memleak warning when closing window */
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageResult),
|
||||
@@ -1182,8 +1182,8 @@ void RS03Verify(Image *image)
|
||||
ecc_msg = g_strdup(" ");
|
||||
}
|
||||
if(first_missing == last_missing)
|
||||
PrintCLI(_("* missing sector : %lld%s\n"), first,ecc_msg);
|
||||
else PrintCLI(_("* missing sectors : %lld - %lld%s\n"), first, last, ecc_msg);
|
||||
PrintCLI(_("* missing sector : %" PRId64 "%s\n"), first,ecc_msg);
|
||||
else PrintCLI(_("* missing sectors : %" PRId64 " - %" PRId64 "%s\n"), first, last, ecc_msg);
|
||||
first_missing = -1;
|
||||
g_free(ecc_msg);
|
||||
}
|
||||
@@ -1199,7 +1199,7 @@ void RS03Verify(Image *image)
|
||||
|
||||
if(GetBit(vc->crcBuf->valid,crc_idx)
|
||||
&& crc != vc->crcBuf->crcbuf[crc_idx])
|
||||
{ PrintCLI(_("* CRC error, sector: %lld\n"), s);
|
||||
{ PrintCLI(_("* CRC error, sector: %" PRId64 "\n"), s);
|
||||
data_crc_errors++;
|
||||
new_crc_errors++;
|
||||
defective = TRUE;
|
||||
@@ -1211,7 +1211,7 @@ void RS03Verify(Image *image)
|
||||
if(!defective)
|
||||
SetBit(vc->map, s);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ /* data part / spiral animation */
|
||||
percent = (VERIFY_IMAGE_SEGMENTS*(s+1))/virtual_expected;
|
||||
@@ -1226,7 +1226,7 @@ void RS03Verify(Image *image)
|
||||
|
||||
if(last_percent != percent) /* Update sector results */
|
||||
{ PrintProgress(_("- testing sectors : %3d%%") ,percent);
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(lay->target == ECC_IMAGE)
|
||||
{ add_verify_values(self, percent, new_missing, new_crc_errors);
|
||||
@@ -1244,15 +1244,15 @@ void RS03Verify(Image *image)
|
||||
|
||||
if(data_missing || data_crc_errors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpDataSection),
|
||||
_("<span %s>%lld sectors missing; %lld CRC errors</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing; %" PRId64 " CRC errors</span>"),
|
||||
Closure->redMarkup, data_missing, data_crc_errors);
|
||||
if(crc_missing || csc->signatureErrors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpCrcSection),
|
||||
_("<span %s>%lld sectors missing; %lld signature errors</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing; %" PRId64 " signature errors</span>"),
|
||||
Closure->redMarkup, crc_missing, csc->signatureErrors);
|
||||
if(ecc_missing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccSection),
|
||||
_("<span %s>%lld sectors missing</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing</span>"),
|
||||
Closure->redMarkup, ecc_missing);
|
||||
}
|
||||
#endif
|
||||
@@ -1265,7 +1265,7 @@ void RS03Verify(Image *image)
|
||||
|
||||
if(lay->target == ECC_FILE && s == lay->dataSectors-1)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ /* flush/complete spiral */
|
||||
add_verify_values(self, VERIFY_IMAGE_SEGMENTS, new_missing, new_crc_errors);
|
||||
@@ -1283,19 +1283,19 @@ void RS03Verify(Image *image)
|
||||
|
||||
/* Complete damage summary */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(data_missing || data_crc_errors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpDataSection),
|
||||
_("<span %s>%lld sectors missing; %lld CRC errors</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing; %" PRId64 " CRC errors</span>"),
|
||||
Closure->redMarkup, data_missing, data_crc_errors);
|
||||
if(crc_missing || csc->signatureErrors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpCrcSection),
|
||||
_("<span %s>%lld sectors missing; %lld signature errors</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing; %" PRId64 " signature errors</span>"),
|
||||
Closure->redMarkup, crc_missing, csc->signatureErrors);
|
||||
if(ecc_missing)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccSection),
|
||||
_("<span %s>%lld sectors missing</span>"),
|
||||
_("<span %s>%" PRId64 " sectors missing</span>"),
|
||||
Closure->redMarkup, ecc_missing);
|
||||
}
|
||||
#endif
|
||||
@@ -1312,29 +1312,29 @@ void RS03Verify(Image *image)
|
||||
"- data md5sum : %s\n"),data_digest);
|
||||
else
|
||||
{ if(!data_crc_errors && !csc->signatureErrors)
|
||||
PrintLog(_("* BAD image/file : %lld sectors missing\n"), total_missing);
|
||||
PrintLog(_("* BAD image/file : %" PRId64 " sectors missing\n"), total_missing);
|
||||
if(!total_missing)
|
||||
PrintLog(_("* suspicious image : all sectors present, but %lld CRC errors\n"),
|
||||
PrintLog(_("* suspicious image : all sectors present, but %" PRId64 " CRC errors\n"),
|
||||
data_crc_errors);
|
||||
if(total_missing && data_crc_errors)
|
||||
PrintLog(_("* BAD image : %lld sectors missing, %lld CRC errors\n"),
|
||||
PrintLog(_("* BAD image : %" PRId64 " sectors missing, %" PRId64 " CRC errors\n"),
|
||||
total_missing, data_crc_errors);
|
||||
|
||||
PrintLog(_(" ... data section : %lld sectors missing; %lld CRC errors\n"),
|
||||
PrintLog(_(" ... data section : %" PRId64 " sectors missing; %" PRId64 " CRC errors\n"),
|
||||
data_missing, data_crc_errors);
|
||||
if(!total_missing && !data_crc_errors && !csc->signatureErrors)
|
||||
PrintLog(_(" ... data md5sum : %s\n"), data_digest);
|
||||
|
||||
if(csc->signatureErrors)
|
||||
PrintLog(_(" ... crc section : %lld sectors missing; %lld signature errors\n"),
|
||||
PrintLog(_(" ... crc section : %" PRId64 " sectors missing; %" PRId64 " signature errors\n"),
|
||||
crc_missing, csc->signatureErrors);
|
||||
else
|
||||
PrintLog(_(" ... crc section : %lld sectors missing\n"), crc_missing);
|
||||
PrintLog(_(" ... crc section : %" PRId64 " sectors missing\n"), crc_missing);
|
||||
|
||||
PrintLog(_(" ... ecc section : %lld sectors missing\n"), ecc_missing);
|
||||
PrintLog(_(" ... ecc section : %" PRId64 " sectors missing\n"), ecc_missing);
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(!data_missing && !data_crc_errors)
|
||||
SetLabelText(GTK_LABEL(wl->cmpDataSection), _("complete"));
|
||||
@@ -1348,7 +1348,7 @@ void RS03Verify(Image *image)
|
||||
|
||||
/*** Test error syndromes */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccSynLabel), _("Ecc block test:"));
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccSyndromes), "");
|
||||
@@ -1356,7 +1356,7 @@ void RS03Verify(Image *image)
|
||||
#endif
|
||||
if(0&&total_missing + data_crc_errors != 0)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(GTK_LABEL(wl->cmpEccSyndromes),
|
||||
_("<span %s>Skipped; not useful on known defective image</span>"),
|
||||
@@ -1367,7 +1367,7 @@ void RS03Verify(Image *image)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
syn_error =
|
||||
#endif
|
||||
check_syndromes(vc);
|
||||
@@ -1375,11 +1375,11 @@ void RS03Verify(Image *image)
|
||||
|
||||
/*** Print image advice */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{
|
||||
if(img_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), img_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), "%s", img_advice);
|
||||
g_free(img_advice);
|
||||
}
|
||||
else
|
||||
@@ -1397,12 +1397,12 @@ void RS03Verify(Image *image)
|
||||
|
||||
/*** Print final results */
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
try_it =
|
||||
#endif
|
||||
prognosis(vc, total_missing+data_crc_errors, lay->totalSectors);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(total_missing || data_crc_errors)
|
||||
{ if(try_it) SetLabelText(GTK_LABEL(wl->cmpImageResult),
|
||||
|
||||
@@ -171,8 +171,8 @@ void RS03SetFixMaxValues(RS03Widgets *wl, int data_bytes, int ecc_bytes, gint64
|
||||
static gboolean results_idle_func(gpointer data)
|
||||
{ RS03Widgets *wl = (RS03Widgets*)data;
|
||||
|
||||
SetLabelText(GTK_LABEL(wl->fixCorrected), _("Repaired: %lld"), wl->corrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixUncorrected), _("Unrepairable: <span %s>%lld</span>"),Closure->redMarkup, wl->uncorrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixCorrected), _("Repaired: %" PRId64 ""), wl->corrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixUncorrected), _("Unrepairable: <span %s>%" PRId64 "</span>"),Closure->redMarkup, wl->uncorrected);
|
||||
SetLabelText(GTK_LABEL(wl->fixProgress), _("Progress: %3d.%1d%%"), wl->percent/10, wl->percent%10);
|
||||
|
||||
return FALSE;
|
||||
|
||||
121
src/scsi-layer.c
121
src/scsi-layer.c
@@ -694,7 +694,7 @@ static int query_dvd(DeviceHandle *dh, int probe_only)
|
||||
dh->userAreaSize = (gint64)(ua_end-ua_start);
|
||||
|
||||
if(dh->userAreaSize < 0 || dh->userAreaSize > MAX_DVD_SL_SIZE)
|
||||
{ LogWarning(_("READ DVD STRUCTURE: implausible medium size, %lld-%lld=%lld sectors\n"),
|
||||
{ LogWarning(_("READ DVD STRUCTURE: implausible medium size, %" PRId64 "-%" PRId64 "=%" PRId64 " sectors\n"),
|
||||
(gint64)ua_end, (gint64)ua_start, (gint64)dh->userAreaSize);
|
||||
dh->userAreaSize = 0;
|
||||
}
|
||||
@@ -704,7 +704,7 @@ static int query_dvd(DeviceHandle *dh, int probe_only)
|
||||
dh->userAreaSize = (gint64)(ua_end0-ua_start)*2;
|
||||
|
||||
if(dh->userAreaSize < 0 || dh->userAreaSize > MAX_DVD_DL_SIZE)
|
||||
{ LogWarning(_("READ DVD STRUCTURE: implausible medium size, %lld-%lld=%lld sectors\n"),
|
||||
{ LogWarning(_("READ DVD STRUCTURE: implausible medium size, %" PRId64 "-%" PRId64 "=%" PRId64 " sectors\n"),
|
||||
(gint64)ua_end0, (gint64)ua_start, (gint64)dh->userAreaSize);
|
||||
dh->userAreaSize = 0;
|
||||
}
|
||||
@@ -1054,6 +1054,17 @@ static int query_bd(DeviceHandle *dh, int probe_only)
|
||||
|
||||
/*
|
||||
* Find out what type of disc has been inserted.
|
||||
*
|
||||
* `probe_only` is passed down to query_cd/dvd/br, and has
|
||||
* a boolean meaning there:
|
||||
* - 0: abort the program on error (call Stop())
|
||||
* - 1: return error to the caller (us).
|
||||
* If we're called with probe_only == 2, we additionally won't
|
||||
* return an error to our caller even if query_cd/dvd/br return FALSE:
|
||||
* this is used when querying media that may be blank (in PrintMediumInfo),
|
||||
* as query_* attempt to read the TOC, which is always expected to fail
|
||||
* on blank media. However we will still return FALSE if we get any
|
||||
* other type of error.
|
||||
*/
|
||||
|
||||
static int query_type(DeviceHandle *dh, int probe_only)
|
||||
@@ -1063,6 +1074,7 @@ static int query_type(DeviceHandle *dh, int probe_only)
|
||||
Sense *sense = &dh->sense;
|
||||
unsigned int length;
|
||||
int status;
|
||||
int ret;
|
||||
|
||||
/*** See which profile the drive selected.
|
||||
This should at least give us a hint to decide
|
||||
@@ -1133,31 +1145,40 @@ static int query_type(DeviceHandle *dh, int probe_only)
|
||||
dh->singleRate = 150.0;
|
||||
dh->maxRate = 52;
|
||||
dh->clusterSize = 16; /* really 1, but this is faster */
|
||||
return dh->incomplete ? query_incomplete(dh, probe_only) : query_cd(dh, probe_only);
|
||||
ret = dh->incomplete ? query_incomplete(dh, probe_only) : query_cd(dh, probe_only);
|
||||
return (probe_only == 2 ? TRUE : ret);
|
||||
|
||||
case DVD:
|
||||
dh->read = read_dvd_sector;
|
||||
dh->singleRate = 1352.54;
|
||||
dh->maxRate = 17;
|
||||
dh->clusterSize = 16;
|
||||
if(!dh->incomplete) return query_dvd(dh, probe_only);
|
||||
else
|
||||
{ if(query_dvd(dh, TRUE)) return TRUE;
|
||||
return query_incomplete(dh, probe_only);
|
||||
if(!dh->incomplete)
|
||||
{ ret = query_dvd(dh, probe_only);
|
||||
return (probe_only == 2 ? TRUE : ret);
|
||||
}
|
||||
break;
|
||||
else
|
||||
{ if(query_dvd(dh, TRUE)) return TRUE;
|
||||
ret = query_incomplete(dh, probe_only);
|
||||
return (probe_only == 2 ? TRUE : ret);
|
||||
}
|
||||
break; /* unreachable */
|
||||
|
||||
case BD:
|
||||
dh->read = read_dvd_sector;
|
||||
dh->singleRate = 36000.0/8.0; /* 1x = 36 kbit */
|
||||
dh->maxRate = 9;
|
||||
dh->clusterSize = 32;
|
||||
if(!dh->incomplete) return query_bd(dh, probe_only);
|
||||
else
|
||||
{ if(query_bd(dh, TRUE)) return TRUE;
|
||||
return query_incomplete(dh, probe_only);
|
||||
if(!dh->incomplete)
|
||||
{ ret = query_bd(dh, probe_only);
|
||||
return (probe_only == 2 ? TRUE : ret);
|
||||
}
|
||||
break;
|
||||
else
|
||||
{ if(query_bd(dh, TRUE)) return TRUE;
|
||||
ret = query_incomplete(dh, probe_only);
|
||||
return (probe_only == 2 ? TRUE : ret);
|
||||
}
|
||||
break; /* unreachable */
|
||||
|
||||
default: /* maybe HD DVD or sth else we do not support */
|
||||
return FALSE;
|
||||
@@ -1350,7 +1371,7 @@ int QueryBlankCapacity(DeviceHandle *dh)
|
||||
{ gint64 size;
|
||||
|
||||
size = (gint64)(buf[idx]<<24 | buf[idx+1]<<16 | buf[idx+2]<<8 | buf[idx+3]);
|
||||
Verbose("#DVD: Cap list %d - type %x, size %lld\n", i, buf[idx+4]>>2, size);
|
||||
Verbose("#DVD: Cap list %d - type %x, size %" PRId64 "\n", i, buf[idx+4]>>2, size);
|
||||
|
||||
switch(buf[idx+4]>>2) /* format type */
|
||||
{ case 0x00: /* all media */
|
||||
@@ -1420,7 +1441,7 @@ int QueryBlankCapacity(DeviceHandle *dh)
|
||||
|
||||
size = (gint64)(buf[idx]<<24 | buf[idx+1]<<16 | buf[idx+2]<<8 | buf[idx+3]);
|
||||
sa_size = buf[idx+5]<<16 | buf[idx+6]<<8 | buf[idx+7];
|
||||
Verbose("#BD: Cap list %d - type %x, size %lld, spare %d\n",
|
||||
Verbose("#BD: Cap list %d - type %x, size %" PRId64 ", spare %d\n",
|
||||
i, buf[idx+4]>>2, size, sa_size);
|
||||
|
||||
switch(buf[idx+4]>>2) /* format type */
|
||||
@@ -1751,8 +1772,8 @@ static int check_sector(DeviceHandle *dh, GString *msg_out, guint64 sector, int
|
||||
}
|
||||
|
||||
if(n_sectors == 1)
|
||||
g_string_append_printf(msg_out, _("Sector %lld: %s\n"), sector, msg);
|
||||
else g_string_append_printf(msg_out, _("Sectors %lld-%lld: %s\n"),
|
||||
g_string_append_printf(msg_out, _("Sector %" PRId64 ": %s\n"), sector, msg);
|
||||
else g_string_append_printf(msg_out, _("Sectors %" PRId64 "-%" PRId64 ": %s\n"),
|
||||
sector, sector+n_sectors-1, msg);
|
||||
|
||||
return result;
|
||||
@@ -1817,7 +1838,7 @@ static void read_capacity(Image *image)
|
||||
}
|
||||
|
||||
dh->readCapacity = (gint64)(buf[0]<<24 | buf[1]<<16 | buf[2]<<8 | buf[3]);
|
||||
Verbose(" -> %lld\n", dh->readCapacity);
|
||||
Verbose(" -> %" PRId64 "\n", dh->readCapacity);
|
||||
FreeAlignedBuffer(ab);
|
||||
|
||||
/*** Validate capacity */
|
||||
@@ -1832,7 +1853,7 @@ static void read_capacity(Image *image)
|
||||
implausible = TRUE;
|
||||
|
||||
if(implausible && !dh->simImage)
|
||||
{ LogWarning(_("READ CAPACITY: implausible medium size, %lld sectors\n"),
|
||||
{ LogWarning(_("READ CAPACITY: implausible medium size, %" PRId64 " sectors\n"),
|
||||
(gint64)dh->readCapacity);
|
||||
dh->readCapacity = 0;
|
||||
}
|
||||
@@ -1852,7 +1873,7 @@ static gint64 query_size(Image *image)
|
||||
for the medium size. */
|
||||
|
||||
if(image->expectedSectors > 0)
|
||||
{ Verbose("Medium size obtained from ECC header: %lld sectors\n", image->expectedSectors);
|
||||
{ Verbose("Medium size obtained from ECC header: %" PRId64 " sectors\n", image->expectedSectors);
|
||||
return image->expectedSectors;
|
||||
}
|
||||
else Verbose("Medium size could NOT be determined from ECC header.\n");
|
||||
@@ -1876,7 +1897,7 @@ static gint64 query_size(Image *image)
|
||||
/* For CD media, thats all we have to do */
|
||||
|
||||
if(dh->mainType == CD)
|
||||
{ Verbose("CD medium - using size from READ CAPACITY: %lld sectors\n", dh->readCapacity+1);
|
||||
{ Verbose("CD medium - using size from READ CAPACITY: %" PRId64 " sectors\n", dh->readCapacity+1);
|
||||
return dh->readCapacity+1; /* size is the number of the last sector, starting with 0 */
|
||||
}
|
||||
|
||||
@@ -1884,7 +1905,7 @@ static gint64 query_size(Image *image)
|
||||
work as unformatted sectors can be always read. Stick with READ CAPACITY. */
|
||||
|
||||
if(dh->mainType == BD)
|
||||
{ Verbose("BD medium - using size from READ CAPACITY: %lld sectors\n", dh->readCapacity+1);
|
||||
{ Verbose("BD medium - using size from READ CAPACITY: %" PRId64 " sectors\n", dh->readCapacity+1);
|
||||
return dh->readCapacity+1; /* size is the number of the last sector, starting with 0 */
|
||||
}
|
||||
|
||||
@@ -1894,7 +1915,7 @@ static gint64 query_size(Image *image)
|
||||
so we have to be careful here. */
|
||||
|
||||
if(dh->readCapacity == dh->userAreaSize) /* If they are equal just return one */
|
||||
{ Verbose("READ CAPACITY and READ DVD STRUCTURE agree: %lld sectors\n", dh->readCapacity+1);
|
||||
{ Verbose("READ CAPACITY and READ DVD STRUCTURE agree: %" PRId64 " sectors\n", dh->readCapacity+1);
|
||||
return dh->readCapacity+1;
|
||||
}
|
||||
else /* Tricky case. Try some heuristics. */
|
||||
@@ -1909,8 +1930,8 @@ static gint64 query_size(Image *image)
|
||||
warning = g_string_sized_new(1024);
|
||||
g_string_printf(warning,
|
||||
_("Different media sizes depending on query method:\n"
|
||||
"READ CAPACITY: %lld sectors\n"
|
||||
"READ DVD STRUCTURE: %lld sectors\n\n"),
|
||||
"READ CAPACITY: %" PRId64 " sectors\n"
|
||||
"READ DVD STRUCTURE: %" PRId64 " sectors\n\n"),
|
||||
dh->readCapacity+1, dh->userAreaSize+1);
|
||||
|
||||
g_string_append(warning, _("Evaluation of returned medium sizes:\n\n"));
|
||||
@@ -1988,7 +2009,7 @@ static gint64 query_size(Image *image)
|
||||
}
|
||||
|
||||
g_string_append_printf(warning, _("Final decision: %s\n\n"), decision_msg);
|
||||
LogWarning(warning->str);
|
||||
LogWarning("%s", warning->str);
|
||||
|
||||
g_string_free(warning, TRUE);
|
||||
|
||||
@@ -2017,7 +2038,8 @@ gint64 CurrentMediumSize(int get_blank_size)
|
||||
gint64 size;
|
||||
|
||||
|
||||
image = OpenImageFromDevice(Closure->device);
|
||||
/* 2 means: allow blank media, see comment in OpenImageFromDevice */
|
||||
image = OpenImageFromDevice(Closure->device, 2);
|
||||
if(!image) return 0;
|
||||
if(InquireDevice(image->dh, 1) != 0x05)
|
||||
{ CloseImage(image);
|
||||
@@ -2184,7 +2206,7 @@ int TestUnitReady(DeviceHandle *dh)
|
||||
|
||||
if(SendPacket(dh, cmd, 6, NULL, 0, &dh->sense, DATA_NONE) != -1)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(Closure->status, "");
|
||||
#endif
|
||||
@@ -2205,7 +2227,7 @@ int TestUnitReady(DeviceHandle *dh)
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
_("Waiting 10 seconds for drive: %d\n"),9-i);
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
return FALSE;
|
||||
#endif
|
||||
@@ -2218,7 +2240,7 @@ int TestUnitReady(DeviceHandle *dh)
|
||||
break; /* Something is wrong with the drive */
|
||||
}
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
SetLabelText(Closure->status, "");
|
||||
#endif
|
||||
@@ -2474,7 +2496,7 @@ int ReadSectors(DeviceHandle *dh, unsigned char *buf, gint64 s, int nsectors)
|
||||
if(status) /* current try was unsuccessful */
|
||||
{ int last_key, last_asc, last_ascq;
|
||||
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions) /* user break */
|
||||
return status;
|
||||
#endif
|
||||
@@ -2486,7 +2508,7 @@ int ReadSectors(DeviceHandle *dh, unsigned char *buf, gint64 s, int nsectors)
|
||||
// if(dh->canReadDefective && nsectors > 1 && Closure->sectorSkip == 0)
|
||||
if(nsectors > 1 && Closure->sectorSkip == 0)
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
_("Sectors %lld - %lld: %s\n"),
|
||||
_("Sectors %" PRId64 " - %" PRId64 ": %s\n"),
|
||||
s, s+nsectors-1, GetLastSenseString(FALSE));
|
||||
return status;
|
||||
}
|
||||
@@ -2500,13 +2522,13 @@ int ReadSectors(DeviceHandle *dh, unsigned char *buf, gint64 s, int nsectors)
|
||||
if(last_key == 3 && last_asc == 255 && last_ascq == 2 && dh->rawBuffer)
|
||||
{ unsigned char *frame = dh->rawBuffer->workBuf->buf;
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
_("Sector %lld, try %d: %s Sector returned: %d.\n"),
|
||||
_("Sector %" PRId64 ", try %d: %s Sector returned: %d.\n"),
|
||||
s, retry, GetLastSenseString(FALSE),
|
||||
MSFtoLBA(frame[12], frame[13], frame[14]));
|
||||
}
|
||||
else
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
_("Sector %lld, try %d: %s\n"),
|
||||
_("Sector %" PRId64 ", try %d: %s\n"),
|
||||
s, retry, GetLastSenseString(FALSE));
|
||||
|
||||
/* Last attempt; create failure notice */
|
||||
@@ -2517,7 +2539,7 @@ int ReadSectors(DeviceHandle *dh, unsigned char *buf, gint64 s, int nsectors)
|
||||
else /* good return status */
|
||||
{ if(recommended_attempts > 1 && retry > 1)
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
_("Sector %lld, try %d: success\n"), s, retry);
|
||||
_("Sector %" PRId64 ", try %d: success\n"), s, retry);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -2571,9 +2593,10 @@ int ReadSectorsFast(DeviceHandle *dh, unsigned char *buf, gint64 s, int nsectors
|
||||
*** Open the device and query some of its properties.
|
||||
***/
|
||||
|
||||
Image* OpenImageFromDevice(char *device)
|
||||
Image* OpenImageFromDevice(char *device, int query_only)
|
||||
{ Image *image = NULL;
|
||||
DeviceHandle *dh = NULL;
|
||||
int subTypeMasked;
|
||||
|
||||
/* Open the device. */
|
||||
|
||||
@@ -2604,7 +2627,7 @@ Image* OpenImageFromDevice(char *device)
|
||||
/* Query the type and fail immediately if incompatible medium is found
|
||||
so that the later tests are not derailed by the wrong medium type */
|
||||
|
||||
if(!query_type(dh, 0))
|
||||
if(!query_type(dh, query_only))
|
||||
{ CloseDevice(dh);
|
||||
Stop(_("Drive failed to report media type."));
|
||||
return NULL;
|
||||
@@ -2612,7 +2635,11 @@ Image* OpenImageFromDevice(char *device)
|
||||
|
||||
Verbose("# query_type() returned.\n");
|
||||
|
||||
if(dh->subType == UNSUPPORTED)
|
||||
/* subType is not set by get_configuration() but by query_cd() for CD.
|
||||
So if we accept blank media (query_only == 2), then UNSUPPORTED for CD
|
||||
is not an error, it just mean query_cd() didn't fill it because it
|
||||
doesn't work for blank media as there's no TOC */
|
||||
if(dh->subType == UNSUPPORTED && !(query_only == 2 && dh->mainType == CD))
|
||||
{ char *td = alloca(strlen(dh->typeDescr)+1);
|
||||
|
||||
strcpy(td, dh->typeDescr);
|
||||
@@ -2621,7 +2648,7 @@ Image* OpenImageFromDevice(char *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(dh->sessions>1)
|
||||
if(dh->sessions>1 && query_only != 2)
|
||||
{ int sessions = dh->sessions;
|
||||
|
||||
CloseDevice(dh);
|
||||
@@ -2684,19 +2711,27 @@ Image* OpenImageFromDevice(char *device)
|
||||
|
||||
Verbose("# Calling query_size()\n");
|
||||
dh->sectors = query_size(image);
|
||||
Verbose("# returned: %lld sectors\n", dh->sectors);
|
||||
Verbose("# returned: %" PRId64 " sectors\n", dh->sectors);
|
||||
|
||||
switch(dh->subType & MAIN_TYPE_MASK)
|
||||
subTypeMasked = dh->subType & MAIN_TYPE_MASK;
|
||||
/* Handle the special case of blank CDs, that have no subType
|
||||
see above comment for more information: */
|
||||
if (query_only == 2 && subTypeMasked == 0 && dh->mainType == CD)
|
||||
{ Verbose("This may be a blank CD, adjusting subTypeMasked");
|
||||
subTypeMasked = CD;
|
||||
}
|
||||
|
||||
switch(subTypeMasked)
|
||||
{ case BD:
|
||||
case DVD:
|
||||
case CD:
|
||||
{ char *tmp;
|
||||
if(!image->isoInfo) // || dh->rs02Size > 0)
|
||||
tmp = g_strdup_printf(_("Medium: %s, %lld sectors%s"),
|
||||
tmp = g_strdup_printf(_("Medium: %s, %" PRId64 " sectors%s"),
|
||||
dh->typeDescr, dh->sectors,
|
||||
image->expectedSectors ? ", Ecc" : ""); //fixme: validate
|
||||
else
|
||||
tmp = g_strdup_printf(_("Medium \"%s\": %s, %lld sectors%s created %s"),
|
||||
tmp = g_strdup_printf(_("Medium \"%s\": %s, %" PRId64 " sectors%s created %s"),
|
||||
image->isoInfo->volumeLabel,
|
||||
dh->typeDescr, dh->sectors,
|
||||
image->expectedSectors ? ", Ecc," : ",", //fixme: validate
|
||||
|
||||
22
src/udf.c
22
src/udf.c
@@ -365,7 +365,7 @@ static IsoInfo* examine_iso(Image *image)
|
||||
|
||||
for(sector=16; sector<32; sector++)
|
||||
{
|
||||
#ifndef CLI
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->stopActions)
|
||||
continue;
|
||||
#endif
|
||||
@@ -827,7 +827,7 @@ void WriteIsoHeader(IsoHeader *ih, LargeFile *image)
|
||||
{ int n = LargeWrite(image, zero, 2048);
|
||||
|
||||
if(n != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)i, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)i, strerror(errno));
|
||||
}
|
||||
|
||||
/* Complete the primary volume descriptor */
|
||||
@@ -885,7 +885,7 @@ void WriteIsoHeader(IsoHeader *ih, LargeFile *image)
|
||||
/* Write the pvd */
|
||||
|
||||
if(LargeWrite(image, pvd, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)16, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)16, strerror(errno));
|
||||
|
||||
|
||||
/* Create the supplementary volume descriptor */
|
||||
@@ -942,7 +942,7 @@ void WriteIsoHeader(IsoHeader *ih, LargeFile *image)
|
||||
/* Write the svd */
|
||||
|
||||
if(LargeWrite(image, svd, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)17, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)17, strerror(errno));
|
||||
|
||||
/*** Create and write the volume descriptor set terminator */
|
||||
|
||||
@@ -955,26 +955,26 @@ void WriteIsoHeader(IsoHeader *ih, LargeFile *image)
|
||||
bp_set_byte(sector, 7, 1); /* Volume descriptor version 1 */
|
||||
|
||||
if(LargeWrite(image, sector, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)18, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)18, strerror(errno));
|
||||
|
||||
/*** Write the primary and supplementary path tables and root directories */
|
||||
|
||||
if(LargeWrite(image, ih->ppath->lpath, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)19, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)19, strerror(errno));
|
||||
|
||||
if(LargeWrite(image, ih->ppath->mpath, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)20, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)20, strerror(errno));
|
||||
|
||||
if(LargeWrite(image, ih->proot->dir, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)21, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)21, strerror(errno));
|
||||
|
||||
if(LargeWrite(image, ih->spath->lpath, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)22, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)22, strerror(errno));
|
||||
|
||||
if(LargeWrite(image, ih->spath->mpath, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)23, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)23, strerror(errno));
|
||||
|
||||
if(LargeWrite(image, ih->sroot->dir, 2048) != 2048)
|
||||
Stop(_("Failed writing to sector %lld in image: %s"), (gint64)24, strerror(errno));
|
||||
Stop(_("Failed writing to sector %" PRId64 " in image: %s"), (gint64)24, strerror(errno));
|
||||
|
||||
}
|
||||
|
||||
@@ -79,11 +79,11 @@ static gboolean expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer dat
|
||||
Closure->invisibleDash = g_strdup_printf("<span color=\"#%02x%02x%02x\">-</span>",
|
||||
bg->red>>8, bg->green>>8, bg->blue>>8);
|
||||
|
||||
AboutText(box, _("<b>Unofficial version.</b>\n\n"
|
||||
"This is a modified version of the last <b>0.79.6</b> upstream pre-release.\n"
|
||||
"We add support for a full CLI version, BD-R TL/QL, a Windows build, add an option to\n"
|
||||
AboutText(box, _("The <b>0.79.6 patchlevel</b> series are modified/enhanced from the last upstream pre-release.\n"
|
||||
"We add support for a full CLI version, BD-R TL/QL, a Windows build, an option to\n"
|
||||
"produce bigger BD-R RS03 images, re-enabled adaptive reading (except for RS03), and more.\n"
|
||||
"Please refer to the changelog for more information.\n"
|
||||
"\n"
|
||||
"Please refer to the <i>Help > Change log</i> menu for all the details.\n"
|
||||
"The warning message from the pre-release version is retained below.\n"));
|
||||
|
||||
AboutText(box, _("<i>Please note:</i>\n"
|
||||
|
||||
Reference in New Issue
Block a user