Hans Leidekker : webservices: Implement WS_MOVE_TO_END_ELEMENT in the reader.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 10 11:11:11 CST 2016
Module: wine
Branch: master
Commit: 88e53782e8a48108618935f0b7539846fcd638a3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=88e53782e8a48108618935f0b7539846fcd638a3
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Feb 10 15:02:06 2016 +0100
webservices: Implement WS_MOVE_TO_END_ELEMENT in the reader.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/webservices/reader.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c
index 5b0217f..1979ad7 100644
--- a/dlls/webservices/reader.c
+++ b/dlls/webservices/reader.c
@@ -1405,6 +1405,25 @@ static BOOL move_to_child_element( struct reader *reader )
return FALSE;
}
+static BOOL move_to_end_element( struct reader *reader )
+{
+ struct list *ptr;
+ struct node *node = reader->current;
+
+ if (node->hdr.node.nodeType != WS_XML_NODE_TYPE_ELEMENT) return FALSE;
+
+ if ((ptr = list_tail( &node->children )))
+ {
+ struct node *tail = LIST_ENTRY( ptr, struct node, entry );
+ if (tail->hdr.node.nodeType == WS_XML_NODE_TYPE_END_ELEMENT)
+ {
+ reader->current = tail;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found )
{
struct list *ptr;
@@ -1434,6 +1453,10 @@ static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found
success = move_to_child_element( reader );
break;
+ case WS_MOVE_TO_END_ELEMENT:
+ success = move_to_end_element( reader );
+ break;
+
case WS_MOVE_TO_FIRST_NODE:
if ((ptr = list_head( &reader->current->parent->children )))
{
More information about the wine-cvs
mailing list