Nikolay Sivov : msxml3: libxml2 is not used for writer.

Alexandre Julliard julliard at winehq.org
Mon Dec 19 13:39:22 CST 2011


Module: wine
Branch: master
Commit: 477fd6ef3c38744e78043c14867caa20b12dac8d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=477fd6ef3c38744e78043c14867caa20b12dac8d

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Dec 18 21:12:19 2011 +0300

msxml3: libxml2 is not used for writer.

---

 dlls/msxml3/msxml_private.h |   42 +++++++++++++++++++++---------------------
 dlls/msxml3/mxwriter.c      |   13 -------------
 2 files changed, 21 insertions(+), 34 deletions(-)

diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h
index 141c08c..813584a 100644
--- a/dlls/msxml3/msxml_private.h
+++ b/dlls/msxml3/msxml_private.h
@@ -375,6 +375,27 @@ static inline BSTR bstr_from_xmlChar(const xmlChar *str)
     return ret;
 }
 
+static inline xmlChar *xmlchar_from_wcharn(const WCHAR *str, int nchars)
+{
+    xmlChar *xmlstr;
+    DWORD len = WideCharToMultiByte( CP_UTF8, 0, str, nchars, NULL, 0, NULL, NULL );
+
+    xmlstr = heap_alloc( len+1 );
+    if ( xmlstr )
+    {
+        WideCharToMultiByte( CP_UTF8, 0, str, nchars, (LPSTR) xmlstr, len+1, NULL, NULL );
+        xmlstr[len] = 0;
+    }
+    return xmlstr;
+}
+
+static inline xmlChar *xmlchar_from_wchar( const WCHAR *str )
+{
+    return xmlchar_from_wcharn(str, -1);
+}
+
+#endif
+
 static inline HRESULT return_bstr(const WCHAR *value, BSTR *p)
 {
     if(!p)
@@ -425,27 +446,6 @@ static inline HRESULT return_null_bstr(BSTR *p)
     return S_FALSE;
 }
 
-static inline xmlChar *xmlchar_from_wcharn(const WCHAR *str, int nchars)
-{
-    xmlChar *xmlstr;
-    DWORD len = WideCharToMultiByte( CP_UTF8, 0, str, nchars, NULL, 0, NULL, NULL );
-
-    xmlstr = heap_alloc( len+1 );
-    if ( xmlstr )
-    {
-        WideCharToMultiByte( CP_UTF8, 0, str, nchars, (LPSTR) xmlstr, len+1, NULL, NULL );
-        xmlstr[len] = 0;
-    }
-    return xmlstr;
-}
-
-static inline xmlChar *xmlchar_from_wchar( const WCHAR *str )
-{
-    return xmlchar_from_wcharn(str, -1);
-}
-
-#endif
-
 extern IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR srcText,
                                              LONG line, LONG linepos, LONG filepos ) DECLSPEC_HIDDEN;
 extern HRESULT DOMDocument_create(MSXML_VERSION, IUnknown*, void**) DECLSPEC_HIDDEN;
diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c
index be03877..0cca473 100644
--- a/dlls/msxml3/mxwriter.c
+++ b/dlls/msxml3/mxwriter.c
@@ -39,8 +39,6 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
 
-#ifdef HAVE_LIBXML2
-
 static const WCHAR utf16W[] = {'U','T','F','-','1','6',0};
 static const WCHAR emptyW[] = {0};
 
@@ -1144,14 +1142,3 @@ HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *outer, void **ppObj)
 
     return S_OK;
 }
-
-#else
-
-HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *outer, void **obj)
-{
-    MESSAGE("This program tried to use a MXXMLWriter object, but\n"
-            "libxml2 support was not present at compile time.\n");
-    return E_NOTIMPL;
-}
-
-#endif /* HAVE_LIBXML2 */




More information about the wine-cvs mailing list