Mostly portability issues from or inspired by mog's changes for XBOX.
image/*.c: initialize func structure to 0 (NULL). include/cdio/*.h: add "extern C" for C++ compilations where appropriate.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
$Id: logging.h,v 1.9 2004/09/04 23:49:47 rocky Exp $
|
$Id: logging.h,v 1.10 2004/10/31 06:07:26 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2000, Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2000, Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2003, Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -29,6 +29,10 @@
|
|||||||
|
|
||||||
#include <cdio/types.h>
|
#include <cdio/types.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The different log levels supported.
|
* The different log levels supported.
|
||||||
*/
|
*/
|
||||||
@@ -117,6 +121,10 @@ void cdio_warn (const char format[], ...) GNUC_PRINTF(1,2);
|
|||||||
*/
|
*/
|
||||||
void cdio_error (const char format[], ...) GNUC_PRINTF(1,2);
|
void cdio_error (const char format[], ...) GNUC_PRINTF(1,2);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __LOGGING_H__ */
|
#endif /* __LOGGING_H__ */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
$Id: util.h,v 1.2 2003/11/18 03:35:19 rocky Exp $
|
$Id: util.h,v 1.3 2004/10/31 06:07:26 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
|
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -71,6 +72,16 @@ _cdio_ofs_add (unsigned offset, unsigned length, int blocksize)
|
|||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline const char *
|
||||||
|
_cdio_bool_str (bool b)
|
||||||
|
{
|
||||||
|
return b ? "yes" : "no";
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
void *
|
void *
|
||||||
_cdio_malloc (size_t size);
|
_cdio_malloc (size_t size);
|
||||||
|
|
||||||
@@ -92,17 +103,13 @@ _cdio_strlenv(char **str_array);
|
|||||||
char **
|
char **
|
||||||
_cdio_strsplit(const char str[], char delim);
|
_cdio_strsplit(const char str[], char delim);
|
||||||
|
|
||||||
static inline const char *
|
|
||||||
_cdio_bool_str (bool b)
|
|
||||||
{
|
|
||||||
return b ? "yes" : "no";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* BCD */
|
|
||||||
|
|
||||||
uint8_t to_bcd8(uint8_t n);
|
uint8_t to_bcd8(uint8_t n);
|
||||||
uint8_t from_bcd8(uint8_t p);
|
uint8_t from_bcd8(uint8_t p);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __CDIO_UTIL_H__ */
|
#endif /* __CDIO_UTIL_H__ */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: bincue.c,v 1.45 2004/10/26 01:21:05 rocky Exp $
|
$Id: bincue.c,v 1.46 2004/10/31 06:07:26 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
(*.cue).
|
(*.cue).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: bincue.c,v 1.45 2004/10/26 01:21:05 rocky Exp $";
|
static const char _rcsid[] = "$Id: bincue.c,v 1.46 2004/10/31 06:07:26 rocky Exp $";
|
||||||
|
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
#include "cdio_assert.h"
|
#include "cdio_assert.h"
|
||||||
@@ -1154,6 +1154,8 @@ cdio_open_cue (const char *psz_cue_name)
|
|||||||
|
|
||||||
cdio_funcs _funcs;
|
cdio_funcs _funcs;
|
||||||
|
|
||||||
|
memset( &_funcs, 0, sizeof(_funcs) );
|
||||||
|
|
||||||
_funcs.eject_media = _eject_media_image;
|
_funcs.eject_media = _eject_media_image;
|
||||||
_funcs.free = _free_image;
|
_funcs.free = _free_image;
|
||||||
_funcs.get_arg = _get_arg_image;
|
_funcs.get_arg = _get_arg_image;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: cdrdao.c,v 1.28 2004/09/04 00:06:50 rocky Exp $
|
$Id: cdrdao.c,v 1.29 2004/10/31 06:07:26 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
toc reading routine adapted from cuetools
|
toc reading routine adapted from cuetools
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
(*.cue).
|
(*.cue).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: cdrdao.c,v 1.28 2004/09/04 00:06:50 rocky Exp $";
|
static const char _rcsid[] = "$Id: cdrdao.c,v 1.29 2004/10/31 06:07:26 rocky Exp $";
|
||||||
|
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
#include "cdio_assert.h"
|
#include "cdio_assert.h"
|
||||||
@@ -1137,6 +1137,8 @@ cdio_open_cdrdao (const char *psz_cue_name)
|
|||||||
|
|
||||||
cdio_funcs _funcs;
|
cdio_funcs _funcs;
|
||||||
|
|
||||||
|
memset( &_funcs, 0, sizeof(_funcs) );
|
||||||
|
|
||||||
_funcs.eject_media = _eject_media_image;
|
_funcs.eject_media = _eject_media_image;
|
||||||
_funcs.free = _free_image;
|
_funcs.free = _free_image;
|
||||||
_funcs.get_arg = _get_arg_image;
|
_funcs.get_arg = _get_arg_image;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: nrg.c,v 1.42 2004/10/22 01:13:38 rocky Exp $
|
$Id: nrg.c,v 1.43 2004/10/31 06:07:26 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
Copyright (C) 2001, 2003 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001, 2003 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
#include "_cdio_stdio.h"
|
#include "_cdio_stdio.h"
|
||||||
#include "nrg.h"
|
#include "nrg.h"
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: nrg.c,v 1.42 2004/10/22 01:13:38 rocky Exp $";
|
static const char _rcsid[] = "$Id: nrg.c,v 1.43 2004/10/31 06:07:26 rocky Exp $";
|
||||||
|
|
||||||
|
|
||||||
/* reader */
|
/* reader */
|
||||||
@@ -1198,6 +1198,8 @@ cdio_open_nrg (const char *psz_source)
|
|||||||
|
|
||||||
cdio_funcs _funcs;
|
cdio_funcs _funcs;
|
||||||
|
|
||||||
|
memset( &_funcs, 0, sizeof(_funcs) );
|
||||||
|
|
||||||
_funcs.eject_media = _eject_media_nrg;
|
_funcs.eject_media = _eject_media_nrg;
|
||||||
_funcs.free = _free_nrg;
|
_funcs.free = _free_nrg;
|
||||||
_funcs.get_arg = _get_arg_image;
|
_funcs.get_arg = _get_arg_image;
|
||||||
|
|||||||
Reference in New Issue
Block a user