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
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
July 2005
----- 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
21 participants
563 discussions
Start a n
N
ew thread
[ion] 16361: PCH for csrss and win32csr, and remove rosrtl usage
by ion@svn.reactos.com
PCH for csrss and win32csr, and remove rosrtl usage Modified: trunk/reactos/subsys/csrss/api/handle.c Modified: trunk/reactos/subsys/csrss/api/process.c Modified: trunk/reactos/subsys/csrss/api/user.c Modified: trunk/reactos/subsys/csrss/api/wapi.c Modified: trunk/reactos/subsys/csrss/csrss.c Added: trunk/reactos/subsys/csrss/csrss.h Modified: trunk/reactos/subsys/csrss/csrss.xml Modified: trunk/reactos/subsys/csrss/init.c Modified: trunk/reactos/subsys/csrss/print.c Modified: trunk/reactos/subsys/csrss/video.c Modified: trunk/reactos/subsys/csrss/win32csr/conio.c Modified: trunk/reactos/subsys/csrss/win32csr/desktopbg.c Modified: trunk/reactos/subsys/csrss/win32csr/dllmain.c Modified: trunk/reactos/subsys/csrss/win32csr/exitros.c Modified: trunk/reactos/subsys/csrss/win32csr/guiconsole.c Modified: trunk/reactos/subsys/csrss/win32csr/tuiconsole.c Added: trunk/reactos/subsys/csrss/win32csr/w32csr.h Modified: trunk/reactos/subsys/csrss/win32csr/win32csr.xml _____ Modified: trunk/reactos/subsys/csrss/api/handle.c --- trunk/reactos/subsys/csrss/api/handle.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/api/handle.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -9,12 +9,8 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> +#include "csrss.h" -#include "api.h" - #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/subsys/csrss/api/process.c --- trunk/reactos/subsys/csrss/api/process.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/api/process.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -9,13 +9,8 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> +#include "csrss.h" -#include "api.h" -#include "conio.h" - #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/subsys/csrss/api/user.c --- trunk/reactos/subsys/csrss/api/user.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/api/user.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -9,16 +9,11 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> +#include "csrss.h" -#include "api.h" - #define NDEBUG #include <debug.h> - /* GLOBALS *******************************************************************/ static BOOLEAN ServicesProcessIdValid = FALSE; _____ Modified: trunk/reactos/subsys/csrss/api/wapi.c --- trunk/reactos/subsys/csrss/api/wapi.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/api/wapi.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -10,13 +10,8 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> -#include <rosrtl/thread.h> +#include "csrss.h" -#include "api.h" - #define NDEBUG #include <debug.h> @@ -170,7 +165,7 @@ /* Close the port and exit the thread */ NtClose(ServerPort); - RtlRosExitUserThread(STATUS_SUCCESS); + NtTerminateThread(NtCurrentThread(), STATUS_SUCCESS); } /********************************************************************** _____ Modified: trunk/reactos/subsys/csrss/csrss.c --- trunk/reactos/subsys/csrss/csrss.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/csrss.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -32,14 +32,8 @@ * actually does nothing but running). */ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> -#include <csrss/csrss.h> -#include <reactos/buildno.h> +#include "csrss.h" -#include "api.h" - #define NDEBUG #include <debug.h> _____ Added: trunk/reactos/subsys/csrss/csrss.h --- trunk/reactos/subsys/csrss/csrss.h 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/csrss.h 2005-07-01 03:03:06 UTC (rev 16361) @@ -0,0 +1,17 @@ +/* PSDK/NDK Headers */ +#include <windows.h> +#define NTOS_MODE_USER +#include <ndk/ntndk.h> + +/* Build Number */ +#include <reactos/buildno.h> + +/* Subsystem Manager Header */ +#include <sm/helper.h> + +/* Internal CSRSS Headers */ +#include <api.h> +#include <conio.h> +#include <csrplugin.h> + +/* EOF */ _____ Modified: trunk/reactos/subsys/csrss/csrss.xml --- trunk/reactos/subsys/csrss/csrss.xml 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/csrss.xml 2005-07-01 03:03:06 UTC (rev 16361) @@ -13,6 +13,7 @@ <file>user.c</file> <file>wapi.c</file> </directory> + <pch>csrss.h</pch> <file>csrss.c</file> <file>init.c</file> <file>print.c</file> _____ Modified: trunk/reactos/subsys/csrss/init.c --- trunk/reactos/subsys/csrss/init.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/init.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -10,14 +10,8 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> -#include <sm/helper.h> +#include "csrss.h" -#include "api.h" -#include "csrplugin.h" - #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/subsys/csrss/print.c --- trunk/reactos/subsys/csrss/print.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/print.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -27,11 +27,11 @@ * Compiled successfully with egcs 1.1.2 */ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> -#include <csrss/csrss.h> +#include "csrss.h" +#define NDEBUG +#include <debug.h> + VOID STDCALL DisplayString(LPCWSTR lpwString) { UNICODE_STRING us; _____ Modified: trunk/reactos/subsys/csrss/video.c --- trunk/reactos/subsys/csrss/video.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/video.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -3,16 +3,16 @@ * ReactOS Project */ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> -#include <rosrtl/string.h> +#include "csrss.h" +#define NDEBUG +#include <debug.h> + ULONG InitializeVideoAddressSpace(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING PhysMemName; + UNICODE_STRING PhysMemName = RTL_CONSTANT_STRING(L"\\Device\\PhysicalMemory"); NTSTATUS Status; HANDLE PhysMemHandle; PVOID BaseAddress; @@ -25,7 +25,6 @@ /* * Open the physical memory section */ - RtlRosInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory"); InitializeObjectAttributes(&ObjectAttributes, &PhysMemName, 0, _____ Modified: trunk/reactos/subsys/csrss/win32csr/conio.c --- trunk/reactos/subsys/csrss/win32csr/conio.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/win32csr/conio.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -8,21 +8,8 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> -#include <ddk/ntddblue.h> -#include <rosrtl/string.h> +#include "w32csr.h" -#include <string.h> - -#include "api.h" -#include "conio.h" -#include "desktopbg.h" -#include "guiconsole.h" -#include "tuiconsole.h" -#include "win32csr.h" - #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/subsys/csrss/win32csr/desktopbg.c --- trunk/reactos/subsys/csrss/win32csr/desktopbg.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/win32csr/desktopbg.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -7,13 +7,8 @@ * ReactOS Operating System */ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> +#include "w32csr.h" -#include "api.h" -#include "desktopbg.h" - #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/subsys/csrss/win32csr/dllmain.c --- trunk/reactos/subsys/csrss/win32csr/dllmain.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/win32csr/dllmain.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -8,11 +8,7 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#include "csrplugin.h" -#include "conio.h" -#include "desktopbg.h" -#include "guiconsole.h" +#include "w32csr.h" #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/subsys/csrss/win32csr/exitros.c --- trunk/reactos/subsys/csrss/win32csr/exitros.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/win32csr/exitros.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -8,14 +8,8 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#define NTOS_MODE_USER -#include <ndk/ntndk.h> -#include <reactos/winlogon.h> +#include "w32csr.h" -#include "api.h" -#include "win32csr.h" - #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/subsys/csrss/win32csr/guiconsole.c --- trunk/reactos/subsys/csrss/win32csr/guiconsole.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/win32csr/guiconsole.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -8,10 +8,7 @@ /* INCLUDES ******************************************************************/ -#include <windows.h> -#include "conio.h" -#include "guiconsole.h" -#include "win32csr.h" +#include "w32csr.h" #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/subsys/csrss/win32csr/tuiconsole.c --- trunk/reactos/subsys/csrss/win32csr/tuiconsole.c 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/win32csr/tuiconsole.c 2005-07-01 03:03:06 UTC (rev 16361) @@ -6,13 +6,7 @@ * PURPOSE: Implementation of text-mode consoles */ -#include <windows.h> -#include <ddk/ntddblue.h> -#include <string.h> -#include "api.h" -#include "conio.h" -#include "tuiconsole.h" -#include "win32csr.h" +#include "w32csr.h" #define NDEBUG #include <debug.h> _____ Added: trunk/reactos/subsys/csrss/win32csr/w32csr.h --- trunk/reactos/subsys/csrss/win32csr/w32csr.h 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/win32csr/w32csr.h 2005-07-01 03:03:06 UTC (rev 16361) @@ -0,0 +1,21 @@ +/* PSDK/NDK Headers */ +#include <windows.h> +#define NTOS_MODE_USER +#include <ndk/ntndk.h> + +/* Our own BLUE.SYS Driver for Console Output */ +#include <ddk/ntddblue.h> + +/* External Winlogon Header */ +#include <winlogon.h> + +/* Internal CSRSS Headers */ +#include <api.h> +#include <conio.h> +#include <csrplugin.h> +#include <desktopbg.h> +#include "guiconsole.h" +#include "tuiconsole.h" +#include <win32csr.h> + +/* EOF */ _____ Modified: trunk/reactos/subsys/csrss/win32csr/win32csr.xml --- trunk/reactos/subsys/csrss/win32csr/win32csr.xml 2005-07-01 02:47:15 UTC (rev 16360) +++ trunk/reactos/subsys/csrss/win32csr/win32csr.xml 2005-07-01 03:03:06 UTC (rev 16361) @@ -8,6 +8,7 @@ <library>kernel32</library> <library>user32</library> <library>gdi32</library> + <pch>w32csr.h</pch> <file>conio.c</file> <file>desktopbg.c</file> <file>dllmain.c</file>
19 years, 6 months
1
0
0
0
[ion] 16360: PCH for SMSS, and remove rosrtl usage
by ion@svn.reactos.com
PCH for SMSS, and remove rosrtl usage Modified: trunk/reactos/subsys/smss/smapi.c Modified: trunk/reactos/subsys/smss/smss.h Modified: trunk/reactos/subsys/smss/smss.xml _____ Modified: trunk/reactos/subsys/smss/smapi.c --- trunk/reactos/subsys/smss/smapi.c 2005-07-01 01:54:55 UTC (rev 16359) +++ trunk/reactos/subsys/smss/smapi.c 2005-07-01 02:47:15 UTC (rev 16360) @@ -357,11 +357,9 @@ SmCreateApiPort(VOID) { OBJECT_ATTRIBUTES ObjectAttributes = {0}; - UNICODE_STRING UnicodeString = {0}; + UNICODE_STRING UnicodeString = RTL_CONSTANT_STRING(L"\\SmApiPort"); NTSTATUS Status = STATUS_SUCCESS; - RtlRosInitUnicodeStringFromLiteral(&UnicodeString, - L"\\SmApiPort"); InitializeObjectAttributes(&ObjectAttributes, &UnicodeString, PORT_ALL_ACCESS, _____ Modified: trunk/reactos/subsys/smss/smss.h --- trunk/reactos/subsys/smss/smss.h 2005-07-01 01:54:55 UTC (rev 16359) +++ trunk/reactos/subsys/smss/smss.h 2005-07-01 02:47:15 UTC (rev 16360) @@ -3,12 +3,8 @@ #include <windows.h> #define NTOS_MODE_USER -#define READY_FOR_NEW_NTDLL #include <ndk/ntndk.h> -#include <rosrtl/string.h> -#include <wchar.h> - #include <sm/api.h> #include <sm/helper.h> _____ Modified: trunk/reactos/subsys/smss/smss.xml --- trunk/reactos/subsys/smss/smss.xml 2005-07-01 01:54:55 UTC (rev 16359) +++ trunk/reactos/subsys/smss/smss.xml 2005-07-01 02:47:15 UTC (rev 16360) @@ -5,6 +5,7 @@ <library>smlib</library> <library>ntdll</library> <linkerflag>-lgcc</linkerflag> + <pch>smss.h</pch> <file>client.c</file> <file>debug.c</file> <file>init.c</file>
19 years, 6 months
1
0
0
0
[ion] 16359: Kill large parts of rosrtl. devmode conversion implented in gdi32 because it's actually an exported api, 2nd converstion used only once so inlined. logfont conversion implented as functions directly in the ddl. rtlrosmin/max replaced by actual macros, and resource rtlros function in aclui replace by actual win32 call. other rosrtl code was already deprecated.
by ion@svn.reactos.com
Kill large parts of rosrtl. devmode conversion implented in gdi32 because it's actually an exported api, 2nd converstion used only once so inlined. logfont conversion implented as functions directly in the ddl. rtlrosmin/max replaced by actual macros, and resource rtlros function in aclui replace by actual win32 call. other rosrtl code was already deprecated. Deleted: trunk/reactos/include/rosrtl/devmode.h Deleted: trunk/reactos/include/rosrtl/gdimacro.h Deleted: trunk/reactos/include/rosrtl/logfont.h Deleted: trunk/reactos/include/rosrtl/minmax.h Deleted: trunk/reactos/include/rosrtl/path.h Deleted: trunk/reactos/include/rosrtl/priv.h Deleted: trunk/reactos/include/rosrtl/resstr.h Deleted: trunk/reactos/include/rosrtl/sparse.h Modified: trunk/reactos/lib/aclui/aclui.c Modified: trunk/reactos/lib/gdi32/include/precomp.h Modified: trunk/reactos/lib/gdi32/misc/stubs.c Modified: trunk/reactos/lib/gdi32/objects/dc.c Modified: trunk/reactos/lib/gdi32/objects/font.c Modified: trunk/reactos/lib/gdi32/objects/utils.c Modified: trunk/reactos/lib/rosrtl/file/sparse.c Modified: trunk/reactos/lib/rosrtl/misc/devmode.c Modified: trunk/reactos/lib/rosrtl/misc/logfont.c Modified: trunk/reactos/lib/rosrtl/thread/priv.c Modified: trunk/reactos/lib/user32/include/user32p.h Modified: trunk/reactos/lib/user32/misc/desktop.c Modified: trunk/reactos/lib/user32/misc/display.c Modified: trunk/reactos/subsys/csrss/win32csr/conio.c _____ Deleted: trunk/reactos/include/rosrtl/devmode.h --- trunk/reactos/include/rosrtl/devmode.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/include/rosrtl/devmode.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,18 +0,0 @@ -/* devmode.h - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -void -RosRtlDevModeA2W ( LPDEVMODEW pW, const LPDEVMODEA pA ); -void -RosRtlDevModeW2A( LPDEVMODEA pA, const LPDEVMODEW pW ); - -#ifdef __cplusplus -} -#endif - -/* EOF */ _____ Deleted: trunk/reactos/include/rosrtl/gdimacro.h --- trunk/reactos/include/rosrtl/gdimacro.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/include/rosrtl/gdimacro.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,24 +0,0 @@ -/* - * gdimacro.h - */ - -#ifndef ROSRTL_GDIMACRO_H -#define ROSRTL_GDIMACRO_H - -#define IN_RECT(r,x,y) \ -( \ - (x) >= (r).left && \ - (y) >= (r).top && \ - (x) < (r).right && \ - (y) < (r).bottom \ -) - -#define RECT_OVERLAP(a,b) \ -( \ - (a).left < (b).right && \ - (b).left < (a).right && \ - (a).top < (b).bottom && \ - (b).top < (a).bottom \ -) - -#endif /* ROSRTL_GDIMACRO_H */ _____ Deleted: trunk/reactos/include/rosrtl/logfont.h --- trunk/reactos/include/rosrtl/logfont.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/include/rosrtl/logfont.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,19 +0,0 @@ -/* logfont.h - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -void -RosRtlLogFontA2W ( LPLOGFONTW pW, const LOGFONTA *pA ); - -void -RosRtlLogFontW2A ( LPLOGFONTA pA, const LOGFONTW *pW ); - -#ifdef __cplusplus -} -#endif - -/* EOF */ _____ Deleted: trunk/reactos/include/rosrtl/minmax.h --- trunk/reactos/include/rosrtl/minmax.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/include/rosrtl/minmax.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,23 +0,0 @@ -/* $Id$ - */ - -#ifndef ROSRTL_MINMAX_H__ -#define ROSRTL_MINMAX_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define RtlRosMin(X,Y) (((X) < (Y))? (X) : (Y)) -#define RtlRosMax(X,Y) (((X) > (Y))? (X) : (Y)) -#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z)) -#define RtlRosMax3(X,Y,Z) (((X) > (Y)) ? RtlRosMax(X,Z) : RtlRosMax(Y,Z)) - -#ifdef __cplusplus -} -#endif - -#endif - -/* EOF */ _____ Deleted: trunk/reactos/include/rosrtl/path.h --- trunk/reactos/include/rosrtl/path.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/include/rosrtl/path.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,21 +0,0 @@ -/* - */ - -#ifndef ROSRTL_PATH_H__ -#define ROSRTL_PATH_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -BOOL STDCALL MakeSureDirectoryPathExistsExA(LPCSTR DirPath, BOOL FileAtEnd); -BOOL STDCALL MakeSureDirectoryPathExistsExW(LPCWSTR DirPath, BOOL FileAtEnd); - -#ifdef __cplusplus -} -#endif - -#endif - -/* EOF */ _____ Deleted: trunk/reactos/include/rosrtl/priv.h --- trunk/reactos/include/rosrtl/priv.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/include/rosrtl/priv.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,23 +0,0 @@ -/* $Id$ - */ - -#ifndef ROSRTL_SEC_H__ -#define ROSRTL_SEC_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -BOOL -RosEnableThreadPrivileges(HANDLE *hToken, LUID *Privileges, DWORD PrivilegeCount); -BOOL -RosResetThreadPrivileges(HANDLE hToken); - -#ifdef __cplusplus -} -#endif - -#endif - -/* EOF */ _____ Deleted: trunk/reactos/include/rosrtl/resstr.h --- trunk/reactos/include/rosrtl/resstr.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/include/rosrtl/resstr.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,43 +0,0 @@ -/* $Id$ - */ - -#ifndef ROSRTL_RESSTR_H__ -#define ROSRTL_RESSTR_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -int -RosLenOfStrResource(HINSTANCE hInst, UINT uID); -int -RosAllocAndLoadStringA(LPSTR *lpTarget, HINSTANCE hInst, UINT uID); -int -RosAllocAndLoadStringW(LPWSTR *lpTarget, HINSTANCE hInst, UINT uID); -DWORD -RosFormatStrA(LPSTR *lpTarget, LPSTR lpFormat, ...); -DWORD -RosFormatStrW(LPWSTR *lpTarget, LPWSTR lpFormat, ...); -DWORD -RosLoadAndFormatStrA(HINSTANCE hInst, UINT uID, LPSTR *lpTarget, ...); -DWORD -RosLoadAndFormatStrW(HINSTANCE hInst, UINT uID, LPWSTR *lpTarget, ...); - -#ifdef UNICODE -# define RosFmtString RosFmtStringW -# define RosAllocAndLoadString RosAllocAndLoadStringW -# define RosLoadAndFormatStr RosLoadAndFormatStrW -#else -# define RosFmtString RosFmtStringA -# define RosAllocAndLoadString RosAllocAndLoadStringA -# define RosLoadAndFormatStr RosLoadAndFormatStrA -#endif - -#ifdef __cplusplus -} -#endif - -#endif - -/* EOF */ _____ Deleted: trunk/reactos/include/rosrtl/sparse.h --- trunk/reactos/include/rosrtl/sparse.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/include/rosrtl/sparse.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,36 +0,0 @@ -/* $Id$ - */ - -#ifndef ROSRTL_SPARSE_H__ -#define ROSRTL_SPARSE_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -BOOL -STDCALL -SetFileSparse(HANDLE hFile); - -BOOL -STDCALL -ZeroFileData(HANDLE hFile, - PLARGE_INTEGER pliFileOffset, - PLARGE_INTEGER pliBeyondFinalZero); - -DWORD -STDCALL -QueryAllocatedFileRanges(HANDLE hFile, - PLARGE_INTEGER pliFileOffset, - PLARGE_INTEGER pliLength, - PFILE_ALLOCATED_RANGE_BUFFER lpAllocatedRanges, - DWORD dwBufferSize); - -#ifdef __cplusplus -} -#endif - -#endif - -/* EOF */ _____ Modified: trunk/reactos/lib/aclui/aclui.c --- trunk/reactos/lib/aclui/aclui.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/aclui/aclui.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -31,7 +31,6 @@ #include <commctrl.h> #include <prsht.h> #include <aclui.h> -#include <rosrtl/resstr.h> #include "internal.h" #include "resource.h" @@ -184,7 +183,7 @@ SI_OBJECT_INFO ObjectInfo; PROPSHEETHEADER psh; HPROPSHEETPAGE hPages[1]; - LPWSTR lpCaption; + LPVOID lpCaption; BOOL Ret; if(psi == NULL) @@ -229,8 +228,15 @@ { /* Set the page title to the object name, make sure the format string has "%1" NOT "%s" because it uses FormatMessage() to automatically - allocate the right amount of memory. */ - RosLoadAndFormatStr(hDllInstance, IDS_PSP_TITLE, &lpCaption, ObjectInfo.pszObjectName); + allocate the right amount of memory. */ + FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_ARGUMENT_ARRAY, + hDllInstance, + IDS_PSP_TITLE, + 0, + (LPSTR)lpCaption, + 0, + (va_list*)&ObjectInfo.pszObjectName); /* Acc. to MSDN, should work */ psh.pszCaption = lpCaption; } psh.nPages = sizeof(hPages) / sizeof(HPROPSHEETPAGE); _____ Modified: trunk/reactos/lib/gdi32/include/precomp.h --- trunk/reactos/lib/gdi32/include/precomp.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/gdi32/include/precomp.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -20,10 +20,6 @@ /* Win32K External Headers */ #include <win32k/kapi.h> -/* FIXME: ROSRTL */ -#include <rosrtl/logfont.h> -#include <rosrtl/devmode.h> - #define NtUserGetDCBrushColor(hbr) \ (COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_BRUSH, TWOPARAM_ROUTINE_GETDCCOLOR) @@ -73,4 +69,16 @@ BOOL STDCALL CalculateColorTableSize(CONST BITMAPINFOHEADER *BitmapInfoHeader, UINT *ColorSpec, UINT *ColorTableSize); LPBITMAPINFO STDCALL ConvertBitmapInfo(CONST BITMAPINFO *BitmapInfo, UINT ColorSpec, UINT *BitmapInfoSize, BOOL FollowedByData); +/* == CONVERSION FUNCTIONS ================================================== */ +DEVMODEW * +STDCALL +GdiConvertToDevmodeW(DEVMODEA *dm); + +VOID +STDCALL +LogFontA2W(LPLOGFONTW pW, CONST LOGFONTA *pA); + +VOID +STDCALL +LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW); /* EOF */ _____ Modified: trunk/reactos/lib/gdi32/misc/stubs.c --- trunk/reactos/lib/gdi32/misc/stubs.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/gdi32/misc/stubs.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -11,12 +11,15 @@ #include "precomp.h" +#define SIZEOF_DEVMODEA_300 124 +#define SIZEOF_DEVMODEA_400 148 +#define SIZEOF_DEVMODEA_500 156 +#define SIZEOF_DEVMODEW_300 188 +#define SIZEOF_DEVMODEW_400 212 +#define SIZEOF_DEVMODEW_500 220 + #define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__); - - - - /* * @unimplemented */ @@ -2676,15 +2679,74 @@ } /* - * @unimplemented + * @implemented */ DEVMODEW * STDCALL GdiConvertToDevmodeW(DEVMODEA *dm) { - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; + LPDEVMODEW dmw; + + dmw = HEAP_alloc(sizeof(DEVMODEW)); +#define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, (LPSTR)dm->f, len, dmw->f, len ) +#define COPYN(f) dmw->f = dm->f + COPYS(dmDeviceName, CCHDEVICENAME ); + COPYN(dmSpecVersion); + COPYN(dmDriverVersion); + switch ( dm->dmSize ) + { + case SIZEOF_DEVMODEA_300: + dmw->dmSize = SIZEOF_DEVMODEW_300; + break; + case SIZEOF_DEVMODEA_400: + dmw->dmSize = SIZEOF_DEVMODEW_400; + break; + case SIZEOF_DEVMODEA_500: + default: /* FIXME what to do??? */ + dmw->dmSize = SIZEOF_DEVMODEW_500; + break; + } + COPYN(dmDriverExtra); + COPYN(dmFields); + COPYN(dmPosition.x); + COPYN(dmPosition.y); + COPYN(dmScale); + COPYN(dmCopies); + COPYN(dmDefaultSource); + COPYN(dmPrintQuality); + COPYN(dmColor); + COPYN(dmDuplex); + COPYN(dmYResolution); + COPYN(dmTTOption); + COPYN(dmCollate); + COPYS(dmFormName,CCHFORMNAME); + COPYN(dmLogPixels); + COPYN(dmBitsPerPel); + COPYN(dmPelsWidth); + COPYN(dmPelsHeight); + COPYN(dmDisplayFlags); // aka dmNup + COPYN(dmDisplayFrequency); + + if ( dm->dmSize <= SIZEOF_DEVMODEA_300 ) + return dmw; // we're done with 0x300 fields + + COPYN(dmICMMethod); + COPYN(dmICMIntent); + COPYN(dmMediaType); + COPYN(dmDitherType); + COPYN(dmReserved1); + COPYN(dmReserved2); + + if ( dm->dmSize <= SIZEOF_DEVMODEA_400 ) + return dmw; // we're done with 0x400 fields + + COPYN(dmPanningWidth); + COPYN(dmPanningHeight); + + return dmw; + +#undef COPYN +#undef COPYS } /* _____ Modified: trunk/reactos/lib/gdi32/objects/dc.c --- trunk/reactos/lib/gdi32/objects/dc.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/gdi32/objects/dc.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -147,7 +147,7 @@ NTSTATUS Status; LPWSTR lpszDriverW, lpszDeviceW, lpszOutputW; UNICODE_STRING Driver, Device, Output; - DEVMODEW dvmInitW; + LPDEVMODEW dvmInitW; HDC rc = 0; Status = HEAP_strdupA2W ( &lpszDriverW, lpszDriver ); @@ -166,7 +166,7 @@ else { if ( lpdvmInit ) - RosRtlDevModeA2W ( &dvmInitW, (const LPDEVMODEA)lpdvmInit ); + dvmInitW = GdiConvertToDevmodeW((LPDEVMODEA)lpdvmInit); RtlInitUnicodeString(&Driver, lpszDriverW); RtlInitUnicodeString(&Device, lpszDeviceW); @@ -174,8 +174,8 @@ rc = NtGdiCreateIC ( &Driver, &Device, &Output, - lpdvmInit ? &dvmInitW : NULL ); - + lpdvmInit ? dvmInitW : NULL ); + HEAP_free (dvmInitW); HEAP_free ( lpszOutputW ); } HEAP_free ( lpszDeviceW ); @@ -264,7 +264,7 @@ { return 0; } - RosRtlLogFontW2A((LPLOGFONTA) Buffer, &LogFontW); + LogFontW2A((LPLOGFONTA) Buffer, &LogFontW); Result = sizeof(LOGFONTA); } else @@ -362,11 +362,14 @@ CONST DEVMODEA *lpInitData ) { - DEVMODEW InitDataW; + LPDEVMODEW InitDataW; + HDC hDc; - RosRtlDevModeA2W ( &InitDataW, (CONST LPDEVMODEA)lpInitData ); + InitDataW = GdiConvertToDevmodeW((LPDEVMODEA)lpInitData); - return NtGdiResetDC ( hdc, &InitDataW ); + hDc = NtGdiResetDC ( hdc, InitDataW ); + HEAP_free(InitDataW); + return hDc; } _____ Modified: trunk/reactos/lib/gdi32/objects/font.c --- trunk/reactos/lib/gdi32/objects/font.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/gdi32/objects/font.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -231,7 +231,7 @@ } else { - RosRtlLogFontW2A(&EnumLogFontExA.elfLogFont, &Info[i].EnumLogFontEx.elfLogFont); + LogFontW2A(&EnumLogFontExA.elfLogFont, &Info[i].EnumLogFontEx.elfLogFont); WideCharToMultiByte(CP_THREAD_ACP, 0, Info[i].EnumLogFontEx.elfFullName, -1, (LPSTR)EnumLogFontExA.elfFullName, LF_FULLFACESIZE, NULL, NULL); WideCharToMultiByte(CP_THREAD_ACP, 0, Info[i].EnumLogFontEx.elfStyle, -1, @@ -292,7 +292,7 @@ { LOGFONTW LogFontW; - RosRtlLogFontA2W(&LogFontW, lpLogfont); + LogFontA2W(&LogFontW, lpLogfont); /* no need to convert LogFontW back to lpLogFont b/c it's an [in] parameter only */ return IntEnumFontFamilies(hdc, &LogFontW, lpEnumFontFamExProc, lParam, FALSE); @@ -532,7 +532,7 @@ { LOGFONTW tlf; - RosRtlLogFontA2W(&tlf, lplf); + LogFontA2W(&tlf, lplf); return NtGdiCreateFontIndirect(&tlf); } _____ Modified: trunk/reactos/lib/gdi32/objects/utils.c --- trunk/reactos/lib/gdi32/objects/utils.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/gdi32/objects/utils.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -331,3 +331,55 @@ return NewBitmapInfo; } + +VOID +STDCALL +LogFontA2W(LPLOGFONTW pW, CONST LOGFONTA *pA) +{ +#define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, pA->f, len, pW->f, len ) +#define COPYN(f) pW->f = pA->f + + COPYN(lfHeight); + COPYN(lfWidth); + COPYN(lfEscapement); + COPYN(lfOrientation); + COPYN(lfWeight); + COPYN(lfItalic); + COPYN(lfUnderline); + COPYN(lfStrikeOut); + COPYN(lfCharSet); + COPYN(lfOutPrecision); + COPYN(lfClipPrecision); + COPYN(lfQuality); + COPYN(lfPitchAndFamily); + COPYS(lfFaceName,LF_FACESIZE); + +#undef COPYN +#undef COPYS +} + +VOID +STDCALL +LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW) +{ +#define COPYS(f,len) WideCharToMultiByte ( CP_THREAD_ACP, 0, pW->f, len, pA->f, len, NULL, NULL ) +#define COPYN(f) pA->f = pW->f + + COPYN(lfHeight); + COPYN(lfWidth); + COPYN(lfEscapement); + COPYN(lfOrientation); + COPYN(lfWeight); + COPYN(lfItalic); + COPYN(lfUnderline); + COPYN(lfStrikeOut); + COPYN(lfCharSet); + COPYN(lfOutPrecision); + COPYN(lfClipPrecision); + COPYN(lfQuality); + COPYN(lfPitchAndFamily); + COPYS(lfFaceName,LF_FACESIZE); + +#undef COPYN +#undef COPYS +} _____ Modified: trunk/reactos/lib/rosrtl/file/sparse.c --- trunk/reactos/lib/rosrtl/file/sparse.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/rosrtl/file/sparse.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,3 +1,4 @@ +#if 0 #include <windows.h> #include <ddk/ntifs.h> #include <string.h> @@ -113,3 +114,4 @@ return 0; } +#endif _____ Modified: trunk/reactos/lib/rosrtl/misc/devmode.c --- trunk/reactos/lib/rosrtl/misc/devmode.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/rosrtl/misc/devmode.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,3 +1,4 @@ +#if 0 #include <windows.h> #include <string.h> #include <rosrtl/devmode.h> @@ -144,3 +145,4 @@ #undef SIZEOF_DEVMODEW_300 #undef SIZEOF_DEVMODEW_400 #undef SIZEOF_DEVMODEW_500 +#endif _____ Modified: trunk/reactos/lib/rosrtl/misc/logfont.c --- trunk/reactos/lib/rosrtl/misc/logfont.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/rosrtl/misc/logfont.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,3 +1,4 @@ +#if 0 #include <windows.h> #include <string.h> #include <rosrtl/logfont.h> @@ -51,3 +52,4 @@ #undef COPYN #undef COPYS } +#endif _____ Modified: trunk/reactos/lib/rosrtl/thread/priv.c --- trunk/reactos/lib/rosrtl/thread/priv.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/rosrtl/thread/priv.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -1,3 +1,4 @@ +#if 0 #include <windows.h> #include <rosrtl/priv.h> @@ -117,4 +118,5 @@ } return FALSE; } +#endif _____ Modified: trunk/reactos/lib/user32/include/user32p.h --- trunk/reactos/lib/user32/include/user32p.h 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/user32/include/user32p.h 2005-07-01 01:54:55 UTC (rev 16359) @@ -124,5 +124,9 @@ PUSER32_THREAD_DATA User32GetThreadData(); +DEVMODEW * +STDCALL +GdiConvertToDevmodeW(DEVMODEA *dm); + #endif /* EOF */ _____ Modified: trunk/reactos/lib/user32/misc/desktop.c --- trunk/reactos/lib/user32/misc/desktop.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/user32/misc/desktop.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -10,9 +10,33 @@ */ #include <user32.h> -#include <rosrtl/devmode.h> -#include <rosrtl/logfont.h> +VOID +STDCALL +LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW) +{ +#define COPYS(f,len) WideCharToMultiByte ( CP_THREAD_ACP, 0, pW->f, len, pA->f, len, NULL, NULL ) +#define COPYN(f) pA->f = pW->f + + COPYN(lfHeight); + COPYN(lfWidth); + COPYN(lfEscapement); + COPYN(lfOrientation); + COPYN(lfWeight); + COPYN(lfItalic); + COPYN(lfUnderline); + COPYN(lfStrikeOut); + COPYN(lfCharSet); + COPYN(lfOutPrecision); + COPYN(lfClipPrecision); + COPYN(lfQuality); + COPYN(lfPitchAndFamily); + COPYS(lfFaceName,LF_FACESIZE); + +#undef COPYN +#undef COPYS +} + /* * @implemented */ @@ -76,11 +100,11 @@ nclma->iSmCaptionHeight = nclmw.iSmCaptionHeight; nclma->iMenuWidth = nclmw.iMenuWidth; nclma->iMenuHeight = nclmw.iMenuHeight; - RosRtlLogFontW2A(&(nclma->lfCaptionFont), &(nclmw.lfCaptionFont)); - RosRtlLogFontW2A(&(nclma->lfSmCaptionFont), &(nclmw.lfSmCaptionFont)); - RosRtlLogFontW2A(&(nclma->lfMenuFont), &(nclmw.lfMenuFont)); - RosRtlLogFontW2A(&(nclma->lfStatusFont), &(nclmw.lfStatusFont)); - RosRtlLogFontW2A(&(nclma->lfMessageFont), &(nclmw.lfMessageFont)); + LogFontW2A(&(nclma->lfCaptionFont), &(nclmw.lfCaptionFont)); + LogFontW2A(&(nclma->lfSmCaptionFont), &(nclmw.lfSmCaptionFont)); + LogFontW2A(&(nclma->lfMenuFont), &(nclmw.lfMenuFont)); + LogFontW2A(&(nclma->lfStatusFont), &(nclmw.lfStatusFont)); + LogFontW2A(&(nclma->lfMessageFont), &(nclmw.lfMessageFont)); return TRUE; } case SPI_GETICONTITLELOGFONT: @@ -88,7 +112,7 @@ LOGFONTW lfw; if (!SystemParametersInfoW(uiAction, 0, &lfw, fWinIni)) return FALSE; - RosRtlLogFontW2A(pvParam, &lfw); + LogFontW2A(pvParam, &lfw); return TRUE; } case SPI_GETDESKWALLPAPER: @@ -310,7 +334,7 @@ ANSI_STRING DesktopNameA; UNICODE_STRING DesktopNameU; HDESK hDesktop; - DEVMODEW DevmodeW; + LPDEVMODEW DevmodeW; if (lpszDesktop != NULL) { @@ -322,11 +346,11 @@ RtlInitUnicodeString(&DesktopNameU, NULL); } - RosRtlDevModeA2W ( &DevmodeW, pDevmode ); + DevmodeW = GdiConvertToDevmodeW(pDevmode); hDesktop = CreateDesktopW(DesktopNameU.Buffer, NULL, - &DevmodeW, + DevmodeW, dwFlags, dwDesiredAccess, lpsa); _____ Modified: trunk/reactos/lib/user32/misc/display.c --- trunk/reactos/lib/user32/misc/display.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/lib/user32/misc/display.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -29,8 +29,14 @@ /* INCLUDES ******************************************************************/ #include <user32.h> -#include <rosrtl/devmode.h> +#define SIZEOF_DEVMODEA_300 124 +#define SIZEOF_DEVMODEA_400 148 +#define SIZEOF_DEVMODEA_500 156 +#define SIZEOF_DEVMODEW_300 188 +#define SIZEOF_DEVMODEW_400 212 +#define SIZEOF_DEVMODEW_500 220 + /* FUNCTIONS *****************************************************************/ /* @@ -211,8 +217,62 @@ rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, &lpDevModeW, dwFlags ); - RosRtlDevModeW2A ( lpDevMode, &lpDevModeW ); +#define COPYS(f,len) WideCharToMultiByte( CP_THREAD_ACP, 0, lpDevModeW.f, len, (LPSTR)lpDevMode->f, len, NULL, NULL ) +#define COPYN(f) lpDevMode->f = lpDevModeW.f + COPYS(dmDeviceName, CCHDEVICENAME ); + COPYN(dmSpecVersion); + COPYN(dmDriverVersion); + switch ( lpDevModeW.dmSize ) + { + case SIZEOF_DEVMODEW_300: + lpDevMode->dmSize = SIZEOF_DEVMODEA_300; + break; + case SIZEOF_DEVMODEW_400: + lpDevMode->dmSize = SIZEOF_DEVMODEA_400; + break; + case SIZEOF_DEVMODEW_500: + default: /* FIXME what to do??? */ + lpDevMode->dmSize = SIZEOF_DEVMODEA_500; + break; + } + COPYN(dmDriverExtra); + COPYN(dmFields); + COPYN(dmPosition.x); + COPYN(dmPosition.y); + COPYN(dmScale); + COPYN(dmCopies); + COPYN(dmDefaultSource); + COPYN(dmPrintQuality); + COPYN(dmColor); + COPYN(dmDuplex); + COPYN(dmYResolution); + COPYN(dmTTOption); + COPYN(dmCollate); + COPYS(dmFormName,CCHFORMNAME); + COPYN(dmLogPixels); + COPYN(dmBitsPerPel); + COPYN(dmPelsWidth); + COPYN(dmPelsHeight); + COPYN(dmDisplayFlags); // aka dmNup + COPYN(dmDisplayFrequency); + if ( lpDevModeW.dmSize <= SIZEOF_DEVMODEW_300 ) + goto done; // we're done with 0x300 fields + + COPYN(dmICMMethod); + COPYN(dmICMIntent); + COPYN(dmMediaType); + COPYN(dmDitherType); + COPYN(dmReserved1); + COPYN(dmReserved2); + + if ( lpDevModeW.dmSize <= SIZEOF_DEVMODEW_400 ) + goto done; // we're done with 0x400 fields + + COPYN(dmPanningWidth); + COPYN(dmPanningHeight); + +done: RtlFreeUnicodeString ( &DeviceName ); @@ -380,8 +440,7 @@ LONG rc; UNICODE_STRING DeviceName; PUNICODE_STRING pDeviceName = &DeviceName; - DEVMODEW DevModeW; - LPDEVMODEW pDevModeW = &DevModeW; + LPDEVMODEW pDevModeW; if (lpszDeviceName != NULL) { @@ -395,7 +454,7 @@ pDeviceName = NULL; if (lpDevMode != NULL) - RosRtlDevModeA2W ( pDevModeW, lpDevMode ); + pDevModeW = GdiConvertToDevmodeW(lpDevMode); else pDevModeW = NULL; _____ Modified: trunk/reactos/subsys/csrss/win32csr/conio.c --- trunk/reactos/subsys/csrss/win32csr/conio.c 2005-06-30 22:40:36 UTC (rev 16358) +++ trunk/reactos/subsys/csrss/win32csr/conio.c 2005-07-01 01:54:55 UTC (rev 16359) @@ -13,7 +13,6 @@ #include <ndk/ntndk.h> #include <ddk/ntddblue.h> #include <rosrtl/string.h> -#include <rosrtl/minmax.h> #include <string.h> @@ -420,8 +419,8 @@ } Offset = 2 * ((Buff->CurrentY * Buff->MaxX) + Buff->CurrentX); SET_CELL_BUFFER(Buff, Offset, ' ', Buff->DefaultAttrib); - UpdateRect.left = RtlRosMin(UpdateRect.left, Buff->CurrentX); - UpdateRect.right = RtlRosMax(UpdateRect.right, (LONG) Buff->CurrentX); + UpdateRect.left = min(UpdateRect.left, Buff->CurrentX); + UpdateRect.right = max(UpdateRect.right, (LONG) Buff->CurrentX); } continue; } @@ -429,8 +428,8 @@ else if (Buffer[i] == '\r') { Buff->CurrentX = 0; - UpdateRect.left = RtlRosMin(UpdateRect.left, Buff->CurrentX); - UpdateRect.right = RtlRosMax(UpdateRect.right, (LONG) Buff->CurrentX); + UpdateRect.left = min(UpdateRect.left, Buff->CurrentX); + UpdateRect.right = max(UpdateRect.right, (LONG) Buff->CurrentX); continue; } /* --- TAB --- */ @@ -438,7 +437,7 @@ { UINT EndX; - UpdateRect.left = RtlRosMin(UpdateRect.left, Buff->CurrentX); + UpdateRect.left = min(UpdateRect.left, Buff->CurrentX); EndX = (Buff->CurrentX + 8) & ~7; if (EndX > Buff->MaxX) { @@ -451,7 +450,7 @@ Offset += 2; Buff->CurrentX++; } - UpdateRect.right = RtlRosMax(UpdateRect.right, (LONG) Buff->CurrentX - 1); + UpdateRect.right = max(UpdateRect.right, (LONG) Buff->CurrentX - 1); if (Buff->CurrentX == Buff->MaxX) { if (Buff->Mode & ENABLE_WRAP_AT_EOL_OUTPUT) @@ -467,8 +466,8 @@ continue; } } - UpdateRect.left = RtlRosMin(UpdateRect.left, Buff->CurrentX); - UpdateRect.right = RtlRosMax(UpdateRect.right, (LONG) Buff->CurrentX); + UpdateRect.left = min(UpdateRect.left, Buff->CurrentX); + UpdateRect.right = max(UpdateRect.right, (LONG) Buff->CurrentX); Offset = 2 * (((Buff->CurrentY * Buff->MaxX)) + Buff->CurrentX); Buff->Buffer[Offset++] = Buffer[i]; if (Attrib) @@ -679,10 +678,10 @@ } ConioInitRect(Intersection, - RtlRosMax(Rect1->top, Rect2->top), - RtlRosMax(Rect1->left, Rect2->left), - RtlRosMin(Rect1->bottom, Rect2->bottom), - RtlRosMin(Rect1->right, Rect2->right)); + max(Rect1->top, Rect2->top), + max(Rect1->left, Rect2->left), + min(Rect1->bottom, Rect2->bottom), + min(Rect1->right, Rect2->right)); return TRUE; } @@ -711,10 +710,10 @@ else { ConioInitRect(Union, - RtlRosMin(Rect1->top, Rect2->top), - RtlRosMin(Rect1->left, Rect2->left), - RtlRosMax(Rect1->bottom, Rect2->bottom), - RtlRosMax(Rect1->right, Rect2->right)); + min(Rect1->top, Rect2->top), + min(Rect1->left, Rect2->left), + max(Rect1->bottom, Rect2->bottom), + max(Rect1->right, Rect2->right)); } return TRUE; @@ -2299,8 +2298,8 @@ WriteRegion.right = Request->Data.WriteConsoleOutputRequest.WriteRegion.Right; WriteRegion.bottom = Request->Data.WriteConsoleOutputRequest.WriteRegion.Bottom; - SizeY = RtlRosMin(BufferSize.Y - BufferCoord.Y, ConioRectHeight(&WriteRegion)); - SizeX = RtlRosMin(BufferSize.X - BufferCoord.X, ConioRectWidth(&WriteRegion)); + SizeY = min(BufferSize.Y - BufferCoord.Y, ConioRectHeight(&WriteRegion)); + SizeX = min(BufferSize.X - BufferCoord.X, ConioRectWidth(&WriteRegion)); WriteRegion.bottom = WriteRegion.top + SizeY - 1; WriteRegion.right = WriteRegion.left + SizeX - 1; @@ -2797,8 +2796,8 @@ return Request->Status ; } - SizeY = RtlRosMin(BufferSize.Y - BufferCoord.Y, ConioRectHeight(&ReadRegion)); - SizeX = RtlRosMin(BufferSize.X - BufferCoord.X, ConioRectWidth(&ReadRegion)); + SizeY = min(BufferSize.Y - BufferCoord.Y, ConioRectHeight(&ReadRegion)); + SizeX = min(BufferSize.X - BufferCoord.X, ConioRectWidth(&ReadRegion)); ReadRegion.bottom = ReadRegion.top + SizeY; ReadRegion.right = ReadRegion.left + SizeX;
19 years, 6 months
1
0
0
0
← Newer
1
...
54
55
56
57
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
45
46
47
48
49
50
51
52
53
54
55
56
57
Results per page:
10
25
50
100
200