debian/0000775000000000000000000000000012215700041007160 5ustar debian/patches/0000775000000000000000000000000012215677322010626 5ustar debian/patches/0002-pointer-type.patch0000664000000000000000000000122712045753132014662 0ustar From: "Barak A. Pearlmutter" Date: Sun, 1 Jan 2012 18:20:23 +0100 Subject: pointer type quash gcc pointer type warning, passing **dvd_reader_t to routine that expects *dvd_reader_t --- vobcopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vobcopy.c b/vobcopy.c index d6e8ffc..95c3fea 100644 --- a/vobcopy.c +++ b/vobcopy.c @@ -773,7 +773,7 @@ and potentially fatal." - Thanks Leigh!*/ if( longest_title_flag ) /*no title specified (-n ) */ { - titleid = get_longest_title( &dvd ); + titleid = get_longest_title( dvd ); fprintf( stderr, _("[Info] longest title %d.\n"), titleid ); } debian/patches/0004-man-dash-hyphen-slash-de.patch0000664000000000000000000001517312045753132016711 0ustar From: "Barak A. Pearlmutter" Date: Sun, 1 Jan 2012 19:13:15 +0100 Subject: man dash hyphen slash de silence lintian warning about hyphens vs dashes in German man page --- vobcopy.1.de | 84 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/vobcopy.1.de b/vobcopy.1.de index d47c387..794406d 100644 --- a/vobcopy.1.de +++ b/vobcopy.1.de @@ -6,31 +6,31 @@ .SH NAME vobcopy \- kopiert (rippt) Dateien von einer (Video-) DVD auf die Festplatte .SH SYNTAX -.B vobcopy [-b +.B vobcopy [\-b .I Größe[bkmg] -.B ] [-e +.B ] [\-e .I Größe[bkmg] -.B ] [-f] [-F +.B ] [\-f] [\-F .I Beschleunigungsfaktor -.B ] [-h] [-i +.B ] [\-h] [\-i .I Eingabeverzeichnis -.B ] [-l] [-m] [-m][-n +.B ] [\-l] [\-m] [\-m][\-n .I Titel-Nummer -.B ] [-o +.B ] [\-o .I Ausgabeverzeichnis -.B ] [-q] [-O +.B ] [\-q] [\-O .I einzelne zu kopierende Datei -.B ] [-t +.B ] [\-t .I Name -.B ] [-v [-v]] [-x] [-I] [-V] [-L +.B ] [\-v [\-v]] [\-x] [\-I] [\-V] [\-L .I Logdatei-Pfad -.B ] [-1 +.B ] [\-1 .I zusätzliches Ausgabeverzeichnis 1 -.B ] [-2 +.B ] [\-2 .I zusätzliches Ausgabeverzeichnis 2 -.B ] [-3 +.B ] [\-3 .I zusätzliches Ausgabeverzeichnis 3 -.B ] [-4 +.B ] [\-4 .I zusätzliches Ausgabeverzeichnis 4 .B ] .SH Beschreibung @@ -53,76 +53,76 @@ Routinen ist als Erweiterung zu libdvdread (siehe deren Webseite) erh Beim Aufruf ohne jegliche Optionen wird der Titel mit den meisten Kapiteln in Dateien von 2GB Größe in das aktuelle Verzeichnis kopiert. .SH OPTIONEN -.IP "-b, --begin GRÖSSE[bkmg]" +.IP "\-b, \-\-begin GRÖSSE[bkmg]" beginnt den Kopiervorgang erst ab der angegebenen Adresse. Die Größe der Adresse kann mit den Abkürzungen b für 512-Byte-Blöcke, k für Kilobytes, m für Mega- und g für Gigabytes angegeben werden. -Beispiel: vobcopy -b 500m beginnt bei 500MB nach dem Anfang der Datei +Beispiel: vobcopy \-b 500m beginnt bei 500MB nach dem Anfang der Datei bis zum Ende zu kopieren. -.IP "-e, --end GRÖSSE[bkmg]" -ähnlich wie -b gibt diese Option eine Größe vor dem Ende der Datei an, +.IP "\-e, \-\-end GRÖSSE[bkmg]" +ähnlich wie \-b gibt diese Option eine Größe vor dem Ende der Datei an, an der der Kopiervorgang stoppt. -.IP "-f, --force" +.IP "\-f, \-\-force" erzwingt die Ausgabe in das angegebene Verzeichnis, auch wenn vobcopy denkt, dass dort ist nicht genügend freier Platz vorhanden ist. -.IP "-F, --fast Beschleunigungsfaktor" +.IP "\-F, \-\-fast Beschleunigungsfaktor" beschleunigt das Kopieren um einen Faktor (experimentell). Der Beschleunigungsfaktor kann 1 bis 64 betragen -.IP "-h, --help" +.IP "\-h, \-\-help" Gibt die verfügbaren Optionen aus -.IP "-i, --input-dir EINGABE-VERZEICHNIS" +.IP "\-i, \-\-input\-dir EINGABE-VERZEICHNIS" gibt das Eingabeverzeichnis an (das Verzeichnis, auf das die DVD gemountet ist). -.IP "-l, --large-file" +.IP "\-l, \-\-large\-file" schreibt alle Daten in eine große Datei ( > 2GB, benötigt Unterstützung für große Dateien (LFS)) -.IP "-M, --longest" +.IP "\-M, \-\-longest" wählt den Titel mit der längsten Spielzeit. Bei manchen DVDs wird der Hauptfilm besser gefunden als mit der Methode der meisten Kapitel, bei manchen schlechter. -.IP "-m, --mirror" +.IP "\-m, \-\-mirror" Spiegelt die gesamte DVD auf die Festplatte. Es wird ein Unterverzeichnis mit dem DVD-Namen erzeugt und die gesamte Dateistruktur des Videoteils wird darunter kopiert. -.IP "-n, --title-number TITEL-NUMMER" +.IP "\-n, \-\-title\-number TITEL-NUMMER" gibt an, welcher Titel kopiert werden soll. Auf der DVD heißt der erste Titel vts_01_x.vob (meist der Hauptfilm). -.IP "-o, --output-dir AUSGABE-VERZEICHNIS" -gibt das Ausgabeverzeichnis für die Kopien an. Der Wert "stdout" oder "-" +.IP "\-o, \-\-output\-dir AUSGABE-VERZEICHNIS" +gibt das Ausgabeverzeichnis für die Kopien an. Der Wert "stdout" oder "\-" gibt auf der Standardausgabe aus. Nützlich für die Ausgabe nach /dev/null ;-) Tipp: Wenn du vergisst umzuleiten, wird dein Terminal überflutet werden, in diesem Fall tippe "reset" und Enter, um das Terminal zu retten. -.IP "-q, --quiet" +.IP "\-q, \-\-quiet" alle Informations- und Fehlerausschriften von vobcopy werden in die Datei vobcopy.bla im aktuellen Verzeichnis anstatt in die Standardfehlerausgabe geschrieben -.IP "-O, --onefile single_file(s)_to_rip" +.IP "\-O, \-\-onefile single_file(s)_to_rip" gibt (eine) einzelne Datei(en) für das Kopieren an. Teile von Namen können angegeben werden und alle Dateien, die die Namensteile enthalten, werden kopiert. Dateinamen können als mit Komma getrennte Liste angegeben werden. -Beispiel: -O video_ts.vob,bup kopiert die Datei video_ts.vob und alle Dateien, +Beispiel: \-O video_ts.vob,bup kopiert die Datei video_ts.vob und alle Dateien, deren Namen bup enthält. -.IP "-t, --name NAME" +.IP "\-t, \-\-name NAME" Damit kann man der Ausgabedatei einen eigenen Namen geben, wenn einem der von -der DVD nicht gefällt. -t hallo erzeugt also ein hallo.vob. (stdout oder "-" sind nun +der DVD nicht gefällt. \-t hallo erzeugt also ein hallo.vob. (stdout oder "\-" sind nun nicht mehr unterstützt) Wenn du Namen mit Leerzeichen wie "Huh ich mag den Film" angeben willst, schließe den Namen in Anführungszeichen ein. -.IP "-v, --verbose" +.IP "\-v, \-\-verbose" schreibt noch mehr Informationen aus. -.IP "-v -v" +.IP "\-v \-v" schreibt die Ausschriften in eine Logdatei im aktuellen Verzeichis um einen Fehlerreport zu erzeugen. -.IP "-x" +.IP "\-x" überschreibt alle existierenden Dateien ohne weitere Rückfragen. -.IP "-L LOGDATEI-PFAD" +.IP "\-L LOGDATEI-PFAD" weist vobcopy an die Logdatei statt in den Standardpfad in den LOGDATEI-PFAD zu legen. -.IP "-I, --info" +.IP "\-I, \-\-info" gibt Informationen über die Titel, Kapitel und Teile der DVD aus. -.IP "-V, --version" +.IP "\-V, \-\-version" gibt die Versionsnummer von vobcopy aus. -.IP "-1, --1st_alt_output_dir AUXILIARY-OUTPUT-DIR1" +.IP "\-1, \-\-1st_alt_output_dir AUXILIARY-OUTPUT-DIR1" Wenn die DVD einfach nicht in das erste Ausgabeverzeichnis passen will -(mit -o angegeben), geht die Ausgabe in das hier angegebene Verzeichnis +(mit \-o angegeben), geht die Ausgabe in das hier angegebene Verzeichnis (und die folgenden 2ten, 3ten und 4ten) weiter -> die Dateien werden geteilt, je nachdem wie viel Platz in jedem der Verzeichnisse noch blieb. -Gib den Pfad _direkt_ hinter "-1" an, _kein_ Leerzeichen dazwischen lassen, -wenn Probleme auftreten, möglicherweise ist das auch bei -o nötig...) +Gib den Pfad _direkt_ hinter "\-1" an, _kein_ Leerzeichen dazwischen lassen, +wenn Probleme auftreten, möglicherweise ist das auch bei \-o nötig...) .SH FEHLER Vobcopy ist weiterhin unter Entwicklung, also können noch einige Neuerungen erwarten werden. debian/patches/0005-autotools.patch0000664000000000000000000002627012045753132014264 0ustar From: "Barak A. Pearlmutter" Date: Thu, 12 Jan 2012 13:44:34 +0000 Subject: autotools Switch build system to use autotools (add autotools scripts; rm Makefile configure.sh) centralise version number in configure.ac --- Makefile.am | 23 ++++++ configure.ac | 12 +++ configure.sh | 249 ---------------------------------------------------------- vobcopy.c | 10 +-- vobcopy.h | 2 - 5 files changed, 40 insertions(+), 256 deletions(-) create mode 100644 Makefile.am create mode 100644 configure.ac delete mode 100755 configure.sh diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..f601572 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,23 @@ +bin_PROGRAMS = vobcopy + +vobcopy_SOURCES = dvd.c vobcopy.c dvd.h vobcopy.h + +AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + +dist_man_MANS = vobcopy.1 +man1dedir = $(mandir)/de/man1 +man1de_DATA = intl/de/vobcopy.1 + +EXTRA_DIST = vobcopy.mo vobcopy.pot vobcopy.spec vobcopy.1.de + +dist_doc_DATA = alternative_programs.txt Changelog README Release-Notes TODO COPYING + +intl/de/vobcopy.1: vobcopy.1.de + mkdir -p intl/de + ln $< $@ + +MOSTLYCLEANFILES = intl/de/vobcopy.1 + +mostlyclean-local: + -rmdir intl/de + -rmdir intl diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..fb85ff9 --- /dev/null +++ b/configure.ac @@ -0,0 +1,12 @@ +AC_PREREQ([2.67]) +AC_INIT([vobcopy],[1.2.0],[Robos ]) +AC_CONFIG_SRCDIR([vobcopy.c]) + +AM_INIT_AUTOMAKE([foreign]) + +AC_PROG_CC + +AC_CHECK_LIB([dvdread], [DVDOpen]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/configure.sh b/configure.sh deleted file mode 100755 index 9e39662..0000000 --- a/configure.sh +++ /dev/null @@ -1,249 +0,0 @@ -#!/bin/sh -#hope this thing works across all systems, otherwise mail me please: -#robos@muon.de - - -echo "THIS CONFIGURE SCRIPT IS STILL HIGHLY EXPERIMENTAL! -If you think you found a bug, please mail me, thanks! robos@muon.de" - -#This is the makefile generator for vobcopy, -#The original makefile was written by rosenauer. These things -#below here are variable definitions. They get substituted in the (CC) and -#stuff places. - - -#args check *new* -#declare -i i=0 -if [ $# != 0 ] -then - while [ $# != 0 ] - do - - if [ "$1" != "${1#--prefix=}" ]; then - prefix="${1#--prefix=}" - prefix_provided=true - echo "prefix = $prefix" - fi - - if [ "$1" != "${1#--bindir=}" ]; then - bindir="${1#--bindir=}" - bindir_provided=true - echo "bindir here: $bindir" - fi - - if [ "$1" != "${1#--mandir=}" ]; then - mandir="${1#--mandir=}" - mandir_provided=true - echo "with mandir here: $mandir" - fi - - if [ "$1" != "${1#--docdir=}" ]; then - docdir="${1#--docdir=}" - docdir_provided=true - echo "with docdir here: $docdir" - fi - - if [ "$1" != "${1#--with-lfs}" ]; then - echo "with large-file support" - LFS="LFS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" - lfs_provided=true - fi - - if [ "$1" != "${1#--with-dvdread-libs=}" ]; then - libs_dir="${1#--with-dvdread-libs=}" - libs_dir_provided=true - echo "with dvdread-libs here: $libs_dir" - fi - - if [ "$1" != "${1%help}" ]; then - echo "--prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]" - echo "--bindir=DIR user executables in DIR [PREFIX/bin]" - echo "--mandir=DIR man documentation in DIR [PREFIX/bin]" - echo "--docdir=DIR package documentation in DIR [PREFIX/share/doc/vobcopy]" - echo "--with-dvdread-libs=DIR directory where dvdread lib (dvd_reader.h) is installed" - echo "--with-lfs Enable large File System support" - exit 1 - fi - shift 1 - done -fi - -if [ -z $prefix_provided ] -then - prefix=/usr/local -fi - -if [ -z $mandir_provided ] -then - mandir=\${PREFIX}/man -fi - -if [ -z $docdir_provided ] -then - docdir=\${PREFIX}/share/doc/vobcopy -fi - -if [ -z $bindir_provided ] -then - bindir=\${PREFIX}/bin -fi - - -#see if libdvdread is installed -if [ -z $libs_dir_provided ] -then - - if [ ! -e /usr/local/include/dvdread ]; then - if [ ! -e /usr/include/dvdread ]; then #muss hier das then hin?? - echo "Do you have libdvdread installed? I (the script) can't -find it" - echo "You probably need the libdvdread-devel package or something similar installed. If you already have:" - echo "Please provide the path to dvdreader.h after -./configure --with-dvdread-libs=" - echo "And please mail me the location so that I can fix the -makefile to robos@muon.de, thanks!" - exit 1 - else - echo "libdvdread found" - libs_dir=/usr/ -# libs_dir=/usr/include - fi - else - echo "libdvdread found" - libs_dir=/usr/local/ -# libs_dir=/usr/local/include - fi -else -# Remove the following if...fi if the program complains about non-existing -# headers when they really are there... - if [ ! -e $libs_dir/include/dvdread ]; then - echo "You specified that libdvdread is installed at $libs_dir. However" - echo "I (the script) am unable to find the header files at" - echo "$libs_dir/include/dvdread." - echo "If they really are there, edit the configure.sh and remove" - echo "this check." - exit 1 - fi -fi - - -#I hope this is a test to see if the system is largefile ready -if [ -z $lfs_provided ] -then - if grep "ftello64" /usr/include/stdio.h >/dev/null 2>&1 - then - echo "largefile support found" - LFS="LFS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" - else - echo "no large-file support found (by me, the stupid script)" - echo "large file support is necessary if you want to output files - larger than 2GB" - echo "please append --with-lfs to ./configure, else lfs is disabled" - LFS="LFS =" - fi -fi - - -#FreeBSD needs libgnugetopt (kern.osreldate < 500041) -#if [ `uname -s` = FreeBSD -a \ -# `sysctl -n kern.osreldate 2> /dev/null` -lt 500041 ]; then -if [ `uname -s` = FreeBSD ]; then - if [ `sysctl -n kern.osreldate 2> /dev/null` -lt 500041 ]; then - LDFLAGS="LDFLAGS += -ldvdread -L/usr/local/lib -lgnugetopt" - else - LDFLAGS="LDFLAGS += -ldvdread -L$libs_dir/lib" - fi -elif [ `uname -m` = x86_64 ]; then #for ia64/AMD64 libraries - LDFLAGS="LDFLAGS += -ldvdread -L$libs_dir/lib64" -else - LDFLAGS="LDFLAGS += -ldvdread -L$libs_dir/lib" -fi - -#Solaris 9 needs -lrt -if [ `uname -a | grep "SunOS solaris 5.9" ` ]; then - LDFLAGS="+LDFLAGS += -ldvdread -lrt -L/usr//lib" -fi - - - -#see if a Makefile is present - and kill it ;-) -if [ -e ./Makefile ]; then - rm -f ./Makefile -fi - -#write the Makefile -touch Makefile - -echo " -#This is the makefile for vobcopy, mainly written by rosenauer. These things -#below here are variable definitions. They get substituted in the (CC) and -#stuff places. -DESTDIR = -CC ?= gcc -#PREFIX += /usr/local -#BINDIR = \${PREFIX}/bin -#MANDIR = \${PREFIX}/man -PREFIX += $prefix -BINDIR = $bindir -MANDIR = $mandir -DOCDIR = $docdir -$LFS -CFLAGS += -I$libs_dir/include -$LDFLAGS - -#This specifies the conversion from .c to .o -.c.o: - \$(CC) \$(LFS) \$(CFLAGS) -c \$< - -#Here is implicitly said that for vobcopy to be made *.o has to be made first -#make is kinda intelligent in that aspect. -vobcopy: vobcopy.o dvd.o - \$(CC) -o vobcopy vobcopy.o dvd.o \${LDFLAGS} - -disable_lfs: - \$(CC) \$(CFLAGS) -c vobcopy.c - \$(CC) \$(CFLAGS) -c dvd.c - \$(CC) -o vobcopy vobcopy.o dvd.o -ldvdread - -debug: - \$(CC) -c vobcopy.c -Wall -ggdb -pedantic \$(CFLAGS) \$(LFS) - \$(CC) -c dvd.c -Wall -ggdb -pedantic \$(CFLAGS) \$(LFS) - \$(CC) -o vobcopy vobcopy.o dvd.o -ldvdread - -deb: - - echo \"this here is really really experimental...\" - dpkg-buildpackage -rfakeroot -us -uc -tc - - -clean : - rm -f vobcopy vobcopy.o dvd.o - -distclean : - rm -f vobcopy.o dvd.o *~ - -install: -# mkdir -p \$(MANDIR)/man1 -# cp vobcopy \$(BINDIR)/vobcopy -# cp vobcopy.1 \$(MANDIR)/man1/vobcopy.1 - install -d -m 755 \$(DESTDIR)/\$(BINDIR) - install -d -m 755 \$(DESTDIR)/\$(MANDIR)/man1 - install -d -m 755 \$(DESTDIR)/\$(MANDIR)/de/man1 - install -d -m 755 \$(DESTDIR)/\$(DOCDIR) - install -m 755 vobcopy \$(DESTDIR)/\$(BINDIR)/vobcopy - install -m 644 vobcopy.1 \$(DESTDIR)/\$(MANDIR)/man1/vobcopy.1 - install -m 644 vobcopy.1.de \$(DESTDIR)/\$(MANDIR)/de/man1/vobcopy.1 - install -m 644 COPYING Changelog README Release-Notes TODO \$(DESTDIR)/\$(DOCDIR) - -uninstall: - rm -f \$(DESTDIR)/\$(BINDIR)/vobcopy - rm -f \$(DESTDIR)/\$(MANDIR)/man1/vobcopy.1 - rm -f \$(DESTDIR)/\$(MANDIR)/de/man1/vobcopy.1 - rm -f \$(DESTDIR)/\$(DOCDIR)/{COPYING,Changelog,README,Release-Notes,TODO} - rmdir --parents \$(DESTDIR)/\$(BINDIR) 2>/dev/null - rmdir --parents \$(DESTDIR)/\$(MANDIR)/man1 2>/dev/null - rmdir --parents \$(DESTDIR)/\$(MANDIR)/de/man1 2>/dev/null - rmdir --parents \$(DESTDIR)/\$(DOCDIR) 2>/dev/null -" > Makefile - -echo "Next thing type \"make\" and then \"make install\"" diff --git a/vobcopy.c b/vobcopy.c index 95c3fea..03a2419 100644 --- a/vobcopy.c +++ b/vobcopy.c @@ -488,7 +488,7 @@ and potentially fatal." - Thanks Leigh!*/ i = 0; break; case'V': /*version number output */ - printf( "Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n" ); + printf( "Vobcopy "PACKAGE_VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n" ); exit( 0 ); break; @@ -513,7 +513,7 @@ and potentially fatal." - Thanks Leigh!*/ } } - fprintf( stderr, _("Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n") ); + fprintf( stderr, _("Vobcopy "PACKAGE_VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n") ); fprintf( stderr, _("[Hint] All lines starting with \"libdvdread:\" are not from vobcopy but from the libdvdread-library\n") ); /*get the current working directory*/ @@ -600,8 +600,8 @@ and potentially fatal." - Thanks Leigh!*/ if( strlen( logfile_path ) < 3 ) strcpy( logfile_path, pwd ); - strcpy( logfile_name, "vobcopy_" ); - strcat( logfile_name, VERSION ); + strcpy( logfile_name, PACKAGE_TARNAME"_" ); + strcat( logfile_name, PACKAGE_VERSION ); strcat( logfile_name, ".log" ); strcat( logfile_path, logfile_name ); if ( ( temp = open ( logfile_path , O_RDWR | O_CREAT | O_EXCL, 0666 ) ) == -1 ) @@ -2072,7 +2072,7 @@ int make_output_path( char *pwd,char *name,int get_dvd_name_return, char *dvd_na void usage( char *program_name ) { - fprintf( stderr, _("Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n") ); + fprintf( stderr, _("Vobcopy "PACKAGE_VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n") ); fprintf( stderr, _("\nUsage: %s \n"), program_name ); fprintf( stderr, _("if you want the main feature (title with most chapters) you don't need _any_ options!\n") ); fprintf( stderr, _("Options:\n") ); diff --git a/vobcopy.h b/vobcopy.h index 19b40e1..aed8770 100644 --- a/vobcopy.h +++ b/vobcopy.h @@ -1,5 +1,3 @@ -#define VERSION "1.2.0" - #if defined( __gettext__ ) #include #include debian/patches/series0000664000000000000000000000036712215677322012051 0ustar 0001-hurd-fix.patch 0002-pointer-type.patch 0003-man-dash-hyphen-slash-en.patch 0004-man-dash-hyphen-slash-de.patch 0005-autotools.patch 0006-autoheader.patch 0007-auto-gettext.patch 0008-autoconf-deobfuscation.patch 0009-vobcopy.h-xMNTINFO.patch debian/patches/0001-hurd-fix.patch0000664000000000000000000000132412045753132013746 0ustar From: Svante Signell Date: Sun, 1 Jan 2012 18:42:05 +0100 Subject: hurd fix Solves failure to build from sources on Debian GNU/Hurd, see http://bugs.debian.org/641283 for details. --- vobcopy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vobcopy.h b/vobcopy.h index ebe2709..19b40e1 100644 --- a/vobcopy.h +++ b/vobcopy.h @@ -69,7 +69,7 @@ typedef enum { FALSE=0, TRUE=1 } bool; /* ////////// *BSD ////////// */ #if ( defined( BSD ) && ( BSD >= 199306 ) ) -#if !defined( __NetBSD__ ) || \ +#if !defined( __NetBSD__ ) && !defined(__GNU__) || \ ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) #include #define USE_STATFS 1 debian/patches/0008-autoconf-deobfuscation.patch0000664000000000000000000004052312045753132016674 0ustar From: "Barak A. Pearlmutter" Date: Thu, 26 Jan 2012 17:19:19 +0000 Subject: autoconf deobfuscation remove system-specific guards in favour of feature tests. test for getopt_long. test for fdatasync. test for statfs and friends. remove gettext.h. --- configure.ac | 4 +- gettext.h | 280 ---------------------------------------------------------- vobcopy.c | 7 -- vobcopy.h | 159 +++++++++------------------------ 4 files changed, 44 insertions(+), 406 deletions(-) delete mode 100644 gettext.h diff --git a/configure.ac b/configure.ac index 62c8773..4539a98 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PROG_LN_S AC_CHECK_LIB([dvdread], [DVDOpen]) # Checks for header files. -AC_CHECK_HEADERS([fcntl.h libintl.h locale.h mntent.h stdint.h stdlib.h string.h sys/ioctl.h sys/mount.h sys/param.h sys/statfs.h sys/statvfs.h sys/vfs.h termios.h unistd.h]) +AC_CHECK_HEADERS([fcntl.h libintl.h locale.h mntent.h stdint.h stdlib.h string.h sys/ioctl.h sys/mount.h sys/param.h sys/statfs.h sys/statvfs.h sys/vfs.h termios.h unistd.h getopt.h sys/mnttab.h assert.h dirent.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL @@ -35,7 +35,7 @@ AC_FUNC_FSEEKO AC_SYS_LARGEFILE AC_FUNC_GETMNTENT AC_FUNC_MALLOC -AC_CHECK_FUNCS([alarm fdatasync getcwd getmntent getmntinfo memset mkdir setlocale strcasecmp strerror strpbrk strstr]) +AC_CHECK_FUNCS([alarm fdatasync getcwd getmntent getmntinfo memset mkdir setlocale strcasecmp strerror strpbrk strstr getopt_long]) # trailer AC_CONFIG_FILES([Makefile po/Makefile.in]) diff --git a/gettext.h b/gettext.h deleted file mode 100644 index e76b592..0000000 --- a/gettext.h +++ /dev/null @@ -1,280 +0,0 @@ -/* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc. - - 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 3, 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 - Library 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include - -/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by - the gettext() and ngettext() macros. This is an alternative to calling - textdomain(), and is useful for libraries. */ -# ifdef DEFAULT_TEXT_DOMAIN -# undef gettext -# define gettext(Msgid) \ - dgettext (DEFAULT_TEXT_DOMAIN, Msgid) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) -# endif - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of a NOP. We don't include - as well because people using "gettext.h" will not include , - and also including would fail on SunOS 4, whereas - is OK. */ -#if defined(__sun) -# include -#endif - -/* Many header files from the libstdc++ coming with g++ 3.3 or newer include - , which chokes if dcgettext is defined as a macro. So include - it now, to make later inclusions of a NOP. */ -#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -# include -# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H -# include -# endif -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# undef gettext -# define gettext(Msgid) ((const char *) (Msgid)) -# undef dgettext -# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) -# undef dcgettext -# define dcgettext(Domainname, Msgid, Category) \ - ((void) (Category), dgettext (Domainname, Msgid)) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 \ - ? ((void) (Msgid2), (const char *) (Msgid1)) \ - : ((void) (Msgid1), (const char *) (Msgid2))) -# undef dngettext -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) -# undef dcngettext -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) -# undef textdomain -# define textdomain(Domainname) ((const char *) (Domainname)) -# undef bindtextdomain -# define bindtextdomain(Domainname, Dirname) \ - ((void) (Domainname), (const char *) (Dirname)) -# undef bind_textdomain_codeset -# define bind_textdomain_codeset(Domainname, Codeset) \ - ((void) (Domainname), (const char *) (Codeset)) - -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -/* The separator between msgctxt and msgid in a .mo file. */ -#define GETTEXT_CONTEXT_GLUE "\004" - -/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a - MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be - short and rarely need to change. - The letter 'p' stands for 'particular' or 'special'. */ -#ifdef DEFAULT_TEXT_DOMAIN -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#else -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#endif -#define dpgettext(Domainname, Msgctxt, Msgid) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) -#ifdef DEFAULT_TEXT_DOMAIN -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#else -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#endif -#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -pgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - int category) -{ - const char *translation = dcgettext (domain, msg_ctxt_id, category); - if (translation == msg_ctxt_id) - return msgid; - else - return translation; -} - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -npgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - const char *translation = - dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); - if (translation == msg_ctxt_id || translation == msgid_plural) - return (n == 1 ? msgid : msgid_plural); - else - return translation; -} - -/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID - can be arbitrary expressions. But for string literals these macros are - less efficient than those above. */ - -#include - -#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ - /* || __STDC_VERSION__ >= 199901L */ ) - -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS -#include -#endif - -#define pgettext_expr(Msgctxt, Msgid) \ - dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) -#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ - dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -dcpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - int category) -{ - size_t msgctxt_len = strlen (msgctxt) + 1; - size_t msgid_len = strlen (msgid) + 1; - const char *translation; -#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - char msg_ctxt_id[msgctxt_len + msgid_len]; -#else - char buf[1024]; - char *msg_ctxt_id = - (msgctxt_len + msgid_len <= sizeof (buf) - ? buf - : (char *) malloc (msgctxt_len + msgid_len)); - if (msg_ctxt_id != NULL) -#endif - { - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcgettext (domain, msg_ctxt_id, category); -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); -#endif - if (translation != msg_ctxt_id) - return translation; - } - return msgid; -} - -#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ - dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -dcnpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - size_t msgctxt_len = strlen (msgctxt) + 1; - size_t msgid_len = strlen (msgid) + 1; - const char *translation; -#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - char msg_ctxt_id[msgctxt_len + msgid_len]; -#else - char buf[1024]; - char *msg_ctxt_id = - (msgctxt_len + msgid_len <= sizeof (buf) - ? buf - : (char *) malloc (msgctxt_len + msgid_len)); - if (msg_ctxt_id != NULL) -#endif - { - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); -#endif - if (!(translation == msg_ctxt_id || translation == msgid_plural)) - return translation; - } - return (n == 1 ? msgid : msgid_plural); -} - -#endif /* _LIBGETTEXT_H */ diff --git a/vobcopy.c b/vobcopy.c index 63aa21d..4847b01 100644 --- a/vobcopy.c +++ b/vobcopy.c @@ -2296,13 +2296,6 @@ char *safestrncpy(char *dest, const char *src, size_t n) return strncpy(dest, src, n-1); } -#if defined(__APPLE__) && defined(__GNUC__) || defined(OpenBSD) -int fdatasync( int value ) -{ - return 0; -} -#endif - /* * Check the time determine whether a new progress line should be output (once per second) diff --git a/vobcopy.h b/vobcopy.h index 76958e6..33cdf52 100644 --- a/vobcopy.h +++ b/vobcopy.h @@ -1,9 +1,5 @@ -#if defined( __gettext__ ) -#include -#include -#define _(Text) gettext(Text) -#else -#define _(Text) Text +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #define DVDCSS_VERBOSE 1 @@ -11,8 +7,18 @@ #define MAX_STRING 81 #define MAX_DIFFER 2000 -#ifdef HAVE_CONFIG_H -#include "config.h" +#ifdef ENABLE_NLS +#define _(Text) gettext(Text) +#else +#define _(Text) Text +#endif + +#ifdef HAVE_LOCALE_H +#include +#endif + +#ifdef HAVE_LIBINTL_H +#include #endif #include @@ -60,8 +66,7 @@ #include #endif -#if defined( __GNUC__ ) && \ - !( defined( sun ) ) +#ifdef HAVE_GETOPT_H #include #endif @@ -73,10 +78,6 @@ #include #endif -#ifdef HAVE_SYS_STATVFS_H -#include -#endif - #ifdef HAVE_SYS_MOUNT_H #include #endif @@ -93,130 +94,54 @@ typedef enum { FALSE=0, TRUE=1 } bool; #define FALSE false #endif -/* I'm trying to have all supported OSes definitions clearly separated here */ -/* The appearance could probably be made more readable -- lb */ - -/* ////////// Solaris ////////// */ -#if defined( __sun ) - +#ifdef HAVE_SYS_MNTTAB_H #include - -#else /* Solaris */ - -/* ////////// *BSD ////////// */ -#if ( defined( BSD ) && ( BSD >= 199306 ) ) - -#if !defined( __NetBSD__ ) && !defined(__GNU__) || \ - ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) -#include -#define USE_STATFS 1 #endif -#if defined(__FreeBSD__) -#define USE_STATFS_FOR_DEV -#endif - -#ifdef HAVE_SYS_STATVFS_H -#include +#ifdef HAVE_SYS_STATFS_H +#include #endif -#ifdef HAVE_SYS_PARAM_H -#include +#ifdef HAVE_SYS_VFS_H +#include +#define USE_STATFS +/* #define USE_STATFS_FOR_DEV */ #endif -# if defined(NetBSD) || defined (OpenBSD) - -# if ( __NetBSD_Version__ < 200040000 ) - -#include -#define USE_STATFS_FOR_DEV -#define GETMNTINFO_USES_STATFS - -# else +#ifdef HAVE_SYS_STATVFS_H #include +#ifndef USE_STATFS +#define USE_STATVFS +#ifndef USE_STATFS_FOR_DEV #define USE_STATVFS_FOR_DEV -#define GETMNTINFO_USES_STATVFS - -# endif #endif - -#if defined(__FreeBSD__) -#define USE_STATFS_FOR_DEV -#include -#else -#include +#endif #endif -#else /* *BSD */ - -/* ////////// Darwin / OS X ////////// */ -#if defined ( __APPLE__ ) - -/* ////////// Darwin ////////// */ -# if defined( __GNUC__ ) - -#include -/*can't be both! Should be STATVFS IMHO */ -/*#define USE_STATFS 1 -#define USE_STATVFS 1 */ -#define GETMNTINFO_USES_STATFS 1 -#define USE_GETMNTINFO 1 - -# endif - -/* ////////// OS X ////////// */ -# if defined( __MACH__ ) -/* mac osx 10.5 does not seem to like this one here */ -/*#include -#include -#include */ - -# endif - -#else /* Darwin / OS X */ - -/* ////////// GNU/Linux ////////// */ -#if ( defined( __linux__ ) ) - -#include -#include -#include - -#define USE_STATFS 1 -#define HAVE_GETOPT_LONG 1 - -#elif defined( __GLIBC__ ) - +#ifdef HAVE_MNTENT_H #include -#include -#include - -#define HAVE_GETOPT_LONG 1 - -#else - #endif + +#ifdef HAVE_GETMNTINFO +#define USE_GETMNTINFO #endif + +#ifdef USE_GETMNTINFO +#ifdef USE_STATFS_FOR_DEV +#define GETMNTINFO_USES_STATFS #endif +#ifdef USE_STATVFS_FOR_DEV +#define GETMNTINFO_USES_STATVFS #endif - - -/* OS/2 */ -#if defined(__EMX__) -#define __off64_t __int64_t -#include -#include -#define USE_STATFS 1 #endif - - - #include /*for/from play_title.c*/ +#ifdef HAVE_ASSERT_H #include -/* #include "config.h" */ +#endif + #include #include /* #include */ @@ -242,6 +167,6 @@ char *safestrncpy(char *dest, const char *src, size_t n); int check_progress( void ); /* this can be removed because the one below supersedes it */ int progressUpdate( int starttime, int cur, int tot, int force ); -#if defined(__APPLE__) && defined(__GNUC__) -int fdatasync( int value ); +#ifndef HAVE_FDATASYNC +#define fdatasync(fd) 0 #endif debian/patches/0007-auto-gettext.patch0000664000000000000000000010471412045753132014667 0ustar From: "Barak A. Pearlmutter" Date: Thu, 26 Jan 2012 11:41:32 +0000 Subject: auto gettext engage autoconf autoheader mechanisms for gettext internationalization remove '\r' from internationalized strings remove vobcopy.pot as po/vobcopy.pot is generated by autoreconf put m4 macros in m4/ subdir --- ChangeLog | 6 + Makefile.am | 5 +- configure.ac | 7 +- gettext.h | 280 ++++++++++++++++++ m4/ChangeLog | 10 + po/Makevars | 41 +++ po/POTFILES.in | 3 + vobcopy.c | 12 +- vobcopy.pot | 873 -------------------------------------------------------- 9 files changed, 358 insertions(+), 879 deletions(-) create mode 100644 ChangeLog create mode 100644 gettext.h create mode 100644 m4/ChangeLog create mode 100644 po/Makevars create mode 100644 po/POTFILES.in delete mode 100644 vobcopy.pot diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..b33689f --- /dev/null +++ b/ChangeLog @@ -0,0 +1,6 @@ +2012-01-26 gettextize + + * Makefile.am (SUBDIRS): New variable. + (ACLOCAL_AMFLAGS): New variable. + (EXTRA_DIST): Add config.rpath, m4/ChangeLog. + * configure.ac (AC_CONFIG_FILES): Add po/Makefile.in. diff --git a/Makefile.am b/Makefile.am index d5b1296..44b839d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,6 @@ +ACLOCAL_AMFLAGS = -I m4 +SUBDIRS = po + bin_PROGRAMS = vobcopy vobcopy_SOURCES = dvd.c vobcopy.c dvd.h vobcopy.h @@ -8,7 +11,7 @@ dist_man_MANS = vobcopy.1 man1dedir = $(mandir)/de/man1 man1de_DATA = intl/de/vobcopy.1 -EXTRA_DIST = vobcopy.mo vobcopy.pot vobcopy.spec vobcopy.1.de +EXTRA_DIST = m4/ChangeLog vobcopy.mo vobcopy.pot vobcopy.spec vobcopy.1.de dist_doc_DATA = alternative_programs.txt Changelog README Release-Notes TODO COPYING diff --git a/configure.ac b/configure.ac index 8aebe46..62c8773 100644 --- a/configure.ac +++ b/configure.ac @@ -4,11 +4,16 @@ AC_PREREQ([2.67]) AC_INIT([vobcopy],[1.2.0],[Robos ],[vobcopy],[http://vobcopy.org]) AC_CONFIG_SRCDIR([vobcopy.c]) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) # Enable automake AM_INIT_AUTOMAKE([foreign]) +# Internationalization support +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.18]) + # Checks for programs. AC_PROG_CC AC_PROG_LN_S @@ -33,5 +38,5 @@ AC_FUNC_MALLOC AC_CHECK_FUNCS([alarm fdatasync getcwd getmntent getmntinfo memset mkdir setlocale strcasecmp strerror strpbrk strstr]) # trailer -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile po/Makefile.in]) AC_OUTPUT diff --git a/gettext.h b/gettext.h new file mode 100644 index 0000000..e76b592 --- /dev/null +++ b/gettext.h @@ -0,0 +1,280 @@ +/* Convenience header for conditional use of GNU . + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc. + + 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 3, 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 + Library 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. */ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +/* Get declarations of GNU message catalog functions. */ +# include + +/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by + the gettext() and ngettext() macros. This is an alternative to calling + textdomain(), and is useful for libraries. */ +# ifdef DEFAULT_TEXT_DOMAIN +# undef gettext +# define gettext(Msgid) \ + dgettext (DEFAULT_TEXT_DOMAIN, Msgid) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) +# endif + +#else + +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of a NOP. We don't include + as well because people using "gettext.h" will not include , + and also including would fail on SunOS 4, whereas + is OK. */ +#if defined(__sun) +# include +#endif + +/* Many header files from the libstdc++ coming with g++ 3.3 or newer include + , which chokes if dcgettext is defined as a macro. So include + it now, to make later inclusions of a NOP. */ +#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) +# include +# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H +# include +# endif +#endif + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +# undef gettext +# define gettext(Msgid) ((const char *) (Msgid)) +# undef dgettext +# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) +# undef dcgettext +# define dcgettext(Domainname, Msgid, Category) \ + ((void) (Category), dgettext (Domainname, Msgid)) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 \ + ? ((void) (Msgid2), (const char *) (Msgid1)) \ + : ((void) (Msgid1), (const char *) (Msgid2))) +# undef dngettext +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) +# undef dcngettext +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) +# undef textdomain +# define textdomain(Domainname) ((const char *) (Domainname)) +# undef bindtextdomain +# define bindtextdomain(Domainname, Dirname) \ + ((void) (Domainname), (const char *) (Dirname)) +# undef bind_textdomain_codeset +# define bind_textdomain_codeset(Domainname, Codeset) \ + ((void) (Domainname), (const char *) (Codeset)) + +#endif + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + +/* The separator between msgctxt and msgid in a .mo file. */ +#define GETTEXT_CONTEXT_GLUE "\004" + +/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a + MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be + short and rarely need to change. + The letter 'p' stands for 'particular' or 'special'. */ +#ifdef DEFAULT_TEXT_DOMAIN +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#else +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#endif +#define dpgettext(Domainname, Msgctxt, Msgid) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) +#ifdef DEFAULT_TEXT_DOMAIN +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#else +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#endif +#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +pgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + int category) +{ + const char *translation = dcgettext (domain, msg_ctxt_id, category); + if (translation == msg_ctxt_id) + return msgid; + else + return translation; +} + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +npgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + const char *translation = + dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); + if (translation == msg_ctxt_id || translation == msgid_plural) + return (n == 1 ? msgid : msgid_plural); + else + return translation; +} + +/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID + can be arbitrary expressions. But for string literals these macros are + less efficient than those above. */ + +#include + +#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ + (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ + /* || __STDC_VERSION__ >= 199901L */ ) + +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS +#include +#endif + +#define pgettext_expr(Msgctxt, Msgid) \ + dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) +#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ + dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcgettext (domain, msg_ctxt_id, category); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (translation != msg_ctxt_id) + return translation; + } + return msgid; +} + +#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcnpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (!(translation == msg_ctxt_id || translation == msgid_plural)) + return translation; + } + return (n == 1 ? msgid : msgid_plural); +} + +#endif /* _LIBGETTEXT_H */ diff --git a/m4/ChangeLog b/m4/ChangeLog new file mode 100644 index 0000000..2e2bd44 --- /dev/null +++ b/m4/ChangeLog @@ -0,0 +1,10 @@ +2012-01-26 gettextize + + * gettext.m4: New file, from gettext-0.18.1. + * iconv.m4: New file, from gettext-0.18.1. + * lib-ld.m4: New file, from gettext-0.18.1. + * lib-link.m4: New file, from gettext-0.18.1. + * lib-prefix.m4: New file, from gettext-0.18.1. + * nls.m4: New file, from gettext-0.18.1. + * po.m4: New file, from gettext-0.18.1. + * progtest.m4: New file, from gettext-0.18.1. diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..32692ab --- /dev/null +++ b/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..2dbd919 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,3 @@ +# List of source files which contain translatable strings. +dvd.c +vobcopy.c diff --git a/vobcopy.c b/vobcopy.c index 9d165f6..63aa21d 100644 --- a/vobcopy.c +++ b/vobcopy.c @@ -1196,8 +1196,9 @@ next: /*for the goto - ugly, I know... */ } /* progress indicator */ tmp_i = i; - fprintf( stderr, _("%4.0fkB of %4.0fkB written\r"), + fprintf( stderr, _("%4.0fkB of %4.0fkB written"), ( tmp_i+1 )*( DVD_VIDEO_LB_LEN/1024 ), tmp_file_size/1024 ); + fprintf( stderr, "\r" ); } fprintf( stderr, _("\n")); if( !stdout_flag ) @@ -1231,8 +1232,9 @@ next: /*for the goto - ugly, I know... */ } /* progress indicator */ tmp_i = i; - fprintf( stderr, _("%4.0fkB of %4.0fkB written\r"), + fprintf( stderr, _("%4.0fkB of %4.0fkB written"), ( tmp_i+1 )*( DVD_VIDEO_LB_LEN/1024 ), tmp_file_size/1024 ); + fprintf( stderr, "\r"); } fprintf( stderr, _("\n")); if( !stdout_flag ) @@ -1356,7 +1358,8 @@ next: /*for the goto - ugly, I know... */ tmp_i = ( i-start ); percent = ( ( ( ( tmp_i+1 )*DVD_VIDEO_LB_LEN )*100 )/tmp_file_size ); - fprintf( stderr, _("\r%4.0fMB of %4.0fMB written "), + fprintf( stderr, "\r"); + fprintf( stderr, _("%4.0fMB of %4.0fMB written "), ( ( tmp_i+1 )*DVD_VIDEO_LB_LEN )/( 1024*1024 ), ( tmp_file_size+2048 )/( 1024*1024 ) ); fprintf( stderr, _("( %3.1f %% ) "), percent ); @@ -1365,7 +1368,8 @@ next: /*for the goto - ugly, I know... */ } /*this is just so that at the end it actually says 100.0% all the time... */ /*TODO: if it is correct to always assume it's 100% is a good question.... */ -/* fprintf( stderr, _("\r%4.0fMB of %4.0fMB written "), +/* fprintf( stderr, "\r"); + fprintf( stderr, _("%4.0fMB of %4.0fMB written "), ( ( tmp_i+1 )*DVD_VIDEO_LB_LEN )/( 1024*1024 ), ( tmp_file_size+2048 )/( 1024*1024 ) ); fprintf( stderr, _("( 100.0%% ) ") ); diff --git a/vobcopy.pot b/vobcopy.pot deleted file mode 100644 index 2340029..0000000 --- a/vobcopy.pot +++ /dev/null @@ -1,873 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-03-31 23:48+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: vobcopy.c:189 -#, c-format -msgid "[Error] The thing behind -a has to be a number! \n" -msgstr "" - -#: vobcopy.c:196 -#, c-format -msgid "[Hint] Um, you set angle to 0, try 1 instead ;-)\n" -msgstr "" - -#: vobcopy.c:204 -#, c-format -msgid "[Error] The thing behind -b has to be a number! \n" -msgstr "" - -#: vobcopy.c:211 vobcopy.c:234 vobcopy.c:265 vobcopy.c:287 -#, c-format -msgid "[Error] Wrong suffix behind -b, only b,k,m or g \n" -msgstr "" - -#: vobcopy.c:248 -#, c-format -msgid "[Error] The thing behind -c has to be a number! \n" -msgstr "" - -#: vobcopy.c:258 -#, c-format -msgid "[Error] The thing behind -e has to be a number! \n" -msgstr "" - -#: vobcopy.c:310 -#, c-format -msgid "[Error] Erm, the number comes behind -n ... \n" -msgstr "" - -#: vobcopy.c:313 -#, c-format -msgid "" -"[Hint] You use -i. Normally this is not necessary, vobcopy finds the input " -"dir by itself. This option is only there if vobcopy makes trouble.\n" -msgstr "" - -#: vobcopy.c:314 -#, c-format -msgid "" -"[Hint] If vobcopy makes trouble, please mail me so that I can fix this " -"(robos@muon.de). Thanks\n" -msgstr "" - -#: vobcopy.c:318 -#, c-format -msgid "" -"[Error] Please don't use -i /dev/something in this version, only the next " -"version will support this again.\n" -msgstr "" - -#: vobcopy.c:319 -#, c-format -msgid "" -"[Hint] Please use the mount point instead (/cdrom, /dvd, /mnt/dvd or " -"something)\n" -msgstr "" - -#: vobcopy.c:340 -#, c-format -msgid "[Error] The thing behind -n has to be a number! \n" -msgstr "" - -#: vobcopy.c:350 vobcopy.c:382 -#, c-format -msgid "[Hint] Erm, the number comes behind -n ... \n" -msgstr "" - -#: vobcopy.c:376 -#, c-format -msgid "[Error] Please specify output dirs in this order: -o -1 -2 -3 -4 \n" -msgstr "" - -#: vobcopy.c:410 -#, c-format -msgid "[Error] The thing behind -F has to be a number! \n" -msgstr "" - -#: vobcopy.c:416 -#, c-format -msgid "" -"[Hint] The largest value for -F is %d at the moment - used that one...\n" -msgstr "" - -#: vobcopy.c:427 -#, c-format -msgid "[Error] The thing behind -w has to be a number! \n" -msgstr "" - -#: vobcopy.c:433 -#, c-format -msgid "[Hint] Negative minutes aren't allowed - disabling watchdog.\n" -msgstr "" - -#: vobcopy.c:479 vobcopy.c:493 -#, c-format -msgid "[Error] Wrong option.\n" -msgstr "" - -#: vobcopy.c:486 -#, c-format -msgid "[Error] %s was compiled without support for long options.\n" -msgstr "" - -#: vobcopy.c:499 vobcopy.c:2022 -#, c-format -msgid "Vobcopy " -msgstr "" - -#: vobcopy.c:500 -#, c-format -msgid "" -"[Hint] All lines starting with \"libdvdread:\" are not from vobcopy but from " -"the libdvdread-library\n" -msgstr "" - -#: vobcopy.c:511 -#, c-format -msgid "" -"\n" -"[Error] Hmm, the path length of your current directory is really large " -"(>255)\n" -msgstr "" - -#: vobcopy.c:512 -#, c-format -msgid "[Hint] Change to a path with shorter path length pleeeease ;-)\n" -msgstr "" - -#: vobcopy.c:526 -#, c-format -msgid "[Hint] Quiet mode - All messages will now end up in %s\n" -msgstr "" - -#: vobcopy.c:575 -#, c-format -msgid "[Info] Uhu, super-verbose\n" -msgstr "" - -#: vobcopy.c:615 -#, c-format -msgid "[Info] The log-file is written to %s\n" -msgstr "" - -#: vobcopy.c:616 -#, c-format -msgid "" -"[Hint] Make sure that vobcopy doesn't have to ask questions (like " -"overwriting of old files), these questions end up in the log file so you " -"don't see them...\n" -msgstr "" - -#: vobcopy.c:617 -#, c-format -msgid "" -"[Hint] If you don't like that position, use -L /path/to/logfile/ instead of -" -"v -v\n" -msgstr "" - -#: vobcopy.c:633 -#, c-format -msgid "--------------------------------------------------------------------------------\n" -msgstr "" - -#: vobcopy.c:634 -#, c-format -msgid "[Info] Called: %s\n" -msgstr "" - -#: vobcopy.c:640 -#, c-format -msgid "" -"\n" -"[Error] There can be only one: either -m or -n...'\n" -msgstr "" - -#: vobcopy.c:653 -#, c-format -msgid "" -"\n" -"[Error] Bloody path to long '%s'\n" -msgstr "" - -#: vobcopy.c:665 -#, c-format -msgid "[Error] Could not get the device which belongs to the given path!\n" -msgstr "" - -#: vobcopy.c:678 -#, c-format -msgid "[Error] Could not get the device and path! Maybe not mounted the dvd?\n" -msgstr "" - -#: vobcopy.c:688 -#, c-format -msgid "" -"\n" -"[Info] Path to dvd: %s\n" -msgstr "" - -#: vobcopy.c:692 -#, c-format -msgid "" -"\n" -"[Error] Path thingy didn't work '%s'\n" -msgstr "" - -#: vobcopy.c:693 -#, c-format -msgid "[Error] Try something like -i /cdrom, /dvd or /mnt/dvd \n" -msgstr "" - -#: vobcopy.c:695 -#, c-format -msgid "" -"[Hint] By the way, you have %i cdroms|dvds mounted, that probably caused the " -"problem\n" -msgstr "" - -#: vobcopy.c:706 -#, c-format -msgid "[Info] Name of the dvd: %s\n" -msgstr "" - -#: vobcopy.c:722 -#, c-format -msgid "[Error] Can't open VMG info.\n" -msgstr "" - -#: vobcopy.c:754 -#, c-format -msgid "[Info] There are %d titles on this DVD.\n" -msgstr "" - -#: vobcopy.c:758 -#, c-format -msgid "[Error] Invalid title %d.\n" -msgstr "" - -#: vobcopy.c:769 -#, c-format -msgid "[Info] There are %i chapters on the dvd.\n" -msgstr "" - -#: vobcopy.c:770 -#, c-format -msgid "[Info] Most chapters has title %i with %d chapters.\n" -msgstr "" - -#: vobcopy.c:775 vobcopy.c:818 -#, c-format -msgid "[Info] All titles:\n" -msgstr "" - -#: vobcopy.c:780 -#, c-format -msgid "[Info] Title %i has %d chapters.\n" -msgstr "" - -#: vobcopy.c:783 -#, c-format -msgid "[Info] Title %i has %d chapter.\n" -msgstr "" - -#: vobcopy.c:793 -#, c-format -msgid "[Error] Invalid chapter %d\n" -msgstr "" - -#: vobcopy.c:807 -#, c-format -msgid "" -"\n" -"[Info] There are %d angles on this dvd.\n" -msgstr "" - -#: vobcopy.c:810 -#, c-format -msgid "[Error] Invalid angle %d\n" -msgstr "" - -#: vobcopy.c:823 -#, c-format -msgid "[Info] Title %i has %d angles.\n" -msgstr "" - -#: vobcopy.c:826 -#, c-format -msgid "[Info] Title %i has %d angle.\n" -msgstr "" - -#: vobcopy.c:844 -#, c-format -msgid "" -"\n" -"[Error] Something went wrong during the size detection of the" -msgstr "" - -#: vobcopy.c:845 -#, c-format -msgid "" -"\n" -"[Error] vobs, size check at the end won't work (probably), but I continue " -"anyway\n" -"\n" -msgstr "" - -#: vobcopy.c:874 -#, c-format -msgid "" -"\n" -"[Info] Setting watchdog timer to %d minutes\n" -msgstr "" - -#: vobcopy.c:884 vobcopy.c:1364 vobcopy.c:1444 vobcopy.c:1514 -#, c-format -msgid "" -"\n" -"[Info] DVD-name: %s\n" -msgstr "" - -#: vobcopy.c:885 vobcopy.c:1445 -#, c-format -msgid "[Info] Disk free: %.0f MB\n" -msgstr "" - -#: vobcopy.c:886 vobcopy.c:1447 -#, c-format -msgid "[Info] Vobs size: %.0f MB\n" -msgstr "" - -#: vobcopy.c:911 -#, c-format -msgid "[Info] Writing files to this dir: %s\n" -msgstr "" - -#: vobcopy.c:924 -#, c-format -msgid "" -"[Error] Hmm, weird, the dir video_ts|VIDEO_TS on the dvd couldn't be opened\n" -msgstr "" - -#: vobcopy.c:925 -#, c-format -msgid "[Error] The dir to be opened was: %s\n" -msgstr "" - -#: vobcopy.c:926 -#, c-format -msgid "[Hint] Please mail me what your vobcopy call plus -v -v spits out\n" -msgstr "" - -#: vobcopy.c:1001 -#, c-format -msgid "" -"\n" -"[Hint] File on dvd ends in \";?\" (%s)\n" -msgstr "" - -#: vobcopy.c:1009 -#, c-format -msgid "[Info] Writing to %s \n" -msgstr "" - -#: vobcopy.c:1014 -#, c-format -msgid "" -"\n" -"[Error] File '%s' already exists, [o]verwrite, [s]kip or [q]uit? " -msgstr "" - -#: vobcopy.c:1026 vobcopy.c:1071 vobcopy.c:1097 vobcopy.c:1610 vobcopy.c:1661 -#: vobcopy.c:1677 vobcopy.c:1707 -#, c-format -msgid "" -"\n" -"[Error] Error opening file %s\n" -msgstr "" - -#: vobcopy.c:1027 vobcopy.c:1072 vobcopy.c:1098 vobcopy.c:1141 vobcopy.c:1176 -#: vobcopy.c:1611 vobcopy.c:1750 -#, c-format -msgid "[Error] Error: %s\n" -msgstr "" - -#: vobcopy.c:1048 -#, c-format -msgid "" -"\n" -"[Hint] Please choose [o]verwrite, [s]kip, or [q]uit the next time ;-)\n" -msgstr "" - -#: vobcopy.c:1059 vobcopy.c:1599 -#, c-format -msgid "" -"\n" -"[Error] File '%s' already exists, [o]verwrite or [q]uit? \n" -msgstr "" - -#: vobcopy.c:1088 -#, c-format -msgid "" -"\n" -"[Hint] Please choose [o]verwrite or [q]uit the next time ;-)\n" -msgstr "" - -#: vobcopy.c:1140 vobcopy.c:1175 vobcopy.c:1287 -#, c-format -msgid "" -"\n" -"[Error] Error writing to %s \n" -msgstr "" - -#: vobcopy.c:1146 vobcopy.c:1181 -#, c-format -msgid "%4.0fkB of %4.0fkB written\r" -msgstr "" - -#: vobcopy.c:1149 vobcopy.c:1184 vobcopy.c:1317 vobcopy.c:1720 -#, c-format -msgid "\n" -msgstr "" - -#: vobcopy.c:1154 vobcopy.c:1189 vobcopy.c:1322 vobcopy.c:1773 -#, c-format -msgid "" -"\n" -"[Error] error writing to %s \n" -msgstr "" - -#: vobcopy.c:1155 vobcopy.c:1190 vobcopy.c:1323 vobcopy.c:1774 vobcopy.c:2144 -#, c-format -msgid "[Error] error: %s\n" -msgstr "" - -#: vobcopy.c:1237 -#, c-format -msgid "[Info] Can't stat() %s.\n" -msgstr "" - -#: vobcopy.c:1243 -#, c-format -msgid "[Info] Vob %d %d (%s) has a size of %lli\n" -msgstr "" - -#: vobcopy.c:1257 -#, c-format -msgid "[Info] Start of %s at %d blocks \n" -msgstr "" - -#: vobcopy.c:1279 -#, c-format -msgid "[Warn] Had to skip %d blocks! " -msgstr "" - -#: vobcopy.c:1288 -#, c-format -msgid "[Error] Error: %s, errno: %d \n" -msgstr "" - -#: vobcopy.c:1301 vobcopy.c:1311 -#, c-format -msgid "%4.0fMB of %4.0fMB written " -msgstr "" - -#: vobcopy.c:1304 -#, c-format -msgid "( %3.1f %% ) \r" -msgstr "" - -#: vobcopy.c:1314 -#, c-format -msgid "( 100.0%% ) \r" -msgstr "" - -#: vobcopy.c:1340 -#, c-format -msgid "" -"[Error] Not enough free space on the destination dir. Please choose another " -"one or -f\n" -msgstr "" - -#: vobcopy.c:1341 -#, c-format -msgid "[Error] or dirs behind -1, -2 ... are NOT allowed with -m!\n" -msgstr "" - -#: vobcopy.c:1356 -#, c-format -msgid "[Info] Using Title: %i\n" -msgstr "" - -#: vobcopy.c:1357 -#, c-format -msgid "[Info] Title has %d chapters and %d angles\n" -msgstr "" - -#: vobcopy.c:1358 -#, c-format -msgid "[Info] Using Chapter: %i\n" -msgstr "" - -#: vobcopy.c:1359 -#, c-format -msgid "[Info] Using Angle: %i\n" -msgstr "" - -#: vobcopy.c:1365 -#, c-format -msgid "[Info] Disk free: %f MB\n" -msgstr "" - -#: vobcopy.c:1366 -#, c-format -msgid "[Info] Vobs size: %f MB\n" -msgstr "" - -#: vobcopy.c:1381 -#, c-format -msgid "[Error] Can't open the title %d info file.\n" -msgstr "" - -#: vobcopy.c:1408 -#, c-format -msgid "[Error] Can't open title VOBS (VTS_%02d_1.VOB).\n" -msgstr "" - -#: vobcopy.c:1425 -#, c-format -msgid "[Info] Vob_size was 0\n" -msgstr "" - -#: vobcopy.c:1432 -#, c-format -msgid "" -"\n" -"[Info] Difference between vobsize read from cd and size returned from " -"libdvdread:\n" -msgstr "" - -#: vobcopy.c:1437 -#, c-format -msgid "" -"[Info] Vob_size (stat) = %lu\n" -"[Info] libdvdsize = %lu\n" -msgstr "" - -#: vobcopy.c:1461 -#, c-format -msgid "" -"\n" -"[Info] Disk free: %.0f MB" -msgstr "" - -#: vobcopy.c:1462 -#, c-format -msgid "" -"\n" -"[Info] Vobs size: %.0f MB" -msgstr "" - -#: vobcopy.c:1464 -#, c-format -msgid "" -"\n" -"[Error] Hmm, better change to a dir with enough space left or call with -f " -"(force) \n" -msgstr "" - -#: vobcopy.c:1468 vobcopy.c:1469 -#, c-format -msgid "[Error] Hmm, statfs (statvfs) seems not to work on that directory. \n" -msgstr "" - -#: vobcopy.c:1470 -#, c-format -msgid "" -"[Hint] Nevertheless, do you want vobcopy to continue [y] or do you want to " -"check for \n" -msgstr "" - -#: vobcopy.c:1471 -#, c-format -msgid "[Hint] enough space first [q]?\n" -msgstr "" - -#: vobcopy.c:1481 -#, c-format -msgid "[Info] y pressed - force write\n" -msgstr "" - -#: vobcopy.c:1487 -#, c-format -msgid "[Info] n/q pressed\n" -msgstr "" - -#: vobcopy.c:1493 -#, c-format -msgid "[Error] Please choose [y] to continue or [n] to quit\n" -msgstr "" - -#: vobcopy.c:1518 -#, c-format -msgid "" -"\n" -"[Info] Your-name for the dvd: %s\n" -msgstr "" - -#: vobcopy.c:1534 -#, c-format -msgid "[Info] Free space for -o dir: %.0f\n" -msgstr "" - -#: vobcopy.c:1563 -#, c-format -msgid "[Info] Free space for -%i dir: %.0f\n" -msgstr "" - -#: vobcopy.c:1579 -#, c-format -msgid "[Info] Taken max_filesize_in_blocks(2GB version): %.0f\n" -msgstr "" - -#: vobcopy.c:1587 -#, c-format -msgid "[Info] Taken max_filesize_in_blocks(lfs version): %.0f\n" -msgstr "" - -#: vobcopy.c:1627 -#, c-format -msgid "" -"\n" -"[Hint] please choose [o]verwrite or [q]uit the next time ;-)\n" -msgstr "" - -#: vobcopy.c:1643 -#, c-format -msgid "[Error] Seems your platter is full...\n" -msgstr "" - -#: vobcopy.c:1646 -#, c-format -msgid "" -"\n" -"[Error] File '%s' already exists, [o]verwrite, [a]ppend, [q]uit? \n" -msgstr "" - -#: vobcopy.c:1683 -#, c-format -msgid "[Info] User chose append\n" -msgstr "" - -#: vobcopy.c:1694 -#, c-format -msgid "" -"\n" -"[Hint] Please choose [o]verwrite, [a]ppend, [q]uit the next time ;-)\n" -msgstr "" - -#: vobcopy.c:1746 -#, c-format -msgid "" -"\n" -"[Error] Write() error\n" -msgstr "" - -#: vobcopy.c:1762 -#, c-format -msgid "%4.0fMB of %4.0fMB written (%.0f %%)\r" -msgstr "" - -#: vobcopy.c:1778 -#, c-format -msgid "%4.0fMB of %4.0fMB written ( 100.0 %%)\r" -msgstr "" - -#: vobcopy.c:1786 -#, c-format -msgid "[Info] max_filesize_in_blocks %8.0f \n" -msgstr "" - -#: vobcopy.c:1787 -#, c-format -msgid "[Info] offset at the end %8.0f \n" -msgstr "" - -#: vobcopy.c:1788 -#, c-format -msgid "[Info] file_size_in_blocks %8.0f \n" -msgstr "" - -#: vobcopy.c:1803 -#, c-format -msgid "" -"\n" -"[Error] File size (%.0f) of %s differs largely from that on dvd, therefore " -"keeps it's .partial\n" -msgstr "" - -#: vobcopy.c:1827 -#, c-format -msgid "[Info] Single file size (of copied file %s ) %.0f\n" -msgstr "" - -#: vobcopy.c:1828 -#, c-format -msgid "[Info] Cumulated size %.0f\n" -msgstr "" - -#: vobcopy.c:1832 -#, c-format -msgid "[Info] Successfully copied file %s\n" -msgstr "" - -#: vobcopy.c:1839 -#, c-format -msgid "[Info] # of separate files: %i\n" -msgstr "" - -#: vobcopy.c:1849 -#, c-format -msgid "" -"\n" -"[Info] Copying finished! Let's see if the sizes match (roughly)\n" -msgstr "" - -#: vobcopy.c:1850 -#, c-format -msgid "[Info] Combined size of title-vobs: %.0f (%.0f MB)\n" -msgstr "" - -#: vobcopy.c:1851 -#, c-format -msgid "[Info] Copied size (size on disk): %.0f (%.0f MB)\n" -msgstr "" - -#: vobcopy.c:1855 -#, c-format -msgid "[Error] Hmm, the sizes differ by more than %d\n" -msgstr "" - -#: vobcopy.c:1856 -#, c-format -msgid "[Hint] Take a look with MPlayer if the output is ok\n" -msgstr "" - -#: vobcopy.c:1860 -#, c-format -msgid "[Info] Everything seems to be fine, the sizes match pretty good ;-)\n" -msgstr "" - -#: vobcopy.c:1861 -#, c-format -msgid "[Hint] Have a lot of fun!\n" -msgstr "" - -#: vobcopy.c:1910 vobcopy.c:1954 -#, c-format -msgid "[Info] Used the linux statfs\n" -msgstr "" - -#: vobcopy.c:1914 vobcopy.c:1958 -#, c-format -msgid "[Info] Used statvfs\n" -msgstr "" - -#: vobcopy.c:1928 -#, c-format -msgid "[Info] In freespace_getter:for %s : %.0f free\n" -msgstr "" - -#: vobcopy.c:1929 -#, c-format -msgid "[Info] In freespace_getter:bavail %ld * bsize %ld = above\n" -msgstr "" - -#: vobcopy.c:1972 -#, c-format -msgid "[Info] In usedspace_getter:for %s : %.0f used\n" -msgstr "" - -#: vobcopy.c:1973 -#, c-format -msgid "[Info] In usedspace_getter:part1 %ld, part2 %ld\n" -msgstr "" - -#: vobcopy.c:2012 -#, c-format -msgid "" -"\n" -"[Info] Outputting to %s" -msgstr "" - -#: vobcopy.c:2044 -#, c-format -msgid "[-l (large-file support for files > 2GB)] \n" -msgstr "" - -#: vobcopy.c:2075 -#, c-format -msgid "[Error] Could not remove old filename: %s \n" -msgstr "" - -#: vobcopy.c:2076 -#, c-format -msgid "[Hint] This: %s is a hardlink to %s. Dunno what to do... \n" -msgstr "" - -#: vobcopy.c:2085 -#, c-format -msgid "[Error] File %s already exists! Gonna name the new one %s.dupe \n" -msgstr "" - -#: vobcopy.c:2117 -#, c-format -msgid "[Error] The directory %s already exists!\n" -msgstr "" - -#: vobcopy.c:2118 -#, c-format -msgid "[Hint] You can either [c]ontinue writing to it or you can [q]uit: " -msgstr "" - -#: vobcopy.c:2136 -#, c-format -msgid "" -"\n" -"[Hint] please choose [c]ontinue or [q]uit the next time ;-)\n" -msgstr "" - -#: vobcopy.c:2143 -#, c-format -msgid "" -"[Error] Creating of directory %s\n" -" failed! \n" -msgstr "" - -#: vobcopy.c:2168 -#, c-format -msgid "" -"\n" -"[Info] Timer expired - shooting myself in the head.\n" -msgstr "" - -#: vobcopy.c:2174 -#, c-format -msgid "" -"\n" -"[Info] Terminate signal received, exiting.\n" -msgstr "" debian/patches/0003-man-dash-hyphen-slash-en.patch0000664000000000000000000001463112045753132016720 0ustar From: "Barak A. Pearlmutter" Date: Sun, 1 Jan 2012 19:11:10 +0100 Subject: man dash hyphen slash en silence lintian warning about hyphens vs dashes in English man page --- vobcopy.1 | 82 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/vobcopy.1 b/vobcopy.1 index e3774ad..6f34152 100644 --- a/vobcopy.1 +++ b/vobcopy.1 @@ -5,31 +5,31 @@ .SH NAME vobcopy \- copy (rip) files from a dvd to the harddisk .SH SYNOPSIS -.B vobcopy [-b +.B vobcopy [\-b .I size[bkmg] -.B ] [-e +.B ] [\-e .I size[bkmg] -.B ] [-f] [-F +.B ] [\-f] [\-F .I fast_factor -.B ] [-h] [-i +.B ] [\-h] [\-i .I input-dir -.B ] [-l] [-m] [-M][-n +.B ] [\-l] [\-m] [\-M][\-n .I title-number -.B ] [-o +.B ] [\-o .I output-dir -.B ] [-q] [-O +.B ] [\-q] [\-O .I single_file(s)_to_rip -.B ] [-t +.B ] [\-t .I name -.B ] [-v [-v]] [-x] [-I] [-V] [-L +.B ] [\-v [\-v]] [\-x] [\-I] [\-V] [\-L .I logfile-path -.B ] [-1 +.B ] [\-1 .I aux_output_dir1 -.B ] [-2 +.B ] [\-2 .I aux_output_dir2 -.B ] [-3 +.B ] [\-3 .I aux_output_dir3 -.B ] [-4 +.B ] [\-4 .I aux_output_dir4 .B ] .SH DESCRIPTION @@ -56,54 +56,54 @@ backups of all your DVDs... without any options will copy the title with the most chapters into files of 2GB size into the current working directory. .SH OPTIONS -.IP "-b, --begin SIZE[bkmg]" -begins to copy from the specified offset-size. Modifiers like b for 512-bytes, k for kilo-bytes, m for mega- and g for giga-bytes can be appended to the number. Example: vobcopy -b 500m will start to copy from 500MB onward till the end. -.IP "-e, --end SIZE[bkmg]" -similar to -b, this options lets you specify some size to stop before the end. -.IP "-f, --force" +.IP "\-b, \-\-begin SIZE[bkmg]" +begins to copy from the specified offset-size. Modifiers like b for 512-bytes, k for kilo-bytes, m for mega- and g for giga-bytes can be appended to the number. Example: vobcopy \-b 500m will start to copy from 500MB onward till the end. +.IP "\-e, \-\-end SIZE[bkmg]" +similar to \-b, this options lets you specify some size to stop before the end. +.IP "\-f, \-\-force" force the output to the specified directory even if vobcopy thinks there is not enough free space -.IP "-F, --fast fast_factor" +.IP "\-F, \-\-fast fast_factor" speed up the copying (experimental). fast_factor is in the range 1 to 64 -.IP "-h, --help" +.IP "\-h, \-\-help" print the command line options available -.IP "-i, --input-dir INPUT-DIR" +.IP "\-i, \-\-input\-dir INPUT-DIR" provide vobcopy with the path to the mounted dvd drive -.IP "-l, --large-file" +.IP "\-l, \-\-large\-file" write data into one file (needs large file support (LFS)) -.IP "-M, --longest" +.IP "\-M, \-\-longest" choose the title with the longest playing time. With some DVDs this gets the main title better than the most chapter method, with others it's worse. -.IP "-m, --mirror" +.IP "\-m, \-\-mirror" mirrors the whole dvd to harddisk. It will create a directory named after the dvd and copy the ifo, bup and vob files there. The title-vobs are decrypted during this. -.IP "-n, --title-number TITLE-NUMBER" +.IP "\-n, \-\-title\-number TITLE-NUMBER" specify which title vobcopy shall copy (default is title with most chapters). On the dvd, vts_01_x.vob specify the first title (mostly this is the main feature). -.IP "-o, --output-dir OUTPUT-DIR" -specify the output-directory of the data. "stdout" or "-" redirect to stdout. Useful for pipeing it to /dev/null ;-) If you forget to pipe it to some place, your terminal will get garbled, so remember that typing "reset" and then Enter will rescue you. -.IP "-q, --quiet" +.IP "\-o, \-\-output\-dir OUTPUT-DIR" +specify the output-directory of the data. "stdout" or "\-" redirect to stdout. Useful for pipeing it to /dev/null ;-) If you forget to pipe it to some place, your terminal will get garbled, so remember that typing "reset" and then Enter will rescue you. +.IP "\-q, \-\-quiet" all info- and error-messages of vobcopy will end up in the current directory in vobcopy.bla instead of stderr -.IP "-O, --onefile single_file(s)_to_rip" +.IP "\-O, \-\-onefile single_file(s)_to_rip" specify which single file(s) to rip. Parts of names can be given and all files which include the part will be copied. Files can be listed with comma -separation. Example: -O video_ts.vob,bup will copy the single file video_ts.vob and all files containing bup -.IP "-t, --name NAME" -you can give the file a name if you don't like the one from dvd. -t hallo will result in hallo.vob. (stdout or "-" are deprecated now) +separation. Example: \-O video_ts.vob,bup will copy the single file video_ts.vob and all files containing bup +.IP "\-t, \-\-name NAME" +you can give the file a name if you don't like the one from dvd. \-t hallo will result in hallo.vob. (stdout or "\-" are deprecated now) If you want to give it names like "Huh I like this movie", do it in quotation marks. -.IP "-v, --verbose" +.IP "\-v, \-\-verbose" prints more information about whats going on (more verbose). -.IP "-v -v" +.IP "\-v \-v" prints the information given on command line into a log-file in the current directory for inclusion into a bugreport. -.IP "-x" +.IP "\-x" overwrite all existing files without further questions. -.IP "-L LOGFILE-PATH" +.IP "\-L LOGFILE-PATH" tells vobcopy where to put the logfile instead of the default. -.IP "-I, --info" +.IP "\-I, \-\-info" prints information about the titles, chapters and angles on the dvd. -.IP "-V, --version" +.IP "\-V, \-\-version" prints version number. -.IP "-1, --1st_alt_output_dir AUXILIARY-OUTPUT-DIR1" -if the data doesn't fit on the first output-directory (specified behind -o) -writing will continue here (and after -2 there and -3 and -4) -> the files will be split according to the remaining free space (try specifying the path _directly_ behind -1, _no_ space in between if you have troubles, this might be even necessary at -o...) +.IP "\-1, \-\-1st_alt_output_dir AUXILIARY-OUTPUT-DIR1" +if the data doesn't fit on the first output-directory (specified behind \-o) +writing will continue here (and after \-2 there and \-3 and \-4) -> the files will be split according to the remaining free space (try specifying the path _directly_ behind \-1, _no_ space in between if you have troubles, this might be even necessary at \-o...) .SH BUGS Vobcopy is still under development. So expect some. There *might* be problems for users who's system is not large-file ready. If so, please get back to me. debian/patches/0009-vobcopy.h-xMNTINFO.patch0000664000000000000000000000140412215677322015443 0ustar From: "Barak A. Pearlmutter" Date: Mon, 16 Sep 2013 22:52:11 +0100 Subject: vobcopy.h xMNTINFO Fix the autotool-ification to work on kfreebsd, per http://bugs.debian.org/697016 by accepting the patch therein. Thanks to: Petr Salinger --- vobcopy.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/vobcopy.h b/vobcopy.h index 33cdf52..1da5ce4 100644 --- a/vobcopy.h +++ b/vobcopy.h @@ -124,16 +124,8 @@ typedef enum { FALSE=0, TRUE=1 } bool; #ifdef HAVE_GETMNTINFO #define USE_GETMNTINFO -#endif - -#ifdef USE_GETMNTINFO -#ifdef USE_STATFS_FOR_DEV #define GETMNTINFO_USES_STATFS #endif -#ifdef USE_STATVFS_FOR_DEV -#define GETMNTINFO_USES_STATVFS -#endif -#endif #include debian/patches/0006-autoheader.patch0000664000000000000000000002500012045753132014343 0ustar From: "Barak A. Pearlmutter" Date: Thu, 26 Jan 2012 10:24:25 +0000 Subject: autoheader engage autoheader, and let it deal with largefile issues --- Makefile.am | 2 +- configure.ac | 27 ++++++++++++- vobcopy.c | 30 ++++---------- vobcopy.h | 128 ++++++++++++++++++++++++++++++++-------------------------- 4 files changed, 104 insertions(+), 83 deletions(-) diff --git a/Makefile.am b/Makefile.am index f601572..d5b1296 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ bin_PROGRAMS = vobcopy vobcopy_SOURCES = dvd.c vobcopy.c dvd.h vobcopy.h -AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE +AM_CPPFLAGS = -Wall dist_man_MANS = vobcopy.1 man1dedir = $(mandir)/de/man1 diff --git a/configure.ac b/configure.ac index fb85ff9..8aebe46 100644 --- a/configure.ac +++ b/configure.ac @@ -1,12 +1,37 @@ +# Process this file with autoconf to produce a configure script. + +# header AC_PREREQ([2.67]) -AC_INIT([vobcopy],[1.2.0],[Robos ]) +AC_INIT([vobcopy],[1.2.0],[Robos ],[vobcopy],[http://vobcopy.org]) AC_CONFIG_SRCDIR([vobcopy.c]) +AC_CONFIG_HEADERS([config.h]) +# Enable automake AM_INIT_AUTOMAKE([foreign]) +# Checks for programs. AC_PROG_CC +AC_PROG_LN_S +# Checks for libraries. AC_CHECK_LIB([dvdread], [DVDOpen]) +# Checks for header files. +AC_CHECK_HEADERS([fcntl.h libintl.h locale.h mntent.h stdint.h stdlib.h string.h sys/ioctl.h sys/mount.h sys/param.h sys/statfs.h sys/statvfs.h sys/vfs.h termios.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_TYPE_OFF_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T + +# Checks for library functions. +AC_FUNC_FSEEKO +AC_SYS_LARGEFILE +AC_FUNC_GETMNTENT +AC_FUNC_MALLOC +AC_CHECK_FUNCS([alarm fdatasync getcwd getmntent getmntinfo memset mkdir setlocale strcasecmp strerror strpbrk strstr]) + +# trailer AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/vobcopy.c b/vobcopy.c index 03a2419..9d165f6 100644 --- a/vobcopy.c +++ b/vobcopy.c @@ -322,13 +322,11 @@ and potentially fatal." - Thanks Leigh!*/ provided_input_dir_flag = TRUE; break; -#if defined( HAS_LARGEFILE ) || defined( MAC_LARGEFILE ) case'l': /*large file output*/ max_filesize_in_blocks = 8388608; /*16 GB /2048 (block) */ /* 2^63 / 2048 (not exactly) */ large_file_flag = TRUE; break; -#endif case'm':/*mirrors the dvd to harddrive completly*/ mirror_flag = TRUE; @@ -1292,7 +1290,9 @@ next: /*for the goto - ugly, I know... */ culm_single_vob_size += buf.st_size; if( verbosity_level > 1 ) - fprintf( stderr, _("[Info] Vob %d %d (%s) has a size of %lli\n"), title_nr, subvob, input_file, buf.st_size ); + fprintf( stderr, + _("[Info] Vob %d %d (%s) has a size of %llu\n"), + title_nr, subvob, input_file, (long long unsigned)buf.st_size ); } start = ( culm_single_vob_size / DVD_VIDEO_LB_LEN ); @@ -1692,11 +1692,7 @@ The man replies, "I was talking to the sheep." strcat( name, ".partial" ); -#if defined( HAS_LARGEFILE ) - if( open( name, O_RDONLY|O_LARGEFILE ) >= 0 ) -#else if( open( name, O_RDONLY ) >= 0 ) -#endif { if ( get_free_space( name, verbosity_level ) < 2097152 ) /* it might come here when the platter is full after a -f */ @@ -1719,11 +1715,7 @@ The man replies, "I was talking to the sheep." } if( op == 'o' || op == 'x' ) { -#if defined( HAS_LARGEFILE ) - if( ( streamout = open( name, O_WRONLY | O_TRUNC | O_LARGEFILE ) ) < 0 ) -#else if( ( streamout = open( name, O_WRONLY | O_TRUNC ) ) < 0 ) -#endif { fprintf( stderr, _("\n[Error] Error opening file %s\n"), name ); exit ( 1 ); @@ -1739,11 +1731,7 @@ The man replies, "I was talking to the sheep." } else if( op == 'a' ) { -#if defined( HAS_LARGEFILE ) - if( ( streamout = open( name, O_WRONLY | O_APPEND | O_LARGEFILE ) ) < 0 ) -#else if( ( streamout = open( name, O_WRONLY | O_APPEND ) ) < 0 ) -#endif { fprintf( stderr, _("\n[Error] Error opening file %s\n"), name ); exit ( 1 ); @@ -1769,11 +1757,7 @@ The man replies, "I was talking to the sheep." else { /*assign the stream */ -#if defined( HAS_LARGEFILE ) - if( ( streamout = open( name, O_WRONLY | O_CREAT | O_LARGEFILE, 0644 ) ) < 0 ) -#else if( ( streamout = open( name, O_WRONLY | O_CREAT, 0644 ) ) < 0 ) -#endif { fprintf( stderr, _("\n[Error] Error opening file %s\n"), name ); exit ( 1 ); @@ -1825,7 +1809,10 @@ The man replies, "I was talking to the sheep." } if( verbosity_level >= 1 && skipped_blocks > 0 ) - fprintf( stderr, _("[Warn] Had to skip (couldn't read) %d blocks (before block %d)! \n "), skipped_blocks, offset ); + fprintf( stderr, + _("[Warn] Had to skip (couldn't read) %d blocks (before block %llu)! \n "), + skipped_blocks, + (long long unsigned)offset ); /*TODO: this skipping here writes too few bytes to the output */ @@ -2096,10 +2083,7 @@ void usage( char *program_name ) fprintf( stderr, _("[-w ]\n" ) ); fprintf( stderr, _("[-x (overwrite all)]\n" ) ); fprintf( stderr, _("[-F ]\n") ); - -#if defined( HAS_LARGEFILE ) || defined ( MAC_LARGEFILE ) fprintf( stderr, _("[-l (large-file support for files > 2GB)] \n") ); -#endif exit( 1 ); } diff --git a/vobcopy.h b/vobcopy.h index aed8770..76958e6 100644 --- a/vobcopy.h +++ b/vobcopy.h @@ -11,23 +11,52 @@ #define MAX_STRING 81 #define MAX_DIFFER 2000 +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include #include + +#ifdef HAVE_STDLIB_H #include +#endif + +#ifdef HAVE_STRINGS_H +#include +#endif + #include #include + +#ifdef HAVE_SYS_TYPES_H #include +#endif + +#ifdef HAVE_SYS_IOCTL_H #include +#endif + +#ifdef HAVE_SYS_STAT_H #include +#endif + #include + +#ifdef HAVE_UNISTD_H #include +#endif + #include /*for readdir*/ #include #include #include -#include + +#ifdef HAVE_TERMIOS_H #include +#endif -#if ( defined( __unix__ ) || defined( unix )) && !defined( USG ) +#ifdef HAVE_SYS_PARAM_H #include #endif @@ -36,34 +65,44 @@ #include #endif -/* FreeBSD 4.10 and OpenBSD 3.2 has not */ -/* by some bugreport:*/ -#if !( defined( BSD ) && ( BSD >= 199306 ) ) && !defined( sun ) || defined(OpenBSD) +#ifdef HAVE_STDINT_H #include #endif +#ifdef HAVE_STDLIB_H +#include +#endif + +#ifdef HAVE_SYS_STATVFS_H +#include +#endif + +#ifdef HAVE_SYS_MOUNT_H +#include +#endif + +#ifdef HAVE_GETMNTINFO +#define USE_GETMNTINFO +#endif + +#ifndef HAVE_STDBOOL_H +typedef enum { FALSE=0, TRUE=1 } bool; +#else +#include +#define TRUE true +#define FALSE false +#endif + /* I'm trying to have all supported OSes definitions clearly separated here */ /* The appearance could probably be made more readable -- lb */ /* ////////// Solaris ////////// */ #if defined( __sun ) -#include #include -#include - -typedef enum { FALSE=0, TRUE=1 } bool; - -# if ( _FILE_OFFSET_BITS == 64 ) -#define HAS_LARGEFILE 1 -# endif - -#define off_t off64_t #else /* Solaris */ -/*#define off_t __off64_t THIS HERE BREAKS OSX 10.5 */ - /* ////////// *BSD ////////// */ #if ( defined( BSD ) && ( BSD >= 199306 ) ) @@ -75,16 +114,17 @@ typedef enum { FALSE=0, TRUE=1 } bool; #if defined(__FreeBSD__) #define USE_STATFS_FOR_DEV -#include -#else -#include #endif -# if defined(NetBSD) || defined (OpenBSD) +#ifdef HAVE_SYS_STATVFS_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H #include +#endif -#define USE_GETMNTINFO +# if defined(NetBSD) || defined (OpenBSD) # if ( __NetBSD_Version__ < 200040000 ) @@ -107,44 +147,29 @@ typedef enum { FALSE=0, TRUE=1 } bool; #include #endif -# if !defined(OpenBSD) -#define HAS_LARGEFILE 1 -#endif - -typedef enum { FALSE=0, TRUE=1 } bool; - #else /* *BSD */ /* ////////// Darwin / OS X ////////// */ -#if defined ( __APPLE__ ) +#if defined ( __APPLE__ ) /* ////////// Darwin ////////// */ # if defined( __GNUC__ ) -#include -#include - #include /*can't be both! Should be STATVFS IMHO */ -/*#define USE_STATFS 1 -#define USE_STATVFS 1 -#define HAS_LARGEFILE 1 */ +/*#define USE_STATFS 1 +#define USE_STATVFS 1 */ #define GETMNTINFO_USES_STATFS 1 #define USE_GETMNTINFO 1 -#define FALSE 0 -#define TRUE 1 -typedef int bool; - # endif /* ////////// OS X ////////// */ # if defined( __MACH__ ) /* mac osx 10.5 does not seem to like this one here */ -/*#include -#include +/*#include +#include #include */ -#define MAC_LARGEFILE 1 # endif @@ -159,9 +184,6 @@ typedef int bool; #define USE_STATFS 1 #define HAVE_GETOPT_LONG 1 -#define HAS_LARGEFILE 1 - - typedef enum { FALSE=0, TRUE=1 } bool; #elif defined( __GLIBC__ ) @@ -170,32 +192,22 @@ typedef int bool; #include #define HAVE_GETOPT_LONG 1 -#define HAS_LARGEFILE 1 - - typedef enum { FALSE=0, TRUE=1 } bool; #else -/* ////////// For other cases ////////// */ - -typedef enum { FALSE=0, TRUE=1 } bool; - -#if defined( __USE_FILE_OFFSET64 ) -# define HAS_LARGEFILE 1 #endif #endif #endif #endif -#endif /* OS/2 */ -#if defined(__EMX__) -#define __off64_t __int64_t +#if defined(__EMX__) +#define __off64_t __int64_t #include #include #define USE_STATFS 1 -#endif +#endif debian/source/0000775000000000000000000000000011700117655010473 5ustar debian/source/format0000664000000000000000000000001411700117655011701 0ustar 3.0 (quilt) debian/control0000664000000000000000000000151612046240333010573 0ustar Source: vobcopy Section: utils Priority: optional Maintainer: Stephen Birch Uploaders: Barak A. Pearlmutter Build-Depends: debhelper (>= 9), libdvdread-dev, dh-autoreconf, autopoint Standards-Version: 3.9.4 Homepage: http://vobcopy.org Vcs-Git: git://git.debian.org/git/collab-maint/vobcopy.git Vcs-Browser: http://git.debian.org/?p=collab-maint/vobcopy.git Package: vobcopy Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Tool to copy DVD VOBs to hard disk Copies DVD .vob files to harddisk and merges them into file(s) with the name extracted from the DVD. Checks for sufficient free space on the destination drive and compares the copied size to the size on DVD in case something went wrong. . Can also mirror the DVD movie content and copy single specified files. debian/changelog0000664000000000000000000001223712215677322011056 0ustar vobcopy (1.2.0-5) unstable; urgency=low * kfreebsd patch (closes: #697016) -- Barak A. Pearlmutter Mon, 16 Sep 2013 22:55:50 +0100 vobcopy (1.2.0-4) unstable; urgency=low * add build dependency on autopoint -- Barak A. Pearlmutter Tue, 06 Nov 2012 16:55:37 +0000 vobcopy (1.2.0-3) unstable; urgency=low * Further immerse package in the ocean of autotools cruft (patches) -- Barak A. Pearlmutter Thu, 26 Jan 2012 12:27:41 +0000 vobcopy (1.2.0-2) unstable; urgency=low * Switch to autotools build system (patch) -- Barak A. Pearlmutter Tue, 17 Jan 2012 11:54:35 +0000 vobcopy (1.2.0-1) unstable; urgency=low * New upstream release (closes: #627915) - includes open O_CREAT permission bits patch (closes: #511978) - now checks for read failure, in loop (closes: #471047) - includes GNU/kFreeBSD __GLIBC__ patch (closes: #465966) * Update debian packaging * Quilt patches - Hurd FTBS patch (closes: #641283), thanks to Svante Signell - Silence scary incorrect pointer type gcc warning - Man page slash dash hash mash, for the lintian -- Barak A. Pearlmutter Sun, 01 Jan 2012 19:26:22 +0100 vobcopy (1.1.0-1) unstable; urgency=low * New upstream release - New symlink attack solution by upstream to solve CVE-2007-5718 The upstream solution creates temp files in the current working directory - MacOSX (at least 10.5) compiles again - Use safe string copy routines to avoid buffer overflow exploits - Other small fixes by upstream -- Stephen Birch Wed, 23 Jan 2008 12:00:14 +0000 vobcopy (1.0.2-1) unstable; urgency=low * Fix possible symlink attack caused by insecure temporary file handling by using mkstemp (CVE-2007-5718; closes: #448319). * Bump standards Version to 3.7.3, no changes needed * Build dependency from "libdvdread3-dev | libdvdread2-dev" to libdvdread-dev * Fix man page typo s/pipeing/piping/ (closes: #367142) * Add upstream TODO file to docs * Add upstream Release-Notes to docs * Change to debhelper compatibility level 5 * Tidy up rules file * New upstream release (closes: #381553, #449534) - wrong device name from /etc/fstab instead of /etc/mtab (closes: #345324) - -L option documented in man page (closes: #451144) - -F produces files that are too big (closes: #349682) - inconsistent regarding default of -n (closes: #341742) - checks for free space but it doesn't warn (closes: #341734) - vobcopy: German manual page corrections (closes: #345326) - -m and -n mutually exclusive (closes: #341735) - Off by one error fixed (closes: #451145) - Fix error when filenames end with ;? (closes: #319721) -- Stephen Birch Tue, 14 Dec 2007 16:23:25 +0000 vobcopy (0.5.14-2) unstable; urgency=low * Put libdvdread3 ahead of libdvdread2 in control file * Change from native to non native Debian package -- Stephen Birch Sat, 27 Nov 2004 15:04:21 +0000 vobcopy (0.5.14-1) unstable; urgency=low * New upstream release -- Stephen Birch Thu, 18 Nov 2004 11:18:55 +0000 vobcopy (0.5.12-3) unstable; urgency=low * Set up vobcopy for backport into woody -- Stephen Birch Tue, 9 Mar 2004 10:08:07 +0000 vobcopy (0.5.12-2) unstable; urgency=low * Add comment to control file per upstream request -- Stephen Birch Tue, 9 Mar 2004 06:36:36 +0000 vobcopy (0.5.12-1) unstable; urgency=low * New version from upstream * Tidy up changelog files * Added postinst and postrm files for dh_installmenu -- Stephen Birch Mon, 8 Mar 2004 11:10:54 +0000 vobcopy (0.5.11-2) unstable; urgency=low * Add -f to rm lines in Makefile -- Stephen Birch Mon, 8 Mar 2004 09:57:26 +0000 vobcopy (0.5.11-1) unstable; urgency=low * New version from upstream * Use dh_installchangelogs -k ChangeLog to install changelogs -- Stephen Birch Mon, 1 Mar 2004 15:59:47 +0000 vobcopy (0.5.10-0) unstable; urgency=low * Converted Debian control files to policy 3.6.1 * Created debian format changelog, old log is archived in changelog.archive * Update vobcopy to use libdvdread3 instead of libdvd2 * Clean up copying file a little, add reference to GPL file -- Stephen Birch Thu, 26 Feb 2004 15:12:31 +0000 vobcopy (0.5.7-1) unstable; urgency=low * New upstream release -- Robos Fri, 15 Mar 2003 23:27:23 +0200 vobcopy (0.5.6-1) unstable; urgency=low * New upstream release -- Robos Sun, 9 Feb 2003 23:27:23 +0200 vobcopy (0.5.5-1) unstable; urgency=low * New upstream relase. vobcopy now works under SunOS. -- Philippe Normand (phil) Sun, 3 Nov 2002 19:20:37 +0100 vobcopy (0.5.1-1) unstable; urgency=low * New upstream release -- Philippe Normand (phil) Wed, 17 Jul 2002 18:09:23 +0200 vobcopy (0.5.0-1) unstable; urgency=low * Initial Release. -- Philippe Normand (phil) Mon, 15 Jul 2002 18:27:23 +0200 debian/copyright0000664000000000000000000000243311700117655011130 0ustar This package was debianized by Philippe Normand (phil) on Mon, 15 Jul 2002 18:27:23 +0200. Debian maintenance of the package was taken over on Feb 7, 2004 by Stephen Birch . Upstream location: http://vobcopy.org Upstream Author: Robos This software is copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Robos , Philippe Normand, Stephen Birch, and lots of contribution and cleanup from rosenauer@users.sourceforge.net. This package 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; version 2 dated June, 1991. This package 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. debian/compat0000664000000000000000000000000212045722567010400 0ustar 9 debian/rules0000775000000000000000000000051212045722432010247 0ustar #!/usr/bin/make -f %: dh $@ --with autoreconf --parallel override_dh_install: dh_install @echo leave upstream changelog for dh_installchangelogs rm --verbose debian/vobcopy/usr/share/doc/vobcopy/Changelog @echo GNU GPL is included by reference in debian/copyright rm --verbose debian/vobcopy/usr/share/doc/vobcopy/COPYING