[MSXML3] Sync with Wine Staging 3.3. CORE-14434
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 20 Mar 2018 11:28:36 +0000 (12:28 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 20 Mar 2018 11:28:36 +0000 (12:28 +0100)
41 files changed:
dll/win32/msxml3/attribute.c
dll/win32/msxml3/bsc.c
dll/win32/msxml3/cdata.c
dll/win32/msxml3/comment.c
dll/win32/msxml3/dispex.c
dll/win32/msxml3/docfrag.c
dll/win32/msxml3/doctype.c
dll/win32/msxml3/domdoc.c
dll/win32/msxml3/domimpl.c
dll/win32/msxml3/element.c
dll/win32/msxml3/entityref.c
dll/win32/msxml3/factory.c
dll/win32/msxml3/httprequest.c
dll/win32/msxml3/main.c
dll/win32/msxml3/msxml_private.h
dll/win32/msxml3/mxnamespace.c
dll/win32/msxml3/mxwriter.c
dll/win32/msxml3/node.c
dll/win32/msxml3/nodelist.c
dll/win32/msxml3/nodemap.c
dll/win32/msxml3/parseerror.c
dll/win32/msxml3/pi.c
dll/win32/msxml3/precomp.h
dll/win32/msxml3/saxreader.c
dll/win32/msxml3/schema.c
dll/win32/msxml3/selection.c
dll/win32/msxml3/stylesheet.c
dll/win32/msxml3/text.c
dll/win32/msxml3/uuid.c
dll/win32/msxml3/version.rc
dll/win32/msxml3/xdr.c
dll/win32/msxml3/xmldoc.c
dll/win32/msxml3/xmlelem.c
dll/win32/msxml3/xmlparser.c
dll/win32/msxml3/xmlview.c
dll/win32/msxml3/xslpattern.h
dll/win32/msxml3/xslpattern.tab.c
dll/win32/msxml3/xslpattern.tab.h
dll/win32/msxml3/xslpattern.yy.c
dll/win32/msxml3/xslpattern.yy.h [new file with mode: 0644]
media/doc/README.WINE

index 707e596..637615b 100644 (file)
  * 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
index 9e148cb..df4cf37 100644 (file)
  * 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;
@@ -217,24 +242,24 @@ static const struct IBindStatusCallbackVtbl bsc_vtbl =
     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;
@@ -242,7 +267,22 @@ HRESULT create_moniker_from_url(LPCWSTR url, IMoniker **mon)
         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),
index 91e9047..c255b1b 100644 (file)
  * 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;
index 6df3082..0317c4f 100644 (file)
  * 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;
index e425084..bd29a21 100644 (file)
  * 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 =
@@ -183,11 +208,11 @@ void release_typelib(void)
         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]);
 
index 11534c7..b2dd3e5 100644 (file)
  * 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;
index 2a1b963..79d74d9 100644 (file)
  * 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;
index bb08f25..ddd7565 100644 (file)
  * 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
@@ -66,7 +86,7 @@ typedef struct {
     xmlChar const* selectNsStr;
     LONG selectNsStr_len;
     BOOL XPath;
-    WCHAR *url;
+    IUri *uri;
 } domdoc_properties;
 
 typedef struct ConnectionPoint ConnectionPoint;
@@ -278,8 +298,8 @@ static domdoc_properties *create_properties(MSXML_VERSION version)
     properties->version = version;
     properties->XPath = (version == MSXML4 || version == MSXML6);
 
-    /* document url */
-    properties->url = NULL;
+    /* document uri */
+    properties->uri = NULL;
 
     return properties;
 }
@@ -315,16 +335,9 @@ static domdoc_properties* copy_properties(domdoc_properties const* 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;
@@ -338,7 +351,8 @@ static void free_properties(domdoc_properties* properties)
             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);
     }
 }
@@ -2273,16 +2287,20 @@ static HRESULT WINAPI domdoc_load(
     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);
         }
 
@@ -2290,6 +2308,8 @@ static HRESULT WINAPI domdoc_load(
             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;
         }
@@ -2354,16 +2374,10 @@ static HRESULT WINAPI domdoc_get_url(
     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);
 }
 
 
