Yet more code cleanups.

This commit is contained in:
rocky
2004-07-13 04:33:05 +00:00
parent b45ada9181
commit 2649b729a1
4 changed files with 24 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: aspi32.c,v 1.17 2004/07/13 03:59:09 rocky Exp $
$Id: aspi32.c,v 1.18 2004/07/13 04:33:07 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: aspi32.c,v 1.17 2004/07/13 03:59:09 rocky Exp $";
static const char _rcsid[] = "$Id: aspi32.c,v 1.18 2004/07/13 04:33:07 rocky Exp $";
#include <cdio/cdio.h>
#include <cdio/sector.h>
@@ -385,7 +385,7 @@ init_aspi (_img_private_t *env)
Returns 0 if no error.
*/
static int
mmc_read_sectors_aspi (const _img_private_t *env, void *data, lsn_t lsn,
read_sectors_aspi (const _img_private_t *env, void *data, lsn_t lsn,
int sector_type, unsigned int nblocks)
{
HANDLE hEvent;
@@ -487,8 +487,8 @@ int
read_audio_sectors_aspi (_img_private_t *env, void *data, lsn_t lsn,
unsigned int nblocks)
{
if (mmc_read_sectors_aspi(env, data, lsn, CDIO_MMC_READ_TYPE_CDDA, 1)) {
return mmc_read_sectors_aspi(env, data, lsn, CDIO_MMC_READ_TYPE_ANY, 1);
if (read_sectors_aspi(env, data, lsn, CDIO_MMC_READ_TYPE_CDDA, 1)) {
return read_sectors_aspi(env, data, lsn, CDIO_MMC_READ_TYPE_ANY, 1);
}
return 0;
}
@@ -501,7 +501,7 @@ int
read_mode2_sector_aspi (const _img_private_t *env, void *data, lsn_t lsn,
bool b_form2)
{
return mmc_read_sectors_aspi(env, data, lsn, b_form2
return read_sectors_aspi(env, data, lsn, b_form2
? CDIO_MMC_READ_TYPE_M2F2
: CDIO_MMC_READ_TYPE_M2F1,
1);
@@ -515,7 +515,7 @@ int
read_mode1_sector_aspi (const _img_private_t *env, void *data, lsn_t lsn,
bool b_form2)
{
return mmc_read_sectors_aspi(env, data, lsn, CDIO_MMC_READ_TYPE_MODE1, 1);
return read_sectors_aspi(env, data, lsn, CDIO_MMC_READ_TYPE_MODE1, 1);
}
/*!

View File

@@ -1,6 +1,6 @@
/* Win32 aspi specific */
/*
$Id: aspi32.h,v 1.5 2004/07/13 03:45:26 rocky Exp $
$Id: aspi32.h,v 1.6 2004/07/13 04:33:08 rocky Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -186,7 +186,7 @@ track_format_t get_track_format_aspi(const _img_private_t *env,
bool init_aspi (_img_private_t *env);
/*!
Return the value associated with the key "arg".
Return the CD-TEXT structure
*/
const cdtext_t *get_cdtext_aspi (_img_private_t *env);

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_linux.c,v 1.61 2004/07/09 01:05:32 rocky Exp $
$Id: _cdio_linux.c,v 1.62 2004/07/13 04:33:05 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.61 2004/07/09 01:05:32 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.62 2004/07/13 04:33:05 rocky Exp $";
#include <string.h>
@@ -261,7 +261,7 @@ _set_bsize (int fd, unsigned int bsize)
Can read only up to 25 blocks.
*/
static int
_cdio_mmc_read_sectors (int fd, void *buf, lba_t lba, int sector_type,
_read_sectors_mmc (int fd, void *buf, lba_t lba, int sector_type,
unsigned int nblocks)
{
cgc_t cgc;
@@ -295,7 +295,7 @@ _read_audio_sectors_linux (void *user_data, void *buf, lsn_t lsn,
unsigned int nblocks)
{
_img_private_t *env = user_data;
return _cdio_mmc_read_sectors( env->gen.fd, buf, lsn,
return _read_sectors_mmc( env->gen.fd, buf, lsn,
CDIO_MMC_READ_TYPE_CDDA, nblocks);
}
@@ -303,7 +303,7 @@ _read_audio_sectors_linux (void *user_data, void *buf, lsn_t lsn,
Can read only up to 25 blocks.
*/
static int
_read_packet_mode2_sectors_mmc (int fd, void *buf, lba_t lba,
_read_mode2_sectors_mmc (int fd, void *buf, lba_t lba,
unsigned int nblocks, bool b_read_10)
{
struct cdrom_generic_command cgc;
@@ -352,7 +352,7 @@ _read_packet_mode2_sectors_mmc (int fd, void *buf, lba_t lba,
}
static int
_read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
_read_mode2_sectors (int fd, void *buf, lba_t lba,
unsigned int nblocks, bool b_read_10)
{
unsigned int l = 0;
@@ -363,7 +363,7 @@ _read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
const unsigned nblocks2 = (nblocks > 25) ? 25 : nblocks;
void *buf2 = ((char *)buf ) + (l * M2RAW_SECTOR_SIZE);
retval |= _read_packet_mode2_sectors_mmc (fd, buf2, lba + l, nblocks2,
retval |= _read_mode2_sectors_mmc (fd, buf2, lba + l, nblocks2,
b_read_10);
if (retval)
@@ -416,7 +416,7 @@ _read_mode1_sector_linux (void *env, void *data, lsn_t lsn,
case _AM_READ_CD:
case _AM_READ_10:
if (_read_packet_mode2_sectors (_obj->gen.fd, buf, lsn, 1,
if (_read_mode2_sectors (_obj->gen.fd, buf, lsn, 1,
(_obj->access_mode == _AM_READ_10)))
{
perror ("ioctl()");
@@ -507,7 +507,7 @@ _read_mode2_sector_linux (void *user_data, void *data, lsn_t lsn,
case _AM_READ_CD:
case _AM_READ_10:
if (_read_packet_mode2_sectors (env->gen.fd, buf, lsn, 1,
if (_read_mode2_sectors (env->gen.fd, buf, lsn, 1,
(env->access_mode == _AM_READ_10)))
{
perror ("ioctl()");

View File

@@ -1,5 +1,5 @@
/*
$Id: image_common.h,v 1.10 2004/07/13 03:45:25 rocky Exp $
$Id: image_common.h,v 1.11 2004/07/13 04:33:07 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -90,7 +90,7 @@ _get_arg_image (void *user_data, const char key[])
}
/*!
Return the value associated with the key "arg".
Return the CD-TEXT structure
*/
static const cdtext_t *
_get_cdtext_image (void *user_data)