Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b06dd7d8
Commit
b06dd7d8
authored
Jul 21, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/reader: Added a helper for setting current attribute cursor.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
be567910
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
reader.c
dlls/xmllite/reader.c
+12
-17
No files found.
dlls/xmllite/reader.c
View file @
b06dd7d8
...
@@ -2951,6 +2951,15 @@ static HRESULT WINAPI xmlreader_GetNodeType(IXmlReader* iface, XmlNodeType *node
...
@@ -2951,6 +2951,15 @@ static HRESULT WINAPI xmlreader_GetNodeType(IXmlReader* iface, XmlNodeType *node
return
This
->
state
==
XmlReadState_Closed
?
S_FALSE
:
S_OK
;
return
This
->
state
==
XmlReadState_Closed
?
S_FALSE
:
S_OK
;
}
}
static
void
reader_set_current_attribute
(
xmlreader
*
reader
,
struct
attribute
*
attr
)
{
reader
->
attr
=
attr
;
reader
->
chunk_read_off
=
0
;
reader_set_strvalue
(
reader
,
StringValue_Prefix
,
&
attr
->
prefix
);
reader_set_strvalue
(
reader
,
StringValue_QualifiedName
,
&
attr
->
qname
);
reader_set_strvalue
(
reader
,
StringValue_Value
,
&
attr
->
value
);
}
static
HRESULT
reader_move_to_first_attribute
(
xmlreader
*
reader
)
static
HRESULT
reader_move_to_first_attribute
(
xmlreader
*
reader
)
{
{
if
(
!
reader
->
attr_count
)
if
(
!
reader
->
attr_count
)
...
@@ -2959,11 +2968,7 @@ static HRESULT reader_move_to_first_attribute(xmlreader *reader)
...
@@ -2959,11 +2968,7 @@ static HRESULT reader_move_to_first_attribute(xmlreader *reader)
if
(
!
reader
->
attr
)
if
(
!
reader
->
attr
)
reader_inc_depth
(
reader
);
reader_inc_depth
(
reader
);
reader
->
attr
=
LIST_ENTRY
(
list_head
(
&
reader
->
attrs
),
struct
attribute
,
entry
);
reader_set_current_attribute
(
reader
,
LIST_ENTRY
(
list_head
(
&
reader
->
attrs
),
struct
attribute
,
entry
));
reader
->
chunk_read_off
=
0
;
reader_set_strvalue
(
reader
,
StringValue_Prefix
,
&
reader
->
attr
->
prefix
);
reader_set_strvalue
(
reader
,
StringValue_QualifiedName
,
&
reader
->
attr
->
qname
);
reader_set_strvalue
(
reader
,
StringValue_Value
,
&
reader
->
attr
->
value
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -2991,13 +2996,7 @@ static HRESULT WINAPI xmlreader_MoveToNextAttribute(IXmlReader* iface)
...
@@ -2991,13 +2996,7 @@ static HRESULT WINAPI xmlreader_MoveToNextAttribute(IXmlReader* iface)
next
=
list_next
(
&
This
->
attrs
,
&
This
->
attr
->
entry
);
next
=
list_next
(
&
This
->
attrs
,
&
This
->
attr
->
entry
);
if
(
next
)
if
(
next
)
{
reader_set_current_attribute
(
This
,
LIST_ENTRY
(
next
,
struct
attribute
,
entry
));
This
->
attr
=
LIST_ENTRY
(
next
,
struct
attribute
,
entry
);
This
->
chunk_read_off
=
0
;
reader_set_strvalue
(
This
,
StringValue_Prefix
,
&
This
->
attr
->
prefix
);
reader_set_strvalue
(
This
,
StringValue_QualifiedName
,
&
This
->
attr
->
qname
);
reader_set_strvalue
(
This
,
StringValue_Value
,
&
This
->
attr
->
value
);
}
return
next
?
S_OK
:
S_FALSE
;
return
next
?
S_OK
:
S_FALSE
;
}
}
...
@@ -3096,11 +3095,7 @@ static HRESULT WINAPI xmlreader_MoveToAttributeByName(IXmlReader* iface,
...
@@ -3096,11 +3095,7 @@ static HRESULT WINAPI xmlreader_MoveToAttributeByName(IXmlReader* iface,
if
(
name_len
==
target_name_len
&&
uri_len
==
target_uri_len
&&
if
(
name_len
==
target_name_len
&&
uri_len
==
target_uri_len
&&
!
strcmpW
(
name
,
local_name
)
&&
!
strcmpW
(
uri
,
namespace_uri
))
!
strcmpW
(
name
,
local_name
)
&&
!
strcmpW
(
uri
,
namespace_uri
))
{
{
This
->
attr
=
attr
;
reader_set_current_attribute
(
This
,
attr
);
This
->
chunk_read_off
=
0
;
reader_set_strvalue
(
This
,
StringValue_Prefix
,
&
This
->
attr
->
prefix
);
reader_set_strvalue
(
This
,
StringValue_QualifiedName
,
&
This
->
attr
->
qname
);
reader_set_strvalue
(
This
,
StringValue_Value
,
&
This
->
attr
->
value
);
return
S_OK
;
return
S_OK
;
}
}
}
}
...
...
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