diff --git a/res/localization/embedded.sed b/res/localization/embedded.sed
index 90810b6f..68a44718 100644
--- a/res/localization/embedded.sed
+++ b/res/localization/embedded.sed
@@ -11,7 +11,10 @@ s/[ \t]*$//
# remove the UI controls for "en-US" as they are just here for translators
# 1,300 means we only do this for the the first 300 lines
-1,300 {/g IDD_DIALOG/,/g IDD_MESSAGES/{/g IDD_MESSAGES/!d}}
+1,300 {/^g IDD_DIALOG/,/^g IDD_MESSAGES/{/^g IDD_MESSAGES/!d}}
+
+# also remove the "translated by" line for English
+1,500{/^t MSG_176/d}
# output file *MUST* be CR/LF
s/$/\r/
\ No newline at end of file
diff --git a/src/format.c b/src/format.c
index b9873c9e..d2ac1e7f 100644
--- a/src/format.c
+++ b/src/format.c
@@ -367,7 +367,6 @@ static BOOL FormatFAT32(DWORD DriveIndex)
// Debug temp vars
ULONGLONG FatNeeded, ClusterCount;
- // TODO: use another lmsg for Large FAT32
PrintStatus(0, TRUE, lmprintf(MSG_222, "Large FAT32"));
VolumeId = GetVolumeID();
@@ -1439,7 +1438,7 @@ DWORD WINAPI FormatThread(LPVOID param)
goto out;
}
if ((bt == BT_UEFI) && (!iso_report.has_efi) && (iso_report.has_win7_efi)) {
- // TODO: (v1.4.0) check ISO with EFI only
+ // TODO: Check ISO with EFI only
PrintStatus(0, TRUE, lmprintf(MSG_232));
wim_image[0] = drive_name[0];
efi_dst[0] = drive_name[0];
diff --git a/src/libcdio/cdio/iso9660.h b/src/libcdio/cdio/iso9660.h
index e52e8ebc..d66997a6 100644
--- a/src/libcdio/cdio/iso9660.h
+++ b/src/libcdio/cdio/iso9660.h
@@ -21,7 +21,7 @@
along with this program. If not, see .
*/
/*!
- * \file iso9660.h
+ * \file iso9660.h
*
* \brief The top-level interface header for libiso9660: the ISO-9660
* filesystem library; applications include this.
@@ -40,7 +40,7 @@
#include
#include
-/** \brief ISO 9660 Integer and Character types
+/** \brief ISO 9660 Integer and Character types
These are described in the section 7 of the ISO 9660 (or ECMA 119)
specification.
@@ -83,11 +83,11 @@ typedef char dchar_t; /*! See section 7.4.1 */
extern enum iso_enum1_s {
ISO_PVD_SECTOR = 16, /**< Sector of Primary Volume Descriptor. */
ISO_EVD_SECTOR = 17, /**< Sector of End Volume Descriptor. */
- LEN_ISONAME = 31, /**< Size in bytes of the filename
+ LEN_ISONAME = 31, /**< Size in bytes of the filename
portion + null byte. */
- ISO_MAX_SYSTEM_ID = 32, /**< Maximum number of characters in a system
+ ISO_MAX_SYSTEM_ID = 32, /**< Maximum number of characters in a system
id. */
- MAX_ISONAME = 37, /**< Size in bytes of the filename
+ MAX_ISONAME = 37, /**< Size in bytes of the filename
portion + null byte. */
ISO_MAX_PREPARER_ID = 128, /**< Maximum number of characters in a
preparer id. */
@@ -125,10 +125,10 @@ extern enum iso_vd_enum_s {
ISO_VD_END = 255
} iso_vd_enums;
-
+
/*!
- An ISO filename is:
- abcd.eee ->
+ An ISO filename is:
+ abcd.eee ->
filename.ext;version#
For ISO-9660 Level 1, the maximum needed string length is:
@@ -161,7 +161,7 @@ extern enum iso_vd_enum_s {
*/
extern const char ISO_STANDARD_ID[sizeof("CD001")-1];
-#define ISO_STANDARD_ID "CD001"
+#define ISO_STANDARD_ID "CD001"
#ifdef __cplusplus
extern "C" {
@@ -176,9 +176,9 @@ typedef enum strncpy_pad_check {
PRAGMA_BEGIN_PACKED
-/*!
+/*!
\brief ISO-9660 shorter-format time structure. See ECMA 9.1.5.
-
+
@see iso9660_dtime
*/
struct iso9660_dtime_s {
@@ -195,13 +195,13 @@ struct iso9660_dtime_s {
typedef struct iso9660_dtime_s iso9660_dtime_t;
-/*!
+/*!
\brief ISO-9660 longer-format time structure.
Section 8.4.26.1 of ECMA 119. All values are encoded as character
arrays, eg. '1', '9', '5', '5' for the year 1955 (no null terminated
byte).
-
+
@see iso9660_ltime
*/
struct iso9660_ltime_s {
@@ -231,7 +231,7 @@ typedef struct iso9660_stat_s iso9660_stat_t;
#include
-/*! \brief Format of an ISO-9660 directory record
+/*! \brief Format of an ISO-9660 directory record
Section 9.1 of ECMA 119.
@@ -240,7 +240,7 @@ typedef struct iso9660_stat_s iso9660_stat_t;
Sun3/mc68020) pad the structures to an even length. For this reason,
we cannot use sizeof (struct iso_path_table) or sizeof (struct
iso_directory_record) to compute on disk sizes. Instead, we use
- offsetof(..., name) and add the name size. See mkisofs.h of the
+ offsetof(..., name) and add the name size. See mkisofs.h of the
cdrtools package.
@see iso9660_stat
@@ -251,12 +251,12 @@ struct iso9660_dir_s {
zero. (9.1.2) */
iso733_t extent; /*! LBA of first local block allocated
to the extent */
- iso733_t size; /*! data length of File Section. This
- does not include the length of
+ iso733_t size; /*! data length of File Section. This
+ does not include the length of
any XA Records. (9.1.2) */
iso9660_dtime_t recording_time; /*! Recording date and time (9.1.3) */
uint8_t file_flags; /*! If no XA then zero. If a directory,
- then bits 2,3 and 7 are zero.
+ then bits 2,3 and 7 are zero.
(9.1.6) */
iso711_t file_unit_size; /*! File Unit size for the File
Section if the File Section
@@ -279,13 +279,13 @@ struct iso9660_dir_s {
we leverage the fact that iso711_t and char are the same size
and use an union. The only gotcha is that the actual string
payload of filename.str[] starts at 1, not 0. */
- union {
+ union {
iso711_t len;
char str[1];
} filename;
} GNUC_PACKED;
-/*!
+/*!
\brief ISO-9660 Primary Volume Descriptor.
*/
struct iso9660_pvd_s {
@@ -297,7 +297,7 @@ struct iso9660_pvd_s {
achar_t system_id[ISO_MAX_SYSTEM_ID]; /**< each char is an achar */
dchar_t volume_id[ISO_MAX_VOLUME_ID]; /**< each char is a dchar */
uint8_t unused2[8]; /**< unused - value 0 */
- iso733_t volume_space_size; /**< total number of
+ iso733_t volume_space_size; /**< total number of
sectors */
uint8_t unused3[32]; /**< unused - value 0 */
iso723_t volume_set_size; /**< often 1 */
@@ -312,49 +312,49 @@ struct iso9660_pvd_s {
table */
iso732_t opt_type_m_path_table; /**< first sector of optional
M Path table */
- iso9660_dir_t root_directory_record; /**< See 8.4.18 and
+ iso9660_dir_t root_directory_record; /**< See 8.4.18 and
section 9.1 of
ISO 9660 spec. */
char root_directory_filename; /**< Is '\\0' or root
directory. Also pads previous
field to 34 bytes */
- dchar_t volume_set_id[ISO_MAX_VOLUMESET_ID]; /**< Volume Set of
+ dchar_t volume_set_id[ISO_MAX_VOLUMESET_ID]; /**< Volume Set of
which the volume is
- a member. See
+ a member. See
section 8.4.19 */
achar_t publisher_id[ISO_MAX_PUBLISHER_ID]; /**< Publisher of
volume. If the first
character is '_' 0x5F,
the remaining bytes
- specify a file
+ specify a file
containing the user.
If all bytes are " "
- (0x20) no publisher
- is specified. See
+ (0x20) no publisher
+ is specified. See
section 8.4.20 of
ECMA 119 */
achar_t preparer_id[ISO_MAX_PREPARER_ID]; /**< preparer of
volume. If the first
character is '_' 0x5F,
the remaining bytes
- specify a file
+ specify a file
containing the user.
If all bytes are " "
- (0x20) no preparer
- is specified.
- See section 8.4.21
+ (0x20) no preparer
+ is specified.
+ See section 8.4.21
of ECMA 119 */
achar_t application_id[ISO_MAX_APPLICATION_ID]; /**< application
use to create the
volume. If the first
character is '_' 0x5F,
the remaining bytes
- specify a file
+ specify a file
containing the user.
If all bytes are " "
- (0x20) no application
+ (0x20) no application
is specified.
- See section of 8.4.22
+ See section of 8.4.22
of ECMA 119 */
dchar_t copyright_file_id[37]; /**< Name of file for
copyright info. If
@@ -363,9 +363,9 @@ struct iso9660_pvd_s {
is identified. See
section 8.4.23 of ECMA 119
9660 spec. */
- dchar_t abstract_file_id[37]; /**< See section 8.4.24 of
+ dchar_t abstract_file_id[37]; /**< See section 8.4.24 of
ECMA 119. */
- dchar_t bibliographic_file_id[37]; /**< See section 7.5 of
+ dchar_t bibliographic_file_id[37]; /**< See section 7.5 of
ISO 9660 spec. */
iso9660_ltime_t creation_date; /**< date and time of volume
creation. See section 8.4.26.1
@@ -378,84 +378,84 @@ struct iso9660_pvd_s {
expires. See section 8.4.28
of the ISO 9660 spec. */
iso9660_ltime_t effective_date; /**< date and time when volume
- is effective. See section
- 8.4.29 of the ISO 9660
+ is effective. See section
+ 8.4.29 of the ISO 9660
spec. */
iso711_t file_structure_version; /**< value 1 for ECMA 119 */
uint8_t unused4[1]; /**< unused - value 0 */
- char application_data[512]; /**< Application can put
+ char application_data[512]; /**< Application can put
whatever it wants here. */
uint8_t unused5[653]; /**< Unused - value 0 */
} GNUC_PACKED;
typedef struct iso9660_pvd_s iso9660_pvd_t;
-/*!
- \brief ISO-9660 Supplementary Volume Descriptor.
+/*!
+ \brief ISO-9660 Supplementary Volume Descriptor.
This is used for Joliet Extentions and is almost the same as the
the primary descriptor but two unused fields, "unused1" and "unused3
become "flags and "escape_sequences" respectively.
*/
struct iso9660_svd_s {
- iso711_t type; /**< ISO_VD_SUPPLEMENTARY - 2
+ iso711_t type; /**< ISO_VD_SUPPLEMENTARY - 2
*/
- char id[5]; /**< ISO_STANDARD_ID "CD001"
+ char id[5]; /**< ISO_STANDARD_ID "CD001"
*/
iso711_t version; /**< value 1 */
char flags; /**< Section 8.5.3 */
- achar_t system_id[ISO_MAX_SYSTEM_ID]; /**< Section 8.5.4; each char
+ 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
is a dchar */
char unused2[8];
- iso733_t volume_space_size; /**< total number of
+ iso733_t volume_space_size; /**< total number of
sectors */
char escape_sequences[32]; /**< Section 8.5.6 */
iso723_t volume_set_size; /**< often 1 */
iso723_t volume_sequence_number; /**< often 1 */
iso723_t logical_block_size; /**< sector size, e.g. 2048 */
- iso733_t path_table_size; /**< 8.5.7; bytes in path
+ iso733_t path_table_size; /**< 8.5.7; bytes in path
table */
- iso731_t type_l_path_table; /**< 8.5.8; first sector of
+ iso731_t type_l_path_table; /**< 8.5.8; first sector of
little-endian path table */
- iso731_t opt_type_l_path_table; /**< 8.5.9; first sector of
- optional little-endian
+ iso731_t opt_type_l_path_table; /**< 8.5.9; first sector of
+ optional little-endian
path table */
- iso732_t type_m_path_table; /**< 8.5.10; first sector of
+ iso732_t type_m_path_table; /**< 8.5.10; first sector of
big-endian path table */
- iso732_t opt_type_m_path_table; /**< 8.5.11; first sector of
- optional big-endian path
+ iso732_t opt_type_m_path_table; /**< 8.5.11; first sector of
+ optional big-endian path
table */
iso9660_dir_t root_directory_record; /**< See section 8.5.12 and
9.1 of ISO 9660 spec. */
char root_directory_filename; /**< Is '\\0' or root
directory. Also pads previous
field to 34 bytes */
- dchar_t volume_set_id[ISO_MAX_VOLUMESET_ID]; /**< 8.5.13;
+ dchar_t volume_set_id[ISO_MAX_VOLUMESET_ID]; /**< 8.5.13;
dchars */
- achar_t publisher_id[ISO_MAX_PUBLISHER_ID]; /**<
+ achar_t publisher_id[ISO_MAX_PUBLISHER_ID]; /**<
Publisher of volume.
If the first char-
aracter is '_' 0x5F,
the remaining bytes
- specify a file
+ specify a file
containing the user.
If all bytes are " "
- (0x20) no publisher
- is specified. See
+ (0x20) no publisher
+ is specified. See
section 8.5.14 of
ECMA 119 */
- achar_t preparer_id[ISO_MAX_PREPARER_ID]; /**<
+ achar_t preparer_id[ISO_MAX_PREPARER_ID]; /**<
Data preparer of
volume. If the first
character is '_' 0x5F,
the remaining bytes
- specify a file
+ specify a file
containing the user.
If all bytes are " "
- (0x20) no preparer
- is specified.
+ (0x20) no preparer
+ is specified.
See section 8.5.15
of ECMA 119 */
achar_t application_id[ISO_MAX_APPLICATION_ID]; /**< application
@@ -463,10 +463,10 @@ struct iso9660_svd_s {
volume. If the first
character is '_' 0x5F,
the remaining bytes
- specify a file
+ specify a file
containing the user.
If all bytes are " "
- (0x20) no application
+ (0x20) no application
is specified.
See section of 8.5.16
of ECMA 119 */
@@ -477,9 +477,9 @@ struct iso9660_svd_s {
is identified. See
section 8.5.17 of ECMA 119
9660 spec. */
- dchar_t abstract_file_id[37]; /**< See section 8.5.18 of
+ dchar_t abstract_file_id[37]; /**< See section 8.5.18 of
ECMA 119. */
- dchar_t bibliographic_file_id[37]; /**< See section 8.5.19 of
+ dchar_t bibliographic_file_id[37]; /**< See section 8.5.19 of
ECMA 119. */
iso9660_ltime_t creation_date; /**< date and time of volume
creation. See section 8.4.26.1
@@ -489,15 +489,15 @@ struct iso9660_svd_s {
See section 8.4.27 of the
ECMA 119 spec. */
iso9660_ltime_t expiration_date; /**< date and time when volume
- expires. See section 8.4.28
+ expires. See section 8.4.28
of the ECMA 119 spec. */
iso9660_ltime_t effective_date; /**< date and time when volume
- is effective. See section
- 8.4.29 of the ECMA 119
+ is effective. See section
+ 8.4.29 of the ECMA 119
spec. */
iso711_t file_structure_version; /**< value 1 for ECMA 119 */
uint8_t unused4[1]; /**< unused - value 0 */
- char application_data[512]; /**< 8.5.20 Application can put
+ char application_data[512]; /**< 8.5.20 Application can put
whatever it wants here. */
uint8_t unused5[653]; /**< Unused - value 0 */
} GNUC_PACKED;
@@ -517,7 +517,7 @@ PRAGMA_END_PACKED
*/
struct iso9660_stat_s { /* big endian!! */
- iso_rock_statbuf_t rr; /**< Rock Ridge-specific fields */
+ iso_rock_statbuf_t rr; /**< Rock Ridge-specific fields */
struct tm tm; /**< time on entry - FIXME merge with
one of entries above, like ctime? */
@@ -530,7 +530,7 @@ struct iso9660_stat_s { /* big endian!! */
char filename[EMPTY_ARRAY_SIZE]; /**< filename */
};
-/** A mask used in iso9660_ifs_read_vd which allows what kinds
+/** A mask used in iso9660_ifs_read_vd which allows what kinds
of extensions we allow, eg. Joliet, Rock Ridge, etc. */
typedef uint8_t iso_extension_mask_t;
@@ -546,7 +546,7 @@ extern enum iso_extension_enum_s {
ISO_EXTENSION_ROCK_RIDGE = 0x08,
ISO_EXTENSION_HIGH_SIERRA = 0x10
} iso_extension_enums;
-
+
#define ISO_EXTENSION_ALL 0xFF
#define ISO_EXTENSION_NONE 0x00
@@ -554,15 +554,15 @@ extern enum iso_extension_enum_s {
(ISO_EXTENSION_JOLIET_LEVEL1 | \
ISO_EXTENSION_JOLIET_LEVEL2 | \
ISO_EXTENSION_JOLIET_LEVEL3 )
-
+
/** This is an opaque structure. */
-typedef struct _iso9660_s iso9660_t;
+typedef struct _iso9660_s iso9660_t;
/*! Close previously opened ISO 9660 image and free resources
associated with the image. Call this when done using using an ISO
9660 image.
-
+
@return true is unconditionally returned. If there was an error
false would be returned.
*/
@@ -574,7 +574,7 @@ typedef struct _iso9660_s iso9660_t;
a mode. NULL is returned on error.
*/
iso9660_t *iso9660_open (const char *psz_path /*flags, mode */);
-
+
/*!
Open an ISO 9660 image for reading allowing various ISO 9660
extensions. Maybe in the future we will have a mode. NULL is
@@ -582,9 +582,9 @@ typedef struct _iso9660_s iso9660_t;
@see iso9660_open_fuzzy
*/
- iso9660_t *iso9660_open_ext (const char *psz_path,
+ iso9660_t *iso9660_open_ext (const char *psz_path,
iso_extension_mask_t iso_extension_mask);
-
+
/*! Open an ISO 9660 image for "fuzzy" reading. This means that we
will try to guess various internal offset based on internal
checks. This may be useful when trying to read an ISO 9660 image
@@ -596,7 +596,7 @@ typedef struct _iso9660_s iso9660_t;
by (as long as that is <= i_fuzz).
Maybe in the future we will have a mode. NULL is returned on error.
-
+
@see iso9660_open, @see iso9660_fuzzy_ext
*/
iso9660_t *iso9660_open_fuzzy (const char *psz_path /*flags, mode */,
@@ -606,9 +606,9 @@ typedef struct _iso9660_s iso9660_t;
Open an ISO 9660 image for reading with some tolerence for positioning
of the ISO9660 image. We scan for ISO_STANDARD_ID and use that to set
the eventual offset to adjust by (as long as that is <= i_fuzz).
-
+
Maybe in the future we will have a mode. NULL is returned on error.
-
+
@see iso9660_open_ext @see iso9660_open_fuzzy
*/
iso9660_t *iso9660_open_fuzzy_ext (const char *psz_path,
@@ -622,12 +622,12 @@ typedef struct _iso9660_s iso9660_t;
not reading an ISO 9660 image but a CD-Image which contains an ISO 9660
filesystem.
*/
- bool iso9660_ifs_fuzzy_read_superblock (iso9660_t *p_iso,
+ bool iso9660_ifs_fuzzy_read_superblock (iso9660_t *p_iso,
iso_extension_mask_t iso_extension_mask,
uint16_t i_fuzz);
-
+
/*!
- Seek to a position and then read i_size blocks.
+ Seek to a position and then read i_size blocks.
@param p_iso the ISO-9660 file image to get data from
@@ -642,34 +642,34 @@ typedef struct _iso9660_s iso9660_t;
@return number of bytes (not blocks) read
*/
- long int iso9660_iso_seek_read (const iso9660_t *p_iso, /*out*/ void *ptr,
+ long int iso9660_iso_seek_read (const iso9660_t *p_iso, /*out*/ void *ptr,
lsn_t start, long int i_size);
-
+
/*!
Read the Primary Volume Descriptor for a CD.
True is returned if read, and false if there was an error.
*/
- bool iso9660_fs_read_pvd ( const CdIo_t *p_cdio,
+ bool iso9660_fs_read_pvd ( const CdIo_t *p_cdio,
/*out*/ iso9660_pvd_t *p_pvd );
-
+
/*!
Read the Primary Volume Descriptor for an ISO 9660 image.
True is returned if read, and false if there was an error.
*/
- bool iso9660_ifs_read_pvd (const iso9660_t *p_iso,
+ bool iso9660_ifs_read_pvd (const iso9660_t *p_iso,
/*out*/ iso9660_pvd_t *p_pvd);
-
+
/*!
- Read the Super block of an ISO 9660 image. This is the
- Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume
+ Read the Super block of an ISO 9660 image. This is the
+ Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume
Descriptor if (Joliet) extensions are acceptable.
*/
- bool iso9660_fs_read_superblock (CdIo_t *p_cdio,
+ bool iso9660_fs_read_superblock (CdIo_t *p_cdio,
iso_extension_mask_t iso_extension_mask);
-
+
/*!
- Read the Super block of an ISO 9660 image. This is the
- Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume
+ Read the Super block of an ISO 9660 image. This is the
+ Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume
Descriptor if (Joliet) extensions are acceptable.
*/
bool iso9660_ifs_read_superblock (iso9660_t *p_iso,
@@ -677,58 +677,58 @@ typedef struct _iso9660_s iso9660_t;
/*====================================================
- Time conversion
+ Time conversion
====================================================*/
/*!
Set time in format used in ISO 9660 directory index record
- from a Unix time structure.
+ from a Unix time structure.
*/
- void iso9660_set_dtime (const struct tm *tm,
+ void iso9660_set_dtime (const struct tm *tm,
/*out*/ iso9660_dtime_t *idr_date);
-
-
+
+
/*!
Set time in format used in ISO 9660 directory index record
from a Unix time structure. timezone is given as an offset
- correction in minutes.
+ correction in minutes.
*/
- void iso9660_set_dtime_with_timezone (const struct tm *p_tm,
+ void iso9660_set_dtime_with_timezone (const struct tm *p_tm,
int timezone,
/*out*/ iso9660_dtime_t *p_idr_date);
-
+
/*!
Set "long" time in format used in ISO 9660 primary volume descriptor
from a Unix time structure. */
- void iso9660_set_ltime (const struct tm *_tm,
+ void iso9660_set_ltime (const struct tm *_tm,
/*out*/ iso9660_ltime_t *p_pvd_date);
-
+
/*!
Set "long" time in format used in ISO 9660 primary volume descriptor
from a Unix time structure. */
- void iso9660_set_ltime_with_timezone (const struct tm *_tm,
+ void iso9660_set_ltime_with_timezone (const struct tm *_tm,
int timezone,
/*out*/ iso9660_ltime_t *p_pvd_date);
-
+
/*!
- Get Unix time structure from format use in an ISO 9660 directory index
+ Get Unix time structure from format use in an ISO 9660 directory index
record. Even though tm_wday and tm_yday fields are not explicitly in
idr_date, they are calculated from the other fields.
-
+
If tm is to reflect the localtime, set "b_localtime" true, otherwise
tm will reported in GMT.
*/
bool iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime,
/*out*/ struct tm *tm);
-
-
+
+
/*!
Get "long" time in format used in ISO 9660 primary volume descriptor
- from a Unix time structure.
+ from a Unix time structure.
*/
- bool iso9660_get_ltime (const iso9660_ltime_t *p_ldate,
+ bool iso9660_get_ltime (const iso9660_ltime_t *p_ldate,
/*out*/ struct tm *p_tm);
-
+
/*====================================================
Character Classification and String Manipulation
====================================================*/
@@ -738,35 +738,35 @@ typedef struct _iso9660_s iso9660_t;
letters A-Z, the digits 0-9 and an underscore.
*/
bool iso9660_is_dchar (int c);
-
+
/*!
- Return true if c is an ACHAR -
- These are the DCHAR's plus some ASCII symbols including the space
- symbol.
+ Return true if c is an ACHAR -
+ These are the DCHAR's plus some ASCII symbols including the space
+ symbol.
*/
bool iso9660_is_achar (int c);
-
+
/*!
Convert an ISO-9660 file name which is in the format usually stored
in a ISO 9660 directory entry into what's usually listed as the
file name in a listing. Lowercase name, and remove trailing ;1's
or .;1's and turn the other ;'s into version numbers.
-
+
@param psz_oldname the ISO-9660 filename to be translated.
@param psz_newname returned string. The caller allocates this and
it should be at least the size of psz_oldname.
@return length of the translated string is returned.
*/
- int iso9660_name_translate(const char *psz_oldname,
+ int iso9660_name_translate(const char *psz_oldname,
/*out*/ char *psz_newname);
-
+
/*!
Convert an ISO-9660 file name which is in the format usually stored
in a ISO 9660 directory entry into what's usually listed as the
file name in a listing. Lowercase name if no Joliet Extension
interpretation. Remove trailing ;1's or .;1's and turn the other
;'s into version numbers.
-
+
@param psz_oldname the ISO-9660 filename to be translated.
@param psz_newname returned string. The caller allocates this and
it should be at least the size of psz_oldname.
@@ -775,83 +775,83 @@ typedef struct _iso9660_s iso9660_t;
@return length of the translated string is returned. It will be no greater
than the length of psz_oldname.
*/
- int iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname,
+ int iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname,
uint8_t i_joliet_level);
-
- /*!
+
+ /*!
Pad string src with spaces to size len and copy this to dst. If
len is less than the length of src, dst will be truncated to the
first len characters of src.
-
- src can also be scanned to see if it contains only ACHARs, DCHARs,
+
+ src can also be scanned to see if it contains only ACHARs, DCHARs,
7-bit ASCII chars depending on the enumeration _check.
-
+
In addition to getting changed, dst is the return value.
Note: this string might not be NULL terminated.
*/
- char *iso9660_strncpy_pad(char dst[], const char src[], size_t len,
+ char *iso9660_strncpy_pad(char dst[], const char src[], size_t len,
enum strncpy_pad_check _check);
-
+
/*=====================================================================
- File and Directory Names
+ File and Directory Names
======================================================================*/
-
+
/*!
Check that psz_path is a valid ISO-9660 directory name.
-
- A valid directory name should not start out with a slash (/),
- dot (.) or null byte, should be less than 37 characters long,
- have no more than 8 characters in a directory component
- which is separated by a /, and consist of only DCHARs.
-
+
+ A valid directory name should not start out with a slash (/),
+ dot (.) or null byte, should be less than 37 characters long,
+ have no more than 8 characters in a directory component
+ which is separated by a /, and consist of only DCHARs.
+
True is returned if psz_path is valid.
*/
bool iso9660_dirname_valid_p (const char psz_path[]);
-
- /*!
+
+ /*!
Take psz_path and a version number and turn that into a ISO-9660
pathname. (That's just the pathname followd by ";" and the version
number. For example, mydir/file.ext -> MYDIR/FILE.EXT;1 for version
1. The resulting ISO-9660 pathname is returned.
*/
char *iso9660_pathname_isofy (const char psz_path[], uint16_t i_version);
-
+
/*!
- Check that psz_path is a valid ISO-9660 pathname.
-
+ Check that psz_path is a valid ISO-9660 pathname.
+
A valid pathname contains a valid directory name, if one appears and
the filename portion should be no more than 8 characters for the
file prefix and 3 characters in the extension (or portion after a
dot). There should be exactly one dot somewhere in the filename
portion and the filename should be composed of only DCHARs.
-
+
True is returned if psz_path is valid.
*/
bool iso9660_pathname_valid_p (const char psz_path[]);
/*=====================================================================
- directory tree
+ directory tree
======================================================================*/
void
-iso9660_dir_init_new (void *dir, uint32_t self, uint32_t ssize,
- uint32_t parent, uint32_t psize,
+iso9660_dir_init_new (void *dir, uint32_t self, uint32_t ssize,
+ uint32_t parent, uint32_t psize,
const time_t *dir_time);
void
-iso9660_dir_init_new_su (void *dir, uint32_t self, uint32_t ssize,
- const void *ssu_data, unsigned int ssu_size,
- uint32_t parent, uint32_t psize,
+iso9660_dir_init_new_su (void *dir, uint32_t self, uint32_t ssize,
+ const void *ssu_data, unsigned int ssu_size,
+ uint32_t parent, uint32_t psize,
const void *psu_data, unsigned int psu_size,
const time_t *dir_time);
void
iso9660_dir_add_entry_su (void *dir, const char filename[], uint32_t extent,
- uint32_t size, uint8_t file_flags,
+ uint32_t size, uint8_t file_flags,
const void *su_data,
unsigned int su_size, const time_t *entry_time);
-unsigned int
+unsigned int
iso9660_dir_calc_record_size (unsigned int namelen, unsigned int su_len);
/*!
@@ -861,7 +861,7 @@ iso9660_dir_calc_record_size (unsigned int namelen, unsigned int su_len);
@return stat_t of entry if we found lsn, or NULL otherwise.
Caller must free return value.
*/
-#define iso9660_fs_find_lsn iso9660_find_fs_lsn
+#define iso9660_fs_find_lsn iso9660_find_fs_lsn
iso9660_stat_t *iso9660_fs_find_lsn(CdIo_t *p_cdio, lsn_t i_lsn);
@@ -889,7 +889,7 @@ iso9660_stat_t *iso9660_ifs_find_lsn(iso9660_t *p_iso, lsn_t i_lsn);
Given a directory pointer, find the filesystem entry that contains
lsn and return information about it.
- @param p_iso pointer to iso_t
+ @param p_iso pointer to iso_t
@param i_lsn LSN to find
@param ppsz_path full path of lsn filename. On entry *ppsz_path should be
NULL. On return it will be allocated an point to the full path of the
@@ -899,7 +899,7 @@ iso9660_stat_t *iso9660_ifs_find_lsn(iso9660_t *p_iso, lsn_t i_lsn);
@return stat_t of entry if we found lsn, or NULL otherwise.
Caller must free return value.
*/
-iso9660_stat_t *iso9660_ifs_find_lsn_with_path(iso9660_t *p_iso,
+iso9660_stat_t *iso9660_ifs_find_lsn_with_path(iso9660_t *p_iso,
lsn_t i_lsn,
/*out*/ char **ppsz_path);
@@ -923,20 +923,20 @@ iso9660_stat_t *iso9660_ifs_find_lsn_with_path(iso9660_t *p_iso,
Patches anyone?
*/
iso9660_stat_t *iso9660_fs_stat (CdIo_t *p_cdio, const char psz_path[]);
-
-/*!
+
+/*!
Return file status for path name psz_path. NULL is returned on error.
pathname version numbers in the ISO 9660 name are dropped, i.e. ;1
is removed and if level 1 ISO-9660 names are lowercased.
b_mode2 is historical. It is not used.
*/
-iso9660_stat_t *iso9660_fs_stat_translate (CdIo_t *p_cdio,
- const char psz_path[],
+iso9660_stat_t *iso9660_fs_stat_translate (CdIo_t *p_cdio,
+ const char psz_path[],
bool b_mode2);
-/*!
+/*!
Return file status for pathname. NULL is returned on error.
*/
iso9660_stat_t *iso9660_ifs_stat (iso9660_t *p_iso, const char psz_path[]);
@@ -946,7 +946,7 @@ iso9660_stat_t *iso9660_ifs_stat (iso9660_t *p_iso, const char psz_path[]);
error. pathname version numbers in the ISO 9660 name are dropped,
i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased.
*/
-iso9660_stat_t *iso9660_ifs_stat_translate (iso9660_t *p_iso,
+iso9660_stat_t *iso9660_ifs_stat_translate (iso9660_t *p_iso,
const char psz_path[]);
/*! Read psz_path (a directory) and return a list of iso9660_stat_t
@@ -955,7 +955,7 @@ iso9660_stat_t *iso9660_ifs_stat_translate (iso9660_t *p_iso,
b_mode2 is historical. It is not used.
*/
-CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[],
+CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[],
bool b_mode2);
/*! Read psz_path (a directory) and return a list of iso9660_stat_t
@@ -966,18 +966,18 @@ CdioList_t * iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]);
/*!
Return the PVD's application ID.
- NULL is returned if there is some problem in getting this.
+ NULL is returned if there is some problem in getting this.
*/
char * iso9660_get_application_id(iso9660_pvd_t *p_pvd);
-
-/*!
+
+/*!
Get the application ID. psz_app_id is set to NULL if there
is some problem in getting this and false is returned.
*/
bool iso9660_ifs_get_application_id(iso9660_t *p_iso,
/*out*/ cdio_utf8_t **p_psz_app_id);
-/*!
+/*!
Return the Joliet level recognized for p_iso.
*/
uint8_t iso9660_ifs_get_joliet_level(iso9660_t *p_iso);
@@ -992,13 +992,13 @@ lsn_t iso9660_get_dir_extent(const iso9660_dir_t *p_idr);
/*!
Return the directory name stored in the iso9660_dir_t
-
+
A string is allocated: the caller must deallocate. This routine
can return NULL if memory allocation fails.
*/
char * iso9660_dir_to_name (const iso9660_dir_t *p_iso9660_dir);
-
- /*!
+
+ /*!
Returns a POSIX mode for a given p_iso_dirent.
*/
mode_t iso9660_get_posix_filemode(const iso9660_stat_t *p_iso_dirent);
@@ -1008,107 +1008,123 @@ lsn_t iso9660_get_dir_extent(const iso9660_dir_t *p_idr);
blanks removed.
*/
char *iso9660_get_preparer_id(const iso9660_pvd_t *p_pvd);
-
- /*!
+
+ /*!
Get the preparer ID. psz_preparer_id is set to NULL if there
is some problem in getting this and false is returned.
*/
bool iso9660_ifs_get_preparer_id(iso9660_t *p_iso,
/*out*/ cdio_utf8_t **p_psz_preparer_id);
-
+
/*!
Return a string containing the PVD's publisher id with trailing
blanks removed.
*/
char *iso9660_get_publisher_id(const iso9660_pvd_t *p_pvd);
-
- /*!
+
+ /*!
Get the publisher ID. psz_publisher_id is set to NULL if there
is some problem in getting this and false is returned.
*/
bool iso9660_ifs_get_publisher_id(iso9660_t *p_iso,
/*out*/ cdio_utf8_t **p_psz_publisher_id);
-
+
uint8_t iso9660_get_pvd_type(const iso9660_pvd_t *p_pvd);
-
+
const char * iso9660_get_pvd_id(const iso9660_pvd_t *p_pvd);
-
+
int iso9660_get_pvd_space_size(const iso9660_pvd_t *p_pvd);
-
+
int iso9660_get_pvd_block_size(const iso9660_pvd_t *p_pvd) ;
-
+
/*! Return the primary volume id version number (of pvd).
- If there is an error 0 is returned.
+ If there is an error 0 is returned.
*/
int iso9660_get_pvd_version(const iso9660_pvd_t *pvd) ;
-
+
/*!
Return a string containing the PVD's system id with trailing
blanks removed.
*/
char *iso9660_get_system_id(const iso9660_pvd_t *p_pvd);
-
- /*!
+
+ /*!
+ Return "yup" if any file has Rock-Ridge extensions. Warning: this can
+ be time consuming. On an ISO 9600 image with lots of files but no Rock-Ridge
+ extensions, the entire directory structure will be scanned up to u_file_limit.
+
+ @param p_iso the ISO-9660 file image to get data from
+
+ @param u_file_limit the maximimum number of (non-rock-ridge) files
+ to consider before giving up and returning "dunno".
+
+ "dunno" can also be returned if there was some error encountered
+ such as not being able to allocate memory in processing.
+
+ */
+ bool_3way_t iso9660_have_rr(iso9660_t *p_iso, uint64_t u_file_limit);
+
+ /*!
Get the system ID. psz_system_id is set to NULL if there
is some problem in getting this and false is returned.
*/
bool iso9660_ifs_get_system_id(iso9660_t *p_iso,
/*out*/ cdio_utf8_t **p_psz_system_id);
-
-
+
+
/*! Return the LSN of the root directory for pvd.
- If there is an error CDIO_INVALID_LSN is returned.
+ If there is an error CDIO_INVALID_LSN is returned.
*/
lsn_t iso9660_get_root_lsn(const iso9660_pvd_t *p_pvd);
-
- /*!
+
+ /*!
Get the volume ID in the PVD. psz_volume_id is set to NULL if there
is some problem in getting this and false is returned.
*/
char *iso9660_get_volume_id(const iso9660_pvd_t *p_pvd);
-
- /*!
+
+ /*!
Get the volume ID in the PVD. psz_volume_id is set to NULL if there
is some problem in getting this and false is returned.
*/
bool iso9660_ifs_get_volume_id(iso9660_t *p_iso,
/*out*/ cdio_utf8_t **p_psz_volume_id);
-
+
/*!
Return the volumeset ID in the PVD.
- NULL is returned if there is some problem in getting this.
+ NULL is returned if there is some problem in getting this.
*/
char *iso9660_get_volumeset_id(const iso9660_pvd_t *p_pvd);
-
- /*!
+
+ /*!
Get the volumeset ID. psz_systemset_id is set to NULL if there
is some problem in getting this and false is returned.
*/
bool iso9660_ifs_get_volumeset_id(iso9660_t *p_iso,
/*out*/ cdio_utf8_t **p_psz_volumeset_id);
-
+
/* pathtable */
-
+
/*! Zero's out pathable. Do this first. */
void iso9660_pathtable_init (void *pt);
-
+
unsigned int iso9660_pathtable_get_size (const void *pt);
-
- uint16_t iso9660_pathtable_l_add_entry (void *pt, const char name[],
+
+ uint16_t iso9660_pathtable_l_add_entry (void *pt, const char name[],
uint32_t extent, uint16_t parent);
-
- uint16_t iso9660_pathtable_m_add_entry (void *pt, const char name[],
+
+ uint16_t iso9660_pathtable_m_add_entry (void *pt, const char name[],
uint32_t extent, uint16_t parent);
-
+
/**=====================================================================
Volume Descriptors
======================================================================*/
- void iso9660_set_pvd (void *pd, const char volume_id[],
- const char application_id[],
+ void iso9660_set_pvd (void *pd, const char volume_id[],
+ const char application_id[],
const char publisher_id[], const char preparer_id[],
- uint32_t iso_size, const void *root_dir,
- uint32_t path_table_l_extent,
+ uint32_t iso_size, const void *root_dir,
+ uint32_t path_table_l_extent,
uint32_t path_table_m_extent,
uint32_t path_table_size, const time_t *pvd_time);
@@ -1133,7 +1149,7 @@ lsn_t iso9660_get_dir_extent(const iso9660_dir_t *p_idr);
#undef ISODCL
#endif /* CDIO_ISO9660_H_ */
-/*
+/*
* Local variables:
* c-file-style: "gnu"
* tab-width: 8
diff --git a/src/libcdio/iso9660/iso9660_fs.c b/src/libcdio/iso9660/iso9660_fs.c
index e2ad9651..ede7492f 100644
--- a/src/libcdio/iso9660/iso9660_fs.c
+++ b/src/libcdio/iso9660/iso9660_fs.c
@@ -1519,3 +1519,102 @@ iso9660_ifs_is_xa (const iso9660_t * p_iso)
if (!p_iso) return false;
return yep == p_iso->b_xa;
}
+
+static bool_3way_t
+iso_have_rr_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root,
+ char **splitpath, uint64_t *pu_file_limit)
+{
+ unsigned offset = 0;
+ uint8_t *_dirbuf = NULL;
+ int ret;
+ bool_3way_t have_rr = nope;
+
+ if (!splitpath[0]) return false;
+
+ if (_root->type == _STAT_FILE) return nope;
+ if (*pu_file_limit == 0) return dunno;
+
+ cdio_assert (_root->type == _STAT_DIR);
+
+ _dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE);
+ if (!_dirbuf)
+ {
+ cdio_warn("Couldn't calloc(1, %d)", _root->secsize * ISO_BLOCKSIZE);
+ return dunno;
+ }
+
+ ret = iso9660_iso_seek_read (p_iso, _dirbuf, _root->lsn, _root->secsize);
+ if (ret!=ISO_BLOCKSIZE*_root->secsize) return false;
+
+ while (offset < (_root->secsize * ISO_BLOCKSIZE))
+ {
+ iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset];
+ iso9660_stat_t *p_stat;
+
+ if (!iso9660_get_dir_len(p_iso9660_dir))
+ {
+ offset++;
+ continue;
+ }
+
+ p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa,
+ p_iso->u_joliet_level);
+ have_rr = p_stat->rr.b3_rock;
+ if ( have_rr != yep) {
+ have_rr = iso_have_rr_traverse (p_iso, p_stat, &splitpath[1], pu_file_limit);
+ }
+ if (have_rr != nope) {
+ free (_dirbuf);
+ return have_rr;
+ }
+ free(p_stat);
+
+ offset += iso9660_get_dir_len(p_iso9660_dir);
+ *pu_file_limit = (*pu_file_limit)-1;
+ if ((*pu_file_limit) == 0) {
+ free (_dirbuf);
+ return dunno;
+ }
+ }
+
+ cdio_assert (offset == (_root->secsize * ISO_BLOCKSIZE));
+
+ /* not found */
+ free (_dirbuf);
+ return nope;
+}
+
+/*!
+ Return "yup" if any file has Rock-Ridge extensions. Warning: this can
+ be time consuming. On an ISO 9600 image with lots of files but no Rock-Ridge
+ extensions, the entire directory structure will be scanned up to u_file_limit.
+
+ @param p_iso the ISO-9660 file image to get data from
+
+ @param u_file_limit the maximimum number of (non-rock-ridge) files
+ to consider before giving up and returning "dunno".
+
+ "dunno" can also be returned if there was some error encountered
+ such as not being able to allocate memory in processing.
+
+*/
+extern bool_3way_t
+iso9660_have_rr(iso9660_t *p_iso, uint64_t u_file_limit)
+{
+ iso9660_stat_t *p_root;
+ char *p_psz_splitpath[2] = {strdup("/"), strdup("")};
+ bool_3way_t is_rr = nope;
+
+ if (!p_iso) return false;
+
+ p_root = _ifs_stat_root (p_iso);
+ if (!p_root) return dunno;
+
+ if (u_file_limit == 0) u_file_limit = UINT64_MAX;
+
+ is_rr = iso_have_rr_traverse (p_iso, p_root, p_psz_splitpath, &u_file_limit);
+ free(p_root);
+ // _cdio_strfreev (p_psz_splitpath);
+
+ return is_rr;
+}
diff --git a/src/localization.c b/src/localization.c
index 80b88f26..7e052b69 100644
--- a/src/localization.c
+++ b/src/localization.c
@@ -246,7 +246,7 @@ void add_dialog_command(int index, loc_cmd* lcmd)
{
char str[128];
uint32_t i;
- if ((lcmd == NULL) || (index < 0) || (index >= ARRAYSIZE(loc_dlg))) {
+ if ((lcmd == NULL) || (lcmd->txt[0] == NULL) || (index < 0) || (index >= ARRAYSIZE(loc_dlg))) {
uprintf("localization: invalid parameter for add_dialog_command\n");
return;
}
diff --git a/src/rufus.c b/src/rufus.c
index f63de964..c6083c73 100644
--- a/src/rufus.c
+++ b/src/rufus.c
@@ -2099,10 +2099,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
if ( (!get_supported_locales(loc_file))
|| ((selected_locale = ((locale_name == NULL)?get_locale_from_lcid(lcid, TRUE):get_locale_from_name(locale_name, TRUE))) == NULL) ) {
uprintf("FATAL: Could not access locale!\n");
- MessageBoxU(NULL, "The locale data is missing or invalid. This application will now exit."
- // TODO: remove this line for release!
- "\n\nTRANSLATORS: You need to add a 'v 1.0.0' line to your loc file. See the latest 'new_translation.loc'",
- "Fatal error", MB_ICONSTOP);
+ MessageBoxU(NULL, "The locale data is missing or invalid. This application will now exit.", "Fatal error", MB_ICONSTOP);
goto out;
}
diff --git a/src/rufus.rc b/src/rufus.rc
index ad2c2c4a..0cd5ff16 100644
--- a/src/rufus.rc
+++ b/src/rufus.rc
@@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
-CAPTION "Rufus v1.4.0.327"
+CAPTION "Rufus v1.4.0.328"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@@ -288,8 +288,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,4,0,327
- PRODUCTVERSION 1,4,0,327
+ FILEVERSION 1,4,0,328
+ PRODUCTVERSION 1,4,0,328
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -306,13 +306,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
- VALUE "FileVersion", "1.4.0.327"
+ VALUE "FileVersion", "1.4.0.328"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
- VALUE "ProductVersion", "1.4.0.327"
+ VALUE "ProductVersion", "1.4.0.328"
END
END
BLOCK "VarFileInfo"
diff --git a/src/smart.c b/src/smart.c
index 87e95f2f..01dcaa9c 100644
--- a/src/smart.c
+++ b/src/smart.c
@@ -36,7 +36,7 @@
#include "smart.h"
#include "hdd_vs_ufd.h"
-
+#if defined(RUFUS_TEST)
/* Helper functions */
static uint8_t GetAtaDirection(uint8_t AtaCmd, uint8_t Features) {
// Far from complete -- only the commands we *may* use.
@@ -352,6 +352,7 @@ BOOL Identify(HANDLE hPhysical)
_aligned_free(idd);
return TRUE;
}
+#endif
/* Generic SMART access. Kept for reference, as it doesn't work for USB to ATA/SATA bridges */
#if 0