Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
dda048cf
Commit
dda048cf
authored
Aug 30, 2011
by
Christopher Mueller
Committed by
Rémi Denis-Courmont
Aug 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xml: added empty element detection
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
882e79a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
include/vlc_xml.h
include/vlc_xml.h
+9
-0
modules/misc/xml/libxml.c
modules/misc/xml/libxml.c
+7
-0
No files found.
include/vlc_xml.h
View file @
dda048cf
...
...
@@ -74,6 +74,7 @@ struct xml_reader_t
const
char
*
(
*
pf_next_attr
)
(
xml_reader_t
*
,
const
char
**
);
int
(
*
pf_use_dtd
)
(
xml_reader_t
*
);
int
(
*
pf_is_empty
)
(
xml_reader_t
*
);
};
VLC_API
xml_reader_t
*
xml_ReaderCreate
(
vlc_object_t
*
,
stream_t
*
)
VLC_USED
;
...
...
@@ -97,6 +98,14 @@ static inline int xml_ReaderUseDTD( xml_reader_t *reader )
return
reader
->
pf_use_dtd
(
reader
);
}
static
inline
int
xml_ReaderIsEmptyElement
(
xml_reader_t
*
reader
)
{
if
(
reader
->
pf_is_empty
==
NULL
)
return
-
2
;
return
reader
->
pf_is_empty
(
reader
);
}
enum
{
XML_READER_NONE
=
0
,
XML_READER_STARTELEM
,
...
...
modules/misc/xml/libxml.c
View file @
dda048cf
...
...
@@ -62,6 +62,7 @@ vlc_module_end ()
static
int
ReaderNextNode
(
xml_reader_t
*
,
const
char
**
);
static
const
char
*
ReaderNextAttr
(
xml_reader_t
*
,
const
char
**
);
static
int
ReaderIsEmptyElement
(
xml_reader_t
*
);
static
int
ReaderUseDTD
(
xml_reader_t
*
);
...
...
@@ -175,6 +176,7 @@ static int ReaderOpen( vlc_object_t *p_this )
p_reader
->
p_sys
=
p_sys
;
p_reader
->
pf_next_node
=
ReaderNextNode
;
p_reader
->
pf_next_attr
=
ReaderNextAttr
;
p_reader
->
pf_is_empty
=
ReaderIsEmptyElement
;
p_reader
->
pf_use_dtd
=
ReaderUseDTD
;
return
VLC_SUCCESS
;
...
...
@@ -287,3 +289,8 @@ static int StreamRead( void *p_context, char *p_buffer, int i_buffer )
stream_t
*
s
=
(
stream_t
*
)
p_context
;
return
stream_Read
(
s
,
p_buffer
,
i_buffer
);
}
static
int
ReaderIsEmptyElement
(
xml_reader_t
*
p_reader
)
{
return
xmlTextReaderIsEmptyElement
(
p_reader
->
p_sys
->
xml
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment