Blame SOURCES/cdrkit-1.1.11-paranoiacdda.patch

a1a51c
diff -up cdrkit-1.1.11/CMakeLists.txt.paranoiacdda cdrkit-1.1.11/CMakeLists.txt
a1a51c
--- cdrkit-1.1.11/CMakeLists.txt.paranoiacdda	2012-07-31 14:27:15.166155309 +0200
a1a51c
+++ cdrkit-1.1.11/CMakeLists.txt	2012-07-31 14:27:28.469613175 +0200
a1a51c
@@ -1,3 +1,3 @@
a1a51c
 PROJECT (cdrkit C)
a1a51c
-SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit)
a1a51c
+SUBDIRS(include genisoimage wodim libedc libhfs_iso icedax libusal librols libunls readom netscsid 3rd-party/dirsplit)
a1a51c
 
a1a51c
diff -up cdrkit-1.1.11/icedax/CMakeLists.txt.paranoiacdda cdrkit-1.1.11/icedax/CMakeLists.txt
a1a51c
--- cdrkit-1.1.11/icedax/CMakeLists.txt.paranoiacdda	2012-07-31 14:27:15.228157411 +0200
a1a51c
+++ cdrkit-1.1.11/icedax/CMakeLists.txt	2012-07-31 14:27:15.239157786 +0200
a1a51c
@@ -1,8 +1,9 @@
a1a51c
 PROJECT (icedax C)
a1a51c
-INCLUDE_DIRECTORIES(../include ../wodim ../libparanoia ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include)
a1a51c
+INCLUDE_DIRECTORIES(../include ../wodim ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include)
a1a51c
 include(../include/AddScgBits.cmake)
a1a51c
 include(../include/AddSchilyBits.cmake)
a1a51c
 include(../include/AddNetworkBits.cmake)
a1a51c
+INCLUDE (CheckLibraryExists) 
a1a51c
 
a1a51c
 FIND_FILE (HAVE_SYS_SOUNDCARD_H sys/soundcard.h)
a1a51c
 IF(HAVE_SYS_SOUNDCARD_H)
a1a51c
@@ -18,12 +19,20 @@ IF(HAVE_LIBOSSAUDIO)
a1a51c
    LIST(APPEND EXTRA_LIBS "ossaudio")
a1a51c
 ENDIF(HAVE_LIBOSSAUDIO)
a1a51c
 
