[iso] update libcdio to v0.90

This commit is contained in:
Pete Batard 2012-11-04 01:33:54 +00:00
parent 2a3b95a11a
commit bf98a552da
47 changed files with 1024 additions and 928 deletions

View file

@ -21,8 +21,8 @@
* calls. These control playing of the CD-ROM through its
* line-out jack.
*/
#ifndef __CDIO_AUDIO_H__
#define __CDIO_AUDIO_H__
#ifndef CDIO_AUDIO_H_
#define CDIO_AUDIO_H_
#include <cdio/types.h>
@ -143,4 +143,4 @@ extern "C" {
}
#endif /* __cplusplus */
#endif /* __CDIO_AUDIO_H__ */
#endif /* CDIO_AUDIO_H_ */

View file

@ -1,8 +1,6 @@
/*
$Id: bytesex.h,v 1.5 2008/03/25 15:59:08 karl Exp $
Copyright (C) 2000, 2004 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2005, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
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
@ -25,8 +23,8 @@
* use glib.h routines instead.
*/
#ifndef __CDIO_BYTESEX_H__
#define __CDIO_BYTESEX_H__
#ifndef CDIO_BYTESEX_H_
#define CDIO_BYTESEX_H_
#include <cdio/types.h>
#include <cdio/bytesex_asm.h> /* also defines CDIO_INLINE */
@ -208,7 +206,7 @@ from_733 (uint64_t p)
return (UINT32_C(0xFFFFFFFF) & p);
}
#endif /* __CDIO_BYTESEX_H__ */
#endif /* CDIO_BYTESEX_H_ */
/*

View file

@ -1,7 +1,5 @@
/*
$Id: bytesex_asm.h,v 1.3 2008/03/25 15:59:08 karl Exp $
Copyright (C) 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2008, 2012 Rocky Bernstein <rocky@gnu.org>
2001, 2004, 2005 Herbert Valerio Riedel <hvr@gnu.org>
2001 Sven Ottemann <ac-logic@freenet.de>
@ -26,8 +24,8 @@
glib.h routines instead.
*/
#ifndef __CDIO_BYTESEX_ASM_H__
#define __CDIO_BYTESEX_ASM_H__
#ifndef CDIO_BYTESEX_ASM_H_
#define CDIO_BYTESEX_ASM_H_
#if !defined(DISABLE_ASM_OPTIMIZE)
#include <cdio/types.h>
@ -106,10 +104,10 @@ static CDIO_INLINE
uint32_t uint32_swap_le_be_asm(uint32_t a)
{
__asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */
"rorl $16,%0\n\t" /* swap words */
"xchgb %b0,%h0" /* swap higher bytes */
:"=q" (a)
: "0" (a));
"rorl $16,%0\n\t" /* swap words */
"xchgb %b0,%h0" /* swap higher bytes */
:"=q" (a)
: "0" (a));
return(a);
}
@ -118,8 +116,8 @@ static CDIO_INLINE
uint16_t uint16_swap_le_be_asm(uint16_t a)
{
__asm__("xchgb %b0,%h0" /* swap bytes */
: "=q" (a)
: "0" (a));
: "=q" (a)
: "0" (a));
return(a);
}
@ -130,7 +128,7 @@ uint16_t uint16_swap_le_be_asm(uint16_t a)
#endif
#endif /* !defined(DISABLE_ASM_OPTIMIZE) */
#endif /* __CDIO_BYTESEX_ASM_H__ */
#endif /* CDIO_BYTESEX_ASM_H_ */
/*

View file

@ -29,7 +29,7 @@
/** Application Interface or Protocol version number. If the public
* interface changes, we increase this number.
*/
#define CDIO_API_VERSION 5
#define CDIO_API_VERSION 6
#include <cdio/version.h>
#include <cdio/types.h>
@ -56,6 +56,9 @@ extern "C" {
*/
#include <cdio/device.h>
/* CD-Text-related functions. */
#include <cdio/cdtext.h>
/* Disc-related functions. */
#include <cdio/disc.h>
@ -64,9 +67,6 @@ extern "C" {
*/
#include <cdio/read.h>
/* CD-Text-related functions. */
#include <cdio/cdtext.h>
/* Track-related functions. */
#include <cdio/track.h>

View file

@ -1,6 +1,6 @@
/* -*- c -*-
Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011 Rocky Bernstein
Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011, 2012 Rocky Bernstein
<rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
@ -23,8 +23,8 @@
* \brief C header for driver- or device-related libcdio
* calls. ("device" includes CD-image reading devices).
*/
#ifndef __CDIO_DEVICE_H__
#define __CDIO_DEVICE_H__
#ifndef CDIO_DEVICE_H_
#define CDIO_DEVICE_H_
#ifdef __cplusplus
extern "C" {
@ -47,13 +47,13 @@ extern "C" {
typedef enum {
CDIO_DRIVE_CAP_ERROR = 0x40000, /**< Error */
CDIO_DRIVE_CAP_UNKNOWN = 0x80000, /**< Dunno. It can be on if we
have only partial information
have only partial information
or are not completely certain
*/
*/
CDIO_DRIVE_CAP_MISC_CLOSE_TRAY = 0x00001, /**< caddy systems can't
close... */
CDIO_DRIVE_CAP_MISC_EJECT = 0x00002, /**< but can eject. */
CDIO_DRIVE_CAP_MISC_LOCK = 0x00004, /**< disable manual eject */
CDIO_DRIVE_CAP_MISC_LOCK = 0x00004, /**< disable manual eject */
CDIO_DRIVE_CAP_MISC_SELECT_SPEED = 0x00008, /**< programmable speed */
CDIO_DRIVE_CAP_MISC_SELECT_DISC = 0x00010, /**< select disc from
juke-box */
@ -61,7 +61,7 @@ extern "C" {
CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED= 0x00080, /**< media changed */
CDIO_DRIVE_CAP_MISC_RESET = 0x00100, /**< hard reset device */
CDIO_DRIVE_CAP_MISC_FILE = 0x20000 /**< drive is really a file,
i.e a CD file image */
i.e a CD file image */
} cdio_drive_cap_misc_t;
/** Reading masks.. */
@ -151,7 +151,7 @@ extern "C" {
*/
typedef enum {
DRIVER_UNKNOWN, /**< Used as input when we don't care what kind
of driver to use. */
of driver to use. */
DRIVER_AIX, /**< AIX driver */
DRIVER_BSDI, /**< BSDI driver */
DRIVER_FREEBSD, /**< FreeBSD driver - includes CAM and ioctl access */
@ -161,13 +161,13 @@ extern "C" {
DRIVER_OS2, /**< IBM OS/2 Driver */
DRIVER_OSX, /**< Apple OSX Driver */
DRIVER_WIN32, /**< Microsoft Windows Driver. Includes ASPI and
ioctl access. */
ioctl access. */
DRIVER_CDRDAO, /**< cdrdao format CD image. This is listed
before BIN/CUE, to make the code prefer cdrdao
over BIN/CUE when both exist. */
before BIN/CUE, to make the code prefer cdrdao
over BIN/CUE when both exist. */
DRIVER_BINCUE, /**< CDRWIN BIN/CUE format CD image. This is
listed before NRG, to make the code prefer
BIN/CUE over NRG when both exist. */
listed before NRG, to make the code prefer
BIN/CUE over NRG when both exist. */
DRIVER_NRG, /**< Nero NRG format CD image. */
DRIVER_DEVICE /**< Is really a set of the above; should come last */
} driver_id_t;
@ -200,10 +200,10 @@ extern "C" {
enumeration in driver_id_t. Since we have a bogus (but useful) 0th
entry above we don't have to add one.
*/
#define CDIO_MIN_DRIVER DRIVER_AIX
#define CDIO_MIN_DEVICE_DRIVER CDIO_MIN_DRIVER
#define CDIO_MAX_DRIVER DRIVER_NRG
#define CDIO_MAX_DEVICE_DRIVER DRIVER_WIN32
LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MIN_DRIVER, "please use cdio_drivers") = DRIVER_AIX;
LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MIN_DEVICE_DRIVER, "please use cdio_device_drivers") = DRIVER_AIX;
LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MAX_DRIVER, "please use cdio_drivers") = DRIVER_NRG;
LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MAX_DEVICE_DRIVER, "please use cdio_device_drivers") = DRIVER_WIN32;
/**
The following are status codes for completion of a given cdio
@ -219,30 +219,30 @@ extern "C" {
*/
typedef enum {
DRIVER_OP_SUCCESS = 0, /**< in cases where an int is
returned, like cdio_set_speed,
more the negative return codes are
for errors and the positive ones
for success. */
returned, like cdio_set_speed,
more the negative return codes are
for errors and the positive ones
for success. */
DRIVER_OP_ERROR = -1, /**< operation returned an error */
DRIVER_OP_UNSUPPORTED = -2, /**< returned when a particular driver
doesn't support a particular operation.
For example an image driver which doesn't
really "eject" a CD.
*/
doesn't support a particular operation.
For example an image driver which doesn't
really "eject" a CD.
*/
DRIVER_OP_UNINIT = -3, /**< returned when a particular driver
hasn't been initialized or a null
pointer has been passed.
*/
hasn't been initialized or a null
pointer has been passed.
*/
DRIVER_OP_NOT_PERMITTED = -4, /**< Operation not permitted.
For example might be a permission
problem.
*/
For example might be a permission
problem.
*/
DRIVER_OP_BAD_PARAMETER = -5, /**< Bad parameter passed */
DRIVER_OP_BAD_POINTER = -6, /**< Bad pointer to memory area */
DRIVER_OP_NO_DRIVER = -7, /**< Operation called on a driver
not available on this OS */
not available on this OS */
DRIVER_OP_MMC_SENSE_DATA = -8, /**< MMC operation returned sense data,
but no other error above recorded. */
but no other error above recorded. */
} driver_return_code_t;
/**
@ -255,7 +255,7 @@ extern "C" {
report back the driver used.
*/
driver_return_code_t cdio_close_tray (const char *psz_drive,
/*in/out*/ driver_id_t *p_driver_id);
/*in/out*/ driver_id_t *p_driver_id);
/**
@param drc the return code you want interpreted.
@ -365,7 +365,7 @@ extern "C" {
was found.
*/
char ** cdio_get_devices_with_cap (/*in*/ char *ppsz_search_devices[],
cdio_fs_anal_t capabilities, bool b_any);
cdio_fs_anal_t capabilities, bool b_any);
/**
Like cdio_get_devices_with_cap but we return the driver we found
@ -374,9 +374,9 @@ extern "C" {
and speeds things up for libcdio as well.
*/
char ** cdio_get_devices_with_cap_ret (/*in*/ char* ppsz_search_devices[],
cdio_fs_anal_t capabilities,
bool b_any,
/*out*/ driver_id_t *p_driver_id);
cdio_fs_anal_t capabilities,
bool b_any,
/*out*/ driver_id_t *p_driver_id);
/**
Like cdio_get_devices, but we may change the p_driver_id if we
@ -401,9 +401,9 @@ extern "C" {
NULL even though there isa hardware CD-ROM.
*/
void cdio_get_drive_cap (const CdIo_t *p_cdio,
cdio_drive_read_cap_t *p_read_cap,
cdio_drive_write_cap_t *p_write_cap,
cdio_drive_misc_cap_t *p_misc_cap);
cdio_drive_read_cap_t *p_read_cap,
cdio_drive_write_cap_t *p_write_cap,
cdio_drive_misc_cap_t *p_misc_cap);
/**
Get the drive capabilities for a specified device.
@ -415,9 +415,9 @@ extern "C" {
NULL even though there isa hardware CD-ROM.
*/
void cdio_get_drive_cap_dev (const char *device,
cdio_drive_read_cap_t *p_read_cap,
cdio_drive_write_cap_t *p_write_cap,
cdio_drive_misc_cap_t *p_misc_cap);
cdio_drive_read_cap_t *p_read_cap,
cdio_drive_write_cap_t *p_write_cap,
cdio_drive_misc_cap_t *p_misc_cap);
/**
Get a string containing the name of the driver in use.
@ -441,7 +441,7 @@ extern "C" {
False is returned if we had an error getting the information.
*/
bool cdio_get_hwinfo ( const CdIo_t *p_cdio,
/*out*/ cdio_hwinfo_t *p_hw_info );
/*out*/ cdio_hwinfo_t *p_hw_info );
/**
@ -452,7 +452,7 @@ extern "C" {
@param i_last_session pointer to the session number to be returned.
*/
driver_return_code_t cdio_get_last_session (CdIo_t *p_cdio,
/*out*/ lsn_t *i_last_session);
/*out*/ lsn_t *i_last_session);
/**
Find out if media has changed since the last call.
@ -508,7 +508,7 @@ extern "C" {
@return the cdio object or NULL on error or no device.
*/
CdIo_t * cdio_open_am (const char *psz_source,
driver_id_t driver_id, const char *psz_access_mode);
driver_id_t driver_id, const char *psz_access_mode);
/**
Set up BIN/CUE CD disk-image for reading. Source is the .bin or
@ -525,7 +525,7 @@ extern "C" {
@return the cdio object or NULL on error or no device..
*/
CdIo_t * cdio_open_am_bincue (const char *psz_cue_name,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Set up cdrdao CD disk-image for reading. Source is the .toc file
@ -540,7 +540,7 @@ extern "C" {
@return the cdio object or NULL on error or no device..
*/
CdIo_t * cdio_open_am_cdrdao (const char *psz_toc_name,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Return a string containing the default CUE file that would
@ -578,7 +578,7 @@ extern "C" {
NULL on error or there is no driver for a some sort of hardware CD-ROM.
*/
CdIo_t * cdio_open_am_cd (const char *psz_device,
const char *psz_access_mode);
const char *psz_access_mode);
/**
CDRWIN BIN/CUE CD disc-image routines. Source is the .cue file
@ -598,7 +598,7 @@ extern "C" {
@see cdio_open
*/
CdIo_t * cdio_open_am_aix (const char *psz_source,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Set up CD-ROM for reading using the AIX driver. The device_name is
@ -654,7 +654,7 @@ extern "C" {
@see cdio_open
*/
CdIo_t * cdio_open_am_bsdi (const char *psz_source,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Return a string containing the default device name that the BSDI
@ -696,7 +696,7 @@ extern "C" {
@see cdio_open_cd, cdio_open
*/
CdIo_t * cdio_open_am_freebsd (const char *psz_source,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Return a string containing the default device name that the
@ -733,7 +733,7 @@ extern "C" {
NULL on error or there is no GNU/Linux driver.
*/
CdIo_t * cdio_open_am_linux (const char *psz_source,
const char *access_mode);
const char *access_mode);
/**
Return a string containing the default device name that the
@ -773,7 +773,7 @@ extern "C" {
NULL on error or there is no Solaris driver.
*/
CdIo_t * cdio_open_am_solaris (const char *psz_source,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Return a string containing the default device name that the
@ -819,7 +819,7 @@ extern "C" {
@see cdio_open_cd, cdio_open
*/
CdIo_t * cdio_open_am_osx (const char *psz_source,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Return a string containing the default device name that the OSX
@ -855,7 +855,7 @@ extern "C" {
NULL is returned on error or there is no Microsof Windows driver.
*/
CdIo_t * cdio_open_am_win32 (const char *psz_source,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Return a string containing the default device name that the
@ -929,7 +929,7 @@ Return a list of all of the CD-ROM devices that the OS/2 driver
@return true on success; NULL on error or there is no Nero driver.
*/
CdIo_t * cdio_open_am_nrg (const char *psz_source,
const char *psz_access_mode);
const char *psz_access_mode);
/**
Get a string containing the default device name that the NRG
@ -994,7 +994,7 @@ Return a list of all of the CD-ROM devices that the OS/2 driver
Set the blocksize for subsequent reads.
*/
driver_return_code_t cdio_set_blocksize ( const CdIo_t *p_cdio,
int i_blocksize );
int i_blocksize );
/**
Set the drive speed.
@ -1013,7 +1013,7 @@ Return a list of all of the CD-ROM devices that the OS/2 driver
@see mmc_set_speed and mmc_set_drive_speed
*/
driver_return_code_t cdio_set_speed ( const CdIo_t *p_cdio,
int i_drive_speed );
int i_drive_speed );
/**
Get the value associatied with key.
@ -1033,7 +1033,7 @@ Return a list of all of the CD-ROM devices that the OS/2 driver
@param value the value to assocaiate with key
*/
driver_return_code_t cdio_set_arg (CdIo_t *p_cdio, const char key[],
const char value[]);
const char value[]);
/**
Initialize CD Reading and control routines. Should be called first.
@ -1055,4 +1055,4 @@ extern cdio_drive_cap_write_t debug_drive_cap_write_t;
extern cdio_mmc_hw_len_t debug_cdio_mmc_hw_len;
extern cdio_src_category_mask_t debug_cdio_src_category_mask;
#endif /* __CDIO_DEVICE_H__ */
#endif /* CDIO_DEVICE_H_ */

View file

@ -1,6 +1,6 @@
/* -*- c -*-
Copyright (C) 2004, 2005, 2006, 2008, 2010 Rocky Bernstein
Copyright (C) 2004, 2005, 2006, 2008, 2010, 2012 Rocky Bernstein
<rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
@ -21,8 +21,8 @@
\file disc.h
\brief The top-level header for disc-related libcdio calls.
*/
#ifndef __CDIO_DISC_H__
#define __CDIO_DISC_H__
#ifndef CDIO_DISC_H_
#define CDIO_DISC_H_
#ifdef __cplusplus
extern "C" {
@ -34,10 +34,10 @@ extern "C" {
GNU/Linux /usr/include/linux/cdrom.h and we've added DVD.
*/
typedef enum {
CDIO_DISC_MODE_CD_DA, /**< CD-DA */
CDIO_DISC_MODE_CD_DATA, /**< CD-ROM form 1 */
CDIO_DISC_MODE_CD_XA, /**< CD-ROM XA form2 */
CDIO_DISC_MODE_CD_MIXED, /**< Some combo of above. */
CDIO_DISC_MODE_CD_DA, /**< CD-DA */
CDIO_DISC_MODE_CD_DATA, /**< CD-ROM form 1 */
CDIO_DISC_MODE_CD_XA, /**< CD-ROM XA form2 */
CDIO_DISC_MODE_CD_MIXED, /**< Some combo of above. */
CDIO_DISC_MODE_DVD_ROM, /**< DVD ROM (e.g. movies) */
CDIO_DISC_MODE_DVD_RAM, /**< DVD-RAM */
CDIO_DISC_MODE_DVD_R, /**< DVD-R */
@ -52,10 +52,11 @@ extern "C" {
CDIO_DISC_MODE_DVD_OTHER, /**< Unknown/unclassified DVD type */
CDIO_DISC_MODE_NO_INFO,
CDIO_DISC_MODE_ERROR,
CDIO_DISC_MODE_CD_I /**< CD-i. */
CDIO_DISC_MODE_CD_I /**< CD-i. */
} discmode_t;
extern const char *discmode2str[];
/**
Get binary CD-Text information for a CdIo_t object.
@ -133,4 +134,4 @@ extern "C" {
}
#endif /* __cplusplus */
#endif /* __CDIO_DISC_H__ */
#endif /* CDIO_DISC_H_ */

View file

@ -26,8 +26,8 @@
*/
#ifndef __CDIO_DS_H__
#define __CDIO_DS_H__
#ifndef CDIO_DS_H_
#define CDIO_DS_H_
#include <cdio/types.h>
@ -86,7 +86,7 @@ void *_cdio_list_node_data (CdioListNode_t *p_node);
}
#endif /* __cplusplus */
#endif /* __CDIO_DS_H__ */
#endif /* CDIO_DS_H_ */
/*
* Local variables:

View file

@ -27,35 +27,40 @@
*/
#ifndef __CDIO_DVD_H__
#define __CDIO_DVD_H__
#ifndef CDIO_DVD_H_
#define CDIO_DVD_H_
#include <cdio/types.h>
/**
Values used in a READ DVD STRUCTURE
*/
#define CDIO_DVD_STRUCT_PHYSICAL 0x00
#define CDIO_DVD_STRUCT_COPYRIGHT 0x01
#define CDIO_DVD_STRUCT_DISCKEY 0x02
#define CDIO_DVD_STRUCT_BCA 0x03
#define CDIO_DVD_STRUCT_MANUFACT 0x04
typedef enum cdio_dvd_structure
{
CDIO_DVD_STRUCT_PHYSICAL = 0x00,
CDIO_DVD_STRUCT_COPYRIGHT = 0x01,
CDIO_DVD_STRUCT_DISCKEY = 0x02,
CDIO_DVD_STRUCT_BCA = 0x03,
CDIO_DVD_STRUCT_MANUFACT = 0x04
} cdio_dvd_structure;
/**
Media definitions for "DVD Book" from MMC-5 Table 400, page 419.
*/
#define CDIO_DVD_BOOK_DVD_ROM 0x0 /**< DVD-ROM */
#define CDIO_DVD_BOOK_DVD_RAM 0x1 /**< DVD-RAM */
#define CDIO_DVD_BOOK_DVD_R 0x2 /**< DVD-R */
#define CDIO_DVD_BOOK_DVD_RW 0x3 /**< DVD-RW */
#define CDIO_DVD_BOOK_HD_DVD_ROM 0x4 /**< HD DVD-ROM */
#define CDIO_DVD_BOOK_HD_DVD_RAM 0x5 /**< HD DVD-RAM */
#define CDIO_DVD_BOOK_HD_DVD_R 0x6 /**< HD DVD-R */
#define CDIO_DVD_BOOK_DVD_PRW 0x9 /**< DVD+RW */
#define CDIO_DVD_BOOK_DVD_PR 0xa /**< DVD+R */
#define CDIO_DVD_BOOK_DVD_PRW_DL 0xd /**< DVD+RW DL */
#define CDIO_DVD_BOOK_DVD_PR_DL 0xe /**< DVD+R DL */
typedef enum cdio_dvd_book
{
CDIO_DVD_BOOK_DVD_ROM = 0x0, /**< DVD-ROM */
CDIO_DVD_BOOK_DVD_RAM = 0x1, /**< DVD-RAM */
CDIO_DVD_BOOK_DVD_R = 0x2, /**< DVD-R */
CDIO_DVD_BOOK_DVD_RW = 0x3, /**< DVD-RW */
CDIO_DVD_BOOK_HD_DVD_ROM = 0x4, /**< HD DVD-ROM */
CDIO_DVD_BOOK_HD_DVD_RAM = 0x5, /**< HD DVD-RAM */
CDIO_DVD_BOOK_HD_DVD_R = 0x6, /**< HD DVD-R */
CDIO_DVD_BOOK_DVD_PRW = 0x9, /**< DVD+RW */
CDIO_DVD_BOOK_DVD_PR = 0xa, /**< DVD+R */
CDIO_DVD_BOOK_DVD_PRW_DL = 0xd, /**< DVD+RW DL */
CDIO_DVD_BOOK_DVD_PR_DL = 0xe /**< DVD+R DL */
} cdio_dvd_book;
typedef struct cdio_dvd_layer {
unsigned int book_version : 4;
@ -124,4 +129,4 @@ typedef union {
cdio_dvd_manufact_t manufact;
} cdio_dvd_struct_t;
#endif /* __CDIO_DVD_H__ */
#endif /* CDIO_DVD_H_ */

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,5 @@
/*
$Id: iso9660.h,v 1.102 2008/07/16 00:28:54 rocky Exp $
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
@ -33,8 +31,8 @@
*/
#ifndef __CDIO_ISO9660_H__
#define __CDIO_ISO9660_H__
#ifndef CDIO_ISO9660_H_
#define CDIO_ISO9660_H_
#include <time.h>
@ -71,7 +69,7 @@ typedef char dchar_t; /*! See section 7.4.1 */
#undef ISODCL
#endif
/* This part borrowed from the bsd386 isofs */
#define ISODCL(from, to) ((to) - (from) + 1)
#define ISODCL(from, to) ((to) - (from) + 1)
#define MIN_TRACK_SIZE 4*75
#define MIN_ISO_SIZE MIN_TRACK_SIZE
@ -107,14 +105,14 @@ extern enum iso_enum1_s {
/*! ISO 9660 directory flags. */
extern enum iso_flag_enum_s {
ISO_FILE = 0, /**< Not really a flag... */
ISO_EXISTENCE = 1, /**< Do not make existence known (hidden) */
ISO_DIRECTORY = 2, /**< This file is a directory */
ISO_ASSOCIATED = 4, /**< This file is an associated file */
ISO_RECORD = 8, /**< Record format in extended attr. != 0 */
ISO_FILE = 0, /**< Not really a flag... */
ISO_EXISTENCE = 1, /**< Do not make existence known (hidden) */
ISO_DIRECTORY = 2, /**< This file is a directory */
ISO_ASSOCIATED = 4, /**< This file is an associated file */
ISO_RECORD = 8, /**< Record format in extended attr. != 0 */
ISO_PROTECTION = 16, /**< No read/execute perm. in ext. attr. */
ISO_DRESERVED1 = 32, /**<, Reserved bit 5 */
ISO_DRESERVED2 = 64, /**<, Reserved bit 6 */
ISO_DRESERVED1 = 32, /**<, Reserved bit 5 */
ISO_DRESERVED2 = 64, /**<, Reserved bit 6 */
ISO_MULTIEXTENT = 128, /**< Not final entry of a mult. ext. file */
} iso_flag_enums;
@ -124,7 +122,7 @@ extern enum iso_vd_enum_s {
ISO_VD_PRIMARY = 1, /**< Is in any ISO-9660 */
ISO_VD_SUPPLEMENTARY = 2, /**< Used by Joliet, for example */
ISO_VD_PARITION = 3, /**< Indicates a partition of a CD */
ISO_VD_END = 255
ISO_VD_END = 255
} iso_vd_enums;
@ -136,12 +134,12 @@ extern enum iso_vd_enum_s {
For ISO-9660 Level 1, the maximum needed string length is:
@code
30 chars (filename + ext)
+ 2 chars ('.' + ';')
+ 5 chars (strlen("32767"))
+ 1 null byte
30 chars (filename + ext)
+ 2 chars ('.' + ';')
+ 5 chars (strlen("32767"))
+ 1 null byte
================================
= 38 chars
= 38 chars
@endcode
*/
@ -183,15 +181,15 @@ PRAGMA_BEGIN_PACKED
@see iso9660_dtime
*/
struct iso9660_dtime_s {
iso711_t dt_year; /**< Number of years since 1900 */
iso711_t dt_month; /**< Has value in range 1..12. Note starts
struct iso9660_dtime_s {
iso711_t dt_year; /**< Number of years since 1900 */
iso711_t dt_month; /**< Has value in range 1..12. Note starts
at 1, not 0 like a tm struct. */
iso711_t dt_day; /**< Day of the month from 1 to 31 */
iso711_t dt_hour; /**< Hour of the day from 0 to 23 */
iso711_t dt_minute; /**< Minute of the hour from 0 to 59 */
iso711_t dt_second; /**< Second of the minute from 0 to 59 */
iso712_t dt_gmtoff; /**< GMT values -48 .. + 52 in 15 minute
iso711_t dt_day; /**< Day of the month from 1 to 31 */
iso711_t dt_hour; /**< Hour of the day from 0 to 23 */
iso711_t dt_minute; /**< Minute of the hour from 0 to 59 */
iso711_t dt_second; /**< Second of the minute from 0 to 59 */
iso712_t dt_gmtoff; /**< GMT values -48 .. + 52 in 15 minute
intervals */
} GNUC_PACKED;
@ -206,19 +204,19 @@ typedef struct iso9660_dtime_s iso9660_dtime_t;
@see iso9660_ltime
*/
struct iso9660_ltime_s {
char lt_year [ISODCL( 1, 4)]; /**< Add 1900 to value
struct iso9660_ltime_s {
char lt_year [ISODCL( 1, 4)]; /**< Add 1900 to value
for the Julian
year */
char lt_month [ISODCL( 5, 6)]; /**< Has value in range
char lt_month [ISODCL( 5, 6)]; /**< Has value in range
1..12. Note starts
at 1, not 0 like a
tm struct. */
char lt_day [ISODCL( 7, 8)]; /**< Day of month: 1..31 */
char lt_hour [ISODCL( 9, 10)]; /**< hour: 0..23 */
char lt_minute [ISODCL( 11, 12)]; /**< minute: 0..59 */
char lt_second [ISODCL( 13, 14)]; /**< second: 0..59 */
char lt_hsecond [ISODCL( 15, 16)]; /**< The value is in
char lt_day [ISODCL( 7, 8)]; /**< Day of month: 1..31 */
char lt_hour [ISODCL( 9, 10)]; /**< hour: 0..23 */
char lt_minute [ISODCL( 11, 12)]; /**< minute: 0..59 */
char lt_second [ISODCL( 13, 14)]; /**< second: 0..59 */
char lt_hsecond [ISODCL( 15, 16)]; /**< The value is in
units of 1/100's of
a second */
iso712_t lt_gmtoff; /**< Offset from Greenwich Mean Time in number
@ -405,7 +403,7 @@ struct iso9660_svd_s {
char id[5]; /**< ISO_STANDARD_ID "CD001"
*/
iso711_t version; /**< value 1 */
char flags; /**< Section 8.5.3 */
char flags; /**< Section 8.5.3 */
achar_t system_id[ISO_MAX_SYSTEM_ID]; /**< Section 8.5.4; each char
is an achar */
dchar_t volume_id[ISO_MAX_VOLUME_ID]; /**< Section 8.5.5; each char
@ -1133,7 +1131,7 @@ lsn_t iso9660_get_dir_extent(const iso9660_dir_t *p_idr);
#endif /* __cplusplus */
#undef ISODCL
#endif /* __CDIO_ISO9660_H__ */
#endif /* CDIO_ISO9660_H_ */
/*
* Local variables:

View file

@ -1,7 +1,5 @@
/*
$Id: logging.h,v 1.11 2008/03/25 15:59:09 karl Exp $
Copyright (C) 2003, 2004, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2003, 2004, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
This program is free software: you can redistribute it and/or modify
@ -23,8 +21,8 @@
*
*/
#ifndef __LOGGING_H__
#define __LOGGING_H__
#ifndef CDIO_LOGGING_H_
#define CDIO_LOGGING_H_
#include <cdio/types.h>
@ -128,7 +126,7 @@ void cdio_error (const char format[], ...) GNUC_PRINTF(1,2);
}
#endif
#endif /* __LOGGING_H__ */
#endif /* CDIO_LOGGING_H_ */
/*

View file

@ -1,7 +1,5 @@
/*
$Id: posix.h,v 1.2 2008/03/25 15:59:09 karl Exp $
Copyright (C) 2005, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
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
@ -22,8 +20,8 @@
* \brief various POSIX definitions.
*/
#ifndef __CDIO_POSIX_H__
#define __CDIO_POSIX_H__
#ifndef CDIO_POSIX_H_
#define CDIO_POSIX_H_
typedef uint32_t posix_mode_t;
typedef uint32_t posix_nlink_t;
@ -31,7 +29,7 @@ typedef uint32_t posix_uid_t;
typedef uint32_t posix_gid_t;
typedef uint16_t unicode16_t;
#endif /* __CDIO_POSIX_H__ */
#endif /* CDIO_POSIX_H_ */
/*

View file

@ -1,7 +1,5 @@
/*
$Id: read.h,v 1.15 2008/03/25 15:59:09 karl Exp $
Copyright (C) 2005, 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2006, 2007, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
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
@ -23,8 +21,8 @@
* libcdio calls.
*/
#ifndef __CDIO_READ_H__
#define __CDIO_READ_H__
#ifndef CDIO_READ_H_
#define CDIO_READ_H_
#include <cdio/types.h>
@ -74,11 +72,11 @@ extern "C" {
@param p_cdio object to read from
@param p_buf place to read data into. The caller should make sure
this location can store at least CDIO_FRAMESIZE_RAW
bytes.
bytes.
@param i_lsn sector to read
*/
driver_return_code_t cdio_read_audio_sector (const CdIo_t *p_cdio,
void *p_buf, lsn_t i_lsn);
void *p_buf, lsn_t i_lsn);
/*!
Reads audio sectors
@ -86,13 +84,13 @@ extern "C" {
@param p_cdio object to read from
@param p_buf place to read data into. The caller should make sure
this location can store at least CDIO_FRAMESIZE_RAW
* i_blocks bytes.
* i_blocks bytes.
@param i_lsn sector to read
@param i_blocks number of sectors to read
*/
driver_return_code_t cdio_read_audio_sectors (const CdIo_t *p_cdio,
void *p_buf, lsn_t i_lsn,
uint32_t i_blocks);
void *p_buf, lsn_t i_lsn,
uint32_t i_blocks);
/*!
Read data sectors
@ -100,11 +98,11 @@ extern "C" {
@param p_cdio object to read from
@param p_buf place to read data into. The caller should make sure
this location can store at least ISO_BLOCKSIZE,
M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending
on the kind of sector getting read. If you don't
know whether you have a Mode 1/2, Form 1/ Form 2/Formless
sector best to reserve space for the maximum,
M2RAW_SECTOR_SIZE.
M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending
on the kind of sector getting read. If you don't
know whether you have a Mode 1/2, Form 1/ Form 2/Formless
sector best to reserve space for the maximum,
M2RAW_SECTOR_SIZE.
@param i_lsn sector to read
@param i_blocksize size of block. Should be either CDIO_CD_FRAMESIZE,
M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf.
@ -112,9 +110,9 @@ extern "C" {
@param i_blocks number of blocks to read
*/
driver_return_code_t cdio_read_data_sectors ( const CdIo_t *p_cdio,
void *p_buf, lsn_t i_lsn,
uint16_t i_blocksize,
uint32_t i_blocks );
void *p_buf, lsn_t i_lsn,
uint16_t i_blocksize,
uint32_t i_blocks );
/*!
Reads a mode 1 sector
@ -125,8 +123,8 @@ extern "C" {
mode 1 form 1 sectors.
*/
driver_return_code_t cdio_read_mode1_sector (const CdIo_t *p_cdio,
void *p_buf, lsn_t i_lsn,
bool b_form2);
void *p_buf, lsn_t i_lsn,
bool b_form2);
/*!
Reads mode 1 sectors
@ -138,17 +136,17 @@ extern "C" {
@param i_blocks number of sectors to read
*/
driver_return_code_t cdio_read_mode1_sectors (const CdIo_t *p_cdio,
void *p_buf, lsn_t i_lsn,
bool b_form2,
uint32_t i_blocks);
void *p_buf, lsn_t i_lsn,
bool b_form2,
uint32_t i_blocks);
/*!
Reads a mode 2 sector
@param p_cdio object to read from
@param p_buf place to read data into. The caller should make sure
this location can store at least
M2RAW_SECTOR_SIZE (for form 1) or CDIO_CD_FRAMESIZE (for
form 2) bytes.
M2RAW_SECTOR_SIZE (for form 1) or CDIO_CD_FRAMESIZE (for
form 2) bytes.
@param i_lsn sector to read
@param b_form2 true for reading mode 2 form 2 sectors or false for
mode 2 form 1 sectors.
@ -156,23 +154,23 @@ extern "C" {
@return 0 if no error, nonzero otherwise.
*/
driver_return_code_t cdio_read_mode2_sector (const CdIo_t *p_cdio,
void *p_buf, lsn_t i_lsn,
bool b_form2);
void *p_buf, lsn_t i_lsn,
bool b_form2);
/** The special case of reading a single block is a common one so we
provide a routine for that as a convenience.
*/
driver_return_code_t cdio_read_sector(const CdIo_t *p_cdio, void *p_buf,
lsn_t i_lsn,
cdio_read_mode_t read_mode);
lsn_t i_lsn,
cdio_read_mode_t read_mode);
/*!
Reads mode 2 sectors
@param p_cdio object to read from
@param p_buf place to read data into. The caller should make sure
this location can store at least
M2RAW_SECTOR_SIZE (for form 1) or CDIO_CD_FRAMESIZE (for
form 2) * i_blocks bytes.
M2RAW_SECTOR_SIZE (for form 1) or CDIO_CD_FRAMESIZE (for
form 2) * i_blocks bytes.
@param i_lsn sector to read
@param b_form2 true for reading mode2 form 2 sectors or false for
mode 2 form 1 sectors.
@ -181,9 +179,9 @@ extern "C" {
@return 0 if no error, nonzero otherwise.
*/
driver_return_code_t cdio_read_mode2_sectors (const CdIo_t *p_cdio,
void *p_buf, lsn_t i_lsn,
bool b_form2,
uint32_t i_blocks);
void *p_buf, lsn_t i_lsn,
bool b_form2,
uint32_t i_blocks);
/*!
Reads a number of sectors (AKA blocks).
@ -215,12 +213,12 @@ extern "C" {
*/
driver_return_code_t cdio_read_sectors(const CdIo_t *p_cdio, void *p_buf,
lsn_t i_lsn,
cdio_read_mode_t read_mode,
uint32_t i_blocks);
lsn_t i_lsn,
cdio_read_mode_t read_mode,
uint32_t i_blocks);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __CDIO_TRACK_H__ */
#endif /* CDIO_READ_H_ */

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2005, 2006 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2006 2008, 2012 Rocky Bernstein <rocky@gnu.org>
See also rock.c by Eric Youngdale (1993) from GNU/Linux
This is Copyright 1993 Yggdrasil Computing, Incorporated
@ -26,8 +26,8 @@
*/
#ifndef __CDIO_ROCK_H__
#define __CDIO_ROCK_H__
#ifndef CDIO_ROCK_H_
#define CDIO_ROCK_H_
#include <cdio/types.h>
@ -152,10 +152,10 @@ typedef enum {
ISO_ROCK_SL_ROOT = 8
} iso_rock_sl_flag_t;
#define ISO_ROCK_SL_CONTINUE 1
#define ISO_ROCK_SL_CURRENT 2
#define ISO_ROCK_SL_PARENT 4
#define ISO_ROCK_SL_ROOT 8
#define ISO_ROCK_SL_CONTINUE 1
#define ISO_ROCK_SL_CURRENT 2
#define ISO_ROCK_SL_PARENT 4
#define ISO_ROCK_SL_ROOT 8
typedef struct iso_rock_sl_part_s {
uint8_t flags;
@ -178,9 +178,9 @@ typedef enum {
ISO_ROCK_NM_PARENT = 4,
} iso_rock_nm_flag_t;
#define ISO_ROCK_NM_CONTINUE 1
#define ISO_ROCK_NM_CURRENT 2
#define ISO_ROCK_NM_PARENT 4
#define ISO_ROCK_NM_CONTINUE 1
#define ISO_ROCK_NM_CURRENT 2
#define ISO_ROCK_NM_PARENT 4
typedef struct iso_rock_nm_s {
@ -373,7 +373,7 @@ extern iso_rock_tf_flag_t iso_rock_tf_flag;
}
#endif /* __cplusplus */
#endif /* __ISO_ROCK_H__ */
#endif /* CDIO_ROCK_H_ */
/*
* Local variables:

View file

@ -1,7 +1,6 @@
/*
$Id: sector.h,v 1.38 2008/03/25 15:59:09 karl Exp $
Copyright (C) 2003, 2004, 2005, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2003, 2004, 2005, 2006, 2008, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
This program is free software: you can redistribute it and/or modify
@ -57,8 +56,8 @@
*/
#ifndef _CDIO_SECTOR_H_
#define _CDIO_SECTOR_H_
#ifndef CDIO_SECTOR_H_
#define CDIO_SECTOR_H_
#ifdef __cplusplus
extern "C" {
@ -69,21 +68,24 @@
/*! Information that can be obtained through a Read Subchannel
command.
*/
#define CDIO_SUBCHANNEL_SUBQ_DATA 0
#define CDIO_SUBCHANNEL_CURRENT_POSITION 1
#define CDIO_SUBCHANNEL_MEDIA_CATALOG 2
#define CDIO_SUBCHANNEL_TRACK_ISRC 3
typedef enum cdio_subchannel
{
CDIO_SUBCHANNEL_SUBQ_DATA = 0,
CDIO_SUBCHANNEL_CURRENT_POSITION = 1,
CDIO_SUBCHANNEL_MEDIA_CATALOG = 2,
CDIO_SUBCHANNEL_TRACK_ISRC = 3
} cdio_subchannel;
/*! track flags
* Q Sub-channel Control Field (4.2.3.3)
*/
typedef enum {
NONE = 0x00, /* no flags set */
PRE_EMPHASIS = 0x01, /* audio track recorded with pre-emphasis */
COPY_PERMITTED = 0x02, /* digital copy permitted */
DATA = 0x04, /* data track */
FOUR_CHANNEL_AUDIO = 0x08, /* 4 audio channels */
SCMS = 0x10 /* SCMS (5.29.2.7) */
NONE = 0x00, /* no flags set */
PRE_EMPHASIS = 0x01, /* audio track recorded with pre-emphasis */
COPY_PERMITTED = 0x02, /* digital copy permitted */
DATA = 0x04, /* data track */
FOUR_CHANNEL_AUDIO = 0x08, /* 4 audio channels */
SCMS = 0x10 /* SCMS (5.29.2.7) */
} flag_t;
#define CDIO_PREGAP_SECTORS 150
@ -151,7 +153,7 @@
#define CDIO_CD_FRAMESIZE_RAW 2352 /**< bytes per frame, "raw" mode */
#define CDIO_CD_FRAMESIZE_RAWER 2646 /**< The maximum possible returned
bytes */
#define CDIO_CD_FRAMESIZE_RAW1 (CDIO_CD_CD_FRAMESIZE_RAW-CDIO_CD_SYNC_SIZE) /*2340*/
#define CDIO_CD_FRAMESIZE_RAW1 (CDIO_CD_FRAMESIZE_RAW-CDIO_CD_SYNC_SIZE) /*2340*/
#define CDIO_CD_FRAMESIZE_RAW0 (CDIO_CD_FRAMESIZE_RAW-CDIO_CD_SYNC_SIZE-CDIO_CD_HEADER_SIZE) /*2336*/
/*! "before data" part of raw XA (green, mode2) frame */
@ -199,12 +201,14 @@
#define CDIO_CD_FRAMES_PER_MIN \
(CDIO_CD_FRAMES_PER_SEC*CDIO_CD_SECS_PER_MIN)
#define CDIO_CD_74MIN_SECTORS (UINT32_C(74)*CDIO_CD_FRAMES_PER_MIN)
#define CDIO_CD_80MIN_SECTORS (UINT32_C(80)*CDIO_CD_FRAMES_PER_MIN)
#define CDIO_CD_90MIN_SECTORS (UINT32_C(90)*CDIO_CD_FRAMES_PER_MIN)
typedef enum cdio_cd_minutes_sectors
{
CDIO_CD_74MIN_SECTORS = UINT32_C(74) * CDIO_CD_FRAMES_PER_MIN,
CDIO_CD_80MIN_SECTORS = UINT32_C(80) * CDIO_CD_FRAMES_PER_MIN,
CDIO_CD_90MIN_SECTORS = UINT32_C(90) * CDIO_CD_FRAMES_PER_MIN,
#define CDIO_CD_MAX_SECTORS \
(UINT32_C(100)*CDIO_CD_FRAMES_PER_MIN-CDIO_PREGAP_SECTORS)
CDIO_CD_MAX_SECTORS = UINT32_C(100) * CDIO_CD_FRAMES_PER_MIN - CDIO_PREGAP_SECTORS
} cdio_cd_minutes_sectors;
#define msf_t_SIZEOF 3
@ -274,7 +278,7 @@
#define CD_FRAMESIZE_RAW CDIO_CD_FRAMESIZE_RAW
#endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/
#endif /* _CDIO_SECTOR_H_ */
#endif /* CDIO_SECTOR_H_ */
/*

View file

@ -1,7 +1,5 @@
/*
$Id: track.h,v 1.14 2008/03/25 15:59:09 karl Exp $
Copyright (C) 2005, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2006, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
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
@ -20,8 +18,8 @@
/** \file track.h
* \brief The top-level header for track-related libcdio calls.
*/
#ifndef __CDIO_TRACK_H__
#define __CDIO_TRACK_H__
#ifndef CDIO_TRACK_H_
#define CDIO_TRACK_H_
#ifdef __cplusplus
extern "C" {
@ -36,8 +34,8 @@ extern "C" {
TRACK_FORMAT_XA, /**< Mode2 of some sort */
TRACK_FORMAT_DATA, /**< Mode1 of some sort */
TRACK_FORMAT_PSX, /**< Playstation CD. Like audio but only 2336 bytes
* of user data.
*/
* of user data.
*/
TRACK_FORMAT_ERROR /**< Dunno what is, or some other error. */
} track_format_t;
@ -53,8 +51,8 @@ extern "C" {
track_flag_t preemphasis; /**< Linear preemphasis on an audio track */
track_flag_t copy_permit; /**< Whether copying is permitted */
int channels; /**< Number of audio channels, 2, 4. -2 if not
implemented or -1 for error.
*/
implemented or -1 for error.
*/
} track_flags_t;
/*! The leadout track is always 0xAA, regardless of # of tracks on
@ -72,7 +70,7 @@ extern "C" {
extern enum cdio_track_enums {
CDIO_CDROM_LBA = 0x01, /**< "logical block": first frame is #0 */
CDIO_CDROM_MSF = 0x02, /**< "minute-second-frame": binary, not
BCD here! */
BCD here! */
CDIO_CDROM_DATA_TRACK = 0x04,
CDIO_CDROM_CDI_TRACK = 0x10,
CDIO_CDROM_XA_TRACK = 0x20,
@ -88,14 +86,14 @@ extern "C" {
reference: MMC-3 draft revsion - 10g
*/
typedef enum {
AUDIO, /**< 2352 byte block length */
MODE1, /**< 2048 byte block length */
MODE1_RAW, /**< 2352 byte block length */
MODE2, /**< 2336 byte block length */
MODE2_FORM1, /**< 2048 byte block length */
MODE2_FORM2, /**< 2324 byte block length */
MODE2_FORM_MIX, /**< 2336 byte block length */
MODE2_RAW /**< 2352 byte block length */
AUDIO, /**< 2352 byte block length */
MODE1, /**< 2048 byte block length */
MODE1_RAW, /**< 2352 byte block length */
MODE2, /**< 2336 byte block length */
MODE2_FORM1, /**< 2048 byte block length */
MODE2_FORM2, /**< 2324 byte block length */
MODE2_FORM_MIX, /**< 2336 byte block length */
MODE2_RAW /**< 2352 byte block length */
} trackmode_t;
/*!
@ -132,7 +130,7 @@ extern "C" {
if not an audio track?
*/
track_flag_t cdio_get_track_copy_permit(const CdIo_t *p_cdio,
track_t i_track);
track_t i_track);
/*!
Get the format (audio, mode2, mode1) of track.
@ -230,13 +228,13 @@ extern "C" {
@return true if things worked or false if there is no track entry.
*/
bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track,
/*out*/ msf_t *msf);
/*out*/ msf_t *msf);
/*! Get linear preemphasis status on an audio track
This is not meaningful if not an audio track?
*/
track_flag_t cdio_get_track_preemphasis(const CdIo_t *p_cdio,
track_t i_track);
track_t i_track);
/*!
Get the number of sectors between this track an the next. This
@ -252,5 +250,4 @@ extern "C" {
}
#endif /* __cplusplus */
#endif /* __CDIO_TRACK_H__ */
#endif /* CDIO_TRACK_H_ */

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
@ -22,8 +22,8 @@
*/
#ifndef __CDIO_TYPES_H__
#define __CDIO_TYPES_H__
#ifndef CDIO_TYPES_H_
#define CDIO_TYPES_H_
#ifdef __cplusplus
extern "C" {
@ -116,7 +116,7 @@ typedef uint8_t ubyte;
#ifdef _Bool
#define bool _Bool
#else
#define bool int
#define bool unsigned char
#endif
#define true 1
#define false 0
@ -151,21 +151,21 @@ typedef uint8_t ubyte;
#define GNUC_PACKED
#endif /* !__GNUC__ */
#if defined(__GNUC__)
/* for GCC we try to use GNUC_PACKED */
# define PRAGMA_BEGIN_PACKED
# define PRAGMA_END_PACKED
#if defined(__MINGW32__)
# define PRAGMA_BEGIN_PACKED _Pragma("pack(push)") \
_Pragma("pack(1)")
# define PRAGMA_END_PACKED _Pragma("pack(pop)")
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
/* should work with most EDG-frontend based compilers */
# define PRAGMA_BEGIN_PACKED _Pragma("pack(1)")
# define PRAGMA_END_PACKED _Pragma("pack()")
/* should work with most EDG-frontend based compilers */
# define PRAGMA_BEGIN_PACKED _Pragma("pack(1)")
# define PRAGMA_END_PACKED _Pragma("pack()")
#elif defined(_MSC_VER)
# define PRAGMA_BEGIN_PACKED __pragma(pack(push, 1))
# define PRAGMA_END_PACKED __pragma(pack(pop))
# define PRAGMA_BEGIN_PACKED __pragma(pack(push, 1))
# define PRAGMA_END_PACKED __pragma(pack(pop))
#else /* neither gcc nor _Pragma() available... */
/* ...so let's be naive and hope the regression testsuite is run... */
# define PRAGMA_BEGIN_PACKED
# define PRAGMA_END_PACKED
/* ...so let's be naive and hope the regression testsuite is run... */
# define PRAGMA_BEGIN_PACKED
# define PRAGMA_END_PACKED
#endif
/*
@ -182,8 +182,22 @@ typedef uint8_t ubyte;
#ifndef NULL
# define NULL ((void*) 0)
#endif
/* our own offsetof()-like macro */
/** Provide a notice for deprecated elements. Before gcc 4.5 'deprecated'
takes no arguments. */
#if defined(__GNUC__)
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
# define LIBCDIO_DEPRECATED(object, notice) object __attribute__ ((deprecated(notice)))
# else
# define LIBCDIO_DEPRECATED(object, notice) object __attribute__ ((deprecated))
# endif
#elif defined(_MSC_VER)
#define LIBCDIO_DEPRECATED(object, notice) __declspec(deprecated(notice)) object
#else
#define LIBCDIO_DEPRECATED(object, notice)
#endif
/** our own offsetof()-like macro */
#define __cd_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
/*!
@ -251,10 +265,10 @@ typedef uint8_t ubyte;
typedef int32_t lsn_t;
/* Address in either MSF or logical format */
union cdio_cdrom_addr
union cdio_cdrom_addr
{
msf_t msf;
lba_t lba;
msf_t msf;
lba_t lba;
};
/*! The type of a track number 0..99. */
@ -311,20 +325,20 @@ typedef uint8_t ubyte;
Q Sub-channel Control Field (4.2.3.3)
*/
typedef enum {
CDIO_TRACK_FLAG_NONE = 0x00, /**< no flags set */
CDIO_TRACK_FLAG_PRE_EMPHASIS = 0x01, /**< audio track recorded with
CDIO_TRACK_FLAG_NONE = 0x00, /**< no flags set */
CDIO_TRACK_FLAG_PRE_EMPHASIS = 0x01, /**< audio track recorded with
pre-emphasis */
CDIO_TRACK_FLAG_COPY_PERMITTED = 0x02, /**< digital copy permitted */
CDIO_TRACK_FLAG_DATA = 0x04, /**< data track */
CDIO_TRACK_FLAG_COPY_PERMITTED = 0x02, /**< digital copy permitted */
CDIO_TRACK_FLAG_DATA = 0x04, /**< data track */
CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO = 0x08, /**< 4 audio channels */
CDIO_TRACK_FLAG_SCMS = 0x10 /**< SCMS (5.29.2.7) */
CDIO_TRACK_FLAG_SCMS = 0x10 /**< SCMS (5.29.2.7) */
} cdio_track_flag;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __CDIO_TYPES_H__ */
#endif /* CDIO_TYPES_H_ */
/*

View file

@ -1,7 +1,5 @@
/*
$Id: udf_time.h,v 1.5 2008/03/25 15:59:09 karl Exp $
Copyright (C) 2005, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
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

View file

@ -1,7 +1,5 @@
/*
$Id: utf8.h,v 1.2 2008/03/25 15:59:09 karl Exp $
Copyright (C) 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2008, 2012 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2006 Burkhard Plaum <plaum@ipf.uni-stuttgart.de>
This program is free software: you can redistribute it and/or modify
@ -17,7 +15,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* UTF-8 support */
/** \file utf8.h
*
* \brief UTF-8 support
*/
#include <cdio/types.h>
@ -87,6 +88,21 @@ bool cdio_charset_from_utf8(cdio_utf8_t * src, char ** dst,
*/
bool cdio_charset_to_utf8(char *src, size_t src_len, cdio_utf8_t **dst,
bool cdio_charset_to_utf8(const char *src, size_t src_len, cdio_utf8_t **dst,
const char * src_charset);
#ifdef _WIN32
/** \brief Convert an UTF8 string to UTF-16 (allocate returned string)
* \param str Source string
* \returns NULL if the conversion was unsuccesful. Caller must free the
* returned string.
* This is a convenience function available on Windows platforms only.
*/
wchar_t* cdio_utf8_to_wchar(const char* str);
#include <stdio.h> /* for FILE */
/** \brief Provides an UTF-8 compliant version of fopen for Windows
* The parameters and return value are the same as fopen().
*/
FILE* fopen_utf8(const char* filename, const char* mode);
#endif

View file

@ -1,5 +1,6 @@
/*
Copyright (C) 2004, 2005, 2006, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2004, 2005, 2006, 2008, 2010, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
This program is free software: you can redistribute it and/or modify
@ -16,8 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CDIO_UTIL_H__
#define __CDIO_UTIL_H__
#ifndef CDIO_UTIL_H_
#define CDIO_UTIL_H_
/*!
\file util.h
@ -128,7 +129,7 @@ char *cdio_realpath (const char *psz_src, char *psz_dst);
}
#endif
#endif /* __CDIO_UTIL_H__ */
#endif /* CDIO_UTIL_H_ */
/*

View file

@ -2,19 +2,19 @@
/** \file version.h
*
* \brief A file containing the libcdio package version
* number (84) and OS build name.
* number (90) and OS build name.
*/
/*! CDIO_VERSION is a C-Preprocessor macro of a string that shows what
version is used. cdio_version_string has the same value, but it is a
constant variable that can be accessed at run time. */
#define CDIO_VERSION "0.84git i686-pc-mingw32"
#define CDIO_VERSION "0.90 i686-pc-mingw32"
extern const char *cdio_version_string; /**< = CDIO_VERSION */
/*! LIBCDIO_VERSION_NUM is a C-Preprocessor macro that can be used for
testing in the C preprocessor. libcdio_version_num has the same
value, but it is a constant variable that can be accessed at run
time. */
#define LIBCDIO_VERSION_NUM 84
#define LIBCDIO_VERSION_NUM 90
extern const unsigned int libcdio_version_num; /**< = LIBCDIO_VERSION_NUM */

View file

@ -1,7 +1,6 @@
/*
$Id: xa.h,v 1.19 2008/03/25 15:59:10 karl Exp $
Copyright (C) 2003, 2004, 2005, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2003, 2004, 2005, 2006, 2008, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
See also iso9660.h by Eric Youngdale (1993) and in cdrtools. These are
@ -31,8 +30,8 @@
*/
#ifndef __CDIO_XA_H__
#define __CDIO_XA_H__
#ifndef CDIO_XA_H_
#define CDIO_XA_H_
#ifdef __cplusplus
extern "C" {
@ -153,7 +152,7 @@ iso9660_get_xa_attr_str (uint16_t xa_attr);
*/
iso9660_xa_t *
iso9660_xa_init (iso9660_xa_t *_xa, uint16_t uid, uint16_t gid, uint16_t attr,
uint8_t filenum);
uint8_t filenum);
#ifdef __cplusplus
}
@ -168,7 +167,7 @@ extern xa_misc_enum_t debugger_xa_misc_enum;
#endif /* __cplusplus */
#endif /* __CDIO_XA_H__ */
#endif /* CDIO_XA_H_ */
/*
* Local variables: