1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[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

@ -371,7 +371,7 @@ out:
return r;
}
BOOL ExtractISO(const char* src_iso, const char* dest_dir, bool scan)
BOOL ExtractISO(const char* src_iso, const char* dest_dir, BOOL scan)
{
size_t i;
int j;

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>
@ -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" {
@ -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
@ -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" {
@ -56,6 +56,7 @@ extern "C" {
} 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_ */

View file

@ -1,5 +1,5 @@
/*
Copyright (c) 2005, 2006, 2008 Rocky Bernstein <rocky@cpan.org>
Copyright (c) 2005, 2006, 2008, 2012 Rocky Bernstein <rocky@cpan.org>
Copyright (c) 2001-2002 Ben Fennema <bfennema@falcon.csc.calpoly.edu>
This program is free software: you can redistribute it and/or modify
@ -49,8 +49,8 @@
* See http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-167.pdf
*/
#ifndef _ECMA_167_H
#define _ECMA_167_H 1
#ifndef CDIO_ECMA_167_H
#define CDIO_ECMA_167_H 1
#include <cdio/types.h>
@ -584,7 +584,7 @@ struct udf_fileid_desc_s
/* MSVC workaround for multiple zero sized arrays
Unlike what is the case with GNU, and against logic, an union of zero
sized arrays in the Microsoft world is not zero bytes but one byte!
Thus, for sizeof() is consistent across platforms, we have to use an
Thus, for sizeof() to be consistent across platforms, we must use an
ugly workaround that attaches the union to the last non-zero member. */
union {
udf_Uint16_t i_imp_use;
@ -1039,4 +1039,4 @@ extern icbtag_flag_enum_t debug_flag_enum;
extern ecma_167_enum1_t debug_ecma_167_enum1;
extern ecma_167_timezone_enum_t debug_ecma_167_timezone_enum;
#endif /* _ECMA_167_H */
#endif /* CDIO_ECMA_167_H */

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>
@ -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>
@ -223,4 +221,4 @@ extern "C" {
}
#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>
@ -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,10 +68,13 @@
/*! 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)
@ -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" {
@ -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,10 +151,10 @@ 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)")
@ -183,7 +183,21 @@ typedef uint8_t ubyte;
# 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)
/*!
@ -324,7 +338,7 @@ typedef uint8_t ubyte;
}
#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" {
@ -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:

View file

@ -56,39 +56,29 @@
#define CDIO_FSEEK fseek
#endif
/* Windows'd fopen is not UTF-8 compliant - make it so */
#if !defined(_WIN32)
#define CDIO_FOPEN fopen
/* Windows' fopen is not UTF-8 compliant, so we use our own */
#if defined(_WIN32)
#include <cdio/utf8.h>
#define CDIO_FOPEN fopen_utf8
#else
#define CDIO_FOPEN fopenU
extern wchar_t* cdio_utf8_to_wchar(const char* str);
static inline FILE* fopenU(const char* filename, const char* mode)
{
FILE* ret = NULL;
wchar_t* wfilename = cdio_utf8_to_wchar(filename);
wchar_t* wmode = cdio_utf8_to_wchar(mode);
ret = _wfopen(wfilename, wmode);
free(wfilename);
free(wmode);
return ret;
}
#define CDIO_FOPEN fopen
#endif
/* Use _stati64 if needed, on platforms that don't have transparent LFS support */
#if defined(HAVE__STATI64) && defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
#define CDIO_STAT_STRUCT _stati64
#if !defined(_WIN32)
#define CDIO_STAT_CALL _stati64
#else
#define CDIO_STAT_CALL _stati64U
/* Once more, we have to provide an UTF-8 compliant version on Windows */
static inline int _stati64U(const char *path, struct _stati64 *buffer) {
#if defined(_WIN32)
/* Once again, use our own UTF-8 compliant version */
static inline int _stati64_utf8(const char *path, struct _stati64 *buffer) {
int ret;
wchar_t* wpath = cdio_utf8_to_wchar(path);
ret = _wstati64(wpath, buffer);
free(wpath);
return ret;
}
#define CDIO_STAT_CALL _stati64_utf8
#else
#define CDIO_STAT_CALL _stati64
#endif
#else
#define CDIO_STAT_STRUCT stat

View file

@ -1,7 +1,5 @@
/*
$Id: _cdio_stdio.h,v 1.3 2008/04/22 15:29:11 karl Exp $
Copyright (C) 2003, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2003, 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
@ -19,8 +17,8 @@
*/
#ifndef __CDIO_STDIO_H__
#define __CDIO_STDIO_H__
#ifndef CDIO_STDIO_H_
#define CDIO_STDIO_H_
#include "_cdio_stream.h"
@ -39,7 +37,7 @@ CdioDataSource_t * cdio_stdio_new(const char psz_path[]);
void cdio_stdio_destroy(CdioDataSource_t *p_obj);
#endif /* __CDIO_STREAM_STDIO_H__ */
#endif /* CDIO_STDIO_H_ */
/*

View file

@ -1,7 +1,6 @@
/*
$Id: _cdio_stream.h,v 1.5 2008/04/22 15:29:11 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
@ -19,8 +18,8 @@
*/
#ifndef __CDIO_STREAM_H__
#define __CDIO_STREAM_H__
#ifndef CDIO_STREAM_H_
#define CDIO_STREAM_H_
#include <cdio/types.h>
#include "cdio_private.h"
@ -127,7 +126,7 @@ extern "C" {
}
#endif /* __cplusplus */
#endif /* __CDIO_STREAM_H__ */
#endif /* CDIO_STREAM_H_ */
/*

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2008, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2008, 2011, 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 +16,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CDIO_ASSERT_H__
#define __CDIO_ASSERT_H__
#ifndef CDIO_ASSERT_H_
#define CDIO_ASSERT_H_
#if defined(__GNUC__) && !defined(__MINGW32__)
@ -43,7 +43,7 @@
__FILE__, __LINE__, __PRETTY_FUNCTION__); \
}
#else /* non GNU C or MinGW */
#else /* non GNU C */
#include <assert.h>
@ -55,4 +55,4 @@
#endif
#endif /* __CDIO_ASSERT_H__ */
#endif /* CDIO_ASSERT_H_ */

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2003, 2004, 2005, 2008, 2009, 2011
Copyright (C) 2003, 2004, 2005, 2008, 2009, 2011, 2012
Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
@ -19,8 +19,8 @@
/* Internal routines for CD I/O drivers. */
#ifndef __CDIO_PRIVATE_H__
#define __CDIO_PRIVATE_H__
#ifndef CDIO_DRIVER_PRIVATE_H_
#define CDIO_DRIVER_PRIVATE_H_
#if defined(HAVE_CONFIG_H) && !defined(LIBCDIO_CONFIG_H)
# include "config.h"
@ -559,4 +559,4 @@ extern "C" {
}
#endif /* __cplusplus */
#endif /* __CDIO_PRIVATE_H__ */
#endif /* CDIO_DRIVER_PRIVATE_H_ */

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2003, 2004, 2005, 2008, 2011
Copyright (C) 2003, 2004, 2005, 2008, 2011, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@ -23,6 +23,10 @@
# define __CDIO_CONFIG_H__ 1
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/cdio.h>
#include "cdio_private.h"
@ -124,7 +128,7 @@ cdio_get_discmode (CdIo_t *cd_obj)
char *
cdio_get_mcn (const CdIo_t *p_cdio)
{
if (p_cdio->op.get_mcn) {
if (p_cdio && p_cdio->op.get_mcn) {
return p_cdio->op.get_mcn (p_cdio->env);
} else {
return NULL;

View file

@ -1,7 +1,7 @@
/*
filemode.h -- file modes common definitions
Copyright (C) 2005, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2008, 2011, 2012 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 1985, 1990, 1993, 1998-2000 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@ -18,8 +18,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FILEMODE_H__
#define __FILEMODE_H__
#ifndef CDIO_DRIVER_FILEMODE_H_
#define CDIO_DRIVER_FILEMODE_H_
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
@ -131,4 +131,4 @@
# define S_ISCTG(m) (((m) & S_IFMT) == S_IFCTG)
#endif
#endif /* __FILEMODE_H__ */
#endif /* CDIO_DRIVER_FILEMODE_H_ */

View file

@ -1,5 +1,6 @@
/*
Copyright (C) 2004, 2005, 2006, 2008, 2009 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2004, 2005, 2006, 2008, 2009, 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
@ -18,8 +19,8 @@
/* Internal routines for CD I/O drivers. */
#ifndef __CDIO_GENERIC_H__
#define __CDIO_GENERIC_H__
#ifndef CDIO_DRIVER_GENERIC_H_
#define CDIO_DRIVER_GENERIC_H_
#if defined(HAVE_CONFIG_H) && !defined(LIBCDIO_CONFIG_H)
# include "config.h"
@ -29,6 +30,10 @@
#include <cdio/cdtext.h>
#include <cdio/iso9660.h>
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@ -237,7 +242,7 @@ extern "C" {
}
#endif /* __cplusplus */
#endif /* __CDIO_GENERIC_H__ */
#endif /* CDIO_DRIVER_GENERIC_H_ */
/*

View file

@ -1,5 +1,6 @@
/*
Copyright (C) 2003, 2004, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2003, 2004, 2008, 2011, 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
@ -35,8 +36,6 @@
#include "cdio_assert.h"
#include "portable.h"
static const char _rcsid[] = "$Id: logging.c,v 1.2 2008/04/22 15:29:12 karl Exp $";
cdio_log_level_t cdio_loglevel_default = CDIO_LOG_WARN;
static void

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2006, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2006, 2008, 2011, 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
@ -21,8 +21,8 @@
included other routines can be more portable.
*/
#ifndef __CDIO_PORTABLE_H__
#define __CDIO_PORTABLE_H__
#ifndef CDIO_DRIVER_PORTABLE_H_
#define CDIO_DRIVER_PORTABLE_H_
#if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__)
# include "config.h"
@ -51,4 +51,4 @@
# define drand48() (rand() / (double)RAND_MAX)
#endif
#endif /* __CDIO_PORTABLE_H__ */
#endif /* CDIO_DRIVER_PORTABLE_H_ */

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2005, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2008, 2011, 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,6 +25,10 @@
# define __CDIO_CONFIG_H__ 1
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
#include "cdio_private.h"

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2004, 2005, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2004, 2005, 2011, 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
@ -195,7 +195,7 @@ cdio_mmssff_to_lba (const char *psz_mmssff)
{
int psz_field;
lba_t ret;
char c;
unsigned char c;
if (0 == strcmp (psz_mmssff, "0"))
return 0;

View file

@ -1,5 +1,6 @@
/*
Copyright (C) 2003, 2004, 2005, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2003, 2004, 2005, 2008, 2011, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
This program is free software: you can redistribute it and/or modify
@ -20,10 +21,14 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
# define __CDIO_CONFIG_H__ 1
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
#include "cdio_private.h"
const char *track_format2str[6] =
@ -41,7 +46,11 @@ enum cdio_track_enums;
track_t
cdio_get_first_track_num(const CdIo_t *p_cdio)
{
if (NULL == p_cdio) return CDIO_INVALID_TRACK;
if (NULL == p_cdio) {
cdio_info("Null CdIo object passed\n");
return CDIO_INVALID_TRACK;
}
if (p_cdio->op.get_first_track_num) {
return p_cdio->op.get_first_track_num (p_cdio->env);
@ -57,7 +66,11 @@ cdio_get_first_track_num (const CdIo_t *p_cdio)
track_t
cdio_get_last_track_num (const CdIo_t *p_cdio)
{
if (NULL == p_cdio) return CDIO_INVALID_TRACK;
if (NULL == p_cdio) {
cdio_info("Null CdIo object passed\n");
return CDIO_INVALID_TRACK;
}
{
const track_t i_first_track = cdio_get_first_track_num(p_cdio);
if ( CDIO_INVALID_TRACK != i_first_track ) {
@ -76,6 +89,15 @@ cdio_get_last_track_num (const CdIo_t *p_cdio)
int
cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track)
{
if (NULL == p_cdio) {
cdio_info("Null CdIo object passed\n");
return -1;
}
if (i_track > CDIO_CD_MAX_TRACKS) {
cdio_log(CDIO_LOG_WARN, "Number of tracks exceeds maximum (%d vs. %d)\n",
i_track, CDIO_CD_MAX_TRACKS);
return -1;
}
if (p_cdio->op.get_track_channels) {
return p_cdio->op.get_track_channels (p_cdio->env, i_track);
} else {
@ -209,7 +231,10 @@ cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track)
lba_t
cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track)
{
if (!p_cdio) return CDIO_INVALID_LBA;
if (NULL == p_cdio) {
cdio_info("Null CdIo object passed\n");
return CDIO_INVALID_LBA;
}
if (p_cdio->op.get_track_lba) {
return p_cdio->op.get_track_lba (p_cdio->env, i_track);
@ -232,7 +257,16 @@ cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track)
lsn_t
cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track)
{
if (p_cdio == NULL) return CDIO_INVALID_LSN;
if (NULL == p_cdio) {
cdio_info("Null CdIo object passed\n");
return CDIO_INVALID_LSN;
}
if (i_track > CDIO_CD_MAX_TRACKS && i_track != CDIO_CDROM_LEADOUT_TRACK) {
cdio_log(CDIO_LOG_WARN, "Number of tracks exceeds maximum (%d vs. %d)\n",
i_track, CDIO_CD_MAX_TRACKS);
return CDIO_INVALID_LSN;
}
if (p_cdio->op.get_track_lba) {
return cdio_lba_to_lsn(p_cdio->op.get_track_lba (p_cdio->env, i_track));
@ -254,7 +288,16 @@ cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track)
char *
cdio_get_track_isrc (const CdIo_t *p_cdio, track_t i_track)
{
if (p_cdio == NULL) return NULL;
if (NULL == p_cdio) {
cdio_info("Null CdIo object passed\n");
return NULL;
}
if (i_track > CDIO_CD_MAX_TRACKS) {
cdio_log(CDIO_LOG_WARN, "Number of tracks exceeds maximum (%d vs. %d)\n",
i_track, CDIO_CD_MAX_TRACKS);
return NULL;
}
if (p_cdio->op.get_track_isrc) {
return p_cdio->op.get_track_isrc (p_cdio->env, i_track);
@ -271,7 +314,10 @@ cdio_get_track_isrc (const CdIo_t *p_cdio, track_t i_track)
lba_t
cdio_get_track_pregap_lba(const CdIo_t *p_cdio, track_t i_track)
{
if (p_cdio == NULL) return CDIO_INVALID_LBA;
if (NULL == p_cdio) {
cdio_info("Null CdIo object passed\n");
return CDIO_INVALID_LBA;
}
if (p_cdio->op.get_track_pregap_lba) {
return p_cdio->op.get_track_pregap_lba (p_cdio->env, i_track);

View file

@ -23,6 +23,10 @@
# include "config.h"
#endif
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@ -38,10 +42,6 @@
#include <cdio/utf8.h>
#include <cdio/logging.h>
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
/* Windows requires some basic UTF-8 support outside of Joliet */
#if defined(_WIN32)
#include <windows.h>
@ -55,7 +55,7 @@
* Converts an UTF-16 string to UTF8 (allocate returned string)
* Returns NULL on error
*/
char* cdio_wchar_to_utf8(const wchar_t* wstr)
static inline char* cdio_wchar_to_utf8(const wchar_t* wstr)
{
int size = 0;
char* str = NULL;
@ -99,6 +99,18 @@ wchar_t* cdio_utf8_to_wchar(const char* str)
}
return wstr;
}
/* UTF-8 compliant version of fopen() */
FILE* fopen_utf8(const char* filename, const char* mode)
{
FILE* ret = NULL;
wchar_t* wfilename = cdio_utf8_to_wchar(filename);
wchar_t* wmode = cdio_utf8_to_wchar(mode);
ret = _wfopen(wfilename, wmode);
free(wfilename);
free(wmode);
return ret;
}
#endif
#ifdef HAVE_JOLIET
@ -155,7 +167,7 @@ void cdio_charset_converter_destroy(cdio_charset_coverter_t*cnv)
#define BYTES_INCREMENT 16
static bool
do_convert(iconv_t cd, char * src, int src_len,
do_convert(iconv_t cd, const char * src, int src_len,
char ** dst, int *dst_len)
{
char * ret;
@ -182,7 +194,7 @@ do_convert(iconv_t cd, char * src, int src_len,
ret = malloc(alloc_size);
inbuf = src;
inbuf = (char *)src;
outbuf = ret;
while(1)
@ -257,7 +269,7 @@ 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)
{
iconv_t ic;
@ -297,7 +309,7 @@ bool cdio_charset_from_utf8(cdio_utf8_t * src, char ** dst,
return true;
}
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)
{
wchar_t* le_src;

View file

@ -130,7 +130,7 @@ _cdio_strdup_upper (const char str[])
while (*p)
{
*p = toupper (*p);
*p = toupper ((unsigned char) *p);
p++;
}
}

View file

@ -337,13 +337,15 @@ iso9660_set_dtime_with_timezone (const struct tm *p_tm,
void
iso9660_set_dtime(const struct tm *p_tm, /*out*/ iso9660_dtime_t *p_idr_date)
{
int time_zone;
int time_zone = 0;
if (p_tm) {
#ifdef HAVE_TM_GMTOFF
/* Convert seconds to minutes */
time_zone = p_tm->tm_gmtoff / 60;
#else
time_zone = (p_tm->tm_isdst > 0) ? -60 : 0;
#endif
}
iso9660_set_dtime_with_timezone (p_tm, time_zone, p_idr_date);
}
@ -390,13 +392,15 @@ iso9660_set_ltime_with_timezone (const struct tm *p_tm,
void
iso9660_set_ltime(const struct tm *p_tm, /*out*/ iso9660_ltime_t *pvd_date)
{
int time_zone;
int time_zone = 0;
if (p_tm) {
#ifdef HAVE_TM_GMTOFF
/* Set time zone in 15-minute interval encoding. */
time_zone = p_tm->tm_gmtoff / 60;
#else
time_zone = (p_tm->tm_isdst > 0) ? -60 : 0;
#endif
}
iso9660_set_ltime_with_timezone (p_tm, time_zone, pvd_date);
}
@ -667,8 +671,8 @@ iso9660_set_pvd(void *pd,
iso9660_set_ltime (&temp_tm, &(ipd.creation_date));
gmtime_r(pvd_time, &temp_tm);
iso9660_set_ltime (&temp_tm, &(ipd.modification_date));
iso9660_set_ltime (&temp_tm, &(ipd.expiration_date));
iso9660_set_ltime (&temp_tm, &(ipd.effective_date));
iso9660_set_ltime (NULL, &(ipd.expiration_date));
iso9660_set_ltime (NULL, &(ipd.effective_date));
ipd.file_structure_version = to_711(1);

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@ -23,6 +23,14 @@
#define __CDIO_CONFIG_H__ 1
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@ -46,8 +54,6 @@
#include "_cdio_stdio.h"
#include "cdio_private.h"
#include <stdio.h>
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.47 2008/04/18 16:02:09 karl Exp $";
/* Implementation of iso9660_t type */

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2003, 2004, 2005, 2008, 2011
Copyright (C) 2003, 2004, 2005, 2008, 2011, 2012
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
@ -22,8 +22,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CDIO_ISO9660_PRIVATE_H__
#define __CDIO_ISO9660_PRIVATE_H__
#ifndef CDIO_ISO9660_ISO9660_PRIVATE_H_
#define CDIO_ISO9660_ISO9660_PRIVATE_H_
#if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__)
# include "config.h"
@ -32,6 +32,10 @@
#include <cdio/types.h>
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#define ISO_VERSION 1
PRAGMA_BEGIN_PACKED
@ -71,7 +75,7 @@ typedef struct iso_path_table_s {
PRAGMA_END_PACKED
#endif /* __CDIO_ISO9660_PRIVATE_H__ */
#endif /* CDIO_ISO0660_ISO9660_PRIVATE_H_ */
/*

View file

@ -1,7 +1,7 @@
/*
filemode.c -- make a string describing file modes
Copyright (C) 2005, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2008, 2011, 2012 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 1985, 1990, 1993, 1998-2000 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2005, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2008, 2010, 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,5 +1,5 @@
/*
Copyright (C) 2005, 2006, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2006, 2008, 2010, 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: udf_fs.h,v 1.3 2008/04/18 16:02:10 karl Exp $
Copyright (C) 2006, 2008 Rocky Bernstein <rockyb@gnu.org>
Copyright (C) 2006, 2008, 2012 Rocky Bernstein <rockyb@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
@ -17,8 +15,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CDIO_UDF_FS_H__
#define __CDIO_UDF_FS_H__
#ifndef CDIO_UDF_UDF_FS_H_
#define CDIO_UDF_UDF_FS_H_
#include <cdio/ecma_167.h>
/**
@ -27,7 +25,7 @@
*/
int udf_checktag(const udf_tag_t *p_tag, udf_Uint16_t tag_id);
#endif /* __CDIO_UDF_FS_H__ */
#endif /* CDIO_UDF_UDF_FS_H_ */
/*

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2005, 2006, 2008, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2005, 2006, 2008, 2011, 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
@ -15,14 +15,18 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CDIO_UDF_PRIVATE_H__
#define __CDIO_UDF_PRIVATE_H__
#ifndef CDIO_UDF_UDF_PRIVATE_H_
#define CDIO_UDF_UDF_PRIVATE_H_
#if defined(HAVE_CONFIG_H) && !defined(LIBCDIO_CONFIG_H) && !defined(__CDIO_CONFIG_H__)
# include "config.h"
# define __CDIO_CONFIG_H__ 1
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include <cdio/types.h>
#include <cdio/ecma_167.h>
#include <cdio/udf.h>
@ -43,7 +47,7 @@ struct udf_s {
uint32_t fsd_offset; /* lba of fileset descriptor */
};
#endif /* __CDIO_UDF_PRIVATE_H__ */
#endif /* CDIO_UDF_UDF_PRIVATE_H_ */
/*

View file

@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 316
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.2.0.188"
CAPTION "Rufus v1.2.0.189"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,278,50,14
@ -77,7 +77,7 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL,
"SysLink",WS_TABSTOP,46,47,114,9
LTEXT "Version 1.2.0 (Build 188)",IDC_STATIC,46,19,78,8
LTEXT "Version 1.2.0 (Build 189)",IDC_STATIC,46,19,78,8
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
@ -237,8 +237,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,2,0,188
PRODUCTVERSION 1,2,0,188
FILEVERSION 1,2,0,189
PRODUCTVERSION 1,2,0,189
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -255,13 +255,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.2.0.188"
VALUE "FileVersion", "1.2.0.189"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.2.0.188"
VALUE "ProductVersion", "1.2.0.189"
END
END
BLOCK "VarFileInfo"