Author: akhaldi Date: Wed Jul 22 00:49:19 2015 New Revision: 68547
URL: http://svn.reactos.org/svn/reactos?rev=68547&view=rev Log: [XMLLITE] Sync with Wine Staging 1.7.47. CORE-9924
Modified: trunk/reactos/dll/win32/xmllite/reader.c trunk/reactos/dll/win32/xmllite/writer.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/xmllite/reader.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xmllite/reader.c?... ============================================================================== --- trunk/reactos/dll/win32/xmllite/reader.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xmllite/reader.c [iso-8859-1] Wed Jul 22 00:49:19 2015 @@ -890,8 +890,20 @@
static int reader_cmp(xmlreader *reader, const WCHAR *str) { + int i=0; const WCHAR *ptr = reader_get_ptr(reader); - return strncmpW(str, ptr, strlenW(str)); + while (str[i]) + { + if (!ptr[i]) + { + reader_more(reader); + ptr = reader_get_ptr(reader); + } + if (str[i] != ptr[i]) + return ptr[i] - str[i]; + i++; + } + return 0; }
/* moves cursor n WCHARs forward */
Modified: trunk/reactos/dll/win32/xmllite/writer.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xmllite/writer.c?... ============================================================================== --- trunk/reactos/dll/win32/xmllite/writer.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xmllite/writer.c [iso-8859-1] Wed Jul 22 00:49:19 2015 @@ -49,7 +49,8 @@ XmlWriterState_PIDocStarted, /* document was started with manually added 'xml' PI */ XmlWriterState_DocStarted, /* document was started with WriteStartDocument() */ XmlWriterState_ElemStarted, /* writing element */ - XmlWriterState_Content /* content is accepted at this point */ + XmlWriterState_Content, /* content is accepted at this point */ + XmlWriterState_DocClosed /* WriteEndDocument was called */ } XmlWriterState;
typedef struct @@ -598,6 +599,8 @@ case XmlWriterState_ElemStarted: writer_close_starttag(This); break; + case XmlWriterState_DocClosed: + return WR_E_INVALIDACTION; default: ; } @@ -621,10 +624,34 @@ static HRESULT WINAPI xmlwriter_WriteEndDocument(IXmlWriter *iface) { xmlwriter *This = impl_from_IXmlWriter(iface); - - FIXME("%p\n", This); - - return E_NOTIMPL; + HRESULT hr = S_OK; + + TRACE("%p\n", This); + + switch (This->state) + { + case XmlWriterState_Initial: + hr = E_UNEXPECTED; + break; + case XmlWriterState_Ready: + case XmlWriterState_DocClosed: + hr = WR_E_INVALIDACTION; + break; + default: + ; + } + + if (FAILED(hr)) { + This->state = XmlWriterState_DocClosed; + return hr; + } + + /* empty element stack */ + while (IXmlWriter_WriteEndElement(iface) == S_OK) + ; + + This->state = XmlWriterState_DocClosed; + return S_OK; }
static HRESULT WINAPI xmlwriter_WriteEndElement(IXmlWriter *iface) @@ -739,6 +766,7 @@ return WR_E_INVALIDACTION; break; case XmlWriterState_ElemStarted: + case XmlWriterState_DocClosed: return WR_E_INVALIDACTION; default: ; @@ -802,6 +830,7 @@ return S_OK; case XmlWriterState_DocStarted: case XmlWriterState_ElemStarted: + case XmlWriterState_DocClosed: return WR_E_INVALIDACTION; default: ; @@ -843,8 +872,15 @@
TRACE("(%p)->(%s %s %s)\n", This, wine_dbgstr_w(prefix), wine_dbgstr_w(local_name), wine_dbgstr_w(uri));
- if (This->state == XmlWriterState_Initial) + switch (This->state) + { + case XmlWriterState_Initial: return E_UNEXPECTED; + case XmlWriterState_DocClosed: + return WR_E_INVALIDACTION; + default: + ; + }
if (!local_name) return E_INVALIDARG;
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=6... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Wed Jul 22 00:49:19 2015 @@ -223,7 +223,7 @@ reactos/dll/win32/xinput1_2 # Synced to WineStaging-1.7.37 reactos/dll/win32/xinput1_3 # Synced to WineStaging-1.7.37 reactos/dll/win32/xinput9_1_0 # Synced to WineStaging-1.7.37 -reactos/dll/win32/xmllite # Synced to WineStaging-1.7.37 +reactos/dll/win32/xmllite # Synced to WineStaging-1.7.47
reactos/dll/cpl/inetcpl # Synced to WineStaging-1.7.47