mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[XMLLITE] Sync with Wine Staging 3.3. CORE-14434
This commit is contained in:
parent
150fba8dff
commit
65ac457a58
7 changed files with 67 additions and 48 deletions
|
@ -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)
|
||||
|
|
24
dll/win32/xmllite/precomp.h
Normal file
24
dll/win32/xmllite/precomp.h
Normal file
|
@ -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_ */
|
|
@ -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/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_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
|
||||
{
|
||||
|
|
|
@ -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[] = {'?','>'};
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue