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
2024
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
December 2017
----- 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
26 participants
355 discussions
Start a n
N
ew thread
[reactos] 01/01: [SHELL32_APITEST] Improve the existing PCH and make use of it. Convert AddCommas.c to c++ in order to have it benefit from the PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8ed8eec17cff57e43a6ef…
commit 8ed8eec17cff57e43a6effa6cf5e0df350fc0241 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 17 13:31:22 2017 +0100 [SHELL32_APITEST] Improve the existing PCH and make use of it. Convert AddCommas.c to c++ in order to have it benefit from the PCH. --- .../shell32/{AddCommas.c => AddCommas.cpp} | 7 ++--- modules/rostests/apitests/shell32/CFSFolder.cpp | 3 -- modules/rostests/apitests/shell32/CMakeLists.txt | 14 ++++++--- modules/rostests/apitests/shell32/CMyComputer.cpp | 3 -- .../rostests/apitests/shell32/CShellDesktop.cpp | 8 +---- modules/rostests/apitests/shell32/CShellLink.cpp | 4 --- .../rostests/apitests/shell32/Control_RunDLLW.cpp | 3 ++ modules/rostests/apitests/shell32/PathResolve.cpp | 1 + .../apitests/shell32/SHCreateFileExtractIconW.cpp | 7 ++--- .../apitests/shell32/SHParseDisplayName.cpp | 3 -- .../rostests/apitests/shell32/ShellExecuteEx.cpp | 3 -- modules/rostests/apitests/shell32/menu.cpp | 7 +++++ modules/rostests/apitests/shell32/shelltest.cpp | 3 -- modules/rostests/apitests/shell32/shelltest.h | 36 +++++++--------------- 14 files changed, 39 insertions(+), 63 deletions(-) diff --git a/modules/rostests/apitests/shell32/AddCommas.c b/modules/rostests/apitests/shell32/AddCommas.cpp similarity index 94% rename from modules/rostests/apitests/shell32/AddCommas.c rename to modules/rostests/apitests/shell32/AddCommas.cpp index 4bc7cd0d94..69ac99021f 100644 --- a/modules/rostests/apitests/shell32/AddCommas.c +++ b/modules/rostests/apitests/shell32/AddCommas.cpp @@ -5,14 +5,13 @@ * PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org> */ -#include <apitest.h> -#include <windef.h> +#include "shelltest.h" + #include <winnls.h> #include <bcrypt.h> -#include <ntstatus.h> #include <strsafe.h> -DECLSPEC_IMPORT LPWSTR WINAPI AddCommasW(DWORD lValue, LPWSTR lpNumber); +extern "C" DECLSPEC_IMPORT LPWSTR WINAPI AddCommasW(DWORD lValue, LPWSTR lpNumber); START_TEST(AddCommas) { diff --git a/modules/rostests/apitests/shell32/CFSFolder.cpp b/modules/rostests/apitests/shell32/CFSFolder.cpp index 6a68078b95..57c015b351 100644 --- a/modules/rostests/apitests/shell32/CFSFolder.cpp +++ b/modules/rostests/apitests/shell32/CFSFolder.cpp @@ -6,9 +6,6 @@ */ #include "shelltest.h" -#include <atlbase.h> -#include <atlcom.h> -#include <strsafe.h> #define NDEBUG #include <debug.h> diff --git a/modules/rostests/apitests/shell32/CMakeLists.txt b/modules/rostests/apitests/shell32/CMakeLists.txt index 48c41820c9..a30f8db886 100644 --- a/modules/rostests/apitests/shell32/CMakeLists.txt +++ b/modules/rostests/apitests/shell32/CMakeLists.txt @@ -1,12 +1,12 @@ -spec2def(shell32_apitest.exe shell32_apitest.spec) - set_cpp(WITH_RUNTIME) +spec2def(shell32_apitest.exe shell32_apitest.spec) + include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl) -add_executable(shell32_apitest - AddCommas.c +list(APPEND SOURCE + AddCommas.cpp Control_RunDLLW.cpp CFSFolder.cpp CMyComputer.cpp @@ -18,10 +18,16 @@ add_executable(shell32_apitest ShellExecuteEx.cpp shelltest.cpp SHParseDisplayName.cpp + shelltest.h) + +add_executable(shell32_apitest + ${SOURCE} testlist.c resource.rc ${CMAKE_CURRENT_BINARY_DIR}/shell32_apitest.def) + target_link_libraries(shell32_apitest wine uuid ${PSEH_LIB}) set_module_type(shell32_apitest win32cui) add_importlibs(shell32_apitest user32 gdi32 shell32 ole32 oleaut32 advapi32 shlwapi msvcrt kernel32 ntdll) +add_pch(shell32_apitest shelltest.h SOURCE) add_rostests_file(TARGET shell32_apitest) diff --git a/modules/rostests/apitests/shell32/CMyComputer.cpp b/modules/rostests/apitests/shell32/CMyComputer.cpp index 06341b5606..712cf4dcd0 100644 --- a/modules/rostests/apitests/shell32/CMyComputer.cpp +++ b/modules/rostests/apitests/shell32/CMyComputer.cpp @@ -6,9 +6,6 @@ */ #include "shelltest.h" -#include <atlbase.h> -#include <atlcom.h> -#include <strsafe.h> #define NDEBUG #include <debug.h> diff --git a/modules/rostests/apitests/shell32/CShellDesktop.cpp b/modules/rostests/apitests/shell32/CShellDesktop.cpp index 61a462d57a..7b1fd34adb 100644 --- a/modules/rostests/apitests/shell32/CShellDesktop.cpp +++ b/modules/rostests/apitests/shell32/CShellDesktop.cpp @@ -7,16 +7,10 @@ */ #include "shelltest.h" -#include <atlbase.h> -#include <atlcom.h> -#include <strsafe.h> -#include <ndk/rtlfuncs.h> -#define NDEBUG -#include <debug.h> +#include <ndk/rtlfuncs.h> #include <shellutils.h> - // We would normally use S_LESSTHAN and S_GREATERTHAN, but w2k3 returns numbers like 3 and -3... // So instead we check on the sign bit (compare result is the low word of the hresult). #define SHORT_SIGN_BIT 0x8000 diff --git a/modules/rostests/apitests/shell32/CShellLink.cpp b/modules/rostests/apitests/shell32/CShellLink.cpp index ff69dd4772..0e5cd53269 100644 --- a/modules/rostests/apitests/shell32/CShellLink.cpp +++ b/modules/rostests/apitests/shell32/CShellLink.cpp @@ -6,10 +6,6 @@ */ #include "shelltest.h" -#include <atlbase.h> -#include <atlcom.h> -#include <strsafe.h> -#include <ndk/rtlfuncs.h> #define NDEBUG #include <debug.h> diff --git a/modules/rostests/apitests/shell32/Control_RunDLLW.cpp b/modules/rostests/apitests/shell32/Control_RunDLLW.cpp index d3d189eac1..d68d48fa5b 100644 --- a/modules/rostests/apitests/shell32/Control_RunDLLW.cpp +++ b/modules/rostests/apitests/shell32/Control_RunDLLW.cpp @@ -6,7 +6,10 @@ */ #include "shelltest.h" + #include <cpl.h> +#include <stdio.h> + #define NDEBUG #include <debug.h> diff --git a/modules/rostests/apitests/shell32/PathResolve.cpp b/modules/rostests/apitests/shell32/PathResolve.cpp index 2a527e958e..122f1d083b 100644 --- a/modules/rostests/apitests/shell32/PathResolve.cpp +++ b/modules/rostests/apitests/shell32/PathResolve.cpp @@ -6,6 +6,7 @@ */ #include "shelltest.h" + #include <assert.h> /* diff --git a/modules/rostests/apitests/shell32/SHCreateFileExtractIconW.cpp b/modules/rostests/apitests/shell32/SHCreateFileExtractIconW.cpp index 38247dabe3..e6103385d0 100644 --- a/modules/rostests/apitests/shell32/SHCreateFileExtractIconW.cpp +++ b/modules/rostests/apitests/shell32/SHCreateFileExtractIconW.cpp @@ -6,13 +6,12 @@ */ #include "shelltest.h" -#include <atlbase.h> -#include <atlcom.h> -ULONG DbgPrint(PCH Format,...); -#include <shellutils.h> + #include <wincon.h> #include <wingdi.h> +ULONG DbgPrint(PCH Format,...); +#include <shellutils.h> HRESULT (STDAPICALLTYPE *pSHCreateFileExtractIconW)(LPCWSTR pszFile, DWORD dwFileAttributes, REFIID riid, void **ppv); diff --git a/modules/rostests/apitests/shell32/SHParseDisplayName.cpp b/modules/rostests/apitests/shell32/SHParseDisplayName.cpp index cc495dc811..ad9c94d289 100644 --- a/modules/rostests/apitests/shell32/SHParseDisplayName.cpp +++ b/modules/rostests/apitests/shell32/SHParseDisplayName.cpp @@ -6,9 +6,6 @@ */ #include "shelltest.h" -#include "apitest.h" -#include <ndk/umtypes.h> -#include <strsafe.h> /* Version masks */ #define T_ALL 0x0 diff --git a/modules/rostests/apitests/shell32/ShellExecuteEx.cpp b/modules/rostests/apitests/shell32/ShellExecuteEx.cpp index aa7bbc72ae..73afcd1e2e 100644 --- a/modules/rostests/apitests/shell32/ShellExecuteEx.cpp +++ b/modules/rostests/apitests/shell32/ShellExecuteEx.cpp @@ -5,11 +5,8 @@ * PROGRAMMER: Yaroslav Veremenko <yaroslav(a)veremenko.info> */ - #include "shelltest.h" - - #define ok_ShellExecuteEx (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : TestShellExecuteEx static diff --git a/modules/rostests/apitests/shell32/menu.cpp b/modules/rostests/apitests/shell32/menu.cpp index 09e8a2bb15..b10fef0013 100644 --- a/modules/rostests/apitests/shell32/menu.cpp +++ b/modules/rostests/apitests/shell32/menu.cpp @@ -7,6 +7,13 @@ #include "shelltest.h" +#include <shlwapi.h> +#include <unknownbase.h> +#include <shlguid_undoc.h> + +#define test_S_OK(hres, message) ok(hres == S_OK, "%s (0x%lx instead of S_OK)\n",message, hResult); +#define test_HRES(hres, hresExpected, message) ok(hres == hresExpected, "%s (0x%lx instead of 0x%lx)\n",message, hResult,hresExpected); + BOOL CheckWindowClass(HWND hwnd, PCWSTR className) { ULONG size = (wcslen(className) + 1)* sizeof(WCHAR); diff --git a/modules/rostests/apitests/shell32/shelltest.cpp b/modules/rostests/apitests/shell32/shelltest.cpp index 8f362c304e..65f0d42eef 100644 --- a/modules/rostests/apitests/shell32/shelltest.cpp +++ b/modules/rostests/apitests/shell32/shelltest.cpp @@ -1,7 +1,4 @@ #include "shelltest.h" -#include <atlbase.h> -#include <atlcom.h> - // + Adapted from
https://blogs.msdn.microsoft.com/oldnewthing/20130503-00/?p=4463/
// In short: We want to create an IDLIST from an item that does not exist, diff --git a/modules/rostests/apitests/shell32/shelltest.h b/modules/rostests/apitests/shell32/shelltest.h index f24e54fa2a..75951cbac4 100644 --- a/modules/rostests/apitests/shell32/shelltest.h +++ b/modules/rostests/apitests/shell32/shelltest.h @@ -1,32 +1,18 @@ -#define WIN32_NO_STATUS +#ifndef _SHELLTEST_H_ +#define _SHELLTEST_H_ + #define _INC_WINDOWS #define COM_NO_WINDOWS_H -#include <stdio.h> -#include <wine/test.h> - - -#include <winuser.h> +#include <ntstatus.h> +#define WIN32_NO_STATUS +#include <apitest.h> #include <winreg.h> - -#include <commctrl.h> -#include <shellapi.h> #include <shlobj.h> -#include <shlwapi.h> - -#include <stdlib.h> -#include <malloc.h> -#include <memory.h> -#include <string.h> -#include <tchar.h> - -#include <initguid.h> - -#define test_S_OK(hres, message) ok(hres == S_OK, "%s (0x%lx instead of S_OK)\n",message, hResult); -#define test_HRES(hres, hresExpected, message) ok(hres == hresExpected, "%s (0x%lx instead of 0x%lx)\n",message, hResult,hresExpected); - -DEFINE_GUID(CLSID_MenuBandSite, 0xE13EF4E4, 0xD2F2, 0x11D0, 0x98, 0x16, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72); - -#include "unknownbase.h" +#include <shellapi.h> +#include <atlbase.h> +#include <atlcom.h> VOID PathToIDList(LPCWSTR pszPath, ITEMIDLIST** ppidl); + +#endif /* !_SHELLTEST_H_ */
6 years, 9 months
1
0
0
0
[reactos] 01/01: [GDI32_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=95ec9464d3af01d9e7606…
commit 95ec9464d3af01d9e7606fe4465230a22fc508ec Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 17 13:20:00 2017 +0100 [GDI32_WINETEST] Add a PCH. --- modules/rostests/winetests/gdi32/CMakeLists.txt | 9 +++++++-- modules/rostests/winetests/gdi32/bitmap.c | 17 ++--------------- modules/rostests/winetests/gdi32/brush.c | 9 +-------- modules/rostests/winetests/gdi32/clipping.c | 5 +---- modules/rostests/winetests/gdi32/dc.c | 15 ++------------- modules/rostests/winetests/gdi32/dib.c | 15 +++------------ modules/rostests/winetests/gdi32/font.c | 11 ++--------- modules/rostests/winetests/gdi32/gdiobj.c | 10 +--------- modules/rostests/winetests/gdi32/generated.c | 10 +--------- modules/rostests/winetests/gdi32/icm.c | 9 +-------- modules/rostests/winetests/gdi32/mapping.c | 9 +-------- modules/rostests/winetests/gdi32/metafile.c | 10 +--------- modules/rostests/winetests/gdi32/palette.c | 10 +--------- modules/rostests/winetests/gdi32/path.c | 12 +----------- modules/rostests/winetests/gdi32/pen.c | 9 +-------- modules/rostests/winetests/gdi32/precomp.h | 16 ++++++++++++++++ 16 files changed, 42 insertions(+), 134 deletions(-) diff --git a/modules/rostests/winetests/gdi32/CMakeLists.txt b/modules/rostests/winetests/gdi32/CMakeLists.txt index 79cdf3125d..b9a497434d 100644 --- a/modules/rostests/winetests/gdi32/CMakeLists.txt +++ b/modules/rostests/winetests/gdi32/CMakeLists.txt @@ -16,9 +16,13 @@ list(APPEND SOURCE palette.c path.c pen.c - testlist.c) + precomp.h) + +add_executable(gdi32_winetest + ${SOURCE} + testlist.c + resource.rc) -add_executable(gdi32_winetest ${SOURCE} resource.rc) set_module_type(gdi32_winetest win32cui) add_importlibs(gdi32_winetest gdi32 user32 advapi32 msvcrt kernel32) @@ -26,4 +30,5 @@ if(MSVC) add_importlibs(gdi32_winetest ntdll) endif() +add_pch(gdi32_winetest precomp.h SOURCE) add_rostests_file(TARGET gdi32_winetest) diff --git a/modules/rostests/winetests/gdi32/bitmap.c b/modules/rostests/winetests/gdi32/bitmap.c index 2b01e74e42..49460506f5 100755 --- a/modules/rostests/winetests/gdi32/bitmap.c +++ b/modules/rostests/winetests/gdi32/bitmap.c @@ -19,25 +19,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <assert.h> -#include <string.h> - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "winuser.h" -#include "mmsystem.h" -#include "wine/winternl.h" +#include "precomp.h" + #ifndef __REACTOS__ /* CORE-11331 */ #include "wine/ddk/d3dkmthk.h" #endif -#include "wine/test.h" - #ifndef __REACTOS__ /* CORE-11331 */ static NTSTATUS (WINAPI *pD3DKMTCreateDCFromMemory)( D3DKMT_CREATEDCFROMMEMORY *desc ); static NTSTATUS (WINAPI *pD3DKMTDestroyDCFromMemory)( const D3DKMT_DESTROYDCFROMMEMORY *desc ); diff --git a/modules/rostests/winetests/gdi32/brush.c b/modules/rostests/winetests/gdi32/brush.c index 1a10429c05..7420995316 100755 --- a/modules/rostests/winetests/gdi32/brush.c +++ b/modules/rostests/winetests/gdi32/brush.c @@ -18,14 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#include "wine/test.h" +#include "precomp.h" typedef struct _STOCK_BRUSH { COLORREF color; diff --git a/modules/rostests/winetests/gdi32/clipping.c b/modules/rostests/winetests/gdi32/clipping.c index 60bd31e8e4..02b39e3c12 100644 --- a/modules/rostests/winetests/gdi32/clipping.c +++ b/modules/rostests/winetests/gdi32/clipping.c @@ -19,10 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" +#include "precomp.h" static void test_GetRandomRgn(void) { diff --git a/modules/rostests/winetests/gdi32/dc.c b/modules/rostests/winetests/gdi32/dc.c index d24898929e..7f9c91ac36 100644 --- a/modules/rostests/winetests/gdi32/dc.c +++ b/modules/rostests/winetests/gdi32/dc.c @@ -19,20 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "precomp.h" -#define WINVER 0x0501 /* request latest DEVMODE */ -#define NONAMELESSSTRUCT -#define NONAMELESSUNION - -#include <assert.h> -#include <stdio.h> - -#include "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winspool.h" -#include "winerror.h" +#include <winspool.h> #ifndef LAYOUT_LTR #define LAYOUT_LTR 0 diff --git a/modules/rostests/winetests/gdi32/dib.c b/modules/rostests/winetests/gdi32/dib.c index 5ef63586d6..0ec9e58e37 100644 --- a/modules/rostests/winetests/gdi32/dib.c +++ b/modules/rostests/winetests/gdi32/dib.c @@ -18,18 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <stdio.h> -#include <math.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "wincrypt.h" -#include "mmsystem.h" /* DIBINDEX */ - -#include "wine/test.h" +#include "precomp.h" + +#include <wincrypt.h> #ifndef M_PI #define M_PI 3.14159265358979323846 diff --git a/modules/rostests/winetests/gdi32/font.c b/modules/rostests/winetests/gdi32/font.c index 70708d5438..61ee6f3ed8 100644 --- a/modules/rostests/winetests/gdi32/font.c +++ b/modules/rostests/winetests/gdi32/font.c @@ -19,16 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <assert.h> +#include "precomp.h" -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" - -#include "wine/test.h" +#include <winnls.h> static inline BOOL match_off_by_n(int a, int b, unsigned int n) { diff --git a/modules/rostests/winetests/gdi32/gdiobj.c b/modules/rostests/winetests/gdi32/gdiobj.c index 65374ea85d..729a96d40b 100755 --- a/modules/rostests/winetests/gdi32/gdiobj.c +++ b/modules/rostests/winetests/gdi32/gdiobj.c @@ -19,15 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <assert.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#include "wine/test.h" +#include "precomp.h" static void test_gdi_objects(void) { diff --git a/modules/rostests/winetests/gdi32/generated.c b/modules/rostests/winetests/gdi32/generated.c index 019524df86..1507be9843 100644 --- a/modules/rostests/winetests/gdi32/generated.c +++ b/modules/rostests/winetests/gdi32/generated.c @@ -5,15 +5,7 @@ * Unit tests for data structure packing */ -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include "windows.h" - -#include "wine/test.h" +#include "precomp.h" /*********************************************************************** * Compatibility macros diff --git a/modules/rostests/winetests/gdi32/icm.c b/modules/rostests/winetests/gdi32/icm.c index 620809018a..76ba1adbba 100644 --- a/modules/rostests/winetests/gdi32/icm.c +++ b/modules/rostests/winetests/gdi32/icm.c @@ -18,14 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "wingdi.h" - -#include "wine/test.h" +#include "precomp.h" static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0}; diff --git a/modules/rostests/winetests/gdi32/mapping.c b/modules/rostests/winetests/gdi32/mapping.c index 6635a72c18..810c1b0fee 100644 --- a/modules/rostests/winetests/gdi32/mapping.c +++ b/modules/rostests/winetests/gdi32/mapping.c @@ -19,14 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> -#include <math.h> - -#include "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" +#include "precomp.h" static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout); static DWORD (WINAPI *pGetLayout)(HDC hdc); diff --git a/modules/rostests/winetests/gdi32/metafile.c b/modules/rostests/winetests/gdi32/metafile.c index eeec79c800..c7da7bf54f 100755 --- a/modules/rostests/winetests/gdi32/metafile.c +++ b/modules/rostests/winetests/gdi32/metafile.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <assert.h> -#include <stdio.h> -#include <math.h> - -#include "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" +#include "precomp.h" static LOGFONTA orig_lf; static BOOL emr_processed = FALSE; diff --git a/modules/rostests/winetests/gdi32/palette.c b/modules/rostests/winetests/gdi32/palette.c index 045f5300b1..a4e4f364bb 100644 --- a/modules/rostests/winetests/gdi32/palette.c +++ b/modules/rostests/winetests/gdi32/palette.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "mmsystem.h" - -#include "wine/test.h" +#include "precomp.h" static const PALETTEENTRY logpalettedata[8] = { { 0x10, 0x20, 0x30, PC_NOCOLLAPSE }, diff --git a/modules/rostests/winetests/gdi32/path.c b/modules/rostests/winetests/gdi32/path.c index 48ef4f016a..78bf7ae632 100644 --- a/modules/rostests/winetests/gdi32/path.c +++ b/modules/rostests/winetests/gdi32/path.c @@ -19,17 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <stdio.h> -#include <assert.h> -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" - -#include "wine/test.h" - -#include "winuser.h" -#include "winerror.h" +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) diff --git a/modules/rostests/winetests/gdi32/pen.c b/modules/rostests/winetests/gdi32/pen.c index 43f00d8f50..1937e4030c 100644 --- a/modules/rostests/winetests/gdi32/pen.c +++ b/modules/rostests/winetests/gdi32/pen.c @@ -18,14 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#include "wine/test.h" +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expect2(expected, alt, got) ok(got == expected || got == alt, \ diff --git a/modules/rostests/winetests/gdi32/precomp.h b/modules/rostests/winetests/gdi32/precomp.h new file mode 100644 index 0000000000..11e9e70e51 --- /dev/null +++ b/modules/rostests/winetests/gdi32/precomp.h @@ -0,0 +1,16 @@ +#ifndef _GDI32_WINETEST_PRECOMP_H_ +#define _GDI32_WINETEST_PRECOMP_H_ + +#define WIN32_NO_STATUS +#define NONAMELESSUNION + +#include <assert.h> +#include <stdio.h> +#include <math.h> + +#include <wine/test.h> +#include <wingdi.h> +#include <winuser.h> +#include <mmsystem.h> + +#endif /* !_GDI32_WINETEST_PRECOMP_H_ */
6 years, 9 months
1
0
0
0
[reactos] 01/01: [GDIPLUS_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cded6efd75a9bf4191d3a…
commit cded6efd75a9bf4191d3aedfd50406e84d383c05 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 17 13:14:57 2017 +0100 [GDIPLUS_WINETEST] Add a PCH. --- modules/rostests/winetests/gdiplus/CMakeLists.txt | 7 +++++- modules/rostests/winetests/gdiplus/brush.c | 11 +-------- modules/rostests/winetests/gdiplus/customlinecap.c | 10 +------- modules/rostests/winetests/gdiplus/font.c | 13 +---------- modules/rostests/winetests/gdiplus/graphics.c | 12 +--------- modules/rostests/winetests/gdiplus/graphicspath.c | 11 +-------- modules/rostests/winetests/gdiplus/guid.c | 27 ++++++++++++++++++++++ modules/rostests/winetests/gdiplus/image.c | 15 +----------- modules/rostests/winetests/gdiplus/matrix.c | 13 +---------- modules/rostests/winetests/gdiplus/metafile.c | 11 +-------- modules/rostests/winetests/gdiplus/pathiterator.c | 10 +------- modules/rostests/winetests/gdiplus/pen.c | 12 +--------- modules/rostests/winetests/gdiplus/precomp.h | 17 ++++++++++++++ modules/rostests/winetests/gdiplus/region.c | 11 +-------- modules/rostests/winetests/gdiplus/stringformat.c | 10 +------- 15 files changed, 62 insertions(+), 128 deletions(-) diff --git a/modules/rostests/winetests/gdiplus/CMakeLists.txt b/modules/rostests/winetests/gdiplus/CMakeLists.txt index 06ad713502..6bac596c78 100644 --- a/modules/rostests/winetests/gdiplus/CMakeLists.txt +++ b/modules/rostests/winetests/gdiplus/CMakeLists.txt @@ -14,9 +14,14 @@ list(APPEND SOURCE pen.c region.c stringformat.c + precomp.h) + +add_executable(gdiplus_winetest + ${SOURCE} + guid.c testlist.c) -add_executable(gdiplus_winetest ${SOURCE}) set_module_type(gdiplus_winetest win32cui) add_importlibs(gdiplus_winetest gdiplus user32 gdi32 ole32 msvcrt kernel32) +add_pch(gdiplus_winetest precomp.h SOURCE) add_rostests_file(TARGET gdiplus_winetest) diff --git a/modules/rostests/winetests/gdiplus/brush.c b/modules/rostests/winetests/gdiplus/brush.c index 759090bdbf..ec9a74ba15 100644 --- a/modules/rostests/winetests/gdiplus/brush.c +++ b/modules/rostests/winetests/gdiplus/brush.c @@ -18,16 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> -#include <math.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/customlinecap.c b/modules/rostests/winetests/gdiplus/customlinecap.c index b406eccda9..8bfa06c0b4 100644 --- a/modules/rostests/winetests/gdiplus/customlinecap.c +++ b/modules/rostests/winetests/gdiplus/customlinecap.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/font.c b/modules/rostests/winetests/gdiplus/font.c index f31a5ee4b8..b68c2ba539 100644 --- a/modules/rostests/winetests/gdiplus/font.c +++ b/modules/rostests/winetests/gdiplus/font.c @@ -19,18 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <winnls.h> -#include <objbase.h> -#include <gdiplus.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) #define expect_(expected, got, precision) ok(abs((expected) - (got)) <= (precision), "Expected %d, got %d\n", (expected), (got)) diff --git a/modules/rostests/winetests/gdiplus/graphics.c b/modules/rostests/winetests/gdiplus/graphics.c index 33fee40d16..2ea529b496 100644 --- a/modules/rostests/winetests/gdiplus/graphics.c +++ b/modules/rostests/winetests/gdiplus/graphics.c @@ -19,17 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> +#include "precomp.h" #define expect(expected, got) ok((got) == (expected), "Expected %d, got %d\n", (INT)(expected), (INT)(got)) #define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got)) diff --git a/modules/rostests/winetests/gdiplus/graphicspath.c b/modules/rostests/winetests/gdiplus/graphicspath.c index 6206096db8..b601aad0f9 100644 --- a/modules/rostests/winetests/gdiplus/graphicspath.c +++ b/modules/rostests/winetests/gdiplus/graphicspath.c @@ -18,16 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> -#include <math.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/guid.c b/modules/rostests/winetests/gdiplus/guid.c new file mode 100644 index 0000000000..d7bbe34d19 --- /dev/null +++ b/modules/rostests/winetests/gdiplus/guid.c @@ -0,0 +1,27 @@ +/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */ + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include <windef.h> +#include <winbase.h> +#include <wingdi.h> +#include <objbase.h> +#include <initguid.h> +#include <gdiplus.h> + +/* FIXME: They belong to gdipluseffects.h */ +DEFINE_GUID(BlurEffectGuid, 0x633c80a4, 0x1843, 0x482b, 0x9e, 0xf2, 0xbe, 0x28, 0x34, 0xc5, 0xfd, 0xd4); +DEFINE_GUID(SharpenEffectGuid, 0x63cbf3ee, 0xc526, 0x402c, 0x8f, 0x71, 0x62, 0xc5, 0x40, 0xbf, 0x51, 0x42); +DEFINE_GUID(ColorMatrixEffectGuid, 0x718f2615, 0x7933, 0x40e3, 0xa5, 0x11, 0x5f, 0x68, 0xfe, 0x14, 0xdd, 0x74); +DEFINE_GUID(ColorLUTEffectGuid, 0xa7ce72a9, 0x0f7f, 0x40d7, 0xb3, 0xcc, 0xd0, 0xc0, 0x2d, 0x5c, 0x32, 0x12); +DEFINE_GUID(BrightnessContrastEffectGuid, 0xd3a1dbe1, 0x8ec4, 0x4c17, 0x9f, 0x4c, 0xea, 0x97, 0xad, 0x1c, 0x34, 0x3d); +DEFINE_GUID(HueSaturationLightnessEffectGuid, 0x8b2dd6c3, 0xeb07, 0x4d87, 0xa5, 0xf0, 0x71, 0x08, 0xe2, 0x6a, 0x9c, 0x5f); +DEFINE_GUID(LevelsEffectGuid, 0x99c354ec, 0x2a31, 0x4f3a, 0x8c, 0x34, 0x17, 0xa8, 0x03, 0xb3, 0x3a, 0x25); +DEFINE_GUID(TintEffectGuid, 0x1077af00, 0x2848, 0x4441, 0x94, 0x89, 0x44, 0xad, 0x4c, 0x2d, 0x7a, 0x2c); +DEFINE_GUID(ColorBalanceEffectGuid, 0x537e597d, 0x251e, 0x48da, 0x96, 0x64, 0x29, 0xca, 0x49, 0x6b, 0x70, 0xf8); +DEFINE_GUID(RedEyeCorrectionEffectGuid, 0x74d29d05, 0x69a4, 0x4266, 0x95, 0x49, 0x3c, 0xc5, 0x28, 0x36, 0xb6, 0x32); +DEFINE_GUID(ColorCurveEffectGuid, 0xdd6a0022, 0x58e4, 0x4a67, 0x9d, 0x9b, 0xd4, 0x8e, 0xb8, 0x81, 0xa5, 0x3d); + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/modules/rostests/winetests/gdiplus/image.c b/modules/rostests/winetests/gdiplus/image.c index a332ddf71f..d87df83127 100644 --- a/modules/rostests/winetests/gdiplus/image.c +++ b/modules/rostests/winetests/gdiplus/image.c @@ -19,23 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define COBJMACROS +#include "precomp.h" -#include <math.h> #include <assert.h> -#include <stdio.h> - -#include <initguid.h> -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <winnls.h> #include <ole2.h> -#include <gdiplus.h> /* FIXME: They belong to gdipluseffects.h */ DEFINE_GUID(BlurEffectGuid, 0x633c80a4, 0x1843, 0x482b, 0x9e, 0xf2, 0xbe, 0x28, 0x34, 0xc5, 0xfd, 0xd4); diff --git a/modules/rostests/winetests/gdiplus/matrix.c b/modules/rostests/winetests/gdiplus/matrix.c index e1e61aa2a1..b6c04f62ea 100644 --- a/modules/rostests/winetests/gdiplus/matrix.c +++ b/modules/rostests/winetests/gdiplus/matrix.c @@ -18,18 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> -#include <wine/test.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/metafile.c b/modules/rostests/winetests/gdiplus/metafile.c index 123576729a..b4bf38a6fd 100644 --- a/modules/rostests/winetests/gdiplus/metafile.c +++ b/modules/rostests/winetests/gdiplus/metafile.c @@ -18,16 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include <math.h> - -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got)) diff --git a/modules/rostests/winetests/gdiplus/pathiterator.c b/modules/rostests/winetests/gdiplus/pathiterator.c index cf6d10028b..753ea64cba 100644 --- a/modules/rostests/winetests/gdiplus/pathiterator.c +++ b/modules/rostests/winetests/gdiplus/pathiterator.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/pen.c b/modules/rostests/winetests/gdiplus/pen.c index 39833caec0..c7847d7991 100644 --- a/modules/rostests/winetests/gdiplus/pen.c +++ b/modules/rostests/winetests/gdiplus/pen.c @@ -18,17 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <math.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(fabs(got - expected) < 0.1, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/precomp.h b/modules/rostests/winetests/gdiplus/precomp.h new file mode 100644 index 0000000000..77fa1fca09 --- /dev/null +++ b/modules/rostests/winetests/gdiplus/precomp.h @@ -0,0 +1,17 @@ +#ifndef _GDIPLUS_WINETEST_PRECOMP_H_ +#define _GDIPLUS_WINETEST_PRECOMP_H_ + +#include <math.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H +#define COBJMACROS + +#include <wine/test.h> +#include <wingdi.h> +#include <winnls.h> +#include <objbase.h> +#include <gdiplus.h> + +#endif /* !_GDIPLUS_WINETEST_PRECOMP_H_ */ diff --git a/modules/rostests/winetests/gdiplus/region.c b/modules/rostests/winetests/gdiplus/region.c index 878c00089b..fc2675bf47 100644 --- a/modules/rostests/winetests/gdiplus/region.c +++ b/modules/rostests/winetests/gdiplus/region.c @@ -19,16 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> -#include <math.h> +#include "precomp.h" #define RGNDATA_RECT 0x10000000 #define RGNDATA_PATH 0x10000001 diff --git a/modules/rostests/winetests/gdiplus/stringformat.c b/modules/rostests/winetests/gdiplus/stringformat.c index b06726f368..332799b9a9 100644 --- a/modules/rostests/winetests/gdiplus/stringformat.c +++ b/modules/rostests/winetests/gdiplus/stringformat.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include <wine/test.h> -#include <wingdi.h> -#include <objbase.h> -#include <gdiplus.h> +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got)
6 years, 9 months
1
0
0
0
[reactos] 01/01: [CRYPT32_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5bd2230dc854ebaf60910…
commit 5bd2230dc854ebaf60910a2b83365044e635e20f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 17 12:33:39 2017 +0100 [CRYPT32_WINETEST] Add a PCH. --- modules/rostests/winetests/crypt32/CMakeLists.txt | 5 +++-- modules/rostests/winetests/crypt32/base64.c | 10 ++-------- modules/rostests/winetests/crypt32/cert.c | 11 +---------- modules/rostests/winetests/crypt32/chain.c | 9 +-------- modules/rostests/winetests/crypt32/crl.c | 12 +----------- modules/rostests/winetests/crypt32/ctl.c | 10 +--------- modules/rostests/winetests/crypt32/encode.c | 9 +-------- modules/rostests/winetests/crypt32/main.c | 10 +--------- modules/rostests/winetests/crypt32/message.c | 9 +-------- modules/rostests/winetests/crypt32/msg.c | 11 +---------- modules/rostests/winetests/crypt32/object.c | 8 +------- modules/rostests/winetests/crypt32/oid.c | 10 +--------- modules/rostests/winetests/crypt32/precomp.h | 11 +++++++++++ modules/rostests/winetests/crypt32/protectdata.c | 9 +-------- modules/rostests/winetests/crypt32/sip.c | 10 ++-------- modules/rostests/winetests/crypt32/store.c | 10 +--------- modules/rostests/winetests/crypt32/str.c | 8 +------- 17 files changed, 31 insertions(+), 131 deletions(-) diff --git a/modules/rostests/winetests/crypt32/CMakeLists.txt b/modules/rostests/winetests/crypt32/CMakeLists.txt index 6211969dd3..169694b28d 100644 --- a/modules/rostests/winetests/crypt32/CMakeLists.txt +++ b/modules/rostests/winetests/crypt32/CMakeLists.txt @@ -17,9 +17,10 @@ list(APPEND SOURCE sip.c store.c str.c - testlist.c) + precomp.h) -add_executable(crypt32_winetest ${SOURCE}) +add_executable(crypt32_winetest ${SOURCE} testlist.c) set_module_type(crypt32_winetest win32cui) add_importlibs(crypt32_winetest crypt32 advapi32 user32 shlwapi shell32 msvcrt kernel32) +add_pch(crypt32_winetest precomp.h SOURCE) add_rostests_file(TARGET crypt32_winetest) diff --git a/modules/rostests/winetests/crypt32/base64.c b/modules/rostests/winetests/crypt32/base64.c index 26ae20bead..4898d3897e 100644 --- a/modules/rostests/winetests/crypt32/base64.c +++ b/modules/rostests/winetests/crypt32/base64.c @@ -18,14 +18,8 @@ * 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 <stdio.h> -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> - -#include <wine/test.h> + +#include "precomp.h" #define CERT_HEADER "-----BEGIN CERTIFICATE-----\r\n" #define ALT_CERT_HEADER "-----BEGIN This is some arbitrary text that goes on and on-----\r\n" diff --git a/modules/rostests/winetests/crypt32/cert.c b/modules/rostests/winetests/crypt32/cert.c index 28cc421cf8..8a8d36b926 100644 --- a/modules/rostests/winetests/crypt32/cert.c +++ b/modules/rostests/winetests/crypt32/cert.c @@ -18,16 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdio.h> -#include <stdarg.h> - -#include <windef.h> -#include <winbase.h> -//#include <winreg.h> -//#include <winerror.h> -#include <wincrypt.h> - -#include <wine/test.h> +#include "precomp.h" static PCCERT_CONTEXT (WINAPI *pCertCreateSelfSignCertificate)(HCRYPTPROV_OR_NCRYPT_KEY_HANDLE,PCERT_NAME_BLOB,DWORD,PCRYPT_KEY_PROV_INFO,PCRYPT_ALGORITHM_IDENTIFIER,PSYSTEMTIME,PSYSTEMTIME,PCERT_EXTENSIONS); static BOOL (WINAPI *pCertGetValidUsages)(DWORD,PCCERT_CONTEXT*,int*,LPSTR*,DWORD*); diff --git a/modules/rostests/winetests/crypt32/chain.c b/modules/rostests/winetests/crypt32/chain.c index 30cbaebb95..e9e8634b2b 100644 --- a/modules/rostests/winetests/crypt32/chain.c +++ b/modules/rostests/winetests/crypt32/chain.c @@ -18,17 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> -//#include <stdarg.h> +#include "precomp.h" -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> #include <wininet.h> -#include <wine/test.h> - static const BYTE selfSignedCert[] = { 0x30, 0x82, 0x01, 0x1f, 0x30, 0x81, 0xce, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0xeb, 0x0d, 0x57, 0x2a, 0x9c, 0x09, 0xba, 0xa4, 0x4a, 0xb7, 0x25, 0x49, diff --git a/modules/rostests/winetests/crypt32/crl.c b/modules/rostests/winetests/crypt32/crl.c index 4a15498b2b..32460e32d9 100644 --- a/modules/rostests/winetests/crypt32/crl.c +++ b/modules/rostests/winetests/crypt32/crl.c @@ -18,17 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdio.h> -#include <stdarg.h> - -#include <windef.h> -#include <winbase.h> -//#include <winreg.h> -//#include <winerror.h> -#include <wincrypt.h> - -#include <wine/test.h> - +#include "precomp.h" static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, diff --git a/modules/rostests/winetests/crypt32/ctl.c b/modules/rostests/winetests/crypt32/ctl.c index 25fa03cacf..18993c0965 100644 --- a/modules/rostests/winetests/crypt32/ctl.c +++ b/modules/rostests/winetests/crypt32/ctl.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdio.h> -#include <stdarg.h> - -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> - -#include <wine/test.h> +#include "precomp.h" static const BYTE emptyCTL[] = { 0x30,0x17,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, diff --git a/modules/rostests/winetests/crypt32/encode.c b/modules/rostests/winetests/crypt32/encode.c index f7957a4b4f..97cedb1981 100644 --- a/modules/rostests/winetests/crypt32/encode.c +++ b/modules/rostests/winetests/crypt32/encode.c @@ -17,15 +17,8 @@ * 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 <stdio.h> -//#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> - -#include <wine/test.h> +#include "precomp.h" static BOOL (WINAPI *pCryptDecodeObjectEx)(DWORD,LPCSTR,const BYTE*,DWORD,DWORD,PCRYPT_DECODE_PARA,void*,DWORD*); static BOOL (WINAPI *pCryptEncodeObjectEx)(DWORD,LPCSTR,const void*,DWORD,PCRYPT_ENCODE_PARA,void*,DWORD*); diff --git a/modules/rostests/winetests/crypt32/main.c b/modules/rostests/winetests/crypt32/main.c index ccdab02eff..d6ef8ddeed 100644 --- a/modules/rostests/winetests/crypt32/main.c +++ b/modules/rostests/winetests/crypt32/main.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdio.h> -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> -#include <winreg.h> - -#include <wine/test.h> +#include "precomp.h" static HMODULE hCrypt; diff --git a/modules/rostests/winetests/crypt32/message.c b/modules/rostests/winetests/crypt32/message.c index b3800dcbf6..11f3ff0cf3 100644 --- a/modules/rostests/winetests/crypt32/message.c +++ b/modules/rostests/winetests/crypt32/message.c @@ -18,14 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdio.h> -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> - -#include <wine/test.h> +#include "precomp.h" static BOOL (WINAPI * pCryptAcquireContextA) (HCRYPTPROV *, LPCSTR, LPCSTR, DWORD, DWORD); diff --git a/modules/rostests/winetests/crypt32/msg.c b/modules/rostests/winetests/crypt32/msg.c index 639e427137..45a012a22c 100644 --- a/modules/rostests/winetests/crypt32/msg.c +++ b/modules/rostests/winetests/crypt32/msg.c @@ -18,16 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdio.h> -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS -#define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS -#include <wincrypt.h> - -#include <wine/test.h> +#include "precomp.h" static BOOL have_nt = TRUE; static BOOL old_crypt32 = FALSE; diff --git a/modules/rostests/winetests/crypt32/object.c b/modules/rostests/winetests/crypt32/object.c index 9ce502bc16..61e64442f5 100644 --- a/modules/rostests/winetests/crypt32/object.c +++ b/modules/rostests/winetests/crypt32/object.c @@ -17,14 +17,8 @@ * 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 <stdio.h> -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> -#include <wine/test.h> +#include "precomp.h" static BOOL (WINAPI * pCryptQueryObject)(DWORD, const void *, DWORD, DWORD, DWORD, DWORD *, DWORD *, DWORD *, HCERTSTORE *, HCRYPTMSG *, const void **); diff --git a/modules/rostests/winetests/crypt32/oid.c b/modules/rostests/winetests/crypt32/oid.c index 006a0477f0..9a3dbe130c 100644 --- a/modules/rostests/winetests/crypt32/oid.c +++ b/modules/rostests/winetests/crypt32/oid.c @@ -17,16 +17,8 @@ * 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 <stdio.h> -//#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> -#include <winreg.h> - -#include <wine/test.h> +#include "precomp.h" static BOOL (WINAPI *pCryptEnumOIDInfo)(DWORD,DWORD,void*,PFN_CRYPT_ENUM_OID_INFO); diff --git a/modules/rostests/winetests/crypt32/precomp.h b/modules/rostests/winetests/crypt32/precomp.h new file mode 100644 index 0000000000..1d2fc3b4e8 --- /dev/null +++ b/modules/rostests/winetests/crypt32/precomp.h @@ -0,0 +1,11 @@ +#ifndef _CRYPT32_WINETEST_PRECOMP_H_ +#define _CRYPT32_WINETEST_PRECOMP_H_ + +#include <stdio.h> +#include <wine/test.h> +#include <winreg.h> +#define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS +#define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS +#include <wincrypt.h> + +#endif /* !_CRYPT32_WINETEST_PRECOMP_H_ */ diff --git a/modules/rostests/winetests/crypt32/protectdata.c b/modules/rostests/winetests/crypt32/protectdata.c index dfef5456bd..3cde714cad 100644 --- a/modules/rostests/winetests/crypt32/protectdata.c +++ b/modules/rostests/winetests/crypt32/protectdata.c @@ -18,14 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include <stdio.h> -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> - -#include <wine/test.h> +#include "precomp.h" static BOOL (WINAPI *pCryptProtectData)(DATA_BLOB*,LPCWSTR,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*); static BOOL (WINAPI *pCryptUnprotectData)(DATA_BLOB*,LPWSTR*,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*); diff --git a/modules/rostests/winetests/crypt32/sip.c b/modules/rostests/winetests/crypt32/sip.c index 0d5233d21a..512146e826 100644 --- a/modules/rostests/winetests/crypt32/sip.c +++ b/modules/rostests/winetests/crypt32/sip.c @@ -19,17 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> -//#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> +#include "precomp.h" + #include <winnls.h> -#include <wincrypt.h> #include <mssip.h> -#include <wine/test.h> - static BOOL (WINAPI * funcCryptSIPGetSignedDataMsg)(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD *,BYTE *); static BOOL (WINAPI * funcCryptSIPPutSignedDataMsg)(SIP_SUBJECTINFO *,DWORD,DWORD *,DWORD,BYTE *); static BOOL (WINAPI * funcCryptSIPCreateIndirectData)(SIP_SUBJECTINFO *,DWORD *,SIP_INDIRECT_DATA *); diff --git a/modules/rostests/winetests/crypt32/store.c b/modules/rostests/winetests/crypt32/store.c index 1ccf28dabc..226ffc04c3 100644 --- a/modules/rostests/winetests/crypt32/store.c +++ b/modules/rostests/winetests/crypt32/store.c @@ -18,18 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> -//#include <stdarg.h> +#include "precomp.h" -#include <windef.h> -#include <winbase.h> #include <shlobj.h> #include <shlwapi.h> -#include <winreg.h> -//#include <winerror.h> -#include <wincrypt.h> - -#include <wine/test.h> /* The following aren't defined in wincrypt.h, as they're "reserved" */ #define CERT_CERT_PROP_ID 32 diff --git a/modules/rostests/winetests/crypt32/str.c b/modules/rostests/winetests/crypt32/str.c index a797ca46d5..56480859f8 100644 --- a/modules/rostests/winetests/crypt32/str.c +++ b/modules/rostests/winetests/crypt32/str.c @@ -17,14 +17,8 @@ * 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 <stdio.h> -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -//#include <winerror.h> -#include <wincrypt.h> -#include <wine/test.h> +#include "precomp.h" typedef struct _CertRDNAttrEncoding { LPCSTR pszObjId;
6 years, 9 months
1
0
0
0
[reactos] 01/01: [COMDLG32_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0622ce1775a1a2fc45a6b…
commit 0622ce1775a1a2fc45a6b5bebf1a1ce22a68eb7d Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 17 12:28:41 2017 +0100 [COMDLG32_WINETEST] Add a PCH. --- modules/rostests/winetests/comdlg32/CMakeLists.txt | 9 +++++++-- modules/rostests/winetests/comdlg32/filedlg.c | 16 +--------------- modules/rostests/winetests/comdlg32/finddlg.c | 11 +---------- modules/rostests/winetests/comdlg32/fontdlg.c | 14 +------------- modules/rostests/winetests/comdlg32/itemdlg.c | 10 ++-------- modules/rostests/winetests/comdlg32/precomp.h | 18 ++++++++++++++++++ modules/rostests/winetests/comdlg32/printdlg.c | 20 +------------------- 7 files changed, 31 insertions(+), 67 deletions(-) diff --git a/modules/rostests/winetests/comdlg32/CMakeLists.txt b/modules/rostests/winetests/comdlg32/CMakeLists.txt index b61e43056c..11afc77f49 100644 --- a/modules/rostests/winetests/comdlg32/CMakeLists.txt +++ b/modules/rostests/winetests/comdlg32/CMakeLists.txt @@ -7,10 +7,15 @@ list(APPEND SOURCE fontdlg.c itemdlg.c printdlg.c - testlist.c) + precomp.h) + +add_executable(comdlg32_winetest + ${SOURCE} + testlist.c + rsrc.rc) -add_executable(comdlg32_winetest ${SOURCE} rsrc.rc) target_link_libraries(comdlg32_winetest uuid) set_module_type(comdlg32_winetest win32cui) add_importlibs(comdlg32_winetest comdlg32 winspool user32 gdi32 ole32 shell32 msvcrt kernel32) +add_pch(comdlg32_winetest precomp.h SOURCE) add_rostests_file(TARGET comdlg32_winetest) diff --git a/modules/rostests/winetests/comdlg32/filedlg.c b/modules/rostests/winetests/comdlg32/filedlg.c index e779cd5536..514f2513a2 100644 --- a/modules/rostests/winetests/comdlg32/filedlg.c +++ b/modules/rostests/winetests/comdlg32/filedlg.c @@ -19,24 +19,10 @@ * */ -//#include <windows.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include <wine/test.h> - -#include <wingdi.h> -#include <objbase.h> -#include <cderr.h> -#include <dlgs.h> -#include <commdlg.h> +#include "precomp.h" #include <shlguid.h> -#define COBJMACROS #include <shobjidl.h> - #include <ole2.h> #include <reactos/undocuser.h> diff --git a/modules/rostests/winetests/comdlg32/finddlg.c b/modules/rostests/winetests/comdlg32/finddlg.c index 5445d65e5e..99c9eb1e22 100644 --- a/modules/rostests/winetests/comdlg32/finddlg.c +++ b/modules/rostests/winetests/comdlg32/finddlg.c @@ -19,16 +19,7 @@ * */ -//#include "windows.h" - -#define WIN32_NO_STATUS - -#include <wine/test.h> - -#include <wingdi.h> -#include <winuser.h> -#include <cderr.h> -#include <commdlg.h> +#include "precomp.h" static UINT ID_FINDMSGSTRING; diff --git a/modules/rostests/winetests/comdlg32/fontdlg.c b/modules/rostests/winetests/comdlg32/fontdlg.c index 6b59d7ba45..4a17bbcb1d 100644 --- a/modules/rostests/winetests/comdlg32/fontdlg.c +++ b/modules/rostests/winetests/comdlg32/fontdlg.c @@ -19,21 +19,9 @@ * */ -#define WIN32_NO_STATUS +#include "precomp.h" -#include <wine/test.h> - -//#include <stdarg.h> - -//#include "windef.h" -//#include "winbase.h" -//#include "winerror.h" -#include <wingdi.h> #include <winspool.h> -#include <winuser.h> -//#include "objbase.h" - -#include <commdlg.h> static int get_dpiy(void) { diff --git a/modules/rostests/winetests/comdlg32/itemdlg.c b/modules/rostests/winetests/comdlg32/itemdlg.c index e338dcb00e..f14a298de8 100644 --- a/modules/rostests/winetests/comdlg32/itemdlg.c +++ b/modules/rostests/winetests/comdlg32/itemdlg.c @@ -19,15 +19,9 @@ * */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include <wine/test.h> - -#define COBJMACROS -#define CONST_VTABLE +#include "precomp.h" +#include <wincon.h> #include <shlobj.h> #define IDT_CHANGEFILETYPE 500 diff --git a/modules/rostests/winetests/comdlg32/precomp.h b/modules/rostests/winetests/comdlg32/precomp.h new file mode 100644 index 0000000000..86ad3d3cf6 --- /dev/null +++ b/modules/rostests/winetests/comdlg32/precomp.h @@ -0,0 +1,18 @@ +#ifndef _COMDLG32_WINETEST_PRECOMP_H_ +#define _COMDLG32_WINETEST_PRECOMP_H_ + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H +#define COBJMACROS +#define CONST_VTABLE + +#include <wine/test.h> + +#include <wingdi.h> +#include <objbase.h> +#include <cderr.h> +#include <commdlg.h> +#include <dlgs.h> + +#endif /* !_COMDLG32_WINETEST_PRECOMP_H_ */ diff --git a/modules/rostests/winetests/comdlg32/printdlg.c b/modules/rostests/winetests/comdlg32/printdlg.c index 5592b8c6c9..b2c20744ee 100644 --- a/modules/rostests/winetests/comdlg32/printdlg.c +++ b/modules/rostests/winetests/comdlg32/printdlg.c @@ -20,25 +20,7 @@ * */ -#define COBJMACROS -#define CONST_VTABLE -#define WIN32_NO_STATUS - -#include <wine/test.h> - -//#include <stdarg.h> -#include <stdio.h> - -//#include "windef.h" -//#include "winbase.h" -//#include "winerror.h" -#include <wingdi.h> -#include <winuser.h> -#include <objbase.h> - -#include <cderr.h> -#include <commdlg.h> -#include <dlgs.h> +#include "precomp.h" /* ########################### */
6 years, 9 months
1
0
0
0
[reactos] 01/01: [ADVAPI32_WINETEST] Add a PCH.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=71ddf5374afe94770cace…
commit 71ddf5374afe94770cace84664331f1d41bd8dfc Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 17 12:24:27 2017 +0100 [ADVAPI32_WINETEST] Add a PCH. --- modules/rostests/winetests/advapi32/CMakeLists.txt | 5 +++-- modules/rostests/winetests/advapi32/cred.c | 9 ++------- modules/rostests/winetests/advapi32/crypt.c | 10 ++-------- modules/rostests/winetests/advapi32/crypt_lmhash.c | 9 +-------- modules/rostests/winetests/advapi32/crypt_md4.c | 10 +--------- modules/rostests/winetests/advapi32/crypt_md5.c | 7 +------ modules/rostests/winetests/advapi32/crypt_sha.c | 8 +------- modules/rostests/winetests/advapi32/eventlog.c | 18 +++++------------- modules/rostests/winetests/advapi32/lsa.c | 21 +++++---------------- modules/rostests/winetests/advapi32/precomp.h | 19 +++++++++++++++++++ modules/rostests/winetests/advapi32/registry.c | 15 ++------------- modules/rostests/winetests/advapi32/security.c | 20 +------------------- modules/rostests/winetests/advapi32/service.c | 17 +---------------- 13 files changed, 44 insertions(+), 124 deletions(-) diff --git a/modules/rostests/winetests/advapi32/CMakeLists.txt b/modules/rostests/winetests/advapi32/CMakeLists.txt index a148e08ddc..5d9cb9c3bd 100644 --- a/modules/rostests/winetests/advapi32/CMakeLists.txt +++ b/modules/rostests/winetests/advapi32/CMakeLists.txt @@ -13,9 +13,9 @@ list(APPEND SOURCE registry.c security.c service.c - testlist.c) + precomp.h) -add_executable(advapi32_winetest ${SOURCE}) +add_executable(advapi32_winetest ${SOURCE} testlist.c) if(USE_CLANG_CL OR (NOT MSVC)) add_target_compile_flags(advapi32_winetest "-Wno-format") @@ -23,4 +23,5 @@ endif() set_module_type(advapi32_winetest win32cui) add_importlibs(advapi32_winetest advapi32 ole32 user32 msvcrt kernel32 ntdll) +add_pch(advapi32_winetest precomp.h SOURCE) add_rostests_file(TARGET advapi32_winetest) diff --git a/modules/rostests/winetests/advapi32/cred.c b/modules/rostests/winetests/advapi32/cred.c index bb5fb4eace..38b23bc667 100644 --- a/modules/rostests/winetests/advapi32/cred.c +++ b/modules/rostests/winetests/advapi32/cred.c @@ -18,14 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <stdio.h> +#include "precomp.h" -#include "windef.h" -#include "winbase.h" -#include "wincred.h" - -#include "wine/test.h" +#include <wincred.h> static BOOL (WINAPI *pCredDeleteA)(LPCSTR,DWORD,DWORD); static BOOL (WINAPI *pCredEnumerateA)(LPCSTR,DWORD,DWORD *,PCREDENTIALA **); diff --git a/modules/rostests/winetests/advapi32/crypt.c b/modules/rostests/winetests/advapi32/crypt.c index 13671eb0c2..4e05a8a15f 100644 --- a/modules/rostests/winetests/advapi32/crypt.c +++ b/modules/rostests/winetests/advapi32/crypt.c @@ -18,15 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> +#include "precomp.h" -#include "windef.h" -#include "winbase.h" -#include "wincrypt.h" -#include "winerror.h" -#include "winreg.h" - -#include "wine/test.h" +#include <wincrypt.h> static const char szRsaBaseProv[] = MS_DEF_PROV_A; static const char szNonExistentProv[] = "Wine Nonexistent Cryptographic Provider v11.2"; diff --git a/modules/rostests/winetests/advapi32/crypt_lmhash.c b/modules/rostests/winetests/advapi32/crypt_lmhash.c index 7ea4fc4d76..4a5ca15dde 100644 --- a/modules/rostests/winetests/advapi32/crypt_lmhash.c +++ b/modules/rostests/winetests/advapi32/crypt_lmhash.c @@ -19,14 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "wine/winternl.h" +#include "precomp.h" struct ustring { DWORD Length; diff --git a/modules/rostests/winetests/advapi32/crypt_md4.c b/modules/rostests/winetests/advapi32/crypt_md4.c index df36b36899..2b9d2412d3 100644 --- a/modules/rostests/winetests/advapi32/crypt_md4.c +++ b/modules/rostests/winetests/advapi32/crypt_md4.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wine/winternl.h" +#include "precomp.h" typedef struct { diff --git a/modules/rostests/winetests/advapi32/crypt_md5.c b/modules/rostests/winetests/advapi32/crypt_md5.c index 4cf88688ea..cae4fc5229 100644 --- a/modules/rostests/winetests/advapi32/crypt_md5.c +++ b/modules/rostests/winetests/advapi32/crypt_md5.c @@ -18,12 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" +#include "precomp.h" typedef struct { diff --git a/modules/rostests/winetests/advapi32/crypt_sha.c b/modules/rostests/winetests/advapi32/crypt_sha.c index 2737ee7c0c..f0350204b6 100644 --- a/modules/rostests/winetests/advapi32/crypt_sha.c +++ b/modules/rostests/winetests/advapi32/crypt_sha.c @@ -18,13 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - -#include "wine/test.h" +#include "precomp.h" typedef struct { ULONG Unknown[6]; diff --git a/modules/rostests/winetests/advapi32/eventlog.c b/modules/rostests/winetests/advapi32/eventlog.c index 8c78dcf73f..0b8484f17c 100644 --- a/modules/rostests/winetests/advapi32/eventlog.c +++ b/modules/rostests/winetests/advapi32/eventlog.c @@ -18,19 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> - -#include "initguid.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winnt.h" -#include "winreg.h" -#include "sddl.h" -#include "wmistr.h" -#include "evntrace.h" - -#include "wine/test.h" +#include "precomp.h" + +#include <wmistr.h> +#include <initguid.h> +#include <evntrace.h> static BOOL (WINAPI *pCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*); static BOOL (WINAPI *pGetEventLogInformation)(HANDLE,DWORD,LPVOID,DWORD,LPDWORD); diff --git a/modules/rostests/winetests/advapi32/lsa.c b/modules/rostests/winetests/advapi32/lsa.c index 58bccd147b..0ce93c678d 100644 --- a/modules/rostests/winetests/advapi32/lsa.c +++ b/modules/rostests/winetests/advapi32/lsa.c @@ -18,22 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <stdio.h> - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "ntsecapi.h" -#include "sddl.h" -#include "winnls.h" -#include "objbase.h" -#include "initguid.h" -#include "wine/test.h" +#include "precomp.h" + +#include <winnls.h> +#include <objbase.h> +#include <initguid.h> DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); diff --git a/modules/rostests/winetests/advapi32/precomp.h b/modules/rostests/winetests/advapi32/precomp.h new file mode 100644 index 0000000000..21bf46d9f3 --- /dev/null +++ b/modules/rostests/winetests/advapi32/precomp.h @@ -0,0 +1,19 @@ +#ifndef _ADVAPI32_WINETEST_PRECOMP_H_ +#define _ADVAPI32_WINETEST_PRECOMP_H_ + +#include <stdio.h> +#include <ntstatus.h> +#define WIN32_NO_STATUS +#define WIN32_LEAN_AND_MEAN +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H +#include <wine/test.h> +#include <winreg.h> +#include <wine/winternl.h> +#include <ntsecapi.h> +#include <sddl.h> +#include <lmcons.h> +#include <aclapi.h> + + +#endif /* !_ADVAPI32_WINETEST_PRECOMP_H_ */ \ No newline at end of file diff --git a/modules/rostests/winetests/advapi32/registry.c b/modules/rostests/winetests/advapi32/registry.c index 053113a293..4b99099b65 100644 --- a/modules/rostests/winetests/advapi32/registry.c +++ b/modules/rostests/winetests/advapi32/registry.c @@ -19,21 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define WIN32_LEAN_AND_MEAN +#include "precomp.h" #include <assert.h> -#include <stdarg.h> -#include <stdio.h> -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "wine/winternl.h" -#include "winreg.h" -#include "winperf.h" -#include "winsvc.h" -#include "winerror.h" -#include "aclapi.h" +#include <winperf.h> #define IS_HKCR(hk) ((UINT_PTR)hk > 0 && ((UINT_PTR)hk & 3) == 2) diff --git a/modules/rostests/winetests/advapi32/security.c b/modules/rostests/winetests/advapi32/security.c index 7ca17b71e8..c64b1d99e9 100644 --- a/modules/rostests/winetests/advapi32/security.c +++ b/modules/rostests/winetests/advapi32/security.c @@ -19,25 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdarg.h> -#include <stdio.h> - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#define WIN32_LEAN_AND_MEAN -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wine/winternl.h" -#include "aclapi.h" -#include "winnt.h" -#include "sddl.h" -#include "ntsecapi.h" -#include "lmcons.h" - -#include <winsvc.h> - -#include "wine/test.h" +#include "precomp.h" /* FIXME: Inspect */ #define GetCurrentProcessToken() ((HANDLE)~(ULONG_PTR)3) diff --git a/modules/rostests/winetests/advapi32/service.c b/modules/rostests/winetests/advapi32/service.c index 3a85b1cef7..7d62a08359 100644 --- a/modules/rostests/winetests/advapi32/service.c +++ b/modules/rostests/winetests/advapi32/service.c @@ -18,22 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define WIN32_LEAN_AND_MEAN - -#include <stdarg.h> -#include <stdio.h> - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" -#include "winsvc.h" -#include "winnls.h" -#include "lmcons.h" -#include "aclapi.h" - -#include "wine/test.h" +#include "precomp.h" static const CHAR spooler[] = "Spooler"; /* Should be available on all platforms */ static CHAR selfname[MAX_PATH];
6 years, 9 months
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] Improve the existing PCH and make use of it.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3bf31bf2ab594635daea7…
commit 3bf31bf2ab594635daea740b2f247fc95189d438 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 17 12:17:19 2017 +0100 [WIN32KNT_APITEST] Improve the existing PCH and make use of it. --- modules/rostests/apitests/win32nt/CMakeLists.txt | 6 ++++- .../win32nt/ntdd/NtGdiDdQueryDirectDrawObject.c | 2 ++ .../win32nt/ntuser/NtUserSystemParametersInfo.c | 2 ++ modules/rostests/apitests/win32nt/win32nt.h | 26 +++++----------------- 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/modules/rostests/apitests/win32nt/CMakeLists.txt b/modules/rostests/apitests/win32nt/CMakeLists.txt index a3ffa1ccbf..516e940dd3 100644 --- a/modules/rostests/apitests/win32nt/CMakeLists.txt +++ b/modules/rostests/apitests/win32nt/CMakeLists.txt @@ -61,10 +61,13 @@ list(APPEND SOURCE ntuser/NtUserUpdatePerUserSystemParameters.c #osver.c + win32nt.h) + +add_executable(win32knt_apitest + ${SOURCE} testlist.c w32knapi.rc) -add_executable(win32knt_apitest ${SOURCE}) target_link_libraries(win32knt_apitest ${PSEH_LIB} gditools) set_module_type(win32knt_apitest win32cui) add_importlibs(win32knt_apitest @@ -78,4 +81,5 @@ add_importlibs(win32knt_apitest ntdll) add_dependencies(win32knt_apitest xdk) +add_pch(win32knt_apitest win32nt.h SOURCE) add_rostests_file(TARGET win32knt_apitest) diff --git a/modules/rostests/apitests/win32nt/ntdd/NtGdiDdQueryDirectDrawObject.c b/modules/rostests/apitests/win32nt/ntdd/NtGdiDdQueryDirectDrawObject.c index 07961e9372..1105860c6b 100644 --- a/modules/rostests/apitests/win32nt/ntdd/NtGdiDdQueryDirectDrawObject.c +++ b/modules/rostests/apitests/win32nt/ntdd/NtGdiDdQueryDirectDrawObject.c @@ -7,6 +7,8 @@ #include <win32nt.h> +#include <ddrawi.h> + /* Note : OsThunkDdQueryDirectDrawObject is the usermode name of NtGdiDdQueryDirectDrawObject * it lives in d3d8thk.dll and in windows 2000 it doing syscall direcly to win32k.sus * in windows xp and higher it call to gdi32.dll to DdEntry41 and it doing the syscall diff --git a/modules/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c b/modules/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c index 5239dc587b..feb14b30c7 100644 --- a/modules/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c +++ b/modules/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c @@ -7,6 +7,8 @@ #include <win32nt.h> +#include <winreg.h> + static const WCHAR* KEY_MOUSE = L"Control Panel\\Mouse"; //static const WCHAR* VAL_MOUSE1 = L"MouseThreshold1"; //static const WCHAR* VAL_MOUSE2 = L"MouseThreshold2"; diff --git a/modules/rostests/apitests/win32nt/win32nt.h b/modules/rostests/apitests/win32nt/win32nt.h index 3cd54f85bc..6b0f6178d9 100644 --- a/modules/rostests/apitests/win32nt/win32nt.h +++ b/modules/rostests/apitests/win32nt/win32nt.h @@ -1,5 +1,5 @@ - -#pragma once +#ifndef _WIN32NT_APITEST_H_ +#define _WIN32NT_APITEST_H_ /* Definitions */ #define WIN32_NO_STATUS @@ -11,34 +11,18 @@ /* SDK/DDK/NDK Headers. */ #include <stdio.h> -#include <excpt.h> -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> #include <wingdi.h> -#include <winuser.h> -#include <wincon.h> -#include <winnls.h> -#include <winver.h> -#include <winnetwk.h> -#include <winreg.h> -#include <winsvc.h> #include <objbase.h> #include <imm.h> #include <winddi.h> #include <prntfont.h> -#include <winddiui.h> -#include <winspool.h> -#include <ddrawi.h> -#include <ddrawgdi.h> -#include <ndk/ntndk.h> +#include <ndk/rtlfuncs.h> +#include <ndk/mmfuncs.h> /* Public Win32K Headers */ -#include <ntusrtyp.h> #include <ntuser.h> -#include <callback.h> #include <ntgdityp.h> #include <ntgdi.h> #include <ntgdihdl.h> @@ -51,4 +35,4 @@ #define GdiHandleTable GdiQueryTable() - +#endif /* !_WIN32NT_APITEST_H_ */
6 years, 9 months
1
0
0
0
[reactos] 01/01: [HALX86] Deduplicate initialization of legacy PICs and remove EOI in I/O APIC initialization, which causes an unexpected interrupt
by Colin Finck
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=361b6e39e3ce4c582db30…
commit 361b6e39e3ce4c582db3026c44d3d8d7e442dca7 Author: Colin Finck <colin(a)reactos.org> AuthorDate: Sun Dec 17 09:51:37 2017 +0100 [HALX86] Deduplicate initialization of legacy PICs and remove EOI in I/O APIC initialization, which causes an unexpected interrupt --- hal/halx86/apic/apic.c | 72 +--------------------------------------- hal/halx86/generic.cmake | 1 + hal/halx86/generic/pic.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++ hal/halx86/include/halp.h | 6 ++++ hal/halx86/up/pic.c | 69 +++----------------------------------- 5 files changed, 96 insertions(+), 136 deletions(-) diff --git a/hal/halx86/apic/apic.c b/hal/halx86/apic/apic.c index a9d7f38813..54dbbf01f0 100644 --- a/hal/halx86/apic/apic.c +++ b/hal/halx86/apic/apic.c @@ -254,74 +254,6 @@ HalpSendEOI(VOID) ApicSendEOI(); } -VOID -NTAPI -HalpInitializeLegacyPIC(VOID) -{ - I8259_ICW1 Icw1; - I8259_ICW2 Icw2; - I8259_ICW3 Icw3; - I8259_ICW4 Icw4; - - /* Initialize ICW1 for master, interval 8, edge-triggered mode with ICW4 */ - Icw1.NeedIcw4 = TRUE; - Icw1.OperatingMode = Cascade; - Icw1.Interval = Interval8; - Icw1.InterruptMode = EdgeTriggered; - Icw1.Init = TRUE; - Icw1.InterruptVectorAddress = 0; - __outbyte(PIC1_CONTROL_PORT, Icw1.Bits); - - /* ICW2 - interrupt vector offset */ - Icw2.Bits = PRIMARY_VECTOR_BASE; - __outbyte(PIC1_DATA_PORT, Icw2.Bits); - - /* Connect slave to IRQ 2 */ - Icw3.Bits = 0; - Icw3.SlaveIrq2 = TRUE; - __outbyte(PIC1_DATA_PORT, Icw3.Bits); - - /* Enable 8086 mode, non-automatic EOI, non-buffered mode, non special fully nested mode */ - Icw4.SystemMode = New8086Mode; - Icw4.EoiMode = NormalEoi; - Icw4.BufferedMode = NonBuffered; - Icw4.SpecialFullyNestedMode = FALSE; - Icw4.Reserved = 0; - __outbyte(PIC1_DATA_PORT, Icw4.Bits); - - /* Mask all interrupts */ - __outbyte(PIC1_DATA_PORT, 0xFF); - - /* Initialize ICW1 for slave, interval 8, edge-triggered mode with ICW4 */ - Icw1.NeedIcw4 = TRUE; - Icw1.InterruptMode = EdgeTriggered; - Icw1.OperatingMode = Cascade; - Icw1.Interval = Interval8; - Icw1.Init = TRUE; - Icw1.InterruptVectorAddress = 0; /* This is only used in MCS80/85 mode */ - __outbyte(PIC2_CONTROL_PORT, Icw1.Bits); - - /* Set interrupt vector base */ - Icw2.Bits = PRIMARY_VECTOR_BASE + 8; - __outbyte(PIC2_DATA_PORT, Icw2.Bits); - - /* Slave ID */ - Icw3.Bits = 0; - Icw3.SlaveId = 2; - __outbyte(PIC2_DATA_PORT, Icw3.Bits); - - /* Enable 8086 mode, non-automatic EOI, non-buffered mode, non special fully nested mode */ - Icw4.SystemMode = New8086Mode; - Icw4.EoiMode = NormalEoi; - Icw4.BufferedMode = NonBuffered; - Icw4.SpecialFullyNestedMode = FALSE; - Icw4.Reserved = 0; - __outbyte(PIC2_DATA_PORT, Icw4.Bits); - - /* Mask all interrupts */ - __outbyte(PIC2_DATA_PORT, 0xFF); -} - VOID NTAPI ApicInitializeLocalApic(ULONG Cpu) @@ -506,8 +438,6 @@ ApicInitializeIOApic(VOID) ReDirReg.Mask = 0; ReDirReg.Destination = ApicRead(APIC_ID); IOApicWrite(IOAPIC_REDTBL + 2 * APIC_CLOCK_INDEX, ReDirReg.Long0); - - ApicSendEOI(); } VOID @@ -521,7 +451,7 @@ HalpInitializePICs(IN BOOLEAN EnableInterrupts) _disable(); /* Initialize and mask the PIC */ - HalpInitializeLegacyPIC(); + HalpInitializeLegacyPICs(); /* Initialize the I/O APIC */ ApicInitializeIOApic(); diff --git a/hal/halx86/generic.cmake b/hal/halx86/generic.cmake index 916be84c08..143f6d18e3 100644 --- a/hal/halx86/generic.cmake +++ b/hal/halx86/generic.cmake @@ -8,6 +8,7 @@ list(APPEND HAL_GENERIC_SOURCE generic/halinit.c generic/memory.c generic/misc.c + generic/pic.c generic/reboot.c generic/sysinfo.c generic/usage.c) diff --git a/hal/halx86/generic/pic.c b/hal/halx86/generic/pic.c new file mode 100644 index 0000000000..fe812e59a1 --- /dev/null +++ b/hal/halx86/generic/pic.c @@ -0,0 +1,84 @@ +/* + * PROJECT: ReactOS HAL + * LICENSE: BSD - See COPYING.ARM in the top level directory + * PURPOSE: Generic HAL PIC Management Code shared between APIC and PIC HAL + * PROGRAMMERS: ReactOS Portable Systems Group + */ + + /* INCLUDES *******************************************************************/ + +#include <hal.h> +#define NDEBUG +#include <debug.h> + + /* FUNCTIONS ******************************************************************/ + +VOID +NTAPI +HalpInitializeLegacyPICs(VOID) +{ + I8259_ICW1 Icw1; + I8259_ICW2 Icw2; + I8259_ICW3 Icw3; + I8259_ICW4 Icw4; + + ASSERT(!(__readeflags() & EFLAGS_INTERRUPT_MASK)); + + /* Initialize ICW1 for master, interval 8, edge-triggered mode with ICW4 */ + Icw1.NeedIcw4 = TRUE; + Icw1.OperatingMode = Cascade; + Icw1.Interval = Interval8; + Icw1.InterruptMode = EdgeTriggered; + Icw1.Init = TRUE; + Icw1.InterruptVectorAddress = 0; + __outbyte(PIC1_CONTROL_PORT, Icw1.Bits); + + /* ICW2 - interrupt vector offset */ + Icw2.Bits = PRIMARY_VECTOR_BASE; + __outbyte(PIC1_DATA_PORT, Icw2.Bits); + + /* Connect slave to IRQ 2 */ + Icw3.Bits = 0; + Icw3.SlaveIrq2 = TRUE; + __outbyte(PIC1_DATA_PORT, Icw3.Bits); + + /* Enable 8086 mode, non-automatic EOI, non-buffered mode, non special fully nested mode */ + Icw4.SystemMode = New8086Mode; + Icw4.EoiMode = NormalEoi; + Icw4.BufferedMode = NonBuffered; + Icw4.SpecialFullyNestedMode = FALSE; + Icw4.Reserved = 0; + __outbyte(PIC1_DATA_PORT, Icw4.Bits); + + /* Mask all interrupts */ + __outbyte(PIC1_DATA_PORT, 0xFF); + + /* Initialize ICW1 for slave, interval 8, edge-triggered mode with ICW4 */ + Icw1.NeedIcw4 = TRUE; + Icw1.InterruptMode = EdgeTriggered; + Icw1.OperatingMode = Cascade; + Icw1.Interval = Interval8; + Icw1.Init = TRUE; + Icw1.InterruptVectorAddress = 0; /* This is only used in MCS80/85 mode */ + __outbyte(PIC2_CONTROL_PORT, Icw1.Bits); + + /* Set interrupt vector base */ + Icw2.Bits = PRIMARY_VECTOR_BASE + 8; + __outbyte(PIC2_DATA_PORT, Icw2.Bits); + + /* Slave ID */ + Icw3.Bits = 0; + Icw3.SlaveId = 2; + __outbyte(PIC2_DATA_PORT, Icw3.Bits); + + /* Enable 8086 mode, non-automatic EOI, non-buffered mode, non special fully nested mode */ + Icw4.SystemMode = New8086Mode; + Icw4.EoiMode = NormalEoi; + Icw4.BufferedMode = NonBuffered; + Icw4.SpecialFullyNestedMode = FALSE; + Icw4.Reserved = 0; + __outbyte(PIC2_DATA_PORT, Icw4.Bits); + + /* Mask all interrupts */ + __outbyte(PIC2_DATA_PORT, 0xFF); +} diff --git a/hal/halx86/include/halp.h b/hal/halx86/include/halp.h index 7967e5973b..8e79f3444e 100644 --- a/hal/halx86/include/halp.h +++ b/hal/halx86/include/halp.h @@ -741,6 +741,12 @@ HalpReleaseCmosSpinLock( VOID ); +VOID +NTAPI +HalpInitializeLegacyPICs( + VOID +); + NTSTATUS NTAPI HalpOpenRegistryKey( diff --git a/hal/halx86/up/pic.c b/hal/halx86/up/pic.c index 821f071e24..a66526cd50 100644 --- a/hal/halx86/up/pic.c +++ b/hal/halx86/up/pic.c @@ -99,8 +99,7 @@ PHAL_DISMISS_INTERRUPT HalpSpecialDismissLevelTable[16] = /* This table contains the static x86 PIC mapping between IRQLs and IRQs */ ULONG KiI8259MaskTable[32] = { -#if defined(__GNUC__) && \ - (__GNUC__ * 100 + __GNUC_MINOR__ >= 404) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1900) /* * It Device IRQLs only start at 4 or higher, so these are just software * IRQLs that don't really change anything on the hardware @@ -216,8 +215,7 @@ ULONG KiI8259MaskTable[32] = /* This table indicates which IRQs, if pending, can preempt a given IRQL level */ ULONG FindHigherIrqlMask[32] = { -#if defined(__GNUC__) && \ - (__GNUC__ * 100 + __GNUC_MINOR__ >= 404) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1900) /* * Software IRQLs, at these levels all hardware interrupts can preempt. * Each higher IRQL simply enables which software IRQL can preempt the @@ -421,10 +419,6 @@ NTAPI HalpInitializePICs(IN BOOLEAN EnableInterrupts) { ULONG EFlags; - I8259_ICW1 Icw1; - I8259_ICW2 Icw2; - I8259_ICW3 Icw3; - I8259_ICW4 Icw4; EISA_ELCR Elcr; ULONG i, j; @@ -432,63 +426,8 @@ HalpInitializePICs(IN BOOLEAN EnableInterrupts) EFlags = __readeflags(); _disable(); - /* Initialize ICW1 for master, interval 8, edge-triggered mode with ICW4 */ - Icw1.NeedIcw4 = TRUE; - Icw1.InterruptMode = EdgeTriggered; - Icw1.OperatingMode = Cascade; - Icw1.Interval = Interval8; - Icw1.Init = TRUE; - Icw1.InterruptVectorAddress = 0; /* This is only used in MCS80/85 mode */ - __outbyte(PIC1_CONTROL_PORT, Icw1.Bits); - - /* Set interrupt vector base */ - Icw2.Bits = PRIMARY_VECTOR_BASE; - __outbyte(PIC1_DATA_PORT, Icw2.Bits); - - /* Connect slave to IRQ 2 */ - Icw3.Bits = 0; - Icw3.SlaveIrq2 = TRUE; - __outbyte(PIC1_DATA_PORT, Icw3.Bits); - - /* Enable 8086 mode, non-automatic EOI, non-buffered mode, non special fully nested mode */ - Icw4.Reserved = 0; - Icw4.SystemMode = New8086Mode; - Icw4.EoiMode = NormalEoi; - Icw4.BufferedMode = NonBuffered; - Icw4.SpecialFullyNestedMode = FALSE; - __outbyte(PIC1_DATA_PORT, Icw4.Bits); - - /* Mask all interrupts */ - __outbyte(PIC1_DATA_PORT, 0xFF); - - /* Initialize ICW1 for master, interval 8, edge-triggered mode with ICW4 */ - Icw1.NeedIcw4 = TRUE; - Icw1.InterruptMode = EdgeTriggered; - Icw1.OperatingMode = Cascade; - Icw1.Interval = Interval8; - Icw1.Init = TRUE; - Icw1.InterruptVectorAddress = 0; /* This is only used in MCS80/85 mode */ - __outbyte(PIC2_CONTROL_PORT, Icw1.Bits); - - /* Set interrupt vector base */ - Icw2.Bits = PRIMARY_VECTOR_BASE + 8; - __outbyte(PIC2_DATA_PORT, Icw2.Bits); - - /* Slave ID */ - Icw3.Bits = 0; - Icw3.SlaveId = 2; - __outbyte(PIC2_DATA_PORT, Icw3.Bits); - - /* Enable 8086 mode, non-automatic EOI, non-buffered mode, non special fully nested mode */ - Icw4.Reserved = 0; - Icw4.SystemMode = New8086Mode; - Icw4.EoiMode = NormalEoi; - Icw4.BufferedMode = NonBuffered; - Icw4.SpecialFullyNestedMode = FALSE; - __outbyte(PIC2_DATA_PORT, Icw4.Bits); - - /* Mask all interrupts */ - __outbyte(PIC2_DATA_PORT, 0xFF); + /* Initialize and mask the PIC */ + HalpInitializeLegacyPICs(); /* Read EISA Edge/Level Register for master and slave */ Elcr.Bits = (__inbyte(EISA_ELCR_SLAVE) << 8) | __inbyte(EISA_ELCR_MASTER);
6 years, 9 months
1
0
0
0
[reactos] 01/01: [SWENUM] Add version information. CORE-14112
by Jason Wendt
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0fdb5d9b63fb421aaf274…
commit 0fdb5d9b63fb421aaf274e9e6915de886514ad38 Author: Jason Wendt <jason.wendt(a)gmail.com> AuthorDate: Thu Dec 14 12:48:48 2017 -0700 [SWENUM] Add version information. CORE-14112 Improves setup of DirectX 9.0b 4.09.00.0902 (which the game Halo wants to install) after manually lowering DirectX version in registry. --- drivers/ksfilter/swenum/CMakeLists.txt | 2 +- drivers/ksfilter/swenum/swenum.rc | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/ksfilter/swenum/CMakeLists.txt b/drivers/ksfilter/swenum/CMakeLists.txt index cf8b33a096..c5f22cf902 100644 --- a/drivers/ksfilter/swenum/CMakeLists.txt +++ b/drivers/ksfilter/swenum/CMakeLists.txt @@ -1,5 +1,5 @@ -add_library(swenum SHARED swenum.c) +add_library(swenum SHARED swenum.c swenum.rc) set_module_type(swenum kernelmodedriver) add_importlibs(swenum ks ntoskrnl hal) add_cd_file(TARGET swenum DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/drivers/ksfilter/swenum/swenum.rc b/drivers/ksfilter/swenum/swenum.rc new file mode 100644 index 0000000000..2555e0d246 --- /dev/null +++ b/drivers/ksfilter/swenum/swenum.rc @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "Plug and Play Software Device Enumerator" +#define REACTOS_STR_INTERNAL_NAME "swenum" +#define REACTOS_STR_ORIGINAL_FILENAME "swenum.sys" +#include <reactos/version.rc>
6 years, 9 months
1
0
0
0
[reactos] 01/01: [GDI32] Fix TextOutA multibyte text length overgoing. CORE-14070
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=10910ca9e10ceac8f520d…
commit 10910ca9e10ceac8f520d0c4e490d5fed441513c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Dec 7 15:43:22 2017 +0900 [GDI32] Fix TextOutA multibyte text length overgoing. CORE-14070 --- win32ss/gdi/gdi32/objects/text.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/win32ss/gdi/gdi32/objects/text.c b/win32ss/gdi/gdi32/objects/text.c index fde5aaf784..31ee3ca2ff 100644 --- a/win32ss/gdi/gdi32/objects/text.c +++ b/win32ss/gdi/gdi32/objects/text.c @@ -1,3 +1,11 @@ +/* + * PROJECT: ReactOS GDI32 + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Text drawing API. + * COPYRIGHT: Copyright 2014 Timo Kreuzer + * Copyright 2017 Katayama Hirofumi MZ + */ + #include <precomp.h> #define NDEBUG @@ -18,18 +26,32 @@ TextOutA( ANSI_STRING StringA; UNICODE_STRING StringU; BOOL bResult; + NTSTATUS Status; - if (lpString != NULL) + if (lpString != NULL && cchString > 0) { - RtlInitAnsiString(&StringA, (LPSTR)lpString); - RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE); + if (cchString > MAXUSHORT) + cchString = MAXUSHORT; + + StringA.Length = (USHORT)cchString; + StringA.MaximumLength = (USHORT)cchString; + StringA.Buffer = (PCHAR)lpString; + + Status = RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE); + if (!NT_SUCCESS(Status)) + { + StringU.Buffer = NULL; + StringU.Length = 0; + } } else { StringU.Buffer = NULL; + StringU.Length = 0; } - bResult = TextOutW(hdc, nXStart, nYStart, StringU.Buffer, cchString); + bResult = TextOutW(hdc, nXStart, nYStart, + StringU.Buffer, StringU.Length / sizeof(WCHAR)); RtlFreeUnicodeString(&StringU); return bResult;
6 years, 9 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
36
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
Results per page:
10
25
50
100
200