mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[XMLLITE] Sync with Wine Staging 1.7.55. CORE-10536
svn path=/trunk/; revision=69947
This commit is contained in:
parent
13484670a2
commit
b9cb1aabf1
|
@ -150,6 +150,16 @@ const WCHAR *get_encoding_name(xml_encoding encoding)
|
|||
return xml_encoding_map[encoding].name;
|
||||
}
|
||||
|
||||
xml_encoding get_encoding_from_codepage(UINT codepage)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < sizeof(xml_encoding_map)/sizeof(xml_encoding_map[0]); i++)
|
||||
{
|
||||
if (xml_encoding_map[i].cp == codepage) return xml_encoding_map[i].enc;
|
||||
}
|
||||
return XmlEncoding_Unknown;
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *data;
|
||||
|
@ -2835,7 +2845,7 @@ static HRESULT WINAPI xmlreader_GetDepth(IXmlReader* iface, UINT *depth)
|
|||
static BOOL WINAPI xmlreader_IsEOF(IXmlReader* iface)
|
||||
{
|
||||
FIXME("(%p): stub\n", iface);
|
||||
return E_NOTIMPL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static const struct IXmlReaderVtbl xmlreader_vtbl =
|
||||
|
|
|
@ -1075,19 +1075,12 @@ HRESULT WINAPI CreateXmlWriter(REFIID riid, void **obj, IMalloc *imalloc)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream,
|
||||
IMalloc *imalloc,
|
||||
LPCWSTR encoding,
|
||||
IXmlWriterOutput **output)
|
||||
static HRESULT create_writer(IUnknown *stream, IMalloc *imalloc, xml_encoding encoding,
|
||||
IXmlWriterOutput **output)
|
||||
{
|
||||
static const WCHAR utf8W[] = {'U','T','F','-','8',0};
|
||||
xmlwriteroutput *writeroutput;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%p %p %s %p\n", stream, imalloc, debugstr_w(encoding), output);
|
||||
|
||||
if (!stream || !output) return E_INVALIDARG;
|
||||
|
||||
*output = NULL;
|
||||
|
||||
if (imalloc)
|
||||
|
@ -1100,7 +1093,7 @@ HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream,
|
|||
writeroutput->ref = 1;
|
||||
writeroutput->imalloc = imalloc;
|
||||
if (imalloc) IMalloc_AddRef(imalloc);
|
||||
writeroutput->encoding = parse_encoding_name(encoding ? encoding : utf8W, -1);
|
||||
writeroutput->encoding = encoding;
|
||||
writeroutput->stream = NULL;
|
||||
hr = init_output_buffer(writeroutput);
|
||||
if (FAILED(hr)) {
|
||||
|
@ -1116,3 +1109,34 @@ HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream,
|
|||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream,
|
||||
IMalloc *imalloc,
|
||||
LPCWSTR encoding,
|
||||
IXmlWriterOutput **output)
|
||||
{
|
||||
static const WCHAR utf8W[] = {'U','T','F','-','8',0};
|
||||
xml_encoding xml_enc;
|
||||
|
||||
TRACE("%p %p %s %p\n", stream, imalloc, debugstr_w(encoding), output);
|
||||
|
||||
if (!stream || !output) return E_INVALIDARG;
|
||||
|
||||
xml_enc = parse_encoding_name(encoding ? encoding : utf8W, -1);
|
||||
return create_writer(stream, imalloc, xml_enc, output);
|
||||
}
|
||||
|
||||
HRESULT WINAPI CreateXmlWriterOutputWithEncodingCodePage(IUnknown *stream,
|
||||
IMalloc *imalloc,
|
||||
UINT codepage,
|
||||
IXmlWriterOutput **output)
|
||||
{
|
||||
xml_encoding xml_enc;
|
||||
|
||||
TRACE("%p %p %u %p\n", stream, imalloc, codepage, output);
|
||||
|
||||
if (!stream || !output) return E_INVALIDARG;
|
||||
|
||||
xml_enc = get_encoding_from_codepage(codepage);
|
||||
return create_writer(stream, imalloc, xml_enc, output);
|
||||
}
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
@ stub CreateXmlReaderInputWithEncodingCodePage
|
||||
@ stdcall CreateXmlReaderInputWithEncodingName(ptr ptr ptr long ptr ptr)
|
||||
@ stdcall CreateXmlWriter(ptr ptr ptr)
|
||||
@ stub CreateXmlWriterOutputWithEncodingCodePage
|
||||
@ stdcall CreateXmlWriterOutputWithEncodingCodePage(ptr ptr long ptr)
|
||||
@ stdcall CreateXmlWriterOutputWithEncodingName(ptr ptr wstr ptr)
|
||||
|
|
|
@ -89,5 +89,6 @@ typedef enum
|
|||
xml_encoding parse_encoding_name(const WCHAR*,int) DECLSPEC_HIDDEN;
|
||||
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;
|
||||
|
||||
#endif /* __XMLLITE_PRIVATE__ */
|
||||
|
|
|
@ -223,7 +223,7 @@ reactos/dll/win32/xinput1_1 # Synced to WineStaging-1.7.47
|
|||
reactos/dll/win32/xinput1_2 # Synced to WineStaging-1.7.47
|
||||
reactos/dll/win32/xinput1_3 # Synced to WineStaging-1.7.47
|
||||
reactos/dll/win32/xinput9_1_0 # Synced to WineStaging-1.7.47
|
||||
reactos/dll/win32/xmllite # Synced to WineStaging-1.7.47
|
||||
reactos/dll/win32/xmllite # Synced to WineStaging-1.7.55
|
||||
|
||||
reactos/dll/cpl/inetcpl # Synced to WineStaging-1.7.47
|
||||
|
||||
|
|
Loading…
Reference in a new issue