Commit 99f02e92 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

xml_ReaderUseDTD: remove useless parameter

parent 9ecc0919
......@@ -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 {
......
......@@ -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 );
}
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment