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
e79b2b3f
Commit
e79b2b3f
authored
Jan 08, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Report value for PI nodes.
parent
57148ae9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
13 deletions
+29
-13
reader.c
dlls/xmllite/reader.c
+5
-1
reader.c
dlls/xmllite/tests/reader.c
+24
-12
No files found.
dlls/xmllite/reader.c
View file @
e79b2b3f
...
...
@@ -1031,7 +1031,7 @@ static HRESULT reader_parse_pitarget(xmlreader *reader, strval *target)
/* [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' */
static
HRESULT
reader_parse_pi
(
xmlreader
*
reader
)
{
const
WCHAR
*
ptr
,
*
start
;
WCHAR
*
ptr
,
*
start
;
strval
target
;
HRESULT
hr
;
...
...
@@ -1051,6 +1051,7 @@ static HRESULT reader_parse_pi(xmlreader *reader)
reader
->
nodetype
=
XmlNodeType_ProcessingInstruction
;
reader_set_strvalue
(
reader
,
StringValue_LocalName
,
&
target
);
reader_set_strvalue
(
reader
,
StringValue_QualifiedName
,
&
target
);
reader_set_strvalue
(
reader
,
StringValue_Value
,
&
strval_empty
);
return
S_OK
;
}
...
...
@@ -1066,12 +1067,15 @@ static HRESULT reader_parse_pi(xmlreader *reader)
{
if
(
ptr
[
1
]
==
'>'
)
{
strval
value
=
{
start
,
ptr
-
start
};
TRACE
(
"%s
\n
"
,
debugstr_wn
(
start
,
ptr
-
start
));
/* skip '?>' */
reader_skipn
(
reader
,
2
);
reader
->
nodetype
=
XmlNodeType_ProcessingInstruction
;
reader_set_strvalue
(
reader
,
StringValue_LocalName
,
&
target
);
reader_set_strvalue
(
reader
,
StringValue_QualifiedName
,
&
target
);
reader_set_strvalue
(
reader
,
StringValue_Value
,
&
value
);
return
S_OK
;
}
else
...
...
dlls/xmllite/tests/reader.c
View file @
e79b2b3f
...
...
@@ -799,6 +799,8 @@ static void test_read_comment(void)
static
struct
test_entry
pi_tests
[]
=
{
{
"<?pi?>"
,
"pi"
,
""
,
S_OK
},
{
"<?pi ?>"
,
"pi"
,
""
,
S_OK
},
{
"<?pi pi data?>"
,
"pi"
,
"pi data"
,
S_OK
},
{
"<?pi pi data ?>"
,
"pi"
,
"pi data "
,
S_OK
},
{
"<?pi:pi?>"
,
NULL
,
NULL
,
NC_E_NAMECOLON
,
WC_E_NAMECHARACTER
},
{
"<?:pi ?>"
,
NULL
,
NULL
,
WC_E_PI
,
WC_E_NAMECHARACTER
},
{
"<?-pi ?>"
,
NULL
,
NULL
,
WC_E_PI
,
WC_E_NAMECHARACTER
},
...
...
@@ -832,29 +834,39 @@ static void test_read_pi(void)
ok
(
hr
==
test
->
hr
,
"got %08x for %s
\n
"
,
hr
,
test
->
xml
);
if
(
hr
==
S_OK
)
{
const
WCHAR
*
name
;
WCHAR
*
name
_exp
;
const
WCHAR
*
str
;
WCHAR
*
str
_exp
;
UINT
len
;
ok
(
type
==
XmlNodeType_ProcessingInstruction
,
"got %d for %s
\n
"
,
type
,
test
->
xml
);
len
=
0
;
name
=
NULL
;
hr
=
IXmlReader_GetLocalName
(
reader
,
&
name
,
&
len
);
str
=
NULL
;
hr
=
IXmlReader_GetLocalName
(
reader
,
&
str
,
&
len
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
len
==
strlen
(
test
->
name
),
"got %u
\n
"
,
len
);
name
_exp
=
a2w
(
test
->
name
);
ok
(
!
lstrcmpW
(
name
,
name_exp
),
"got %s
\n
"
,
wine_dbgstr_w
(
name
));
free_str
(
name
_exp
);
str
_exp
=
a2w
(
test
->
name
);
ok
(
!
lstrcmpW
(
str
,
str_exp
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
free_str
(
str
_exp
);
len
=
0
;
name
=
NULL
;
hr
=
IXmlReader_GetQualifiedName
(
reader
,
&
name
,
&
len
);
str
=
NULL
;
hr
=
IXmlReader_GetQualifiedName
(
reader
,
&
str
,
&
len
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
len
==
strlen
(
test
->
name
),
"got %u
\n
"
,
len
);
name_exp
=
a2w
(
test
->
name
);
ok
(
!
lstrcmpW
(
name
,
name_exp
),
"got %s
\n
"
,
wine_dbgstr_w
(
name
));
free_str
(
name_exp
);
str_exp
=
a2w
(
test
->
name
);
ok
(
!
lstrcmpW
(
str
,
str_exp
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
free_str
(
str_exp
);
/* value */
len
=
!
strlen
(
test
->
value
);
str
=
NULL
;
hr
=
IXmlReader_GetValue
(
reader
,
&
str
,
&
len
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
len
==
strlen
(
test
->
value
),
"got %u
\n
"
,
len
);
str_exp
=
a2w
(
test
->
value
);
ok
(
!
lstrcmpW
(
str
,
str_exp
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
free_str
(
str_exp
);
}
IStream_Release
(
stream
);
...
...
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