add _t to another time. driver_id inside p_cdio wasn't initialized.

This commit is contained in:
rocky
2005-01-17 17:20:09 +00:00
parent 8c8c08aa67
commit 17c55ea59b
13 changed files with 59 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: freebsd.c,v 1.2 2005/01/12 12:15:25 rocky Exp $
$Id: freebsd.c,v 1.3 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: freebsd.c,v 1.2 2005/01/12 12:15:25 rocky Exp $";
static const char _rcsid[] = "$Id: freebsd.c,v 1.3 2005/01/17 17:20:09 rocky Exp $";
#include "freebsd.h"
@@ -554,7 +554,7 @@ cdio_open_am_freebsd (const char *psz_orig_source_name,
_img_private_t *_data;
char *psz_source_name;
cdio_funcs _funcs = {
cdio_funcs_t _funcs = {
.eject_media = _eject_media_freebsd,
.free = _free_freebsd,
.get_arg = _get_arg_freebsd,

View File

@@ -1,5 +1,5 @@
/*
$Id: win32.c,v 1.4 2005/01/14 21:41:36 rocky Exp $
$Id: win32.c,v 1.5 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -26,7 +26,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: win32.c,v 1.4 2005/01/14 21:41:36 rocky Exp $";
static const char _rcsid[] = "$Id: win32.c,v 1.5 2005/01/17 17:20:09 rocky Exp $";
#include <cdio/cdio.h>
#include <cdio/sector.h>
@@ -726,7 +726,7 @@ cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode)
_img_private_t *_data;
char *psz_source;
cdio_funcs _funcs;
cdio_funcs_t _funcs;
memset( &_funcs, 0, sizeof(_funcs) );

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_aix.c,v 1.2 2005/01/02 22:43:41 rocky Exp $
$Id: _cdio_aix.c,v 1.3 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -37,7 +37,7 @@
#ifdef HAVE_AIX_CDROM
static const char _rcsid[] = "$Id: _cdio_aix.c,v 1.2 2005/01/02 22:43:41 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_aix.c,v 1.3 2005/01/17 17:20:09 rocky Exp $";
#ifdef HAVE_GLOB_H
#include <glob.h>
@@ -940,7 +940,7 @@ cdio_open_am_aix (const char *psz_orig_source, const char *access_mode)
_img_private_t *_data;
char *psz_source;
cdio_funcs _funcs;
cdio_funcs_t _funcs;
_funcs.eject_media = eject_media_aix;
_funcs.free = cdio_generic_free;
@@ -996,6 +996,8 @@ cdio_open_am_aix (const char *psz_orig_source, const char *access_mode)
}
}
ret->driver_id = DRIVER_AIX;
ret = cdio_new ( (void *) _data, &_funcs );
if (ret == NULL) return NULL;

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_bsdi.c,v 1.2 2005/01/02 22:43:41 rocky Exp $
$Id: _cdio_bsdi.c,v 1.3 2005/01/17 17:20:09 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_bsdi.c,v 1.2 2005/01/02 22:43:41 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_bsdi.c,v 1.3 2005/01/17 17:20:09 rocky Exp $";
#include <cdio/logging.h>
#include <cdio/sector.h>
@@ -764,7 +764,7 @@ cdio_open_bsdi (const char *psz_orig_source)
_img_private_t *_data;
char *psz_source;
cdio_funcs _funcs = {
cdio_funcs_t _funcs = {
.eject_media = _eject_media_bsdi,
.free = cdio_generic_free,
.get_arg = _get_arg_bsdi,
@@ -822,6 +822,8 @@ cdio_open_bsdi (const char *psz_orig_source)
ret = cdio_new ( (void *) _data, &_funcs);
if (ret == NULL) return NULL;
ret->driver_id = DRIVER_BSDI;
if (_cdio_init(_data))
return ret;
else {

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_linux.c,v 1.6 2005/01/02 22:43:41 rocky Exp $
$Id: _cdio_linux.c,v 1.7 2005/01/17 17:20:09 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.6 2005/01/02 22:43:41 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.7 2005/01/17 17:20:09 rocky Exp $";
#include <string.h>
@@ -1124,7 +1124,7 @@ cdio_open_am_linux (const char *psz_orig_source, const char *access_mode)
_img_private_t *_data;
char *psz_source;
cdio_funcs _funcs = {
cdio_funcs_t _funcs = {
.eject_media = eject_media_linux,
.free = cdio_generic_free,
.get_arg = get_arg_linux,
@@ -1190,6 +1190,8 @@ cdio_open_am_linux (const char *psz_orig_source, const char *access_mode)
ret = cdio_new ((void *)_data, &_funcs);
if (ret == NULL) return NULL;
ret->driver_id = DRIVER_LINUX;
if (cdio_generic_init(_data)) {
return ret;
} else {

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_osx.c,v 1.4 2005/01/14 22:04:24 rocky Exp $
$Id: _cdio_osx.c,v 1.5 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
from vcdimager code:
@@ -34,7 +34,7 @@
#include "config.h"
#endif
static const char _rcsid[] = "$Id: _cdio_osx.c,v 1.4 2005/01/14 22:04:24 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_osx.c,v 1.5 2005/01/17 17:20:09 rocky Exp $";
#include <cdio/logging.h>
#include <cdio/sector.h>
@@ -1389,7 +1389,7 @@ cdio_open_osx (const char *psz_orig_source)
_img_private_t *_data;
char *psz_source;
cdio_funcs _funcs = {
cdio_funcs_t _funcs = {
.eject_media = _eject_media_osx,
.free = _free_osx,
.get_arg = _get_arg_osx,
@@ -1451,6 +1451,8 @@ cdio_open_osx (const char *psz_orig_source)
ret = cdio_new ((void *)_data, &_funcs);
if (ret == NULL) return NULL;
ret->driver_id = DRIVER_OSX;
if (cdio_generic_init(_data) && init_osx(_data))
return ret;
else {

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_sunos.c,v 1.5 2005/01/09 01:50:56 rocky Exp $
$Id: _cdio_sunos.c,v 1.6 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -38,7 +38,7 @@
#ifdef HAVE_SOLARIS_CDROM
static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.5 2005/01/09 01:50:56 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.6 2005/01/17 17:20:09 rocky Exp $";
#ifdef HAVE_GLOB_H
#include <glob.h>
@@ -854,7 +854,7 @@ cdio_open_am_solaris (const char *psz_orig_source, const char *access_mode)
_img_private_t *_data;
char *psz_source;
cdio_funcs _funcs;
cdio_funcs_t _funcs;
_funcs.eject_media = eject_media_solaris;
_funcs.free = cdio_generic_free;
@@ -916,6 +916,8 @@ cdio_open_am_solaris (const char *psz_orig_source, const char *access_mode)
ret = cdio_new ( (void *) _data, &_funcs );
if (ret == NULL) return NULL;
ret->driver_id = DRIVER_SOLARIS;
if (init_solaris(_data))
return ret;
else {

View File

@@ -1,5 +1,5 @@
/*
$Id: cdio.c,v 1.8 2005/01/09 16:07:46 rocky Exp $
$Id: cdio.c,v 1.9 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@@ -35,7 +35,7 @@
#include <cdio/util.h>
#include "cdio_private.h"
static const char _rcsid[] = "$Id: cdio.c,v 1.8 2005/01/09 16:07:46 rocky Exp $";
static const char _rcsid[] = "$Id: cdio.c,v 1.9 2005/01/17 17:20:09 rocky Exp $";
/*!
@@ -74,7 +74,7 @@ cdio_get_cdtext (CdIo *obj, track_t i_track)
}
CdIo_t *
cdio_new (generic_img_private_t *p_env, cdio_funcs *p_funcs)
cdio_new (generic_img_private_t *p_env, cdio_funcs_t *p_funcs)
{
CdIo_t *p_new_cdio = _cdio_malloc (sizeof (CdIo_t));

View File

@@ -1,5 +1,5 @@
/*
$Id: cdio_private.h,v 1.4 2005/01/04 04:33:36 rocky Exp $
$Id: cdio_private.h,v 1.5 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -267,13 +267,13 @@ extern "C" {
*/
uint32_t (*stat_size) (void *p_env);
} cdio_funcs;
} cdio_funcs_t;
/*! Implementation of CdIo type */
struct _CdIo {
driver_id_t driver_id; /**< Particular driver opened. */
cdio_funcs op; /**< driver-specific routines handling
cdio_funcs_t op; /**< driver-specific routines handling
implementation*/
void *env; /**< environment. Passed to routine above. */
};
@@ -289,7 +289,7 @@ extern "C" {
lba_t lba; /* Current LBA */
} internal_position_t;
CdIo * cdio_new (generic_img_private_t *p_env, cdio_funcs *funcs);
CdIo_t * cdio_new (generic_img_private_t *p_env, cdio_funcs_t *p_funcs);
/* The below structure describes a specific CD Input driver */
typedef struct

View File

@@ -1,5 +1,5 @@
/*
$Id: device.c,v 1.2 2005/01/14 19:25:45 rocky Exp $
$Id: device.c,v 1.3 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
@@ -530,10 +530,10 @@ cdio_get_drive_cap_dev (const char *device,
then return NULL.
*/
const char *
cdio_get_driver_name (const CdIo_t *cdio)
cdio_get_driver_name (const CdIo_t *p_cdio)
{
if (NULL==cdio) return NULL;
return CdIo_all_drivers[cdio->driver_id].name;
if (NULL==p_cdio) return NULL;
return CdIo_all_drivers[p_cdio->driver_id].name;
}
/*!

View File

@@ -1,5 +1,5 @@
/*
$Id: bincue.c,v 1.4 2005/01/04 04:33:36 rocky Exp $
$Id: bincue.c,v 1.5 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@@ -26,7 +26,7 @@
(*.cue).
*/
static const char _rcsid[] = "$Id: bincue.c,v 1.4 2005/01/04 04:33:36 rocky Exp $";
static const char _rcsid[] = "$Id: bincue.c,v 1.5 2005/01/17 17:20:09 rocky Exp $";
#include "image.h"
#include "cdio_assert.h"
@@ -1093,7 +1093,7 @@ cdio_is_binfile(const char *psz_bin_name)
get called via a function pointer. In fact *we* are the
ones to set that up.
*/
CdIo *
CdIo_t *
cdio_open_am_bincue (const char *psz_source_name, const char *psz_access_mode)
{
if (psz_access_mode != NULL)
@@ -1107,7 +1107,7 @@ cdio_open_am_bincue (const char *psz_source_name, const char *psz_access_mode)
get called via a function pointer. In fact *we* are the
ones to set that up.
*/
CdIo *
CdIo_t *
cdio_open_bincue (const char *source_name)
{
char *psz_bin_name = cdio_is_cuefile(source_name);
@@ -1123,15 +1123,15 @@ cdio_open_bincue (const char *source_name)
}
}
CdIo *
CdIo_t *
cdio_open_cue (const char *psz_cue_name)
{
CdIo *ret;
CdIo_t *ret;
_img_private_t *_data;
char *psz_bin_name;
cdio_funcs _funcs;
cdio_funcs_t _funcs;
memset( &_funcs, 0, sizeof(_funcs) );
_funcs.eject_media = _eject_media_image;
@@ -1176,6 +1176,7 @@ cdio_open_cue (const char *psz_cue_name)
return NULL;
}
ret->driver_id = DRIVER_BINCUE;
psz_bin_name = cdio_is_cuefile(psz_cue_name);
if (NULL == psz_bin_name) {

View File

@@ -1,5 +1,5 @@
/*
$Id: cdrdao.c,v 1.5 2005/01/16 04:28:02 rocky Exp $
$Id: cdrdao.c,v 1.6 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
toc reading routine adapted from cuetools
@@ -25,7 +25,7 @@
(*.cue).
*/
static const char _rcsid[] = "$Id: cdrdao.c,v 1.5 2005/01/16 04:28:02 rocky Exp $";
static const char _rcsid[] = "$Id: cdrdao.c,v 1.6 2005/01/17 17:20:09 rocky Exp $";
#include "image.h"
#include "cdio_assert.h"
@@ -1172,7 +1172,7 @@ cdio_open_cdrdao (const char *psz_cue_name)
CdIo *ret;
_img_private_t *_data;
cdio_funcs _funcs;
cdio_funcs_t _funcs;
memset( &_funcs, 0, sizeof(_funcs) );
@@ -1220,6 +1220,7 @@ cdio_open_cdrdao (const char *psz_cue_name)
return NULL;
}
ret->driver_id = DRIVER_CDRDAO;
if (!cdio_is_tocfile(psz_cue_name)) {
cdio_debug ("source name %s is not recognized as a TOC file",
psz_cue_name);

View File

@@ -1,5 +1,5 @@
/*
$Id: nrg.c,v 1.6 2005/01/12 11:34:52 rocky Exp $
$Id: nrg.c,v 1.7 2005/01/17 17:20:09 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001, 2003 Herbert Valerio Riedel <hvr@gnu.org>
@@ -46,7 +46,7 @@
#include "_cdio_stdio.h"
#include "nrg.h"
static const char _rcsid[] = "$Id: nrg.c,v 1.6 2005/01/12 11:34:52 rocky Exp $";
static const char _rcsid[] = "$Id: nrg.c,v 1.7 2005/01/17 17:20:09 rocky Exp $";
/* reader */
@@ -1200,7 +1200,7 @@ cdio_open_nrg (const char *psz_source)
CdIo *ret;
_img_private_t *_data;
cdio_funcs _funcs;
cdio_funcs_t _funcs;
memset( &_funcs, 0, sizeof(_funcs) );
@@ -1250,6 +1250,7 @@ cdio_open_nrg (const char *psz_source)
return NULL;
}
ret->driver_id = DRIVER_NRG;
_set_arg_image(_data, "source", (NULL == psz_source)
? DEFAULT_CDIO_DEVICE: psz_source);
_set_arg_image (_data, "access-mode", "Nero");