https://git.reactos.org/?p=reactos.git;a=commitdiff;h=65ac457a5840a3cf2e604…
commit 65ac457a5840a3cf2e604a713a5771f2592ff156
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Mar 25 12:44:23 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Mar 25 12:44:23 2018 +0100
[XMLLITE] Sync with Wine Staging 3.3. CORE-14434
---
dll/win32/xmllite/CMakeLists.txt | 4 ++--
dll/win32/xmllite/precomp.h | 24 ++++++++++++++++++++++++
dll/win32/xmllite/reader.c | 24 +++++++++++++++++-------
dll/win32/xmllite/writer.c | 16 ++++++++++++----
dll/win32/xmllite/xmllite_main.c | 10 +++++++++-
dll/win32/xmllite/xmllite_private.h | 35 ++---------------------------------
media/doc/README.WINE | 2 +-
7 files changed, 67 insertions(+), 48 deletions(-)
diff --git a/dll/win32/xmllite/CMakeLists.txt b/dll/win32/xmllite/CMakeLists.txt
index 77fc0e371b..b027396d6c 100644
--- a/dll/win32/xmllite/CMakeLists.txt
+++ b/dll/win32/xmllite/CMakeLists.txt
@@ -7,7 +7,7 @@ list(APPEND SOURCE
reader.c
writer.c
xmllite_main.c
- xmllite_private.h
+ precomp.h
${CMAKE_CURRENT_BINARY_DIR}/xmllite_stubs.c)
add_library(xmllite SHARED
@@ -18,5 +18,5 @@ add_library(xmllite SHARED
set_module_type(xmllite win32dll)
target_link_libraries(xmllite uuid wine)
add_importlibs(xmllite msvcrt kernel32 ntdll)
-add_pch(xmllite xmllite_private.h SOURCE)
+add_pch(xmllite precomp.h SOURCE)
add_cd_file(TARGET xmllite DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/xmllite/precomp.h b/dll/win32/xmllite/precomp.h
new file mode 100644
index 0000000000..558da227e5
--- /dev/null
+++ b/dll/win32/xmllite/precomp.h
@@ -0,0 +1,24 @@
+
+#ifndef _XMLLITE_PRECOMP_H_
+#define _XMLLITE_PRECOMP_H_
+
+#include <wine/config.h>
+
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+
+#include <windef.h>
+#include <winbase.h>
+#include <objbase.h>
+#include <xmllite.h>
+
+#include <wine/debug.h>
+
+#include "xmllite_private.h"
+
+#endif /* !_XMLLITE_PRECOMP_H_ */
diff --git a/dll/win32/xmllite/reader.c b/dll/win32/xmllite/reader.c
index c29b835c84..9cb7f3bd77 100644
--- a/dll/win32/xmllite/reader.c
+++ b/dll/win32/xmllite/reader.c
@@ -18,13 +18,23 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "xmllite_private.h"
+#define COBJMACROS
#include <stdio.h>
+#include <stdarg.h>
#include <assert.h>
+#include "windef.h"
+#include "winbase.h"
+#include "initguid.h"
+#include "objbase.h"
+#include "xmllite.h"
+#include "xmllite_private.h"
+
+#include "wine/debug.h"
+#include "wine/list.h"
+#include "wine/unicode.h"
-#include <wine/list.h>
-#include <wine/unicode.h>
+WINE_DEFAULT_DEBUG_CHANNEL(xmllite);
/* not defined in public headers */
DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a,
0xa8, 0x71, 0xaf, 0xda);
@@ -158,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;
}
@@ -739,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)
{
@@ -3003,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
{
diff --git a/dll/win32/xmllite/writer.c b/dll/win32/xmllite/writer.c
index c4570a5801..88f75b6e20 100644
--- a/dll/win32/xmllite/writer.c
+++ b/dll/win32/xmllite/writer.c
@@ -18,17 +18,25 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+#include "xmllite.h"
#include "xmllite_private.h"
+#include "initguid.h"
-#include <wine/list.h>
-#include <wine/unicode.h>
+#include "wine/debug.h"
+#include "wine/list.h"
+#include "wine/unicode.h"
+
+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[] = {'?','>'};
diff --git a/dll/win32/xmllite/xmllite_main.c b/dll/win32/xmllite/xmllite_main.c
index 63d4046d0a..63838a99f7 100644
--- a/dll/win32/xmllite/xmllite_main.c
+++ b/dll/win32/xmllite/xmllite_main.c
@@ -18,7 +18,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "xmllite_private.h"
+#include "config.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(xmllite);
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
diff --git a/dll/win32/xmllite/xmllite_private.h b/dll/win32/xmllite/xmllite_private.h
index 41cd1bf477..381dec496c 100644
--- a/dll/win32/xmllite/xmllite_private.h
+++ b/dll/win32/xmllite/xmllite_private.h
@@ -21,40 +21,9 @@
#ifndef __XMLLITE_PRIVATE__
#define __XMLLITE_PRIVATE__
-#include <config.h>
+#include "wine/heap.h"
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
-#include <xmllite.h>
-
-#include <wine/debug.h>
-WINE_DEFAULT_DEBUG_CHANNEL(xmllite);
-
-/* memory allocation functions */
-
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
-{
- return HeapAlloc(GetProcessHeap(), 0, size);
-}
-
-static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t size)
-{
- return HeapReAlloc(GetProcessHeap(), 0, mem, size);
-}
-
-static inline BOOL heap_free(void *mem)
-{
- return HeapFree(GetProcessHeap(), 0, mem);
-}
+#define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
static inline void *m_alloc(IMalloc *imalloc, size_t len)
{
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 9d32801102..62f294ee1f 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -218,7 +218,7 @@ reactos/dll/win32/xinput1_1 # Synced to WineStaging-2.9
reactos/dll/win32/xinput1_2 # Synced to WineStaging-2.9
reactos/dll/win32/xinput1_3 # Synced to WineStaging-2.9
reactos/dll/win32/xinput9_1_0 # Synced to WineStaging-2.9
-reactos/dll/win32/xmllite # Synced to WineStaging-2.16
+reactos/dll/win32/xmllite # Synced to WineStaging-3.3
reactos/dll/cpl/inetcpl # Synced to WineStaging-2.9