ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2018
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
436 discussions
Start a n
N
ew thread
01/01: [ODBC32] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f47d676d3f9e940dfa701…
commit f47d676d3f9e940dfa70106e0a1b30248eb61462 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:36:12 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:36:12 2018 +0100 [ODBC32] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/odbc32/proxyodbc.c | 36 +++++++++++++++++++----------------- media/doc/README.WINE | 2 +- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/dll/win32/odbc32/proxyodbc.c b/dll/win32/odbc32/proxyodbc.c index 0ed5e030c0..7e6368eb93 100644 --- a/dll/win32/odbc32/proxyodbc.c +++ b/dll/win32/odbc32/proxyodbc.c @@ -25,30 +25,32 @@ * */ -#define WIN32_NO_STATUS +#include "config.h" +#include "wine/port.h" -#include <config.h> -#include <wine/port.h> - -//#include <stdarg.h> -//#include <stdio.h> -//#include <stdlib.h> -//#include <string.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <assert.h> -#include <windef.h> -//#include "winbase.h" -#include <winreg.h> +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#ifndef __REACTOS__ +#include "wine/debug.h" +#endif +#include "wine/library.h" +#include "wine/unicode.h" -//#include "sql.h" -//#include "sqltypes.h" -#include <sqlext.h> +#include "sql.h" +#include "sqltypes.h" +#include "sqlext.h" +#ifdef __REACTOS__ #undef TRACE_ON - #include <wine/debug.h> -#include <wine/library.h> -#include <wine/unicode.h> +#endif static BOOL ODBC_LoadDriverManager(void); static BOOL ODBC_LoadDMFunctions(void); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index a53cb231fc..fd84bb93e7 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -137,7 +137,7 @@ reactos/dll/win32/netapi32 # Forked at Wine-1.3.34 reactos/dll/win32/npptools # Synced to WineStaging-3.3 reactos/dll/win32/ntdsapi # Synced to WineStaging-3.3 reactos/dll/win32/objsel # Synced to WineStaging-3.3 -reactos/dll/win32/odbc32 # Synced to WineStaging-2.9. Depends on port of Linux ODBC. +reactos/dll/win32/odbc32 # Synced to WineStaging-3.3. Depends on port of Linux ODBC. reactos/dll/win32/odbccp32 # Synced to WineStaging-2.9 reactos/dll/win32/ole32 # Synced to Wine-3.0 reactos/dll/win32/oleacc # Synced to WineStaging-2.9
7 years
1
0
0
0
01/01: [OBJSEL] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8361200df092a5731059a…
commit 8361200df092a5731059a445f3c576fdc93dfc98 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:35:24 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:35:24 2018 +0100 [OBJSEL] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/objsel/CMakeLists.txt | 4 ++-- dll/win32/objsel/factory.c | 5 +++++ dll/win32/objsel/objsel.c | 5 ++++- dll/win32/objsel/objsel.rc | 5 +++-- dll/win32/objsel/objsel_private.h | 31 ++++++++++++++++--------------- dll/win32/objsel/precomp.h | 13 +++++++++++++ media/doc/README.WINE | 2 +- 7 files changed, 44 insertions(+), 21 deletions(-) diff --git a/dll/win32/objsel/CMakeLists.txt b/dll/win32/objsel/CMakeLists.txt index e784cfd227..c32bda6d5f 100644 --- a/dll/win32/objsel/CMakeLists.txt +++ b/dll/win32/objsel/CMakeLists.txt @@ -9,7 +9,7 @@ spec2def(objsel.dll objsel.spec) list(APPEND SOURCE factory.c objsel.c - objsel_private.h) + precomp.h) add_library(objsel SHARED ${SOURCE} @@ -19,5 +19,5 @@ add_library(objsel SHARED set_module_type(objsel win32dll) target_link_libraries(objsel uuid wine) add_importlibs(objsel ole32 advapi32 msvcrt kernel32 ntdll) -add_pch(objsel objsel_private.h SOURCE) +add_pch(objsel precomp.h SOURCE) add_cd_file(TARGET objsel DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/objsel/factory.c b/dll/win32/objsel/factory.c index af4e8cc393..cb0fb491cb 100644 --- a/dll/win32/objsel/factory.c +++ b/dll/win32/objsel/factory.c @@ -21,6 +21,11 @@ #include "objsel_private.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(objsel); + + static inline ClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) { return CONTAINING_RECORD(iface, ClassFactoryImpl, IClassFactory_iface); diff --git a/dll/win32/objsel/objsel.c b/dll/win32/objsel/objsel.c index d2136e3506..83a845dc8e 100644 --- a/dll/win32/objsel/objsel.c +++ b/dll/win32/objsel/objsel.c @@ -19,8 +19,11 @@ */ #include "objsel_private.h" +#include "rpcproxy.h" -#include <rpcproxy.h> +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(objsel); LONG dll_refs = 0; static HINSTANCE hInstance; diff --git a/dll/win32/objsel/objsel.rc b/dll/win32/objsel/objsel.rc index cefc6aaff0..baa6df6d90 100644 --- a/dll/win32/objsel/objsel.rc +++ b/dll/win32/objsel/objsel.rc @@ -18,7 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <windef.h> +#include "windef.h" +#include "winbase.h" LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL @@ -26,4 +27,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define WINE_FILENAME_STR "objsel.dll" -#include <wine/wine_common_ver.rc> +#include "wine/wine_common_ver.rc" diff --git a/dll/win32/objsel/objsel_private.h b/dll/win32/objsel/objsel_private.h index 48e99d7d1f..1d5bc72ad9 100644 --- a/dll/win32/objsel/objsel_private.h +++ b/dll/win32/objsel/objsel_private.h @@ -18,24 +18,27 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef _OBJSEL_PRIVATE_H -#define _OBJSEL_PRIVATE_H +#pragma once +#include <string.h> #include <stdarg.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H +#include <stdio.h> +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" #define COBJMACROS -#include <windef.h> -#include <winbase.h> -#include <objbase.h> -#include <objsel.h> - -#include <wine/debug.h> -WINE_DEFAULT_DEBUG_CHANNEL(objsel); +#include "ole2.h" +#include "strmif.h" +#include "olectl.h" +#include "unknwn.h" +#include "objsel.h" +#include "wine/unicode.h" +#include "uuids.h" /********************************************************************** * Dll lifetime tracking declaration for objsel.dll @@ -61,5 +64,3 @@ typedef struct HRESULT WINAPI OBJSEL_IDsObjectPicker_Create(LPVOID *ppvObj) DECLSPEC_HIDDEN; extern ClassFactoryImpl OBJSEL_ClassFactory DECLSPEC_HIDDEN; - -#endif /* _OBJSEL_PRIVATE_H */ diff --git a/dll/win32/objsel/precomp.h b/dll/win32/objsel/precomp.h new file mode 100644 index 0000000000..d92117783e --- /dev/null +++ b/dll/win32/objsel/precomp.h @@ -0,0 +1,13 @@ + +#ifndef _OBJSEL_PRECOMP_H +#define _OBJSEL_PRECOMP_H + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include "objsel_private.h" + +#include <wine/debug.h> + +#endif /* !_OBJSEL_PRECOMP_H */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 0a4d227dba..a53cb231fc 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -136,7 +136,7 @@ reactos/dll/win32/nddeapi # Synced to WineStaging-3.3 reactos/dll/win32/netapi32 # Forked at Wine-1.3.34 reactos/dll/win32/npptools # Synced to WineStaging-3.3 reactos/dll/win32/ntdsapi # Synced to WineStaging-3.3 -reactos/dll/win32/objsel # Synced to WineStaging-2.9 +reactos/dll/win32/objsel # Synced to WineStaging-3.3 reactos/dll/win32/odbc32 # Synced to WineStaging-2.9. Depends on port of Linux ODBC. reactos/dll/win32/odbccp32 # Synced to WineStaging-2.9 reactos/dll/win32/ole32 # Synced to Wine-3.0
7 years
1
0
0
0
01/01: [NTDSAPI] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f76b348cb6c454493b578…
commit f76b348cb6c454493b578e9ffef4a3aae8c31e32 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:34:21 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:34:21 2018 +0100 [NTDSAPI] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/ntdsapi/ntdsapi.c | 16 +++++++--------- media/doc/README.WINE | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dll/win32/ntdsapi/ntdsapi.c b/dll/win32/ntdsapi/ntdsapi.c index 6d016ad984..ee0c8379c3 100644 --- a/dll/win32/ntdsapi/ntdsapi.c +++ b/dll/win32/ntdsapi/ntdsapi.c @@ -16,17 +16,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS - #include <stdarg.h> -#include <windef.h> -//#include "winbase.h" -//#include "winerror.h" -#include <winuser.h> -#include <ntdsapi.h> -#include <wine/debug.h> -#include <wine/unicode.h> +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winuser.h" +#include "ntdsapi.h" +#include "wine/debug.h" +#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(ntdsapi); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 14955af52d..0a4d227dba 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -135,7 +135,7 @@ reactos/dll/win32/msxml6 # Synced to WineStaging-3.3 reactos/dll/win32/nddeapi # Synced to WineStaging-3.3 reactos/dll/win32/netapi32 # Forked at Wine-1.3.34 reactos/dll/win32/npptools # Synced to WineStaging-3.3 -reactos/dll/win32/ntdsapi # Synced to WineStaging-2.9 +reactos/dll/win32/ntdsapi # Synced to WineStaging-3.3 reactos/dll/win32/objsel # Synced to WineStaging-2.9 reactos/dll/win32/odbc32 # Synced to WineStaging-2.9. Depends on port of Linux ODBC. reactos/dll/win32/odbccp32 # Synced to WineStaging-2.9
7 years
1
0
0
0
01/01: [NPPTOOLS] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9a992084a81593b6eb96b…
commit 9a992084a81593b6eb96baa75fd3728a57a6d93f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:33:46 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:33:46 2018 +0100 [NPPTOOLS] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/npptools/main.c | 7 +++---- media/doc/README.WINE | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dll/win32/npptools/main.c b/dll/win32/npptools/main.c index a4a3ee3065..a72f634e02 100644 --- a/dll/win32/npptools/main.c +++ b/dll/win32/npptools/main.c @@ -16,13 +16,12 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - -#include <wine/config.h> +#include "config.h" #include <stdarg.h> -#include <windef.h> -#include <winbase.h> +#include "windef.h" +#include "winbase.h" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) { diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 8bddd08f15..14955af52d 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -134,7 +134,7 @@ reactos/dll/win32/msxml4 # Synced to WineStaging-3.3 reactos/dll/win32/msxml6 # Synced to WineStaging-3.3 reactos/dll/win32/nddeapi # Synced to WineStaging-3.3 reactos/dll/win32/netapi32 # Forked at Wine-1.3.34 -reactos/dll/win32/npptools # Synced to WineStaging-2.9 +reactos/dll/win32/npptools # Synced to WineStaging-3.3 reactos/dll/win32/ntdsapi # Synced to WineStaging-2.9 reactos/dll/win32/objsel # Synced to WineStaging-2.9 reactos/dll/win32/odbc32 # Synced to WineStaging-2.9. Depends on port of Linux ODBC.
7 years
1
0
0
0
01/01: [NETCFGX_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=66f8e62269738abe53e3d…
commit 66f8e62269738abe53e3daca71ce518e91300f2c Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:32:58 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:32:58 2018 +0100 [NETCFGX_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/netcfgx/netcfgx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/rostests/winetests/netcfgx/netcfgx.c b/modules/rostests/winetests/netcfgx/netcfgx.c index 4a093876f4..1f3ec77284 100644 --- a/modules/rostests/winetests/netcfgx/netcfgx.c +++ b/modules/rostests/winetests/netcfgx/netcfgx.c @@ -15,14 +15,16 @@ * 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 WIN32_LEAN_AND_MEAN #include <stdio.h> -#define WIN32_LEAN_AND_MEAN #define COBJMACROS -#include <wine/test.h> + +#ifdef __REACTOS__ #include <objbase.h> -#include <netcfgx.h> +#endif +#include "netcfgx.h" +#include "wine/test.h" static void create_configuration(void) {
7 years
1
0
0
0
01/01: [NDDEAPI] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=434c1cef181df5e20dc2f…
commit 434c1cef181df5e20dc2f5fd4a8a16457d281fe6 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:31:48 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:31:48 2018 +0100 [NDDEAPI] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/nddeapi/nddeapi.c | 10 ++++------ media/doc/README.WINE | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dll/win32/nddeapi/nddeapi.c b/dll/win32/nddeapi/nddeapi.c index 6f20bcc1db..84c636affb 100644 --- a/dll/win32/nddeapi/nddeapi.c +++ b/dll/win32/nddeapi/nddeapi.c @@ -18,13 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS +#include <stdarg.h> -//#include <stdarg.h> - -//#include "windef.h" -//#include "winbase.h" -#include <wine/debug.h> +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(nddeapi); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index ec230821e3..8bddd08f15 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -132,7 +132,7 @@ reactos/dll/win32/msxml2 # Synced to WineStaging-3.3 reactos/dll/win32/msxml3 # Synced to WineStaging-3.3 reactos/dll/win32/msxml4 # Synced to WineStaging-3.3 reactos/dll/win32/msxml6 # Synced to WineStaging-3.3 -reactos/dll/win32/nddeapi # Synced to WineStaging-2.9 +reactos/dll/win32/nddeapi # Synced to WineStaging-3.3 reactos/dll/win32/netapi32 # Forked at Wine-1.3.34 reactos/dll/win32/npptools # Synced to WineStaging-2.9 reactos/dll/win32/ntdsapi # Synced to WineStaging-2.9
7 years
1
0
0
0
01/01: [MSXML6] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a88fe697907db569aff40…
commit a88fe697907db569aff4037fe8a77e7fe8bbb0bd Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:31:01 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:31:01 2018 +0100 [MSXML6] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/msxml6/main.c | 11 ++++------- media/doc/README.WINE | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dll/win32/msxml6/main.c b/dll/win32/msxml6/main.c index 32ff3108b5..9c6f9876de 100644 --- a/dll/win32/msxml6/main.c +++ b/dll/win32/msxml6/main.c @@ -18,14 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS - #include <stdarg.h> -#include <windef.h> -#include <winbase.h> -#include <objbase.h> -#include <rpcproxy.h> +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "rpcproxy.h" static HINSTANCE instance; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 9a49b75036..ec230821e3 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -131,7 +131,7 @@ reactos/dll/win32/msxml # Synced to WineStaging-3.3 reactos/dll/win32/msxml2 # Synced to WineStaging-3.3 reactos/dll/win32/msxml3 # Synced to WineStaging-3.3 reactos/dll/win32/msxml4 # Synced to WineStaging-3.3 -reactos/dll/win32/msxml6 # Synced to WineStaging-2.9 +reactos/dll/win32/msxml6 # Synced to WineStaging-3.3 reactos/dll/win32/nddeapi # Synced to WineStaging-2.9 reactos/dll/win32/netapi32 # Forked at Wine-1.3.34 reactos/dll/win32/npptools # Synced to WineStaging-2.9
7 years
1
0
0
0
01/01: [MSXML4] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2404eddf880035123dc87…
commit 2404eddf880035123dc871e1f681a35c21121a87 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:30:29 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:30:29 2018 +0100 [MSXML4] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/msxml4/main.c | 11 ++++------- media/doc/README.WINE | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dll/win32/msxml4/main.c b/dll/win32/msxml4/main.c index 9643f34122..fbe7f9eb46 100644 --- a/dll/win32/msxml4/main.c +++ b/dll/win32/msxml4/main.c @@ -18,14 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS - #include <stdarg.h> -#include <windef.h> -#include <winbase.h> -#include <objbase.h> -#include <rpcproxy.h> +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "rpcproxy.h" static HINSTANCE instance; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index d28d5365ab..9a49b75036 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -130,7 +130,7 @@ 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 WineStaging-3.3 -reactos/dll/win32/msxml4 # Synced to WineStaging-2.9 +reactos/dll/win32/msxml4 # Synced to WineStaging-3.3 reactos/dll/win32/msxml6 # Synced to WineStaging-2.9 reactos/dll/win32/nddeapi # Synced to WineStaging-2.9 reactos/dll/win32/netapi32 # Forked at Wine-1.3.34
7 years
1
0
0
0
01/01: [MSXML3_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3662ed8775cb216bc9c27…
commit 3662ed8775cb216bc9c27b1f2994595b9f870e71 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:29:29 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:29:29 2018 +0100 [MSXML3_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/msxml3/CMakeLists.txt | 7 +- modules/rostests/winetests/msxml3/domdoc.c | 299 ++++++++++++++++++----- modules/rostests/winetests/msxml3/guid.c | 16 ++ modules/rostests/winetests/msxml3/httpreq.c | 24 +- modules/rostests/winetests/msxml3/precomp.h | 11 +- modules/rostests/winetests/msxml3/saxreader.c | 65 ++++- modules/rostests/winetests/msxml3/schema.c | 23 +- modules/rostests/winetests/msxml3/xmldoc.c | 11 +- modules/rostests/winetests/msxml3/xmlparser.c | 11 +- modules/rostests/winetests/msxml3/xmlview.c | 24 +- 10 files changed, 392 insertions(+), 99 deletions(-) diff --git a/modules/rostests/winetests/msxml3/CMakeLists.txt b/modules/rostests/winetests/msxml3/CMakeLists.txt index 2d824189bd..84c0d46c5e 100644 --- a/modules/rostests/winetests/msxml3/CMakeLists.txt +++ b/modules/rostests/winetests/msxml3/CMakeLists.txt @@ -13,7 +13,12 @@ list(APPEND SOURCE xmlview.c precomp.h) -add_executable(msxml3_winetest ${SOURCE} testlist.c rsrc.rc) +add_executable(msxml3_winetest + ${SOURCE} + guid.c + testlist.c + rsrc.rc) + add_idl_headers(xmlparser_idlheader_test xmlparser.idl) add_dependencies(msxml3_winetest xmlparser_idlheader_test) set_module_type(msxml3_winetest win32cui) diff --git a/modules/rostests/winetests/msxml3/domdoc.c b/modules/rostests/winetests/msxml3/domdoc.c index 03ac01675d..57bc88df48 100644 --- a/modules/rostests/winetests/msxml3/domdoc.c +++ b/modules/rostests/winetests/msxml3/domdoc.c @@ -21,9 +21,27 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" -#include <asptlb.h> +#define COBJMACROS +#define CONST_VTABLE + +#include <stdio.h> +#include <assert.h> + +#include "windows.h" + +#include "msxml.h" +#include "msxml2.h" +#include "msxml2did.h" +#include "ole2.h" +#include "dispex.h" +#include "objsafe.h" +#include "mshtml.h" +#include "initguid.h" +#include "asptlb.h" + +#include "wine/heap.h" +#include "wine/test.h" /* undef the #define in msxml2 so that we can access all versions */ #undef CLSID_DOMDocument @@ -155,7 +173,7 @@ static ULONG WINAPI dispevent_Release(IDispatch *iface) ULONG ref = InterlockedDecrement( &This->ref ); if (ref == 0) - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); return ref; } @@ -215,7 +233,7 @@ static const IDispatchVtbl dispeventVtbl = static IDispatch* create_dispevent(void) { - dispevent *event = HeapAlloc(GetProcessHeap(), 0, sizeof(*event)); + dispevent *event = heap_alloc(sizeof(*event)); event->IDispatch_iface.lpVtbl = &dispeventVtbl; event->ref = 1; @@ -682,8 +700,10 @@ static void _expect_list_len(IXMLDOMNodeList *list, LONG len, int line) #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) +#ifdef __REACTOS__ #define EXPECT_NOT_HR(hr,hr_exp) \ ok(hr != hr_exp, "got 0x%08x, expected not 0x%08x\n", hr, hr_exp) +#endif static const WCHAR szEmpty[] = { 0 }; static const WCHAR szIncomplete[] = { @@ -10168,13 +10188,68 @@ static void write_to_file(const char *name, const char *data) CloseHandle(hfile); } +static void test_doc_load_from_path(IXMLDOMDocument *doc, const char *path) +{ + IXMLDOMDocument *doc2; + IXMLDOMElement *elem; + BSTR url, url2; + VARIANT_BOOL b; + VARIANT src; + HRESULT hr; + + url = _bstr_(path); + + V_VT(&src) = VT_BSTR; + V_BSTR(&src) = url; + hr = IXMLDOMDocument_load(doc, src, &b); + ok(hr == S_OK, "Failed to load document, %#x.\n", hr); + ok(b == VARIANT_TRUE, "got %d\n", b); + + V_VT(&src) = VT_BSTR | VT_BYREF; + V_BSTRREF(&src) = &url; + hr = IXMLDOMDocument_load(doc, src, &b); + ok(hr == S_OK, "Failed to load document, %#x.\n", hr); + ok(b == VARIANT_TRUE, "got %d\n", b); + + url = NULL; + hr = IXMLDOMDocument_get_url(doc, &url); + ok(hr == S_OK, "Failed to get document url, hr %#x.\n", hr); + + hr = IXMLDOMDocument_get_documentElement(doc, &elem); + ok(hr == S_OK, "got 0x%08x\n", hr); + + /* Create another instance for the same document, check url */ + hr = IXMLDOMElement_get_ownerDocument(elem, &doc2); + ok(hr == S_OK, "Failed to get owner document, hr %#x.\n", hr); + + hr = IXMLDOMDocument_get_url(doc2, &url2); + ok(hr == S_OK, "Failed to get document url, hr %#x.\n", hr); + ok(!lstrcmpW(url, url2), "Unexpected url %s.\n", wine_dbgstr_w(url2)); + + IXMLDOMDocument_Release(doc2); + IXMLDOMElement_Release(elem); + SysFreeString(url2); + SysFreeString(url); +} + +static void url_forward_slash(char *url) +{ + char *p = url; + + while (*p) + { + if (*p == '\\') + *p = '/'; + p++; + } +} + static void test_load(void) { - IXMLDOMDocument *doc, *doc2; - BSTR pathW, bstr1, bstr2; + char path[MAX_PATH], path2[MAX_PATH]; IXMLDOMNodeList *list; - IXMLDOMElement *elem; - char path[MAX_PATH]; + IXMLDOMDocument *doc; + BSTR bstr1, bstr2; VARIANT_BOOL b; VARIANT src; HRESULT hr; @@ -10195,47 +10270,26 @@ static void test_load(void) EXPECT_HR(hr, E_INVALIDARG); ok(b == VARIANT_FALSE, "got %d\n", b); - pathW = _bstr_(path); - - /* load from path: VT_BSTR */ - V_VT(&src) = VT_BSTR; - V_BSTR(&src) = pathW; - hr = IXMLDOMDocument_load(doc, src, &b); - EXPECT_HR(hr, S_OK); - ok(b == VARIANT_TRUE, "got %d\n", b); - - bstr1 = NULL; - hr = IXMLDOMDocument_get_url(doc, &bstr1); - ok(hr == S_OK, "got 0x%08x\n", hr); - SysFreeString(bstr1); - - /* load from a path: VT_BSTR|VT_BYREF */ - V_VT(&src) = VT_BSTR | VT_BYREF; - V_BSTRREF(&src) = &pathW; - hr = IXMLDOMDocument_load(doc, src, &b); - EXPECT_HR(hr, S_OK); - ok(b == VARIANT_TRUE, "got %d\n", b); - - bstr1 = NULL; - hr = IXMLDOMDocument_get_url(doc, &bstr1); - ok(hr == S_OK, "got 0x%08x\n", hr); + /* "file://" url */ + strcpy(path2, "file://"); + strcat(path2, path); + test_doc_load_from_path(doc, path2); - hr = IXMLDOMDocument_get_documentElement(doc, &elem); - ok(hr == S_OK, "got 0x%08x\n", hr); + /* file:// url, forward slashes */ + url_forward_slash(path2); + test_doc_load_from_path(doc, path2); - /* create another instance for the same document, check url */ - hr = IXMLDOMElement_get_ownerDocument(elem, &doc2); - ok(hr == S_OK, "got 0x%08x\n", hr); + /* "file:/" url */ + strcpy(path2, "file:/"); + strcat(path2, path); + test_doc_load_from_path(doc, path); - hr = IXMLDOMDocument_get_url(doc, &bstr2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(!lstrcmpW(bstr1, bstr2), "got %s\n", wine_dbgstr_w(bstr2)); + /* file:/ with forward slashes. */ + url_forward_slash(path2); + test_doc_load_from_path(doc, path2); - IXMLDOMDocument_Release(doc2); - IXMLDOMElement_Release(elem); - - SysFreeString(bstr1); - SysFreeString(bstr2); + /* Regular local path. */ + test_doc_load_from_path(doc, path); /* load from a path: VT_BSTR|VT_BYREF, null ptr */ V_VT(&src) = VT_BSTR | VT_BYREF; @@ -10255,7 +10309,7 @@ static void test_load(void) write_to_file(path, nocontent); V_VT(&src) = VT_BSTR; - V_BSTR(&src) = pathW; + V_BSTR(&src) = _bstr_(path); b = VARIANT_TRUE; hr = IXMLDOMDocument_load(doc, src, &b); ok(hr == S_FALSE, "got 0x%08x\n", hr); @@ -12124,34 +12178,148 @@ static void test_put_data(void) type++; } - /* \r\n sequence is never escaped */ + IXMLDOMDocument_Release(doc); + free_bstrs(); +} + +static void test_newline_normalization(void) +{ + const struct msxmlsupported_data_t *table = domdoc_support_data; + IXMLDOMDocument *doc; + IXMLDOMText *text; + IXMLDOMNode *node; + VARIANT v; + VARIANT_BOOL b; + BSTR s; + HRESULT hr; + LONG length; + V_VT(&v) = VT_I2; V_I2(&v) = NODE_TEXT; - hr = IXMLDOMDocument_createNode(doc, v, _bstr_("name"), NULL, &node); - ok(hr == S_OK, "got 0x%08x\n", hr); + while (table->clsid) + { + if (!is_clsid_supported(table->clsid, &IID_IXMLDOMDocument)) + { + table++; + continue; + } - IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMText, (void**)&text); + hr = CoCreateInstance(table->clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (void**)&doc); + ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IXMLDOMText_put_data(text, _bstr_("\r\n")); - ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IXMLDOMDocument_createNode(doc, v, _bstr_("name"), NULL, &node); + ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IXMLDOMText_get_data(text, &get_data); - ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine - ok(!lstrcmpW(get_data, _bstr_("\n")), "got %s\n", wine_dbgstr_w(get_data)); - SysFreeString(get_data); + IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMText, (void**)&text); - hr = IXMLDOMText_get_xml(text, &get_data); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(!lstrcmpW(get_data, _bstr_("\r\n")), "got %s\n", wine_dbgstr_w(get_data)); - SysFreeString(get_data); + /* \r\n is normalized to \n and back to \r\n */ - IXMLDOMText_Release(text); - IXMLDOMNode_Release(node); + hr = IXMLDOMText_put_data(text, _bstr_("\r\n")); + ok(hr == S_OK, "got 0x%08x\n", hr); - IXMLDOMDocument_Release(doc); - free_bstrs(); + hr = IXMLDOMText_get_data(text, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("\n")), "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + hr = IXMLDOMText_get_length(text, &length); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(length == 1, "got %d, expected 1\n", length); + + hr = IXMLDOMText_get_xml(text, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("\r\n")), "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + /* \r\r\n is normalized to \n\n and back to \r\n\r\n */ + + hr = IXMLDOMText_put_data(text, _bstr_("\r\r\n")); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMText_get_data(text, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("\n\n")), "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + hr = IXMLDOMText_get_length(text, &length); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(length == 2, "got %d, expected 2\n", length); + + hr = IXMLDOMText_get_xml(text, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("\r\n\r\n")), "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + /* the same normalizations are applied when loading a document as a whole */ + + hr = IXMLDOMDocument_loadXML(doc, _bstr_("<?xml version=\"1.0\"?><root>foo\n\r\n\r\r\nbar</root>"), &b); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMDocument_get_text(doc, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("foo\n\n\n\nbar")), "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + hr = IXMLDOMDocument_get_xml(doc, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("<?xml version=\"1.0\"?>\r\n<root>foo\r\n\r\n\r\n\r\nbar</root>\r\n")), + "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + /* even if xml:space="preserve" */ + + hr = IXMLDOMDocument_loadXML(doc, _bstr_("<?xml version=\"1.0\"?>" + "<root xml:space=\"preserve\">foo\n\r\n\r\r\nbar</root>"), &b); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMDocument_get_text(doc, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("foo\n\n\n\nbar")), "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + hr = IXMLDOMDocument_get_xml(doc, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("<?xml version=\"1.0\"?>\r\n" + "<root xml:space=\"preserve\">foo\r\n\r\n\r\n\r\nbar</root>\r\n")), + "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + /* or preserveWhiteSpace is set */ + + hr = IXMLDOMDocument_put_preserveWhiteSpace(doc, VARIANT_TRUE); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMDocument_loadXML(doc, _bstr_("<?xml version=\"1.0\"?><root>foo\n\r\n\r\r\nbar</root>"), &b); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMDocument_get_text(doc, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(s, _bstr_("foo\n\n\n\nbar")), "got %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + hr = IXMLDOMDocument_get_xml(doc, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + if (IsEqualGUID(table->clsid, &CLSID_DOMDocument60)) + { + /* DOMDocument60 does the newline normalization but does not insert line breaks around the root node */ +todo_wine + ok(!lstrcmpW(s, _bstr_("<?xml version=\"1.0\"?><root>foo\r\n\r\n\r\n\r\nbar</root>")), + "got %s\n", wine_dbgstr_w(s)); + } + else + { + ok(!lstrcmpW(s, _bstr_("<?xml version=\"1.0\"?>\r\n<root>foo\r\n\r\n\r\n\r\nbar</root>\r\n")), + "got %s\n", wine_dbgstr_w(s)); + } + SysFreeString(s); + + IXMLDOMText_Release(text); + IXMLDOMNode_Release(node); + IXMLDOMDocument_Release(doc); + free_bstrs(); + table++; + } } static void test_putref_schemas(void) @@ -12735,6 +12903,7 @@ START_TEST(domdoc) test_nodeValue(); test_get_namespaces(); test_put_data(); + test_newline_normalization(); test_putref_schemas(); test_namedmap_newenum(); test_xmlns_attribute(); diff --git a/modules/rostests/winetests/msxml3/guid.c b/modules/rostests/winetests/msxml3/guid.c new file mode 100644 index 0000000000..a35fcdd959 --- /dev/null +++ b/modules/rostests/winetests/msxml3/guid.c @@ -0,0 +1,16 @@ +/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */ + +#include <stdarg.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS + +#include <windef.h> +#include <winbase.h> +#include <initguid.h> +#include <objsafe.h> +#include <msxml2.h> +#include <mshtml.h> +#include <xmlparser.h> + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/modules/rostests/winetests/msxml3/httpreq.c b/modules/rostests/winetests/msxml3/httpreq.c index 9c4e48864f..4f51ef9faf 100644 --- a/modules/rostests/winetests/msxml3/httpreq.c +++ b/modules/rostests/winetests/msxml3/httpreq.c @@ -18,7 +18,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" + +#define COBJMACROS +#define CONST_VTABLE + +#include <stdio.h> +#include <assert.h> + +#include "windows.h" + +#include "msxml2.h" +#include "msxml2did.h" +#include "dispex.h" + +#include "initguid.h" +#include "objsafe.h" +#include "mshtml.h" + +#include "wine/heap.h" +#include "wine/test.h" #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) @@ -1226,7 +1244,7 @@ static ULONG WINAPI dispevent_Release(IDispatch *iface) ULONG ref = InterlockedDecrement( &This->ref ); if (ref == 0) - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); return ref; } @@ -1303,7 +1321,7 @@ static const IDispatchVtbl dispeventVtbl = static IDispatch* create_dispevent(void) { - dispevent *event = HeapAlloc(GetProcessHeap(), 0, sizeof(*event)); + dispevent *event = heap_alloc(sizeof(*event)); event->IDispatch_iface.lpVtbl = &dispeventVtbl; event->ref = 1; diff --git a/modules/rostests/winetests/msxml3/precomp.h b/modules/rostests/winetests/msxml3/precomp.h index 888b1e625e..9bdbab5f65 100644 --- a/modules/rostests/winetests/msxml3/precomp.h +++ b/modules/rostests/winetests/msxml3/precomp.h @@ -1,9 +1,8 @@ + #ifndef _MSXML3_WINETEST_PRECOMP_H_ #define _MSXML3_WINETEST_PRECOMP_H_ #define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H #define COBJMACROS #define CONST_VTABLE @@ -12,14 +11,14 @@ #include <assert.h> #include <wine/test.h> +#include <wine/heap.h> -#include <winnls.h> -#include <wingdi.h> -#include <initguid.h> +#include <windows.h> #include <ole2.h> #include <msxml2.h> -#include <msxml2did.h> #include <objsafe.h> +#include <ocidl.h> +#include <dispex.h> #include <mshtml.h> #include <xmlparser.h> diff --git a/modules/rostests/winetests/msxml3/saxreader.c b/modules/rostests/winetests/msxml3/saxreader.c index ed0eedeae1..3ed332edb6 100644 --- a/modules/rostests/winetests/msxml3/saxreader.c +++ b/modules/rostests/winetests/msxml3/saxreader.c @@ -20,9 +20,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#define COBJMACROS +#define CONST_VTABLE -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); +#include <stdio.h> +#include <assert.h> + +#include "windows.h" +#include "ole2.h" +#include "msxml2.h" +#include "msxml2did.h" +#include "ocidl.h" +#include "dispex.h" + +#include "wine/heap.h" +#include "wine/test.h" static const WCHAR emptyW[] = {0}; @@ -246,16 +258,13 @@ static void add_call(struct call_sequence **seq, int sequence_index, if (!call_seq->sequence) { call_seq->size = 10; - call_seq->sequence = HeapAlloc(GetProcessHeap(), 0, - call_seq->size * sizeof (struct call_entry)); + call_seq->sequence = heap_alloc(call_seq->size * sizeof (struct call_entry)); } if (call_seq->count == call_seq->size) { call_seq->size *= 2; - call_seq->sequence = HeapReAlloc(GetProcessHeap(), 0, - call_seq->sequence, - call_seq->size * sizeof (struct call_entry)); + call_seq->sequence = heap_realloc(call_seq->sequence, call_seq->size * sizeof (struct call_entry)); } assert(call_seq->sequence); @@ -290,7 +299,7 @@ static inline void flush_sequence(struct call_sequence **seg, int sequence_index SysFreeString(call_seq->sequence[i].attributes[j].qnameW); SysFreeString(call_seq->sequence[i].attributes[j].valueW); } - HeapFree(GetProcessHeap(), 0, call_seq->sequence[i].attributes); + heap_free(call_seq->sequence[i].attributes); call_seq->sequence[i].attr_count = 0; SysFreeString(call_seq->sequence[i].arg1W); @@ -298,7 +307,7 @@ static inline void flush_sequence(struct call_sequence **seg, int sequence_index SysFreeString(call_seq->sequence[i].arg3W); } - HeapFree(GetProcessHeap(), 0, call_seq->sequence); + heap_free(call_seq->sequence); call_seq->sequence = NULL; call_seq->count = call_seq->size = 0; } @@ -525,7 +534,7 @@ static void init_call_sequences(struct call_sequence **seq, int n) int i; for (i = 0; i < n; i++) - seq[i] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct call_sequence)); + seq[i] = heap_alloc_zero(sizeof(struct call_sequence)); } static const WCHAR szSimpleXML[] = { @@ -1212,7 +1221,7 @@ static HRESULT WINAPI contentHandler_startElement( int i; struct attribute_entry *attr; - attr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(struct attribute_entry)); + attr = heap_alloc_zero(len * sizeof(*attr)); v = VARIANT_TRUE; hr = ISAXXMLReader_getFeature(g_reader, _bstr_("
http://xml.org/sax/features/namespaces
"), &v); @@ -2780,6 +2789,36 @@ static void test_saxreader_features(void) continue; } + if (IsEqualGUID(entry->guid, &CLSID_SAXXMLReader40) || + IsEqualGUID(entry->guid, &CLSID_SAXXMLReader60)) + { + value = VARIANT_TRUE; + hr = ISAXXMLReader_getFeature(reader, _bstr_("exhaustive-errors"), &value); + ok(hr == S_OK, "Failed to get feature value, hr %#x.\n", hr); + ok(value == VARIANT_FALSE, "Unexpected default feature value.\n"); + hr = ISAXXMLReader_putFeature(reader, _bstr_("exhaustive-errors"), VARIANT_FALSE); + ok(hr == S_OK, "Failed to put feature value, hr %#x.\n", hr); + + value = VARIANT_TRUE; + hr = ISAXXMLReader_getFeature(reader, _bstr_("schema-validation"), &value); + ok(hr == S_OK, "Failed to get feature value, hr %#x.\n", hr); + ok(value == VARIANT_FALSE, "Unexpected default feature value.\n"); + hr = ISAXXMLReader_putFeature(reader, _bstr_("exhaustive-errors"), VARIANT_FALSE); + ok(hr == S_OK, "Failed to put feature value, hr %#x.\n", hr); + } + else + { + value = 123; + hr = ISAXXMLReader_getFeature(reader, _bstr_("exhaustive-errors"), &value); + ok(hr == E_INVALIDARG, "Failed to get feature value, hr %#x.\n", hr); + ok(value == 123, "Unexpected value %d.\n", value); + + value = 123; + hr = ISAXXMLReader_getFeature(reader, _bstr_("schema-validation"), &value); + ok(hr == E_INVALIDARG, "Failed to get feature value, hr %#x.\n", hr); + ok(value == 123, "Unexpected value %d.\n", value); + } + name = feature_names; while (*name) { @@ -3296,7 +3335,7 @@ static void test_mxwriter_flush(void) ok(pos2.QuadPart == 0, "expected stream beginning\n"); len = 2048; - buff = HeapAlloc(GetProcessHeap(), 0, len+1); + buff = heap_alloc(len + 1); memset(buff, 'A', len); buff[len] = 0; hr = ISAXContentHandler_characters(content, _bstr_(buff), len); @@ -3379,7 +3418,7 @@ static void test_mxwriter_flush(void) ok(SysStringLen(V_BSTR(&dest)) == len, "got len=%d, expected %d\n", SysStringLen(V_BSTR(&dest)), len); VariantClear(&dest); - HeapFree(GetProcessHeap(), 0, buff); + heap_free(buff); ISAXContentHandler_Release(content); IStream_Release(stream); IMXWriter_Release(writer); diff --git a/modules/rostests/winetests/msxml3/schema.c b/modules/rostests/winetests/msxml3/schema.c index 306c65dcf2..799365b5c6 100644 --- a/modules/rostests/winetests/msxml3/schema.c +++ b/modules/rostests/winetests/msxml3/schema.c @@ -19,9 +19,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdio.h> +#include <assert.h> +#define COBJMACROS -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); +#include "initguid.h" +#include "windows.h" +#include "ole2.h" +#include "msxml2.h" +#undef CLSID_DOMDocument +#include "msxml2did.h" +#include "dispex.h" + +#include "wine/test.h" + +#ifdef __REACTOS__ +#include <cguid.h> +#endif #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) @@ -426,8 +440,13 @@ static const CHAR szOpenSeqXML4[] = "<test><x/><x/><y/><z/><z/><v/></test>"; wine_dbgstr_longlong(v1), wine_dbgstr_longlong(v2)); \ } +#ifdef __REACTOS__ #define expect_int64(expr, x, base) _expect64(expr, #x, base, LONG64, _strtoi64) #define expect_uint64(expr, x, base) _expect64(expr, #x, base, ULONG64, _strtoui64) +#else +#define expect_int64(expr, x, base) _expect64(expr, #x, base, LONG64, strtoll) +#define expect_uint64(expr, x, base) _expect64(expr, #x, base, ULONG64, strtoull) +#endif static BSTR alloced_bstrs[256]; static int alloced_bstrs_count; diff --git a/modules/rostests/winetests/msxml3/xmldoc.c b/modules/rostests/winetests/msxml3/xmldoc.c index ee031bc36e..359297f592 100644 --- a/modules/rostests/winetests/msxml3/xmldoc.c +++ b/modules/rostests/winetests/msxml3/xmldoc.c @@ -18,7 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#define COBJMACROS + +#include <stdio.h> +#include "windows.h" +#include "ole2.h" +#include "msxml2.h" +#include "msxml2did.h" +#include "ocidl.h" + +#include "wine/test.h" #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) diff --git a/modules/rostests/winetests/msxml3/xmlparser.c b/modules/rostests/winetests/msxml3/xmlparser.c index 0bb2ecb0a9..32514e3e0e 100644 --- a/modules/rostests/winetests/msxml3/xmlparser.c +++ b/modules/rostests/winetests/msxml3/xmlparser.c @@ -17,8 +17,17 @@ * 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 +#define CONST_VTABLE + +#include <stdio.h> +#include <assert.h> + +#include "windows.h" +#include "ole2.h" +#include "xmlparser.h" +#include "wine/test.h" -#include "precomp.h" static HRESULT WINAPI nodefact_QueryInterface(IXMLNodeFactory *iface, REFIID riid, void **ppvObject) diff --git a/modules/rostests/winetests/msxml3/xmlview.c b/modules/rostests/winetests/msxml3/xmlview.c index d3a0903e04..dc8ab7d200 100644 --- a/modules/rostests/winetests/msxml3/xmlview.c +++ b/modules/rostests/winetests/msxml3/xmlview.c @@ -15,13 +15,23 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - -#include "precomp.h" - -#include <perhist.h> -#include <docobj.h> - -#define DISPID_HTMLDOCUMENTEVENTS2_ONREADYSTATECHANGE DISPID_READYSTATECHANGE +#define COBJMACROS +#define CONST_VTABLE + +#include <stdio.h> +#include <assert.h> + +#include "windows.h" +#include "ole2.h" +#include "mshtml.h" +#include "mshtmdid.h" +#include "initguid.h" +#include "perhist.h" +#include "docobj.h" +#include "urlmon.h" +#include "xmlparser.h" + +#include "wine/test.h" HRESULT (WINAPI *pCreateURLMoniker)(IMoniker*, LPCWSTR, IMoniker**);
7 years
1
0
0
0
01/01: [MSXML3] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bab6b90fd95fe293a4548…
commit bab6b90fd95fe293a45485189cc0ae07a2dc8a05 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Tue Mar 20 12:28:36 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Tue Mar 20 12:28:36 2018 +0100 [MSXML3] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/msxml3/attribute.c | 23 ++- dll/win32/msxml3/bsc.c | 54 +++++- dll/win32/msxml3/cdata.c | 22 ++- dll/win32/msxml3/comment.c | 22 ++- dll/win32/msxml3/dispex.c | 33 +++- dll/win32/msxml3/docfrag.c | 22 ++- dll/win32/msxml3/doctype.c | 23 ++- dll/win32/msxml3/domdoc.c | 78 +++++---- dll/win32/msxml3/domimpl.c | 22 ++- dll/win32/msxml3/element.c | 23 ++- dll/win32/msxml3/entityref.c | 22 ++- dll/win32/msxml3/factory.c | 26 +-- dll/win32/msxml3/httprequest.c | 44 +++-- dll/win32/msxml3/main.c | 42 ++++- dll/win32/msxml3/msxml_private.h | 42 ++--- dll/win32/msxml3/mxnamespace.c | 23 ++- dll/win32/msxml3/mxwriter.c | 117 +++++++------ dll/win32/msxml3/node.c | 210 ++++++++++++++++++++++- dll/win32/msxml3/nodelist.c | 23 ++- dll/win32/msxml3/nodemap.c | 24 ++- dll/win32/msxml3/parseerror.c | 24 ++- dll/win32/msxml3/pi.c | 22 ++- dll/win32/msxml3/precomp.h | 5 +- dll/win32/msxml3/saxreader.c | 66 ++++++-- dll/win32/msxml3/schema.c | 34 +++- dll/win32/msxml3/selection.c | 21 ++- dll/win32/msxml3/stylesheet.c | 26 ++- dll/win32/msxml3/text.c | 53 +++++- dll/win32/msxml3/uuid.c | 16 +- dll/win32/msxml3/version.rc | 2 +- dll/win32/msxml3/xdr.c | 7 +- dll/win32/msxml3/xmldoc.c | 30 +++- dll/win32/msxml3/xmlelem.c | 23 ++- dll/win32/msxml3/xmlparser.c | 24 ++- dll/win32/msxml3/xmlview.c | 32 +++- dll/win32/msxml3/xslpattern.h | 4 +- dll/win32/msxml3/xslpattern.tab.c | 191 ++++++++++----------- dll/win32/msxml3/xslpattern.tab.h | 8 +- dll/win32/msxml3/xslpattern.yy.c | 85 +++++----- dll/win32/msxml3/xslpattern.yy.h | 346 ++++++++++++++++++++++++++++++++++++++ media/doc/README.WINE | 2 +- 41 files changed, 1541 insertions(+), 375 deletions(-) diff --git a/dll/win32/msxml3/attribute.c b/dll/win32/msxml3/attribute.c index 707e59614f..637615b341 100644 --- a/dll/win32/msxml3/attribute.c +++ b/dll/win32/msxml3/attribute.c @@ -18,10 +18,31 @@ * 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 diff --git a/dll/win32/msxml3/bsc.c b/dll/win32/msxml3/bsc.c index 9e148cb405..df4cf37346 100644 --- a/dll/win32/msxml3/bsc.c +++ b/dll/win32/msxml3/bsc.c @@ -16,7 +16,32 @@ * 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), diff --git a/dll/win32/msxml3/cdata.c b/dll/win32/msxml3/cdata.c index 91e90478de..c255b1b18b 100644 --- a/dll/win32/msxml3/cdata.c +++ b/dll/win32/msxml3/cdata.c @@ -18,10 +18,30 @@ * 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; diff --git a/dll/win32/msxml3/comment.c b/dll/win32/msxml3/comment.c index 6df3082ecd..0317c4fc2d 100644 --- a/dll/win32/msxml3/comment.c +++ b/dll/win32/msxml3/comment.c @@ -18,10 +18,30 @@ * 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; diff --git a/dll/win32/msxml3/dispex.c b/dll/win32/msxml3/dispex.c index e425084fc6..bd29a212c8 100644 --- a/dll/win32/msxml3/dispex.c +++ b/dll/win32/msxml3/dispex.c @@ -16,9 +16,34 @@ * 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]); diff --git a/dll/win32/msxml3/docfrag.c b/dll/win32/msxml3/docfrag.c index 11534c7048..b2dd3e5dec 100644 --- a/dll/win32/msxml3/docfrag.c +++ b/dll/win32/msxml3/docfrag.c @@ -18,10 +18,30 @@ * 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; diff --git a/dll/win32/msxml3/doctype.c b/dll/win32/msxml3/doctype.c index 2a1b9639e6..79d74d9fcd 100644 --- a/dll/win32/msxml3/doctype.c +++ b/dll/win32/msxml3/doctype.c @@ -18,10 +18,31 @@ * 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; diff --git a/dll/win32/msxml3/domdoc.c b/dll/win32/msxml3/domdoc.c index bb08f25a13..ddd756582b 100644 --- a/dll/win32/msxml3/domdoc.c +++ b/dll/win32/msxml3/domdoc.c @@ -19,22 +19,42 @@ * 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); } diff --git a/dll/win32/msxml3/domimpl.c b/dll/win32/msxml3/domimpl.c index a18070a759..74223d5d54 100644 --- a/dll/win32/msxml3/domimpl.c +++ b/dll/win32/msxml3/domimpl.c @@ -18,10 +18,30 @@ * 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; diff --git a/dll/win32/msxml3/element.c b/dll/win32/msxml3/element.c index 5addf33835..6e00aa0116 100644 --- a/dll/win32/msxml3/element.c +++ b/dll/win32/msxml3/element.c @@ -18,10 +18,31 @@ * 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"; diff --git a/dll/win32/msxml3/entityref.c b/dll/win32/msxml3/entityref.c index 4946d70e80..5d5d424f25 100644 --- a/dll/win32/msxml3/entityref.c +++ b/dll/win32/msxml3/entityref.c @@ -18,10 +18,30 @@ * 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; diff --git a/dll/win32/msxml3/factory.c b/dll/win32/msxml3/factory.c index 3a01490ebe..445cfbf730 100644 --- a/dll/win32/msxml3/factory.c +++ b/dll/win32/msxml3/factory.c @@ -19,29 +19,29 @@ * 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; diff --git a/dll/win32/msxml3/httprequest.c b/dll/win32/msxml3/httprequest.c index 56bc51a932..40a976438d 100644 --- a/dll/win32/msxml3/httprequest.c +++ b/dll/win32/msxml3/httprequest.c @@ -19,14 +19,38 @@ * 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); diff --git a/dll/win32/msxml3/main.c b/dll/win32/msxml3/main.c index 3184ff1f6e..debd84e090 100644 --- a/dll/win32/msxml3/main.c +++ b/dll/win32/msxml3/main.c @@ -19,11 +19,15 @@ * 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> @@ -35,22 +39,37 @@ # 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: diff --git a/dll/win32/msxml3/msxml_private.h b/dll/win32/msxml3/msxml_private.h index 447df8d94e..d7039275ce 100644 --- a/dll/win32/msxml3/msxml_private.h +++ b/dll/win32/msxml3/msxml_private.h @@ -21,15 +21,18 @@ #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; diff --git a/dll/win32/msxml3/mxnamespace.c b/dll/win32/msxml3/mxnamespace.c index e41d1a45e6..dc6ff9c85a 100644 --- a/dll/win32/msxml3/mxnamespace.c +++ b/dll/win32/msxml3/mxnamespace.c @@ -18,7 +18,28 @@ * 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 { diff --git a/dll/win32/msxml3/mxwriter.c b/dll/win32/msxml3/mxwriter.c index 9d68e8cd62..10be2508b2 100644 --- a/dll/win32/msxml3/mxwriter.c +++ b/dll/win32/msxml3/mxwriter.c @@ -19,7 +19,26 @@ * 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; } diff --git a/dll/win32/msxml3/node.c b/dll/win32/msxml3/node.c index 2e22d2ff68..bcb4181374 100644 --- a/dll/win32/msxml3/node.c +++ b/dll/win32/msxml3/node.c @@ -18,9 +18,16 @@ * 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 @@ -33,11 +40,25 @@ # 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) diff --git a/dll/win32/msxml3/nodelist.c b/dll/win32/msxml3/nodelist.c index f52357019d..52415210df 100644 --- a/dll/win32/msxml3/nodelist.c +++ b/dll/win32/msxml3/nodelist.c @@ -18,9 +18,26 @@ * 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; diff --git a/dll/win32/msxml3/nodemap.c b/dll/win32/msxml3/nodemap.c index 3090d88054..a9fef4769d 100644 --- a/dll/win32/msxml3/nodemap.c +++ b/dll/win32/msxml3/nodemap.c @@ -18,11 +18,31 @@ * 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 { diff --git a/dll/win32/msxml3/parseerror.c b/dll/win32/msxml3/parseerror.c index 13fcb97402..438c9eb3c4 100644 --- a/dll/win32/msxml3/parseerror.c +++ b/dll/win32/msxml3/parseerror.c @@ -18,7 +18,29 @@ * 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 { diff --git a/dll/win32/msxml3/pi.c b/dll/win32/msxml3/pi.c index 5f0f9833d6..cea9570808 100644 --- a/dll/win32/msxml3/pi.c +++ b/dll/win32/msxml3/pi.c @@ -18,10 +18,30 @@ * 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; diff --git a/dll/win32/msxml3/precomp.h b/dll/win32/msxml3/precomp.h index d272c70203..cd365bdcf8 100644 --- a/dll/win32/msxml3/precomp.h +++ b/dll/win32/msxml3/precomp.h @@ -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_ */ diff --git a/dll/win32/msxml3/saxreader.c b/dll/win32/msxml3/saxreader.c index 5c8923caac..04fab81708 100644 --- a/dll/win32/msxml3/saxreader.c +++ b/dll/win32/msxml3/saxreader.c @@ -18,15 +18,37 @@ * 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); diff --git a/dll/win32/msxml3/schema.c b/dll/win32/msxml3/schema.c index 2c761518bd..d603d74218 100644 --- a/dll/win32/msxml3/schema.c +++ b/dll/win32/msxml3/schema.c @@ -19,17 +19,39 @@ * 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) diff --git a/dll/win32/msxml3/selection.c b/dll/win32/msxml3/selection.c index b0fccb381d..b7c560a9a5 100644 --- a/dll/win32/msxml3/selection.c +++ b/dll/win32/msxml3/selection.c @@ -20,13 +20,28 @@ * 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); diff --git a/dll/win32/msxml3/stylesheet.c b/dll/win32/msxml3/stylesheet.c index eb6358f6ce..9863ed7aa4 100644 --- a/dll/win32/msxml3/stylesheet.c +++ b/dll/win32/msxml3/stylesheet.c @@ -18,10 +18,30 @@ * 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 { diff --git a/dll/win32/msxml3/text.c b/dll/win32/msxml3/text.c index 41f8061435..abd89dbd6b 100644 --- a/dll/win32/msxml3/text.c +++ b/dll/win32/msxml3/text.c @@ -19,14 +19,31 @@ * 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( diff --git a/dll/win32/msxml3/uuid.c b/dll/win32/msxml3/uuid.c index f0d83b4e50..4abbe5e476 100644 --- a/dll/win32/msxml3/uuid.c +++ b/dll/win32/msxml3/uuid.c @@ -24,24 +24,22 @@ * 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 diff --git a/dll/win32/msxml3/version.rc b/dll/win32/msxml3/version.rc index 3cc9aa8071..cfb07bf222 100644 --- a/dll/win32/msxml3/version.rc +++ b/dll/win32/msxml3/version.rc @@ -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 diff --git a/dll/win32/msxml3/xdr.c b/dll/win32/msxml3/xdr.c index 101e7f3b57..b5e91bcf22 100644 --- a/dll/win32/msxml3/xdr.c +++ b/dll/win32/msxml3/xdr.c @@ -19,20 +19,23 @@ */ -#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"; diff --git a/dll/win32/msxml3/xmldoc.c b/dll/win32/msxml3/xmldoc.c index 34aa8dae3d..d0c65a44a3 100644 --- a/dll/win32/msxml3/xmldoc.c +++ b/dll/win32/msxml3/xmldoc.c @@ -18,10 +18,34 @@ * 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; diff --git a/dll/win32/msxml3/xmlelem.c b/dll/win32/msxml3/xmlelem.c index f356c24906..96b2007ce3 100644 --- a/dll/win32/msxml3/xmlelem.c +++ b/dll/win32/msxml3/xmlelem.c @@ -18,10 +18,31 @@ * 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 ); /********************************************************************** diff --git a/dll/win32/msxml3/xmlparser.c b/dll/win32/msxml3/xmlparser.c index 74709c4c65..6fcdb82c56 100644 --- a/dll/win32/msxml3/xmlparser.c +++ b/dll/win32/msxml3/xmlparser.c @@ -17,12 +17,32 @@ * 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; diff --git a/dll/win32/msxml3/xmlview.c b/dll/win32/msxml3/xmlview.c index c2aaaaa0b3..4460412024 100644 --- a/dll/win32/msxml3/xmlview.c +++ b/dll/win32/msxml3/xmlview.c @@ -16,15 +16,37 @@ * 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; diff --git a/dll/win32/msxml3/xslpattern.h b/dll/win32/msxml3/xslpattern.h index 699112e4fa..7b3ee2c727 100644 --- a/dll/win32/msxml3/xslpattern.h +++ b/dll/win32/msxml3/xslpattern.h @@ -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; diff --git a/dll/win32/msxml3/xslpattern.tab.c b/dll/win32/msxml3/xslpattern.tab.c index 66c8dd9a66..3fd70c2ddd 100644 --- a/dll/win32/msxml3/xslpattern.tab.c +++ b/dll/win32/msxml3/xslpattern.tab.c @@ -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" @@ -70,13 +70,16 @@ /* 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 diff --git a/dll/win32/msxml3/xslpattern.tab.h b/dll/win32/msxml3/xslpattern.tab.h index a9e30f34fb..df8761af4e 100644 --- a/dll/win32/msxml3/xslpattern.tab.h +++ b/dll/win32/msxml3/xslpattern.tab.h @@ -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 */ diff --git a/dll/win32/msxml3/xslpattern.yy.c b/dll/win32/msxml3/xslpattern.yy.c index d56541e404..c29fd3e3dc 100644 --- a/dll/win32/msxml3/xslpattern.yy.c +++ b/dll/win32/msxml3/xslpattern.yy.c @@ -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 index 0000000000..86887f9710 --- /dev/null +++ b/dll/win32/msxml3/xslpattern.yy.h @@ -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 */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index c8177dab4b..d28d5365ab 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -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
7 years
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200