diff --git a/lib/driver/MSWindows/aspi32.c b/lib/driver/MSWindows/aspi32.c index f2426487..54abb9a6 100644 --- a/lib/driver/MSWindows/aspi32.c +++ b/lib/driver/MSWindows/aspi32.c @@ -1,7 +1,7 @@ /* - $Id: aspi32.c,v 1.3 2005/01/01 15:08:48 rocky Exp $ + $Id: aspi32.c,v 1.4 2005/01/27 11:08:55 rocky Exp $ - Copyright (C) 2004 Rocky Bernstein + Copyright (C) 2004, 2005 Rocky Bernstein This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ # include "config.h" #endif -static const char _rcsid[] = "$Id: aspi32.c,v 1.3 2005/01/01 15:08:48 rocky Exp $"; +static const char _rcsid[] = "$Id: aspi32.c,v 1.4 2005/01/27 11:08:55 rocky Exp $"; #include #include @@ -488,7 +488,7 @@ init_aspi (_img_private_t *env) We return 0 if command completed successfully. */ int -run_scsi_cmd_aspi( const void *p_user_data, unsigned int i_timeout_ms, +run_scsi_cmd_aspi( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const scsi_mmc_cdb_t * p_cdb, scsi_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) @@ -550,7 +550,7 @@ run_scsi_cmd_aspi( const void *p_user_data, unsigned int i_timeout_ms, Returns 0 if no error. */ static int -read_sectors_aspi (const _img_private_t *env, void *data, lsn_t lsn, +read_sectors_aspi (_img_private_t *p_env, void *data, lsn_t lsn, int sector_type, unsigned int nblocks) { scsi_mmc_cdb_t cdb = {{0, }}; @@ -602,7 +602,7 @@ read_sectors_aspi (const _img_private_t *env, void *data, lsn_t lsn, i_buf = CDIO_CD_FRAMESIZE_RAW; } - return run_scsi_cmd_aspi(env, OP_TIMEOUT_MS, + return run_scsi_cmd_aspi(p_env, OP_TIMEOUT_MS, scsi_mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, i_buf*nblocks, data); } @@ -612,11 +612,12 @@ read_sectors_aspi (const _img_private_t *env, void *data, lsn_t lsn, Returns 0 if no error. */ int -read_audio_sectors_aspi (_img_private_t *env, void *data, lsn_t lsn, - unsigned int nblocks) +read_audio_sectors_aspi (_img_private_t *p_env, void *data, lsn_t lsn, + unsigned int i_blocks) { - 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); + if (read_sectors_aspi(p_env, data, lsn, CDIO_MMC_READ_TYPE_CDDA, i_blocks)) { + return read_sectors_aspi(p_env, data, lsn, + CDIO_MMC_READ_TYPE_ANY, i_blocks); } return 0; } @@ -626,10 +627,10 @@ read_audio_sectors_aspi (_img_private_t *env, void *data, lsn_t lsn, from lsn. Returns 0 if no error. */ int -read_mode2_sector_aspi (const _img_private_t *env, void *data, lsn_t lsn, +read_mode2_sector_aspi (_img_private_t *p_env, void *data, lsn_t lsn, bool b_form2) { - return read_sectors_aspi(env, data, lsn, b_form2 + return read_sectors_aspi(p_env, data, lsn, b_form2 ? CDIO_MMC_READ_TYPE_M2F2 : CDIO_MMC_READ_TYPE_M2F1, 1); @@ -640,10 +641,10 @@ read_mode2_sector_aspi (const _img_private_t *env, void *data, lsn_t lsn, from lsn. Returns 0 if no error. */ int -read_mode1_sector_aspi (const _img_private_t *env, void *data, lsn_t lsn, +read_mode1_sector_aspi (_img_private_t *p_env, void *data, lsn_t lsn, bool b_form2) { - return read_sectors_aspi(env, data, lsn, CDIO_MMC_READ_TYPE_MODE1, 1); + return read_sectors_aspi(p_env, data, lsn, CDIO_MMC_READ_TYPE_MODE1, 1); } /*! diff --git a/lib/driver/MSWindows/aspi32.h b/lib/driver/MSWindows/aspi32.h index 1f607592..027ab6c3 100644 --- a/lib/driver/MSWindows/aspi32.h +++ b/lib/driver/MSWindows/aspi32.h @@ -1,8 +1,8 @@ /* Win32 aspi specific */ /* - $Id: aspi32.h,v 1.1 2004/12/18 17:29:32 rocky Exp $ + $Id: aspi32.h,v 1.2 2005/01/27 11:08:55 rocky Exp $ - Copyright (C) 2003, 2004 Rocky Bernstein + Copyright (C) 2003, 2004, 2005 Rocky Bernstein This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -210,13 +210,13 @@ int read_audio_sectors_aspi (_img_private_t *obj, void *data, lsn_t lsn, Reads a single mode1 sector using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ -int read_mode1_sector_aspi (const _img_private_t *env, void *data, +int read_mode1_sector_aspi (_img_private_t *env, void *data, lsn_t lsn, bool b_form2); /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ -int read_mode2_sector_aspi (const _img_private_t *env, void *data, lsn_t lsn, +int read_mode2_sector_aspi (_img_private_t *env, void *data, lsn_t lsn, bool b_form2); /*! @@ -240,7 +240,7 @@ bool read_toc_aspi (_img_private_t *env); Return 0 if command completed successfully. */ -int run_scsi_cmd_aspi( const void *p_user_data, +int run_scsi_cmd_aspi( void *p_user_data, unsigned int i_timeout, unsigned int i_cdb, const scsi_mmc_cdb_t * p_cdb, diff --git a/lib/driver/MSWindows/win32.c b/lib/driver/MSWindows/win32.c index 0fc98329..800b3705 100644 --- a/lib/driver/MSWindows/win32.c +++ b/lib/driver/MSWindows/win32.c @@ -1,5 +1,5 @@ /* - $Id: win32.c,v 1.13 2005/01/24 00:23:18 rocky Exp $ + $Id: win32.c,v 1.14 2005/01/27 11:08:55 rocky Exp $ Copyright (C) 2003, 2004, 2005 Rocky Bernstein @@ -26,7 +26,7 @@ # include "config.h" #endif -static const char _rcsid[] = "$Id: win32.c,v 1.13 2005/01/24 00:23:18 rocky Exp $"; +static const char _rcsid[] = "$Id: win32.c,v 1.14 2005/01/27 11:08:55 rocky Exp $"; #include #include @@ -171,7 +171,7 @@ run_scsi_cmd_win32( void *p_user_data, unsigned int i_timeout_ms, scsi_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { - const _img_private_t *p_env = p_user_data; + _img_private_t *p_env = p_user_data; if (p_env->hASPI) { return run_scsi_cmd_aspi( p_env, i_timeout_ms, i_cdb, p_cdb, diff --git a/lib/driver/MSWindows/win32.h b/lib/driver/MSWindows/win32.h index 98b33b30..35729aaf 100644 --- a/lib/driver/MSWindows/win32.h +++ b/lib/driver/MSWindows/win32.h @@ -1,7 +1,7 @@ /* - $Id: win32.h,v 1.1 2004/12/18 17:29:32 rocky Exp $ + $Id: win32.h,v 1.2 2005/01/27 11:08:55 rocky Exp $ - Copyright (C) 2004 Rocky Bernstein + Copyright (C) 2004, 2005 Rocky Bernstein This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -99,7 +99,7 @@ const char *is_cdrom_win32ioctl (const char drive_letter); Return 0 if command completed successfully. */ -int run_scsi_cmd_win32ioctl( const void *p_user_data, +int run_scsi_cmd_win32ioctl( void *p_user_data, unsigned int i_timeout, unsigned int i_cdb, const scsi_mmc_cdb_t * p_cdb, @@ -109,13 +109,13 @@ int run_scsi_cmd_win32ioctl( const void *p_user_data, /*! Initialize internal structures for CD device. */ -bool init_win32ioctl (_img_private_t *env); +bool init_win32ioctl (_img_private_t *p_env); /*! Read and cache the CD's Track Table of Contents and track info. Return true if successful or false if an error. */ -bool read_toc_win32ioctl (_img_private_t *env); +bool read_toc_win32ioctl (_img_private_t *p_env); /*! Return the media catalog number MCN. @@ -124,7 +124,7 @@ bool read_toc_win32ioctl (_img_private_t *env); string when done with it. */ -char *get_mcn_win32ioctl (const _img_private_t *env); +char *get_mcn_win32ioctl (const _img_private_t *p_env); /* Read cdtext information for a CdIo object . @@ -132,7 +132,7 @@ char *get_mcn_win32ioctl (const _img_private_t *env); return true on success, false on error or CD-TEXT information does not exist. */ -bool init_cdtext_win32ioctl (_img_private_t *env); +bool init_cdtext_win32ioctl (_img_private_t *p_env); /*! Return the the kind of drive capabilities of device. @@ -141,7 +141,7 @@ bool init_cdtext_win32ioctl (_img_private_t *env); string when done with it. */ -void get_drive_cap_aspi (const _img_private_t *env, +void get_drive_cap_aspi (const _img_private_t *p_env, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); @@ -153,7 +153,7 @@ void get_drive_cap_aspi (const _img_private_t *env, string when done with it. */ -void get_drive_cap_win32ioctl (const _img_private_t *env, +void get_drive_cap_win32ioctl (const _img_private_t *p_env, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); @@ -161,7 +161,7 @@ void get_drive_cap_win32ioctl (const _img_private_t *env, /*! Get the format (XA, DATA, AUDIO) of a track. */ -track_format_t get_track_format_win32ioctl(const _img_private_t *env, +track_format_t get_track_format_win32ioctl(const _img_private_t *p_env, track_t i_track); void set_cdtext_field_win32(void *user_data, track_t i_track, diff --git a/lib/driver/MSWindows/win32_ioctl.c b/lib/driver/MSWindows/win32_ioctl.c index 5d89f3ed..ec1d532b 100644 --- a/lib/driver/MSWindows/win32_ioctl.c +++ b/lib/driver/MSWindows/win32_ioctl.c @@ -1,5 +1,5 @@ /* - $Id: win32_ioctl.c,v 1.7 2005/01/19 17:25:50 rocky Exp $ + $Id: win32_ioctl.c,v 1.8 2005/01/27 11:08:55 rocky Exp $ Copyright (C) 2004 Rocky Bernstein @@ -26,7 +26,7 @@ # include "config.h" #endif -static const char _rcsid[] = "$Id: win32_ioctl.c,v 1.7 2005/01/19 17:25:50 rocky Exp $"; +static const char _rcsid[] = "$Id: win32_ioctl.c,v 1.8 2005/01/27 11:08:55 rocky Exp $"; #ifdef HAVE_WIN32_CDROM @@ -184,7 +184,7 @@ typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER { Return 0 if command completed successfully. */ int -run_scsi_cmd_win32ioctl( const void *p_user_data, +run_scsi_cmd_win32ioctl( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const scsi_mmc_cdb_t * p_cdb, scsi_mmc_direction_t e_direction, @@ -398,7 +398,7 @@ read_audio_sectors_win32ioctl (_img_private_t *p_env, void *data, lsn_t lsn, data starting from lsn. Returns 0 if no error. */ static int -read_raw_sector (const _img_private_t *p_env, void *p_buf, lsn_t lsn) +read_raw_sector (_img_private_t *p_env, void *p_buf, lsn_t lsn) { scsi_mmc_cdb_t cdb = {{0, }}; diff --git a/lib/driver/scsi_mmc.c b/lib/driver/scsi_mmc.c index a5b53d47..0602bbbb 100644 --- a/lib/driver/scsi_mmc.c +++ b/lib/driver/scsi_mmc.c @@ -1,6 +1,6 @@ /* Common SCSI Multimedia Command (MMC) routines. - $Id: scsi_mmc.c,v 1.11 2005/01/24 00:06:31 rocky Exp $ + $Id: scsi_mmc.c,v 1.12 2005/01/27 11:08:55 rocky Exp $ Copyright (C) 2004, 2005 Rocky Bernstein @@ -288,7 +288,7 @@ scsi_mmc_get_drive_cap_private (void *p_env, Get the DVD type associated with cd object. */ discmode_t -scsi_mmc_get_dvd_struct_physical_private ( void *p_env, const +scsi_mmc_get_dvd_struct_physical_private ( void *p_env, scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd, cdio_dvd_struct_t *s) { diff --git a/lib/driver/scsi_mmc_private.h b/lib/driver/scsi_mmc_private.h index 5c98860c..68b38eaf 100644 --- a/lib/driver/scsi_mmc_private.h +++ b/lib/driver/scsi_mmc_private.h @@ -1,6 +1,6 @@ /* private MMC helper routines. - $Id: scsi_mmc_private.h,v 1.5 2005/01/24 00:06:31 rocky Exp $ + $Id: scsi_mmc_private.h,v 1.6 2005/01/27 11:08:55 rocky Exp $ Copyright (C) 2004, 2005 Rocky Bernstein @@ -84,7 +84,7 @@ int scsi_mmc_set_blocksize_mmc_private ( const void *p_env, const Get the DVD type associated with cd object. */ discmode_t -scsi_mmc_get_dvd_struct_physical_private ( void *p_env, const +scsi_mmc_get_dvd_struct_physical_private ( void *p_env, scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd, cdio_dvd_struct_t *s );