[vlc-commits] commit: xml_ReaderUseDTD: remove useless parameter ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Thu Aug 5 18:08:37 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 5 19:08:17 2010 +0300| [99f02e92782d40eb07808b687b572faf5f6129f5] | committer: Rémi Denis-Courmont
xml_ReaderUseDTD: remove useless parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=99f02e92782d40eb07808b687b572faf5f6129f5
---
include/vlc_xml.h | 6 +++---
modules/gui/skins2/parser/xmlparser.cpp | 6 ++----
modules/misc/xml/libxml.c | 8 ++++----
modules/misc/xml/xtag.c | 6 +++---
4 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/include/vlc_xml.h b/include/vlc_xml.h
index d2ca2c6..4dac949 100644
--- a/include/vlc_xml.h
+++ b/include/vlc_xml.h
@@ -76,7 +76,7 @@ struct xml_reader_t
char * (*pf_value) ( xml_reader_t * );
int (*pf_next_attr) ( xml_reader_t * );
- int (*pf_use_dtd) ( xml_reader_t *, bool );
+ int (*pf_use_dtd) ( xml_reader_t * );
};
VLC_EXPORT( xml_reader_t *, xml_ReaderCreate, (vlc_object_t *, stream_t *) LIBVLC_USED );
@@ -109,9 +109,9 @@ static inline int xml_ReaderNextAttr( xml_reader_t *reader )
return reader->pf_next_attr( reader );
}
-static inline int xml_ReaderUseDTD( xml_reader_t *reader, bool use )
+static inline int xml_ReaderUseDTD( xml_reader_t *reader )
{
- return reader->pf_use_dtd( reader, use );
+ return reader->pf_use_dtd( reader );
}
enum {
diff --git a/modules/gui/skins2/parser/xmlparser.cpp b/modules/gui/skins2/parser/xmlparser.cpp
index a0bc72a..0d2be9a 100644
--- a/modules/gui/skins2/parser/xmlparser.cpp
+++ b/modules/gui/skins2/parser/xmlparser.cpp
@@ -42,10 +42,7 @@ XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName,
if( m_pXML )
LoadCatalog();
else
- {
msg_Err( getIntf(), "DTD not supported" );
- useDTD = false;
- }
}
else
m_pXML = NULL;
@@ -69,7 +66,8 @@ XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName,
return;
}
- xml_ReaderUseDTD( m_pReader, useDTD );
+ if( m_pXML )
+ xml_ReaderUseDTD( m_pReader );
}
diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c
index c2c74c7..d448cfc 100644
--- a/modules/misc/xml/libxml.c
+++ b/modules/misc/xml/libxml.c
@@ -66,7 +66,7 @@ static char *ReaderName( xml_reader_t * );
static char *ReaderValue( xml_reader_t * );
static int ReaderNextAttr( xml_reader_t * );
-static int ReaderUseDTD ( xml_reader_t *, bool );
+static int ReaderUseDTD ( xml_reader_t * );
static void CatalogLoad( xml_t *, const char * );
static void CatalogAdd( xml_t *, const char *, const char *, const char * );
@@ -187,13 +187,13 @@ static void ReaderClose( vlc_object_t *p_this )
xmlFreeTextReader( (void *)p_reader->p_sys );
}
-static int ReaderUseDTD ( xml_reader_t *p_reader, bool b_use )
+static int ReaderUseDTD ( xml_reader_t *p_reader )
{
/* Activate DTD validation */
xmlTextReaderSetParserProp( (void *)p_reader->p_sys,
- XML_PARSER_DEFAULTATTRS, b_use );
+ XML_PARSER_DEFAULTATTRS, true );
xmlTextReaderSetParserProp( (void *)p_reader->p_sys,
- XML_PARSER_VALIDATE, b_use );
+ XML_PARSER_VALIDATE, true );
return VLC_SUCCESS;
}
diff --git a/modules/misc/xml/xtag.c b/modules/misc/xml/xtag.c
index 487ce51..e2fdeec 100644
--- a/modules/misc/xml/xtag.c
+++ b/modules/misc/xml/xtag.c
@@ -106,7 +106,7 @@ static char *ReaderName( xml_reader_t * );
static char *ReaderValue( xml_reader_t * );
static int ReaderNextAttr( xml_reader_t * );
-static int ReaderUseDTD ( xml_reader_t *, bool );
+static int ReaderUseDTD ( xml_reader_t * );
static XTag *xtag_new_parse( const char *, int );
static char *xtag_get_name( XTag * );
@@ -190,9 +190,9 @@ static void ReaderClose( vlc_object_t *p_this )
free( p_reader->p_sys );
}
-static int ReaderUseDTD ( xml_reader_t *p_reader, bool b_use )
+static int ReaderUseDTD ( xml_reader_t *p_reader )
{
- VLC_UNUSED(p_reader); VLC_UNUSED(b_use);
+ VLC_UNUSED(p_reader);
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list