Apply (most) debian patches
Apply debian patch 02-encryption Apply debian patch 03-dvdrom Apply a modified version of patch 05-help-dialog Apply debian patch 08-fix-gnu-make-detection Apply debian patch 10-use-non-size-specific-icon-and-add-keywords-to-desktop-file Apply debian patch 12-fix-spelling-of-up-to Apply debian patch 13-fix-missing-language-field-in-po-files Apply a modified version of debian patch 14-make-builds-reproducible Apply debian patch 17-fix-all-but-deprecated-api-warnings Apply a modified version of debian patch 18-update-copyright-in-about-dialog Apply debian patch 19-show-text-files-with-abs-path Apply debian patch 22-fix-hurd-i386-ftbfs Apply debian patch 23-add-bdrom-support Apply debian patch 25-fix-man-pages Apply debian patch 27-allow-opening-in-browser-again Apply debian patch 28-pdftex-reproducibility Apply debian patch 29-fix-more-typos Apply debian patch 30-hurd-kfreebsd-ftbfs Apply debian patch 31-improve-hurd-and-kfreebsd-support Apply debian patch 33-honour-LDFLAGS Apply debian patch 34-gcc8-format-security.patch Apply debian patch 35-archived-homepage Apply debian patch 36-fix-parallelism
This commit is contained in:
@@ -138,7 +138,7 @@ untranslated:
|
|||||||
@$(MAKE) --no-print-directory -C locale check-untranslated
|
@$(MAKE) --no-print-directory -C locale check-untranslated
|
||||||
|
|
||||||
simple-md5sum: md5.c
|
simple-md5sum: md5.c
|
||||||
@$(CC) $(COPTS) $(MUDFLAP_CFLAGS) -DSIMPLE_MD5SUM md5.c $(MUDFLAP_LFLAGS) $(MUDFLAP_LIBS) -o simple-md5sum
|
@$(CC) $(COPTS) $(MUDFLAP_CFLAGS) -DSIMPLE_MD5SUM md5.c $(LDFLAGS) $(MUDFLAP_LFLAGS) $(MUDFLAP_LIBS) -o simple-md5sum
|
||||||
|
|
||||||
version.tex:
|
version.tex:
|
||||||
@echo "\\newcommand{\\projectversion}{$(VERSION)}" >$(SRCDIR)/documentation/config/version.tex
|
@echo "\\newcommand{\\projectversion}{$(VERSION)}" >$(SRCDIR)/documentation/config/version.tex
|
||||||
@@ -239,9 +239,9 @@ install: dvdisaster manual
|
|||||||
install -d $(BUILDROOT)$(MANDIR)/de/man1
|
install -d $(BUILDROOT)$(MANDIR)/de/man1
|
||||||
cd documentation; \
|
cd documentation; \
|
||||||
ESCAPED_DOCSUBDIR=`echo $(DOCSUBDIR) | sed -e 's/\//\\\\\//g'`; \
|
ESCAPED_DOCSUBDIR=`echo $(DOCSUBDIR) | sed -e 's/\//\\\\\//g'`; \
|
||||||
sed "s/%docdir%/$$ESCAPED_DOCSUBDIR\/html/" <dvdisaster.en.1 >dvdisaster.updated; \
|
sed "s/%docdir%/$$ESCAPED_DOCSUBDIR/" <dvdisaster.en.1 >dvdisaster.updated; \
|
||||||
install -m 644 dvdisaster.updated $(BUILDROOT)$(MANDIR)/man1/dvdisaster.1; \
|
install -m 644 dvdisaster.updated $(BUILDROOT)$(MANDIR)/man1/dvdisaster.1; \
|
||||||
sed "s/%docdir%/$$ESCAPED_DOCSUBDIR\/html/" <dvdisaster.de.1 >dvdisaster.updated; \
|
sed "s/%docdir%/$$ESCAPED_DOCSUBDIR/" <dvdisaster.de.1 >dvdisaster.updated; \
|
||||||
install -m 644 dvdisaster.updated $(BUILDROOT)$(MANDIR)/de/man1/dvdisaster.1; \
|
install -m 644 dvdisaster.updated $(BUILDROOT)$(MANDIR)/de/man1/dvdisaster.1; \
|
||||||
rm dvdisaster.updated
|
rm dvdisaster.updated
|
||||||
if echo $(WITH_OPTIONS) | grep "NLS_YES" >/dev/null; then \
|
if echo $(WITH_OPTIONS) | grep "NLS_YES" >/dev/null; then \
|
||||||
@@ -313,6 +313,7 @@ clean:
|
|||||||
@rm -f simple-md5sum
|
@rm -f simple-md5sum
|
||||||
@$(MAKE) --no-print-directory -C $(SRCDIR)/documentation/codec-specs clean;
|
@$(MAKE) --no-print-directory -C $(SRCDIR)/documentation/codec-specs clean;
|
||||||
@$(MAKE) --no-print-directory -C $(SRCDIR)/documentation/user-manual clean;
|
@$(MAKE) --no-print-directory -C $(SRCDIR)/documentation/user-manual clean;
|
||||||
|
@$(MAKE) --no-print-directory -C $(SRCDIR)/locale clean;
|
||||||
|
|
||||||
BUILD=`grep BUILD $(SRCDIR)/build.h | cut -d ' ' -f 3`
|
BUILD=`grep BUILD $(SRCDIR)/build.h | cut -d ' ' -f 3`
|
||||||
arch: archclean time-stamp
|
arch: archclean time-stamp
|
||||||
|
|||||||
2
build.c
2
build.c
@@ -25,4 +25,4 @@
|
|||||||
/* build is incremented at each make;
|
/* build is incremented at each make;
|
||||||
make recompile of dependent file as fast as possible */
|
make recompile of dependent file as fast as possible */
|
||||||
|
|
||||||
int buildCount = BUILD;
|
const char *const buildCount = BUILD;
|
||||||
|
|||||||
16
cacheprobe.c
16
cacheprobe.c
@@ -22,7 +22,8 @@
|
|||||||
|
|
||||||
#include "dvdisaster.h"
|
#include "dvdisaster.h"
|
||||||
|
|
||||||
#ifdef SYS_LINUX
|
#if defined(SYS_LINUX)
|
||||||
|
|
||||||
int ProbeCacheLineSize()
|
int ProbeCacheLineSize()
|
||||||
{ int cl_size = 0;
|
{ int cl_size = 0;
|
||||||
|
|
||||||
@@ -36,9 +37,9 @@ int ProbeCacheLineSize()
|
|||||||
|
|
||||||
return cl_size;
|
return cl_size;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SYS_FREEBSD
|
#elif defined(SYS_FREEBSD) || defined(SYS_KFREEBSD)
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
int ProbeCacheLineSize()
|
int ProbeCacheLineSize()
|
||||||
@@ -52,9 +53,9 @@ int ProbeCacheLineSize()
|
|||||||
|
|
||||||
return cl_size;
|
return cl_size;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SYS_NETBSD
|
#elif defined(SYS_NETBSD)
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
int ProbeCacheLineSize()
|
int ProbeCacheLineSize()
|
||||||
@@ -68,13 +69,14 @@ int ProbeCacheLineSize()
|
|||||||
|
|
||||||
return cl_size;
|
return cl_size;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SYS_UNKNOWN
|
#else /* SYS_UNKNOWN and others. */
|
||||||
|
|
||||||
int ProbeCacheLineSize()
|
int ProbeCacheLineSize()
|
||||||
{
|
{
|
||||||
return 64;
|
return 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
closure.c
13
closure.c
@@ -50,7 +50,8 @@ static void get_base_dirs()
|
|||||||
/*** Otherwise try the installation directory.
|
/*** Otherwise try the installation directory.
|
||||||
On Unices this is a hardcoded directory. */
|
On Unices this is a hardcoded directory. */
|
||||||
|
|
||||||
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_NETBSD) || defined(SYS_UNKNOWN)
|
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_KFREEBSD) || \
|
||||||
|
defined(SYS_NETBSD) || defined(SYS_HURD) || defined(SYS_UNKNOWN)
|
||||||
if(DirStat(BINDIR))
|
if(DirStat(BINDIR))
|
||||||
Closure->binDir = g_strdup(BINDIR);
|
Closure->binDir = g_strdup(BINDIR);
|
||||||
|
|
||||||
@@ -198,8 +199,7 @@ void ReadDotfile()
|
|||||||
/* Get first MAX_LINE_LEN bytes of line, discard the rest */
|
/* Get first MAX_LINE_LEN bytes of line, discard the rest */
|
||||||
|
|
||||||
line[MAX_LINE_LEN-1] = 1;
|
line[MAX_LINE_LEN-1] = 1;
|
||||||
if (fgets(line, MAX_LINE_LEN, dotfile) == NULL)
|
if (!fgets(line, MAX_LINE_LEN, dotfile)) break;
|
||||||
break;
|
|
||||||
if(!line[MAX_LINE_LEN-1]) /* line longer than buffer */
|
if(!line[MAX_LINE_LEN-1]) /* line longer than buffer */
|
||||||
while(!feof(dotfile) && fgetc(dotfile) != '\n')
|
while(!feof(dotfile) && fgetc(dotfile) != '\n')
|
||||||
;
|
;
|
||||||
@@ -439,7 +439,8 @@ void InitClosure()
|
|||||||
|
|
||||||
/* Generate a more comprehensive version string */
|
/* Generate a more comprehensive version string */
|
||||||
|
|
||||||
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_NETBSD)
|
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_KFREEBSD) || \
|
||||||
|
defined(SYS_NETBSD) || defined(SYS_HURD)
|
||||||
#ifdef HAVE_64BIT
|
#ifdef HAVE_64BIT
|
||||||
#define BITNESS_STRING " 64bit"
|
#define BITNESS_STRING " 64bit"
|
||||||
#else
|
#else
|
||||||
@@ -449,7 +450,7 @@ void InitClosure()
|
|||||||
#define BITNESS_STRING ""
|
#define BITNESS_STRING ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Closure->versionString = g_strdup_printf("dvdisaster %s build %d, %s%s",
|
Closure->versionString = g_strdup_printf("dvdisaster %s build %s, %s%s",
|
||||||
Closure->cookedVersion, buildCount, SYS_NAME, BITNESS_STRING);
|
Closure->cookedVersion, buildCount, SYS_NAME, BITNESS_STRING);
|
||||||
|
|
||||||
/* Replace the dot with a locale-resistant separator */
|
/* Replace the dot with a locale-resistant separator */
|
||||||
@@ -481,6 +482,7 @@ void InitClosure()
|
|||||||
Closure->deviceNames = g_ptr_array_new();
|
Closure->deviceNames = g_ptr_array_new();
|
||||||
Closure->deviceNodes = g_ptr_array_new();
|
Closure->deviceNodes = g_ptr_array_new();
|
||||||
Closure->viewer = g_strdup("xdg-open");
|
Closure->viewer = g_strdup("xdg-open");
|
||||||
|
Closure->browser = g_strdup("xdg-open");
|
||||||
Closure->methodList = g_ptr_array_new();
|
Closure->methodList = g_ptr_array_new();
|
||||||
Closure->methodName = g_strdup("RS01");
|
Closure->methodName = g_strdup("RS01");
|
||||||
Closure->dDumpDir = g_strdup(Closure->homeDir);
|
Closure->dDumpDir = g_strdup(Closure->homeDir);
|
||||||
@@ -601,6 +603,7 @@ void FreeClosure()
|
|||||||
cond_free(Closure->binDir);
|
cond_free(Closure->binDir);
|
||||||
cond_free(Closure->docDir);
|
cond_free(Closure->docDir);
|
||||||
cond_free(Closure->viewer);
|
cond_free(Closure->viewer);
|
||||||
|
cond_free(Closure->browser);
|
||||||
cond_free(Closure->errorTitle);
|
cond_free(Closure->errorTitle);
|
||||||
cond_free(Closure->simulateCD);
|
cond_free(Closure->simulateCD);
|
||||||
cond_free(Closure->dDumpDir);
|
cond_free(Closure->dDumpDir);
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ Comment=Additional error protection for CD/DVD media
|
|||||||
Comment[cs]=Přídavná ochrana pro média CD/DVD
|
Comment[cs]=Přídavná ochrana pro média CD/DVD
|
||||||
Comment[de]=Zusätzliche Fehlerkorrektur für CD/DVD
|
Comment[de]=Zusätzliche Fehlerkorrektur für CD/DVD
|
||||||
Exec=dvdisaster
|
Exec=dvdisaster
|
||||||
Icon=dvdisaster48.png
|
Icon=dvdisaster
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Application;System;
|
Categories=Application;System;
|
||||||
|
Keywords=CD;DVD;media;data loss;scratch;aging;error;protection;recovery;
|
||||||
|
|||||||
2
debug.c
2
debug.c
@@ -1023,7 +1023,7 @@ void RawSector(char *arg)
|
|||||||
*
|
*
|
||||||
* ./dvdisaster --debug --send-cdb 12,00,00,00,24,00:24
|
* ./dvdisaster --debug --send-cdb 12,00,00,00,24,00:24
|
||||||
*
|
*
|
||||||
* The first six bytes make up the cdb; cdbs with upto 12 bytes are possible.
|
* The first six bytes make up the cdb; cdbs with up to 12 bytes are possible.
|
||||||
* The :24 arg is the allocation length.
|
* The :24 arg is the allocation length.
|
||||||
* Note that the allocation length must match those specified in the cdb;
|
* Note that the allocation length must match those specified in the cdb;
|
||||||
* differing values may crash the system.
|
* differing values may crash the system.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ correction files must be protected with an image level
|
|||||||
error correction layer (by using RS01,RS02 or RS03 on the medium),
|
error correction layer (by using RS01,RS02 or RS03 on the medium),
|
||||||
since only image level error correction avoids meta
|
since only image level error correction avoids meta
|
||||||
data sectors to become a single point of failure. See the
|
data sectors to become a single point of failure. See the
|
||||||
discussion at \url{http://dvdisaster.net/en/qa32.html} for
|
discussion at \url{https://web.archive.org/web/20180428070843/http://dvdisaster.net/en/qa32.html} for
|
||||||
more information on the advantages of image level data protection
|
more information on the advantages of image level data protection
|
||||||
over file level approaches.
|
over file level approaches.
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ The $d_{i,j}$ denote the $i-th$ byte in the $j-th$ layer.
|
|||||||
In order to create the first ecc block, bytes $d_{1,1}$ to $d_{1,n}$ are taken from the
|
In order to create the first ecc block, bytes $d_{1,1}$ to $d_{1,n}$ are taken from the
|
||||||
$n$ layers. Then the RS(255,k) code is calculated (see appendix \ref{rs} for its parameters)
|
$n$ layers. Then the RS(255,k) code is calculated (see appendix \ref{rs} for its parameters)
|
||||||
and the
|
and the
|
||||||
resulting $k$ parity bytes $e_{1,1}$ upto $e_{k,1}$ are stored
|
resulting $k$ parity bytes $e_{1,1}$ up to $e_{k,1}$ are stored
|
||||||
in the ecc file. The resulting ecc block is marked grey in the
|
in the ecc file. The resulting ecc block is marked grey in the
|
||||||
figure. The next ecc blocks are calculated and stored accordingly.
|
figure. The next ecc blocks are calculated and stored accordingly.
|
||||||
In total, the ecc section contains $k*ls$ bytes of parity information,
|
In total, the ecc section contains $k*ls$ bytes of parity information,
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ the parity data portion of the image might not be written to the medium.
|
|||||||
Most current writing programs do however measure the .iso image by examining
|
Most current writing programs do however measure the .iso image by examining
|
||||||
its file size, and will transfer the parity data correctly. To be sure you
|
its file size, and will transfer the parity data correctly. To be sure you
|
||||||
should follow the steps described under ``Testing image compatibility''
|
should follow the steps described under ``Testing image compatibility''
|
||||||
at the dvdisaster site (\url{http://dvdisaster.net/en/howtos92.html}) once
|
at the dvdisaster site (\url{https://web.archive.org/web/20180428070843/http://dvdisaster.net/en/howtos92.html}) once
|
||||||
before using each version of your optical media authoring software.
|
before using each version of your optical media authoring software.
|
||||||
|
|
||||||
Like the other dvdisaster codecs, RS02 is based on a RS(255,k) Reed-Solomon code
|
Like the other dvdisaster codecs, RS02 is based on a RS(255,k) Reed-Solomon code
|
||||||
@@ -133,7 +133,7 @@ Its format is described in appendix \ref{eh}. For RS02, only the data fields
|
|||||||
marked with ``all'' or ``RS02'' are relevant; all other fields should be set to zero.
|
marked with ``all'' or ``RS02'' are relevant; all other fields should be set to zero.
|
||||||
|
|
||||||
Data layer $n$ does also contain the CRC32 checksums of each data sector
|
Data layer $n$ does also contain the CRC32 checksums of each data sector
|
||||||
upto the ecc header. If the .iso image contains $s$ sectors,
|
up to the ecc header. If the .iso image contains $s$ sectors,
|
||||||
then the CRC field contains $4s$ bytes, rounded up
|
then the CRC field contains $4s$ bytes, rounded up
|
||||||
to the nearest multiple of 2048.
|
to the nearest multiple of 2048.
|
||||||
CRC32 checksums are calculated over a whole CD sector comprising 2048 bytes.
|
CRC32 checksums are calculated over a whole CD sector comprising 2048 bytes.
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ Selects between the sg (SG_IO) driver (default setting) and the
|
|||||||
older cdrom (CDROM_SEND_PACKET) driver for accessing the optical drives.
|
older cdrom (CDROM_SEND_PACKET) driver for accessing the optical drives.
|
||||||
Both drivers should work equally well; however the cdrom driver is known
|
Both drivers should work equally well; however the cdrom driver is known
|
||||||
to cause system failures on some ancient SCSI controllers.
|
to cause system failures on some ancient SCSI controllers.
|
||||||
The older cdrom driver was the default upto and including dvdisaster 0.72.x;
|
The older cdrom driver was the default up to and including dvdisaster 0.72.x;
|
||||||
if the now pre-selected sg driver changes something to the worse for you
|
if the now pre-selected sg driver changes something to the worse for you
|
||||||
please switch back to the older driver using \-\-driver=cdrom.
|
please switch back to the older driver using \-\-driver=cdrom.
|
||||||
.TP
|
.TP
|
||||||
@@ -384,7 +384,7 @@ the uncorrected sector instead.
|
|||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.B \-\-read-attempts n-m
|
.B \-\-read-attempts n-m
|
||||||
attempts n upto m reads of a defective sector.
|
attempts n up to m reads of a defective sector.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-read-medium n
|
.B \-\-read-medium n
|
||||||
read the whole medium up to n times.
|
read the whole medium up to n times.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ Carsten Gnörlich (Anschrift wie oben).
|
|||||||
Das Impressum gilt für die Internetpräsenz unter den Domänen<br>
|
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.com">dvdisaster.com</a>,
|
||||||
<a href="http://dvdisaster.de">dvdisaster.de</a>,
|
<a href="http://dvdisaster.de">dvdisaster.de</a>,
|
||||||
<a href="http://dvdisaster.net">dvdisaster.net</a>,
|
<a href="https://web.archive.org/web/20180428070843/http://dvdisaster.net">dvdisaster.net</a>,
|
||||||
<a href="http://dvdisaster.org">dvdisaster.org</a>.
|
<a href="http://dvdisaster.org">dvdisaster.org</a>.
|
||||||
|
|
||||||
<!-- Page footer -->
|
<!-- Page footer -->
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ Carsten Gnörlich (see above for address).
|
|||||||
This notice covers the web sites under the domains<br>
|
This notice covers the web sites under the domains<br>
|
||||||
<a href="http://dvdisaster.com">dvdisaster.com</a>,
|
<a href="http://dvdisaster.com">dvdisaster.com</a>,
|
||||||
<a href="http://dvdisaster.de">dvdisaster.de</a>,
|
<a href="http://dvdisaster.de">dvdisaster.de</a>,
|
||||||
<a href="http://dvdisaster.net">dvdisaster.net</a>,
|
<a href="https://web.archive.org/web/20180428070843/http://dvdisaster.net">dvdisaster.net</a>,
|
||||||
<a href="http://dvdisaster.org">dvdisaster.org</a>.<br>
|
<a href="http://dvdisaster.org">dvdisaster.org</a>.<br>
|
||||||
|
|
||||||
<!-- Page footer -->
|
<!-- Page footer -->
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ media with augmented images may not play correctly on all units \\
|
|||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
|
||||||
\paragraph{Further reading.} The specification for the dvdisaster codecs
|
\paragraph{Further reading.} The specification for the dvdisaster codecs
|
||||||
has been specified in a separate document called \href{http://dvdisaster.net/downloads/codecs.pdf}{codecs.pdf}.
|
has been specified in a separate document called \href{https://web.archive.org/web/20180428070843/http://dvdisaster.net/downloads/codecs.pdf}{codecs.pdf}.
|
||||||
Good knowledge in coding theory and programming is required.
|
Good knowledge in coding theory and programming is required.
|
||||||
|
|
||||||
\subsection{The linear reading strategy}
|
\subsection{The linear reading strategy}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ the \href{http://www.gnu.org/licenses/gpl-3.0.txt}{GNU General Public License v3
|
|||||||
|
|
||||||
\bigskip
|
\bigskip
|
||||||
|
|
||||||
The dvdisaster developer site (\url{http://dvdisaster.net}) contains
|
The dvdisaster developer site (\url{https://web.archive.org/web/20180428070843/http://dvdisaster.net}) contains
|
||||||
the latest source code releases for the FreeBSD, GNU/Linux and NetBSD
|
the latest source code releases for the FreeBSD, GNU/Linux and NetBSD
|
||||||
operating systems. These are mostly aimed at maintainers of binary packages for
|
operating systems. These are mostly aimed at maintainers of binary packages for
|
||||||
the beforementioned platforms. As an end user you might find it more convenient
|
the beforementioned platforms. As an end user you might find it more convenient
|
||||||
@@ -133,6 +133,6 @@ We cannot accept them for various reasons.
|
|||||||
\smallskip
|
\smallskip
|
||||||
|
|
||||||
dvdisaster releases are always published with cryptographic signatures
|
dvdisaster releases are always published with cryptographic signatures
|
||||||
and md5 checksums. See the \href{http://dvdisaster.net}{download site} for examples.
|
and md5 checksums. See the \href{https://web.archive.org/web/20180428070843/http://dvdisaster.net}{download site} for examples.
|
||||||
Be very cautious if signatures and checksums are missing, invalid or not
|
Be very cautious if signatures and checksums are missing, invalid or not
|
||||||
matching those published at the sites mentioned above.
|
matching those published at the sites mentioned above.
|
||||||
|
|||||||
@@ -1822,7 +1822,7 @@ process of creating error correction files using these options. The
|
|||||||
first option marked green lets dvdisaster create the error correction
|
first option marked green lets dvdisaster create the error correction
|
||||||
file immediately after the medium has been (completely) read.
|
file immediately after the medium has been (completely) read.
|
||||||
The second option marked green deletes the image when the error correction
|
The second option marked green deletes the image when the error correction
|
||||||
file has been sucessfully created.
|
file has been successfully created.
|
||||||
|
|
||||||
\bigskip
|
\bigskip
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,8 @@
|
|||||||
\fancyfoot{}
|
\fancyfoot{}
|
||||||
\fancyfoot[LE,RO]{page \thepage\ of \pageref{LastPage}}
|
\fancyfoot[LE,RO]{page \thepage\ of \pageref{LastPage}}
|
||||||
|
|
||||||
|
\pdftrailerid{dvdisaster}
|
||||||
|
\pdfsuppressptexinfo=-1
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\definecolor{lightorange}{RGB}{255,224,150}
|
\definecolor{lightorange}{RGB}{255,224,150}
|
||||||
|
|||||||
@@ -465,6 +465,6 @@ drive for reading images in these cases.}
|
|||||||
|
|
||||||
\qa{``Ecc file has been created with version 0.40.7.''}
|
\qa{``Ecc file has been created with version 0.40.7.''}
|
||||||
{Some developer versions of dvdisaster mark their ecc files with a special bit.
|
{Some developer versions of dvdisaster mark their ecc files with a special bit.
|
||||||
This causes dvdisaster versions upto 0.65 to falsely display the above error
|
This causes dvdisaster versions up to 0.65 to falsely display the above error
|
||||||
message. Please use the developer versions only together with dvdisaster
|
message. Please use the developer versions only together with dvdisaster
|
||||||
0.66 or newer versions. }
|
0.66 or newer versions. }
|
||||||
|
|||||||
@@ -938,7 +938,7 @@ int main(int argc, char *argv[])
|
|||||||
PrintCLI(_(" --old-ds-marker - mark missing sectors compatible with dvdisaster <= 0.70\n"));
|
PrintCLI(_(" --old-ds-marker - mark missing sectors compatible with dvdisaster <= 0.70\n"));
|
||||||
PrintCLI(_(" --prefetch-sectors n - prefetch n sectors for RS03 encoding (uses ~nMiB)\n"));
|
PrintCLI(_(" --prefetch-sectors n - prefetch n sectors for RS03 encoding (uses ~nMiB)\n"));
|
||||||
PrintCLI(_(" --raw-mode n - mode for raw reading CD media (20 or 21)\n"));
|
PrintCLI(_(" --raw-mode n - mode for raw reading CD media (20 or 21)\n"));
|
||||||
PrintCLI(_(" --read-attempts n-m - attempts n upto m reads of a defective sector\n"));
|
PrintCLI(_(" --read-attempts n-m - attempts n up to m reads of a defective sector\n"));
|
||||||
PrintCLI(_(" --read-medium n - read the whole medium up to n times\n"));
|
PrintCLI(_(" --read-medium n - read the whole medium up to n times\n"));
|
||||||
PrintCLI(_(" --read-raw - performs read in raw mode if possible\n"));
|
PrintCLI(_(" --read-raw - performs read in raw mode if possible\n"));
|
||||||
PrintCLI(_(" --regtest - tweaks output for compatibility with regtests\n"));
|
PrintCLI(_(" --regtest - tweaks output for compatibility with regtests\n"));
|
||||||
|
|||||||
13
dvdisaster.h
13
dvdisaster.h
@@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
#define MAX_CODEC_THREADS 1024 /* not including IO and GUI */
|
#define MAX_CODEC_THREADS 1024 /* not including IO and GUI */
|
||||||
#define MAX_OLD_CACHE_SIZE 8096 /* old cache for RS01/RS02 */
|
#define MAX_OLD_CACHE_SIZE 8096 /* old cache for RS01/RS02 */
|
||||||
#define MAX_PREFETCH_CACHE_SIZE (512*1024) /* upto 0.5TB RS03 */
|
#define MAX_PREFETCH_CACHE_SIZE (512*1024) /* up to 0.5TB RS03 */
|
||||||
|
|
||||||
/* Choices for I/O strategy */
|
/* Choices for I/O strategy */
|
||||||
|
|
||||||
@@ -237,6 +237,7 @@ typedef struct _GlobalClosure
|
|||||||
char *binDir; /* place where the binary resides */
|
char *binDir; /* place where the binary resides */
|
||||||
char *docDir; /* place where our documentation resides */
|
char *docDir; /* place where our documentation resides */
|
||||||
char *viewer; /* Name of preferred PDF viewer */
|
char *viewer; /* Name of preferred PDF viewer */
|
||||||
|
char *browser; /* Name of preferred browser */
|
||||||
|
|
||||||
GMutex progressLock; /* A mutex protected the stuff below */
|
GMutex progressLock; /* A mutex protected the stuff below */
|
||||||
char bs[256]; /* A string of 255 backspace characters */
|
char bs[256]; /* A string of 255 backspace characters */
|
||||||
@@ -390,7 +391,7 @@ typedef struct _LargeFile
|
|||||||
#define FINGERPRINT_SECTOR 16 /* Sector currently used to calculate the fingerprint. */
|
#define FINGERPRINT_SECTOR 16 /* Sector currently used to calculate the fingerprint. */
|
||||||
/* This is the ISO filesystem root sector which contains */
|
/* This is the ISO filesystem root sector which contains */
|
||||||
/* the volume label and creation time stamps. */
|
/* the volume label and creation time stamps. */
|
||||||
/* Versions upto 0.64 used sector 257, */
|
/* Versions up to 0.64 used sector 257, */
|
||||||
/* but that was not a wise choice for CD media.*/
|
/* but that was not a wise choice for CD media.*/
|
||||||
|
|
||||||
#define MFLAG_DEVEL (1<<0) /* for methodFlags[3] */
|
#define MFLAG_DEVEL (1<<0) /* for methodFlags[3] */
|
||||||
@@ -477,7 +478,7 @@ void FreeBitmap(Bitmap*);
|
|||||||
*** build.h
|
*** build.h
|
||||||
***/
|
***/
|
||||||
|
|
||||||
int buildCount;
|
extern const char *const buildCount;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** cacheprobe.h
|
*** cacheprobe.h
|
||||||
@@ -1394,6 +1395,12 @@ int ProbeAltiVec(void);
|
|||||||
|
|
||||||
void ShowPDF(char*);
|
void ShowPDF(char*);
|
||||||
|
|
||||||
|
/***
|
||||||
|
*** show-html.c
|
||||||
|
***/
|
||||||
|
|
||||||
|
void ShowHTML(char*);
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** smart-lec.c
|
*** smart-lec.c
|
||||||
***/
|
***/
|
||||||
|
|||||||
@@ -424,6 +424,24 @@ char *find_file(char *file, size_t *size, char *lang)
|
|||||||
lang_suffix[1] = lang[1];
|
lang_suffix[1] = lang[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Test for absolute path first. */
|
||||||
|
if(*file == '/')
|
||||||
|
{
|
||||||
|
if(lang)
|
||||||
|
path = g_strdup_printf("%s.%s", file, lang_suffix);
|
||||||
|
else
|
||||||
|
path = g_strdup(file);
|
||||||
|
|
||||||
|
if(LargeStat(path, &stat_size))
|
||||||
|
{
|
||||||
|
*size = stat_size;
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free(path);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Try file in bin dir */
|
/* Try file in bin dir */
|
||||||
|
|
||||||
if(Closure->binDir)
|
if(Closure->binDir)
|
||||||
@@ -582,7 +600,8 @@ static gint about_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
|
|||||||
{ case GDK_BUTTON_PRESS:
|
{ case GDK_BUTTON_PRESS:
|
||||||
if(!inside) return FALSE; /* Defect in certain Gtk versions? */
|
if(!inside) return FALSE; /* Defect in certain Gtk versions? */
|
||||||
if(!strcmp(label,"GPL")) ShowGPL();
|
if(!strcmp(label,"GPL")) ShowGPL();
|
||||||
else if(!strcmp(label,"MODIFYING")) show_modifying();
|
else if(!strcmp(label,"MODIFYING")) show_modifying();
|
||||||
|
else if(strlen(label) > 4 && !strncmp(label, "http", 4)) ShowHTML(g_strdup(label));
|
||||||
else ShowPDF(g_strdup(label));
|
else ShowPDF(g_strdup(label));
|
||||||
break;
|
break;
|
||||||
case GDK_ENTER_NOTIFY:
|
case GDK_ENTER_NOTIFY:
|
||||||
@@ -724,8 +743,10 @@ void AboutDialog()
|
|||||||
g_free(text);
|
g_free(text);
|
||||||
|
|
||||||
#ifdef MODIFIED_SOURCE
|
#ifdef MODIFIED_SOURCE
|
||||||
AboutTextWithLink(vbox,
|
AboutTextWithLink(vbox,
|
||||||
_("Modified version Copyright 2017 (please fill in - [directions])\n"
|
_("[Modified version]\n"
|
||||||
|
"Copyright 2019-2020 Stephane Lesimple\n"
|
||||||
|
"Copyright 2005-2017 Debian Optical Media Tools Team\n"
|
||||||
"Copyright 2004-2017 Carsten Gnoerlich"),
|
"Copyright 2004-2017 Carsten Gnoerlich"),
|
||||||
"MODIFYING");
|
"MODIFYING");
|
||||||
#else
|
#else
|
||||||
@@ -747,11 +768,12 @@ void AboutDialog()
|
|||||||
"GPL");
|
"GPL");
|
||||||
|
|
||||||
#ifdef MODIFIED_SOURCE
|
#ifdef MODIFIED_SOURCE
|
||||||
AboutTextWithLink(vbox, _("\nThis program is <b>not the original</b>. It is based on the\n"
|
AboutTextWithLink(vbox, _("\nThis version is <b>not the original</b>. It has been patched\n"
|
||||||
"source code of dvdisaster, but contains third-party changes.\n\n"
|
"for Debian to support DVD-ROMs (with and without encryption),"
|
||||||
"Please do not bother the original authors of dvdisaster\n"
|
"and subsequently patched again to support a CLI-only build, among other things.\n\n"
|
||||||
"([www.dvdisaster.org]) about issues with this version.\n"),
|
"Please do not bother the original authors of dvdisaster or the Debian maintainer\n"
|
||||||
"http://www.dvdisaster.org");
|
"but submit bugreports against GitHun instead.\n"),
|
||||||
|
"https://github.com/speed47/dvdisaster");
|
||||||
|
|
||||||
#else
|
#else
|
||||||
lang = g_getenv("LANG");
|
lang = g_getenv("LANG");
|
||||||
|
|||||||
@@ -30,15 +30,19 @@ locale: \$(LOCALEFILES)
|
|||||||
|
|
||||||
# Create the locale files.
|
# Create the locale files.
|
||||||
|
|
||||||
|
messages.pot: \$(CFILES)
|
||||||
|
@cd ..; xgettext --no-wrap -cTRANSLATORS: -o locale/messages.pot -k_ -k_utf \$(CFILES_NP)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f messages.pot
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
for i in $prefixes; do
|
for i in $prefixes; do
|
||||||
cat >> Makefile <<EOF
|
cat >> Makefile <<EOF
|
||||||
$i.po: \$(CFILES)
|
$i.po: messages.pot
|
||||||
@echo "Updating $i.po"
|
@echo "Updating $i.po"
|
||||||
@cd ..; xgettext --no-wrap -cTRANSLATORS: -o locale/messages.pot -k_ -k_utf \$(CFILES_NP)
|
|
||||||
@msgmerge -q -U --no-wrap --no-fuzzy-matching $i.po messages.pot
|
@msgmerge -q -U --no-wrap --no-fuzzy-matching $i.po messages.pot
|
||||||
@rm -f messages.pot
|
|
||||||
|
|
||||||
$i/LC_MESSAGES/dvdisaster.mo: $i.po
|
$i/LC_MESSAGES/dvdisaster.mo: $i.po
|
||||||
@echo "Updating $i.mo"
|
@echo "Updating $i.mo"
|
||||||
|
|||||||
12
locale/cs.po
12
locale/cs.po
@@ -652,7 +652,7 @@ msgid " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
|||||||
msgstr " --raw-mode n - režim přímého čtení pro CD disky (20 nebo 21)\n"
|
msgstr " --raw-mode n - režim přímého čtení pro CD disky (20 nebo 21)\n"
|
||||||
|
|
||||||
#: dvdisaster.c:941
|
#: dvdisaster.c:941
|
||||||
msgid " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
msgid " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
msgstr " --read-attempts n-m - zkusit n až m opakovaných čtení poškozeného sektoru\n"
|
msgstr " --read-attempts n-m - zkusit n až m opakovaných čtení poškozeného sektoru\n"
|
||||||
|
|
||||||
#: dvdisaster.c:942
|
#: dvdisaster.c:942
|
||||||
@@ -1901,7 +1901,7 @@ msgid "Media ejection"
|
|||||||
msgstr "Vysunutí disku"
|
msgstr "Vysunutí disku"
|
||||||
|
|
||||||
#: preferences.c:2065 preferences.c:2066
|
#: preferences.c:2065 preferences.c:2066
|
||||||
msgid "Eject medium after sucessful read"
|
msgid "Eject medium after successful read"
|
||||||
msgstr "Po úspěšném načtení vysunout disk"
|
msgstr "Po úspěšném načtení vysunout disk"
|
||||||
|
|
||||||
#: preferences.c:2092
|
#: preferences.c:2092
|
||||||
@@ -1998,7 +1998,7 @@ msgstr "Přečtení sektoru nezkoušet více než %d krát"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Maximum number of reading attempts</b>\n"
|
"<b>Maximum number of reading attempts</b>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts upto this number.\n"
|
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts up to this number.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -2065,7 +2065,7 @@ msgstr " krát"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Media read attempts</b> for the linear reading strategy\n"
|
"<b>Media read attempts</b> for the linear reading strategy\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If unreadable sectors remain after reading the medium from start to end, the medium is read again upto he given number of times.\n"
|
"If unreadable sectors remain after reading the medium from start to end, the medium is read again up to he given number of times.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Only the missing sectors will be tried in the additional reading passes."
|
"Only the missing sectors will be tried in the additional reading passes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -6646,11 +6646,11 @@ msgstr "<i>Novinky v této verzi:</i>"
|
|||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "dvdisaster version %s build %d\n"
|
#~ "dvdisaster version %s build %s\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "dvdisaster verze %s sestavení %d\n"
|
#~ "dvdisaster verze %s sestavení %s\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
|
|
||||||
#~ msgid "--prefetch-sectors must be in range 32...8096"
|
#~ msgid "--prefetch-sectors must be in range 32...8096"
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ msgid " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
|||||||
msgstr " --raw-mode n - \"raw-modus\" zum Lesen von CD (20 or 21)\n"
|
msgstr " --raw-mode n - \"raw-modus\" zum Lesen von CD (20 or 21)\n"
|
||||||
|
|
||||||
#: dvdisaster.c:941
|
#: dvdisaster.c:941
|
||||||
msgid " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
msgid " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
msgstr " --read-attempts n-m - versucht beschädigten Sektor n bis m-mal zu lesen\n"
|
msgstr " --read-attempts n-m - versucht beschädigten Sektor n bis m-mal zu lesen\n"
|
||||||
|
|
||||||
#: dvdisaster.c:942
|
#: dvdisaster.c:942
|
||||||
@@ -1900,7 +1900,7 @@ msgid "Media ejection"
|
|||||||
msgstr "Datenträger auswerfen"
|
msgstr "Datenträger auswerfen"
|
||||||
|
|
||||||
#: preferences.c:2065 preferences.c:2066
|
#: preferences.c:2065 preferences.c:2066
|
||||||
msgid "Eject medium after sucessful read"
|
msgid "Eject medium after successful read"
|
||||||
msgstr "Datenträger nach erfolgreichem Lesen auswerfen"
|
msgstr "Datenträger nach erfolgreichem Lesen auswerfen"
|
||||||
|
|
||||||
#: preferences.c:2092
|
#: preferences.c:2092
|
||||||
@@ -1998,7 +1998,7 @@ msgstr "Höchstens %d Leseversuche pro Sektor"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Maximum number of reading attempts</b>\n"
|
"<b>Maximum number of reading attempts</b>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts upto this number.\n"
|
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts up to this number.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -2065,7 +2065,7 @@ msgstr " mal lesen"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Media read attempts</b> for the linear reading strategy\n"
|
"<b>Media read attempts</b> for the linear reading strategy\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If unreadable sectors remain after reading the medium from start to end, the medium is read again upto he given number of times.\n"
|
"If unreadable sectors remain after reading the medium from start to end, the medium is read again up to he given number of times.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Only the missing sectors will be tried in the additional reading passes."
|
"Only the missing sectors will be tried in the additional reading passes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
10
locale/it.po
10
locale/it.po
@@ -619,7 +619,7 @@ msgid " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: dvdisaster.c:941
|
#: dvdisaster.c:941
|
||||||
msgid " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
msgid " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: dvdisaster.c:942
|
#: dvdisaster.c:942
|
||||||
@@ -1753,7 +1753,7 @@ msgid "Media ejection"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: preferences.c:2065 preferences.c:2066
|
#: preferences.c:2065 preferences.c:2066
|
||||||
msgid "Eject medium after sucessful read"
|
msgid "Eject medium after successful read"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: preferences.c:2092
|
#: preferences.c:2092
|
||||||
@@ -1828,7 +1828,7 @@ msgstr ""
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Maximum number of reading attempts</b>\n"
|
"<b>Maximum number of reading attempts</b>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts upto this number.\n"
|
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts up to this number.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -1887,7 +1887,7 @@ msgstr ""
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Media read attempts</b> for the linear reading strategy\n"
|
"<b>Media read attempts</b> for the linear reading strategy\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If unreadable sectors remain after reading the medium from start to end, the medium is read again upto he given number of times.\n"
|
"If unreadable sectors remain after reading the medium from start to end, the medium is read again up to he given number of times.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Only the missing sectors will be tried in the additional reading passes."
|
"Only the missing sectors will be tried in the additional reading passes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -6128,7 +6128,7 @@ msgstr ""
|
|||||||
#~ msgstr "Se potete verificate se la dimensione dell'immagine è corretta,\n"
|
#~ msgstr "Se potete verificate se la dimensione dell'immagine è corretta,\n"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "please send in the whole dvdisaster output upto this line\n"
|
#~ "please send in the whole dvdisaster output up to this line\n"
|
||||||
#~ "to have your drive included in the internal data base.\n"
|
#~ "to have your drive included in the internal data base.\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Prego inviare l'intero output di dvdisaster fino a questa linea\n"
|
#~ "Prego inviare l'intero output di dvdisaster fino a questa linea\n"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2010-06-09 11:13+0200\n"
|
"PO-Revision-Date: 2010-06-09 11:13+0200\n"
|
||||||
"Last-Translator: cg <cg@dvdisaster.org>\n"
|
"Last-Translator: cg <cg@dvdisaster.org>\n"
|
||||||
"Language-Team: Portuguese\n"
|
"Language-Team: Portuguese\n"
|
||||||
"Language: \n"
|
"Language: pt_BR\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -635,7 +635,7 @@ msgid " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
|||||||
msgstr " --raw-mode n - modo para leitura de mídia CD em modo raw (20 ou 21)\n"
|
msgstr " --raw-mode n - modo para leitura de mídia CD em modo raw (20 ou 21)\n"
|
||||||
|
|
||||||
#: dvdisaster.c:941
|
#: dvdisaster.c:941
|
||||||
msgid " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
msgid " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
msgstr " --read-attempts n-m - tenta de n a m leituras em um setor defeituoso\n"
|
msgstr " --read-attempts n-m - tenta de n a m leituras em um setor defeituoso\n"
|
||||||
|
|
||||||
#: dvdisaster.c:942
|
#: dvdisaster.c:942
|
||||||
@@ -1841,7 +1841,7 @@ msgid "Media ejection"
|
|||||||
msgstr "Ejeção da mídia"
|
msgstr "Ejeção da mídia"
|
||||||
|
|
||||||
#: preferences.c:2065 preferences.c:2066
|
#: preferences.c:2065 preferences.c:2066
|
||||||
msgid "Eject medium after sucessful read"
|
msgid "Eject medium after successful read"
|
||||||
msgstr "Ejetar mídia após uma leitura completa"
|
msgstr "Ejetar mídia após uma leitura completa"
|
||||||
|
|
||||||
#: preferences.c:2092
|
#: preferences.c:2092
|
||||||
@@ -1937,7 +1937,7 @@ msgstr "Máx. de %d tentativas de leitura por setor"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Maximum number of reading attempts</b>\n"
|
"<b>Maximum number of reading attempts</b>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts upto this number.\n"
|
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts up to this number.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -2004,7 +2004,7 @@ msgstr " vezes"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Media read attempts</b> for the linear reading strategy\n"
|
"<b>Media read attempts</b> for the linear reading strategy\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If unreadable sectors remain after reading the medium from start to end, the medium is read again upto he given number of times.\n"
|
"If unreadable sectors remain after reading the medium from start to end, the medium is read again up to he given number of times.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Only the missing sectors will be tried in the additional reading passes."
|
"Only the missing sectors will be tried in the additional reading passes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -6355,11 +6355,11 @@ msgstr "<i>Novidades dessa versão:</i>"
|
|||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "dvdisaster version %s build %d\n"
|
#~ "dvdisaster version %s build %s\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "dvdisaster, versão %s build %d\n"
|
#~ "dvdisaster, versão %s build %s\n"
|
||||||
|
|
||||||
#~ msgid "--cache-size maximum is 8192MB."
|
#~ msgid "--cache-size maximum is 8192MB."
|
||||||
#~ msgstr "--cache-size máximo é 8192MB."
|
#~ msgstr "--cache-size máximo é 8192MB."
|
||||||
@@ -6605,7 +6605,7 @@ msgstr "<i>Novidades dessa versão:</i>"
|
|||||||
#~ " --internal-rereads n - drive may attempt n rereads before reporting an error\n"
|
#~ " --internal-rereads n - drive may attempt n rereads before reporting an error\n"
|
||||||
#~ " --query-size n - query drive/udf/ecc for image size (default: ecc)\n"
|
#~ " --query-size n - query drive/udf/ecc for image size (default: ecc)\n"
|
||||||
#~ " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
#~ " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
||||||
#~ " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
#~ " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
#~ " --read-medium n - read the whole medium up to n times\n"
|
#~ " --read-medium n - read the whole medium up to n times\n"
|
||||||
#~ " --read-raw - performs read in raw mode if possible\n"
|
#~ " --read-raw - performs read in raw mode if possible\n"
|
||||||
#~ " --speed-warning n - print warning if speed changes by more than n percent\n"
|
#~ " --speed-warning n - print warning if speed changes by more than n percent\n"
|
||||||
@@ -6624,7 +6624,7 @@ msgstr "<i>Novidades dessa versão:</i>"
|
|||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "<b>File splitting</b>\n"
|
#~ "<b>File splitting</b>\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "Allows working with file systems which are limited to 2GB per file, e.g. FAT from Windows. Created files are spread over upto 100 segments called \"medium00.iso\", \"medium01.iso\" etc. at the cost of a small performance hit."
|
#~ "Allows working with file systems which are limited to 2GB per file, e.g. FAT from Windows. Created files are spread over up to 100 segments called \"medium00.iso\", \"medium01.iso\" etc. at the cost of a small performance hit."
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "<b>Separação de arquivos</b>\n"
|
#~ "<b>Separação de arquivos</b>\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
|
|||||||
20
locale/ru.po
20
locale/ru.po
@@ -13,7 +13,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2009-07-23 08:11+0300\n"
|
"PO-Revision-Date: 2009-07-23 08:11+0300\n"
|
||||||
"Last-Translator: Igor Gorbounov <igor.gorbounov@gmail.com>\n"
|
"Last-Translator: Igor Gorbounov <igor.gorbounov@gmail.com>\n"
|
||||||
"Language-Team: Russian\n"
|
"Language-Team: Russian\n"
|
||||||
"Language: \n"
|
"Language: ru\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -634,7 +634,7 @@ msgid " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
|||||||
msgstr " --raw-mode n - режим для низкоуровневого чтения CD-носителей (20 или 21)\n"
|
msgstr " --raw-mode n - режим для низкоуровневого чтения CD-носителей (20 или 21)\n"
|
||||||
|
|
||||||
#: dvdisaster.c:941
|
#: dvdisaster.c:941
|
||||||
msgid " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
msgid " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
msgstr " --read-attempts n-m - делается от n до m попыток чтения поврежденного сектора\n"
|
msgstr " --read-attempts n-m - делается от n до m попыток чтения поврежденного сектора\n"
|
||||||
|
|
||||||
#: dvdisaster.c:942
|
#: dvdisaster.c:942
|
||||||
@@ -1843,7 +1843,7 @@ msgid "Media ejection"
|
|||||||
msgstr "Извлечь носитель"
|
msgstr "Извлечь носитель"
|
||||||
|
|
||||||
#: preferences.c:2065 preferences.c:2066
|
#: preferences.c:2065 preferences.c:2066
|
||||||
msgid "Eject medium after sucessful read"
|
msgid "Eject medium after successful read"
|
||||||
msgstr "Извлечь носитель после успешного чтения"
|
msgstr "Извлечь носитель после успешного чтения"
|
||||||
|
|
||||||
#: preferences.c:2092
|
#: preferences.c:2092
|
||||||
@@ -1940,7 +1940,7 @@ msgstr "Макс. %d попыток чтения на сектор"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Maximum number of reading attempts</b>\n"
|
"<b>Maximum number of reading attempts</b>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts upto this number.\n"
|
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts up to this number.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -2007,7 +2007,7 @@ msgstr " раз"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Media read attempts</b> for the linear reading strategy\n"
|
"<b>Media read attempts</b> for the linear reading strategy\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If unreadable sectors remain after reading the medium from start to end, the medium is read again upto he given number of times.\n"
|
"If unreadable sectors remain after reading the medium from start to end, the medium is read again up to he given number of times.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Only the missing sectors will be tried in the additional reading passes."
|
"Only the missing sectors will be tried in the additional reading passes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -6373,11 +6373,11 @@ msgstr "<i>Новое в этой версии:</i>"
|
|||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "dvdisaster version %s build %d\n"
|
#~ "dvdisaster version %s build %s\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "dvdisaster версия %s сборка %d\n"
|
#~ "dvdisaster версия %s сборка %s\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
|
|
||||||
#~ msgid "--cache-size maximum is 8192MB."
|
#~ msgid "--cache-size maximum is 8192MB."
|
||||||
@@ -6669,7 +6669,7 @@ msgstr "<i>Новое в этой версии:</i>"
|
|||||||
#~ " --internal-rereads n - drive may attempt n rereads before reporting an error\n"
|
#~ " --internal-rereads n - drive may attempt n rereads before reporting an error\n"
|
||||||
#~ " --query-size n - query drive/udf/ecc for image size (default: ecc)\n"
|
#~ " --query-size n - query drive/udf/ecc for image size (default: ecc)\n"
|
||||||
#~ " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
#~ " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
||||||
#~ " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
#~ " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
#~ " --read-medium n - read the whole medium up to n times\n"
|
#~ " --read-medium n - read the whole medium up to n times\n"
|
||||||
#~ " --read-raw - performs read in raw mode if possible\n"
|
#~ " --read-raw - performs read in raw mode if possible\n"
|
||||||
#~ " --speed-warning n - print warning if speed changes by more than n percent\n"
|
#~ " --speed-warning n - print warning if speed changes by more than n percent\n"
|
||||||
@@ -6686,7 +6686,7 @@ msgstr "<i>Новое в этой версии:</i>"
|
|||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "<b>File splitting</b>\n"
|
#~ "<b>File splitting</b>\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "Allows working with file systems which are limited to 2GB per file, e.g. FAT from Windows. Created files are spread over upto 100 segments called \"medium00.iso\", \"medium01.iso\" etc. at the cost of a small performance hit."
|
#~ "Allows working with file systems which are limited to 2GB per file, e.g. FAT from Windows. Created files are spread over up to 100 segments called \"medium00.iso\", \"medium01.iso\" etc. at the cost of a small performance hit."
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "<b>Разбиение файлов</b>\n"
|
#~ "<b>Разбиение файлов</b>\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
@@ -6732,7 +6732,7 @@ msgstr "<i>Новое в этой версии:</i>"
|
|||||||
#~ " --internal-rereads n - drive may attempt n rereads before reporting an error\n"
|
#~ " --internal-rereads n - drive may attempt n rereads before reporting an error\n"
|
||||||
#~ " --query-size n - query drive/udf/ecc for image size (default: ecc)\n"
|
#~ " --query-size n - query drive/udf/ecc for image size (default: ecc)\n"
|
||||||
#~ " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
#~ " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
||||||
#~ " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
#~ " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
#~ " --read-medium n - read the whole medium up to n times\n"
|
#~ " --read-medium n - read the whole medium up to n times\n"
|
||||||
#~ " --read-raw - performs read in raw mode if possible\n"
|
#~ " --read-raw - performs read in raw mode if possible\n"
|
||||||
#~ " --speed-warning n - print warning if speed changes by more than n percent\n"
|
#~ " --speed-warning n - print warning if speed changes by more than n percent\n"
|
||||||
|
|||||||
@@ -619,7 +619,7 @@ msgid " --raw-mode n - mode for raw reading CD media (20 or 21)\n"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: dvdisaster.c:941
|
#: dvdisaster.c:941
|
||||||
msgid " --read-attempts n-m - attempts n upto m reads of a defective sector\n"
|
msgid " --read-attempts n-m - attempts n up to m reads of a defective sector\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: dvdisaster.c:942
|
#: dvdisaster.c:942
|
||||||
@@ -1758,7 +1758,7 @@ msgid "Media ejection"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: preferences.c:2065 preferences.c:2066
|
#: preferences.c:2065 preferences.c:2066
|
||||||
msgid "Eject medium after sucessful read"
|
msgid "Eject medium after successful read"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: preferences.c:2092
|
#: preferences.c:2092
|
||||||
@@ -1833,7 +1833,7 @@ msgstr ""
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Maximum number of reading attempts</b>\n"
|
"<b>Maximum number of reading attempts</b>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts upto this number.\n"
|
"When the minimum number of reading attempts is reached without success, dvdisaster might choose to perform additional reading attempts up to this number.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
"The decision to do more attempts depends on the quality of data gathered so far, which in turn is influenced by the capabilities of your optical drive and the operating system. So depending on your configuration, you may or may not see dvdisaster using the maximum value."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -1892,7 +1892,7 @@ msgstr ""
|
|||||||
msgid ""
|
msgid ""
|
||||||
"<b>Media read attempts</b> for the linear reading strategy\n"
|
"<b>Media read attempts</b> for the linear reading strategy\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If unreadable sectors remain after reading the medium from start to end, the medium is read again upto he given number of times.\n"
|
"If unreadable sectors remain after reading the medium from start to end, the medium is read again up to he given number of times.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Only the missing sectors will be tried in the additional reading passes."
|
"Only the missing sectors will be tried in the additional reading passes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -25,6 +25,10 @@
|
|||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#define PATH_MAX 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Forward declarations
|
*** Forward declarations
|
||||||
***/
|
***/
|
||||||
@@ -415,7 +419,7 @@ void set_path(GtkWidget *entry, char *path)
|
|||||||
else
|
else
|
||||||
{ char buf[PATH_MAX + strlen(path) + 2];
|
{ char buf[PATH_MAX + strlen(path) + 2];
|
||||||
|
|
||||||
if (getcwd(buf, PATH_MAX) == NULL) return;
|
if (!getcwd(buf, PATH_MAX)) return;
|
||||||
strcat(buf,"/");
|
strcat(buf,"/");
|
||||||
|
|
||||||
strcat(buf,path);
|
strcat(buf,path);
|
||||||
|
|||||||
@@ -2062,8 +2062,8 @@ void CreatePreferencesWindow(void)
|
|||||||
frame = gtk_frame_new(_utf("Media ejection"));
|
frame = gtk_frame_new(_utf("Media ejection"));
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
|
||||||
|
|
||||||
lwoh = CreateLabelWithOnlineHelp(_("Eject medium after sucessful read"),
|
lwoh = CreateLabelWithOnlineHelp(_("Eject medium after successful read"),
|
||||||
_("Eject medium after sucessful read"));
|
_("Eject medium after successful read"));
|
||||||
RegisterPreferencesHelpWindow(lwoh);
|
RegisterPreferencesHelpWindow(lwoh);
|
||||||
|
|
||||||
for(i=0; i<2; i++)
|
for(i=0; i<2; i++)
|
||||||
@@ -2222,7 +2222,7 @@ void CreatePreferencesWindow(void)
|
|||||||
_("<b>Maximum number of reading attempts</b>\n\n"
|
_("<b>Maximum number of reading attempts</b>\n\n"
|
||||||
"When the minimum number of reading attempts is reached "
|
"When the minimum number of reading attempts is reached "
|
||||||
"without success, dvdisaster might choose to perform additional "
|
"without success, dvdisaster might choose to perform additional "
|
||||||
"reading attempts upto this number.\n\n"
|
"reading attempts up to this number.\n\n"
|
||||||
|
|
||||||
"The decision to do more attempts depends on the quality of "
|
"The decision to do more attempts depends on the quality of "
|
||||||
"data gathered so far, which in turn is influenced by the "
|
"data gathered so far, which in turn is influenced by the "
|
||||||
@@ -2337,7 +2337,7 @@ void CreatePreferencesWindow(void)
|
|||||||
AddHelpParagraph(lwoh,
|
AddHelpParagraph(lwoh,
|
||||||
_("<b>Media read attempts</b> for the linear reading strategy\n\n"
|
_("<b>Media read attempts</b> for the linear reading strategy\n\n"
|
||||||
"If unreadable sectors remain after reading the medium from start to end, "
|
"If unreadable sectors remain after reading the medium from start to end, "
|
||||||
"the medium is read again upto he given number of times.\n\n"
|
"the medium is read again up to he given number of times.\n\n"
|
||||||
"Only the missing sectors will be tried in the additional reading passes."));
|
"Only the missing sectors will be tried in the additional reading passes."));
|
||||||
|
|
||||||
/** Defective sector caching */
|
/** Defective sector caching */
|
||||||
|
|||||||
@@ -1323,7 +1323,7 @@ if try "reading medium w/ ecc in 3 passes; 3rd pass recovers some" read_multipas
|
|||||||
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO $TMPECC
|
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO $TMPECC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Do a second sucessful read attempt at an incomplete image;
|
# Do a second successful read attempt at an incomplete image;
|
||||||
# see whether correct results are reported when ecc data is present
|
# see whether correct results are reported when ecc data is present
|
||||||
# since CRC caching is a bit complicated in this case.
|
# since CRC caching is a bit complicated in this case.
|
||||||
|
|
||||||
|
|||||||
@@ -31,24 +31,27 @@
|
|||||||
|
|
||||||
//#define VERBOSE 1
|
//#define VERBOSE 1
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
#define verbose(format,args...) printf(format, ## args)
|
#define verbose(format,...) printf(format, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define verbose(format,args...)
|
#define verbose(format,...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_MMAP
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
#ifdef SYS_LINUX
|
#if defined(SYS_LINUX)
|
||||||
#define MMAP_FLAGS (MAP_SHARED | MAP_POPULATE | MAP_NORESERVE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SYS_FREEBSD
|
#define MMAP_FLAGS (MAP_SHARED | MAP_POPULATE | MAP_NORESERVE)
|
||||||
#define MMAP_FLAGS (MAP_SHARED | MAP_PREFAULT_READ)
|
|
||||||
#endif
|
#elif defined(SYS_FREEBSD)
|
||||||
|
|
||||||
|
#define MMAP_FLAGS (MAP_SHARED | MAP_PREFAULT_READ)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* SYS_NETBSD and others. */
|
||||||
|
#define MMAP_FLAGS (MAP_SHARED)
|
||||||
|
|
||||||
#ifdef SYS_NETBSD
|
|
||||||
#define MMAP_FLAGS (MAP_SHARED)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -741,7 +744,7 @@ static void flush_crc(ecc_closure *ec, LargeFile *file_out)
|
|||||||
|
|
||||||
/* Write out the CRC layer */
|
/* Write out the CRC layer */
|
||||||
|
|
||||||
verbose("IO: writing CRC layer\n");
|
verbose("%s", "IO: writing CRC layer\n");
|
||||||
crc_sect = 2048*(ec->encoderChunk+lay->firstCrcPos);
|
crc_sect = 2048*(ec->encoderChunk+lay->firstCrcPos);
|
||||||
if(!LargeSeek(file_out, crc_sect))
|
if(!LargeSeek(file_out, crc_sect))
|
||||||
{ ec->abortImmediately = TRUE;
|
{ ec->abortImmediately = TRUE;
|
||||||
@@ -762,7 +765,7 @@ static void flush_parity(ecc_closure *ec, LargeFile *file_out)
|
|||||||
|
|
||||||
/* Write out the created parity. */
|
/* Write out the created parity. */
|
||||||
|
|
||||||
verbose("IO: writing parity...\n");
|
verbose("%s", "IO: writing parity...\n");
|
||||||
for(k=0; k<lay->nroots; k++)
|
for(k=0; k<lay->nroots; k++)
|
||||||
{ gint64 idx=0;
|
{ gint64 idx=0;
|
||||||
|
|
||||||
@@ -779,7 +782,7 @@ static void flush_parity(ecc_closure *ec, LargeFile *file_out)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
verbose("IO: parity written.\n");
|
verbose("%s", "IO: parity written.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static gpointer io_thread(ecc_closure *ec)
|
static gpointer io_thread(ecc_closure *ec)
|
||||||
@@ -794,7 +797,7 @@ static gpointer io_thread(ecc_closure *ec)
|
|||||||
int parity_available = 0;
|
int parity_available = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
verbose("Reader thread initializing\n");
|
verbose("%s", "Reader thread initializing\n");
|
||||||
|
|
||||||
/*** Allocate local parity buffer aligned at 128bit boundary */
|
/*** Allocate local parity buffer aligned at 128bit boundary */
|
||||||
|
|
||||||
@@ -865,7 +868,7 @@ static gpointer io_thread(ecc_closure *ec)
|
|||||||
{ read_next_chunk(ec, chunk);
|
{ read_next_chunk(ec, chunk);
|
||||||
// flush_crc(ec, file_out); // FIXME
|
// flush_crc(ec, file_out); // FIXME
|
||||||
needs_preload = 0;
|
needs_preload = 0;
|
||||||
verbose("IO: first chunk loaded\n");
|
verbose("%s", "IO: first chunk loaded\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -914,7 +917,7 @@ static gpointer io_thread(ecc_closure *ec)
|
|||||||
cpu_bound = ec->buffersToEncode;
|
cpu_bound = ec->buffersToEncode;
|
||||||
#endif
|
#endif
|
||||||
while(ec->buffersToEncode)
|
while(ec->buffersToEncode)
|
||||||
{ verbose("IO: Waiting for encoders to finish\n");
|
{ verbose("%s", "IO: Waiting for encoders to finish\n");
|
||||||
g_cond_wait(ec->ioCond, ec->lock);
|
g_cond_wait(ec->ioCond, ec->lock);
|
||||||
}
|
}
|
||||||
g_mutex_unlock(ec->lock);
|
g_mutex_unlock(ec->lock);
|
||||||
@@ -958,7 +961,7 @@ static gpointer io_thread(ecc_closure *ec)
|
|||||||
ec->slicesFree = TRUE; /* we have saved the slices; go ahead */
|
ec->slicesFree = TRUE; /* we have saved the slices; go ahead */
|
||||||
g_cond_broadcast(ec->ioCond);
|
g_cond_broadcast(ec->ioCond);
|
||||||
while(ec->buffersToEncode)
|
while(ec->buffersToEncode)
|
||||||
{ verbose("IO: Waiting for encoders to finish last chunk\n");
|
{ verbose("%s", "IO: Waiting for encoders to finish last chunk\n");
|
||||||
g_cond_wait(ec->ioCond, ec->lock);
|
g_cond_wait(ec->ioCond, ec->lock);
|
||||||
}
|
}
|
||||||
g_mutex_unlock(ec->lock);
|
g_mutex_unlock(ec->lock);
|
||||||
@@ -971,7 +974,7 @@ static gpointer io_thread(ecc_closure *ec)
|
|||||||
flush_crc(ec, file_out);
|
flush_crc(ec, file_out);
|
||||||
flush_parity(ec, file_out);
|
flush_parity(ec, file_out);
|
||||||
|
|
||||||
verbose("IO: finished\n"); fflush(stdout);
|
verbose("%s", "IO: finished\n"); fflush(stdout);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1160,7 +1163,7 @@ static gpointer encoder_thread(ecc_closure *ec)
|
|||||||
ec->buffersToEncode-=enc_size;
|
ec->buffersToEncode-=enc_size;
|
||||||
if(!ec->buffersToEncode)
|
if(!ec->buffersToEncode)
|
||||||
{ g_cond_broadcast(ec->ioCond);
|
{ g_cond_broadcast(ec->ioCond);
|
||||||
verbose("ENC: processed last buffer; telling IO process.\n");
|
verbose("%s", "ENC: processed last buffer; telling IO process.\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
g_mutex_unlock(ec->lock);
|
g_mutex_unlock(ec->lock);
|
||||||
@@ -1264,7 +1267,7 @@ static void create_reed_solomon(ecc_closure *ec)
|
|||||||
verbose("SCHED: joined with worker %d\n", i);
|
verbose("SCHED: joined with worker %d\n", i);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
verbose("SCHED: scheduler finished.\n");
|
verbose("%s", "SCHED: scheduler finished.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|||||||
@@ -876,10 +876,10 @@ void RS03Fix(Image *image)
|
|||||||
if we were processing an augmented image. */
|
if we were processing an augmented image. */
|
||||||
|
|
||||||
if(lay->target == ECC_FILE && i >= ndata-1)
|
if(lay->target == ECC_FILE && i >= ndata-1)
|
||||||
{
|
{
|
||||||
if(!LargeSeek(image->eccFile, (gint64)(2048*sec)))
|
if(!LargeSeek(image->eccFile, (gint64)(2048*sec)))
|
||||||
Stop(_("Failed seeking to sector %lld in ecc file [%s]: %s"),
|
Stop(_("Failed seeking to sector %lld in ecc file [%s]: %s"),
|
||||||
sec, "FW", strerror(errno));
|
sec, "FW", strerror(errno));
|
||||||
|
|
||||||
n = LargeWrite(image->eccFile, cache_offset+fc->imgBlock[i], 2048);
|
n = LargeWrite(image->eccFile, cache_offset+fc->imgBlock[i], 2048);
|
||||||
if(n != 2048)
|
if(n != 2048)
|
||||||
|
|||||||
@@ -136,6 +136,15 @@ case "$cfg_uname" in
|
|||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
GNU/kFreeBSD*) cfg_system=kfreebsd
|
||||||
|
CFG_SYS_OPTIONS="-DSYS_KFREEBSD"
|
||||||
|
CFG_SYS_NAME="-DSYS_NAME=\\\"GNU/kFreeBSD\\\""
|
||||||
|
CFG_EXE_SUFFIX=""
|
||||||
|
function add_linker_flags()
|
||||||
|
{ lflags_return="-L$1 -Wl,-rpath,$1 $2"
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
|
||||||
NetBSD*) cfg_system=netbsd
|
NetBSD*) cfg_system=netbsd
|
||||||
CFG_SYS_OPTIONS="-DSYS_NETBSD"
|
CFG_SYS_OPTIONS="-DSYS_NETBSD"
|
||||||
CFG_SYS_NAME="-DSYS_NAME=\\\"NetBSD\\\""
|
CFG_SYS_NAME="-DSYS_NAME=\\\"NetBSD\\\""
|
||||||
@@ -146,6 +155,15 @@ case "$cfg_uname" in
|
|||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
GNU*) cfg_system=hurd
|
||||||
|
CFG_SYS_OPTIONS="-DSYS_HURD"
|
||||||
|
CFG_SYS_NAME="-DSYS_NAME=\\\"GNU/Hurd\\\""
|
||||||
|
CFG_EXE_SUFFIX=""
|
||||||
|
function add_linker_flags()
|
||||||
|
{ lflags_return="-L$1 -Wl,-rpath,$1 $2"
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
|
||||||
*) cfg_system=unknown-system
|
*) cfg_system=unknown-system
|
||||||
CFG_SYS_OPTIONS="-DSYS_UNKNOWN"
|
CFG_SYS_OPTIONS="-DSYS_UNKNOWN"
|
||||||
CFG_SYS_NAME="-DSYS_NAME=\\\"Unknown\\\""
|
CFG_SYS_NAME="-DSYS_NAME=\\\"Unknown\\\""
|
||||||
@@ -313,13 +331,13 @@ function REQUIRE_GMAKE()
|
|||||||
|
|
||||||
echo -n "Checking for gmake: "
|
echo -n "Checking for gmake: "
|
||||||
|
|
||||||
if (gmake -v | grep "GNU Make") > /dev/null 2>&1 ;
|
if (gmake -v 2>&1 | grep "GNU Make") > /dev/null 2>&1 ;
|
||||||
then echo "yes"
|
then echo "yes"
|
||||||
echo "MAKE = `which gmake`" >>Makefile.config
|
echo "MAKE = `which gmake`" >>Makefile.config
|
||||||
return 0
|
return 0
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if (make -v | grep "GNU Make") > /dev/null 2>&1 ;
|
if (make -v 2>&1 | grep "GNU Make") > /dev/null 2>&1 ;
|
||||||
then echo "yes"
|
then echo "yes"
|
||||||
echo "MAKE = `which make`" >>Makefile.config
|
echo "MAKE = `which make`" >>Makefile.config
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "scsi-layer.h"
|
#include "scsi-layer.h"
|
||||||
#include "udf.h"
|
#include "udf.h"
|
||||||
|
|
||||||
#ifdef SYS_FREEBSD
|
#if defined(SYS_FREEBSD) || defined(SYS_KFREEBSD)
|
||||||
|
|
||||||
/* SCSI wrappers for FreeBSD are still work in progress. */
|
/* SCSI wrappers for FreeBSD are still work in progress. */
|
||||||
|
|
||||||
@@ -241,4 +241,4 @@ int SendPacket(DeviceHandle *dh, unsigned char *cmd, int cdb_size, unsigned char
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SYS_FREEBSD */
|
#endif /* defined(SYS_FREEBSD) || defined(SYS_KFREEBSD) */
|
||||||
|
|||||||
26
scsi-layer.c
26
scsi-layer.c
@@ -31,7 +31,9 @@
|
|||||||
|
|
||||||
static int query_type(DeviceHandle*, int);
|
static int query_type(DeviceHandle*, int);
|
||||||
static gint64 query_size(Image*);
|
static gint64 query_size(Image*);
|
||||||
|
#if 0
|
||||||
static int query_copyright(DeviceHandle*);
|
static int query_copyright(DeviceHandle*);
|
||||||
|
#endif
|
||||||
|
|
||||||
static int read_dvd_sector(DeviceHandle*, unsigned char*, int, int);
|
static int read_dvd_sector(DeviceHandle*, unsigned char*, int, int);
|
||||||
static int read_cd_sector(DeviceHandle*, unsigned char*, int, int);
|
static int read_cd_sector(DeviceHandle*, unsigned char*, int, int);
|
||||||
@@ -908,6 +910,11 @@ static int query_dvd(DeviceHandle *dh, int probe_only)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(layer_type & 0x01)
|
||||||
|
{ dh->typeDescr = g_strdup("DVD-ROM");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(layer_type & 0x06) /* strange thing: (re-)writeable but neither plus nor dash */
|
if(layer_type & 0x06) /* strange thing: (re-)writeable but neither plus nor dash */
|
||||||
{ dh->typeDescr = g_strdup("DVD-ROM (fake)");
|
{ dh->typeDescr = g_strdup("DVD-ROM (fake)");
|
||||||
dh->subType = DVD;
|
dh->subType = DVD;
|
||||||
@@ -1022,7 +1029,7 @@ static int query_bd(DeviceHandle *dh, int probe_only)
|
|||||||
|
|
||||||
if(!strncmp((char*)&buf[4+8], "BDO", 3))
|
if(!strncmp((char*)&buf[4+8], "BDO", 3))
|
||||||
{ dh->typeDescr = g_strdup("BD-ROM");
|
{ dh->typeDescr = g_strdup("BD-ROM");
|
||||||
dh->subType = UNSUPPORTED;
|
dh->subType = BD;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!strncmp((char*)&buf[4+8], "BDW", 3))
|
if(!strncmp((char*)&buf[4+8], "BDW", 3))
|
||||||
@@ -1644,6 +1651,7 @@ reset_mode_page:
|
|||||||
* Find out whether we are allowed to create an image from the DVD.
|
* Find out whether we are allowed to create an image from the DVD.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int query_copyright(DeviceHandle *dh)
|
static int query_copyright(DeviceHandle *dh)
|
||||||
{ Sense sense;
|
{ Sense sense;
|
||||||
AlignedBuffer *ab = CreateAlignedBuffer(2048);
|
AlignedBuffer *ab = CreateAlignedBuffer(2048);
|
||||||
@@ -1704,6 +1712,7 @@ static int query_copyright(DeviceHandle *dh)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See whether a sector lies within the user area.
|
* See whether a sector lies within the user area.
|
||||||
@@ -1996,12 +2005,13 @@ static gint64 query_size(Image *image)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
gint64 CurrentMediumSize(int get_blank_size)
|
gint64 CurrentMediumSize(int get_blank_size)
|
||||||
{ Image *image;
|
{
|
||||||
|
#if defined(SYS_UNKNOWN) || defined(SYS_HURD)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
Image *image;
|
||||||
gint64 size;
|
gint64 size;
|
||||||
|
|
||||||
#ifdef SYS_UNKNOWN
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
image = OpenImageFromDevice(Closure->device);
|
image = OpenImageFromDevice(Closure->device);
|
||||||
if(!image) return 0;
|
if(!image) return 0;
|
||||||
@@ -2042,6 +2052,7 @@ gint64 CurrentMediumSize(int get_blank_size)
|
|||||||
CloseImage(image);
|
CloseImage(image);
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -2456,7 +2467,7 @@ int ReadSectors(DeviceHandle *dh, unsigned char *buf, gint64 s, int nsectors)
|
|||||||
if(Closure->readRaw && dh->rawBuffer)
|
if(Closure->readRaw && dh->rawBuffer)
|
||||||
recommended_attempts = dh->rawBuffer->recommendedAttempts;
|
recommended_attempts = dh->rawBuffer->recommendedAttempts;
|
||||||
|
|
||||||
if(status) /* current try was unsucessful */
|
if(status) /* current try was unsuccessful */
|
||||||
{ int last_key, last_asc, last_ascq;
|
{ int last_key, last_asc, last_ascq;
|
||||||
|
|
||||||
#ifndef CLI
|
#ifndef CLI
|
||||||
@@ -2704,12 +2715,13 @@ Image* OpenImageFromDevice(char *device)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if(dh->mainType == DVD && query_copyright(dh))
|
if(dh->mainType == DVD && query_copyright(dh))
|
||||||
{ CloseImage(image);
|
{ CloseImage(image);
|
||||||
Stop(_("This software does not support encrypted media.\n"));
|
Stop(_("This software does not support encrypted media.\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/* Create the bitmap of simulated defects */
|
/* Create the bitmap of simulated defects */
|
||||||
|
|
||||||
|
|||||||
17
scsi-layer.h
17
scsi-layer.h
@@ -28,7 +28,7 @@
|
|||||||
#include <linux/cdrom.h>
|
#include <linux/cdrom.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SYS_FREEBSD
|
#if defined(SYS_FREEBSD) || defined(SYS_KFREEBSD)
|
||||||
#include <camlib.h>
|
#include <camlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -49,19 +49,21 @@
|
|||||||
* Linux already has one
|
* Linux already has one
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef SYS_LINUX
|
#if defined(SYS_LINUX)
|
||||||
|
|
||||||
#define MAX_CDB_SIZE CDROM_PACKET_SIZE
|
#define MAX_CDB_SIZE CDROM_PACKET_SIZE
|
||||||
|
|
||||||
/* Now globally defined for all OSes here */
|
/* Now globally defined for all OSes here */
|
||||||
//typedef struct request_sense Sense;
|
//typedef struct request_sense Sense;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SYS_FREEBSD
|
#elif defined(SYS_FREEBSD) || defined(SYS_KFREEBSD)
|
||||||
|
|
||||||
#define MAX_CDB_SIZE SCSI_MAX_CDBLEN
|
#define MAX_CDB_SIZE SCSI_MAX_CDBLEN
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SYS_UNKNOWN) || defined(SYS_NETBSD)
|
#else /* SYS_UNKNOWN and others. */
|
||||||
|
|
||||||
#define MAX_CDB_SIZE 16 /* longest possible SCSI command */
|
#define MAX_CDB_SIZE 16 /* longest possible SCSI command */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -101,8 +103,7 @@ typedef struct _DeviceHandle
|
|||||||
*/
|
*/
|
||||||
#if defined(SYS_LINUX) || defined(SYS_NETBSD)
|
#if defined(SYS_LINUX) || defined(SYS_NETBSD)
|
||||||
int fd; /* device file descriptor */
|
int fd; /* device file descriptor */
|
||||||
#endif
|
#elif defined(SYS_FREEBSD) || defined(SYS_KFREEBSD)
|
||||||
#ifdef SYS_FREEBSD
|
|
||||||
struct cam_device *camdev; /* camlib device handle */
|
struct cam_device *camdev; /* camlib device handle */
|
||||||
union ccb *ccb;
|
union ccb *ccb;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "scsi-layer.h"
|
#include "scsi-layer.h"
|
||||||
#include "udf.h"
|
#include "udf.h"
|
||||||
|
|
||||||
#ifdef SYS_UNKNOWN
|
#if defined(SYS_UNKNOWN) || defined(SYS_HURD)
|
||||||
|
|
||||||
/* Dummy routines so that we can compile on unknown architectures
|
/* Dummy routines so that we can compile on unknown architectures
|
||||||
for which we don't have SCSI support yet. */
|
for which we don't have SCSI support yet. */
|
||||||
@@ -51,4 +51,4 @@ int SendPacket(DeviceHandle *dh, unsigned char *cmd, int cdb_size, unsigned char
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SYS_UNKNOWN */
|
#endif /* defined(SYS_UNKNOWN) || defined(SYS_HURD) */
|
||||||
|
|||||||
408
show-html.c
Normal file
408
show-html.c
Normal file
@@ -0,0 +1,408 @@
|
|||||||
|
/* dvdisaster: Additional error correction for optical media.
|
||||||
|
* Copyright (C) 2004-2012 Carsten Gnoerlich.
|
||||||
|
* Project home page: http://www.dvdisaster.com
|
||||||
|
* Email: carsten@dvdisaster.com -or- cgnoerlich@fsfe.org
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
|
||||||
|
* or direct your browser at http://www.gnu.org.
|
||||||
|
*/
|
||||||
|
// DVDISASTER_GUI_FILE
|
||||||
|
|
||||||
|
#include "dvdisaster.h"
|
||||||
|
|
||||||
|
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_KFREEBSD) || \
|
||||||
|
defined(SYS_NETBSD) || defined(SYS_HURD)
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SYS_MINGW
|
||||||
|
#include "windows.h"
|
||||||
|
#include "shellapi.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***
|
||||||
|
*** Ask user to specify his browser
|
||||||
|
***/
|
||||||
|
|
||||||
|
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_KFREEBSD) || \
|
||||||
|
defined(SYS_NETBSD) || defined(SYS_HURD)
|
||||||
|
|
||||||
|
#define SEARCH_BUTTON 1
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{ GtkWidget *dialog;
|
||||||
|
GtkWidget *entry;
|
||||||
|
GtkWidget *search;
|
||||||
|
GtkWidget *filesel;
|
||||||
|
GtkWidget *fileok;
|
||||||
|
GtkWidget *filecancel;
|
||||||
|
char *url;
|
||||||
|
} browser_dialog_info;
|
||||||
|
|
||||||
|
static void response_cb(GtkWidget *widget, int response, gpointer data)
|
||||||
|
{ browser_dialog_info *bdi = (browser_dialog_info*)data;
|
||||||
|
|
||||||
|
switch(response)
|
||||||
|
{ case GTK_RESPONSE_ACCEPT:
|
||||||
|
if(Closure->browser) g_free(Closure->browser);
|
||||||
|
Closure->browser = g_strdup(gtk_entry_get_text(GTK_ENTRY(bdi->entry)));
|
||||||
|
ShowHTML(bdi->url);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GTK_RESPONSE_REJECT:
|
||||||
|
if(bdi->url) g_free(bdi->url);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
gtk_widget_destroy(widget);
|
||||||
|
if(bdi->filesel)
|
||||||
|
gtk_widget_destroy(bdi->filesel);
|
||||||
|
g_free(bdi);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void search_cb(GtkWidget *widget, gpointer data)
|
||||||
|
{ browser_dialog_info *bdi = (browser_dialog_info*)data;
|
||||||
|
|
||||||
|
if(widget == bdi->search)
|
||||||
|
{ bdi->filesel = gtk_file_selection_new(_utf("windowtitle|Choose a browser"));
|
||||||
|
bdi->fileok = GTK_FILE_SELECTION(bdi->filesel)->ok_button;
|
||||||
|
bdi->filecancel = GTK_FILE_SELECTION(bdi->filesel)->cancel_button;
|
||||||
|
ReverseCancelOK(GTK_DIALOG(bdi->filesel));
|
||||||
|
gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(bdi->filesel));
|
||||||
|
g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(bdi->filesel)->ok_button), "clicked",
|
||||||
|
G_CALLBACK(search_cb), bdi);
|
||||||
|
|
||||||
|
g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(bdi->filesel)->cancel_button), "clicked",
|
||||||
|
G_CALLBACK(search_cb), bdi);
|
||||||
|
|
||||||
|
gtk_widget_show(bdi->filesel);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(widget == bdi->fileok)
|
||||||
|
{
|
||||||
|
if(Closure->browser) g_free(Closure->browser);
|
||||||
|
Closure->browser = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(bdi->filesel)));
|
||||||
|
ShowHTML(bdi->url);
|
||||||
|
gtk_widget_destroy(bdi->filesel);
|
||||||
|
gtk_widget_destroy(bdi->dialog);
|
||||||
|
g_free(bdi);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(widget == bdi->filecancel)
|
||||||
|
{ gtk_widget_destroy(bdi->filesel);
|
||||||
|
bdi->filesel = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void browser_dialog(char *url)
|
||||||
|
{ GtkWidget *dialog, *vbox, *hbox, *label, *entry, *button;
|
||||||
|
browser_dialog_info *bdi = g_malloc0(sizeof(browser_dialog_info));
|
||||||
|
|
||||||
|
/* Create the dialog */
|
||||||
|
|
||||||
|
dialog = gtk_dialog_new_with_buttons(_utf("windowtitle|Browser required"),
|
||||||
|
Closure->window, GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
|
||||||
|
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL);
|
||||||
|
bdi->dialog = dialog;
|
||||||
|
if(url)
|
||||||
|
{ bdi->url = g_strdup(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
vbox = gtk_vbox_new(FALSE, 0);
|
||||||
|
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), vbox, FALSE, FALSE, 0);
|
||||||
|
gtk_container_set_border_width(GTK_CONTAINER(vbox), 10);
|
||||||
|
|
||||||
|
/* Insert the contents */
|
||||||
|
|
||||||
|
label = gtk_label_new(NULL);
|
||||||
|
gtk_label_set_markup(GTK_LABEL(label), _utf("<b>Could not find a suitable browser.</b>\n\n"
|
||||||
|
"Which browser would you like to use\n"
|
||||||
|
"for reading the online documentation?\n\n"
|
||||||
|
"Please enter its name (e.g. mozilla) or\n"
|
||||||
|
"use the \"Search\" button for a file dialog.\n")),
|
||||||
|
gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 10);
|
||||||
|
|
||||||
|
hbox = gtk_hbox_new(FALSE, 0);
|
||||||
|
gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 10);
|
||||||
|
|
||||||
|
bdi->entry = entry = gtk_entry_new();
|
||||||
|
gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 10);
|
||||||
|
|
||||||
|
bdi->search = button = gtk_button_new_with_label(_utf("Search"));
|
||||||
|
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(search_cb), bdi);
|
||||||
|
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 10);
|
||||||
|
|
||||||
|
/* Show it */
|
||||||
|
|
||||||
|
g_signal_connect(dialog, "response", G_CALLBACK(response_cb), bdi);
|
||||||
|
|
||||||
|
gtk_widget_show_all(dialog);
|
||||||
|
}
|
||||||
|
#endif /* SYS_ unix-like */
|
||||||
|
|
||||||
|
/***
|
||||||
|
*** Show the manual in an external browser
|
||||||
|
***/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check the child processes exit status
|
||||||
|
* to find whether the browser could be invoked.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{ pid_t pid;
|
||||||
|
char *url;
|
||||||
|
GtkWidget *msg;
|
||||||
|
int seconds;
|
||||||
|
} browser_info;
|
||||||
|
|
||||||
|
|
||||||
|
static void msg_destroy_cb(GtkWidget *widget, gpointer data)
|
||||||
|
{ browser_info *bi = (browser_info*)data;
|
||||||
|
|
||||||
|
bi->msg = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_KFREEBSD) || \
|
||||||
|
defined(SYS_NETBSD) || defined(SYS_HURD)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following list of browsers and html wrappers
|
||||||
|
* will be tried one at a time until one entry succeeds by:
|
||||||
|
* - returning zero
|
||||||
|
* - not returning within 60 seconds
|
||||||
|
*/
|
||||||
|
|
||||||
|
static int browser_index;
|
||||||
|
static void try_browser(browser_info*);
|
||||||
|
|
||||||
|
static char *browsers[] =
|
||||||
|
{ "user-selection",
|
||||||
|
"xdg-open",
|
||||||
|
"gnome-open",
|
||||||
|
"htmlview",
|
||||||
|
"firefox",
|
||||||
|
"mozilla",
|
||||||
|
"konqueror",
|
||||||
|
"epiphany",
|
||||||
|
"opera",
|
||||||
|
"/Applications/Safari.app/Contents/MacOS/Safari", /* better way to do this? */
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static gboolean browser_timeout_func(gpointer data)
|
||||||
|
{ browser_info *bi = (browser_info*)data;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
waitpid(bi->pid, &status, WNOHANG);
|
||||||
|
|
||||||
|
/* At least mozilla returns random values under FreeBSD on success,
|
||||||
|
so we can't rely on the return value exept our own 110 one. */
|
||||||
|
|
||||||
|
if(WIFEXITED(status))
|
||||||
|
{
|
||||||
|
switch(WEXITSTATUS(status))
|
||||||
|
{ case 110: /* browser did not execute */
|
||||||
|
browser_index++;
|
||||||
|
if(!browsers[browser_index]) /* all browsers from the list failed */
|
||||||
|
{ browser_dialog(bi->url);
|
||||||
|
|
||||||
|
if(bi->msg)
|
||||||
|
gtk_widget_destroy(bi->msg);
|
||||||
|
if(bi->url)
|
||||||
|
g_free(bi->url);
|
||||||
|
g_free(bi);
|
||||||
|
}
|
||||||
|
else /* try next browser from list */
|
||||||
|
{ bi->seconds = 0;
|
||||||
|
try_browser(bi);
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
case 0: /* browser assumed to be successful */
|
||||||
|
default:
|
||||||
|
if(bi->msg)
|
||||||
|
gtk_widget_destroy(bi->msg);
|
||||||
|
if(bi->url)
|
||||||
|
g_free(bi->url);
|
||||||
|
g_free(bi);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bi->seconds++;
|
||||||
|
if(bi->seconds == 10 && bi->msg)
|
||||||
|
{ gtk_widget_destroy(bi->msg);
|
||||||
|
bi->msg = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bi->seconds > 60 ? FALSE : TRUE;
|
||||||
|
}
|
||||||
|
#endif /* SYS_ unix-like */
|
||||||
|
|
||||||
|
#ifdef SYS_MINGW
|
||||||
|
static gboolean browser_timeout_func(gpointer data)
|
||||||
|
{ browser_info *bi = (browser_info*)data;
|
||||||
|
|
||||||
|
bi->seconds++;
|
||||||
|
|
||||||
|
if(bi->seconds >= 10)
|
||||||
|
{ if(bi->msg)
|
||||||
|
{ gtk_widget_destroy(bi->msg);
|
||||||
|
bi->msg = NULL;
|
||||||
|
}
|
||||||
|
if(bi->url) g_free(bi->url);
|
||||||
|
g_free(bi);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif /* SYS_MINGW */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Invoke the browser
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_KFREEBSD) || \
|
||||||
|
defined(SYS_NETBSD) || defined(SYS_HURD)
|
||||||
|
static void try_browser(browser_info *bi)
|
||||||
|
{ pid_t pid;
|
||||||
|
|
||||||
|
bi->pid = pid = fork();
|
||||||
|
|
||||||
|
if(pid == -1)
|
||||||
|
{ printf("fork failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* make the parent remember and wait() for the browser */
|
||||||
|
|
||||||
|
if(pid > 0)
|
||||||
|
{ g_timeout_add(1000, browser_timeout_func, (gpointer)bi);
|
||||||
|
|
||||||
|
if(browser_index)
|
||||||
|
{ g_free(Closure->browser);
|
||||||
|
Closure->browser = g_strdup(browsers[browser_index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* try calling the browser */
|
||||||
|
|
||||||
|
if(pid == 0)
|
||||||
|
{ char *argv[10];
|
||||||
|
int argc = 0;
|
||||||
|
|
||||||
|
argv[argc++] = browser_index ? browsers[browser_index] : Closure->browser;
|
||||||
|
argv[argc++] = bi->url;
|
||||||
|
argv[argc++] = NULL;
|
||||||
|
execvp(argv[0], argv);
|
||||||
|
|
||||||
|
_exit(110); /* couldn't execute */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* SYS_ unix-like */
|
||||||
|
|
||||||
|
|
||||||
|
void ShowHTML(char *target)
|
||||||
|
{ browser_info *bi = g_malloc0(sizeof(browser_info));
|
||||||
|
guint64 ignore;
|
||||||
|
const char *lang;
|
||||||
|
char *path = NULL;
|
||||||
|
int http_url;
|
||||||
|
|
||||||
|
/* If no target is given, select between translations of the manual. */
|
||||||
|
|
||||||
|
if(!target) target = g_strdup("index.html");
|
||||||
|
|
||||||
|
http_url = strlen(target) > 4 && !strncmp(target, "http", 4);
|
||||||
|
|
||||||
|
if(!http_url && !strchr(target, '/')) /* create full path */
|
||||||
|
{
|
||||||
|
if(!Closure->docDir)
|
||||||
|
{
|
||||||
|
CreateMessage(_("Documentation not installed."), GTK_MESSAGE_ERROR);
|
||||||
|
g_free(bi);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
lang = g_getenv("LANG");
|
||||||
|
|
||||||
|
if(lang)
|
||||||
|
{ if(!strncmp(lang, "ru", 2))
|
||||||
|
#ifdef SYS_MINGW
|
||||||
|
path = g_strdup_printf("%s\\ru\\%s",Closure->docDir,target);
|
||||||
|
#else
|
||||||
|
path = g_strdup_printf("%s/ru/%s",Closure->docDir,target);
|
||||||
|
#endif
|
||||||
|
else if(!strncmp(lang, "de", 2))
|
||||||
|
#ifdef SYS_MINGW
|
||||||
|
path = g_strdup_printf("%s\\de\\%s",Closure->docDir,target);
|
||||||
|
#else
|
||||||
|
path = g_strdup_printf("%s/de/%s",Closure->docDir,target);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!path)
|
||||||
|
{
|
||||||
|
#ifdef SYS_MINGW
|
||||||
|
path = g_strdup_printf("%s\\en\\%s",Closure->docDir,target);
|
||||||
|
#else
|
||||||
|
path = g_strdup_printf("%s/en/%s",Closure->docDir,target);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef SYS_MINGW
|
||||||
|
if(!LargeStat(path, &ignore))
|
||||||
|
{
|
||||||
|
g_free(path); /* the local dir is Windows specific */
|
||||||
|
path = g_strdup_printf("%s\\local\\%s",Closure->docDir,target);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
g_free(target);
|
||||||
|
bi->url = path;
|
||||||
|
}
|
||||||
|
else bi->url = target;
|
||||||
|
|
||||||
|
if(!http_url && !LargeStat(bi->url, &ignore))
|
||||||
|
{
|
||||||
|
CreateMessage(_("Documentation file\n%s\nnot found.\n"), GTK_MESSAGE_ERROR, bi->url);
|
||||||
|
g_free(bi);
|
||||||
|
g_free(bi->url);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Lock the help button and show a message for 10 seconds. */
|
||||||
|
|
||||||
|
TimedInsensitive(Closure->helpButton, 10000);
|
||||||
|
bi->msg = CreateMessage(_("Please hang on until the browser comes up!"), GTK_MESSAGE_INFO);
|
||||||
|
g_signal_connect(G_OBJECT(bi->msg), "destroy", G_CALLBACK(msg_destroy_cb), bi);
|
||||||
|
|
||||||
|
#ifdef SYS_MINGW
|
||||||
|
/* Okay, Billy wins big time here ;-) */
|
||||||
|
|
||||||
|
ShellExecute(NULL, "open", bi->url, NULL, NULL, SW_SHOWNORMAL);
|
||||||
|
g_timeout_add(1000, browser_timeout_func, (gpointer)bi);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SYS_LINUX) || defined(SYS_FREEBSD) || defined(SYS_KFREEBSD) || \
|
||||||
|
defined(SYS_NETBSD) || defined(SYS_HURD)
|
||||||
|
/* Try the first browser */
|
||||||
|
|
||||||
|
browser_index = 0;
|
||||||
|
try_browser(bi);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
12
smart-lec.c
12
smart-lec.c
@@ -27,9 +27,9 @@
|
|||||||
|
|
||||||
#define VERBOSE 1
|
#define VERBOSE 1
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
#define verbose(format,args...) printf(format, ## args)
|
#define verbose(format,...) printf(format, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define verbose(format,args...)
|
#define verbose(format,...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -432,7 +432,7 @@ static void update_pq_state(sh_context *shc)
|
|||||||
static void print_pq_state(sh_context *shc)
|
static void print_pq_state(sh_context *shc)
|
||||||
{ int i;
|
{ int i;
|
||||||
|
|
||||||
verbose("PQ states: \n");
|
verbose("%s", "PQ states: \n");
|
||||||
|
|
||||||
for(i=0; i<N_P_VECTORS; i++)
|
for(i=0; i<N_P_VECTORS; i++)
|
||||||
{ if(shc->pState[i] == 1)
|
{ if(shc->pState[i] == 1)
|
||||||
@@ -1354,7 +1354,7 @@ static void swap_p_for_new_improvement(sh_context *shc)
|
|||||||
count++;
|
count++;
|
||||||
|
|
||||||
if(count < 2)
|
if(count < 2)
|
||||||
{ verbose(" pruned");
|
{ verbose("%s", " pruned");
|
||||||
goto decrement;
|
goto decrement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1417,7 +1417,7 @@ decrement:
|
|||||||
if(index >= n_q) break;
|
if(index >= n_q) break;
|
||||||
selection[index]=0;
|
selection[index]=0;
|
||||||
|
|
||||||
verbose("\n");
|
verbose("%s", "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1609,7 +1609,7 @@ static int smart_lec_iteration(sh_context *shc, char *message)
|
|||||||
shc->bestBonus = 0;
|
shc->bestBonus = 0;
|
||||||
shc->bestMalus = 100000;
|
shc->bestMalus = 100000;
|
||||||
memcpy(shc->bestFrame, rb->recovered, rb->sampleSize);
|
memcpy(shc->bestFrame, rb->recovered, rb->sampleSize);
|
||||||
sprintf(shc->msg, "smart_lec: no further improvment");
|
sprintf(shc->msg, "smart_lec: no further improvement");
|
||||||
|
|
||||||
update_pq_state(shc);
|
update_pq_state(shc);
|
||||||
print_pq_state(shc);
|
print_pq_state(shc);
|
||||||
|
|||||||
2
udf.c
2
udf.c
@@ -797,7 +797,7 @@ void FreeIsoHeader(IsoHeader *ih)
|
|||||||
|
|
||||||
void AddFile(IsoHeader *ih, char *name, guint64 size)
|
void AddFile(IsoHeader *ih, char *name, guint64 size)
|
||||||
{ static int n;
|
{ static int n;
|
||||||
char iso[30], joliet[strlen(name)+3];
|
char iso[22], joliet[strlen(name)+3];
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
sprintf(iso,"RAN_%04d.DAT;1", n);
|
sprintf(iso,"RAN_%04d.DAT;1", n);
|
||||||
|
|||||||
Reference in New Issue
Block a user