index a18070a..74223d5 100644 (file)
  * 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;
index 5addf33..6e00aa0 100644 (file)
  * 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";
 
index 4946d70..5d5d424 100644 (file)
  * 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;
index 3a01490..445cfbf 100644 (file)
  * 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"
 
@@ -100,7 +100,7 @@ static MSXML_VERSION get_msxml_version(const GUID *clsid)
 {
     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;
 
index 56bc51a..40a9764 100644 (file)
  * 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};
@@ -492,7 +516,7 @@ static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate *ifac
     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)
@@ -511,13 +535,13 @@ static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate *ifac
         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;
@@ -1006,8 +1030,8 @@ static HRESULT httprequest_setRequestHeader(httprequest *This, BSTR header, BSTR
     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);
 
index 3184ff1..debd84e 100644 (file)
  * 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)
@@ -155,11 +174,14 @@ DECL_FUNCPTR(xsltApplyStylesheetUser);
 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
 
@@ -181,15 +203,25 @@ static void init_libxslt(void)
     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:
index 447df8d..d703927 100644 (file)
 #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,
@@ -164,31 +167,11 @@ const IID *get_riid_from_tid(enum tid_t tid) DECLSPEC_HIDDEN;
 
 /* 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;
@@ -379,6 +362,12 @@ extern BSTR EnsureCorrectEOL(BSTR) DECLSPEC_HIDDEN;
 
 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;
@@ -395,12 +384,12 @@ static inline BSTR bstr_from_xmlChar(const xmlChar *str)
     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 );
@@ -411,7 +400,7 @@ static inline xmlChar *xmlchar_from_wcharn(const WCHAR *str, int nchars)
 
 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)
@@ -544,6 +533,7 @@ static inline const CLSID* SchemaCache_version(MSXML_VERSION v)
 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;
 
index e41d1a4..dc6ff9c 100644 (file)
  * 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
 {
index 9d68e8c..10be250 100644 (file)
  * 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[] = {' '};
@@ -206,7 +225,7 @@ static xml_encoding parse_encoding_name(const WCHAR *encoding)
     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)
     {
@@ -496,21 +515,21 @@ static WCHAR *get_escaped_string(const WCHAR *str, escape_mode mode, int *len)
         {
         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 */
@@ -538,26 +557,26 @@ static void write_prolog_buffer(mxwriter *writer)
     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;
 }
 
@@ -609,7 +628,7 @@ static void write_node_indent(mxwriter *writer)
     /* 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);
 
@@ -1426,7 +1445,7 @@ static HRESULT WINAPI SAXContentHandler_processingInstruction(
     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);
@@ -1437,7 +1456,7 @@ static HRESULT WINAPI SAXContentHandler_processingInstruction(
         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;
@@ -1505,7 +1524,7 @@ static HRESULT WINAPI SAXLexicalHandler_startDTD(ISAXLexicalHandler *iface,
 
     if (!name) return E_INVALIDARG;
 
-    write_output_buffer(This, doctypeW, sizeof(doctypeW)/sizeof(WCHAR));
+    write_output_buffer(This, doctypeW, ARRAY_SIZE(doctypeW));
 
     if (*name)
     {
@@ -1515,7 +1534,7 @@ static HRESULT WINAPI SAXLexicalHandler_startDTD(ISAXLexicalHandler *iface,
 
     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;
@@ -1530,13 +1549,13 @@ static HRESULT WINAPI SAXLexicalHandler_startDTD(ISAXLexicalHandler *iface,
     }
     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;
 }
@@ -1548,7 +1567,7 @@ static HRESULT WINAPI SAXLexicalHandler_endDTD(ISAXLexicalHandler *iface)
 
     TRACE("(%p)\n", This);
 
-    write_output_buffer(This, closedtdW, sizeof(closedtdW)/sizeof(WCHAR));
+    write_output_buffer(This, closedtdW, ARRAY_SIZE(closedtdW));
 
     return S_OK;
 }
@@ -1575,7 +1594,7 @@ static HRESULT WINAPI SAXLexicalHandler_startCDATA(ISAXLexicalHandler *iface)
     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;
@@ -1588,7 +1607,7 @@ static HRESULT WINAPI SAXLexicalHandler_endCDATA(ISAXLexicalHandler *iface)
 
     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;
@@ -1607,10 +1626,10 @@ static HRESULT WINAPI SAXLexicalHandler_comment(ISAXLexicalHandler *iface, const
     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;
 }
@@ -1660,14 +1679,14 @@ static HRESULT WINAPI SAXDeclHandler_elementDecl(ISAXDeclHandler *iface,
 
     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;
 }
@@ -1685,31 +1704,31 @@ static HRESULT WINAPI SAXDeclHandler_attributeDecl(ISAXDeclHandler *iface,
         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;
 }
@@ -1724,16 +1743,16 @@ static HRESULT WINAPI SAXDeclHandler_internalEntityDecl(ISAXDeclHandler *iface,
 
     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;
 }
@@ -1749,26 +1768,26 @@ static HRESULT WINAPI SAXDeclHandler_externalEntityDecl(ISAXDeclHandler *iface,
 
     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;
 }
@@ -2280,30 +2299,30 @@ static HRESULT WINAPI SAXDTDHandler_notationDecl(ISAXDTDHandler *iface,
     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;
 }
index 2e22d2f..bcb4181 100644 (file)
  * 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
@@ -1294,7 +1315,192 @@ static HRESULT node_transform_write_to_stream(xsltStylesheetPtr style, xmlDocPtr
     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)
index f523570..5241521 100644 (file)
  * 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.
@@ -33,6 +50,8 @@
 
 #ifdef HAVE_LIBXML2
 
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
 typedef struct
 {
     DispatchEx dispex;
index 3090d88..a9fef47 100644 (file)
  * 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
 {
index 13fcb97..438c9eb 100644 (file)
  * 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
 {
index 5f0f983..cea9570 100644 (file)
  * 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;
index d272c70..cd365bd 100644 (file)
@@ -1,3 +1,4 @@
+
 #ifndef _MSXML3_PCH_
 #define _MSXML3_PCH_
 
@@ -26,6 +27,4 @@
 
 #include "msxml_private.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(msxml);
-
-#endif /* _MSXML3_PCH_ */
+#endif /* !_MSXML3_PCH_ */
index 5c8923c..04fab81 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+#define COBJMACROS
 
-#include "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,
@@ -78,6 +100,14 @@ static const WCHAR FeatureNamespacePrefixesW[] = {
     '/','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;
@@ -85,12 +115,14 @@ struct saxreader_feature_pair
 };
 
 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)
@@ -98,7 +130,7 @@ 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)
     {
@@ -539,7 +571,7 @@ static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry)
 {
     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;
 
@@ -548,7 +580,7 @@ static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry)
     }
     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;
@@ -568,7 +600,7 @@ static void free_bstr_pool(struct bstrpool *pool)
     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;
