mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 11:33:31 +08:00
[XMLLITE] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
b05ac020b4
commit
fba7694887
@ -29,10 +29,12 @@
|
||||
#include "objbase.h"
|
||||
#include "xmllite.h"
|
||||
#include "xmllite_private.h"
|
||||
#ifdef __REACTOS__
|
||||
#include <winnls.h>
|
||||
#endif
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(xmllite);
|
||||
|
||||
@ -95,7 +97,7 @@ static const WCHAR gtW[] = {'>',0};
|
||||
static const WCHAR commentW[] = {'<','!','-','-',0};
|
||||
static const WCHAR piW[] = {'<','?',0};
|
||||
|
||||
static BOOL is_namestartchar(WCHAR ch);
|
||||
BOOL is_namestartchar(WCHAR ch);
|
||||
|
||||
static const char *debugstr_nodetype(XmlNodeType nodetype)
|
||||
{
|
||||
@ -387,7 +389,7 @@ static inline WCHAR *readerinput_strdupW(xmlreaderinput *input, const WCHAR *str
|
||||
if(str) {
|
||||
DWORD size;
|
||||
|
||||
size = (strlenW(str)+1)*sizeof(WCHAR);
|
||||
size = (lstrlenW(str)+1)*sizeof(WCHAR);
|
||||
ret = readerinput_alloc(input, size);
|
||||
if (ret) memcpy(ret, str, size);
|
||||
}
|
||||
@ -756,9 +758,9 @@ xml_encoding parse_encoding_name(const WCHAR *name, int len)
|
||||
n = (min+max)/2;
|
||||
|
||||
if (len != -1)
|
||||
c = strncmpiW(xml_encoding_map[n].name, name, len);
|
||||
c = _wcsnicmp(xml_encoding_map[n].name, name, len);
|
||||
else
|
||||
c = strcmpiW(xml_encoding_map[n].name, name);
|
||||
c = wcsicmp(xml_encoding_map[n].name, name);
|
||||
if (!c)
|
||||
return xml_encoding_map[n].enc;
|
||||
|
||||
@ -1019,9 +1021,9 @@ static void readerinput_switchencoding(xmlreaderinput *readerinput, xml_encoding
|
||||
encoded_buffer *src = &readerinput->buffer->encoded;
|
||||
encoded_buffer *dest = &readerinput->buffer->utf16;
|
||||
int len, dest_len;
|
||||
UINT cp = ~0u;
|
||||
HRESULT hr;
|
||||
WCHAR *ptr;
|
||||
UINT cp;
|
||||
|
||||
hr = get_code_page(enc, &cp);
|
||||
if (FAILED(hr)) return;
|
||||
@ -1491,7 +1493,7 @@ static inline BOOL is_char(WCHAR ch)
|
||||
}
|
||||
|
||||
/* [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] */
|
||||
static inline BOOL is_pubchar(WCHAR ch)
|
||||
BOOL is_pubchar(WCHAR ch)
|
||||
{
|
||||
return (ch == ' ') ||
|
||||
(ch >= 'a' && ch <= 'z') ||
|
||||
@ -1504,7 +1506,7 @@ static inline BOOL is_pubchar(WCHAR ch)
|
||||
(ch == '_') || (ch == '\r') || (ch == '\n');
|
||||
}
|
||||
|
||||
static inline BOOL is_namestartchar(WCHAR ch)
|
||||
BOOL is_namestartchar(WCHAR ch)
|
||||
{
|
||||
return (ch == ':') || (ch >= 'A' && ch <= 'Z') ||
|
||||
(ch == '_') || (ch >= 'a' && ch <= 'z') ||
|
||||
@ -1524,7 +1526,7 @@ static inline BOOL is_namestartchar(WCHAR ch)
|
||||
}
|
||||
|
||||
/* [4 NS] NCName ::= Name - (Char* ':' Char*) */
|
||||
static inline BOOL is_ncnamechar(WCHAR ch)
|
||||
BOOL is_ncnamechar(WCHAR ch)
|
||||
{
|
||||
return (ch >= 'A' && ch <= 'Z') ||
|
||||
(ch == '_') || (ch >= 'a' && ch <= 'z') ||
|
||||
@ -1548,7 +1550,7 @@ static inline BOOL is_ncnamechar(WCHAR ch)
|
||||
(ch >= 0xfdf0 && ch <= 0xfffd);
|
||||
}
|
||||
|
||||
static inline BOOL is_namechar(WCHAR ch)
|
||||
BOOL is_namechar(WCHAR ch)
|
||||
{
|
||||
return (ch == ':') || is_ncnamechar(ch);
|
||||
}
|
||||
@ -1848,7 +1850,7 @@ static HRESULT reader_parse_externalid(xmlreader *reader)
|
||||
hr = reader_parse_pub_literal(reader, &pub);
|
||||
if (FAILED(hr)) return hr;
|
||||
|
||||
reader_init_cstrvalue(publicW, strlenW(publicW), &name);
|
||||
reader_init_cstrvalue(publicW, lstrlenW(publicW), &name);
|
||||
hr = reader_add_attr(reader, NULL, &name, NULL, &pub, &position, 0);
|
||||
if (FAILED(hr)) return hr;
|
||||
|
||||
@ -1859,7 +1861,7 @@ static HRESULT reader_parse_externalid(xmlreader *reader)
|
||||
hr = reader_parse_sys_literal(reader, &sys);
|
||||
if (FAILED(hr)) return S_OK;
|
||||
|
||||
reader_init_cstrvalue(systemW, strlenW(systemW), &name);
|
||||
reader_init_cstrvalue(systemW, lstrlenW(systemW), &name);
|
||||
hr = reader_add_attr(reader, NULL, &name, NULL, &sys, &position, 0);
|
||||
if (FAILED(hr)) return hr;
|
||||
|
||||
@ -1873,7 +1875,7 @@ static HRESULT reader_parse_externalid(xmlreader *reader)
|
||||
hr = reader_parse_sys_literal(reader, &sys);
|
||||
if (FAILED(hr)) return hr;
|
||||
|
||||
reader_init_cstrvalue(systemW, strlenW(systemW), &name);
|
||||
reader_init_cstrvalue(systemW, lstrlenW(systemW), &name);
|
||||
return reader_add_attr(reader, NULL, &name, NULL, &sys, &position, 0);
|
||||
}
|
||||
|
||||
@ -3081,8 +3083,8 @@ static HRESULT WINAPI xmlreader_MoveToAttributeByName(IXmlReader* iface,
|
||||
if (!namespace_uri)
|
||||
namespace_uri = emptyW;
|
||||
|
||||
target_name_len = strlenW(local_name);
|
||||
target_uri_len = strlenW(namespace_uri);
|
||||
target_name_len = lstrlenW(local_name);
|
||||
target_uri_len = lstrlenW(namespace_uri);
|
||||
|
||||
LIST_FOR_EACH_ENTRY(attr, &This->attrs, struct attribute, entry)
|
||||
{
|
||||
@ -3093,7 +3095,7 @@ static HRESULT WINAPI xmlreader_MoveToAttributeByName(IXmlReader* iface,
|
||||
reader_get_attribute_ns_uri(This, attr, &uri, &uri_len);
|
||||
|
||||
if (name_len == target_name_len && uri_len == target_uri_len &&
|
||||
!strcmpW(name, local_name) && !strcmpW(uri, namespace_uri))
|
||||
!wcscmp(name, local_name) && !wcscmp(uri, namespace_uri))
|
||||
{
|
||||
reader_set_current_attribute(This, attr);
|
||||
return S_OK;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -60,4 +60,9 @@ HRESULT get_code_page(xml_encoding,UINT*) DECLSPEC_HIDDEN;
|
||||
const WCHAR *get_encoding_name(xml_encoding) DECLSPEC_HIDDEN;
|
||||
xml_encoding get_encoding_from_codepage(UINT) DECLSPEC_HIDDEN;
|
||||
|
||||
BOOL is_ncnamechar(WCHAR ch) DECLSPEC_HIDDEN;
|
||||
BOOL is_pubchar(WCHAR ch) DECLSPEC_HIDDEN;
|
||||
BOOL is_namestartchar(WCHAR ch) DECLSPEC_HIDDEN;
|
||||
BOOL is_namechar(WCHAR ch) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif /* __XMLLITE_PRIVATE__ */
|
||||
|
@ -219,7 +219,7 @@ dll/win32/xinput1_1 # Synced to WineStaging-2.9
|
||||
dll/win32/xinput1_2 # Synced to WineStaging-2.9
|
||||
dll/win32/xinput1_3 # Synced to WineStaging-2.9
|
||||
dll/win32/xinput9_1_0 # Synced to WineStaging-2.9
|
||||
dll/win32/xmllite # Synced to WineStaging-3.3
|
||||
dll/win32/xmllite # Synced to WineStaging-4.18
|
||||
dll/win32/xolehlp # Synced to WineStaging-3.21
|
||||
|
||||
dll/cpl/inetcpl # Synced to WineStaging-3.17
|
||||
|
Loading…
Reference in New Issue
Block a user