iso9660.hpp, iso1.cpp get list iterators working.
rest: add _ to isachar and isadchar
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* -*- C++ -*-
|
||||
$Id: iso9660.hpp,v 1.4 2006/03/06 04:48:38 rocky Exp $
|
||||
$Id: iso9660.hpp,v 1.5 2006/03/06 19:39:35 rocky Exp $
|
||||
|
||||
Copyright (C) 2006 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -39,6 +39,24 @@ class ISO9660
|
||||
|
||||
public:
|
||||
|
||||
/*!
|
||||
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 name_translate(const char *psz_oldname,
|
||||
/*out*/ char *psz_newname)
|
||||
{
|
||||
return iso9660_name_translate(psz_oldname, psz_newname);
|
||||
}
|
||||
|
||||
|
||||
class Stat
|
||||
{
|
||||
public:
|
||||
@@ -377,19 +395,23 @@ public:
|
||||
pointers for the files inside that directory. The caller must free
|
||||
the returned result.
|
||||
*/
|
||||
list< ISO9660::Stat *> readdir (const char psz_path[])
|
||||
bool
|
||||
readdir (const char psz_path[], list< ISO9660::Stat *>& stat_list)
|
||||
{
|
||||
CdioList_t *p_stat_list = iso9660_ifs_readdir (p_iso9660, psz_path);
|
||||
CdioListNode_t *p_entnode;
|
||||
list< ISO9660::Stat *> stat_list;
|
||||
_CDIO_LIST_FOREACH (p_entnode, p_stat_list) {
|
||||
iso9660_stat_t *p_statbuf =
|
||||
(iso9660_stat_t *) _cdio_list_node_data (p_entnode);
|
||||
stat_list.push_back(new ISO9660::Stat(p_statbuf));
|
||||
}
|
||||
_cdio_list_free (p_stat_list, false);
|
||||
|
||||
return stat_list;
|
||||
if (p_stat_list) {
|
||||
CdioListNode_t *p_entnode;
|
||||
_CDIO_LIST_FOREACH (p_entnode, p_stat_list) {
|
||||
iso9660_stat_t *p_statbuf =
|
||||
(iso9660_stat_t *) _cdio_list_node_data (p_entnode);
|
||||
stat_list.push_back(new ISO9660::Stat(p_statbuf));
|
||||
}
|
||||
_cdio_list_free (p_stat_list, false);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660.h,v 1.85 2006/03/05 08:31:03 rocky Exp $
|
||||
$Id: iso9660.h,v 1.86 2006/03/06 19:39:35 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004, 2005, 2006 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -679,14 +679,14 @@ typedef struct _iso9660_s iso9660_t;
|
||||
ISO-9600 level 1 directory name. These are the ASCII capital
|
||||
letters A-Z, the digits 0-9 and an underscore.
|
||||
*/
|
||||
bool iso9660_isdchar (int c);
|
||||
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.
|
||||
*/
|
||||
bool iso9660_isachar (int c);
|
||||
bool iso9660_is_achar (int c);
|
||||
|
||||
/*!
|
||||
Convert an ISO-9660 file name which is in the format usually stored
|
||||
@@ -1012,6 +1012,12 @@ lsn_t iso9660_get_dir_extent(const iso9660_dir_t *p_idr);
|
||||
bool iso9660_ifs_is_xa (const iso9660_t * p_iso);
|
||||
|
||||
|
||||
#ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY
|
||||
/** For compatibility with good ol' paranoia */
|
||||
#define iso9660_isdchar iso9660_is_dchar
|
||||
#define iso9660_isachar iso9660_is_achar
|
||||
#endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Reference in New Issue
Block a user