ReactOS  0.4.13-dev-79-gcd489d8
mxwriter.c File Reference
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
#include "msxml6.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "msxml_private.h"
Include dependency graph for mxwriter.c:

Go to the source code of this file.

Classes

struct  xml_encoding_data
 
struct  encoded_buffer
 
struct  output_buffer
 
struct  mxwriter
 
struct  mxattribute
 
struct  mxattributes
 

Macros

#define COBJMACROS
 

Enumerations

enum  xml_encoding {
  XmlEncoding_ISO_8859_1 = 0, XmlEncoding_ISO_8859_13, XmlEncoding_ISO_8859_15, XmlEncoding_ISO_8859_2,
  XmlEncoding_ISO_8859_3, XmlEncoding_ISO_8859_4, XmlEncoding_ISO_8859_5, XmlEncoding_ISO_8859_7,
  XmlEncoding_ISO_8859_9, XmlEncoding_UTF16, XmlEncoding_UTF8, XmlEncoding_Unknown,
  XmlEncoding_USASCII, XmlEncoding_UTF16, XmlEncoding_UTF8, XmlEncoding_Unknown
}
 
enum  mxwriter_prop {
  MXWriter_BOM = 0, MXWriter_DisableEscaping, MXWriter_Indent, MXWriter_OmitXmlDecl,
  MXWriter_Standalone, MXWriter_LastProp
}
 
enum  escape_mode { EscapeValue, EscapeText }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static mxattributesimpl_from_IMXAttributes (IMXAttributes *iface)
 
static mxattributesimpl_from_ISAXAttributes (ISAXAttributes *iface)
 
static mxattributesimpl_from_IVBSAXAttributes (IVBSAXAttributes *iface)
 
static HRESULT mxattributes_grow (mxattributes *This)
 
static xml_encoding parse_encoding_name (const WCHAR *encoding)
 
static HRESULT init_encoded_buffer (encoded_buffer *buffer)
 
static void free_encoded_buffer (encoded_buffer *buffer)
 
static HRESULT get_code_page (xml_encoding encoding, UINT *cp)
 
static HRESULT init_output_buffer (xml_encoding encoding, output_buffer *buffer)
 
static void free_output_buffer (output_buffer *buffer)
 
static HRESULT write_output_buffer (mxwriter *writer, const WCHAR *data, int len)
 
static HRESULT write_output_buffer_quoted (mxwriter *writer, const WCHAR *data, int len)
 
static void close_output_buffer (mxwriter *writer)
 
static WCHARget_escaped_string (const WCHAR *str, escape_mode mode, int *len)
 
static void write_prolog_buffer (mxwriter *writer)
 
static HRESULT write_data_to_stream (mxwriter *writer)
 
static void close_element_starttag (mxwriter *writer)
 
static void write_node_indent (mxwriter *writer)
 
static void writer_inc_indent (mxwriter *This)
 
static void writer_dec_indent (mxwriter *This)
 
static void set_element_name (mxwriter *This, const WCHAR *name, int len)
 
static HRESULT flush_output_buffer (mxwriter *This)
 
static void reset_output_buffer (mxwriter *This)
 
static HRESULT writer_set_property (mxwriter *writer, mxwriter_prop property, VARIANT_BOOL value)
 
static HRESULT writer_get_property (const mxwriter *writer, mxwriter_prop property, VARIANT_BOOL *value)
 
static mxwriterimpl_from_IMXWriter (IMXWriter *iface)
 
static mxwriterimpl_from_ISAXContentHandler (ISAXContentHandler *iface)
 
static mxwriterimpl_from_IVBSAXContentHandler (IVBSAXContentHandler *iface)
 
static mxwriterimpl_from_ISAXLexicalHandler (ISAXLexicalHandler *iface)
 
static mxwriterimpl_from_IVBSAXLexicalHandler (IVBSAXLexicalHandler *iface)
 
static mxwriterimpl_from_ISAXDeclHandler (ISAXDeclHandler *iface)
 
static mxwriterimpl_from_IVBSAXDeclHandler (IVBSAXDeclHandler *iface)
 
static mxwriterimpl_from_ISAXDTDHandler (ISAXDTDHandler *iface)
 
static mxwriterimpl_from_IVBSAXDTDHandler (IVBSAXDTDHandler *iface)
 
static mxwriterimpl_from_ISAXErrorHandler (ISAXErrorHandler *iface)
 
static mxwriterimpl_from_IVBSAXErrorHandler (IVBSAXErrorHandler *iface)
 
static HRESULT WINAPI mxwriter_QueryInterface (IMXWriter *iface, REFIID riid, void **obj)
 
static ULONG WINAPI mxwriter_AddRef (IMXWriter *iface)
 
static ULONG WINAPI mxwriter_Release (IMXWriter *iface)
 
static HRESULT WINAPI mxwriter_GetTypeInfoCount (IMXWriter *iface, UINT *pctinfo)
 
