compilation fixes.

This commit is contained in:
rocky
2004-04-30 07:33:51 +00:00
parent a77be90ba4
commit 46fd3abf81
3 changed files with 18 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/* /*
$Id: ioctl.c,v 1.11 2004/04/30 06:54:15 rocky Exp $ $Id: ioctl.c,v 1.12 2004/04/30 07:33:51 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -26,7 +26,7 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: ioctl.c,v 1.11 2004/04/30 06:54:15 rocky Exp $"; static const char _rcsid[] = "$Id: ioctl.c,v 1.12 2004/04/30 07:33:51 rocky Exp $";
#include <cdio/cdio.h> #include <cdio/cdio.h>
#include <cdio/sector.h> #include <cdio/sector.h>
@@ -390,7 +390,7 @@ win32ioctl_read_toc (_img_private_t *env)
*/ */
char * char *
win32ioctl_get_mcn (_img_private_t *env) { win32ioctl_get_mcn (const _img_private_t *env) {
DWORD dwBytesReturned; DWORD dwBytesReturned;
SUB_Q_MEDIA_CATALOG_NUMBER mcn; SUB_Q_MEDIA_CATALOG_NUMBER mcn;

View File

@@ -1,5 +1,5 @@
/* /*
$Id: win32.c,v 1.8 2004/04/30 06:54:15 rocky Exp $ $Id: win32.c,v 1.9 2004/04/30 07:33:51 rocky Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -26,7 +26,7 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: win32.c,v 1.8 2004/04/30 06:54:15 rocky Exp $"; static const char _rcsid[] = "$Id: win32.c,v 1.9 2004/04/30 07:33:51 rocky Exp $";
#include <cdio/cdio.h> #include <cdio/cdio.h>
#include <cdio/sector.h> #include <cdio/sector.h>
@@ -73,7 +73,7 @@ _cdio_mciSendCommand(int id, UINT msg, DWORD flags, void *arg)
} }
static access_mode_t static access_mode_t
str_to_access_mode_linux(const char *psz_access_mode) str_to_access_mode_win32(const char *psz_access_mode)
{ {
const access_mode_t default_access_mode = const access_mode_t default_access_mode =
WIN_NT ? _AM_IOCTL : _AM_ASPI; WIN_NT ? _AM_IOCTL : _AM_ASPI;
@@ -83,7 +83,8 @@ str_to_access_mode_linux(const char *psz_access_mode)
if (!strcmp(psz_access_mode, "IOCTL")) if (!strcmp(psz_access_mode, "IOCTL"))
return _AM_IOCTL; return _AM_IOCTL;
else if (!strcmp(psz_access_mode, "ASPI")) else if (!strcmp(psz_access_mode, "ASPI"))
return _AM_READ_CD; return _AM_ASPI;
else {
cdio_warn ("unknown access type: %s. Default IOCTL used.", cdio_warn ("unknown access type: %s. Default IOCTL used.",
psz_access_mode); psz_access_mode);
return default_access_mode; return default_access_mode;
@@ -111,7 +112,7 @@ _cdio_get_drive_cap (const void *env) {
const _img_private_t *_obj = env; const _img_private_t *_obj = env;
if (_obj->hASPI) { if (_obj->hASPI) {
return CDIO_DRIVE_UNKNOWN; return CDIO_DRIVE_CAP_UNKNOWN;
} else { } else {
return win32ioctl_get_drive_cap (env); return win32ioctl_get_drive_cap (env);
} }
@@ -336,7 +337,7 @@ _set_arg_win32 (void *user_data, const char key[], const char value[])
} }
else if (!strcmp (key, "access-mode")) else if (!strcmp (key, "access-mode"))
{ {
return str_to_access_mode_linux(value); return str_to_access_mode_win32(value);
} }
else else
return -1; return -1;
@@ -441,9 +442,9 @@ _cdio_get_first_track_num(void *user_data)
*/ */
static char * static char *
_cdio_get_mcn (void *env) { _cdio_get_mcn (const void *env) {
_img_private_t *_env = env; const _img_private_t *_env = env;
if( ! _env->hASPI ) { if( ! _env->hASPI ) {
return win32ioctl_get_mcn(_env); return win32ioctl_get_mcn(_env);
@@ -649,7 +650,7 @@ cdio_is_device_win32(const char *source_name)
ones to set that up. ones to set that up.
*/ */
CdIo * CdIo *
cdio_open_win32 (const char *source_name) cdio_open_win32 (const char *psz_source_name)
{ {
#ifdef HAVE_WIN32_CDROM #ifdef HAVE_WIN32_CDROM
if ( WIN_NT ) { if ( WIN_NT ) {
@@ -704,8 +705,8 @@ cdio_open_am_win32 (const char *psz_source_name, const char *psz_access_mode)
_data->gen.init = false; _data->gen.init = false;
_data->gen.fd = -1; _data->gen.fd = -1;
_set_arg_win32(_data, "source", (NULL == source_name) _set_arg_win32(_data, "source", (NULL == psz_source_name)
? cdio_get_default_device_win32(): source_name); ? cdio_get_default_device_win32(): psz_source_name);
ret = cdio_new (_data, &_funcs); ret = cdio_new (_data, &_funcs);
if (ret == NULL) return NULL; if (ret == NULL) return NULL;

View File

@@ -1,5 +1,5 @@
/* /*
$Id: win32.h,v 1.3 2004/04/30 06:54:15 rocky Exp $ $Id: win32.h,v 1.4 2004/04/30 07:33:51 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -31,8 +31,7 @@ typedef struct {
typedef enum { typedef enum {
_AM_NONE, _AM_NONE,
_AM_IOCTL, _AM_IOCTL,
_AM_READ_CD, _AM_ASPI,
_AM_READ_10
} access_mode_t; } access_mode_t;
typedef struct { typedef struct {
@@ -93,7 +92,7 @@ bool win32ioctl_init_win32 (_img_private_t *env);
*/ */
bool win32ioctl_read_toc (_img_private_t *env); bool win32ioctl_read_toc (_img_private_t *env);
char *win32ioctl_get_mcn (_img_private_t *env); char *win32ioctl_get_mcn (const _img_private_t *env);
/*! /*!
Return the the kind of drive capabilities of device. Return the the kind of drive capabilities of device.