@@ -646,7 +678,7 @@ static void format_error_message_from_id(saxlocator *This, HRESULT hr)
     {
         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';
@@ -1388,7 +1420,7 @@ static BSTR saxreader_get_unescaped_value(const xmlChar *buf, int len)
         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 */
@@ -3194,7 +3226,14 @@ static HRESULT WINAPI isaxxmlreader_getFeature(
     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);
@@ -3214,15 +3253,18 @@ static HRESULT WINAPI isaxxmlreader_putFeature(
     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);
index 2c76151..d603d74 100644 (file)
  * 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
@@ -38,8 +60,6 @@
 /* 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";
@@ -729,7 +749,7 @@ void schemasInit(void)
     /* 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;
 
@@ -743,7 +763,7 @@ void schemasInit(void)
 void schemasCleanup(void)
 {
     xmlSchemaFree(datatypes_schema);
-    HeapFree(GetProcessHeap(), 0, datatypes_src);
+    heap_free(datatypes_src);
     xmlSetExternalEntityLoader(_external_entity_loader);
 }
 
@@ -789,7 +809,7 @@ static inline schema_cache* impl_from_IXMLDOMSchemaCollection2(IXMLDOMSchemaColl
 
 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)
index b0fccb3..b7c560a 100644 (file)
  * 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.
@@ -39,6 +54,8 @@
 
 #ifdef HAVE_LIBXML2
 
+WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
 int registerNamespaces(xmlXPathContextPtr ctxt);
 xmlChar* XSLPattern_to_XPath(xmlXPathContextPtr ctxt, xmlChar const* xslpat_str);
 
index eb6358f..9863ed7 100644 (file)
  * 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
 {
index 41f8061..abd89db 100644 (file)
  * 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;
@@ -505,7 +522,7 @@ static HRESULT WINAPI domtext_get_xml(
 
     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(
@@ -599,15 +616,35 @@ static HRESULT WINAPI domtext_put_data(
     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(
index f0d83b4..4abbe5e 100644 (file)
  * 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
index 3cc9aa8..cfb07bf 100644 (file)
@@ -22,7 +22,7 @@
 #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
index 101e7f3..b5e91bc 100644 (file)
  */
 
 
-#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";
index 34aa8da..d0c65a4 100644 (file)
  * 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
@@ -350,9 +374,9 @@ static HRESULT WINAPI xmldoc_put_URL(IXMLDocument *iface, BSTR p)
     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;
index f356c24..96b2007 100644 (file)
  * 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 );
 
 /**********************************************************************
index 74709c4..6fcdb82 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+#define COBJMACROS
 
-#include "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;
index c2aaaaa..4460412 100644 (file)
  * 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;
@@ -415,7 +437,7 @@ static inline HRESULT handle_xml_load(BindStatusCallback *This)
 
     /* 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;
index 699112e..7b3ee2c 100644 (file)
@@ -33,8 +33,8 @@
 #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;
index 66c8dd9..3fd70c2 100644 (file)
@@ -1,4 +1,4 @@
-/* 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
 
@@ -44,7 +44,7 @@
 #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[] = "']";
@@ -110,11 +113,11 @@ static void xslpattern_error(parser_param* param, void const* scanner, char cons
 
 #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
 
@@ -126,7 +129,10 @@ static void xslpattern_error(parser_param* param, void const* scanner, char cons
 # 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
@@ -180,11 +186,11 @@ typedef int YYSTYPE;
 
 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
@@ -241,30 +247,11 @@ typedef short int yytype_int16;
 # 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
 
@@ -518,7 +505,7 @@ static const char *const yytname[] =
   "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
 
@@ -991,11 +978,11 @@ static int
 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
@@ -1052,7 +1039,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
                   }
                 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;
@@ -1394,7 +1381,7 @@ yyreduce:
     {
                                 p->out = (yyvsp[0]);
                             }
-#line 1401 "xslpattern.tab.c" /* yacc.c:1646  */
+#line 1385 "xslpattern.tab.c" /* yacc.c:1646  */
     break;
 
   case 5:
