Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
062aa59d
Commit
062aa59d
authored
Nov 10, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Reset writer state in WsSetOutput and WsSetOutputToBuffer.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1e3b84a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
21 deletions
+38
-21
writer.c
dlls/webservices/writer.c
+38
-21
No files found.
dlls/webservices/writer.c
View file @
062aa59d
...
...
@@ -138,6 +138,13 @@ static void write_insert_eof( struct writer *writer, struct node *eof )
writer
->
current
=
eof
;
}
static
void
write_insert_bof
(
struct
writer
*
writer
,
struct
node
*
bof
)
{
writer
->
root
->
parent
=
bof
;
list_add_tail
(
&
bof
->
children
,
&
writer
->
root
->
entry
);
writer
->
current
=
writer
->
root
=
bof
;
}
static
void
write_insert_node
(
struct
writer
*
writer
,
struct
node
*
node
)
{
node
->
parent
=
writer
->
current
;
...
...
@@ -310,6 +317,7 @@ HRESULT WINAPI WsSetOutput( WS_XML_WRITER *handle, const WS_XML_WRITER_ENCODING
ULONG
count
,
WS_ERROR
*
error
)
{
struct
writer
*
writer
=
(
struct
writer
*
)
handle
;
struct
node
*
node
;
HRESULT
hr
;
ULONG
i
;
...
...
@@ -324,37 +332,41 @@ HRESULT WINAPI WsSetOutput( WS_XML_WRITER *handle, const WS_XML_WRITER_ENCODING
if
(
hr
!=
S_OK
)
return
hr
;
}
if
((
hr
=
write_init_state
(
writer
))
!=
S_OK
)
return
hr
;
switch
(
encoding
->
encodingType
)
{
case
WS_XML_WRITER_ENCODING_TYPE_TEXT
:
case
WS_XML_WRITER_ENCODING_TYPE_TEXT
:
{
WS_XML_WRITER_TEXT_ENCODING
*
text
=
(
WS_XML_WRITER_TEXT_ENCODING
*
)
encoding
;
if
(
text
->
charSet
!=
WS_CHARSET_UTF8
)
{
WS_XML_WRITER_TEXT_ENCODING
*
text
=
(
WS_XML_WRITER_TEXT_ENCODING
*
)
encoding
;
if
(
text
->
charSet
!=
WS_CHARSET_UTF8
)
{
FIXME
(
"charset %u not supported
\n
"
,
text
->
charSet
);
return
E_NOTIMPL
;
}
break
;
}
default:
FIXME
(
"encoding type %u not supported
\n
"
,
encoding
->
encodingType
);
FIXME
(
"charset %u not supported
\n
"
,
text
->
charSet
);
return
E_NOTIMPL
;
}
break
;
}
default:
FIXME
(
"encoding type %u not supported
\n
"
,
encoding
->
encodingType
);
return
E_NOTIMPL
;
}
switch
(
output
->
outputType
)
{
case
WS_XML_WRITER_OUTPUT_TYPE_BUFFER
:
{
struct
xmlbuf
*
xmlbuf
;
case
WS_XML_WRITER_OUTPUT_TYPE_BUFFER
:
{
struct
xmlbuf
*
xmlbuf
;
if
(
!
(
xmlbuf
=
alloc_xmlbuf
(
writer
->
output_heap
)))
return
E_OUTOFMEMORY
;
set_output_buffer
(
writer
,
xmlbuf
);
break
;
}
default:
FIXME
(
"output type %u not supported
\n
"
,
output
->
outputType
);
return
E_NOTIMPL
;
if
(
!
(
xmlbuf
=
alloc_xmlbuf
(
writer
->
output_heap
)))
return
E_OUTOFMEMORY
;
set_output_buffer
(
writer
,
xmlbuf
);
break
;
}
default:
FIXME
(
"output type %u not supported
\n
"
,
output
->
outputType
);
return
E_NOTIMPL
;
}
if
(
!
(
node
=
alloc_node
(
WS_XML_NODE_TYPE_BOF
)))
return
E_OUTOFMEMORY
;
write_insert_bof
(
writer
,
node
);
return
S_OK
;
}
...
...
@@ -367,6 +379,7 @@ HRESULT WINAPI WsSetOutputToBuffer( WS_XML_WRITER *handle, WS_XML_BUFFER *buffer
{
struct
writer
*
writer
=
(
struct
writer
*
)
handle
;
struct
xmlbuf
*
xmlbuf
=
(
struct
xmlbuf
*
)
buffer
;
struct
node
*
node
;
HRESULT
hr
;
ULONG
i
;
...
...
@@ -381,7 +394,11 @@ HRESULT WINAPI WsSetOutputToBuffer( WS_XML_WRITER *handle, WS_XML_BUFFER *buffer
if
(
hr
!=
S_OK
)
return
hr
;
}
if
((
hr
=
write_init_state
(
writer
))
!=
S_OK
)
return
hr
;
set_output_buffer
(
writer
,
xmlbuf
);
if
(
!
(
node
=
alloc_node
(
WS_XML_NODE_TYPE_BOF
)))
return
E_OUTOFMEMORY
;
write_insert_bof
(
writer
,
node
);
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