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
616fd820
Commit
616fd820
authored
Jul 08, 2008
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Skip the first XML declaration in file generated by domdoc_save.
This is the last patch needed for Photoshop CS3 installer.
parent
82b2a833
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
domdoc.c
dlls/msxml3/domdoc.c
+18
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+0
-2
No files found.
dlls/msxml3/domdoc.c
View file @
616fd820
...
@@ -1690,7 +1690,7 @@ static HRESULT WINAPI domdoc_save(
...
@@ -1690,7 +1690,7 @@ static HRESULT WINAPI domdoc_save(
{
{
domdoc
*
This
=
impl_from_IXMLDOMDocument2
(
iface
);
domdoc
*
This
=
impl_from_IXMLDOMDocument2
(
iface
);
HANDLE
handle
;
HANDLE
handle
;
xmlChar
*
mem
;
xmlChar
*
mem
,
*
p
;
int
size
;
int
size
;
HRESULT
ret
=
S_OK
;
HRESULT
ret
=
S_OK
;
DWORD
written
;
DWORD
written
;
...
@@ -1738,7 +1738,23 @@ static HRESULT WINAPI domdoc_save(
...
@@ -1738,7 +1738,23 @@ static HRESULT WINAPI domdoc_save(
}
}
xmlDocDumpMemory
(
get_doc
(
This
),
&
mem
,
&
size
);
xmlDocDumpMemory
(
get_doc
(
This
),
&
mem
,
&
size
);
if
(
!
WriteFile
(
handle
,
mem
,
(
DWORD
)
size
,
&
written
,
NULL
)
||
written
!=
(
DWORD
)
size
)
/*
* libxml2 always adds XML declaration on top of the file and one for each processing instruction node in DOM tree.
* MSXML adds XML declaration only for processing instruction nodes.
* We skip the first XML declaration generated by libxml2 to get exactly what we need.
*/
p
=
mem
;
if
(
size
>
2
&&
p
[
0
]
==
'<'
&&
p
[
1
]
==
'?'
)
{
while
(
p
<
mem
+
size
&&
(
p
[
0
]
!=
'?'
||
p
[
1
]
!=
'>'
))
p
++
;
p
+=
2
;
while
(
p
<
mem
+
size
&&
isspace
(
*
p
))
p
++
;
size
-=
p
-
mem
;
}
if
(
!
WriteFile
(
handle
,
p
,
(
DWORD
)
size
,
&
written
,
NULL
)
||
written
!=
(
DWORD
)
size
)
{
{
WARN
(
"write error
\n
"
);
WARN
(
"write error
\n
"
);
ret
=
S_FALSE
;
ret
=
S_FALSE
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
616fd820
...
@@ -3304,9 +3304,7 @@ static void test_DocumentSaveToFile(void)
...
@@ -3304,9 +3304,7 @@ static void test_DocumentSaveToFile(void)
ReadFile
(
file
,
buffer
,
sizeof
(
buffer
),
&
read
,
NULL
);
ReadFile
(
file
,
buffer
,
sizeof
(
buffer
),
&
read
,
NULL
);
ok
(
read
!=
0
,
"could not read file
\n
"
);
ok
(
read
!=
0
,
"could not read file
\n
"
);
todo_wine
{
ok
(
buffer
[
0
]
!=
'<'
||
buffer
[
1
]
!=
'?'
,
"File contains processing instruction
\n
"
);
ok
(
buffer
[
0
]
!=
'<'
||
buffer
[
1
]
!=
'?'
,
"File contains processing instruction
\n
"
);
}
DeleteFile
(
"test.xml"
);
DeleteFile
(
"test.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