[XMLLITE] Sync with Wine Staging 3.3. CORE-14434
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 25 Mar 2018 11:44:23 +0000 (12:44 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 25 Mar 2018 11:44:23 +0000 (12:44 +0100)
dll/win32/xmllite/CMakeLists.txt
dll/win32/xmllite/precomp.h [new file with mode: 0644]
dll/win32/xmllite/reader.c
dll/win32/xmllite/writer.c
dll/win32/xmllite/xmllite_main.c
dll/win32/xmllite/xmllite_private.h
media/doc/README.WINE

index 77fc0e3..b027396 100644 (file)
@@ -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 (file)
index 0000000..558da22
--- /dev/null
@@ -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_ */
index c29b835..9cb7f3b 100644 (file)
  * 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
     {
index c4570a5..88f75b6 100644 (file)
  * 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[] = {'?','>'};
index 63d4046..63838a9 100644 (file)
  * 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)
 {
index 41cd1bf..381dec4 100644 (file)
 #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)
 {
index 9d32801..62f294e 100644 (file)
@@ -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