head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.6 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.4 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.2 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.2.0.16 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.14 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.12 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.10 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.8 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.6 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.4 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.2 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.1.1.1.0.30 pkgsrc-2009Q2-base:1.1.1.1 pkgsrc-2009Q1:1.1.1.1.0.28 pkgsrc-2009Q1-base:1.1.1.1 pkgsrc-2008Q4:1.1.1.1.0.26 pkgsrc-2008Q4-base:1.1.1.1 pkgsrc-2008Q3:1.1.1.1.0.24 pkgsrc-2008Q3-base:1.1.1.1 cube-native-xorg:1.1.1.1.0.22 cube-native-xorg-base:1.1.1.1 pkgsrc-2008Q2:1.1.1.1.0.20 pkgsrc-2008Q2-base:1.1.1.1 cwrapper:1.1.1.1.0.18 pkgsrc-2008Q1:1.1.1.1.0.16 pkgsrc-2008Q1-base:1.1.1.1 pkgsrc-2007Q4:1.1.1.1.0.14 pkgsrc-2007Q4-base:1.1.1.1 pkgsrc-2007Q3:1.1.1.1.0.12 pkgsrc-2007Q3-base:1.1.1.1 pkgsrc-2007Q2:1.1.1.1.0.10 pkgsrc-2007Q2-base:1.1.1.1 pkgsrc-2007Q1:1.1.1.1.0.8 pkgsrc-2007Q1-base:1.1.1.1 pkgsrc-2006Q4:1.1.1.1.0.6 pkgsrc-2006Q4-base:1.1.1.1 pkgsrc-2006Q3:1.1.1.1.0.4 pkgsrc-2006Q3-base:1.1.1.1 pkgsrc-2006Q2:1.1.1.1.0.2 pkgsrc-2006Q2-base:1.1.1.1 pkgsrc-20060413:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2011.08.09.20.56.27; author adam; state dead; branches; next 1.2; 1.2 date 2009.08.22.22.05.24; author abs; state Exp; branches; next 1.1; 1.1 date 2006.04.13.20.14.51; author wiz; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2006.04.13.20.14.51; author wiz; state Exp; branches; next ; desc @@ 1.3 log @Changes 0.4.1: New Features: * New complete translation: German (de); thanks to Chris Leick Bug fixes: * Fix offset bug (which results in wrong .vob files) * Fix typos and improve wording Changes 0.4: New Features: * Added new translations from Launchpad: French (fr), Galician (gl), Italian (it), Norwegian Bokmål (nb), Russian (ru) and Spanish (es) Changes: * Use C99 standard and compile with -pedantic flag. * Code cleanup Bug fixes: * Fixed typos * Fixed compiler warnings * Added missing header file @ text @$NetBSD: patch-aa,v 1.2 2009/08/22 22:05:24 abs Exp $ --- dvdbackup.c.orig 2002-08-05 07:08:39.000000000 +0100 +++ dvdbackup.c @@@@ -20,6 +20,7 @@@@ #include +#include #include #include #include @@@@ -782,7 +783,7 @@@@ titles_info_t * DVDGetInfo(dvd_reader_t to consider the second one a feature title we are doing two checks (biggest + biggest - second) /second == 1 and biggest%second * 3 < biggest */ - if ( CheckSizeArray(size_size_array, 0, 1) == 1 ) { + if ( title_sets > 1 && CheckSizeArray(size_size_array, 0, 1) == 1 ) { /* We have a dual DVD with two feature films - now lets see if they have the same amount of chapters*/ chapters_1 = 0; @@@@ -1519,30 +1520,32 @@@@ int DVDGetTitleName(const char *device, { /* Variables for filehandel and title string interaction */ - int filehandle, i, last; + FILE *filehandle; + int i, last; /* Open DVD device */ - if ( !(filehandle = open(device, O_RDONLY)) ) { + if ( !(filehandle = fopen(device, "r")) ) { fprintf(stderr, "Can't open secified device %s - check your DVD device\n", device); return(1); } /* Seek to title of first track, which is at (track_no * 32768) + 40 */ - if ( 32808 != lseek(filehandle, 32808, SEEK_SET) ) { - close(filehandle); + if ( fseek(filehandle, 32808, SEEK_SET) ) { + fclose(filehandle); fprintf(stderr, "Can't seek DVD device %s - check your DVD device\n", device); return(1); } /* Read the DVD-Video title */ - if ( 32 != read(filehandle, title, 32)) { - close(filehandle); + if ( 32 != fread(title, 1, 32, filehandle)) { + fclose(filehandle); fprintf(stderr, "Can't read title from DVD device %s\n", device); return(1); } + fclose(filehandle); /* Terminate the title string */ @@@@ -2464,6 +2467,10 @@@@ int main(int argc, char *argv[]){ #endif + /* On at least NetBSD5 we cannot fopen the dvd device during DVDOpen */ + if (provided_title_name == NULL) + DVDGetTitleName(dvd,title_name); + _dvd = DVDOpen(dvd); if(!_dvd) exit(-1); @@@@ -2476,7 +2483,7 @@@@ int main(int argc, char *argv[]){ if(provided_title_name == NULL) { - if (DVDGetTitleName(dvd,title_name) != 0) { + if (title_name[0] == 0) { fprintf(stderr,"You must provide a title name when you read your DVD-Video structure direct from the HD\n"); DVDClose(_dvd); exit(1); @ 1.2 log @Fix so it can read the dvd title under NetBSD (and actually work). Bump pkgrevision @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.1.1.1 2006/04/13 20:14:51 wiz Exp $ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.2 2006/04/12 06:03:27 wiz Exp $ d3 1 a3 1 --- dvdbackup.c.orig 2002-08-05 06:08:39.000000000 +0000 d22 59 @ 1.1.1.1 log @Re-import graphics/dvdbackup as multimedia/dvdbackup. @ text @@