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
4a78b4da
Commit
4a78b4da
authored
Feb 22, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Use ARRAY_SIZE macro for reader too.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5ec6b8f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
reader.c
dlls/xmllite/reader.c
+4
-4
writer.c
dlls/xmllite/writer.c
+0
-2
xmllite_private.h
dlls/xmllite/xmllite_private.h
+2
-0
No files found.
dlls/xmllite/reader.c
View file @
4a78b4da
...
...
@@ -168,7 +168,7 @@ const WCHAR *get_encoding_name(xml_encoding encoding)
xml_encoding
get_encoding_from_codepage
(
UINT
codepage
)
{
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
xml_encoding_map
)
/
sizeof
(
xml_encoding_map
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
xml_encoding_map
);
i
++
)
{
if
(
xml_encoding_map
[
i
].
cp
==
codepage
)
return
xml_encoding_map
[
i
].
enc
;
}
...
...
@@ -749,7 +749,7 @@ xml_encoding parse_encoding_name(const WCHAR *name, int len)
if
(
!
name
)
return
XmlEncoding_Unknown
;
min
=
0
;
max
=
sizeof
(
xml_encoding_map
)
/
sizeof
(
xml_encoding_map
[
0
]
)
-
1
;
max
=
ARRAY_SIZE
(
xml_encoding_map
)
-
1
;
while
(
min
<=
max
)
{
...
...
@@ -3013,12 +3013,12 @@ static void reader_get_attribute_ns_uri(xmlreader *reader, struct attribute *att
strval_eq
(
reader
,
&
attr
->
prefix
,
&
strval_xmlns
))
{
*
uri
=
xmlns_uriW
;
*
len
=
sizeof
(
xmlns_uriW
)
/
sizeof
(
xmlns_uriW
[
0
]
)
-
1
;
*
len
=
ARRAY_SIZE
(
xmlns_uriW
)
-
1
;
}
else
if
(
strval_eq
(
reader
,
&
attr
->
prefix
,
&
strval_xml
))
{
*
uri
=
xml_uriW
;
*
len
=
sizeof
(
xml_uriW
)
/
sizeof
(
xml_uriW
[
0
]
)
-
1
;
*
len
=
ARRAY_SIZE
(
xml_uriW
)
-
1
;
}
else
{
...
...
dlls/xmllite/writer.c
View file @
4a78b4da
...
...
@@ -37,8 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(xmllite);
/* not defined in public headers */
DEFINE_GUID
(
IID_IXmlWriterOutput
,
0xc1131708
,
0x0f59
,
0x477f
,
0x93
,
0x59
,
0x7d
,
0x33
,
0x24
,
0x51
,
0xbc
,
0x1a
);
#define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
static
const
WCHAR
closeelementW
[]
=
{
'<'
,
'/'
};
static
const
WCHAR
closetagW
[]
=
{
' '
,
'/'
,
'>'
};
static
const
WCHAR
closepiW
[]
=
{
'?'
,
'>'
};
...
...
dlls/xmllite/xmllite_private.h
View file @
4a78b4da
...
...
@@ -23,6 +23,8 @@
#include "wine/heap.h"
#define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
static
inline
void
*
m_alloc
(
IMalloc
*
imalloc
,
size_t
len
)
{
if
(
imalloc
)
...
...
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