a1a51c
-LIST(APPEND EXTRA_LIBS  paranoia)
a1a51c
+CHECK_INCLUDE_FILES(cdio/cdda.h HAVE_CDDA_INTERFACE_H)
a1a51c
+CHECK_LIBRARY_EXISTS (cdio_paranoia cdio_paranoia_init "" HAVE_LIBPARANOIA)
a1a51c
+IF(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
a1a51c
+   LIST(APPEND EXTRA_LIBS cdio_paranoia cdio_cdda)
a1a51c
+ELSE(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
a1a51c
+   MESSAGE(FATAL_ERROR "You need cdparanoia library installed")
a1a51c
+ENDIF(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
a1a51c
+	
a1a51c
+LIST(APPEND EXTRA_LIBS)
a1a51c
 IF (WIN32)
a1a51c
 	LIST(APPEND EXTRA_LIBS winmm)
a1a51c
 ENDIF (WIN32)
a1a51c
 
a1a51c
-LINK_DIRECTORIES(../librols ../libusal  ../libparanoia)
a1a51c
+LINK_DIRECTORIES(../librols ../libusal)
a1a51c
 ADD_EXECUTABLE (icedax aifc.c aiff.c base64.c icedax.c interface.c ioctl.c raw.c resample.c ringbuff.c scsi_cmds.c semshm.c setuid.c sha_func.c sndconfig.c sun.c toc.c wav.c)
a1a51c
 TARGET_LINK_LIBRARIES(icedax wodimstuff ${EXTRA_LIBS})
a1a51c
 SET_TARGET_PROPERTIES(icedax PROPERTIES  SKIP_BUILD_RPATH TRUE)
a1a51c
diff -up cdrkit-1.1.11/icedax/global.h.paranoiacdda cdrkit-1.1.11/icedax/global.h
a1a51c
--- cdrkit-1.1.11/icedax/global.h.paranoiacdda	2012-07-31 14:27:15.232157548 +0200
a1a51c
+++ cdrkit-1.1.11/icedax/global.h	2012-07-31 14:27:15.226157345 +0200
a1a51c
@@ -17,7 +17,8 @@
a1a51c
 #include "md5.h"
a1a51c
 #endif
a1a51c
 #ifdef	USE_PARANOIA
a1a51c
-#include "cdda_paranoia.h"
a1a51c
+#include <cdio/cdda.h>
a1a51c
+#include <cdio/paranoia.h>
a1a51c
 #endif
a1a51c
 
a1a51c
 typedef struct index_list
a1a51c
@@ -102,10 +103,10 @@ typedef struct global
a1a51c
 
a1a51c
 	struct paranoia_parms_t
a1a51c
 	{
a1a51c
-	        Ucbit	disable_paranoia:1;
a1a51c
-	        Ucbit	disable_extra_paranoia:1;
a1a51c
-	        Ucbit	disable_scratch_detect:1;
a1a51c
-	        Ucbit	disable_scratch_repair:1;
a1a51c
+	        char	disable_paranoia:1;
a1a51c
+	        char	disable_extra_paranoia:1;
a1a51c
+	        char	disable_scratch_detect:1;
a1a51c
+	        char	disable_scratch_repair:1;
a1a51c
 		int	retries;
a1a51c
 		int	overlap;
a1a51c
 		int	mindynoverlap;
a1a51c
diff -up cdrkit-1.1.11/icedax/icedax.c.paranoiacdda cdrkit-1.1.11/icedax/icedax.c
a1a51c
--- cdrkit-1.1.11/icedax/icedax.c.paranoiacdda	2012-07-31 14:27:15.237157718 +0200
a1a51c
+++ cdrkit-1.1.11/icedax/icedax.c	2012-07-31 14:27:15.238157752 +0200
a1a51c
@@ -120,6 +120,10 @@
a1a51c
 #ifdef	USE_LAME
a1a51c
 #include "mp3.h"	/* mp3 file handling */
a1a51c
 #endif
a1a51c
+#ifdef	USE_PARANOIA
a1a51c
+#include <cdio/cdda.h>
a1a51c
+#include <cdio/paranoia.h>
a1a51c
+#endif
a1a51c
 #include "interface.h"  /* low level cdrom interfacing */
a1a51c
 #include "icedax.h"
a1a51c
 #include "resample.h"
a1a51c
@@ -128,9 +132,6 @@
a1a51c
 #include "ringbuff.h"
a1a51c
 #include "global.h"
a1a51c
 #include "exitcodes.h"
a1a51c
-#ifdef	USE_PARANOIA
a1a51c
-#include "cdda_paranoia.h"
a1a51c
-#endif
a1a51c
 #include "defaults.h"
a1a51c
 
a1a51c
 static void RestrictPlaybackRate(long newrate);
a1a51c
@@ -800,7 +801,7 @@ static void init_globals()
a1a51c
   global.useroverlap = -1;      /* amount of overlapping sectors user override */
a1a51c
   global.need_hostorder = 0;	/* processing needs samples in host endianess */
a1a51c
   global.in_lendian = -1;	/* input endianess from SetupSCSI() */
a1a51c
-  global.outputendianess = NONE; /* user specified output endianess */
a1a51c
+  global.outputendianess = NONE_EN; /* user specified output endianess */
a1a51c
   global.findminmax  =  0;	/* flag find extrem amplitudes */
a1a51c
 #ifdef HAVE_LIMITS_H
a1a51c
   global.maxamp[0] = INT_MIN;	/* maximum amplitude */
a1a51c
@@ -2418,7 +2419,7 @@ Rate   Divider      Rate   Divider
a1a51c
   if (bulk == -1) bulk = 0;
a1a51c
 
a1a51c
   global.need_big_endian = global.audio_out->need_big_endian;
a1a51c
-  if (global.outputendianess != NONE)
a1a51c
+  if (global.outputendianess != NONE_EN)
a1a51c
     global.need_big_endian = global.outputendianess == BIG;
a1a51c
 
a1a51c
   if (global.no_file) global.fname_base[0] = '\0';
a1a51c
@@ -2602,7 +2603,7 @@ Rate   Divider      Rate   Divider
a1a51c
     fputs( ", soundcard", stderr );
a1a51c
 #endif
a1a51c
 #if defined USE_PARANOIA
a1a51c
-    fputs( ", libparanoia", stderr );
a1a51c
+    fputs( ", libcdio_paranoia", stderr );
a1a51c
 #endif
a1a51c
     fputs( " support\n", stderr );
a1a51c
   }
a1a51c
@@ -2892,8 +2893,28 @@ Rate   Divider      Rate   Divider
a1a51c
 #ifdef	USE_PARANOIA
a1a51c
 	if (global.paranoia_selected) {
a1a51c
 		long paranoia_mode;
a1a51c
+		cdrom_drive *tmpdrive;
a1a51c
+		usal_close(get_scsi_p());
a1a51c
 
a1a51c
-		global.cdp = paranoia_init(get_scsi_p(), global.nsectors);
a1a51c
+		tmpdrive = cdda_identify(global.dev_name, 0, NULL);
a1a51c
+		if (!tmpdrive)
a1a51c
+		{
a1a51c
+			fputs("Can't identify disc\n", stderr);
a1a51c
+                	return 1;
a1a51c
+		}
a1a51c
+
a1a51c
+		if(global.nsectors)
a1a51c
+		{
a1a51c
+		  tmpdrive->nsectors = global.nsectors;
a1a51c
+		  tmpdrive->bigbuff = global.nsectors * CD_FRAMESIZE_RAW;
a1a51c
+		}
a1a51c
+		if (cdda_open(tmpdrive) != 0)
a1a51c
+		{
a1a51c
+		  fputs("Can't open disc\n", stderr);
a1a51c
+		  cdda_close(tmpdrive);
a1a51c
+		  return 1;
a1a51c
+		}
a1a51c
+		global.cdp = paranoia_init(tmpdrive);
a1a51c
 
a1a51c
 		if (global.paranoia_parms.overlap >= 0) {
a1a51c
 			int	overlap = global.paranoia_parms.overlap;
a1a51c
@@ -2902,17 +2923,7 @@ Rate   Divider      Rate   Divider
a1a51c
 				overlap = global.nsectors - 1;
a1a51c
 			paranoia_overlapset(global.cdp, overlap);
a1a51c
 		}
a1a51c
-		/*
a1a51c
-		 * Default to a  minimum of dynamic overlapping == 0.5 sectors.
a1a51c
-		 * If we don't do this, we get the default from libparanoia
a1a51c
-		 * which is approx. 0.1.
a1a51c
-		 */
a1a51c
-		if (global.paranoia_parms.mindynoverlap < 0)
a1a51c
-			paranoia_dynoverlapset(global.cdp, CD_FRAMEWORDS/2, -1);
a1a51c
-		paranoia_dynoverlapset(global.cdp,
a1a51c
-			global.paranoia_parms.mindynoverlap * CD_FRAMEWORDS,
a1a51c
-			global.paranoia_parms.maxdynoverlap * CD_FRAMEWORDS);
a1a51c
-
a1a51c
+	
a1a51c
 		paranoia_mode = PARANOIA_MODE_FULL ^ PARANOIA_MODE_NEVERSKIP;
a1a51c
 
a1a51c
 		if (global.paranoia_parms.disable_paranoia) {
a1a51c
diff -up cdrkit-1.1.11/icedax/icedax.h.paranoiacdda cdrkit-1.1.11/icedax/icedax.h
a1a51c
--- cdrkit-1.1.11/icedax/icedax.h.paranoiacdda	2012-07-31 14:27:15.216157005 +0200
a1a51c
+++ cdrkit-1.1.11/icedax/icedax.h	2012-07-31 14:27:15.217157039 +0200
a1a51c
@@ -41,7 +41,7 @@
a1a51c
 
a1a51c
 /* Endianess */
a1a51c
 #define GUESS (-2)
a1a51c
-#define NONE (-1)
a1a51c
+#define NONE_EN (-1)
a1a51c
 #define LITTLE 0
a1a51c
 #define BIG 1
a1a51c
 
a1a51c
diff -up cdrkit-1.1.11/icedax/interface.c.paranoiacdda cdrkit-1.1.11/icedax/interface.c
a1a51c
--- cdrkit-1.1.11/icedax/interface.c.paranoiacdda	2012-07-31 14:27:15.235157650 +0200
a1a51c
+++ cdrkit-1.1.11/icedax/interface.c	2012-07-31 14:27:15.232157548 +0200
a1a51c
@@ -116,7 +116,7 @@ int		(*Play_at)(SCSI *usalp, unsigned in
a1a51c
 int		(*StopPlay)(SCSI *usalp);
a1a51c
 void		(*trash_cache)(UINT4 *p, unsigned lSector, unsigned SectorBurstVal);
a1a51c
 
a1a51c
-#if	defined	USE_PARANOIA
a1a51c
+#if	0 //defined	USE_PARANOIA
a1a51c
 long cdda_read(void *d, void *buffer, long beginsector, long sectors);
a1a51c
 
a1a51c
 long cdda_read(void *d, void *buffer, long beginsector, long sectors)
a1a51c
diff -up cdrkit-1.1.11/icedax/toc.c.paranoiacdda cdrkit-1.1.11/icedax/toc.c
a1a51c
--- cdrkit-1.1.11/icedax/toc.c.paranoiacdda	2012-07-31 14:27:15.225157311 +0200
a1a51c
+++ cdrkit-1.1.11/icedax/toc.c	2012-07-31 14:27:15.230157480 +0200
a1a51c
@@ -379,8 +379,7 @@ static void emit_cddb_form(char *fname_b
a1a51c
 static void emit_cdindex_form(char *fname_baseval);
a1a51c
 #endif
a1a51c
 
a1a51c
-
a1a51c
-typedef struct TOC {	/* structure of table of contents (cdrom) */
a1a51c
+typedef struct TOC_t {	/* structure of table of contents (cdrom) */
a1a51c
 	unsigned char reserved1;
a1a51c
 	unsigned char bFlags;
a1a51c
 	unsigned char bTrack;
a1a51c
@@ -391,8 +390,7 @@ typedef struct TOC {	/* structure of tab
a1a51c
 	int frms;
a1a51c
 	unsigned char ISRC[16];
a1a51c
 	int	SCMS;
a1a51c
-} TOC;
a1a51c
-
a1a51c
+} TOC_t;
a1a51c
 
a1a51c
 /* Flags contains two fields:
a1a51c
     bits 7-4 (ADR)
a1a51c
@@ -432,7 +430,7 @@ struct iterator {
a1a51c
 	int index;
a1a51c
 	int startindex;
a1a51c
 	void        (*reset)(struct iterator *this);
a1a51c
-	struct TOC *(*getNextTrack)(struct iterator *this);
a1a51c
+	struct TOC_t *(*getNextTrack)(struct iterator *this);
a1a51c
 	int         (*hasNextTrack)(struct iterator *this);
a1a51c
 };
a1a51c
 
a1a51c
@@ -518,7 +516,7 @@ unsigned FixupTOC(unsigned no_tracks)
a1a51c
 		    InitIterator(&i, 1);
a1a51c
 
a1a51c
 	    while (i.hasNextTrack(&i)) {
a1a51c
-		    struct TOC *p = i.getNextTrack(&i);
a1a51c
+		    struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 		    if (IS__AUDIO(p)) count_audio_tracks++;
a1a51c
 	    }
a1a51c
 
a1a51c
@@ -733,7 +731,7 @@ static void emit_cddb_form(char *fname_b
a1a51c
   fprintf( cddb_form, "# Track frame offsets:\n#\n");
a1a51c
 
a1a51c
   while (i.hasNextTrack(&i)) {
a1a51c
-	  struct TOC *p = i.getNextTrack(&i);
a1a51c
+	  struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 	  if (GETTRACK(p) == CDROM_LEADOUT) break;
a1a51c
 	  fprintf( cddb_form,
a1a51c
 		   "# %lu\n", 150 + Get_AudioStartSector(GETTRACK(p)));
a1a51c
@@ -765,7 +763,7 @@ static void emit_cddb_form(char *fname_b
a1a51c
 
a1a51c
   i.reset(&i);
a1a51c
   while (i.hasNextTrack(&i)) {
a1a51c
-	  struct TOC *p = i.getNextTrack(&i);
a1a51c
+	  struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 	  int ii;
a1a51c
 
a1a51c
 	  ii = GETTRACK(p);
a1a51c
@@ -788,7 +786,7 @@ static void emit_cddb_form(char *fname_b
a1a51c
 
a1a51c
   i.reset(&i);
a1a51c
   while (i.hasNextTrack(&i)) {
a1a51c
-	  struct TOC *p = i.getNextTrack(&i);
a1a51c
+	  struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 	  int ii;
a1a51c
 
a1a51c
 	  ii = GETTRACK(p);
a1a51c
@@ -1495,7 +1493,7 @@ static int IsSingleArtist(void)
a1a51c
 	InitIterator(&i, 1);
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		struct TOC *p = i.getNextTrack(&i);
a1a51c
+		struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 		int ii;
a1a51c
 
a1a51c
 		if (IS__DATA(p) || GETTRACK(p) == CDROM_LEADOUT) continue;
a1a51c
@@ -1681,7 +1679,7 @@ static void emit_cdindex_form(char *fnam
a1a51c
 	 global.creator ? ascii2html(global.creator) : "");
a1a51c
 
a1a51c
     while (i.hasNextTrack(&i)) {
a1a51c
-	    struct TOC *p = i.getNextTrack(&i);
a1a51c
+	    struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 	    int ii = GETTRACK(p);
a1a51c
 
a1a51c
 	    if (ii == CDROM_LEADOUT) break;
a1a51c
@@ -1703,7 +1701,7 @@ static void emit_cdindex_form(char *fnam
a1a51c
     fprintf( cdindex_form, "   <MultipleArtistCD>\n");
a1a51c
 
a1a51c
     while (i.hasNextTrack(&i)) {
a1a51c
-	    struct TOC *p = i.getNextTrack(&i);
a1a51c
+	    struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 	    int ii = GETTRACK(p);
a1a51c
 
a1a51c
 	    if (ii == CDROM_LEADOUT) break;
a1a51c
@@ -1942,9 +1940,9 @@ static void DisplayToc_with_gui(unsigned
a1a51c
 
a1a51c
 	if ((global.verbose & (SHOW_TOC | SHOW_STARTPOSITIONS | SHOW_SUMMARY | SHOW_TITLES)) != 0
a1a51c
 	    && i.hasNextTrack(&i)) {
a1a51c
-		TOC *o = i.getNextTrack(&i);
a1a51c
+		TOC_t *o = i.getNextTrack(&i);
a1a51c
 		while (i.hasNextTrack(&i)) {
a1a51c
-			TOC *p = i.getNextTrack(&i);
a1a51c
+			TOC_t *p = i.getNextTrack(&i);
a1a51c
 			int from;
a1a51c
 			from = GETTRACK(o);
a1a51c
 
a1a51c
@@ -2072,9 +2070,9 @@ static void DisplayToc_no_gui(unsigned l
a1a51c
 	count_audio_trks = 0;
a1a51c
 
a1a51c
 	if (i.hasNextTrack(&i)) {
a1a51c
-		TOC *o = i.getNextTrack(&i);
a1a51c
+		TOC_t *o = i.getNextTrack(&i);
a1a51c
 		while (i.hasNextTrack(&i)) {
a1a51c
-			TOC *p = i.getNextTrack(&i);
a1a51c
+			TOC_t *p = i.getNextTrack(&i);
a1a51c
 			int from;
a1a51c
 			from = GETTRACK(o);
a1a51c
 
a1a51c
@@ -2131,10 +2129,10 @@ static void DisplayToc_no_gui(unsigned l
a1a51c
 	i.reset(&i);
a1a51c
 	if ((global.verbose & SHOW_TOC) != 0 &&
a1a51c
 		i.hasNextTrack(&i)) {
a1a51c
-		TOC *o = i.getNextTrack(&i);
a1a51c
+		TOC_t *o = i.getNextTrack(&i);
a1a51c
 
a1a51c
 		for (; i.hasNextTrack(&i);) {
a1a51c
-			TOC *p = i.getNextTrack(&i);
a1a51c
+			TOC_t *p = i.getNextTrack(&i);
a1a51c
 
a1a51c
 			if ( GETTRACK(o) <= MAXTRK ) {
a1a51c
 				unsigned char brace1, brace2;
a1a51c
@@ -2189,9 +2187,9 @@ static void DisplayToc_no_gui(unsigned l
a1a51c
 		ii = 0;
a1a51c
 		i.reset(&i);
a1a51c
 		if (i.hasNextTrack(&i)) {
a1a51c
-			TOC *o = i.getNextTrack(&i);
a1a51c
+			TOC_t *o = i.getNextTrack(&i);
a1a51c
 			for ( ; i.hasNextTrack(&i);) {
a1a51c
-				TOC *p = i.getNextTrack(&i);
a1a51c
+				TOC_t *p = i.getNextTrack(&i);
a1a51c
 				fprintf ( stderr,
a1a51c
 					  " %2u.(%8u)",
a1a51c
 					  GETTRACK(o),
a1a51c
@@ -2248,7 +2246,7 @@ static void DisplayToc_no_gui(unsigned l
a1a51c
 
a1a51c
 		i.reset(&i);
a1a51c
 		for ( ; i.hasNextTrack(&i);) {
a1a51c
-			TOC *p = i.getNextTrack(&i);
a1a51c
+			TOC_t *p = i.getNextTrack(&i);
a1a51c
 			int jj = GETTRACK(p);
a1a51c
 
a1a51c
 			if ( global.tracktitle[jj] != NULL ) {
a1a51c
@@ -2260,7 +2258,7 @@ static void DisplayToc_no_gui(unsigned l
a1a51c
 		
a1a51c
 		i.reset(&i);
a1a51c
 		for ( ; i.hasNextTrack(&i); ) {
a1a51c
-			TOC *p = i.getNextTrack(&i);
a1a51c
+			TOC_t *p = i.getNextTrack(&i);
a1a51c
 			int jj;
a1a51c
 
a1a51c
 			if (IS__DATA(p))
a1a51c
@@ -2720,7 +2718,7 @@ void Read_MCN_ISRC(void)
a1a51c
 		InitIterator(&i, 1);
a1a51c
 
a1a51c
 		while (i.hasNextTrack(&i)) {
a1a51c
-			struct TOC *p = i.getNextTrack(&i);
a1a51c
+			struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 			unsigned ii = GETTRACK(p);
a1a51c
 			
a1a51c
 			if (ii == CDROM_LEADOUT) break;
a1a51c
@@ -3155,7 +3153,7 @@ unsigned ScanIndices(unsigned track, uns
a1a51c
 
a1a51c
 
a1a51c
   while (i.hasNextTrack(&i)) {
a1a51c
-	  struct TOC *p = i.getNextTrack(&i);
a1a51c
+	  struct TOC_t *p = i.getNextTrack(&i);
a1a51c
 	  unsigned ii = GETTRACK(p);
a1a51c
 
a1a51c
 	  if ( ii < starttrack || IS__DATA(p) )
a1a51c
@@ -3322,7 +3320,7 @@ unsigned char *Get_MCN(void)
a1a51c
 }
a1a51c
 
a1a51c
 
a1a51c
-static TOC g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
a1a51c
+static TOC_t g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
a1a51c
 
a1a51c
 /*#define IS_AUDIO(i) (!(g_toc[i].bFlags & 0x40))*/
a1a51c
 
a1a51c
@@ -3397,10 +3395,10 @@ static int patch_cd_extra(unsigned track
a1a51c
 
a1a51c
 static int restrict_tracks_illleadout(void)
a1a51c
 {
a1a51c
-	struct TOC *o = &g_toc[cdtracks+1];
a1a51c
+	struct TOC_t *o = &g_toc[cdtracks+1];
a1a51c
 	int i;
a1a51c
 	for (i = cdtracks; i >= 0; i--) {
a1a51c
-		struct TOC *p = &g_toc[i];
a1a51c
+		struct TOC_t *p = &g_toc[i];
a1a51c
 		if (GETSTART(o) > GETSTART(p)) break;
a1a51c
 	}
a1a51c
 	patch_cd_extra(i+1, GETSTART(o));
a1a51c
@@ -3523,7 +3521,7 @@ static void it_reset(struct iterator *th
a1a51c
 
a1a51c
 
a1a51c
 static int it_hasNextTrack(struct iterator *this);
a1a51c
-static struct TOC *it_getNextTrack(struct iterator *this);
a1a51c
+static struct TOC_t *it_getNextTrack(struct iterator *this);
a1a51c
 
a1a51c
 static int it_hasNextTrack(struct iterator *this)
a1a51c
 {
a1a51c
@@ -3532,7 +3530,7 @@ static int it_hasNextTrack(struct iterat
a1a51c
 
a1a51c
 
a1a51c
 
a1a51c
-static struct TOC *it_getNextTrack(struct iterator *this)
a1a51c
+static struct TOC_t *it_getNextTrack(struct iterator *this)
a1a51c
 {
a1a51c
 	/* if ( (*this->hasNextTrack)(this) == 0 ) return NULL; */
a1a51c
 	if ( this->index > (int)cdtracks+1 ) return NULL;
a1a51c
@@ -3583,7 +3581,7 @@ long Get_AudioStartSector(unsigned long
a1a51c
 	if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		TOC *p = i.getNextTrack(&i);
a1a51c
+		TOC_t *p = i.getNextTrack(&i);
a1a51c
 
a1a51c
 		if (GETTRACK(p) == p_track) {
a1a51c
 			if (IS__DATA(p)) {
a1a51c
@@ -3613,7 +3611,7 @@ long Get_StartSector(unsigned long p_tra
a1a51c
 	if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		TOC *p = i.getNextTrack(&i);
a1a51c
+		TOC_t *p = i.getNextTrack(&i);
a1a51c
 
a1a51c
 		if (GETTRACK(p) == p_track) {
a1a51c
 			return GETSTART(p);
a1a51c
@@ -3637,7 +3635,7 @@ long Get_EndSector(unsigned long p_track
a1a51c
 	if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		TOC *p = i.getNextTrack(&i);
a1a51c
+		TOC_t *p = i.getNextTrack(&i);
a1a51c
 		if (GETTRACK(p) == p_track) {
a1a51c
 			p = i.getNextTrack(&i);
a1a51c
 			if (p == NULL) {
a1a51c
@@ -3669,7 +3667,7 @@ long FirstAudioTrack(void)
a1a51c
 	else i.reset(&i);
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		TOC *p = i.getNextTrack(&i);
a1a51c
+		TOC_t *p = i.getNextTrack(&i);
a1a51c
 		unsigned ii = GETTRACK(p);
a1a51c
 
a1a51c
 		if (ii == CDROM_LEADOUT) break;
a1a51c
@@ -3687,7 +3685,7 @@ long FirstDataTrack(void)
a1a51c
 	else i.reset(&i);
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		TOC *p = i.getNextTrack(&i);
a1a51c
+		TOC_t *p = i.getNextTrack(&i);
a1a51c
 		if (IS__DATA(p)) {
a1a51c
 			return GETTRACK(p);
a1a51c
 		}
a1a51c
@@ -3708,7 +3706,7 @@ long LastAudioTrack(void)
a1a51c
 	else i.reset(&i);
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		TOC *p = i.getNextTrack(&i);
a1a51c
+		TOC_t *p = i.getNextTrack(&i);
a1a51c
 		if (IS__AUDIO(p) && (GETTRACK(p) != CDROM_LEADOUT)) {
a1a51c
 			j = GETTRACK(p);
a1a51c
 		}
a1a51c
@@ -3730,7 +3728,7 @@ long Get_LastSectorOnCd(unsigned long p_
a1a51c
 	if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		TOC *p = i.getNextTrack(&i);
a1a51c
+		TOC_t *p = i.getNextTrack(&i);
a1a51c
 
a1a51c
 		if (GETTRACK(p) < p_track)
a1a51c
 			continue;
a1a51c
@@ -3749,9 +3747,9 @@ int Get_Track(unsigned long sector)
a1a51c
 	else i.reset(&i);
a1a51c
 
a1a51c
 	if (i.hasNextTrack(&i)) {
a1a51c
-		TOC *o = i.getNextTrack(&i);
a1a51c
+		TOC_t *o = i.getNextTrack(&i);
a1a51c
 		while (i.hasNextTrack(&i)) {
a1a51c
-			TOC *p = i.getNextTrack(&i);
a1a51c
+			TOC_t *p = i.getNextTrack(&i);
a1a51c
 			if ((GETSTART(o) <= sector) && (GETSTART(p) > sector)) {
a1a51c
 				if (IS__DATA(o)) {
a1a51c
 					return -1;
a1a51c
@@ -3772,7 +3770,7 @@ int CheckTrackrange(unsigned long from,
a1a51c
 	else i.reset(&i);
a1a51c
 
a1a51c
 	while (i.hasNextTrack(&i)) {
a1a51c
-		TOC *p = i.getNextTrack(&i);
a1a51c
+		TOC_t *p = i.getNextTrack(&i);
a1a51c
 
a1a51c
 		if (GETTRACK(p) < from)
a1a51c
 			continue;
a1a51c
@@ -3788,54 +3786,3 @@ int CheckTrackrange(unsigned long from,
a1a51c
 	return 0;
a1a51c
 }
a1a51c
 
a1a51c
-#ifdef	USE_PARANOIA
a1a51c
-long cdda_disc_firstsector(void *d);
a1a51c
-
a1a51c
-long cdda_disc_firstsector(void *d)
a1a51c
-{
a1a51c
-	return Get_StartSector(FirstAudioTrack());
a1a51c
-}
a1a51c
-
a1a51c
-int cdda_tracks(void *d);
a1a51c
-
a1a51c
-int cdda_tracks(void *d)
a1a51c
-{
a1a51c
-	return LastAudioTrack() - FirstAudioTrack() +1;
a1a51c
-}
a1a51c
-
a1a51c
-int cdda_track_audiop(void *d, int track);
a1a51c
-
a1a51c
-int cdda_track_audiop(void *d, int track)
a1a51c
-{
a1a51c
-	return Get_Datatrack(track) == 0;
a1a51c
-}
a1a51c
-
a1a51c
-long cdda_track_firstsector(void *d, int track);
a1a51c
-
a1a51c
-long cdda_track_firstsector(void *d, int track)
a1a51c
-{
a1a51c
-	return Get_AudioStartSector(track);
a1a51c
-}
a1a51c
-
a1a51c
-long cdda_track_lastsector(void *d, int track);
a1a51c
-
a1a51c
-long cdda_track_lastsector(void *d, int track)
a1a51c
-{
a1a51c
-	return Get_EndSector(track);
a1a51c
-}
a1a51c
-
a1a51c
-long cdda_disc_lastsector(void *d);
a1a51c
-
a1a51c
-long cdda_disc_lastsector(void *d)
a1a51c
-{
a1a51c
-	return Get_LastSectorOnCd(cdtracks) - 1;
a1a51c
-}
a1a51c
-
a1a51c
-int cdda_sector_gettrack(void *d,long sector);
a1a51c
-
a1a51c
-int cdda_sector_gettrack(void *d, long sector)
a1a51c
-{
a1a51c
-	return Get_Track(sector);
a1a51c
-}
a1a51c
-
a1a51c
-#endif