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
9a51526b
Commit
9a51526b
authored
Jun 21, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Insert a text node in WsWriteText.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d8c8b9a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
17 deletions
+27
-17
writer.c
dlls/webservices/writer.c
+27
-17
No files found.
dlls/webservices/writer.c
View file @
9a51526b
...
...
@@ -936,6 +936,20 @@ static inline void write_set_attribute_value( struct writer *writer, WS_XML_TEXT
elem
->
attributes
[
elem
->
attributeCount
-
1
]
->
value
=
text
;
}
static
HRESULT
write_add_text_node
(
struct
writer
*
writer
,
WS_XML_TEXT
*
value
)
{
struct
node
*
node
;
WS_XML_TEXT_NODE
*
text
;
if
(
!
(
node
=
alloc_node
(
WS_XML_NODE_TYPE_TEXT
)))
return
E_OUTOFMEMORY
;
text
=
(
WS_XML_TEXT_NODE
*
)
node
;
text
->
text
=
value
;
write_insert_node
(
writer
,
writer
->
current
,
node
);
writer
->
state
=
WRITER_STATE_TEXT
;
return
S_OK
;
}
/**************************************************************************
* WsWriteText [webservices.@]
*/
...
...
@@ -961,13 +975,23 @@ HRESULT WINAPI WsWriteText( WS_XML_WRITER *handle, const WS_XML_TEXT *text, WS_E
return
E_OUTOFMEMORY
;
write_set_attribute_value
(
writer
,
&
dst
->
text
);
return
S_OK
;
}
else
{
if
((
hr
=
write_flush
(
writer
))
!=
S_OK
)
return
hr
;
if
(
writer
->
state
!=
WRITER_STATE_STARTCDATA
)
{
if
(
!
(
dst
=
alloc_utf8_text
(
src
->
value
.
bytes
,
src
->
value
.
length
)))
return
E_OUTOFMEMORY
;
if
((
hr
=
write_add_text_node
(
writer
,
&
dst
->
text
))
!=
S_OK
)
{
heap_free
(
dst
);
return
hr
;
}
}
if
((
hr
=
write_grow_buffer
(
writer
,
src
->
value
.
length
))
!=
S_OK
)
return
hr
;
write_bytes
(
writer
,
src
->
value
.
bytes
,
src
->
value
.
length
);
}
return
S_OK
;
}
...
...
@@ -1053,20 +1077,6 @@ static WS_XML_UTF8_TEXT *format_uint64( const UINT64 *ptr )
return
alloc_utf8_text
(
(
const
unsigned
char
*
)
buf
,
len
);
}
static
HRESULT
write_add_text_node
(
struct
writer
*
writer
,
WS_XML_TEXT
*
value
)
{
struct
node
*
node
;
WS_XML_TEXT_NODE
*
text
;
if
(
!
(
node
=
alloc_node
(
WS_XML_NODE_TYPE_TEXT
)))
return
E_OUTOFMEMORY
;
text
=
(
WS_XML_TEXT_NODE
*
)
node
;
text
->
text
=
value
;
write_insert_node
(
writer
,
writer
->
current
,
node
);
writer
->
state
=
WRITER_STATE_TEXT
;
return
S_OK
;
}
static
HRESULT
write_text_node
(
struct
writer
*
writer
)
{
HRESULT
hr
;
...
...
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