static HRESULT WINAPI mxwriter_GetTypeInfo (IMXWriter *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI mxwriter_GetIDsOfNames (IMXWriter *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI mxwriter_Invoke (IMXWriter *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI mxwriter_put_output (IMXWriter *iface, VARIANT dest)
 
static HRESULT WINAPI mxwriter_get_output (IMXWriter *iface, VARIANT *dest)
 
static HRESULT WINAPI mxwriter_put_encoding (IMXWriter *iface, BSTR encoding)
 
static HRESULT WINAPI mxwriter_get_encoding (IMXWriter *iface, BSTR *encoding)
 
static HRESULT WINAPI mxwriter_put_byteOrderMark (IMXWriter *iface, VARIANT_BOOL value)
 
static HRESULT WINAPI mxwriter_get_byteOrderMark (IMXWriter *iface, VARIANT_BOOL *value)
 
static HRESULT WINAPI mxwriter_put_indent (IMXWriter *iface, VARIANT_BOOL value)
 
static HRESULT WINAPI mxwriter_get_indent (IMXWriter *iface, VARIANT_BOOL *value)
 
static HRESULT WINAPI mxwriter_put_standalone (IMXWriter *iface, VARIANT_BOOL value)
 
static HRESULT WINAPI mxwriter_get_standalone (IMXWriter *iface, VARIANT_BOOL *value)
 
static HRESULT WINAPI mxwriter_put_omitXMLDeclaration (IMXWriter *iface, VARIANT_BOOL value)
 
static HRESULT WINAPI mxwriter_get_omitXMLDeclaration (IMXWriter *iface, VARIANT_BOOL *value)
 
static HRESULT WINAPI mxwriter_put_version (IMXWriter *iface, BSTR version)
 
static HRESULT WINAPI mxwriter_get_version (IMXWriter *iface, BSTR *version)
 
static HRESULT WINAPI mxwriter_put_disableOutputEscaping (IMXWriter *iface, VARIANT_BOOL value)
 
static HRESULT WINAPI mxwriter_get_disableOutputEscaping (IMXWriter *iface, VARIANT_BOOL *value)
 
static HRESULT WINAPI mxwriter_flush (IMXWriter *iface)
 
static HRESULT WINAPI SAXContentHandler_QueryInterface (ISAXContentHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI SAXContentHandler_AddRef (ISAXContentHandler *iface)
 
static ULONG WINAPI SAXContentHandler_Release (ISAXContentHandler *iface)
 
static HRESULT WINAPI SAXContentHandler_putDocumentLocator (ISAXContentHandler *iface, ISAXLocator *locator)
 
static HRESULT WINAPI SAXContentHandler_startDocument (ISAXContentHandler *iface)
 
static HRESULT WINAPI SAXContentHandler_endDocument (ISAXContentHandler *iface)
 
static HRESULT WINAPI SAXContentHandler_startPrefixMapping (ISAXContentHandler *iface, const WCHAR *prefix, int nprefix, const WCHAR *uri, int nuri)
 
static HRESULT WINAPI SAXContentHandler_endPrefixMapping (ISAXContentHandler *iface, const WCHAR *prefix, int nprefix)
 
static void mxwriter_write_attribute (mxwriter *writer, const WCHAR *qname, int qname_len, const WCHAR *value, int value_len, BOOL escape)
 
static void mxwriter_write_starttag (mxwriter *writer, const WCHAR *qname, int len)
 
static HRESULT WINAPI SAXContentHandler_startElement (ISAXContentHandler *iface, const WCHAR *namespaceUri, int nnamespaceUri, const WCHAR *local_name, int nlocal_name, const WCHAR *QName, int nQName, ISAXAttributes *attr)
 
static HRESULT WINAPI SAXContentHandler_endElement (ISAXContentHandler *iface, const WCHAR *namespaceUri, int nnamespaceUri, const WCHAR *local_name, int nlocal_name, const WCHAR *QName, int nQName)
 
static HRESULT WINAPI SAXContentHandler_characters (ISAXContentHandler *iface, const WCHAR *chars, int nchars)
 
static HRESULT WINAPI SAXContentHandler_ignorableWhitespace (ISAXContentHandler *iface, const WCHAR *chars, int nchars)
 
static HRESULT WINAPI SAXContentHandler_processingInstruction (ISAXContentHandler *iface, const WCHAR *target, int ntarget, const WCHAR *data, int ndata)
 
static HRESULT WINAPI SAXContentHandler_skippedEntity (ISAXContentHandler *iface, const WCHAR *name, int nname)
 
static HRESULT WINAPI SAXLexicalHandler_QueryInterface (ISAXLexicalHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI SAXLexicalHandler_AddRef (ISAXLexicalHandler *iface)
 
static ULONG WINAPI SAXLexicalHandler_Release (ISAXLexicalHandler *iface)
 
static HRESULT WINAPI SAXLexicalHandler_startDTD (ISAXLexicalHandler *iface, const WCHAR *name, int name_len, const WCHAR *publicId, int publicId_len, const WCHAR *systemId, int systemId_len)
 
static HRESULT WINAPI SAXLexicalHandler_endDTD (ISAXLexicalHandler *iface)
 
static HRESULT WINAPI SAXLexicalHandler_startEntity (ISAXLexicalHandler *iface, const WCHAR *name, int len)
 
static HRESULT WINAPI SAXLexicalHandler_endEntity (ISAXLexicalHandler *iface, const WCHAR *name, int len)
 
static HRESULT WINAPI SAXLexicalHandler_startCDATA (ISAXLexicalHandler *iface)
 
static HRESULT WINAPI SAXLexicalHandler_endCDATA (ISAXLexicalHandler *iface)
 
static HRESULT WINAPI SAXLexicalHandler_comment (ISAXLexicalHandler *iface, const WCHAR *chars, int nchars)
 
static HRESULT WINAPI SAXDeclHandler_QueryInterface (ISAXDeclHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI SAXDeclHandler_AddRef (ISAXDeclHandler *iface)
 
static ULONG WINAPI SAXDeclHandler_Release (ISAXDeclHandler *iface)
 
static HRESULT WINAPI SAXDeclHandler_elementDecl (ISAXDeclHandler *iface, const WCHAR *name, int n_name, const WCHAR *model, int n_model)
 
static HRESULT WINAPI SAXDeclHandler_attributeDecl (ISAXDeclHandler *iface, const WCHAR *element, int n_element, const WCHAR *attr, int n_attr, const WCHAR *type, int n_type, const WCHAR *Default, int n_default, const WCHAR *value, int n_value)
 
static HRESULT WINAPI SAXDeclHandler_internalEntityDecl (ISAXDeclHandler *iface, const WCHAR *name, int n_name, const WCHAR *value, int n_value)
 
static HRESULT WINAPI SAXDeclHandler_externalEntityDecl (ISAXDeclHandler *iface, const WCHAR *name, int n_name, const WCHAR *publicId, int n_publicId, const WCHAR *systemId, int n_systemId)
 
static HRESULT WINAPI VBSAXDeclHandler_QueryInterface (IVBSAXDeclHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI VBSAXDeclHandler_AddRef (IVBSAXDeclHandler *iface)
 
static ULONG WINAPI VBSAXDeclHandler_Release (IVBSAXDeclHandler *iface)
 
static HRESULT WINAPI VBSAXDeclHandler_GetTypeInfoCount (IVBSAXDeclHandler *iface, UINT *pctinfo)
 
static HRESULT WINAPI VBSAXDeclHandler_GetTypeInfo (IVBSAXDeclHandler *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI VBSAXDeclHandler_GetIDsOfNames (IVBSAXDeclHandler *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI VBSAXDeclHandler_Invoke (IVBSAXDeclHandler *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI VBSAXDeclHandler_elementDecl (IVBSAXDeclHandler *iface, BSTR *name, BSTR *model)
 
static HRESULT WINAPI VBSAXDeclHandler_attributeDecl (IVBSAXDeclHandler *iface, BSTR *element, BSTR *attr, BSTR *type, BSTR *default_value, BSTR *value)
 
static HRESULT WINAPI VBSAXDeclHandler_internalEntityDecl (IVBSAXDeclHandler *iface, BSTR *name, BSTR *value)
 
static HRESULT WINAPI VBSAXDeclHandler_externalEntityDecl (IVBSAXDeclHandler *iface, BSTR *name, BSTR *publicid, BSTR *systemid)
 
static HRESULT WINAPI VBSAXLexicalHandler_QueryInterface (IVBSAXLexicalHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI VBSAXLexicalHandler_AddRef (IVBSAXLexicalHandler *iface)
 
static ULONG WINAPI VBSAXLexicalHandler_Release (IVBSAXLexicalHandler *iface)
 
static HRESULT WINAPI VBSAXLexicalHandler_GetTypeInfoCount (IVBSAXLexicalHandler *iface, UINT *pctinfo)
 
static HRESULT WINAPI VBSAXLexicalHandler_GetTypeInfo (IVBSAXLexicalHandler *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI VBSAXLexicalHandler_GetIDsOfNames (IVBSAXLexicalHandler *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI VBSAXLexicalHandler_Invoke (IVBSAXLexicalHandler *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI VBSAXLexicalHandler_startDTD (IVBSAXLexicalHandler *iface, BSTR *name, BSTR *publicId, BSTR *systemId)
 
static HRESULT WINAPI VBSAXLexicalHandler_endDTD (IVBSAXLexicalHandler *iface)
 
static HRESULT WINAPI VBSAXLexicalHandler_startEntity (IVBSAXLexicalHandler *iface, BSTR *name)
 
static HRESULT WINAPI VBSAXLexicalHandler_endEntity (IVBSAXLexicalHandler *iface, BSTR *name)
 
static HRESULT WINAPI VBSAXLexicalHandler_startCDATA (IVBSAXLexicalHandler *iface)
 
static HRESULT WINAPI VBSAXLexicalHandler_endCDATA (IVBSAXLexicalHandler *iface)
 
static HRESULT WINAPI VBSAXLexicalHandler_comment (IVBSAXLexicalHandler *iface, BSTR *chars)
 
static HRESULT WINAPI VBSAXContentHandler_QueryInterface (IVBSAXContentHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI VBSAXContentHandler_AddRef (IVBSAXContentHandler *iface)
 
static ULONG WINAPI VBSAXContentHandler_Release (IVBSAXContentHandler *iface)
 
static HRESULT WINAPI VBSAXContentHandler_GetTypeInfoCount (IVBSAXContentHandler *iface, UINT *pctinfo)
 
static HRESULT WINAPI VBSAXContentHandler_GetTypeInfo (IVBSAXContentHandler *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI VBSAXContentHandler_GetIDsOfNames (IVBSAXContentHandler *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI VBSAXContentHandler_Invoke (IVBSAXContentHandler *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI VBSAXContentHandler_putref_documentLocator (IVBSAXContentHandler *iface, IVBSAXLocator *locator)
 
static HRESULT WINAPI VBSAXContentHandler_startDocument (IVBSAXContentHandler *iface)
 
static HRESULT WINAPI VBSAXContentHandler_endDocument (IVBSAXContentHandler *iface)
 
static HRESULT WINAPI VBSAXContentHandler_startPrefixMapping (IVBSAXContentHandler *iface, BSTR *prefix, BSTR *uri)
 
static HRESULT WINAPI VBSAXContentHandler_endPrefixMapping (IVBSAXContentHandler *iface, BSTR *prefix)
 
static HRESULT WINAPI VBSAXContentHandler_startElement (IVBSAXContentHandler *iface, BSTR *namespaceURI, BSTR *localName, BSTR *QName, IVBSAXAttributes *attrs)
 
static HRESULT WINAPI VBSAXContentHandler_endElement (IVBSAXContentHandler *iface, BSTR *namespaceURI, BSTR *localName, BSTR *QName)
 
static HRESULT WINAPI VBSAXContentHandler_characters (IVBSAXContentHandler *iface, BSTR *chars)
 
static HRESULT WINAPI VBSAXContentHandler_ignorableWhitespace (IVBSAXContentHandler *iface, BSTR *chars)
 
static HRESULT WINAPI VBSAXContentHandler_processingInstruction (IVBSAXContentHandler *iface, BSTR *target, BSTR *data)
 
static HRESULT WINAPI VBSAXContentHandler_skippedEntity (IVBSAXContentHandler *iface, BSTR *name)
 
static HRESULT WINAPI SAXDTDHandler_QueryInterface (ISAXDTDHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI SAXDTDHandler_AddRef (ISAXDTDHandler *iface)
 
static ULONG WINAPI SAXDTDHandler_Release (ISAXDTDHandler *iface)
 
static HRESULT WINAPI SAXDTDHandler_notationDecl (ISAXDTDHandler *iface, const WCHAR *name, INT n_name, const WCHAR *publicid, INT n_publicid, const WCHAR *systemid, INT n_systemid)
 
static HRESULT WINAPI SAXDTDHandler_unparsedEntityDecl (ISAXDTDHandler *iface, const WCHAR *name, INT nname, const WCHAR *publicid, INT npublicid, const WCHAR *systemid, INT nsystemid, const WCHAR *notation, INT nnotation)
 
static HRESULT WINAPI VBSAXDTDHandler_QueryInterface (IVBSAXDTDHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI VBSAXDTDHandler_AddRef (IVBSAXDTDHandler *iface)
 
static ULONG WINAPI VBSAXDTDHandler_Release (IVBSAXDTDHandler *iface)
 
static HRESULT WINAPI VBSAXDTDHandler_GetTypeInfoCount (IVBSAXDTDHandler *iface, UINT *pctinfo)
 
static HRESULT WINAPI VBSAXDTDHandler_GetTypeInfo (IVBSAXDTDHandler *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI VBSAXDTDHandler_GetIDsOfNames (IVBSAXDTDHandler *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI VBSAXDTDHandler_Invoke (IVBSAXDTDHandler *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI VBSAXDTDHandler_notationDecl (IVBSAXDTDHandler *iface, BSTR *name, BSTR *publicId, BSTR *systemId)
 
static HRESULT WINAPI VBSAXDTDHandler_unparsedEntityDecl (IVBSAXDTDHandler *iface, BSTR *name, BSTR *publicId, BSTR *systemId, BSTR *notation)
 
static HRESULT WINAPI SAXErrorHandler_QueryInterface (ISAXErrorHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI SAXErrorHandler_AddRef (ISAXErrorHandler *iface)
 
static ULONG WINAPI SAXErrorHandler_Release (ISAXErrorHandler *iface)
 
static HRESULT WINAPI SAXErrorHandler_error (ISAXErrorHandler *iface, ISAXLocator *locator, const WCHAR *message, HRESULT hr)
 
static HRESULT WINAPI SAXErrorHandler_fatalError (ISAXErrorHandler *iface, ISAXLocator *locator, const WCHAR *message, HRESULT hr)
 
static HRESULT WINAPI SAXErrorHandler_ignorableWarning (ISAXErrorHandler *iface, ISAXLocator *locator, const WCHAR *message, HRESULT hr)
 
static HRESULT WINAPI VBSAXErrorHandler_QueryInterface (IVBSAXErrorHandler *iface, REFIID riid, void **obj)
 
static ULONG WINAPI VBSAXErrorHandler_AddRef (IVBSAXErrorHandler *iface)
 
static ULONG WINAPI VBSAXErrorHandler_Release (IVBSAXErrorHandler *iface)
 
static HRESULT WINAPI VBSAXErrorHandler_GetTypeInfoCount (IVBSAXErrorHandler *iface, UINT *pctinfo)
 
static HRESULT WINAPI VBSAXErrorHandler_GetTypeInfo (IVBSAXErrorHandler *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI VBSAXErrorHandler_GetIDsOfNames (IVBSAXErrorHandler *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI VBSAXErrorHandler_Invoke (IVBSAXErrorHandler *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI VBSAXErrorHandler_error (IVBSAXErrorHandler *iface, IVBSAXLocator *locator, BSTR *message, LONG code)
 
static HRESULT WINAPI VBSAXErrorHandler_fatalError (IVBSAXErrorHandler *iface, IVBSAXLocator *locator, BSTR *message, LONG code)
 
static HRESULT WINAPI VBSAXErrorHandler_ignorableWarning (IVBSAXErrorHandler *iface, IVBSAXLocator *locator, BSTR *message, LONG code)
 
HRESULT MXWriter_create (MSXML_VERSION version, void **ppObj)
 
static HRESULT WINAPI MXAttributes_QueryInterface (IMXAttributes *iface, REFIID riid, void **ppObj)
 
static ULONG WINAPI MXAttributes_AddRef (IMXAttributes *iface)
 
static ULONG WINAPI MXAttributes_Release (IMXAttributes *iface)
 
static HRESULT WINAPI MXAttributes_GetTypeInfoCount (IMXAttributes *iface, UINT *pctinfo)
 
static HRESULT WINAPI MXAttributes_GetTypeInfo (IMXAttributes *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI MXAttributes_GetIDsOfNames (IMXAttributes *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI MXAttributes_Invoke (IMXAttributes *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI MXAttributes_addAttribute (IMXAttributes *iface, BSTR uri, BSTR localName, BSTR QName, BSTR type, BSTR value)
 
static HRESULT WINAPI MXAttributes_addAttributeFromIndex (IMXAttributes *iface, VARIANT atts, int index)
 
static HRESULT WINAPI MXAttributes_clear (IMXAttributes *iface)
 
static mxattributeget_attribute_byindex (mxattributes *attrs, int index)
 
static HRESULT WINAPI MXAttributes_removeAttribute (IMXAttributes *iface, int index)
 
static HRESULT WINAPI MXAttributes_setAttribute (IMXAttributes *iface, int index, BSTR uri, BSTR localName, BSTR QName, BSTR type, BSTR value)
 
static HRESULT WINAPI MXAttributes_setAttributes (IMXAttributes *iface, VARIANT atts)
 
static HRESULT WINAPI MXAttributes_setLocalName (IMXAttributes *iface, int index, BSTR localName)
 
static HRESULT WINAPI MXAttributes_setQName (IMXAttributes *iface, int index, BSTR QName)
 
static HRESULT WINAPI MXAttributes_setURI (IMXAttributes *iface, int index, BSTR uri)
 
static HRESULT WINAPI MXAttributes_setValue (IMXAttributes *iface, int index, BSTR value)
 
static HRESULT WINAPI SAXAttributes_QueryInterface (ISAXAttributes *iface, REFIID riid, void **ppObj)
 
static ULONG WINAPI SAXAttributes_AddRef (ISAXAttributes *iface)
 
static ULONG WINAPI SAXAttributes_Release (ISAXAttributes *iface)
 
static HRESULT WINAPI SAXAttributes_getLength (ISAXAttributes *iface, int *length)
 
static HRESULT WINAPI SAXAttributes_getURI (ISAXAttributes *iface, int index, const WCHAR **uri, int *len)
 
static HRESULT WINAPI SAXAttributes_getLocalName (ISAXAttributes *iface, int index, const WCHAR **name, int *len)
 
static HRESULT WINAPI SAXAttributes_getQName (ISAXAttributes *iface, int index, const WCHAR **qname, int *length)
 
static HRESULT WINAPI SAXAttributes_getName (ISAXAttributes *iface, int index, const WCHAR **uri, int *uri_len, const WCHAR **local, int *local_len, const WCHAR **qname, int *qname_len)
 
static HRESULT WINAPI SAXAttributes_getIndexFromName (ISAXAttributes *iface, const WCHAR *uri, int uri_len, const WCHAR *name, int len, int *index)
 
static HRESULT WINAPI SAXAttributes_getIndexFromQName (ISAXAttributes *iface, const WCHAR *qname, int len, int *index)
 
static HRESULT WINAPI SAXAttributes_getType (ISAXAttributes *iface, int index, const WCHAR **type, int *len)
 
static HRESULT WINAPI SAXAttributes_getTypeFromName (ISAXAttributes *iface, const WCHAR *pUri, int nUri, const WCHAR *pLocalName, int nLocalName, const WCHAR **pType, int *nType)
 
static HRESULT WINAPI SAXAttributes_getTypeFromQName (ISAXAttributes *iface, const WCHAR *pQName, int nQName, const WCHAR **pType, int *nType)
 
static HRESULT WINAPI SAXAttributes_getValue (ISAXAttributes *iface, int index, const WCHAR **value, int *len)
 
static HRESULT WINAPI SAXAttributes_getValueFromName (ISAXAttributes *iface, const WCHAR *uri, int uri_len, const WCHAR *name, int name_len, const WCHAR **value, int *value_len)
 
static HRESULT WINAPI SAXAttributes_getValueFromQName (ISAXAttributes *iface, const WCHAR *qname, int qname_len, const WCHAR **value, int *value_len)
 
static HRESULT WINAPI VBSAXAttributes_QueryInterface (IVBSAXAttributes *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI VBSAXAttributes_AddRef (IVBSAXAttributes *iface)
 
static ULONG WINAPI VBSAXAttributes_Release (IVBSAXAttributes *iface)
 
static HRESULT WINAPI VBSAXAttributes_GetTypeInfoCount (IVBSAXAttributes *iface, UINT *pctinfo)
 
static HRESULT WINAPI VBSAXAttributes_GetTypeInfo (IVBSAXAttributes *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI VBSAXAttributes_GetIDsOfNames (IVBSAXAttributes *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI VBSAXAttributes_Invoke (IVBSAXAttributes *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI VBSAXAttributes_get_length (IVBSAXAttributes *iface, int *len)
 
static HRESULT WINAPI VBSAXAttributes_getURI (IVBSAXAttributes *iface, int index, BSTR *uri)
 
static HRESULT WINAPI VBSAXAttributes_getLocalName (IVBSAXAttributes *iface, int index, BSTR *name)
 
static HRESULT WINAPI VBSAXAttributes_getQName (IVBSAXAttributes *iface, int index, BSTR *qname)
 
static HRESULT WINAPI VBSAXAttributes_getIndexFromName (IVBSAXAttributes *iface, BSTR uri, BSTR name, int *index)
 
static HRESULT WINAPI VBSAXAttributes_getIndexFromQName (IVBSAXAttributes *iface, BSTR qname, int *index)
 
static HRESULT WINAPI VBSAXAttributes_getType (IVBSAXAttributes *iface, int index, BSTR *type)
 
static HRESULT WINAPI VBSAXAttributes_getTypeFromName (IVBSAXAttributes *iface, BSTR uri, BSTR name, BSTR *type)
 
static HRESULT WINAPI VBSAXAttributes_getTypeFromQName (IVBSAXAttributes *iface, BSTR qname, BSTR *type)
 
static HRESULT WINAPI VBSAXAttributes_getValue (IVBSAXAttributes *iface, int index, BSTR *value)
 
static HRESULT WINAPI VBSAXAttributes_getValueFromName (IVBSAXAttributes *iface, BSTR uri, BSTR name, BSTR *value)
 
static HRESULT WINAPI VBSAXAttributes_getValueFromQName (IVBSAXAttributes *iface, BSTR qname, BSTR *value)
 
HRESULT SAXAttributes_create (MSXML_VERSION version, void **ppObj)
 

Variables

static const WCHAR emptyW [] = {0}
 
static const WCHAR spaceW [] = {' '}
 
static const WCHAR quotW [] = {'\"'}
 
static const WCHAR closetagW [] = {'>','\r','\n'}
 
static const WCHAR crlfW [] = {'\r','\n'}
 
static const WCHAR entityW [] = {'<','!','E','N','T','I','T','Y',' '}
 
static const WCHAR publicW [] = {'P','U','B','L','I','C',' '}
 
static const WCHAR systemW [] = {'S','Y','S','T','E','M',' '}
 
static const WCHAR iso_8859_1W [] = {'i','s','o','-','8','8','5','9','-','1',0}
 
static const WCHAR iso_8859_2W [] = {'i','s','o','-','8','8','5','9','-','2',0}
 
static const WCHAR iso_8859_3W [] = {'i','s','o','-','8','8','5','9','-','3',0}
 
static const WCHAR iso_8859_4W [] = {'i','s','o','-','8','8','5','9','-','4',0}
 
static const WCHAR iso_8859_5W [] = {'i','s','o','-','8','8','5','9','-','5',0}
 
static const WCHAR iso_8859_7W [] = {'i','s','o','-','8','8','5','9','-','7',0}
 
static const WCHAR iso_8859_9W [] = {'i','s','o','-','8','8','5','9','-','9',0}
 
static const WCHAR iso_8859_13W [] = {'i','s','o','-','8','8','5','9','-','1','3',0}
 
static const WCHAR iso_8859_15W [] = {'i','s','o','-','8','8','5','9','-','1','5',0}
 
static const WCHAR utf16W [] = {'U','T','F','-','1','6',0}
 
static const WCHAR utf8W [] = {'U','T','F','-','8',0}
 
static const struct xml_encoding_data xml_encoding_map []
 
static const struct IMXWriterVtbl MXWriterVtbl
 
static const struct ISAXContentHandlerVtbl SAXContentHandlerVtbl
 
static const struct ISAXLexicalHandlerVtbl SAXLexicalHandlerVtbl
 
static const ISAXDeclHandlerVtbl SAXDeclHandlerVtbl
 
static const IVBSAXDeclHandlerVtbl VBSAXDeclHandlerVtbl
 
static const IVBSAXLexicalHandlerVtbl VBSAXLexicalHandlerVtbl
 
static const IVBSAXContentHandlerVtbl VBSAXContentHandlerVtbl
 
static const ISAXDTDHandlerVtbl SAXDTDHandlerVtbl
 
static const IVBSAXDTDHandlerVtbl VBSAXDTDHandlerVtbl
 
static const ISAXErrorHandlerVtbl SAXErrorHandlerVtbl
 
static const IVBSAXErrorHandlerVtbl VBSAXErrorHandlerVtbl
 
static const tid_t mxwriter_iface_tids []
 
static dispex_static_data_t mxwriter_dispex
 
static const IMXAttributesVtbl MXAttributesVtbl
 
static const ISAXAttributesVtbl SAXAttributesVtbl
 
static const struct IVBSAXAttributesVtbl VBSAXAttributesVtbl
 
static const tid_t mxattrs_iface_tids []
 
static dispex_static_data_t mxattrs_dispex
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file mxwriter.c.

Enumeration Type Documentation

◆ escape_mode

Enumerator
EscapeValue 
EscapeText 

Definition at line 112 of file mxwriter.c.

113 {
114  EscapeValue,
115  EscapeText
116 } escape_mode;
escape_mode
Definition: mxwriter.c:112

◆ mxwriter_prop

Enumerator
MXWriter_BOM 
MXWriter_DisableEscaping 
MXWriter_Indent 
MXWriter_OmitXmlDecl 
MXWriter_Standalone 
MXWriter_LastProp 

Definition at line 102 of file mxwriter.c.

◆ xml_encoding

Enumerator
XmlEncoding_ISO_8859_1 
XmlEncoding_ISO_8859_13 
XmlEncoding_ISO_8859_15 
XmlEncoding_ISO_8859_2 
XmlEncoding_ISO_8859_3 
XmlEncoding_ISO_8859_4 
XmlEncoding_ISO_8859_5 
XmlEncoding_ISO_8859_7 
XmlEncoding_ISO_8859_9 
XmlEncoding_UTF16 
XmlEncoding_UTF8 
XmlEncoding_Unknown 
XmlEncoding_USASCII 
XmlEncoding_UTF16 
XmlEncoding_UTF8 
XmlEncoding_Unknown 

Definition at line 53 of file mxwriter.c.

Function Documentation

◆ close_element_starttag()

static void close_element_starttag ( mxwriter writer)
static

Definition at line 610 of file mxwriter.c.

611 {
612  static const WCHAR gtW[] = {'>'};
613  if (!writer->element) return;
614  write_output_buffer(writer, gtW, 1);
615 }
BSTR element
Definition: mxwriter.c:167
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR gtW[]
Definition: reader.c:94
static HRESULT write_output_buffer(mxwriter *writer, const WCHAR *data, int len)
Definition: mxwriter.c:313

Referenced by flush_output_buffer(), mxwriter_write_starttag(), SAXContentHandler_characters(), and SAXLexicalHandler_comment().

◆ close_output_buffer()

static void close_output_buffer ( mxwriter writer)
static

Definition at line 460 of file mxwriter.c.

461 {
462  encoded_buffer *cur, *cur2;
463 
464  heap_free(writer->buffer.encoded.data);
465 
467  {
468  list_remove(&cur->entry);
469  free_encoded_buffer(cur);
470  heap_free(cur);
471  }
472 
474  get_code_page(writer->xml_enc, &writer->buffer.code_page);
475  writer->buffer.utf16_total = 0;
476  list_init(&writer->buffer.blocks);
477 }
char * data
Definition: mxwriter.c:121
uint8_t entry
Definition: isohybrid.c:63
struct list entry
Definition: mxwriter.c:120
output_buffer buffer
Definition: mxwriter.c:171
static void free_encoded_buffer(encoded_buffer *buffer)
Definition: mxwriter.c:260
encoded_buffer encoded
Definition: mxwriter.c:128
static HRESULT init_encoded_buffer(encoded_buffer *buffer)
Definition: mxwriter.c:247
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
static HRESULT get_code_page(xml_encoding encoding, UINT *cp)
Definition: mxwriter.c:265
xml_encoding xml_enc
Definition: mxwriter.c:163
struct list blocks
Definition: mxwriter.c:131
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
UINT utf16_total
Definition: mxwriter.c:130
UINT code_page
Definition: mxwriter.c:129
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by reset_output_buffer().

◆ flush_output_buffer()

static HRESULT flush_output_buffer ( mxwriter This)
inlinestatic

Definition at line 661 of file mxwriter.c.

662 {
665  This->cdata = FALSE;
666  return write_data_to_stream(This);
667 }
static void close_element_starttag(mxwriter *writer)
Definition: mxwriter.c:610
static HRESULT write_data_to_stream(mxwriter *writer)
Definition: mxwriter.c:586
smooth NULL
Definition: ftsmooth.c:416
static void set_element_name(mxwriter *This, const WCHAR *name, int len)
Definition: mxwriter.c:652

Referenced by mxwriter_flush(), mxwriter_get_output(), mxwriter_put_encoding(), mxwriter_put_output(), mxwriter_Release(), save_all_changes(), and SAXContentHandler_endDocument().

◆ free_encoded_buffer()

static void free_encoded_buffer ( encoded_buffer buffer)
static

Definition at line 260 of file mxwriter.c.

261 {
262  heap_free(buffer->data);
263 }
GLuint buffer
Definition: glext.h:5915
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by close_output_buffer(), and free_output_buffer().

◆ free_output_buffer()

static void free_output_buffer ( output_buffer buffer)
static

Definition at line 299 of file mxwriter.c.

300 {
301  encoded_buffer *cur, *cur2;
302 
303  free_encoded_buffer(&buffer->encoded);
304 
305  LIST_FOR_EACH_ENTRY_SAFE(cur, cur2, &buffer->blocks, encoded_buffer, entry)
306  {
307  list_remove(&cur->entry);
308  free_encoded_buffer(cur);
309  heap_free(cur);
310  }
311 }
uint8_t entry
Definition: isohybrid.c:63
GLuint buffer
Definition: glext.h:5915
struct list entry
Definition: mxwriter.c:120
static void free_encoded_buffer(encoded_buffer *buffer)
Definition: mxwriter.c:260
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by mxwriter_Release().

◆ get_attribute_byindex()

static mxattribute* get_attribute_byindex ( mxattributes attrs,
int  index 
)
static

Definition at line 2818 of file mxwriter.c.

2819 {
2820  if (index < 0 || index >= attrs->length) return NULL;
2821  return &attrs->attr[index];
2822 }
mxattribute * attr
Definition: mxwriter.c:193
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
#define index(s, c)
Definition: various.h:29

Referenced by MXAttributes_removeAttribute(), MXAttributes_setLocalName(), MXAttributes_setQName(), MXAttributes_setURI(), and MXAttributes_setValue().

◆ get_code_page()

static HRESULT get_code_page ( xml_encoding  encoding,
UINT cp 
)
static

Definition at line 265 of file mxwriter.c.

266 {
267  const struct xml_encoding_data *data;
268 
270  {
271  FIXME("unsupported encoding %d\n", encoding);
272  return E_NOTIMPL;
273  }
274 
276  *cp = data->cp;
277 
278  return S_OK;
279 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
ed encoding
Definition: write.c:2847
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
POINT cp
Definition: magnifier.c:60
static const struct xml_encoding_data xml_encoding_map[]
Definition: mxwriter.c:88

Referenced by close_output_buffer(), and init_output_buffer().

◆ get_escaped_string()

static WCHAR* get_escaped_string ( const WCHAR str,
escape_mode  mode,
int len 
)
static

Definition at line 488 of file mxwriter.c.

489 {
490  static const WCHAR ltW[] = {'&','l','t',';'};
491  static const WCHAR ampW[] = {'&','a','m','p',';'};
492  static const WCHAR equotW[] = {'&','q','u','o','t',';'};
493  static const WCHAR gtW[] = {'&','g','t',';'};
494 
495  const int default_alloc = 100;
496  const int grow_thresh = 10;
497  int p = *len, conv_len;
498  WCHAR *ptr, *ret;
499 
500  /* default buffer size to something if length is unknown */
501  conv_len = *len == -1 ? default_alloc : max(2**len, default_alloc);
502  ptr = ret = heap_alloc(conv_len*sizeof(WCHAR));
503 
504  while (*str && p)
505  {
506  if (ptr - ret > conv_len - grow_thresh)
507  {
508  int written = ptr - ret;
509  conv_len *= 2;
510  ptr = ret = heap_realloc(ret, conv_len*sizeof(WCHAR));
511  ptr += written;
512  }
513 
514  switch (*str)
515  {
516  case '<':
517  memcpy(ptr, ltW, sizeof(ltW));
518  ptr += ARRAY_SIZE(ltW);
519  break;
520  case '&':
521  memcpy(ptr, ampW, sizeof(ampW));
522  ptr += ARRAY_SIZE(ampW);
523  break;
524  case '>':
525  memcpy(ptr, gtW, sizeof(gtW));
526  ptr += ARRAY_SIZE(gtW);
527  break;
528  case '"':
529  if (mode == EscapeValue)
530  {
531  memcpy(ptr, equotW, sizeof(equotW));
532  ptr += ARRAY_SIZE(equotW);
533  break;
534  }
535  /* fallthrough for text mode */
536  default:
537  *ptr++ = *str;
538  break;
539  }
540 
541  str++;
542  if (*len != -1) p--;
543  }
544 
545  if (*len != -1) *len = ptr-ret;
546  *++ptr = 0;
547 
548  return ret;
549 }
#define max(a, b)
Definition: svc.c:63
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static const WCHAR ltW[]
Definition: reader.c:93
static PVOID ptr
Definition: dispmode.c:27
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR gtW[]
Definition: reader.c:94
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
GLenum mode
Definition: glext.h:6217
#define ARRAY_SIZE(a)
Definition: main.h:24
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by mxwriter_write_attribute(), and SAXContentHandler_characters().

◆ impl_from_IMXAttributes()

static mxattributes* impl_from_IMXAttributes ( IMXAttributes *  iface)
inlinestatic

Definition at line 198 of file mxwriter.c.

199 {
200  return CONTAINING_RECORD(iface, mxattributes, IMXAttributes_iface);
201 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by MXAttributes_addAttribute(), MXAttributes_addAttributeFromIndex(), MXAttributes_AddRef(), MXAttributes_clear(), MXAttributes_GetIDsOfNames(), MXAttributes_GetTypeInfo(), MXAttributes_GetTypeInfoCount(), MXAttributes_Invoke(), MXAttributes_QueryInterface(), MXAttributes_Release(), MXAttributes_removeAttribute(), MXAttributes_setAttribute(), MXAttributes_setAttributes(), MXAttributes_setLocalName(), MXAttributes_setQName(), MXAttributes_setURI(), and MXAttributes_setValue().

◆ impl_from_IMXWriter()

◆ impl_from_ISAXAttributes()

static mxattributes* impl_from_ISAXAttributes ( ISAXAttributes *  iface)
inlinestatic

Definition at line 203 of file mxwriter.c.

204 {
205  return CONTAINING_RECORD(iface, mxattributes, ISAXAttributes_iface);
206 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by SAXAttributes_AddRef(), SAXAttributes_getIndexFromName(), SAXAttributes_getIndexFromQName(), SAXAttributes_getLength(), SAXAttributes_getLocalName(), SAXAttributes_getName(), SAXAttributes_getQName(), SAXAttributes_getType(), SAXAttributes_getTypeFromName(), SAXAttributes_getTypeFromQName(), SAXAttributes_getURI(), SAXAttributes_getValue(), SAXAttributes_getValueFromName(), SAXAttributes_getValueFromQName(), SAXAttributes_QueryInterface(), and SAXAttributes_Release().

◆ impl_from_ISAXContentHandler()

static mxwriter* impl_from_ISAXContentHandler ( ISAXContentHandler *  iface)
inlinestatic

◆ impl_from_ISAXDeclHandler()

static mxwriter* impl_from_ISAXDeclHandler ( ISAXDeclHandler *  iface)
inlinestatic

Definition at line 716 of file mxwriter.c.

717 {
718  return CONTAINING_RECORD(iface, mxwriter, ISAXDeclHandler_iface);
719 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by SAXDeclHandler_AddRef(), SAXDeclHandler_attributeDecl(), SAXDeclHandler_elementDecl(), SAXDeclHandler_externalEntityDecl(), SAXDeclHandler_internalEntityDecl(), SAXDeclHandler_QueryInterface(), and SAXDeclHandler_Release().

◆ impl_from_ISAXDTDHandler()

static mxwriter* impl_from_ISAXDTDHandler ( ISAXDTDHandler *  iface)
inlinestatic

Definition at line 726 of file mxwriter.c.

727 {
728  return CONTAINING_RECORD(iface, mxwriter, ISAXDTDHandler_iface);
729 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by SAXDTDHandler_AddRef(), SAXDTDHandler_notationDecl(), SAXDTDHandler_QueryInterface(), SAXDTDHandler_Release(), and SAXDTDHandler_unparsedEntityDecl().

◆ impl_from_ISAXErrorHandler()

static mxwriter* impl_from_ISAXErrorHandler ( ISAXErrorHandler *  iface)
inlinestatic

Definition at line 736 of file mxwriter.c.

737 {
738  return CONTAINING_RECORD(iface, mxwriter, ISAXErrorHandler_iface);
739 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by SAXErrorHandler_AddRef(), SAXErrorHandler_error(), SAXErrorHandler_fatalError(), SAXErrorHandler_ignorableWarning(), SAXErrorHandler_QueryInterface(), and SAXErrorHandler_Release().

◆ impl_from_ISAXLexicalHandler()

static mxwriter* impl_from_ISAXLexicalHandler ( ISAXLexicalHandler *  iface)
inlinestatic

Definition at line 706 of file mxwriter.c.

707 {
708  return CONTAINING_RECORD(iface, mxwriter, ISAXLexicalHandler_iface);
709 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by SAXLexicalHandler_AddRef(), SAXLexicalHandler_comment(), SAXLexicalHandler_endCDATA(), SAXLexicalHandler_endDTD(), SAXLexicalHandler_endEntity(), SAXLexicalHandler_QueryInterface(), SAXLexicalHandler_Release(), SAXLexicalHandler_startCDATA(), SAXLexicalHandler_startDTD(), and SAXLexicalHandler_startEntity().

◆ impl_from_IVBSAXAttributes()

static mxattributes* impl_from_IVBSAXAttributes ( IVBSAXAttributes *  iface)
inlinestatic

◆ impl_from_IVBSAXContentHandler()

◆ impl_from_IVBSAXDeclHandler()

static mxwriter* impl_from_IVBSAXDeclHandler ( IVBSAXDeclHandler *  iface)
inlinestatic

Definition at line 721 of file mxwriter.c.

722 {
723  return CONTAINING_RECORD(iface, mxwriter, IVBSAXDeclHandler_iface);
724 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VBSAXDeclHandler_AddRef(), VBSAXDeclHandler_attributeDecl(), VBSAXDeclHandler_elementDecl(), VBSAXDeclHandler_externalEntityDecl(), VBSAXDeclHandler_GetIDsOfNames(), VBSAXDeclHandler_GetTypeInfo(), VBSAXDeclHandler_GetTypeInfoCount(), VBSAXDeclHandler_internalEntityDecl(), VBSAXDeclHandler_Invoke(), VBSAXDeclHandler_QueryInterface(), and VBSAXDeclHandler_Release().

◆ impl_from_IVBSAXDTDHandler()

static mxwriter* impl_from_IVBSAXDTDHandler ( IVBSAXDTDHandler *  iface)
inlinestatic

Definition at line 731 of file mxwriter.c.

732 {
733  return CONTAINING_RECORD(iface, mxwriter, IVBSAXDTDHandler_iface);
734 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VBSAXDTDHandler_AddRef(), VBSAXDTDHandler_GetIDsOfNames(), VBSAXDTDHandler_GetTypeInfo(), VBSAXDTDHandler_GetTypeInfoCount(), VBSAXDTDHandler_Invoke(), VBSAXDTDHandler_notationDecl(), VBSAXDTDHandler_QueryInterface(), VBSAXDTDHandler_Release(), and VBSAXDTDHandler_unparsedEntityDecl().

◆ impl_from_IVBSAXErrorHandler()

static mxwriter* impl_from_IVBSAXErrorHandler ( IVBSAXErrorHandler *  iface)
inlinestatic

Definition at line 741 of file mxwriter.c.

742 {
743  return CONTAINING_RECORD(iface, mxwriter, IVBSAXErrorHandler_iface);
744 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VBSAXErrorHandler_AddRef(), VBSAXErrorHandler_error(), VBSAXErrorHandler_fatalError(), VBSAXErrorHandler_GetIDsOfNames(), VBSAXErrorHandler_GetTypeInfo(), VBSAXErrorHandler_GetTypeInfoCount(), VBSAXErrorHandler_ignorableWarning(), VBSAXErrorHandler_Invoke(), VBSAXErrorHandler_QueryInterface(), and VBSAXErrorHandler_Release().

◆ impl_from_IVBSAXLexicalHandler()

static mxwriter* impl_from_IVBSAXLexicalHandler ( IVBSAXLexicalHandler *  iface)
inlinestatic

Definition at line 711 of file mxwriter.c.

712 {
713  return CONTAINING_RECORD(iface, mxwriter, IVBSAXLexicalHandler_iface);
714 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VBSAXLexicalHandler_AddRef(), VBSAXLexicalHandler_comment(), VBSAXLexicalHandler_endCDATA(), VBSAXLexicalHandler_endDTD(), VBSAXLexicalHandler_endEntity(), VBSAXLexicalHandler_GetIDsOfNames(), VBSAXLexicalHandler_GetTypeInfo(), VBSAXLexicalHandler_GetTypeInfoCount(), VBSAXLexicalHandler_Invoke(), VBSAXLexicalHandler_QueryInterface(), VBSAXLexicalHandler_Release(), VBSAXLexicalHandler_startCDATA(), VBSAXLexicalHandler_startDTD(), and VBSAXLexicalHandler_startEntity().

◆ init_encoded_buffer()

static HRESULT init_encoded_buffer ( encoded_buffer buffer)
static

Definition at line 247 of file mxwriter.c.

248 {
249  const int initial_len = 0x1000;
250  buffer->data = heap_alloc(initial_len);
251  if (!buffer->data) return E_OUTOFMEMORY;
252 
253  memset(buffer->data, 0, 4);
254  buffer->allocated = initial_len;
255  buffer->written = 0;
256 
257  return S_OK;
258 }
GLuint buffer
Definition: glext.h:5915
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_OK
Definition: intsafe.h:59
#define memset(x, y, z)
Definition: compat.h:39

Referenced by close_output_buffer(), init_output_buffer(), and write_output_buffer().

◆ init_output_buffer()

static HRESULT init_output_buffer ( xml_encoding  encoding,
output_buffer buffer 
)
static

Definition at line 281 of file mxwriter.c.

282 {
283  HRESULT hr;
284 
285  hr = get_code_page(encoding, &buffer->code_page);
286  if (hr != S_OK)
287  return hr;
288 
289  hr = init_encoded_buffer(&buffer->encoded);
290  if (hr != S_OK)
291  return hr;
292 
293  list_init(&buffer->blocks);
294  buffer->utf16_total = 0;
295 
296  return S_OK;
297 }
HRESULT hr
Definition: shlfolder.c:183
GLuint buffer
Definition: glext.h:5915
static HRESULT init_encoded_buffer(encoded_buffer *buffer)
Definition: mxwriter.c:247
static HRESULT get_code_page(xml_encoding encoding, UINT *cp)
Definition: mxwriter.c:265
LONG HRESULT
Definition: typedefs.h:77
ed encoding
Definition: write.c:2847
#define S_OK
Definition: intsafe.h:59
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

Referenced by MXWriter_create(), save_all_changes(), and write_regscript().

◆ MXAttributes_addAttribute()

static HRESULT WINAPI MXAttributes_addAttribute ( IMXAttributes *  iface,
BSTR  uri,
BSTR  localName,
BSTR  QName,
BSTR  type,
BSTR  value 
)
static

Definition at line 2759 of file mxwriter.c.

2761 {
2763  mxattribute *attr;
2764  HRESULT hr;
2765 
2766  TRACE("(%p)->(%s %s %s %s %s)\n", This, debugstr_w(uri), debugstr_w(localName),
2768 
2769  if ((!uri || !localName || !QName || !type || !value) && This->class_version != MSXML6)
2770  return E_INVALIDARG;
2771 
2772  /* ensure array is large enough */
2774  if (hr != S_OK) return hr;
2775 
2776  attr = &This->attr[This->length];
2777 
2778  attr->qname = SysAllocString(QName);
2779  attr->local = SysAllocString(localName);
2780  attr->uri = SysAllocString(uri);
2781  attr->type = SysAllocString(type ? type : emptyW);
2783  This->length++;
2784 
2785  return S_OK;
2786 }
HRESULT hr
Definition: shlfolder.c:183
WCHAR * value
Definition: cookie.c:173
const char * uri
Definition: sec_mgr.c:1594
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
Definition: cookie.c:170
static const WCHAR emptyW[]
Definition: mxwriter.c:43
__u8 attr
Definition: mkdosfs.c:359
#define S_OK
Definition: intsafe.h:59
static HRESULT mxattributes_grow(mxattributes *This)
Definition: mxwriter.c:213

◆ MXAttributes_addAttributeFromIndex()

static HRESULT WINAPI MXAttributes_addAttributeFromIndex ( IMXAttributes *  iface,
VARIANT  atts,
int  index 
)
static

Definition at line 2788 of file mxwriter.c.

2790 {
2792  FIXME("(%p)->(%s %d): stub\n", This, debugstr_variant(&atts), index);
2793  return E_NOTIMPL;
2794 }
#define FIXME(fmt,...)
Definition: debug.h:110
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
GLuint index
Definition: glext.h:6031
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define E_NOTIMPL
Definition: ddrawi.h:99
_In_ UINT16 _Out_ ULONG * atts
Definition: btrfs_drv.h:1080

◆ MXAttributes_AddRef()

static ULONG WINAPI MXAttributes_AddRef ( IMXAttributes *  iface)
static

Definition at line 2683 of file mxwriter.c.

2684 {
2686  ULONG ref = InterlockedIncrement( &This->ref );
2687  TRACE("(%p)->(%d)\n", This, ref );
2688  return ref;
2689 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ MXAttributes_clear()

static HRESULT WINAPI MXAttributes_clear ( IMXAttributes *  iface)
static

Definition at line 2796 of file mxwriter.c.

2797 {
2799  int i;
2800 
2801  TRACE("(%p)\n", This);
2802 
2803  for (i = 0; i < This->length; i++)
2804  {
2805  SysFreeString(This->attr[i].qname);
2806  SysFreeString(This->attr[i].local);
2807  SysFreeString(This->attr[i].uri);
2808  SysFreeString(This->attr[i].type);
2809  SysFreeString(This->attr[i].value);
2810  memset(&This->attr[i], 0, sizeof(mxattribute));
2811  }
2812 
2813  This->length = 0;
2814 
2815  return S_OK;
2816 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
#define memset(x, y, z)
Definition: compat.h:39

◆ MXAttributes_GetIDsOfNames()

static HRESULT WINAPI MXAttributes_GetIDsOfNames ( IMXAttributes *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 2730 of file mxwriter.c.

2737 {
2739  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
2740  riid, rgszNames, cNames, lcid, rgDispId);
2741 }
REFIID riid
Definition: precomp.h:44
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198

◆ MXAttributes_GetTypeInfo()

static HRESULT WINAPI MXAttributes_GetTypeInfo ( IMXAttributes *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 2724 of file mxwriter.c.

2725 {
2727  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
2728 }
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198

◆ MXAttributes_GetTypeInfoCount()

static HRESULT WINAPI MXAttributes_GetTypeInfoCount ( IMXAttributes *  iface,
UINT pctinfo 
)
static

Definition at line 2718 of file mxwriter.c.

2719 {
2721  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
2722 }
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198

◆ mxattributes_grow()

static HRESULT mxattributes_grow ( mxattributes This)
static

Definition at line 213 of file mxwriter.c.

214 {
215  if (This->length < This->allocated) return S_OK;
216 
217  This->allocated *= 2;
218  This->attr = heap_realloc(This->attr, This->allocated*sizeof(mxattribute));
219 
220  return This->attr ? S_OK : E_OUTOFMEMORY;
221 }
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_OK
Definition: intsafe.h:59

Referenced by MXAttributes_addAttribute().

◆ MXAttributes_Invoke()

static HRESULT WINAPI MXAttributes_Invoke ( IMXAttributes *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 2743 of file mxwriter.c.

2753 {
2755  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
2756  dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
2757 }
REFIID riid
Definition: precomp.h:44
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519

◆ MXAttributes_QueryInterface()

static HRESULT WINAPI MXAttributes_QueryInterface ( IMXAttributes *  iface,
REFIID  riid,
void **  ppObj 
)
static

Definition at line 2646 of file mxwriter.c.

2647 {
2649 
2650  TRACE("(%p)->(%s %p)\n", This, debugstr_guid( riid ), ppObj);
2651 
2652  *ppObj = NULL;
2653 
2654  if ( IsEqualGUID( riid, &IID_IUnknown ) ||
2656  IsEqualGUID( riid, &IID_IMXAttributes ))
2657  {
2658  *ppObj = iface;
2659  }
2660  else if ( IsEqualGUID( riid, &IID_ISAXAttributes ))
2661  {
2662  *ppObj = &This->ISAXAttributes_iface;
2663  }
2664  else if ( IsEqualGUID( riid, &IID_IVBSAXAttributes ))
2665  {
2666  *ppObj = &This->IVBSAXAttributes_iface;
2667  }
2668  else if (dispex_query_interface(&This->dispex, riid, ppObj))
2669  {
2670  return *ppObj ? S_OK : E_NOINTERFACE;
2671  }
2672  else
2673  {
2674  FIXME("interface %s not implemented\n", debugstr_guid(riid));
2675  return E_NOINTERFACE;
2676  }
2677 
2678  IMXAttributes_AddRef( iface );
2679 
2680  return S_OK;
2681 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:59
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ MXAttributes_Release()

static ULONG WINAPI MXAttributes_Release ( IMXAttributes *  iface)
static

Definition at line 2691 of file mxwriter.c.

2692 {
2694  LONG ref = InterlockedDecrement( &This->ref );
2695 
2696  TRACE("(%p)->(%d)\n", This, ref);
2697 
2698  if (ref == 0)
2699  {
2700  int i;
2701 
2702  for (i = 0; i < This->length; i++)
2703  {
2704  SysFreeString(This->attr[i].qname);
2705  SysFreeString(This->attr[i].local);
2706  SysFreeString(This->attr[i].uri);
2707  SysFreeString(This->attr[i].type);
2708  SysFreeString(This->attr[i].value);
2709  }
2710 
2711  heap_free(This->attr);
2712  heap_free(This);
2713  }
2714 
2715  return ref;
2716 }
Definition: send.c:47
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ MXAttributes_removeAttribute()

static HRESULT WINAPI MXAttributes_removeAttribute ( IMXAttributes *  iface,
int  index 
)
static

Definition at line 2824 of file mxwriter.c.

2825 {
2827  mxattribute *dst;
2828 
2829  TRACE("(%p)->(%d)\n", This, index);
2830 
2831  if (!(dst = get_attribute_byindex(This, index))) return E_INVALIDARG;
2832 
2833  /* no need to remove last attribute, just make it inaccessible */
2834  if (index + 1 == This->length)
2835  {
2836  This->length--;
2837  return S_OK;
2838  }
2839 
2840  memmove(dst, dst + 1, (This->length-index-1)*sizeof(*dst));
2841  This->length--;
2842 
2843  return S_OK;
2844 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
#define E_INVALIDARG
Definition: ddrawi.h:101
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
GLenum GLenum dst
Definition: glext.h:6340
static mxattribute * get_attribute_byindex(mxattributes *attrs, int index)
Definition: mxwriter.c:2818

◆ MXAttributes_setAttribute()

static HRESULT WINAPI MXAttributes_setAttribute ( IMXAttributes *  iface,
int  index,
BSTR  uri,
BSTR  localName,
BSTR  QName,
BSTR  type,
BSTR  value 
)
static

Definition at line 2846 of file mxwriter.c.

2848 {
2850  FIXME("(%p)->(%d %s %s %s %s %s): stub\n", This, index, debugstr_w(uri),
2851  debugstr_w(localName), debugstr_w(QName), debugstr_w(type), debugstr_w(value));
2852  return E_NOTIMPL;
2853 }
const char * uri
Definition: sec_mgr.c:1594
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MXAttributes_setAttributes()

static HRESULT WINAPI MXAttributes_setAttributes ( IMXAttributes *  iface,
VARIANT  atts 
)
static

Definition at line 2855 of file mxwriter.c.

2856 {
2858  FIXME("(%p)->(%s): stub\n", This, debugstr_variant(&atts));
2859  return E_NOTIMPL;
2860 }
#define FIXME(fmt,...)
Definition: debug.h:110
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define E_NOTIMPL
Definition: ddrawi.h:99
_In_ UINT16 _Out_ ULONG * atts
Definition: btrfs_drv.h:1080

◆ MXAttributes_setLocalName()

static HRESULT WINAPI MXAttributes_setLocalName ( IMXAttributes *  iface,
int  index,
BSTR  localName 
)
static

Definition at line 2862 of file mxwriter.c.

2864 {
2866  mxattribute *attr;
2867 
2868  TRACE("(%p)->(%d %s)\n", This, index, debugstr_w(localName));
2869 
2870  if (!(attr = get_attribute_byindex(This, index))) return E_INVALIDARG;
2871 
2872  SysFreeString(attr->local);
2873  attr->local = SysAllocString(localName);
2874 
2875  return S_OK;
2876 }
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cookie.c:170
__u8 attr
Definition: mkdosfs.c:359
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
static mxattribute * get_attribute_byindex(mxattributes *attrs, int index)
Definition: mxwriter.c:2818

◆ MXAttributes_setQName()

static HRESULT WINAPI MXAttributes_setQName ( IMXAttributes *  iface,
int  index,
BSTR  QName 
)
static

Definition at line 2878 of file mxwriter.c.

2879 {
2881  mxattribute *attr;
2882 
2883  TRACE("(%p)->(%d %s)\n", This, index, debugstr_w(QName));
2884 
2885  if (!(attr = get_attribute_byindex(This, index))) return E_INVALIDARG;
2886 
2887  SysFreeString(attr->qname);
2888  attr->qname = SysAllocString(QName);
2889 
2890  return S_OK;
2891 }
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cookie.c:170
__u8 attr
Definition: mkdosfs.c:359
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
static mxattribute * get_attribute_byindex(mxattributes *attrs, int index)
Definition: mxwriter.c:2818

◆ MXAttributes_setURI()

static HRESULT WINAPI MXAttributes_setURI ( IMXAttributes *  iface,
int  index,
BSTR  uri 
)
static

Definition at line 2893 of file mxwriter.c.

2894 {
2896  mxattribute *attr;
2897 
2898  TRACE("(%p)->(%d %s)\n", This, index, debugstr_w(uri));
2899 
2900  if (!(attr = get_attribute_byindex(This, index))) return E_INVALIDARG;
2901 
2902  SysFreeString(attr->uri);
2903  attr->uri = SysAllocString(uri);
2904 
2905  return S_OK;
2906 }
const char * uri
Definition: sec_mgr.c:1594
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cookie.c:170
__u8 attr
Definition: mkdosfs.c:359
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
static mxattribute * get_attribute_byindex(mxattributes *attrs, int index)
Definition: mxwriter.c:2818

◆ MXAttributes_setValue()

static HRESULT WINAPI MXAttributes_setValue ( IMXAttributes *  iface,
int  index,
BSTR  value 
)
static

Definition at line 2908 of file mxwriter.c.

2909 {
2911  mxattribute *attr;
2912 
2913  TRACE("(%p)->(%d %s)\n", This, index, debugstr_w(value));
2914 
2915  if (!(attr = get_attribute_byindex(This, index))) return E_INVALIDARG;
2916 
2919 
2920  return S_OK;
2921 }
WCHAR * value
Definition: cookie.c:173
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static mxattributes * impl_from_IMXAttributes(IMXAttributes *iface)
Definition: mxwriter.c:198
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cookie.c:170
__u8 attr
Definition: mkdosfs.c:359
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
static mxattribute * get_attribute_byindex(mxattributes *attrs, int index)
Definition: mxwriter.c:2818

◆ mxwriter_AddRef()

static ULONG WINAPI mxwriter_AddRef ( IMXWriter *  iface)
static

Definition at line 815 of file mxwriter.c.

816 {
817  mxwriter *This = impl_from_IMXWriter( iface );
819 
820  TRACE("(%p)->(%d)\n", This, ref);
821 
822  return ref;
823 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ MXWriter_create()

HRESULT MXWriter_create ( MSXML_VERSION  version,
void **  ppObj 
)

Definition at line 2585 of file mxwriter.c.

2586 {
2587  static const WCHAR version10W[] = {'1','.','0',0};
2588  mxwriter *This;
2589  HRESULT hr;
2590 
2591  TRACE("(%p)\n", ppObj);
2592 
2593  This = heap_alloc( sizeof (*This) );
2594  if(!This)
2595  return E_OUTOFMEMORY;
2596 
2597  This->IMXWriter_iface.lpVtbl = &MXWriterVtbl;
2598  This->ISAXContentHandler_iface.lpVtbl = &SAXContentHandlerVtbl;
2599  This->ISAXLexicalHandler_iface.lpVtbl = &SAXLexicalHandlerVtbl;
2600  This->ISAXDeclHandler_iface.lpVtbl = &SAXDeclHandlerVtbl;
2601  This->ISAXDTDHandler_iface.lpVtbl = &SAXDTDHandlerVtbl;
2602  This->ISAXErrorHandler_iface.lpVtbl = &SAXErrorHandlerVtbl;
2603  This->IVBSAXDeclHandler_iface.lpVtbl = &VBSAXDeclHandlerVtbl;
2604  This->IVBSAXLexicalHandler_iface.lpVtbl = &VBSAXLexicalHandlerVtbl;
2605  This->IVBSAXContentHandler_iface.lpVtbl = &VBSAXContentHandlerVtbl;
2606  This->IVBSAXDTDHandler_iface.lpVtbl = &VBSAXDTDHandlerVtbl;
2607  This->IVBSAXErrorHandler_iface.lpVtbl = &VBSAXErrorHandlerVtbl;
2608  This->ref = 1;
2609  This->class_version = version;
2610 
2611  This->props[MXWriter_BOM] = VARIANT_TRUE;
2612  This->props[MXWriter_DisableEscaping] = VARIANT_FALSE;
2613  This->props[MXWriter_Indent] = VARIANT_FALSE;
2614  This->props[MXWriter_OmitXmlDecl] = VARIANT_FALSE;
2615  This->props[MXWriter_Standalone] = VARIANT_FALSE;
2616  This->prop_changed = FALSE;
2617  This->encoding = SysAllocString(utf16W);
2618  This->version = SysAllocString(version10W);
2619  This->xml_enc = XmlEncoding_UTF16;
2620 
2621  This->element = NULL;
2622  This->cdata = FALSE;
2623  This->indent = 0;
2624  This->text = FALSE;
2625  This->newline = FALSE;
2626 
2627  This->dest = NULL;
2628 
2629  hr = init_output_buffer(This->xml_enc, &This->buffer);
2630  if (hr != S_OK) {
2631  SysFreeString(This->encoding);
2632  SysFreeString(This->version);
2633  heap_free(This);
2634  return hr;
2635  }
2636 
2637  init_dispex(&This->dispex, (IUnknown*)&This->IMXWriter_iface, &mxwriter_dispex);
2638 
2639  *ppObj = &This->IMXWriter_iface;
2640 
2641  TRACE("returning iface %p\n", *ppObj);
2642 
2643  return S_OK;
2644 }
static HRESULT init_output_buffer(xml_encoding encoding, output_buffer *buffer)
Definition: mxwriter.c:281
static const IVBSAXErrorHandlerVtbl VBSAXErrorHandlerVtbl
Definition: mxwriter.c:2560
HRESULT hr
Definition: shlfolder.c:183
static const IVBSAXDeclHandlerVtbl VBSAXDeclHandlerVtbl
Definition: mxwriter.c:1903
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static const IVBSAXDTDHandlerVtbl VBSAXDTDHandlerVtbl
Definition: mxwriter.c:2423
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const ISAXDeclHandlerVtbl SAXDeclHandlerVtbl
Definition: mxwriter.c:1795
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:64
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static const IVBSAXContentHandlerVtbl VBSAXContentHandlerVtbl
Definition: mxwriter.c:2249
static const IVBSAXLexicalHandlerVtbl VBSAXLexicalHandlerVtbl
Definition: mxwriter.c:2030
static const struct ISAXLexicalHandlerVtbl SAXLexicalHandlerVtbl
Definition: mxwriter.c:1637
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const ISAXErrorHandlerVtbl SAXErrorHandlerVtbl
Definition: mxwriter.c:2484
static const ISAXDTDHandlerVtbl SAXDTDHandlerVtbl
Definition: mxwriter.c:2343
LONG HRESULT
Definition: typedefs.h:77
static dispex_static_data_t mxwriter_dispex
Definition: mxwriter.c:2578
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:940
static const struct IMXWriterVtbl MXWriterVtbl
Definition: mxwriter.c:1134
static const struct ISAXContentHandlerVtbl SAXContentHandlerVtbl
Definition: mxwriter.c:1475
static const WCHAR utf16W[]
Definition: mxwriter.c:85
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by DllGetClassObject().

◆ mxwriter_flush()

static HRESULT WINAPI mxwriter_flush ( IMXWriter *  iface)
static

Definition at line 1127 of file mxwriter.c.

1128 {
1129  mxwriter *This = impl_from_IMXWriter( iface );
1130  TRACE("(%p)\n", This);
1131  return flush_output_buffer(This);
1132 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT flush_output_buffer(mxwriter *This)
Definition: mxwriter.c:661

◆ mxwriter_get_byteOrderMark()

static HRESULT WINAPI mxwriter_get_byteOrderMark ( IMXWriter *  iface,
VARIANT_BOOL value 
)
static

Definition at line 1030 of file mxwriter.c.

1031 {
1032  mxwriter *This = impl_from_IMXWriter( iface );
1033 
1034  TRACE("(%p)->(%p)\n", This, value);
1036 }
static HRESULT writer_get_property(const mxwriter *writer, mxwriter_prop property, VARIANT_BOOL *value)
Definition: mxwriter.c:684
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_get_disableOutputEscaping()

static HRESULT WINAPI mxwriter_get_disableOutputEscaping ( IMXWriter *  iface,
VARIANT_BOOL value 
)
static

Definition at line 1119 of file mxwriter.c.

1120 {
1121  mxwriter *This = impl_from_IMXWriter( iface );
1122 
1123  TRACE("(%p)->(%p)\n", This, value);
1125 }
static HRESULT writer_get_property(const mxwriter *writer, mxwriter_prop property, VARIANT_BOOL *value)
Definition: mxwriter.c:684
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_get_encoding()

static HRESULT WINAPI mxwriter_get_encoding ( IMXWriter *  iface,
BSTR encoding 
)
static

Definition at line 1008 of file mxwriter.c.

1009 {
1010  mxwriter *This = impl_from_IMXWriter( iface );
1011 
1012  TRACE("(%p)->(%p)\n", This, encoding);
1013 
1014  if (!encoding) return E_POINTER;
1015 
1016  *encoding = SysAllocString(This->encoding);
1017  if (!*encoding) return E_OUTOFMEMORY;
1018 
1019  return S_OK;
1020 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
#define TRACE(s)
Definition: solgame.cpp:4
ed encoding
Definition: write.c:2847
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ mxwriter_get_indent()

static HRESULT WINAPI mxwriter_get_indent ( IMXWriter *  iface,
VARIANT_BOOL value 
)
static

Definition at line 1046 of file mxwriter.c.

1047 {
1048  mxwriter *This = impl_from_IMXWriter( iface );
1049 
1050  TRACE("(%p)->(%p)\n", This, value);
1052 }
static HRESULT writer_get_property(const mxwriter *writer, mxwriter_prop property, VARIANT_BOOL *value)
Definition: mxwriter.c:684
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_get_omitXMLDeclaration()

static HRESULT WINAPI mxwriter_get_omitXMLDeclaration ( IMXWriter *  iface,
VARIANT_BOOL value 
)
static

Definition at line 1078 of file mxwriter.c.

1079 {
1080  mxwriter *This = impl_from_IMXWriter( iface );
1081 
1082  TRACE("(%p)->(%p)\n", This, value);
1084 }
static HRESULT writer_get_property(const mxwriter *writer, mxwriter_prop property, VARIANT_BOOL *value)
Definition: mxwriter.c:684
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_get_output()

static HRESULT WINAPI mxwriter_get_output ( IMXWriter *  iface,
VARIANT dest 
)
static

Definition at line 932 of file mxwriter.c.

933 {
934  mxwriter *This = impl_from_IMXWriter( iface );
935 
936  TRACE("(%p)->(%p)\n", This, dest);
937 
938  if (!dest) return E_POINTER;
939 
940  if (This->dest)
941  {
942  /* we only support IStream output so far */
943  V_VT(dest) = VT_UNKNOWN;
944  V_UNKNOWN(dest) = (IUnknown*)This->dest;
945  IStream_AddRef(This->dest);
946  }
947  else
948  {
950  char *dest_ptr;
951  HRESULT hr;
952 
954  if (FAILED(hr))
955  return hr;
956 
957  V_VT(dest) = VT_BSTR;
958  V_BSTR(dest) = SysAllocStringLen(NULL, This->buffer.utf16_total / sizeof(WCHAR));
959  if (!V_BSTR(dest))
960  return E_OUTOFMEMORY;
961 
962  dest_ptr = (char*)V_BSTR(dest);
963  buff = &This->buffer.encoded;
964 
965  if (buff->written)
966  {
967  memcpy(dest_ptr, buff->data, buff->written);
968  dest_ptr += buff->written;
969  }
970 
971  LIST_FOR_EACH_ENTRY(buff, &This->buffer.blocks, encoded_buffer, entry)
972  {
973  memcpy(dest_ptr, buff->data, buff->written);
974  dest_ptr += buff->written;
975  }
976  }
977 
978  return S_OK;
979 }
HRESULT hr
Definition: shlfolder.c:183
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
uint8_t entry
Definition: isohybrid.c:63
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define V_VT(A)
Definition: oleauto.h:211
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_BSTR(A)
Definition: oleauto.h:226
static HRESULT flush_output_buffer(mxwriter *This)
Definition: mxwriter.c:661
#define S_OK
Definition: intsafe.h:59
static char * dest
Definition: rtl.c:135
#define E_POINTER
Definition: winerror.h:2365
static unsigned char buff[32768]
Definition: fatten.c:17

◆ mxwriter_get_standalone()

static HRESULT WINAPI mxwriter_get_standalone ( IMXWriter *  iface,
VARIANT_BOOL value 
)
static

Definition at line 1062 of file mxwriter.c.

1063 {
1064  mxwriter *This = impl_from_IMXWriter( iface );
1065 
1066  TRACE("(%p)->(%p)\n", This, value);
1068 }
static HRESULT writer_get_property(const mxwriter *writer, mxwriter_prop property, VARIANT_BOOL *value)
Definition: mxwriter.c:684
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_get_version()

static HRESULT WINAPI mxwriter_get_version ( IMXWriter *  iface,
BSTR version 
)
static

Definition at line 1100 of file mxwriter.c.

1101 {
1102  mxwriter *This = impl_from_IMXWriter( iface );
1103 
1104  TRACE("(%p)->(%p)\n", This, version);
1105 
1106  if (!version) return E_POINTER;
1107 
1108  return return_bstr(This->version, version);
1109 }
static HRESULT return_bstr(const WCHAR *value, BSTR *p)
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
static const WCHAR version[]
Definition: asmname.c:64
#define TRACE(s)
Definition: solgame.cpp:4
#define E_POINTER
Definition: winerror.h:2365

◆ mxwriter_GetIDsOfNames()

static HRESULT WINAPI mxwriter_GetIDsOfNames ( IMXWriter *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 865 of file mxwriter.c.

869 {
870  mxwriter *This = impl_from_IMXWriter( iface );
871  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
872  riid, rgszNames, cNames, lcid, rgDispId);
873 }
REFIID riid
Definition: precomp.h:44
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691

◆ mxwriter_GetTypeInfo()

static HRESULT WINAPI mxwriter_GetTypeInfo ( IMXWriter *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 855 of file mxwriter.c.

859 {
860  mxwriter *This = impl_from_IMXWriter( iface );
861  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
862  iTInfo, lcid, ppTInfo);
863 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691

◆ mxwriter_GetTypeInfoCount()

static HRESULT WINAPI mxwriter_GetTypeInfoCount ( IMXWriter *  iface,
UINT pctinfo 
)
static

Definition at line 849 of file mxwriter.c.

850 {
851  mxwriter *This = impl_from_IMXWriter( iface );
852  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
853 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691

◆ mxwriter_Invoke()

static HRESULT WINAPI mxwriter_Invoke ( IMXWriter *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 875 of file mxwriter.c.

880 {
881  mxwriter *This = impl_from_IMXWriter( iface );
882  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
883  dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
884 }
REFIID riid
Definition: precomp.h:44
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519

◆ mxwriter_put_byteOrderMark()

static HRESULT WINAPI mxwriter_put_byteOrderMark ( IMXWriter *  iface,
VARIANT_BOOL  value 
)
static

Definition at line 1022 of file mxwriter.c.

1023 {
1024  mxwriter *This = impl_from_IMXWriter( iface );
1025 
1026  TRACE("(%p)->(%d)\n", This, value);
1028 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
static HRESULT writer_set_property(mxwriter *writer, mxwriter_prop property, VARIANT_BOOL value)
Definition: mxwriter.c:677
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_put_disableOutputEscaping()

static HRESULT WINAPI mxwriter_put_disableOutputEscaping ( IMXWriter *  iface,
VARIANT_BOOL  value 
)
static

Definition at line 1111 of file mxwriter.c.

1112 {
1113  mxwriter *This = impl_from_IMXWriter( iface );
1114 
1115  TRACE("(%p)->(%d)\n", This, value);
1117 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
static HRESULT writer_set_property(mxwriter *writer, mxwriter_prop property, VARIANT_BOOL value)
Definition: mxwriter.c:677
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_put_encoding()

static HRESULT WINAPI mxwriter_put_encoding ( IMXWriter *  iface,
BSTR  encoding 
)
static

Definition at line 981 of file mxwriter.c.

982 {
983  mxwriter *This = impl_from_IMXWriter( iface );
985  HRESULT hr;
986 
987  TRACE("(%p)->(%s)\n", This, debugstr_w(encoding));
988 
990  if (enc == XmlEncoding_Unknown)
991  {
992  FIXME("unsupported encoding %s\n", debugstr_w(encoding));
993  return E_INVALIDARG;
994  }
995 
997  if (FAILED(hr))
998  return hr;
999 
1000  SysReAllocString(&This->encoding, encoding);
1001  This->xml_enc = enc;
1002 
1003  TRACE("got encoding %d\n", This->xml_enc);
1005  return S_OK;
1006 }
INT WINAPI SysReAllocString(LPBSTR old, LPCOLESTR str)
Definition: oleaut.c:470
HRESULT hr
Definition: shlfolder.c:183
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static void reset_output_buffer(mxwriter *This)
Definition: mxwriter.c:672
static xml_encoding parse_encoding_name(const WCHAR *encoding)
Definition: mxwriter.c:223
LONG HRESULT
Definition: typedefs.h:77
ed encoding
Definition: write.c:2847
static HRESULT flush_output_buffer(mxwriter *This)
Definition: mxwriter.c:661
#define S_OK
Definition: intsafe.h:59
xml_encoding enc
Definition: mxwriter.c:72
xml_encoding
Definition: mxwriter.c:53

◆ mxwriter_put_indent()

static HRESULT WINAPI mxwriter_put_indent ( IMXWriter *  iface,
VARIANT_BOOL  value 
)
static

Definition at line 1038 of file mxwriter.c.

1039 {
1040  mxwriter *This = impl_from_IMXWriter( iface );
1041 
1042  TRACE("(%p)->(%d)\n", This, value);
1044 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
static HRESULT writer_set_property(mxwriter *writer, mxwriter_prop property, VARIANT_BOOL value)
Definition: mxwriter.c:677
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_put_omitXMLDeclaration()

static HRESULT WINAPI mxwriter_put_omitXMLDeclaration ( IMXWriter *  iface,
VARIANT_BOOL  value 
)
static

Definition at line 1070 of file mxwriter.c.

1071 {
1072  mxwriter *This = impl_from_IMXWriter( iface );
1073 
1074  TRACE("(%p)->(%d)\n", This, value);
1076 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
static HRESULT writer_set_property(mxwriter *writer, mxwriter_prop property, VARIANT_BOOL value)
Definition: mxwriter.c:677
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_put_output()

static HRESULT WINAPI mxwriter_put_output ( IMXWriter *  iface,
VARIANT  dest 
)
static

Definition at line 886 of file mxwriter.c.

887 {
888  mxwriter *This = impl_from_IMXWriter( iface );
889  HRESULT hr;
890 
891  TRACE("(%p)->(%s)\n", This, debugstr_variant(&dest));
892 
894  if (FAILED(hr))
895  return hr;
896 
897  switch (V_VT(&dest))
898  {
899  case VT_EMPTY:
900  {
901  if (This->dest) IStream_Release(This->dest);
902  This->dest = NULL;
904  break;
905  }
906  case VT_UNKNOWN:
907  {
908  IStream *stream;
909 
910  hr = IUnknown_QueryInterface(V_UNKNOWN(&dest), &IID_IStream, (void**)&stream);
911  if (hr == S_OK)
912  {
913  /* Recreate the output buffer to make sure it's using the correct encoding. */
915 
916  if (This->dest) IStream_Release(This->dest);
917  This->dest = stream;
918  break;
919  }
920 
921  FIXME("unhandled interface type for VT_UNKNOWN destination\n");
922  return E_NOTIMPL;
923  }
924  default:
925  FIXME("unhandled destination type %s\n", debugstr_variant(&dest));
926  return E_NOTIMPL;
927  }
928 
929  return S_OK;
930 }
HRESULT hr
Definition: shlfolder.c:183
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static void reset_output_buffer(mxwriter *This)
Definition: mxwriter.c:672
LONG HRESULT
Definition: typedefs.h:77
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
#define V_VT(A)
Definition: oleauto.h:211
#define V_UNKNOWN(A)
Definition: oleauto.h:281
static HRESULT flush_output_buffer(mxwriter *This)
Definition: mxwriter.c:661
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
static char * dest
Definition: rtl.c:135

◆ mxwriter_put_standalone()

static HRESULT WINAPI mxwriter_put_standalone ( IMXWriter *  iface,
VARIANT_BOOL  value 
)
static

Definition at line 1054 of file mxwriter.c.

1055 {
1056  mxwriter *This = impl_from_IMXWriter( iface );
1057 
1058  TRACE("(%p)->(%d)\n", This, value);
1060 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
static HRESULT writer_set_property(mxwriter *writer, mxwriter_prop property, VARIANT_BOOL value)
Definition: mxwriter.c:677
#define TRACE(s)
Definition: solgame.cpp:4

◆ mxwriter_put_version()

static HRESULT WINAPI mxwriter_put_version ( IMXWriter *  iface,
BSTR  version 
)
static

Definition at line 1086 of file mxwriter.c.

1087 {
1088  mxwriter *This = impl_from_IMXWriter( iface );
1089 
1090  TRACE("(%p)->(%s)\n", This, debugstr_w(version));
1091 
1092  if (!version) return E_INVALIDARG;
1093 
1094  SysFreeString(This->version);
1095  This->version = SysAllocString(version);
1096 
1097  return S_OK;
1098 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR version[]
Definition: asmname.c:64
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274

◆ mxwriter_QueryInterface()

static HRESULT WINAPI mxwriter_QueryInterface ( IMXWriter *  iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 746 of file mxwriter.c.

747 {
748  mxwriter *This = impl_from_IMXWriter( iface );
749 
750  TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
751 
752  *obj = NULL;
753 
754  if ( IsEqualGUID( riid, &IID_IMXWriter ) ||
757  {
758  *obj = &This->IMXWriter_iface;
759  }
760  else if ( IsEqualGUID( riid, &IID_ISAXContentHandler ) )
761  {
762  *obj = &This->ISAXContentHandler_iface;
763  }
764  else if ( IsEqualGUID( riid, &IID_ISAXLexicalHandler ) )
765  {
766  *obj = &This->ISAXLexicalHandler_iface;
767  }
768  else if ( IsEqualGUID( riid, &IID_ISAXDeclHandler ) )
769  {
770  *obj = &This->ISAXDeclHandler_iface;
771  }
772  else if ( IsEqualGUID( riid, &IID_ISAXDTDHandler ) )
773  {
774  *obj = &This->ISAXDTDHandler_iface;
775  }
776  else if ( IsEqualGUID( riid, &IID_ISAXErrorHandler ) )
777  {
778  *obj = &This->ISAXErrorHandler_iface;
779  }
780  else if ( IsEqualGUID( riid, &IID_IVBSAXDeclHandler ) )
781  {
782  *obj = &This->IVBSAXDeclHandler_iface;
783  }
784  else if ( IsEqualGUID( riid, &IID_IVBSAXLexicalHandler ) )
785  {
786  *obj = &This->IVBSAXLexicalHandler_iface;
787  }
788  else if ( IsEqualGUID( riid, &IID_IVBSAXContentHandler ) )
789  {
790  *obj = &This->IVBSAXContentHandler_iface;
791  }
792  else if ( IsEqualGUID( riid, &IID_IVBSAXDTDHandler ) )
793  {
794  *obj = &This->IVBSAXDTDHandler_iface;
795  }
796  else if ( IsEqualGUID( riid, &IID_IVBSAXErrorHandler ) )
797  {
798  *obj = &This->IVBSAXErrorHandler_iface;
799  }
800  else if (dispex_query_interface(&This->dispex, riid, obj))
801  {
802  return *obj ? S_OK : E_NOINTERFACE;
803  }
804  else
805  {
806  ERR("interface %s not implemented\n", debugstr_guid(riid));
807  *obj = NULL;
808  return E_NOINTERFACE;
809  }
810 
811  IMXWriter_AddRef(iface);
812  return S_OK;
813 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ mxwriter_Release()

static ULONG WINAPI mxwriter_Release ( IMXWriter *  iface)
static

Definition at line 825 of file mxwriter.c.

826 {
827  mxwriter *This = impl_from_IMXWriter( iface );
829 
830  TRACE("(%p)->(%d)\n", This, ref);
831 
832  if(!ref)
833  {
834  /* Windows flushes the buffer when the interface is destroyed. */
836  free_output_buffer(&This->buffer);
837 
838  if (This->dest) IStream_Release(This->dest);
839  SysFreeString(This->version);
840  SysFreeString(This->encoding);
841 
842  SysFreeString(This->element);
843  heap_free(This);
844  }
845 
846  return ref;
847 }
static mxwriter * impl_from_IMXWriter(IMXWriter *iface)
Definition: mxwriter.c:691
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static HRESULT flush_output_buffer(mxwriter *This)
Definition: mxwriter.c:661
static void free_output_buffer(output_buffer *buffer)
Definition: mxwriter.c:299
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ mxwriter_write_attribute()

static void mxwriter_write_attribute ( mxwriter writer,
const WCHAR qname,
int  qname_len,
const WCHAR value,
int  value_len,
BOOL  escape 
)
static

Definition at line 1256 of file mxwriter.c.

1258 {
1259  static const WCHAR eqW[] = {'='};
1260 
1261  /* space separator in front of every attribute */
1262  write_output_buffer(writer, spaceW, 1);
1263  write_output_buffer(writer, qname, qname_len);
1264  write_output_buffer(writer, eqW, 1);
1265 
1266  if (escape)
1267  {
1268  WCHAR *escaped = get_escaped_string(value, EscapeValue, &value_len);
1269  write_output_buffer_quoted(writer, escaped, value_len);
1270  heap_free(escaped);
1271  }
1272  else
1273  write_output_buffer_quoted(writer, value, value_len);
1274 }
static HRESULT write_output_buffer_quoted(mxwriter *writer, const WCHAR *data, int len)
Definition: mxwriter.c:450
__wchar_t WCHAR
Definition: xmlstorage.h:180
static WCHAR * get_escaped_string(const WCHAR *str, escape_mode mode, int *len)
Definition: mxwriter.c:488
static const WCHAR spaceW[]
Definition: mxwriter.c:44
static HRESULT write_output_buffer(mxwriter *writer, const WCHAR *data, int len)
Definition: mxwriter.c:313
static WCHAR escape[]
Definition: url.c:36
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by SAXContentHandler_startElement(), and VBSAXContentHandler_startElement().

◆ mxwriter_write_starttag()

static void mxwriter_write_starttag ( mxwriter writer,
const WCHAR qname,
int  len 
)
static

Definition at line 1276 of file mxwriter.c.

1277 {
1278  static const WCHAR ltW[] = {'<'};
1279 
1280  close_element_starttag(writer);
1281  set_element_name(writer, qname ? qname : emptyW, qname ? len : 0);
1282 
1283  write_node_indent(writer);
1284 
1285  write_output_buffer(writer, ltW, 1);
1286  write_output_buffer(writer, qname ? qname : emptyW, qname ? len : 0);
1287  writer_inc_indent(writer);
1288 }
static void close_element_starttag(mxwriter *writer)
Definition: mxwriter.c:610
static const WCHAR ltW[]
Definition: reader.c:93
static void writer_inc_indent(mxwriter *This)
Definition: mxwriter.c:639
__wchar_t WCHAR
Definition: xmlstorage.h:180
static void write_node_indent(mxwriter *writer)
Definition: mxwriter.c:617
static const WCHAR emptyW[]
Definition: mxwriter.c:43
GLenum GLsizei len
Definition: glext.h:6722
static HRESULT write_output_buffer(mxwriter *writer, const WCHAR *data, int len)
Definition: mxwriter.c:313
static void set_element_name(mxwriter *This, const WCHAR *name, int len)
Definition: mxwriter.c:652

Referenced by SAXContentHandler_startElement(), and VBSAXContentHandler_startElement().

◆ parse_encoding_name()

static xml_encoding parse_encoding_name ( const WCHAR encoding)
static

Definition at line 223 of file mxwriter.c.

224 {
225  int min, max, n, c;
226 
227  min = 0;
229 
230  while (min <= max)
231  {
232  n = (min+max)/2;
233 
235  if (!c)
236  return xml_encoding_map[n].enc;
237 
238  if (c > 0)
239  max = n-1;
240  else
241  min = n+1;
242  }
243 
244  return XmlEncoding_Unknown;
245 }
#define max(a, b)
Definition: svc.c:63
GLdouble n
Definition: glext.h:7729
const GLubyte * c
Definition: glext.h:8905
ed encoding
Definition: write.c:2847
#define strcmpiW(s1, s2)
Definition: unicode.h:39
#define ARRAY_SIZE(a)
Definition: main.h:24
#define min(a, b)
Definition: monoChain.cc:55
#define c
Definition: ke_i.h:80
static const struct xml_encoding_data xml_encoding_map[]
Definition: mxwriter.c:88

Referenced by CreateXmlWriterOutputWithEncodingName(), and mxwriter_put_encoding().

◆ reset_output_buffer()

static void reset_output_buffer ( mxwriter This)
inlinestatic

Definition at line 672 of file mxwriter.c.

673 {
675 }
static void close_output_buffer(mxwriter *writer)
Definition: mxwriter.c:460

Referenced by mxwriter_put_encoding(), mxwriter_put_output(), and SAXContentHandler_startDocument().

◆ SAXAttributes_AddRef()

static ULONG WINAPI SAXAttributes_AddRef ( ISAXAttributes *  iface)
static

Definition at line 2949 of file mxwriter.c.

2950 {
2952  return IMXAttributes_AddRef(&This->IMXAttributes_iface);
2953 }
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203

◆ SAXAttributes_create()

HRESULT SAXAttributes_create ( MSXML_VERSION  version,
void **  ppObj 
)

Definition at line 3553 of file mxwriter.c.

3554 {
3555  static const int default_count = 10;
3556  mxattributes *This;
3557 
3558  TRACE("(%p)\n", ppObj);
3559 
3560  This = heap_alloc( sizeof (*This) );
3561  if( !This )
3562  return E_OUTOFMEMORY;
3563 
3564  This->IMXAttributes_iface.lpVtbl = &MXAttributesVtbl;
3565  This->ISAXAttributes_iface.lpVtbl = &SAXAttributesVtbl;
3566  This->IVBSAXAttributes_iface.lpVtbl = &VBSAXAttributesVtbl;
3567  This->ref = 1;
3568 
3569  This->class_version = version;
3570 
3571  This->attr = heap_alloc(default_count*sizeof(mxattribute));
3572  This->length = 0;
3573  This->allocated = default_count;
3574 
3575  *ppObj = &This->IMXAttributes_iface;
3576 
3577  init_dispex(&This->dispex, (IUnknown*)&This->IMXAttributes_iface, &mxattrs_dispex);
3578 
3579  TRACE("returning iface %p\n", *ppObj);
3580 
3581  return S_OK;
3582 }
static const struct IVBSAXAttributesVtbl VBSAXAttributesVtbl
Definition: mxwriter.c:3518
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static const ISAXAttributesVtbl SAXAttributesVtbl
Definition: mxwriter.c:3194
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const WCHAR version[]
Definition: asmname.c:64
#define TRACE(s)
Definition: solgame.cpp:4
static const IMXAttributesVtbl MXAttributesVtbl
Definition: mxwriter.c:2923
#define S_OK
Definition: intsafe.h:59
static dispex_static_data_t mxattrs_dispex
Definition: mxwriter.c:3546
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:940

Referenced by DllGetClassObject().

◆ SAXAttributes_getIndexFromName()

static HRESULT WINAPI SAXAttributes_getIndexFromName ( ISAXAttributes *  iface,
const WCHAR uri,
int  uri_len,
const WCHAR name,
int  len,
int index 
)
static

Definition at line 3048 of file mxwriter.c.

3050 {
3052  int i;
3053 
3054  TRACE("(%p)->(%s:%d %s:%d %p)\n", This, debugstr_wn(uri, uri_len), uri_len,
3055  debugstr_wn(name, len), len, index);
3056 
3057  if (!index && (This->class_version == MSXML_DEFAULT || This->class_version == MSXML3))
3058  return E_POINTER;
3059 
3060  if (!uri || !name || !index) return E_INVALIDARG;
3061 
3062  for (i = 0; i < This->length; i++)
3063  {
3064  if (uri_len != SysStringLen(This->attr[i].uri)) continue;
3065  if (strncmpW(uri, This->attr[i].uri, uri_len)) continue;
3066 
3067  if (len != SysStringLen(This->attr[i].local)) continue;
3068  if (strncmpW(name, This->attr[i].local, len)) continue;
3069 
3070  *index = i;
3071  return S_OK;
3072  }
3073 
3074  return E_INVALIDARG;
3075 }
const char * uri
Definition: sec_mgr.c:1594
WINE_UNICODE_INLINE int strncmpW(const WCHAR *str1, const WCHAR *str2, int n)
Definition: unicode.h:235
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getIndexFromQName()

static HRESULT WINAPI SAXAttributes_getIndexFromQName ( ISAXAttributes *  iface,
const WCHAR qname,
int  len,
int index 
)
static

Definition at line 3077 of file mxwriter.c.

3079 {
3081  int i;
3082 
3083  TRACE("(%p)->(%s:%d %p)\n", This, debugstr_wn(qname, len), len, index);
3084 
3085  if (!index && (This->class_version == MSXML_DEFAULT || This->class_version == MSXML3))
3086  return E_POINTER;
3087 
3088  if (!qname || !index || !len) return E_INVALIDARG;
3089 
3090  for (i = 0; i < This->length; i++)
3091  {
3092  if (len != SysStringLen(This->attr[i].qname)) continue;
3093  if (strncmpW(qname, This->attr[i].qname, len)) continue;
3094 
3095  *index = i;
3096  return S_OK;
3097  }
3098 
3099  return E_INVALIDARG;
3100 }
WINE_UNICODE_INLINE int strncmpW(const WCHAR *str1, const WCHAR *str2, int n)
Definition: unicode.h:235
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getLength()

static HRESULT WINAPI SAXAttributes_getLength ( ISAXAttributes *  iface,
int length 
)
static

Definition at line 2961 of file mxwriter.c.

2962 {
2964  TRACE("(%p)->(%p)\n", This, length);
2965 
2966  if (!length && (This->class_version == MSXML_DEFAULT || This->class_version == MSXML3))
2967  return E_POINTER;
2968 
2969  *length = This->length;
2970 
2971  return S_OK;
2972 }
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getLocalName()

static HRESULT WINAPI SAXAttributes_getLocalName ( ISAXAttributes *  iface,
int  index,
const WCHAR **  name,
int len 
)
static

Definition at line 2990 of file mxwriter.c.

2992 {
2994 
2995  TRACE("(%p)->(%d %p %p)\n", This, index, name, len);
2996 
2997  if (index >= This->length || index < 0) return E_INVALIDARG;
2998  if (!name || !len) return E_POINTER;
2999 
3000  *len = SysStringLen(This->attr[index].local);
3001  *name = This->attr[index].local;
3002 
3003  return S_OK;
3004 }
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
#define index(s, c)
Definition: various.h:29
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getName()

static HRESULT WINAPI SAXAttributes_getName ( ISAXAttributes *  iface,
int  index,
const WCHAR **  uri,
int uri_len,
const WCHAR **  local,
int local_len,
const WCHAR **  qname,
int qname_len 
)
static

Definition at line 3021 of file mxwriter.c.

3023 {
3025 
3026  TRACE("(%p)->(%d %p %p %p %p %p %p)\n", This, index, uri, uri_len, local, local_len, qname, qname_len);
3027 
3028  if (index >= This->length || index < 0)
3029  return E_INVALIDARG;
3030 
3031  if (!uri || !uri_len || !local || !local_len || !qname || !qname_len)
3032  return E_POINTER;
3033 
3034  *uri_len = SysStringLen(This->attr[index].uri);
3035  *uri = This->attr[index].uri;
3036 
3037  *local_len = SysStringLen(This->attr[index].local);
3038  *local = This->attr[index].local;
3039 
3040  *qname_len = SysStringLen(This->attr[index].qname);
3041  *qname = This->attr[index].qname;
3042 
3043  TRACE("(%s, %s, %s)\n", debugstr_w(*uri), debugstr_w(*local), debugstr_w(*qname));
3044 
3045  return S_OK;
3046 }
const char * uri
Definition: sec_mgr.c:1594
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
#define index(s, c)
Definition: various.h:29
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
#define local
Definition: zutil.h:30
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getQName()

static HRESULT WINAPI SAXAttributes_getQName ( ISAXAttributes *  iface,
int  index,
const WCHAR **  qname,
int length 
)
static

Definition at line 3006 of file mxwriter.c.

3007 {
3009 
3010  TRACE("(%p)->(%d %p %p)\n", This, index, qname, length);
3011 
3012  if (index >= This->length) return E_INVALIDARG;
3013  if (!qname || !length) return E_POINTER;
3014 
3015  *qname = This->attr[index].qname;
3016  *length = SysStringLen(This->attr[index].qname);
3017 
3018  return S_OK;
3019 }
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define index(s, c)
Definition: various.h:29
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getType()

static HRESULT WINAPI SAXAttributes_getType ( ISAXAttributes *  iface,
int  index,
const WCHAR **  type,
int len 
)
static

Definition at line 3102 of file mxwriter.c.

3104 {
3106 
3107  TRACE("(%p)->(%d %p %p)\n", This, index, type, len);
3108 
3109  if (index >= This->length) return E_INVALIDARG;
3110 
3111  if ((!type || !len) && (This->class_version == MSXML_DEFAULT || This->class_version == MSXML3))
3112  return E_POINTER;
3113 
3114  *type = This->attr[index].type;
3115  *len = SysStringLen(This->attr[index].type);
3116 
3117  return S_OK;
3118 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
#define index(s, c)
Definition: various.h:29
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getTypeFromName()

static HRESULT WINAPI SAXAttributes_getTypeFromName ( ISAXAttributes *  iface,
const WCHAR pUri,
int  nUri,
const WCHAR pLocalName,
int  nLocalName,
const WCHAR **  pType,
int nType 
)
static

Definition at line 3120 of file mxwriter.c.

3122 {
3124  FIXME("(%p)->(%s:%d %s:%d %p %p): stub\n", This, debugstr_wn(pUri, nUri), nUri,
3125  debugstr_wn(pLocalName, nLocalName), nLocalName, pType, nType);
3126  return E_NOTIMPL;
3127 }
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_wn
Definition: kernel32.h:33
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SAXAttributes_getTypeFromQName()

static HRESULT WINAPI SAXAttributes_getTypeFromQName ( ISAXAttributes *  iface,
const WCHAR pQName,
int  nQName,
const WCHAR **  pType,
int nType 
)
static

Definition at line 3129 of file mxwriter.c.

3131 {
3133  FIXME("(%p)->(%s:%d %p %p): stub\n", This, debugstr_wn(pQName, nQName), nQName, pType, nType);
3134  return E_NOTIMPL;
3135 }
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_wn
Definition: kernel32.h:33
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SAXAttributes_getURI()

static HRESULT WINAPI SAXAttributes_getURI ( ISAXAttributes *  iface,
int  index,
const WCHAR **  uri,
int len 
)
static

Definition at line 2974 of file mxwriter.c.

2976 {
2978 
2979  TRACE("(%p)->(%d %p %p)\n", This, index, uri, len);
2980 
2981  if (index >= This->length || index < 0) return E_INVALIDARG;
2982  if (!uri || !len) return E_POINTER;
2983 
2984  *len = SysStringLen(This->attr[index].uri);
2985  *uri = This->attr[index].uri;
2986 
2987  return S_OK;
2988 }
const char * uri
Definition: sec_mgr.c:1594
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
#define index(s, c)
Definition: various.h:29
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getValue()

static HRESULT WINAPI SAXAttributes_getValue ( ISAXAttributes *  iface,
int  index,
const WCHAR **  value,
int len 
)
static

Definition at line 3137 of file mxwriter.c.

3139 {
3141 
3142  TRACE("(%p)->(%d %p %p)\n", This, index, value, len);
3143 
3144  if (index >= This->length) return E_INVALIDARG;
3145 
3146  if ((!value || !len) && (This->class_version == MSXML_DEFAULT || This->class_version == MSXML3))
3147  return E_POINTER;
3148 
3149  *value = This->attr[index].value;
3150  *len = SysStringLen(This->attr[index].value);
3151 
3152  return S_OK;
3153 }
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
#define index(s, c)
Definition: various.h:29
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:199
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getValueFromName()

static HRESULT WINAPI SAXAttributes_getValueFromName ( ISAXAttributes *  iface,
const WCHAR uri,
int  uri_len,
const WCHAR name,
int  name_len,
const WCHAR **  value,
int value_len 
)
static

Definition at line 3155 of file mxwriter.c.

3157 {
3159  HRESULT hr;
3160  int index;
3161 
3162  TRACE("(%p)->(%s:%d %s:%d %p %p)\n", This, debugstr_wn(uri, uri_len), uri_len,
3163  debugstr_wn(name, name_len), name_len, value, value_len);
3164 
3165  if (!uri || !name || !value || !value_len)
3166  return (This->class_version == MSXML_DEFAULT || This->class_version == MSXML3) ? E_POINTER : E_INVALIDARG;
3167 
3168  hr = ISAXAttributes_getIndexFromName(iface, uri, uri_len, name, name_len, &index);
3169  if (hr == S_OK)
3170  hr = ISAXAttributes_getValue(iface, index, value, value_len);
3171 
3172  return hr;
3173 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1594
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define index(s, c)
Definition: various.h:29
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_getValueFromQName()

static HRESULT WINAPI SAXAttributes_getValueFromQName ( ISAXAttributes *  iface,
const WCHAR qname,
int  qname_len,
const WCHAR **  value,
int value_len 
)
static

Definition at line 3175 of file mxwriter.c.

3177 {
3179  HRESULT hr;
3180  int index;
3181 
3182  TRACE("(%p)->(%s:%d %p %p)\n", This, debugstr_wn(qname, qname_len), qname_len, value, value_len);
3183 
3184  if (!qname || !value || !value_len)
3185  return (This->class_version == MSXML_DEFAULT || This->class_version == MSXML3) ? E_POINTER : E_INVALIDARG;
3186 
3187  hr = ISAXAttributes_getIndexFromQName(iface, qname, qname_len, &index);
3188  if (hr == S_OK)
3189  hr = ISAXAttributes_getValue(iface, index, value, value_len);
3190 
3191  return hr;
3192 }
HRESULT hr
Definition: shlfolder.c:183
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define index(s, c)
Definition: various.h:29
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ SAXAttributes_QueryInterface()

static HRESULT WINAPI SAXAttributes_QueryInterface ( ISAXAttributes *  iface,
REFIID  riid,
void **  ppObj 
)
static

Definition at line 2943 of file mxwriter.c.

2944 {
2946  return IMXAttributes_QueryInterface(&This->IMXAttributes_iface, riid, ppObj);
2947 }
REFIID riid
Definition: precomp.h:44
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203

◆ SAXAttributes_Release()

static ULONG WINAPI SAXAttributes_Release ( ISAXAttributes *  iface)
static

Definition at line 2955 of file mxwriter.c.

2956 {
2958  return IMXAttributes_Release(&This->IMXAttributes_iface);
2959 }
static mxattributes * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: mxwriter.c:203

◆ SAXContentHandler_AddRef()

static ULONG WINAPI SAXContentHandler_AddRef ( ISAXContentHandler *  iface)
static

Definition at line 1172 of file mxwriter.c.

1173 {
1175  return IMXWriter_AddRef(&This->IMXWriter_iface);
1176 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696

◆ SAXContentHandler_characters()

static HRESULT WINAPI SAXContentHandler_characters ( ISAXContentHandler *  iface,
const WCHAR chars,
int  nchars 
)
static

Definition at line 1381 of file mxwriter.c.

1385 {
1387 
1388  TRACE("(%p)->(%s:%d)\n", This, debugstr_wn(chars, nchars), nchars);
1389 
1390  if (!chars) return E_INVALIDARG;
1391 
1393  set_element_name(This, NULL, 0);
1394 
1395  if (!This->cdata)
1396  This->text = TRUE;
1397 
1398  if (nchars)
1399  {
1400  if (This->cdata || This->props[MXWriter_DisableEscaping] == VARIANT_TRUE)
1401  write_output_buffer(This, chars, nchars);
1402  else
1403  {
1404  int len = nchars;
1405  WCHAR *escaped;
1406 
1407  escaped = get_escaped_string(chars, EscapeText, &len);
1408  write_output_buffer(This, escaped, len);
1409  heap_free(escaped);
1410  }
1411  }
1412 
1413  return S_OK;
1414 }
#define TRUE
Definition: types.h:120
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
static void close_element_starttag(mxwriter *writer)
Definition: mxwriter.c:610
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static WCHAR * get_escaped_string(const WCHAR *str, escape_mode mode, int *len)
Definition: mxwriter.c:488
GLenum GLsizei len
Definition: glext.h:6722
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
static HRESULT write_output_buffer(mxwriter *writer, const WCHAR *data, int len)
Definition: mxwriter.c:313
static void set_element_name(mxwriter *This, const WCHAR *name, int len)
Definition: mxwriter.c:652
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ SAXContentHandler_endDocument()

static HRESULT WINAPI SAXContentHandler_endDocument ( ISAXContentHandler *  iface)
static

Definition at line 1226 of file mxwriter.c.

1227 {
1229  TRACE("(%p)\n", This);
1230  This->prop_changed = FALSE;
1231  return flush_output_buffer(This);
1232 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT flush_output_buffer(mxwriter *This)
Definition: mxwriter.c:661

◆ SAXContentHandler_endElement()

static HRESULT WINAPI SAXContentHandler_endElement ( ISAXContentHandler *  iface,
const WCHAR namespaceUri,
int  nnamespaceUri,
const WCHAR local_name,
int  nlocal_name,
const WCHAR QName,
int  nQName 
)
static

Definition at line 1340 of file mxwriter.c.

1348 {
1350 
1351  TRACE("(%p)->(%s:%d %s:%d %s:%d)\n", This, debugstr_wn(namespaceUri, nnamespaceUri), nnamespaceUri,
1352  debugstr_wn(local_name, nlocal_name), nlocal_name, debugstr_wn(QName, nQName), nQName);
1353 
1354  if (((!namespaceUri || !local_name || !QName) && This->class_version != MSXML6) ||
1355  (nQName == -1 && This->class_version == MSXML6))
1356  return E_INVALIDARG;
1357 
1359 
1360  if (This->element)
1361  {
1362  static const WCHAR closeW[] = {'/','>'};
1363  write_output_buffer(This, closeW, 2);
1364  }
1365  else
1366  {
1367  static const WCHAR closetagW[] = {'<','/'};
1368  static const WCHAR gtW[] = {'>'};
1369 
1372  write_output_buffer(This, QName, nQName);
1374  }
1375 
1376  set_element_name(This, NULL, 0);
1377 
1378  return S_OK;
1379 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
static void writer_dec_indent(mxwriter *This)
Definition: mxwriter.c:644
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static void write_node_indent(mxwriter *writer)
Definition: mxwriter.c:617
static const WCHAR gtW[]
Definition: reader.c:94
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
static HRESULT write_output_buffer(mxwriter *writer, const WCHAR *data, int len)
Definition: mxwriter.c:313
static const WCHAR closetagW[]
Definition: mxwriter.c:46
static void set_element_name(mxwriter *This, const WCHAR *name, int len)
Definition: mxwriter.c:652
static BSTR local_name(call_frame_t *frame, int ref)
Definition: engine.c:185

◆ SAXContentHandler_endPrefixMapping()

static HRESULT WINAPI SAXContentHandler_endPrefixMapping ( ISAXContentHandler *  iface,
const WCHAR prefix,
int  nprefix 
)
static

Definition at line 1246 of file mxwriter.c.

1250 {
1252  TRACE("(%p)->(%s)\n", This, debugstr_wn(prefix, nprefix));
1253  return S_OK;
1254 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59

◆ SAXContentHandler_ignorableWhitespace()

static HRESULT WINAPI SAXContentHandler_ignorableWhitespace ( ISAXContentHandler *  iface,
const WCHAR chars,
int  nchars 
)
static

Definition at line 1416 of file mxwriter.c.

1420 {
1422 
1423  TRACE("(%p)->(%s)\n", This, debugstr_wn(chars, nchars));
1424 
1425  if (!chars) return E_INVALIDARG;
1426 
1427  write_output_buffer(This, chars, nchars);
1428 
1429  return S_OK;
1430 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
static HRESULT write_output_buffer(mxwriter *writer, const WCHAR *data, int len)
Definition: mxwriter.c:313

◆ SAXContentHandler_processingInstruction()

static HRESULT WINAPI SAXContentHandler_processingInstruction ( ISAXContentHandler *  iface,
const WCHAR target,
int  ntarget,
const WCHAR data,
int  ndata 
)
static

Definition at line 1432 of file mxwriter.c.

1438 {
1440  static const WCHAR openpiW[] = {'<','?'};
1441  static const WCHAR closepiW[] = {'?','>','\r','\n'};
1442 
1443  TRACE("(%p)->(%s %s)\n", This, debugstr_wn(target, ntarget), debugstr_wn(data, ndata));
1444 
1445  if (!target) return E_INVALIDARG;
1446 
1448  write_output_buffer(This, openpiW, ARRAY_SIZE(openpiW));
1449 
1450  if (*target)
1451  write_output_buffer(This, target, ntarget);
1452 
1453  if (data && *data && ndata)
1454  {
1456  write_output_buffer(This, data, ndata);
1457  }
1458 
1460  This->newline = TRUE;
1461 
1462  return S_OK;
1463 }
#define TRUE
Definition: types.h:120
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR closepiW[]
Definition: writer.c:42
static void write_node_indent(mxwriter *writer)
Definition: mxwriter.c:617
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static const WCHAR spaceW[]
Definition: mxwriter.c:44
#define debugstr_wn
Definition: kernel32.h:33
#define S_OK
Definition: intsafe.h:59
static HRESULT write_output_buffer(mxwriter *writer, const WCHAR *data, int len)
Definition: mxwriter.c:313
#define ARRAY_SIZE(a)
Definition: main.h:24
GLenum target
Definition: glext.h:7315

◆ SAXContentHandler_putDocumentLocator()

static HRESULT WINAPI SAXContentHandler_putDocumentLocator ( ISAXContentHandler *  iface,
ISAXLocator *  locator 
)
static

Definition at line 1184 of file mxwriter.c.

1187 {
1189  FIXME("(%p)->(%p)\n", This, locator);
1190  return E_NOTIMPL;
1191 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SAXContentHandler_QueryInterface()

static HRESULT WINAPI SAXContentHandler_QueryInterface ( ISAXContentHandler *  iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 1163 of file mxwriter.c.

1167 {
1169  return IMXWriter_QueryInterface(&This->IMXWriter_iface, riid, obj);
1170 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
REFIID riid
Definition: precomp.h:44

◆ SAXContentHandler_Release()

static ULONG WINAPI SAXContentHandler_Release ( ISAXContentHandler *  iface)
static

Definition at line 1178 of file mxwriter.c.

1179 {
1181  return IMXWriter_Release(&This->IMXWriter_iface);
1182 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696

◆ SAXContentHandler_skippedEntity()

static HRESULT WINAPI SAXContentHandler_skippedEntity ( ISAXContentHandler *  iface,
const WCHAR name,
int  nname 
)
static

Definition at line 1465 of file mxwriter.c.

1469 {
1471  FIXME("(%p)->(%s)\n", This, debugstr_wn(name, nname));
1472  return E_NOTIMPL;
1473 }
static mxwriter * impl_from_ISAXContentHandler(ISAXContentHandler *iface)
Definition: mxwriter.c:696
#define FIXME(fmt,...)
Definition: