reactos/dll/win32/xmllite/xmllite_private.h

69 lines
2 KiB
C
Raw Normal View History

/*
* XMLLite private things
*
* Copyright 2012 Nikolay Sivov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __XMLLITE_PRIVATE__
#define __XMLLITE_PRIVATE__
#include "wine/heap.h"
static inline void *m_alloc(IMalloc *imalloc, size_t len)
{
if (imalloc)
return IMalloc_Alloc(imalloc, len);
else
return heap_alloc(len);
}
static inline void *m_realloc(IMalloc *imalloc, void *mem, size_t len)
{
if (imalloc)
return IMalloc_Realloc(imalloc, mem, len);
else
return heap_realloc(mem, len);
}
static inline void m_free(IMalloc *imalloc, void *mem)
{
if (imalloc)
IMalloc_Free(imalloc, mem);
else
heap_free(mem);
}
typedef enum
{
[XMLLITE] Sync with Wine Staging 2.9. CORE-13362 707ab55 xmllite/writer: Fix IID argument handling in CreateXmlWriter(). d1e1457 xmllite/reader: Fix IID argument handling in CreateXmlReader(). a68e51c xmllite/writer: Preserve original encoding name spelling in writer output. ef023c3 xmllite: Recognize us-ascii encoding. 9506e7d xmllite: Return local name stored in namespace for prefixed namespace attribute values. 1b9b791 xmllite: Allocate value in reader_add_attr. daf0504 xmllite: Allow reading from allocated strings in ReadValueChunk. f862222 xmllite: Store allocated copy of local name in attribute struct and use that instead of StringValue_LocalName. 004d615 xmllite: Don't use StringValue_LocalName for element nodes. 6917e2a xmllite: Clear all parser values in SetInput. 291ffdd xmllite: Don't fail in readerinput_detectencoding if input buffer has 3 bytes. 536ed3f xmllite: Return empty value for end element and none nodes. 48fff1b xmllite: Replace crln in input buffer with nl. 2b5203b xmllite: Fixed ReadValueChunk implementation. a3d7806 xmllite: Fixed buffer handling in reader_parse_reference. 68aeee4 xmllite: Return WC_E_SYNTAX if there is unexpected data in the end of the stream. 253f233 xmllite/reader: Return same string for local and qualified names for attributes when appropriate. d7057a3 xmllite/reader: For elements without a prefix return same string for both local and qualified names. 1e015f1 xmllite/reader: Always return local name from element structure. 876de4a xmllite/reader: Reset reader nesting depth on error. ec9e05c xmllite/reader: Enter error state on parsing error. b115e96 xmllite/reader: Improve returned position for whitespace text nodes. 9685fec xmllite/reader: Improve line number updating when switching to the next line. 79a6567 xmllite/reader: Fix position methods return values in closed reader state. 62a41d0 xmllite/reader: Return correct error for multiple colons in qualified name. 3b83a44 xmllite/reader: Explicitly return empty string as qualified name for some node types. 52f9193 xmllite/reader: Explicitly return empty static string as local name for nodes without names. 1ccc1f2 xmllite/reader: Return static empty string as xml declaration node value. 65e62c3 xmllite/reader: Fix reader position returned for xml declaration node. 6cf9524 xmllite/reader: Improve returned reader position for elements and attributes. e1c31e1 xmllite/reader: Remove redundant parameter. d3319f6 xmllite/reader: Return prefixes from namespace stack. b57589a xmllite/reader: Return qualified element names from the stack, instead of input buffer. 3ae1043 xmllite/reader: Return local element names from the stack, instead of input buffer. 3697bd9 xmllite/reader: Return empty string for namespace uri for some nodes. 63c489f xmllite/reader: Fix GetValue() for comments. 71a0733 xmllite/reader: Enforce maximum element depth limit. ce84b20 xmllite/reader: Return qualified names for attributes. 3fe5f25 xmllite/reader: Fix prefix returned after moving back to element. 70028b7 xmllite/reader: Return empty value for elements. 7c44c65 xmllite/reader: Return proper name for xml declaration PI. 8f0c235 xmllite/reader: Improve the way nesting level returned by GetDepth() is updated. 073c43a xmllite/reader: Implement IsEOF(). b188079 xmllite/reader: Reset node type to XmlNodeType_None on EOF. 0cbd938 xmllite/reader: Always return node type from Read(). 80cf883 xmllite/reader: Improve input stream encoding detection. 5b78cc9 xmllite/writer: Fix Release() trace. 9c988e7 xmllite/writer: Implement WriteString(). 107615d xmllite/reader: Fix writing back resolved character reference value. 05956e6 xmllite: Fix CreateXmlReaderInputWithEncodingName spec file entry. d369857c xmllite: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions. svn path=/trunk/; revision=74872
2017-06-04 01:49:43 +00:00
XmlEncoding_USASCII,
XmlEncoding_UTF16,
XmlEncoding_UTF8,
XmlEncoding_Unknown
} xml_encoding;
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;
BOOL is_ncnamechar(WCHAR ch) DECLSPEC_HIDDEN;
BOOL is_pubchar(WCHAR ch) DECLSPEC_HIDDEN;
BOOL is_namestartchar(WCHAR ch) DECLSPEC_HIDDEN;
BOOL is_namechar(WCHAR ch) DECLSPEC_HIDDEN;
#endif /* __XMLLITE_PRIVATE__ */