First working all-libcdio cd-paranoia (modulo various omissions and
memory leaks).
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: cooked_interface.c,v 1.3 2005/01/05 04:16:11 rocky Exp $
|
||||
$Id: cooked_interface.c,v 1.4 2005/01/06 01:15:51 rocky Exp $
|
||||
|
||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
Original interface.c Copyright (C) 1994-1997
|
||||
@@ -251,7 +251,7 @@ cooked_init_drive (cdrom_drive_t *d){
|
||||
#else
|
||||
{
|
||||
char buffer[256];
|
||||
d->nsectors=8;
|
||||
d->nsectors = 8;
|
||||
sprintf(buffer,"\tSetting read block size at %d sectors (%ld bytes).\n",
|
||||
d->nsectors,(long)d->nsectors*CD_FRAMESIZE_RAW);
|
||||
cdmessage(d,buffer);
|
||||
|
||||
@@ -67,7 +67,7 @@ cdda_open(cdrom_drive_t *d)
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
cderror(d,"100: Interface not supported\n");
|
||||
cderror(d, "100: Interface not supported\n");
|
||||
return(-100);
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: cdio.c,v 1.5 2005/01/04 04:33:36 rocky Exp $
|
||||
$Id: cdio.c,v 1.6 2005/01/06 01:15:51 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <cdio/logging.h>
|
||||
#include "cdio_private.h"
|
||||
|
||||
static const char _rcsid[] = "$Id: cdio.c,v 1.5 2005/01/04 04:33:36 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: cdio.c,v 1.6 2005/01/06 01:15:51 rocky Exp $";
|
||||
|
||||
|
||||
const char *track_format2str[6] =
|
||||
@@ -643,14 +643,14 @@ cdio_new (generic_img_private_t *p_env, cdio_funcs *p_funcs)
|
||||
Free any resources associated with cdio.
|
||||
*/
|
||||
void
|
||||
cdio_destroy (CdIo_t *cdio)
|
||||
cdio_destroy (CdIo_t *p_cdio)
|
||||
{
|
||||
CdIo_last_driver = CDIO_DRIVER_UNINIT;
|
||||
if (cdio == NULL) return;
|
||||
if (p_cdio == NULL) return;
|
||||
|
||||
if (cdio->op.free != NULL)
|
||||
cdio->op.free (cdio->env);
|
||||
free (cdio);
|
||||
if (p_cdio->op.free != NULL)
|
||||
p_cdio->op.free (p_cdio->env);
|
||||
free (p_cdio);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: paranoia.c,v 1.3 2005/01/05 04:16:11 rocky Exp $
|
||||
$Id: paranoia.c,v 1.4 2005/01/06 01:15:51 rocky Exp $
|
||||
|
||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
Copyright (C) 1998 Monty xiphmont@mit.edu
|
||||
@@ -148,11 +148,11 @@ i_paranoia_overlap2(int16_t *buffA,int16_t *buffB,
|
||||
long sizeA,long sizeB,
|
||||
long *ret_begin, long *ret_end)
|
||||
{
|
||||
long beginA=offsetA,endA=offsetA;
|
||||
long beginB=offsetB,endB=offsetB;
|
||||
long beginA=offsetA, endA=offsetA;
|
||||
long beginB=offsetB, endB=offsetB;
|
||||
|
||||
for(;beginA>=0 && beginB>=0;beginA--,beginB--){
|
||||
if(buffA[beginA]!=buffB[beginB])break;
|
||||
for( ; beginA>=0 && beginB>=0; beginA--,beginB-- ) {
|
||||
if ( buffA[beginA] != buffB[beginB] ) break;
|
||||
/* don't allow matching across matching sector boundaries */
|
||||
/* don't allow matching through known missing data */
|
||||
if((flagsA[beginA]&flagsB[beginB]&1)){
|
||||
@@ -242,7 +242,7 @@ try_sort_sync(cdrom_paranoia_t *p,
|
||||
{
|
||||
long zeropos=post-ib(A);
|
||||
if(zeropos>=0 && zeropos<is(A)){
|
||||
if(cv(B)[post-cb(B)]==iv(A)[zeropos]){
|
||||
if ( cv(B)[post-cb(B)] == iv(A)[zeropos] ) {
|
||||
if(do_const_sync(B,A,Aflags,
|
||||
post-cb(B),zeropos,
|
||||
begin,end,offset)){
|
||||
|
||||
Reference in New Issue
Block a user