cdparanoia: add ability to disable byte swapping

configure.ac: remove AIX driver for now - it doesn't really work
remove some (but not all) of the valgrind errors in cd-text
Some stylistic things, doxygen comment improvements typos, etc.
This commit is contained in:
rocky
2005-01-27 03:10:06 +00:00
parent e30c3a3eb8
commit 9e2eaf7546
15 changed files with 97 additions and 71 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: common_interface.c,v 1.11 2005/01/23 00:27:11 rocky Exp $
$Id: common_interface.c,v 1.12 2005/01/27 03:10:06 rocky Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 1998, 2002 Monty monty@xiph.org
@@ -185,6 +185,11 @@ data_bigendianp(cdrom_drive_t *d)
rocky OMITTED FOR NOW:
The multisession stuff is from Hannu's code; it assumes it knows
the leadout/leadin size.
@return -1 if we can't get multisession info, 0 if there is one
session only or the multi-session LBA is less than or 100 (don't
ask me why -- I don't know), and 1 if the multi-session lba is
greater than 100.
*/
int
FixupTOC(cdrom_drive_t *d, track_t i_tracks)

View File

@@ -1,5 +1,5 @@
/*
$Id: interface.c,v 1.17 2005/01/26 01:03:16 rocky Exp $
$Id: interface.c,v 1.18 2005/01/27 03:10:06 rocky Exp $
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 1998 Monty xiphmont@mit.edu
@@ -155,17 +155,17 @@ cdio_cddap_read(cdrom_drive_t *d, void *buffer, lsn_t beginsector,
if (sectors>0) {
sectors=d->read_audio(d, buffer, beginsector, sectors);
if (sectors > 0){
if (sectors > 0) {
/* byteswap? */
if(d->bigendianp==-1) /* not determined yet */
if ( d->bigendianp == -1 ) /* not determined yet */
d->bigendianp = data_bigendianp(d);
if(d->bigendianp!=bigendianp()){
if ( d->b_swap_bytes && d->bigendianp != bigendianp() ) {
int i;
uint16_t *p=(uint16_t *)buffer;
long els=sectors*CDIO_CD_FRAMESIZE_RAW/2;
/* Note: Something perhaps in the original cdparanioa code might
/* Note: Something perhaps in the original cdparanoia code might
cause the code to access outside of the allocated range of
buffer. This comment is just to serve as a marker for
the loop where the data got clobbered. I don't think this

View File

@@ -1,5 +1,5 @@
/*
$Id: scan_devices.c,v 1.17 2005/01/25 11:04:45 rocky Exp $
$Id: scan_devices.c,v 1.18 2005/01/27 03:10:06 rocky Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 1998 Monty xiphmont@mit.edu
@@ -262,6 +262,7 @@ cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device,
d->interface = COOKED_IOCTL;
d->bigendianp = -1; /* We don't know yet... */
d->nsectors = -1;
d->b_swap_bytes = true;
{
cdio_hwinfo_t hw_info;