Cleaned up TRACE_PARANOIA and added some messages for the skip case.

This commit is contained in:
pjcreath
2005-11-07 19:48:50 +00:00
parent 9834af4577
commit b460e8bb31
2 changed files with 19 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: cddap_interface.c,v 1.3 2005/10/23 11:28:20 rocky Exp $
$Id: cddap_interface.c,v 1.4 2005/11/07 19:48:50 pjcreath Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
Original interface.c Copyright (C) 1994-1997
@@ -182,10 +182,12 @@ jitter_read (cdrom_drive_t *d, void *p, lsn_t begin, long i_sectors,
if (begin + i_jitter_sectors > 0) {
#if !TRACE_PARANOIA
char buffer[256];
sprintf(buffer, "jittering by %d, offset %ld\n", i_jitter,
i_jitter_offset);
cdmessage(d,buffer);
#endif
begin += i_jitter_sectors;
i_sectors ++;

View File

@@ -1,5 +1,5 @@
/*
$Id: paranoia.c,v 1.21 2005/10/24 19:42:15 pjcreath Exp $
$Id: paranoia.c,v 1.22 2005/11/07 19:48:53 pjcreath Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 1998 Monty xiphmont@mit.edu
@@ -1523,6 +1523,10 @@ verify_skip_case(cdrom_paranoia_t *p,
if (callback)(*callback)(post,PARANOIA_CB_SKIP);
#if TRACE_PARANOIA
fprintf(stderr, "Skipping [%ld-", post);
#endif
/* We want to add a sector. Look for a c_block that spans,
preferrably a verified area */
@@ -1573,6 +1577,12 @@ verify_skip_case(cdrom_paranoia_t *p,
gend-post);
}
#if TRACE_PARANOIA
fprintf(stderr, "%d], filled with %s data from block [%ld-%ld]\n",
gend, (graft->flags[post-cbegin]&FLAGS_VERIFIED)
? "verified" : "unverified", cbegin, cend);
#endif
root->returnedlimit=re(root);
return;
}
@@ -1588,6 +1598,11 @@ verify_skip_case(cdrom_paranoia_t *p,
c_append(rc(root),temp,CDIO_CD_FRAMESIZE_RAW);
free(temp);
}
#if TRACE_PARANOIA
fprintf(stderr, "%ld], filled with zero\n", re(root));
#endif
root->returnedlimit=re(root);
}
}