@@ -1406,7 +1393,7 @@ yyreduce:
                                 (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:
@@ -1415,7 +1402,7 @@ yyreduce:
                                 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:
@@ -1426,7 +1413,7 @@ yyreduce:
                                 (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:
@@ -1435,7 +1422,7 @@ yyreduce:
                                 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:
@@ -1447,7 +1434,7 @@ yyreduce:
                                 (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:
@@ -1460,7 +1447,7 @@ yyreduce:
                                 (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:
@@ -1471,7 +1458,7 @@ yyreduce:
                                 (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:
@@ -1482,7 +1469,7 @@ yyreduce:
                                 (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:
@@ -1492,7 +1479,7 @@ yyreduce:
                                 (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:
@@ -1503,7 +1490,7 @@ yyreduce:
                                 (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:
@@ -1512,7 +1499,7 @@ yyreduce:
                                 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:
@@ -1521,7 +1508,7 @@ yyreduce:
                                 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:
@@ -1531,7 +1518,7 @@ yyreduce:
                                 (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:
@@ -1554,7 +1541,7 @@ yyreduce:
                                 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:
@@ -1565,7 +1552,7 @@ yyreduce:
                                 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:
@@ -1575,7 +1562,7 @@ yyreduce:
                                 (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:
@@ -1587,7 +1574,7 @@ yyreduce:
                                 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:
@@ -1597,7 +1584,7 @@ yyreduce:
                                 (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:
@@ -1608,7 +1595,7 @@ yyreduce:
                                 (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:
@@ -1620,7 +1607,7 @@ yyreduce:
                                 (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:
@@ -1629,7 +1616,7 @@ yyreduce:
                                 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:
@@ -1638,7 +1625,7 @@ yyreduce:
                                 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:
@@ -1650,7 +1637,7 @@ yyreduce:
                                 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:
@@ -1662,7 +1649,7 @@ yyreduce:
                                 (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:
@@ -1725,7 +1712,7 @@ yyreduce:
                                     (yyval)=xmlStrcat((yyval),U(")"));
                                 }
                             }
-#line 1732 "xslpattern.tab.c" /* yacc.c:1646  */
+#line 1716 "xslpattern.tab.c" /* yacc.c:1646  */
     break;
 
   case 53:
@@ -1759,7 +1746,7 @@ yyreduce:
                                     (yyval)=xmlStrcat((yyval),U("()"));
                                 }
                             }
-#line 1766 "xslpattern.tab.c" /* yacc.c:1646  */
+#line 1750 "xslpattern.tab.c" /* yacc.c:1646  */
     break;
 
   case 54:
@@ -1770,7 +1757,7 @@ yyreduce:
                                 (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:
@@ -1782,7 +1769,7 @@ yyreduce:
                                 (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:
@@ -1794,7 +1781,7 @@ yyreduce:
                                 (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:
@@ -1806,7 +1793,7 @@ yyreduce:
                                 (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:
@@ -1817,7 +1804,7 @@ yyreduce:
                                 (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:
@@ -1829,7 +1816,7 @@ yyreduce:
                                 (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:
@@ -1841,7 +1828,7 @@ yyreduce:
                                 (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:
@@ -1853,7 +1840,7 @@ yyreduce:
                                 (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:
@@ -1868,7 +1855,7 @@ yyreduce:
                                 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:
@@ -1880,7 +1867,7 @@ yyreduce:
                                 (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:
@@ -1895,7 +1882,7 @@ yyreduce:
                                 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:
@@ -1907,7 +1894,7 @@ yyreduce:
                                 (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:
@@ -1922,7 +1909,7 @@ yyreduce:
                                 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:
@@ -1934,7 +1921,7 @@ yyreduce:
                                 (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:
@@ -1949,7 +1936,7 @@ yyreduce:
                                 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:
@@ -1961,7 +1948,7 @@ yyreduce:
                                 (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:
@@ -1976,7 +1963,7 @@ yyreduce:
                                 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:
@@ -1988,7 +1975,7 @@ yyreduce:
                                 (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:
@@ -2003,7 +1990,7 @@ yyreduce:
                                 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:
@@ -2015,7 +2002,7 @@ yyreduce:
                                 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:
@@ -2027,7 +2014,7 @@ yyreduce:
                                 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:
@@ -2039,7 +2026,7 @@ yyreduce:
                                 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:
@@ -2048,7 +2035,7 @@ yyreduce:
                                 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:
@@ -2059,7 +2046,7 @@ yyreduce:
                                 (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:
@@ -2070,7 +2057,7 @@ yyreduce:
                                 (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:
@@ -2081,7 +2068,7 @@ yyreduce:
                                 (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:
@@ -2092,7 +2079,7 @@ yyreduce:
                                 (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:
@@ -2103,7 +2090,7 @@ yyreduce:
                                 (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:
@@ -2114,7 +2101,7 @@ yyreduce:
                                 (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:
@@ -2128,7 +2115,7 @@ yyreduce:
                                 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:
@@ -2142,7 +2129,7 @@ yyreduce:
                                 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:
@@ -2156,7 +2143,7 @@ yyreduce:
                                 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:
@@ -2170,7 +2157,7 @@ yyreduce:
                                 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:
@@ -2184,7 +2171,7 @@ yyreduce:
                                 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:
@@ -2198,11 +2185,11 @@ yyreduce:
                                 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
index a9e30f3..df8761a 100644 (file)
@@ -1,4 +1,4 @@
-/* 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
 
@@ -30,8 +30,8 @@
    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
@@ -85,4 +85,4 @@ typedef int YYSTYPE;
 
 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  */
index d56541e..c29fd3e 100644 (file)
@@ -9,7 +9,7 @@
 #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
@@ -18,9 +18,9 @@
 
 /* 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. */
 
@@ -159,15 +159,7 @@ typedef void* yyscan_t;
 
 /* 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.
@@ -179,6 +171,11 @@ typedef void* yyscan_t;
 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
@@ -201,11 +198,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
 
 #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
@@ -223,7 +215,7 @@ 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
@@ -302,7 +294,7 @@ static void xslpattern__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yysc
 
 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 );
@@ -334,7 +326,7 @@ void xslpattern_free (void * ,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;
@@ -526,13 +518,16 @@ static yyconst flex_int16_t yy_chk[178] =
  * 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)
 
@@ -569,7 +564,7 @@ static yyconst flex_int16_t yy_chk[178] =
 /* [3.4] Booleans
 * ||, &&, $foo$ are XSLPattern only */
 /* [3.7] Lexical Structure */
-#line 576 "xslpattern.yy.c"
+#line 568 "xslpattern.yy.c"
 
 #define INITIAL 0
 
@@ -580,7 +575,7 @@ static yyconst flex_int16_t yy_chk[178] =
  */
 #include <unistd.h>
 #endif
-
+    
 #ifndef YY_EXTRA_TYPE
 #define YY_EXTRA_TYPE void *
 #endif
@@ -598,8 +593,8 @@ struct yyguts_t
     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;
@@ -652,7 +647,7 @@ FILE *xslpattern_get_out (yyscan_t yyscanner );
 
 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 );
 
@@ -660,6 +655,10 @@ 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 );
@@ -696,12 +695,7 @@ static int input (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. */
@@ -808,7 +802,7 @@ YY_DECL
 #line 113 "xslpattern.l"
 
 
-#line 815 "xslpattern.yy.c"
+#line 806 "xslpattern.yy.c"
 
     yylval = yylval_param;
 
@@ -1081,7 +1075,7 @@ YY_RULE_SETUP
 #line 153 "xslpattern.l"
 ECHO;
        YY_BREAK
-#line 1088 "xslpattern.yy.c"
+#line 1079 "xslpattern.yy.c"
 case YY_STATE_EOF(INITIAL):
        yyterminate();
 
@@ -1269,21 +1263,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
        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;
@@ -1314,7 +1308,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                /* 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;
                }
@@ -1411,6 +1405,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
        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;
 }
 
@@ -1439,7 +1434,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                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 ) )
@@ -1719,7 +1714,7 @@ void xslpattern_pop_buffer_state (yyscan_t 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) {
@@ -1817,12 +1812,12 @@ YY_BUFFER_STATE xslpattern__scan_string (yyconst char * yystr , yyscan_t yyscann
  * @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;
@@ -1932,7 +1927,7 @@ FILE *xslpattern_get_out  (yyscan_t yyscanner)
 /** 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;
@@ -1968,7 +1963,7 @@ void xslpattern_set_lineno (int  line_number , yyscan_t yyscanner)
 
         /* 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;
 }
@@ -1983,7 +1978,7 @@ void xslpattern_set_column (int  column_no , yyscan_t yyscanner)
 
         /* 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;
 }
@@ -2207,7 +2202,7 @@ void xslpattern_free (void * ptr , yyscan_t yyscanner)
 
 #define YYTABLES_NAME "yytables"
 
-#line 153 "xslpattern.l"
+#line 152 "xslpattern.l"
 
 
 
diff --git a/dll/win32/msxml3/xslpattern.yy.h b/dll/win32/msxml3/xslpattern.yy.h
new file mode 100644 (file)
index 0000000..86887f9
--- /dev/null
@@ -0,0 +1,346 @@
+#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 */
index c8177da..d28d536 100644 (file)
@@ -129,7 +129,7 @@ reactos/dll/win32/msvfw32             # Synced to WineStaging-3.3
 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