* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+# include <libxml/HTMLtree.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
static const xmlChar xmlns[] = "xmlns";
typedef struct _domattr
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+#include "wininet.h"
+#include "urlmon.h"
+#include "winreg.h"
+#include "shlwapi.h"
+
+#include "wine/debug.h"
+
+#include "msxml_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
struct bsc_t {
IBindStatusCallback IBindStatusCallback_iface;
bsc_OnObjectAvailable
};
-HRESULT create_moniker_from_url(LPCWSTR url, IMoniker **mon)
+HRESULT create_uri(const WCHAR *url, IUri **uri)
{
WCHAR fileUrl[INTERNET_MAX_URL_LENGTH];
TRACE("%s\n", debugstr_w(url));
- if(!PathIsURLW(url))
+ if (!PathIsURLW(url))
{
WCHAR fullpath[MAX_PATH];
- DWORD needed = sizeof(fileUrl)/sizeof(WCHAR);
+ DWORD needed = ARRAY_SIZE(fileUrl);
- if(!PathSearchAndQualifyW(url, fullpath, sizeof(fullpath)/sizeof(WCHAR)))
+ if (!PathSearchAndQualifyW(url, fullpath, ARRAY_SIZE(fullpath)))
{
WARN("can't find path\n");
return E_FAIL;
}
- if(FAILED(UrlCreateFromPathW(fullpath, fileUrl, &needed, 0)))
+ if (FAILED(UrlCreateFromPathW(fullpath, fileUrl, &needed, 0)))
{
ERR("can't create url from path\n");
return E_FAIL;
url = fileUrl;
}
- return CreateURLMonikerEx(NULL, url, mon, 0);
+ return CreateUri(url, Uri_CREATE_ALLOW_RELATIVE | Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, uri);
+}
+
+HRESULT create_moniker_from_url(LPCWSTR url, IMoniker **mon)
+{
+ HRESULT hr;
+ IUri *uri;
+
+ TRACE("%s\n", debugstr_w(url));
+
+ if (FAILED(hr = create_uri(url, &uri)))
+ return hr;
+
+ hr = CreateURLMonikerEx2(NULL, uri, mon, 0);
+ IUri_Release(uri);
+ return hr;
}
HRESULT bind_url(IMoniker *mon, HRESULT (*onDataAvailable)(void*,char*,DWORD),
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct
{
xmlnode node;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct _domcomment
{
xmlnode node;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
-#include <msxml6did.h>
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "ole2.h"
+#include "msxml6.h"
+#include "msxml6did.h"
+#include "wininet.h"
+#include "urlmon.h"
+#include "winreg.h"
+#include "shlwapi.h"
+
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+#include "msxml_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
static CRITICAL_SECTION cs_dispex_static_data;
static CRITICAL_SECTION_DEBUG cs_dispex_static_data_dbg =
heap_free(iter);
}
- for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++)
+ for(i=0; i < ARRAY_SIZE(typeinfos); i++)
if(typeinfos[i])
ITypeInfo_Release(typeinfos[i]);
- for(i=0; i < sizeof(typelib)/sizeof(*typelib); i++)
+ for(i=0; i < ARRAY_SIZE(typelib); i++)
if(typelib[i])
ITypeLib_Release(typelib[i]);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct _domfrag
{
xmlnode node;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct _domdoctype
{
xmlnode node;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
-#include <assert.h>
+#include "config.h"
+#include <stdarg.h>
+#include <assert.h>
#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
# include <libxml/xpathInternals.h>
# include <libxml/xmlsave.h>
# include <libxml/SAX2.h>
# include <libxml/parserInternals.h>
#endif
-#include <olectl.h>
-#include <objsafe.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "ole2.h"
+#include "olectl.h"
+#include "msxml6.h"
+#include "wininet.h"
+#include "winreg.h"
+#include "shlwapi.h"
+#include "ocidl.h"
+#include "objsafe.h"
+
+#include "wine/debug.h"
+
+#include "msxml_private.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
/* not defined in older versions */
#define XML_SAVE_FORMAT 1
#define XML_SAVE_NO_DECL 2
xmlChar const* selectNsStr;
LONG selectNsStr_len;
BOOL XPath;
- WCHAR *url;
+ IUri *uri;
} domdoc_properties;
typedef struct ConnectionPoint ConnectionPoint;
properties->version = version;
properties->XPath = (version == MSXML4 || version == MSXML6);
- /* document url */
- properties->url = NULL;
+ /* document uri */
+ properties->uri = NULL;
return properties;
}
list_add_tail(&pcopy->selectNsList, &new_ns->entry);
}
- if (properties->url)
- {
- int len = strlenW(properties->url);
-
- pcopy->url = CoTaskMemAlloc((len+1)*sizeof(WCHAR));
- memcpy(pcopy->url, properties->url, len*sizeof(WCHAR));
- pcopy->url[len] = 0;
- }
- else
- pcopy->url = NULL;
+ pcopy->uri = properties->uri;
+ if (pcopy->uri)
+ IUri_AddRef(pcopy->uri);
}
return pcopy;
IXMLDOMSchemaCollection2_Release(properties->schemaCache);
clear_selectNsList(&properties->selectNsList);
heap_free((xmlChar*)properties->selectNsStr);
- CoTaskMemFree(properties->url);
+ if (properties->uri)
+ IUri_Release(properties->uri);
heap_free(properties);
}
}
if ( filename )
{
IMoniker *mon;
+ IUri *uri;
- CoTaskMemFree(This->properties->url);
- This->properties->url = NULL;
+ if (This->properties->uri)
+ {
+ IUri_Release(This->properties->uri);
+ This->properties->uri = NULL;
+ }
- hr = create_moniker_from_url( filename, &mon);
+ hr = create_uri(filename, &uri);
+ if (SUCCEEDED(hr))
+ hr = CreateURLMonikerEx2(NULL, uri, &mon, 0);
if ( SUCCEEDED(hr) )
{
hr = domdoc_load_moniker( This, mon );
- if (hr == S_OK)
- IMoniker_GetDisplayName(mon, NULL, NULL, &This->properties->url);
IMoniker_Release(mon);
}
This->error = E_FAIL;
else
{
+ get_doc(This)->name = (char *)xmlchar_from_wcharn(filename, -1, TRUE);
+ This->properties->uri = uri;
hr = This->error = S_OK;
*isSuccessful = VARIANT_TRUE;
}
if (!url)
return E_INVALIDARG;
- if (This->properties->url)
- {
- *url = SysAllocString(This->properties->url);
- if (!*url)
- return E_OUTOFMEMORY;
-
- return S_OK;
- }
- else
+ if (!This->properties->uri)
return return_null_bstr(url);
+
+ return IUri_GetPropertyBSTR(This->properties->uri, Uri_PROPERTY_DISPLAY_URI, url, 0);
}
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct _domimpl
{
DispatchEx dispex;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
static const xmlChar DT_prefix[] = "dt";
static const xmlChar DT_nsURI[] = "urn:schemas-microsoft-com:datatypes";
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct _entityref
{
xmlnode node;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <config.h>
+#define COBJMACROS
+
+#include "config.h"
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
#endif
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-#include <msxml2.h>
-
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml.h"
+#include "msxml2.h"
#include "xmlparser.h"
/* undef the #define in msxml2 so that we can access the v.2 version
independent CLSID as well as the v.3 one. */
#undef CLSID_DOMDocument
-#include <wine/debug.h>
+#include "wine/debug.h"
#include "msxml_private.h"
{
unsigned int i;
- for (i = 0; i < sizeof(clsid_versions_table)/sizeof(struct clsid_version_t); i++)
+ for (i = 0; i < ARRAY_SIZE(clsid_versions_table); i++)
if (IsEqualGUID(clsid, clsid_versions_table[i].clsid))
return clsid_versions_table[i].version;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+#define NONAMELESSUNION
-#include <wingdi.h>
-#include <mshtml.h>
-#include <objsafe.h>
-#include <docobj.h>
+#include "config.h"
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+# include <libxml/encoding.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "wininet.h"
+#include "winreg.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "mshtml.h"
+#include "msxml6.h"
+#include "objsafe.h"
+#include "docobj.h"
+#include "shlwapi.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
+
+#ifdef HAVE_LIBXML2
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
static const WCHAR colspaceW[] = {':',' ',0};
static const WCHAR crlfW[] = {'\r','\n',0};
if (This->request->use_utf8_content)
{
lstrcpyW(ptr, content_type_utf8W);
- ptr += sizeof(content_type_utf8W)/sizeof(WCHAR)-1;
+ ptr += ARRAY_SIZE(content_type_utf8W) - 1;
}
if (base_uri)
ptr += SysStringLen(entry->header);
lstrcpyW(ptr, colspaceW);
- ptr += sizeof(colspaceW)/sizeof(WCHAR)-1;
+ ptr += ARRAY_SIZE(colspaceW) - 1;
lstrcpyW(ptr, entry->value);
ptr += SysStringLen(entry->value);
lstrcpyW(ptr, crlfW);
- ptr += sizeof(crlfW)/sizeof(WCHAR)-1;
+ ptr += ARRAY_SIZE(crlfW) - 1;
}
*add_headers = buff;
entry->value = SysAllocString(value);
/* header length including null terminator */
- This->reqheader_size += SysStringLen(entry->header) + sizeof(colspaceW)/sizeof(WCHAR) +
- SysStringLen(entry->value) + sizeof(crlfW)/sizeof(WCHAR) - 1;
+ This->reqheader_size += SysStringLen(entry->header) + ARRAY_SIZE(colspaceW) +
+ SysStringLen(entry->value) + ARRAY_SIZE(crlfW) - 1;
list_add_head(&This->reqheaders, &entry->entry);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "config.h"
+#include "wine/port.h"
-#include <wine/port.h>
+#define COBJMACROS
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
# ifdef SONAME_LIBXSLT
# ifdef HAVE_LIBXSLT_PATTERN_H
# include <libxslt/pattern.h>
# include <libxslt/xsltutils.h>
# include <libxslt/variables.h>
# include <libxslt/xsltInternals.h>
+# include <libxslt/documents.h>
+# include <libxslt/extensions.h>
+# include <libxslt/extra.h>
# endif
#endif
-#include <rpcproxy.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "rpcproxy.h"
+#include "msxml.h"
+#include "msxml6.h"
-#include <wine/library.h>
+#include "wine/unicode.h"
+#include "wine/debug.h"
+#include "wine/library.h"
+
+#include "msxml_private.h"
HINSTANCE MSXML_hInstance = NULL;
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
void wineXmlCallbackLog(char const* caller, xmlErrorLevel lvl, char const* msg, va_list ap)
{
enum __wine_debug_class dbcl;
char buff[200];
- const int max_size = sizeof(buff) / sizeof(buff[0]);
+ const int max_size = ARRAY_SIZE(buff);
int len;
switch (lvl)
DECL_FUNCPTR(xsltCleanupGlobals);
DECL_FUNCPTR(xsltFreeStylesheet);
DECL_FUNCPTR(xsltFreeTransformContext);
+DECL_FUNCPTR(xsltFunctionNodeSet);
DECL_FUNCPTR(xsltNewTransformContext);
DECL_FUNCPTR(xsltNextImport);
DECL_FUNCPTR(xsltParseStylesheetDoc);
DECL_FUNCPTR(xsltQuoteUserParams);
+DECL_FUNCPTR(xsltRegisterExtModuleFunction);
DECL_FUNCPTR(xsltSaveResultTo);
+DECL_FUNCPTR(xsltSetLoaderFunc);
# undef DECL_FUNCPTR
#endif
LOAD_FUNCPTR(xsltCleanupGlobals, 1);
LOAD_FUNCPTR(xsltFreeStylesheet, 1);
LOAD_FUNCPTR(xsltFreeTransformContext, 1);
+ LOAD_FUNCPTR(xsltFunctionNodeSet, 1);
LOAD_FUNCPTR(xsltNewTransformContext, 1);
LOAD_FUNCPTR(xsltNextImport, 1);
LOAD_FUNCPTR(xsltParseStylesheetDoc, 1);
LOAD_FUNCPTR(xsltQuoteUserParams, 1);
+ LOAD_FUNCPTR(xsltRegisterExtModuleFunction, 1);
LOAD_FUNCPTR(xsltSaveResultTo, 1);
+ LOAD_FUNCPTR(xsltSetLoaderFunc, 1);
#undef LOAD_FUNCPTR
if (pxsltInit)
pxsltInit();
+
+ pxsltSetLoaderFunc(xslt_doc_default_loader);
+ pxsltRegisterExtModuleFunction(
+ (const xmlChar *)"node-set",
+ (const xmlChar *)"urn:schemas-microsoft-com:xslt",
+ pxsltFunctionNodeSet);
+
return;
sym_not_found:
#ifndef __MSXML_PRIVATE__
#define __MSXML_PRIVATE__
-#include <dispex.h>
+#include "dispex.h"
-#include <wine/unicode.h>
-#include <wine/list.h>
+#include "wine/unicode.h"
+#include "wine/heap.h"
+#include "wine/list.h"
#ifndef __WINE_CONFIG_H
# error You must include config.h to use this header
#endif
+#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
+
typedef enum {
MSXML_DEFAULT = 0,
MSXML2 = 20,
/* memory allocation functions */
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
-{
- return HeapAlloc(GetProcessHeap(), 0, size);
-}
-
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size)
-{
- return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
-}
-
-static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t size)
-{
- return HeapReAlloc(GetProcessHeap(), 0, mem, size);
-}
-
static inline void* __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t size)
{
return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, size);
}
-static inline BOOL heap_free(void *mem)
-{
- return HeapFree(GetProcessHeap(), 0, mem);
-}
-
static inline LPWSTR heap_strdupW(LPCWSTR str)
{
LPWSTR ret = NULL;
extern xmlChar* tagName_to_XPath(const BSTR tagName) DECLSPEC_HIDDEN;
+#ifdef SONAME_LIBXSLT
+# include <libxslt/documents.h>
+extern xmlDocPtr xslt_doc_default_loader(const xmlChar *uri, xmlDictPtr dict, int options,
+ void *_ctxt, xsltLoadType type) DECLSPEC_HIDDEN;
+#endif /* SONAME_LIBXSLT */
+
static inline BSTR bstr_from_xmlChar(const xmlChar *str)
{
BSTR ret = NULL;
return ret;
}
-static inline xmlChar *xmlchar_from_wcharn(const WCHAR *str, int nchars)
+static inline xmlChar *xmlchar_from_wcharn(const WCHAR *str, int nchars, BOOL use_xml_alloc)
{
xmlChar *xmlstr;
DWORD len = WideCharToMultiByte( CP_UTF8, 0, str, nchars, NULL, 0, NULL, NULL );
- xmlstr = heap_alloc( len+1 );
+ xmlstr = use_xml_alloc ? xmlMalloc( len + 1 ) : heap_alloc( len + 1 );
if ( xmlstr )
{
WideCharToMultiByte( CP_UTF8, 0, str, nchars, (LPSTR) xmlstr, len+1, NULL, NULL );
static inline xmlChar *xmlchar_from_wchar( const WCHAR *str )
{
- return xmlchar_from_wcharn(str, -1);
+ return xmlchar_from_wcharn(str, -1, FALSE);
}
static inline xmlChar *heap_strdupxmlChar(const xmlChar *str)
typedef struct bsc_t bsc_t;
HRESULT create_moniker_from_url(LPCWSTR, IMoniker**) DECLSPEC_HIDDEN;
+HRESULT create_uri(const WCHAR *, IUri **) DECLSPEC_HIDDEN;
HRESULT bind_url(IMoniker*, HRESULT (*onDataAvailable)(void*,char*,DWORD), void*, bsc_t**) DECLSPEC_HIDDEN;
HRESULT detach_bsc(bsc_t*) DECLSPEC_HIDDEN;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+# include <libxml/encoding.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
struct ns
{
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "ole2.h"
+
+#include "msxml6.h"
+
+#include "wine/debug.h"
+#include "wine/list.h"
+
+#include "msxml_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
static const WCHAR emptyW[] = {0};
static const WCHAR spaceW[] = {' '};
int min, max, n, c;
min = 0;
- max = sizeof(xml_encoding_map)/sizeof(struct xml_encoding_data) - 1;
+ max = ARRAY_SIZE(xml_encoding_map) - 1;
while (min <= max)
{
{
case '<':
memcpy(ptr, ltW, sizeof(ltW));
- ptr += sizeof(ltW)/sizeof(WCHAR);
+ ptr += ARRAY_SIZE(ltW);
break;
case '&':
memcpy(ptr, ampW, sizeof(ampW));
- ptr += sizeof(ampW)/sizeof(WCHAR);
+ ptr += ARRAY_SIZE(ampW);
break;
case '>':
memcpy(ptr, gtW, sizeof(gtW));
- ptr += sizeof(gtW)/sizeof(WCHAR);
+ ptr += ARRAY_SIZE(gtW);
break;
case '"':
if (mode == EscapeValue)
{
memcpy(ptr, equotW, sizeof(equotW));
- ptr += sizeof(equotW)/sizeof(WCHAR);
+ ptr += ARRAY_SIZE(equotW);
break;
}
/* fallthrough for text mode */
static const WCHAR noW[] = {'n','o','\"','?','>'};
/* version */
- write_output_buffer(writer, versionW, sizeof(versionW)/sizeof(WCHAR));
+ write_output_buffer(writer, versionW, ARRAY_SIZE(versionW));
write_output_buffer_quoted(writer, writer->version, -1);
/* encoding */
- write_output_buffer(writer, encodingW, sizeof(encodingW)/sizeof(WCHAR));
+ write_output_buffer(writer, encodingW, ARRAY_SIZE(encodingW));
if (writer->dest)
write_output_buffer(writer, writer->encoding, -1);
else
- write_output_buffer(writer, utf16W, sizeof(utf16W)/sizeof(WCHAR) - 1);
+ write_output_buffer(writer, utf16W, ARRAY_SIZE(utf16W) - 1);
write_output_buffer(writer, quotW, 1);
/* standalone */
- write_output_buffer(writer, standaloneW, sizeof(standaloneW)/sizeof(WCHAR));
+ write_output_buffer(writer, standaloneW, ARRAY_SIZE(standaloneW));
if (writer->props[MXWriter_Standalone] == VARIANT_TRUE)
- write_output_buffer(writer, yesW, sizeof(yesW)/sizeof(WCHAR));
+ write_output_buffer(writer, yesW, ARRAY_SIZE(yesW));
else
- write_output_buffer(writer, noW, sizeof(noW)/sizeof(WCHAR));
+ write_output_buffer(writer, noW, ARRAY_SIZE(noW));
- write_output_buffer(writer, crlfW, sizeof(crlfW)/sizeof(WCHAR));
+ write_output_buffer(writer, crlfW, ARRAY_SIZE(crlfW));
writer->newline = TRUE;
}
/* This is to workaround PI output logic that always puts newline chars,
document prolog PI does that too. */
if (!writer->newline)
- write_output_buffer(writer, crlfW, sizeof(crlfW)/sizeof(WCHAR));
+ write_output_buffer(writer, crlfW, ARRAY_SIZE(crlfW));
while (indent--)
write_output_buffer(writer, tabW, 1);
if (!target) return E_INVALIDARG;
write_node_indent(This);
- write_output_buffer(This, openpiW, sizeof(openpiW)/sizeof(WCHAR));
+ write_output_buffer(This, openpiW, ARRAY_SIZE(openpiW));
if (*target)
write_output_buffer(This, target, ntarget);
write_output_buffer(This, data, ndata);
}
- write_output_buffer(This, closepiW, sizeof(closepiW)/sizeof(WCHAR));
+ write_output_buffer(This, closepiW, ARRAY_SIZE(closepiW));
This->newline = TRUE;
return S_OK;
if (!name) return E_INVALIDARG;
- write_output_buffer(This, doctypeW, sizeof(doctypeW)/sizeof(WCHAR));
+ write_output_buffer(This, doctypeW, ARRAY_SIZE(doctypeW));
if (*name)
{
if (publicId)
{
- write_output_buffer(This, publicW, sizeof(publicW)/sizeof(WCHAR));
+ write_output_buffer(This, publicW, ARRAY_SIZE(publicW));
write_output_buffer_quoted(This, publicId, publicId_len);
if (!systemId) return E_INVALIDARG;
}
else if (systemId)
{
- write_output_buffer(This, systemW, sizeof(systemW)/sizeof(WCHAR));
+ write_output_buffer(This, systemW, ARRAY_SIZE(systemW));
write_output_buffer_quoted(This, systemId, systemId_len);
if (*systemId)
write_output_buffer(This, spaceW, 1);
}
- write_output_buffer(This, openintW, sizeof(openintW)/sizeof(WCHAR));
+ write_output_buffer(This, openintW, ARRAY_SIZE(openintW));
return S_OK;
}
TRACE("(%p)\n", This);
- write_output_buffer(This, closedtdW, sizeof(closedtdW)/sizeof(WCHAR));
+ write_output_buffer(This, closedtdW, ARRAY_SIZE(closedtdW));
return S_OK;
}
TRACE("(%p)\n", This);
write_node_indent(This);
- write_output_buffer(This, scdataW, sizeof(scdataW)/sizeof(WCHAR));
+ write_output_buffer(This, scdataW, ARRAY_SIZE(scdataW));
This->cdata = TRUE;
return S_OK;
TRACE("(%p)\n", This);
- write_output_buffer(This, ecdataW, sizeof(ecdataW)/sizeof(WCHAR));
+ write_output_buffer(This, ecdataW, ARRAY_SIZE(ecdataW));
This->cdata = FALSE;
return S_OK;
close_element_starttag(This);
write_node_indent(This);
- write_output_buffer(This, copenW, sizeof(copenW)/sizeof(WCHAR));
+ write_output_buffer(This, copenW, ARRAY_SIZE(copenW));
if (nchars)
write_output_buffer(This, chars, nchars);
- write_output_buffer(This, ccloseW, sizeof(ccloseW)/sizeof(WCHAR));
+ write_output_buffer(This, ccloseW, ARRAY_SIZE(ccloseW));
return S_OK;
}
if (!name || !model) return E_INVALIDARG;
- write_output_buffer(This, elementW, sizeof(elementW)/sizeof(WCHAR));
+ write_output_buffer(This, elementW, ARRAY_SIZE(elementW));
if (n_name) {
write_output_buffer(This, name, n_name);
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
}
if (n_model)
write_output_buffer(This, model, n_model);
- write_output_buffer(This, closetagW, sizeof(closetagW)/sizeof(WCHAR));
+ write_output_buffer(This, closetagW, ARRAY_SIZE(closetagW));
return S_OK;
}
debugstr_wn(attr, n_attr), n_attr, debugstr_wn(type, n_type), n_type, debugstr_wn(Default, n_default), n_default,
debugstr_wn(value, n_value), n_value);
- write_output_buffer(This, attlistW, sizeof(attlistW)/sizeof(WCHAR));
+ write_output_buffer(This, attlistW, ARRAY_SIZE(attlistW));
if (n_element) {
write_output_buffer(This, element, n_element);
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
}
if (n_attr) {
write_output_buffer(This, attr, n_attr);
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
}
if (n_type) {
write_output_buffer(This, type, n_type);
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
}
if (n_default) {
write_output_buffer(This, Default, n_default);
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
}
if (n_value)
write_output_buffer_quoted(This, value, n_value);
- write_output_buffer(This, closetagW, sizeof(closetagW)/sizeof(WCHAR));
+ write_output_buffer(This, closetagW, ARRAY_SIZE(closetagW));
return S_OK;
}
if (!name || !value) return E_INVALIDARG;
- write_output_buffer(This, entityW, sizeof(entityW)/sizeof(WCHAR));
+ write_output_buffer(This, entityW, ARRAY_SIZE(entityW));
if (n_name) {
write_output_buffer(This, name, n_name);
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
}
if (n_value)
write_output_buffer_quoted(This, value, n_value);
- write_output_buffer(This, closetagW, sizeof(closetagW)/sizeof(WCHAR));
+ write_output_buffer(This, closetagW, ARRAY_SIZE(closetagW));
return S_OK;
}
if (!name || !systemId) return E_INVALIDARG;
- write_output_buffer(This, entityW, sizeof(entityW)/sizeof(WCHAR));
+ write_output_buffer(This, entityW, ARRAY_SIZE(entityW));
if (n_name) {
write_output_buffer(This, name, n_name);
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
}
if (publicId)
{
- write_output_buffer(This, publicW, sizeof(publicW)/sizeof(WCHAR));
+ write_output_buffer(This, publicW, ARRAY_SIZE(publicW));
write_output_buffer_quoted(This, publicId, n_publicId);
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
write_output_buffer_quoted(This, systemId, n_systemId);
}
else
{
- write_output_buffer(This, systemW, sizeof(systemW)/sizeof(WCHAR));
+ write_output_buffer(This, systemW, ARRAY_SIZE(systemW));
write_output_buffer_quoted(This, systemId, n_systemId);
}
- write_output_buffer(This, closetagW, sizeof(closetagW)/sizeof(WCHAR));
+ write_output_buffer(This, closetagW, ARRAY_SIZE(closetagW));
return S_OK;
}
if (!name || !n_name)
return E_INVALIDARG;
- write_output_buffer(This, notationW, sizeof(notationW)/sizeof(WCHAR));
+ write_output_buffer(This, notationW, ARRAY_SIZE(notationW));
write_output_buffer(This, name, n_name);
if (!publicid && !systemid)
return E_INVALIDARG;
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
if (publicid)
{
- write_output_buffer(This, publicW, sizeof(publicW)/sizeof(WCHAR));
+ write_output_buffer(This, publicW, ARRAY_SIZE(publicW));
write_output_buffer_quoted(This, publicid, n_publicid);
if (systemid)
{
- write_output_buffer(This, spaceW, sizeof(spaceW)/sizeof(WCHAR));
+ write_output_buffer(This, spaceW, ARRAY_SIZE(spaceW));
write_output_buffer_quoted(This, systemid, n_systemid);
}
}
else
{
- write_output_buffer(This, systemW, sizeof(systemW)/sizeof(WCHAR));
+ write_output_buffer(This, systemW, ARRAY_SIZE(systemW));
write_output_buffer_quoted(This, systemid, n_systemid);
}
- write_output_buffer(This, closetagW, sizeof(closetagW)/sizeof(WCHAR));
+ write_output_buffer(This, closetagW, ARRAY_SIZE(closetagW));
return S_OK;
}
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "config.h"
+
+#define COBJMACROS
+
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/parserInternals.h>
+# include <libxml/xmlerror.h>
# include <libxml/HTMLtree.h>
# ifdef SONAME_LIBXSLT
# ifdef HAVE_LIBXSLT_PATTERN_H
# include <libxslt/variables.h>
# include <libxslt/xsltutils.h>
# include <libxslt/xsltInternals.h>
+# include <libxslt/documents.h>
# endif
#endif
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
+
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
#ifdef SONAME_LIBXSLT
extern void* libxslt_handle;
# define MAKE_FUNCPTR(f) extern typeof(f) * p##f
return hr;
}
-#endif
+struct import_buffer
+{
+ char *data;
+ int cur;
+ int len;
+};
+
+static int XMLCALL import_loader_io_read(void *context, char *out, int len)
+{
+ struct import_buffer *buffer = (struct import_buffer *)context;
+
+ TRACE("%p, %p, %d\n", context, out, len);
+
+ if (buffer->cur == buffer->len)
+ return 0;
+
+ len = min(len, buffer->len - buffer->cur);
+ memcpy(out, &buffer->data[buffer->cur], len);
+ buffer->cur += len;
+
+ TRACE("read %d\n", len);
+
+ return len;
+}
+
+static int XMLCALL import_loader_io_close(void * context)
+{
+ struct import_buffer *buffer = (struct import_buffer *)context;
+
+ TRACE("%p\n", context);
+
+ heap_free(buffer->data);
+ heap_free(buffer);
+ return 0;
+}
+
+static HRESULT import_loader_onDataAvailable(void *ctxt, char *ptr, DWORD len)
+{
+ xmlParserInputPtr *input = (xmlParserInputPtr *)ctxt;
+ xmlParserInputBufferPtr inputbuffer;
+ struct import_buffer *buffer;
+
+ buffer = heap_alloc(sizeof(*buffer));
+
+ buffer->data = heap_alloc(len);
+ memcpy(buffer->data, ptr, len);
+ buffer->cur = 0;
+ buffer->len = len;
+
+ inputbuffer = xmlParserInputBufferCreateIO(import_loader_io_read, import_loader_io_close, buffer,
+ XML_CHAR_ENCODING_NONE);
+ *input = xmlNewIOInputStream(ctxt, inputbuffer, XML_CHAR_ENCODING_NONE);
+ if (!*input)
+ xmlFreeParserInputBuffer(inputbuffer);
+
+ return *input ? S_OK : E_FAIL;
+}
+
+static HRESULT xslt_doc_get_uri(const xmlChar *uri, void *_ctxt, xsltLoadType type, IUri **doc_uri)
+{
+ xsltStylesheetPtr style = (xsltStylesheetPtr)_ctxt;
+ IUri *href_uri;
+ HRESULT hr;
+ BSTR uriW;
+
+ *doc_uri = NULL;
+
+ uriW = bstr_from_xmlChar(uri);
+ hr = CreateUri(uriW, Uri_CREATE_ALLOW_RELATIVE | Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, &href_uri);
+ SysFreeString(uriW);
+ if (FAILED(hr))
+ {
+ WARN("Failed to create href uri, %#x.\n", hr);
+ return hr;
+ }
+
+ if (type == XSLT_LOAD_STYLESHEET && style->doc && style->doc->name)
+ {
+ IUri *base_uri;
+ BSTR baseuriW;
+
+ baseuriW = bstr_from_xmlChar((xmlChar *)style->doc->name);
+ hr = CreateUri(baseuriW, Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, &base_uri);
+ SysFreeString(baseuriW);
+ if (FAILED(hr))
+ {
+ WARN("Failed to create base uri, %#x.\n", hr);
+ return hr;
+ }
+
+ hr = CoInternetCombineIUri(base_uri, href_uri, 0, doc_uri, 0);
+ IUri_Release(base_uri);
+ if (FAILED(hr))
+ WARN("Failed to combine uris, %#x.\n", hr);
+ }
+ else
+ {
+ *doc_uri = href_uri;
+ IUri_AddRef(*doc_uri);
+ }
+
+ IUri_Release(href_uri);
+
+ return hr;
+}
+
+xmlDocPtr xslt_doc_default_loader(const xmlChar *uri, xmlDictPtr dict, int options,
+ void *_ctxt, xsltLoadType type)
+{
+ IUri *import_uri = NULL;
+ xmlParserInputPtr input;
+ xmlParserCtxtPtr pctxt;
+ xmlDocPtr doc = NULL;
+ IMoniker *moniker;
+ HRESULT hr;
+ bsc_t *bsc;
+ BSTR uriW;
+
+ TRACE("%s, %p, %#x, %p, %d\n", debugstr_a((const char *)uri), dict, options, _ctxt, type);
+
+ pctxt = xmlNewParserCtxt();
+ if (!pctxt)
+ return NULL;
+
+ if (dict && pctxt->dict)
+ {
+ xmlDictFree(pctxt->dict);
+ pctxt->dict = NULL;
+ }
+
+ if (dict)
+ {
+ pctxt->dict = dict;
+ xmlDictReference(pctxt->dict);
+ }
+
+ xmlCtxtUseOptions(pctxt, options);
+
+ hr = xslt_doc_get_uri(uri, _ctxt, type, &import_uri);
+ if (FAILED(hr))
+ goto failed;
+
+ hr = CreateURLMonikerEx2(NULL, import_uri, &moniker, 0);
+ if (FAILED(hr))
+ goto failed;
+
+ hr = bind_url(moniker, import_loader_onDataAvailable, &input, &bsc);
+ IMoniker_Release(moniker);
+ if (FAILED(hr))
+ goto failed;
+
+ if (FAILED(detach_bsc(bsc)))
+ goto failed;
+
+ if (!input)
+ goto failed;
+
+ inputPush(pctxt, input);
+ xmlParseDocument(pctxt);
+
+ if (pctxt->wellFormed)
+ {
+ doc = pctxt->myDoc;
+ /* Set imported uri, to give nested imports a chance. */
+ if (IUri_GetPropertyBSTR(import_uri, Uri_PROPERTY_ABSOLUTE_URI, &uriW, 0) == S_OK)
+ {
+ doc->name = (char *)xmlchar_from_wcharn(uriW, SysStringLen(uriW), TRUE);
+ SysFreeString(uriW);
+ }
+ }
+ else
+ {
+ doc = NULL;
+ xmlFreeDoc(pctxt->myDoc);
+ pctxt->myDoc = NULL;
+ }
+
+failed:
+ xmlFreeParserCtxt(pctxt);
+ if (import_uri)
+ IUri_Release(import_uri);
+
+ return doc;
+}
+
+#endif /* SONAME_LIBXSLT */
HRESULT node_transform_node_params(const xmlnode *This, IXMLDOMNode *stylesheet, BSTR *p,
ISequentialStream *stream, const struct xslprocessor_params *params)
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
-#include <msxml2did.h>
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+#include "msxml2did.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
/* This file implements the object returned by childNodes property. Note that this is
* not the IXMLDOMNodeList returned by XPath queries - it's implemented in selection.c.
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct
{
DispatchEx dispex;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "config.h"
-#include <msxml2did.h>
+#define COBJMACROS
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "ole2.h"
+#include "msxml6.h"
+#include "msxml2did.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
+
+#ifdef HAVE_LIBXML2
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef struct
{
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef struct
{
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct _dom_pi
{
xmlnode node;
+
#ifndef _MSXML3_PCH_
#define _MSXML3_PCH_
#include "msxml_private.h"
-WINE_DEFAULT_DEBUG_CHANNEL(msxml);
-
-#endif /* _MSXML3_PCH_ */
+#endif /* !_MSXML3_PCH_ */
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
-#include "precomp.h"
+#include "config.h"
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+# include <libxml/SAX2.h>
# include <libxml/parserInternals.h>
#endif
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "ole2.h"
+#include "msxml6.h"
+#include "wininet.h"
+#include "urlmon.h"
+#include "winreg.h"
+#include "shlwapi.h"
+
+#include "wine/debug.h"
+
+#include "msxml_private.h"
+
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef enum
{
FeatureUnknown = 0,
'/','n','a','m','e','s','p','a','c','e','-','p','r','e','f','i','x','e','s',0
};
+static const WCHAR ExhaustiveErrorsW[] = {
+ 'e','x','h','a','u','s','t','i','v','e','-','e','r','r','o','r','s',0
+};
+
+static const WCHAR SchemaValidationW[] = {
+ 's','c','h','e','m','a','-','v','a','l','i','d','a','t','i','o','n',0
+};
+
struct saxreader_feature_pair
{
saxreader_feature feature;
};
static const struct saxreader_feature_pair saxreader_feature_map[] = {
+ { ExhaustiveErrors, ExhaustiveErrorsW },
{ ExternalGeneralEntities, FeatureExternalGeneralEntitiesW },
{ ExternalParameterEntities, FeatureExternalParameterEntitiesW },
{ LexicalHandlerParEntities, FeatureLexicalHandlerParEntitiesW },
{ NamespacePrefixes, FeatureNamespacePrefixesW },
{ Namespaces, FeatureNamespacesW },
- { ProhibitDTD, FeatureProhibitDTDW }
+ { ProhibitDTD, FeatureProhibitDTDW },
+ { SchemaValidation, SchemaValidationW },
};
static saxreader_feature get_saxreader_feature(const WCHAR *name)
int min, max, n, c;
min = 0;
- max = sizeof(saxreader_feature_map)/sizeof(struct saxreader_feature_pair) - 1;
+ max = ARRAY_SIZE(saxreader_feature_map) - 1;
while (min <= max)
{
{
if (!pool->pool)
{
- pool->pool = HeapAlloc(GetProcessHeap(), 0, 16 * sizeof(*pool->pool));
+ pool->pool = heap_alloc(16 * sizeof(*pool->pool));
if (!pool->pool)
return FALSE;
}
else if (pool->index == pool->len)
{
- BSTR *realloc = HeapReAlloc(GetProcessHeap(), 0, pool->pool, pool->len * 2 * sizeof(*realloc));
+ BSTR *realloc = heap_realloc(pool->pool, pool->len * 2 * sizeof(*realloc));
if (!realloc)
return FALSE;
for (i = 0; i < pool->index; i++)
SysFreeString(pool->pool[i]);
- HeapFree(GetProcessHeap(), 0, pool->pool);
+ heap_free(pool->pool);
pool->pool = NULL;
pool->index = pool->len = 0;
{
WCHAR msg[1024];
if(!FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM,
- NULL, hr, 0, msg, sizeof(msg)/sizeof(msg[0]), NULL))
+ NULL, hr, 0, msg, ARRAY_SIZE(msg), NULL))
{
FIXME("MSXML errors not yet supported.\n");
msg[0] = '\0';
WCHAR *src;
/* leave first '&' from a reference as a value */
- src = dest + (sizeof(ampescW)/sizeof(WCHAR) - 1);
+ src = dest + ARRAY_SIZE(ampescW) - 1;
dest++;
/* move together with null terminator */
TRACE("(%p)->(%s %p)\n", This, debugstr_w(feature_name), value);
feature = get_saxreader_feature(feature_name);
- if (feature == Namespaces || feature == NamespacePrefixes)
+
+ if (This->version < MSXML4 && (feature == ExhaustiveErrors || feature == SchemaValidation))
+ return E_INVALIDARG;
+
+ if (feature == Namespaces ||
+ feature == NamespacePrefixes ||
+ feature == ExhaustiveErrors ||
+ feature == SchemaValidation)
return get_feature_value(This, feature, value);
FIXME("(%p)->(%s %p) stub\n", This, debugstr_w(feature_name), value);
feature = get_saxreader_feature(feature_name);
/* accepted cases */
- if ((feature == ExternalGeneralEntities && value == VARIANT_FALSE) ||
- (feature == ExternalParameterEntities && value == VARIANT_FALSE) ||
+ if ((feature == ExhaustiveErrors && value == VARIANT_FALSE) ||
+ (feature == SchemaValidation && value == VARIANT_FALSE) ||
feature == Namespaces ||
feature == NamespacePrefixes)
{
return set_feature_value(This, feature, value);
}
- if (feature == LexicalHandlerParEntities || feature == ProhibitDTD)
+ if (feature == LexicalHandlerParEntities ||
+ feature == ProhibitDTD ||
+ feature == ExternalGeneralEntities ||
+ feature == ExternalParameterEntities)
{
FIXME("(%p)->(%s %x) stub\n", This, debugstr_w(feature_name), value);
return set_feature_value(This, feature, value);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
-#include <assert.h>
+#include "config.h"
+#include <assert.h>
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
+# include <libxml/xmlerror.h>
+# include <libxml/tree.h>
# include <libxml/xmlschemas.h>
# include <libxml/schemasInternals.h>
+# include <libxml/hash.h>
+# include <libxml/parser.h>
# include <libxml/parserInternals.h>
+# include <libxml/xmlIO.h>
+# include <libxml/xmlversion.h>
# include <libxml/xpath.h>
#endif
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "wine/debug.h"
+
+#include "msxml_private.h"
+
+#ifdef HAVE_LIBXML2
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
/* We use a chained hashtable, which can hold any number of schemas
* TODO: grow/shrink hashtable depending on load factor
* TODO: implement read-only where appropriate
/* This is just the number of buckets, should be prime */
#define DEFAULT_HASHTABLE_SIZE 17
-#ifdef HAVE_LIBXML2
-
xmlDocPtr XDR_to_XSD_doc(xmlDocPtr xdr_doc, xmlChar const* nsURI);
static const xmlChar XSD_schema[] = "schema";
/* Resource is loaded as raw data,
* need a null-terminated string */
while (buf[datatypes_len - 1] != '>') datatypes_len--;
- datatypes_src = HeapAlloc(GetProcessHeap(), 0, datatypes_len + 1);
+ datatypes_src = heap_alloc(datatypes_len + 1);
memcpy(datatypes_src, buf, datatypes_len);
datatypes_src[datatypes_len] = 0;
void schemasCleanup(void)
{
xmlSchemaFree(datatypes_schema);
- HeapFree(GetProcessHeap(), 0, datatypes_src);
+ heap_free(datatypes_src);
xmlSetExternalEntityLoader(_external_entity_loader);
}
static inline schema_cache* impl_from_IXMLDOMSchemaCollection(IXMLDOMSchemaCollection* iface)
{
- return CONTAINING_RECORD(iface, schema_cache, IXMLDOMSchemaCollection2_iface);
+ return CONTAINING_RECORD((IXMLDOMSchemaCollection2 *)iface, schema_cache, IXMLDOMSchemaCollection2_iface);
}
static inline schema_cache* unsafe_impl_from_IXMLDOMSchemaCollection(IXMLDOMSchemaCollection *iface)
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+#include "config.h"
+
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+# include <libxml/xpath.h>
# include <libxml/xpathInternals.h>
#endif
-#include <msxml2did.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+#include "msxml2did.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
/* This file implements the object returned by a XPath query. Note that this is
* not the IXMLDOMNodeList returned by childNodes - it's implemented in nodelist.c.
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
int registerNamespaces(xmlXPathContextPtr ctxt);
xmlChar* XSLPattern_to_XPath(xmlXPathContextPtr ctxt, xmlChar const* xslpat_str);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
-#include <initguid.h>
-#include <asptlb.h>
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "initguid.h"
+#include "asptlb.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef struct
{
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+#include "config.h"
+
+#include <stdarg.h>
#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
# include <libxml/parserInternals.h>
+# include <libxml/xmlerror.h>
#endif
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "wine/debug.h"
+
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct _domtext
{
xmlnode node;
TRACE("(%p)->(%p)\n", This, p);
- return node_get_xml(&This->node, FALSE, p);
+ return node_get_xml(&This->node, TRUE, p);
}
static HRESULT WINAPI domtext_transformNode(
BSTR data)
{
domtext *This = impl_from_IXMLDOMText( iface );
- static const WCHAR rnW[] = {'\r','\n',0};
+ BSTR normalized_data = NULL;
+ HRESULT hr;
+ size_t i, j;
TRACE("(%p)->(%s)\n", This, debugstr_w(data));
- if (data && !strcmpW(rnW, data))
- This->node.node->name = xmlStringTextNoenc;
- else
- domtext_reset_noenc(This);
- return node_set_content(&This->node, data);
+ if (data)
+ {
+ /* normalize line endings */
+ normalized_data = SysAllocStringLen(NULL, SysStringLen(data));
+ if (!normalized_data) return E_OUTOFMEMORY;
+ for (i = 0, j = 0; data[i]; i++)
+ {
+ if (data[i] == '\r')
+ {
+ if (data[i + 1] == '\n') i++; /* change \r\n to just \n */
+ normalized_data[j++] = '\n'; /* change \r by itself to \n */
+ }
+ else
+ normalized_data[j++] = data[i];
+ }
+ normalized_data[j] = 0;
+ }
+
+ domtext_reset_noenc(This);
+ hr = node_set_content(&This->node, normalized_data);
+
+ SysFreeString(normalized_data);
+ return hr;
}
static HRESULT WINAPI domtext_get_length(
* Therefore we roll our own.
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-
#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
/*
* First include the version 2 headers so that we don't redefine their
* uuids - they're already in libuuid
*/
-#include <msxml.h>
+#include "msxml.h"
/* Now we can initialize the rest of the uuids */
-#include <initguid.h>
-#include <msxml2.h>
+#include "initguid.h"
+#include "msxml2.h"
/*
* Note that because of a #define in msxml2.h, we end up initializing
#define WINE_PRODUCTVERSION_STR "8.90.1101.0"
#define WINE_EXTRAVALUES VALUE "OLESelfRegister",""
-#include <wine/wine_common_ver.rc>
+#include "wine/wine_common_ver.rc"
/* @makedep: msxml3.manifest */
WINE_MANIFEST 24 msxml3.manifest
*/
-#include "precomp.h"
+#include "config.h"
#include <assert.h>
-
#ifdef HAVE_LIBXML2
# include <libxml/tree.h>
#endif
+#include "wine/debug.h"
+
/* Both XDR and XSD are valid XML
* We just convert the doc tree, no need for a parser.
*/
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
static const xmlChar DT_prefix[] = "dt";
static const xmlChar DT_href[] = "urn:schemas-microsoft-com:datatypes";
static const xmlChar XDR_href[] = "urn:schemas-microsoft-com:xml-data";
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+#include "wininet.h"
+#include "winreg.h"
+#include "shlwapi.h"
+#include "ocidl.h"
+
+#include "wine/debug.h"
+
+#include "msxml_private.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
/* FIXME: IXMLDocument needs to implement
* - IXMLError
* - IPersistMoniker
if (!PathIsURLW(p))
{
WCHAR fullpath[MAX_PATH];
- DWORD needed = sizeof(url) / sizeof(WCHAR);
+ DWORD needed = ARRAY_SIZE(url);
- if (!PathSearchAndQualifyW(p, fullpath, sizeof(fullpath) / sizeof(WCHAR)))
+ if (!PathSearchAndQualifyW(p, fullpath, ARRAY_SIZE(fullpath)))
{
ERR("can't find path\n");
return E_FAIL;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#define COBJMACROS
+
+#include "config.h"
+
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+#include "ocidl.h"
+
+#include "wine/debug.h"
+
+#include "msxml_private.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
static HRESULT XMLElementCollection_create( xmlNodePtr node, LPVOID *ppObj );
/**********************************************************************
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
-#include "precomp.h"
+#include "config.h"
-#include <initguid.h>
+#include <stdarg.h>
+#ifdef HAVE_LIBXML2
+# include <libxml/parser.h>
+# include <libxml/xmlerror.h>
+# include <libxml/HTMLtree.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "msxml6.h"
+
+#include "msxml_private.h"
+
+#include "initguid.h"
#include "xmlparser.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct _xmlparser
{
IXMLParser IXMLParser_iface;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "config.h"
+#include <stdarg.h>
+
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#ifdef HAVE_LIBXML2
+#include <libxml/parser.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "ole2.h"
+#include "msxml6.h"
+#ifdef __REACTOS__
#include <wingdi.h>
-#include <mshtml.h>
-#include <mshtmhst.h>
-#include <perhist.h>
+#endif
+#include "mshtml.h"
+#include "mshtmhst.h"
+#include "perhist.h"
+#include "docobj.h"
+
+#include "wine/debug.h"
+
+#include "msxml_private.h"
#ifdef HAVE_LIBXML2
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
typedef struct
{
IPersistMoniker IPersistMoniker_iface;
/* TODO: fix parsing processing instruction value */
if((p = strstrW(V_BSTR(&var), hrefW))) {
- p += sizeof(hrefW)/sizeof(WCHAR)-1;
+ p += ARRAY_SIZE(hrefW) - 1;
if(*p!='\'' && *p!='\"') p = NULL;
else {
href = p+1;
#include <libxml/xmlstring.h>
#include <libxml/xpath.h>
-#include <windef.h>
-//#include "winnt.h"
+#include "windef.h"
+#include "winnt.h"
typedef struct _parser_param {
void* yyscanner;
-/* A Bison parser, made by GNU Bison 3.0.2. */
+/* A Bison parser, made by GNU Bison 3.0. */
/* Bison implementation for Yacc-like parsers in C
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.0.2"
+#define YYBISON_VERSION "3.0"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Copy the first part of user declarations. */
#line 21 "xslpattern.y" /* yacc.c:339 */
-#include "precomp.h"
-
-#include <wine/port.h>
+#include "config.h"
+#include "wine/port.h"
#ifdef HAVE_LIBXML2
#include "xslpattern.h"
#include <libxml/xpathInternals.h>
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
static const xmlChar NameTest_mod_pre[] = "*[name()='";
static const xmlChar NameTest_mod_post[] = "']";
#line 115 "xslpattern.tab.c" /* yacc.c:339 */
-# ifndef YY_NULLPTR
+# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
+# define YY_NULL nullptr
# else
-# define YY_NULLPTR 0
+# define YY_NULL 0
# endif
# endif
# define YYERROR_VERBOSE 0
#endif
-
+/* In a future release of Bison, this section will be replaced
+ by #include "xslpattern.tab.h". */
+#ifndef YY_XSLPATTERN_E_REACTOSSYNC_GCC_DLL_WIN32_MSXML3_XSLPATTERN_TAB_H_INCLUDED
+# define YY_XSLPATTERN_E_REACTOSSYNC_GCC_DLL_WIN32_MSXML3_XSLPATTERN_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
int xslpattern_parse (parser_param* p, void* scanner);
-
+#endif /* !YY_XSLPATTERN_E_REACTOSSYNC_GCC_DLL_WIN32_MSXML3_XSLPATTERN_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
-#line 191 "xslpattern.tab.c" /* yacc.c:358 */
+#line 194 "xslpattern.tab.c" /* yacc.c:358 */
#ifdef short
# undef short
# endif
#endif
-#ifndef YY_ATTRIBUTE
-# if (defined __GNUC__ \
- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
-# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
-# else
-# define YY_ATTRIBUTE(Spec) /* empty */
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE_PURE
-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
-#endif
-
-#ifndef YY_ATTRIBUTE_UNUSED
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
-#endif
-
-#if !defined _Noreturn \
- && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
-# if defined _MSC_VER && 1200 <= _MSC_VER
-# define _Noreturn __declspec (noreturn)
-# else
-# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if (! defined __GNUC__ || __GNUC__ < 2 \
+ || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
+# define __attribute__(Spec) /* empty */
# endif
#endif
"PrimaryExpr", "FunctionCall", "Arguments", "Argument", "UnionExpr",
"PathExpr", "FilterExpr", "OrExpr", "BoolOrExpr", "AndExpr",
"BoolAndExpr", "EqualityExpr", "BoolEqualityExpr", "RelationalExpr",
- "BoolRelationalExpr", "UnaryExpr", "BoolUnaryExpr", "AllExpr", YY_NULLPTR
+ "BoolRelationalExpr", "UnaryExpr", "BoolUnaryExpr", "AllExpr", YY_NULL
};
#endif
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULLPTR;
+ const char *yyformat = YY_NULL;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
{
p->out = (yyvsp[0]);
}
-#line 1401 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1385 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 5:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1413 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1397 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 6:
TRACE("Got UnprefixedName: \"%s\"\n", (yyvsp[0]));
(yyval)=(yyvsp[0]);
}
-#line 1422 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1406 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 9:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1433 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1417 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 10:
TRACE("Got AbsoluteLocationPath: \"/\"\n");
(yyval)=xmlStrdup(U("/"));
}
-#line 1442 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1426 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 13:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1454 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1438 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 15:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1467 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1451 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 16:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1478 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1462 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 17:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1489 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1473 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 21:
(yyval)=(yyvsp[-1]);
(yyval)=xmlStrcat((yyval),U("::"));
}
-#line 1499 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1483 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 22:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1510 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1494 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 23:
TRACE("Got All attributes pattern: \"@*\"\n");
(yyval)=xmlStrdup(U("@*"));
}
-#line 1519 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1503 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 26:
TRACE("Got NameTest: \"*\"\n");
(yyval)=xmlStrdup(U("*"));
}
-#line 1528 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1512 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 27:
(yyval)=(yyvsp[-2]);
(yyval)=xmlStrcat((yyval),U(":*"));
}
-#line 1538 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1522 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 28:
if (!registeredNsURI)
(yyval)=xmlStrcat((yyval),NameTest_mod_post);
}
-#line 1561 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1545 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 29:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),NameTest_mod_post);
}
-#line 1572 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1556 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 30:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1582 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1566 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 32:
xmlFree((yyvsp[-1]));
(yyval)=xmlStrcat((yyval),U("]"));
}
-#line 1594 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1578 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 33:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1604 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1588 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 37:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1615 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1599 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 38:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1627 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1611 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 39:
TRACE("Got AbbreviatedStep: \"..\"\n");
(yyval)=xmlStrdup(U(".."));
}
-#line 1636 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1620 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 40:
TRACE("Got AbbreviatedStep: \".\"\n");
(yyval)=xmlStrdup(U("."));
}
-#line 1645 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1629 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 48:
xmlFree((yyvsp[-1]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 1657 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1641 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 49:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1669 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1653 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 52:
(yyval)=xmlStrcat((yyval),U(")"));
}
}
-#line 1732 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1716 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 53:
(yyval)=xmlStrcat((yyval),U("()"));
}
}
-#line 1766 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1750 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 54:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1777 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1761 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 58:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1789 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1773 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 60:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1801 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1785 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 61:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1813 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1797 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 64:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1824 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1808 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 67:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1836 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1820 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 70:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1848 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1832 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 73:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1860 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1844 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 74:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 1875 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1859 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 75:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1887 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1871 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 76:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 1902 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1886 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 79:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1914 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1898 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 80:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 1929 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1913 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 81:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1941 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1925 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 82:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 1956 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1940 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 83:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1968 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1952 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 84:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 1983 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1967 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 85:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 1995 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1979 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 86:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2010 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 1994 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 89:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2022 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2006 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 90:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2034 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2018 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 91:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2046 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2030 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 92:
FIXME("Unrecognized $all$ expression - ignoring\n");
(yyval)=xmlStrdup(U(""));
}
-#line 2055 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2039 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 93:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 2066 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2050 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 94:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 2077 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2061 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 95:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 2088 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2072 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 96:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 2099 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2083 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 97:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 2110 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2094 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 98:
(yyval)=xmlStrcat((yyval),(yyvsp[0]));
xmlFree((yyvsp[0]));
}
-#line 2121 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2105 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 99:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2135 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2119 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 100:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2149 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2133 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 101:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2163 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2147 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 102:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2177 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2161 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 103:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2191 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2175 "xslpattern.tab.c" /* yacc.c:1646 */
break;
case 104:
xmlFree((yyvsp[0]));
(yyval)=xmlStrcat((yyval),U(")"));
}
-#line 2205 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2189 "xslpattern.tab.c" /* yacc.c:1646 */
break;
-#line 2209 "xslpattern.tab.c" /* yacc.c:1646 */
+#line 2193 "xslpattern.tab.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
-/* A Bison parser, made by GNU Bison 3.0.2. */
+/* A Bison parser, made by GNU Bison 3.0. */
/* Bison interface for Yacc-like parsers in C
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_XSLPATTERN_XSLPATTERN_TAB_H_INCLUDED
-# define YY_XSLPATTERN_XSLPATTERN_TAB_H_INCLUDED
+#ifndef YY_XSLPATTERN_E_REACTOSSYNC_GCC_DLL_WIN32_MSXML3_XSLPATTERN_TAB_H_INCLUDED
+# define YY_XSLPATTERN_E_REACTOSSYNC_GCC_DLL_WIN32_MSXML3_XSLPATTERN_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
int xslpattern_parse (parser_param* p, void* scanner);
-#endif /* !YY_XSLPATTERN_XSLPATTERN_TAB_H_INCLUDED */
+#endif /* !YY_XSLPATTERN_E_REACTOSSYNC_GCC_DLL_WIN32_MSXML3_XSLPATTERN_TAB_H_INCLUDED */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* begin standard C headers. */
#include <stdio.h>
-//#include <string.h>
-//#include <errno.h>
-//#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
/* end standard C headers. */
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
YY_BUFFER_STATE xslpattern__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE xslpattern__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE xslpattern__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE xslpattern__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *xslpattern_alloc (yy_size_t ,yyscan_t yyscanner );
void *xslpattern_realloc (void *,yy_size_t ,yyscan_t yyscanner );
/* Begin user sect3 */
-#define xslpattern_wrap(n) 1
+#define xslpattern_wrap(yyscanner) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#line 22 "xslpattern.l"
-#include "precomp.h"
+#include "config.h"
#include "wine/port.h"
#ifdef HAVE_LIBXML2
#include "xslpattern.h"
#include "xslpattern.tab.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
#define SCAN xslpattern_get_extra(yyscanner)
/* [3.4] Booleans
* ||, &&, $foo$ are XSLPattern only */
/* [3.7] Lexical Structure */
-#line 576 "xslpattern.yy.c"
+#line 568 "xslpattern.yy.c"
#define INITIAL 0
*/
#include <unistd.h>
#endif
-
+
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
void xslpattern_set_out (FILE * out_str ,yyscan_t yyscanner );
-int xslpattern_get_leng (yyscan_t yyscanner );
+yy_size_t xslpattern_get_leng (yyscan_t yyscanner );
char *xslpattern_get_text (yyscan_t yyscanner );
void xslpattern_set_lineno (int line_number ,yyscan_t yyscanner );
+int xslpattern_get_column (yyscan_t yyscanner );
+
+void xslpattern_set_column (int column_no ,yyscan_t yyscanner );
+
YYSTYPE * xslpattern_get_lval (yyscan_t yyscanner );
void xslpattern_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
#line 113 "xslpattern.l"
-#line 815 "xslpattern.yy.c"
+#line 806 "xslpattern.yy.c"
yylval = yylval_param;
#line 153 "xslpattern.l"
ECHO;
YY_BREAK
-#line 1088 "xslpattern.yy.c"
+#line 1079 "xslpattern.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 95);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
*/
static void xslpattern_ensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE xslpattern__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE xslpattern__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int xslpattern_get_leng (yyscan_t yyscanner)
+yy_size_t xslpattern_get_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "xslpattern_set_lineno called with no buffer" , yyscanner);
+ YY_FATAL_ERROR( "xslpattern_set_lineno called with no buffer" );
yylineno = line_number;
}
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "xslpattern_set_column called with no buffer" , yyscanner);
+ YY_FATAL_ERROR( "xslpattern_set_column called with no buffer" );
yycolumn = column_no;
}
#define YYTABLES_NAME "yytables"
-#line 153 "xslpattern.l"
+#line 152 "xslpattern.l"
--- /dev/null
+#ifndef xslpattern_HEADER_H
+#define xslpattern_HEADER_H 1
+#define xslpattern_IN_HEADER 1
+
+#line 6 "xslpattern.yy.h"
+
+#line 8 "xslpattern.yy.h"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 37
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* An opaque pointer. */
+#ifndef YY_TYPEDEF_YY_SCANNER_T
+#define YY_TYPEDEF_YY_SCANNER_T
+typedef void* yyscan_t;
+#endif
+
+/* For convenience, these vars (plus the bison vars far below)
+ are macros in the reentrant scanner. */
+#define yyin yyg->yyin_r
+#define yyout yyg->yyout_r
+#define yyextra yyg->yyextra_r
+#define yyleng yyg->yyleng_r
+#define yytext yyg->yytext_r
+#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
+#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
+#define yy_flex_debug yyg->yy_flex_debug_r
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ yy_size_t yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+void xslpattern_restart (FILE *input_file ,yyscan_t yyscanner );
+void xslpattern__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+YY_BUFFER_STATE xslpattern__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
+void xslpattern__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void xslpattern__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void xslpattern_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+void xslpattern_pop_buffer_state (yyscan_t yyscanner );
+
+YY_BUFFER_STATE xslpattern__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
+YY_BUFFER_STATE xslpattern__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
+YY_BUFFER_STATE xslpattern__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+
+void *xslpattern_alloc (yy_size_t ,yyscan_t yyscanner );
+void *xslpattern_realloc (void *,yy_size_t ,yyscan_t yyscanner );
+void xslpattern_free (void * ,yyscan_t yyscanner );
+
+/* Begin user sect3 */
+
+#define xslpattern_wrap(yyscanner) 1
+#define YY_SKIP_YYWRAP
+
+#define yytext_ptr yytext_r
+
+#ifdef YY_HEADER_EXPORT_START_CONDITIONS
+#define INITIAL 0
+
+#endif
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+int xslpattern_lex_init (yyscan_t* scanner);
+
+int xslpattern_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int xslpattern_lex_destroy (yyscan_t yyscanner );
+
+int xslpattern_get_debug (yyscan_t yyscanner );
+
+void xslpattern_set_debug (int debug_flag ,yyscan_t yyscanner );
+
+YY_EXTRA_TYPE xslpattern_get_extra (yyscan_t yyscanner );
+
+void xslpattern_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+
+FILE *xslpattern_get_in (yyscan_t yyscanner );
+
+void xslpattern_set_in (FILE * in_str ,yyscan_t yyscanner );
+
+FILE *xslpattern_get_out (yyscan_t yyscanner );
+
+void xslpattern_set_out (FILE * out_str ,yyscan_t yyscanner );
+
+yy_size_t xslpattern_get_leng (yyscan_t yyscanner );
+
+char *xslpattern_get_text (yyscan_t yyscanner );
+
+int xslpattern_get_lineno (yyscan_t yyscanner );
+
+void xslpattern_set_lineno (int line_number ,yyscan_t yyscanner );
+
+int xslpattern_get_column (yyscan_t yyscanner );
+
+void xslpattern_set_column (int column_no ,yyscan_t yyscanner );
+
+YYSTYPE * xslpattern_get_lval (yyscan_t yyscanner );
+
+void xslpattern_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int xslpattern_wrap (yyscan_t yyscanner );
+#else
+extern int xslpattern_wrap (yyscan_t yyscanner );
+#endif
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+#endif
+
+#ifndef YY_NO_INPUT
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int xslpattern_lex \
+ (YYSTYPE * yylval_param ,yyscan_t yyscanner);
+
+#define YY_DECL int xslpattern_lex \
+ (YYSTYPE * yylval_param , yyscan_t yyscanner)
+#endif /* !YY_DECL */
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+#undef YY_NEW_FILE
+#undef YY_FLUSH_BUFFER
+#undef yy_set_bol
+#undef yy_new_buffer
+#undef yy_set_interactive
+#undef YY_DO_BEFORE_ACTION
+
+#ifdef YY_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
+#endif
+
+#line 152 "xslpattern.l"
+
+
+#line 345 "xslpattern.yy.h"
+#undef xslpattern_IN_HEADER
+#endif /* xslpattern_HEADER_H */
reactos/dll/win32/msvidc32 # Synced to WineStaging-3.3
reactos/dll/win32/msxml # Synced to WineStaging-3.3
reactos/dll/win32/msxml2 # Synced to WineStaging-3.3
-reactos/dll/win32/msxml3 # Synced to Wine-3.0
+reactos/dll/win32/msxml3 # Synced to WineStaging-3.3
reactos/dll/win32/msxml4 # Synced to WineStaging-2.9
reactos/dll/win32/msxml6 # Synced to WineStaging-2.9
reactos/dll/win32/nddeapi # Synced to WineStaging-2.9