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
May 2008
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
586 discussions
Start a n
N
ew thread
[fireball] 33731: - More header fixes.
by fireball@svn.reactos.org
Author: fireball Date: Tue May 27 13:59:59 2008 New Revision: 33731 URL:
http://svn.reactos.org/svn/reactos?rev=33731&view=rev
Log: - More header fixes. Modified: trunk/reactos/include/ddk/ntifs.h trunk/reactos/include/reactos/mc/ntstatus.mc Modified: trunk/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=33…
============================================================================== --- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Tue May 27 13:59:59 2008 @@ -1057,7 +1057,7 @@ FILE_LOCK_INFO FileLock; } FILE_EXCLUSIVE_LOCK_ENTRY, *PFILE_EXCLUSIVE_LOCK_ENTRY; -typedef NTSTATUS (*PCOMPLETE_LOCK_IRP_ROUTINE) ( +typedef NTSTATUS (NTAPI *PCOMPLETE_LOCK_IRP_ROUTINE) ( IN PVOID Context, IN PIRP Irp ); Modified: trunk/reactos/include/reactos/mc/ntstatus.mc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/mc/ntstatu…
============================================================================== --- trunk/reactos/include/reactos/mc/ntstatus.mc [iso-8859-1] (original) +++ trunk/reactos/include/reactos/mc/ntstatus.mc [iso-8859-1] Tue May 27 13:59:59 2008 @@ -279,6 +279,23 @@ The specified process is part of a job. . +MessageId=0x125 +Severity=Success +Facility=System +SymbolicName=STATUS_VOLSNAP_HIBERNATE_READY +Language=English +{Volume Shadow Copy Service} +The system is now ready for hibernation. + +. +MessageId=0x126 +Severity=Success +Facility=System +SymbolicName=STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY +Language=English +A file system or file system filter driver has successfully completed an FsFilter operation. + +. MessageId=0x367 Severity=Success Facility=System
16 years, 8 months
1
0
0
0
[dreimer] 33730: Polish language Update by Olaf Siejka
by dreimer@svn.reactos.org
Author: dreimer Date: Tue May 27 13:54:23 2008 New Revision: 33730 URL:
http://svn.reactos.org/svn/reactos?rev=33730&view=rev
Log: Polish language Update by Olaf Siejka Modified: trunk/reactos/dll/cpl/input/lang/pl-PL.rc Modified: trunk/reactos/dll/cpl/input/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/pl-PL.r…
============================================================================== --- trunk/reactos/dll/cpl/input/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/lang/pl-PL.rc [iso-8859-1] Tue May 27 13:54:23 2008 @@ -12,14 +12,14 @@ CAPTION "Ustawienia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz us³ugi dla ka¿dego u¿ywanego jêzyka z listy.\nListê mo¿na modyfikowaæ przyciskami Dodaj i Usuñ.", -1, 9, 6, 238, 17 - CONTROL "TEXT", IDC_KEYLAYOUT_LIST, "SYSLISTVIEW32", WS_BORDER | WS_VSCROLL | WS_TABSTOP | LVS_SORTASCENDING | LVS_REPORT | 0x0000808D, 8, 28, 237, 109 - PUSHBUTTON "&Ustaw domylne", IDC_SET_DEFAULT, 101, 159, 144, 14 - PUSHBUTTON "&Dodaj...", IDC_ADD_BUTTON, 27, 142, 70, 14 - PUSHBUTTON "U&suñ...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 - PUSHBUTTON "&W³aciwoci...", IDC_PROP_BUTTON, 175, 142, 70, 14 - GROUPBOX "Preferencje", -1, 7, 185, 240, 36 - PUSHBUTTON "Us&tawienia klawiszy...", IDC_KEY_SET_BTN, 14, 198, 110, 14 + LTEXT "Wybierz us³ugi dla ka¿dego u¿ywanego jêzyka z listy.\nListê mo¿na modyfikowaæ przyciskami Dodaj i Usuñ.", -1, 9, 6, 238, 17 + CONTROL "TEXT", IDC_KEYLAYOUT_LIST, "SYSLISTVIEW32", WS_BORDER | WS_VSCROLL | WS_TABSTOP | LVS_SORTASCENDING | LVS_REPORT | 0x0000808D, 8, 28, 237, 109 + PUSHBUTTON "&Ustaw domylne", IDC_SET_DEFAULT, 101, 159, 144, 14 + PUSHBUTTON "&Dodaj...", IDC_ADD_BUTTON, 27, 142, 70, 14 + PUSHBUTTON "U&suñ...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 + PUSHBUTTON "&W³aciwoci...", IDC_PROP_BUTTON, 175, 142, 70, 14 + GROUPBOX "Preferencje", -1, 7, 185, 240, 36 + PUSHBUTTON "Us&tawienia klawiszy...", IDC_KEY_SET_BTN, 14, 198, 110, 14 END IDD_KEYSETTINGS DIALOGEX 0, 0, 272, 163 @@ -54,22 +54,22 @@ IDD_CHANGE_KEY_SEQ DIALOGEX 5, 100, 230, 125 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Change Key Sequence" -FONT 8, "MS Shell Dlg" -BEGIN - GROUPBOX "", -1, 9, 5, 155, 110 - AUTOCHECKBOX "&Switch input languages", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 - LTEXT "Shift", -1, 73, 37, 27, 12 - CTEXT "+", -1, 62, 37, 8, 9 - AUTORADIOBUTTON "&Ctrl", IDC_CTRL_LANG, 29, 31, 30, 11 - AUTORADIOBUTTON "Left &ALT", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 - AUTOCHECKBOX "S&witch keyboard layouts", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 - LTEXT "Shift", -1, 74, 87, 27, 12 - CTEXT "+", -1, 63, 87, 8, 9 - AUTORADIOBUTTON "C&trl", IDC_CTRL_LAYOUT, 30, 81, 30, 11 - AUTORADIOBUTTON "Left A<", IDC_LEFT_ALT_LAYOUT, 30, 95, 44, 12 - DEFPUSHBUTTON "OK", IDOK, 172, 9, 50, 14 - PUSHBUTTON "Cancel", IDCANCEL, 172, 27, 50, 14 +CAPTION "Zmiana sekwencji klawiszy" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "", -1, 9, 5, 155, 110 + AUTOCHECKBOX "&Prze³¹cz uk³ad klawiatury", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 + LTEXT "Shift", -1, 73, 37, 27, 12 + CTEXT "+", -1, 62, 37, 8, 9 + AUTORADIOBUTTON "&Ctrl", IDC_CTRL_LANG, 29, 31, 30, 11 + AUTORADIOBUTTON "Lewy &ALT", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 + AUTOCHECKBOX "P&rze³¹cz uk³ad klawiatur", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 + LTEXT "Shift", -1, 74, 87, 27, 12 + CTEXT "+", -1, 63, 87, 8, 9 + AUTORADIOBUTTON "C&trl", IDC_CTRL_LAYOUT, 30, 81, 30, 11 + AUTORADIOBUTTON "Lewy A<", IDC_LEFT_ALT_LAYOUT, 30, 95, 44, 12 + DEFPUSHBUTTON "OK", IDOK, 172, 9, 50, 14 + PUSHBUTTON "Anuluj", IDCANCEL, 172, 27, 50, 14 END IDD_INPUT_LANG_PROP DIALOGEX 20, 20, 227, 75 @@ -87,7 +87,7 @@ STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Jêzyki i ts³ugi tekstowe" + IDS_CPLSYSTEMNAME "Jêzyki i us³ugi tekstowe" IDS_CPLSYSTEMDESCRIPTION "Umo¿liwia zmianê ustawieñ jêzyków." IDS_KEYBOARD "Klawiatura" IDS_NONE "(Brak)" @@ -96,13 +96,13 @@ IDS_WHATS_THIS "Co to jest?" IDS_LANGUAGE "Jêzyk" IDS_LAYOUT "Uk³ad klawiatury" - IDS_REM_QUESTION "Do you want to remove selected keyboard layout?" - IDS_CONFIRMATION "Confirmation" - IDS_LAYOUT_EXISTS "This layout already exists." - IDS_LAYOUT_EXISTS2 "This layout already exists and can not be added." + IDS_REM_QUESTION "Czy chcesz usun¹æ dany uk³ad klawiatury?" + IDS_CONFIRMATION "Potwierdzenie" + IDS_LAYOUT_EXISTS "Taki uk³ad ju¿ istnieje." + IDS_LAYOUT_EXISTS2 "Taki uk³ad ju¿ istnieje i nie mo¿na go dodaæ ponownie." IDS_CTRL_SHIFT "Ctrl+Shift" - IDS_LEFT_ALT_SHIFT "Left Alt+Shift" - IDS_SWITCH_BET_INLANG "Switch between input languages" + IDS_LEFT_ALT_SHIFT "Lewy Alt+Shift" + IDS_SWITCH_BET_INLANG "Prze³¹cza pomiêdzy uk³adami klawiatury" END STRINGTABLE @@ -239,10 +239,10 @@ IDS_DIVEHI_TYPEWRITER_LAYOUT, "Malediwski (Maszynisty)" IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT, "Bu³garski (Fonetyczny)" IDS_BULGARIAN_PHONETIC_BDS_LAYOUT, "Bu³garski (Fonetyczny, BDS)" - IDS_BULGARIAN_BDS_LAYOUT, "Bulgarian BDS 5237-1978" - IDS_GERMAN_RISTOME_LAYOUT, "German (RISTOME)" - IDS_GERMAN_NEO_11_LAYOUT, "German (NEO-1.1)" - IDS_GERMAN_DE_ERGO_LAYOUT, "German (de_ergo)" - IDS_BURMESE_LAYOUT, "Burmese" - IDS_UKRAINIAN_STUDENT_LAYOUT, "Ukrainian (Student)" -END + IDS_BULGARIAN_BDS_LAYOUT, "Bu³garski BDS 5237-1978" + IDS_GERMAN_RISTOME_LAYOUT, "Niemiecki (RISTOME)" + IDS_GERMAN_NEO_11_LAYOUT, "Niemiecki (NEO-1.1)" + IDS_GERMAN_DE_ERGO_LAYOUT, "Niemiecki (de_ergo)" + IDS_BURMESE_LAYOUT, "Birmañski" + IDS_UKRAINIAN_STUDENT_LAYOUT, "Ukraiñski (Student)" +END
16 years, 8 months
1
0
0
0
[janderwald] 33729: - access parameter after they have been verified as valid - fixes a kernel32_winetest crash - fixes bug 3264
by janderwald@svn.reactos.org
Author: janderwald Date: Tue May 27 05:53:23 2008 New Revision: 33729 URL:
http://svn.reactos.org/svn/reactos?rev=33729&view=rev
Log: - access parameter after they have been verified as valid - fixes a kernel32_winetest crash - fixes bug 3264 Modified: trunk/reactos/dll/win32/kernel32/file/dir.c Modified: trunk/reactos/dll/win32/kernel32/file/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/di…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/dir.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/dir.c [iso-8859-1] Tue May 27 05:53:23 2008 @@ -1305,7 +1305,7 @@ LPCWSTR p; DWORD sp = 0, lp = 0; DWORD tmplen; - BOOL unixabsolute = (shortpath[0] == '/'); + BOOL unixabsolute; WIN32_FIND_DATAW wfd; HANDLE goit; @@ -1328,7 +1328,7 @@ lstrcpynW( longpath, shortpath, longlen ); return wcslen(longpath); } - + unixabsolute = (shortpath[0] == '/'); /* check for drive letter */ if (!unixabsolute && shortpath[1] == ':' ) {
16 years, 8 months
1
0
0
0
[janderwald] 33728: - fix typo in CreateServiceA - bug found by Michael martinmnet at hotmail dot com (IRC: bugboy)
by janderwald@svn.reactos.org
Author: janderwald Date: Tue May 27 03:54:07 2008 New Revision: 33728 URL:
http://svn.reactos.org/svn/reactos?rev=33728&view=rev
Log: - fix typo in CreateServiceA - bug found by Michael martinmnet at hotmail dot com (IRC: bugboy) Modified: trunk/reactos/dll/win32/advapi32/service/scm.c Modified: trunk/reactos/dll/win32/advapi32/service/scm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Tue May 27 03:54:07 2008 @@ -508,7 +508,7 @@ if (lpServiceStartName) { len = MultiByteToWideChar(CP_ACP, 0, lpServiceStartName, -1, NULL, 0); - lpServiceStartName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + lpServiceStartNameW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (!lpServiceStartNameW) { SetLastError(ERROR_NOT_ENOUGH_MEMORY);
16 years, 8 months
1
0
0
0
[gedmurphy] 33727: Another typo. Yep, I'm officially today's jester...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 27 03:34:28 2008 New Revision: 33727 URL:
http://svn.reactos.org/svn/reactos?rev=33727&view=rev
Log: Another typo. Yep, I'm officially today's jester... Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/dllm…
============================================================================== --- trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] Tue May 27 03:34:28 2008 @@ -88,7 +88,7 @@ if (NT_SUCCESS(Status)) { LPWSTR lpBuffer = (LPWSTR)kvpInfo->Data; - if (lpBuffer != UNICODE_NULL) + if (*lpBuffer != UNICODE_NULL) { INT bytesToCopy, nullPos;
16 years, 8 months
1
0
0
0
[gedmurphy] 33726: fix typo
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 27 03:32:19 2008 New Revision: 33726 URL:
http://svn.reactos.org/svn/reactos?rev=33726&view=rev
Log: fix typo Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/dllm…
============================================================================== --- trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] Tue May 27 03:32:19 2008 @@ -104,9 +104,9 @@ /* ensure string is terminated */ szAppInit[nullPos] = UNICODE_NULL; + + bRet = TRUE; } - - bRet = TRUE; } } }
16 years, 8 months
1
0
0
0
[gedmurphy] 33725: fix potential buffer overflow
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 27 03:28:52 2008 New Revision: 33725 URL:
http://svn.reactos.org/svn/reactos?rev=33725&view=rev
Log: fix potential buffer overflow Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/dllm…
============================================================================== --- trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] Tue May 27 03:28:52 2008 @@ -90,9 +90,22 @@ LPWSTR lpBuffer = (LPWSTR)kvpInfo->Data; if (lpBuffer != UNICODE_NULL) { - RtlMoveMemory(szAppInit, - kvpInfo->Data, - min(kvpInfo->DataLength, KEY_LENGTH)); + INT bytesToCopy, nullPos; + + bytesToCopy = min(kvpInfo->DataLength, KEY_LENGTH * sizeof(WCHAR)); + + if (bytesToCopy != 0) + { + RtlMoveMemory(szAppInit, + kvpInfo->Data, + bytesToCopy); + + nullPos = (bytesToCopy / sizeof(WCHAR)) - 1; + + /* ensure string is terminated */ + szAppInit[nullPos] = UNICODE_NULL; + } + bRet = TRUE; } }
16 years, 8 months
1
0
0
0
[fireball] 33724: Daniel Zimmermann <netzimme@aim.com> - Sync setlocale from Wine. See issue #3254 for more details.
by fireball@svn.reactos.org
Author: fireball Date: Tue May 27 03:11:06 2008 New Revision: 33724 URL:
http://svn.reactos.org/svn/reactos?rev=33724&view=rev
Log: Daniel Zimmermann <netzimme(a)aim.com> - Sync setlocale from Wine. See issue #3254 for more details. Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.def trunk/reactos/dll/win32/msvcrt/stubs.c trunk/reactos/lib/sdk/crt/locale/locale.c Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/msvcrt.de…
============================================================================== --- trunk/reactos/dll/win32/msvcrt/msvcrt.def [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvcrt/msvcrt.def [iso-8859-1] Tue May 27 03:11:06 2008 @@ -554,7 +554,7 @@ _write @548 _wrmdir @549 _wsearchenv @550 - _wsetlocale=__wine_stub_msvcrt_dll_551 @551 + _wsetlocale @551 _wsopen @552 _wspawnl=__wine_stub_msvcrt_dll_553 @553 _wspawnle=__wine_stub_msvcrt_dll_554 @554 Modified: trunk/reactos/dll/win32/msvcrt/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/stubs.c?r…
============================================================================== --- trunk/reactos/dll/win32/msvcrt/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvcrt/stubs.c [iso-8859-1] Tue May 27 03:11:06 2008 @@ -84,7 +84,6 @@ void __wine_stub_msvcrt_dll_455(void) { __wine_spec_unimplemented_stub(__wine_spec_file_name, "_stat64"); } void __wine_stub_msvcrt_dll_542(void) { __wine_spec_unimplemented_stub(__wine_spec_file_name, "_wperror"); } void __wine_stub_msvcrt_dll_543(void) { __wine_spec_unimplemented_stub(__wine_spec_file_name, "_wpgmptr"); } -void __wine_stub_msvcrt_dll_551(void) { __wine_spec_unimplemented_stub(__wine_spec_file_name, "_wsetlocale"); } void __wine_stub_msvcrt_dll_553(void) { __wine_spec_unimplemented_stub(__wine_spec_file_name, "_wspawnl"); } void __wine_stub_msvcrt_dll_554(void) { __wine_spec_unimplemented_stub(__wine_spec_file_name, "_wspawnle"); } void __wine_stub_msvcrt_dll_555(void) { __wine_spec_unimplemented_stub(__wine_spec_file_name, "_wspawnlp"); } Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Tue May 27 03:11:06 2008 @@ -6,53 +6,503 @@ #include <precomp.h> #include <locale.h> -#include <internal/tls.h> +#include <internal/mtdll.h> + #define NDEBUG #include <internal/debug.h> + +// mtdll.h +#define _SETLOCALE_LOCK 19 + +// msvcrt.h +#define MSVCRT_LC_ALL 0 +#define MSVCRT_LC_COLLATE 1 +#define MSVCRT_LC_CTYPE 2 +#define MSVCRT_LC_MONETARY 3 +#define MSVCRT_LC_NUMERIC 4 +#define MSVCRT_LC_TIME 5 +#define MSVCRT_LC_MIN MSVCRT_LC_ALL +#define MSVCRT_LC_MAX MSVCRT_LC_TIME + +/* FIXME: Need to hold locale for each LC_* type and aggregate + * string to produce lc_all. + */ +#define MAX_ELEM_LEN 64 /* Max length of country/language/CP string */ +#define MAX_LOCALE_LENGTH 256 +char MSVCRT_current_lc_all[MAX_LOCALE_LENGTH]; +LCID MSVCRT_current_lc_all_lcid; +int MSVCRT___lc_codepage; +int MSVCRT___lc_collate_cp; +HANDLE MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1]; + +/* MT */ +#define LOCK_LOCALE _mlock(_SETLOCALE_LOCK); +#define UNLOCK_LOCALE _munlock(_SETLOCALE_LOCK); + +#define MSVCRT_LEADBYTE 0x8000 + +typedef struct { + char search_language[MAX_ELEM_LEN]; + char search_country[MAX_ELEM_LEN]; + char search_codepage[MAX_ELEM_LEN]; + char found_language[MAX_ELEM_LEN]; + char found_country[MAX_ELEM_LEN]; + char found_codepage[MAX_ELEM_LEN]; + unsigned int match_flags; + LANGID found_lang_id; +} locale_search_t; unsigned int __setlc_active; unsigned int __unguarded_readlc_active; int _current_category; /* used by setlocale */ const char *_current_locale; + int parse_locale(const char *locale, char *lang, char *country, char *code_page); + +#define _C_ _CONTROL +#define _S_ _SPACE +#define _P_ _PUNCT +#define _D_ _DIGIT +#define _H_ _HEX +#define _U_ _UPPER +#define _L_ _LOWER + +WORD MSVCRT__ctype [257] = { + 0, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _S_|_C_, _S_|_C_, + _S_|_C_, _S_|_C_, _S_|_C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, + _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _C_, _S_|_BLANK, + _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, + _P_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, _D_|_H_, + _D_|_H_, _D_|_H_, _D_|_H_, _P_, _P_, _P_, _P_, _P_, _P_, _P_, _U_|_H_, + _U_|_H_, _U_|_H_, _U_|_H_, _U_|_H_, _U_|_H_, _U_, _U_, _U_, _U_, _U_, + _U_, _U_, _U_, _U_, _U_, _U_, _U_, _U_, _U_, _U_, _U_, _U_, _U_, _U_, + _U_, _P_, _P_, _P_, _P_, _P_, _P_, _L_|_H_, _L_|_H_, _L_|_H_, _L_|_H_, + _L_|_H_, _L_|_H_, _L_, _L_, _L_, _L_, _L_, _L_, _L_, _L_, _L_, _L_, + _L_, _L_, _L_, _L_, _L_, _L_, _L_, _L_, _L_, _L_, _P_, _P_, _P_, _P_, + _C_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* Internal: Current ctype table for locale */ +WORD MSVCRT_current_ctype[257]; + +/* pctype is used by macros in the Win32 headers. It must point + * To a table of flags exactly like ctype. To allow locale + * changes to affect ctypes (i.e. isleadbyte), we use a second table + * and update its flags whenever the current locale changes. + */ +WORD* MSVCRT__pctype = MSVCRT_current_ctype + 1; + +/* Friendly country strings & iso codes for synonym support. + * Based on MS documentation for setlocale(). + */ +static const char * const _country_synonyms[] = +{ + "Hong Kong","HK", + "Hong-Kong","HK", + "New Zealand","NZ", + "New-Zealand","NZ", + "PR China","CN", + "PR-China","CN", + "United Kingdom","GB", + "United-Kingdom","GB", + "Britain","GB", + "England","GB", + "Great Britain","GB", + "United States","US", + "United-States","US", + "America","US" +}; + +/* Note: Flags are weighted in order of matching importance */ +#define FOUND_LANGUAGE 0x4 +#define FOUND_COUNTRY 0x2 +#define FOUND_CODEPAGE 0x1 + +/* INTERNAL: Map a synonym to an ISO code */ +static void remap_synonym(char *name) +{ + size_t i; + for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 ) + { + if (!strcasecmp(_country_synonyms[i],name)) + { + TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]); + name[0] = _country_synonyms[i+1][0]; + name[1] = _country_synonyms[i+1][1]; + name[2] = '\0'; + return; + } + } +} + +#define CONTINUE_LOOKING TRUE +#define STOP_LOOKING FALSE + +/* INTERNAL: Get and compare locale info with a given string */ +static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp) +{ + buff[0] = 0; + GetLocaleInfoA(lcid, flags|LOCALE_NOUSEROVERRIDE,buff, MAX_ELEM_LEN); + if (!buff[0] || !cmp[0]) + return 0; + /* Partial matches are allowed, e.g. "Germ" matches "Germany" */ + return !strncasecmp(cmp, buff, strlen(cmp)); +} + + +static BOOL CALLBACK +find_best_locale_proc(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam) +{ + locale_search_t *res = (locale_search_t *)lParam; + const LCID lcid = MAKELCID(LangID, SORT_DEFAULT); + char buff[MAX_ELEM_LEN]; + unsigned int flags = 0; + + if(PRIMARYLANGID(LangID) == LANG_NEUTRAL) + return CONTINUE_LOOKING; + + /* Check Language */ + if (compare_info(lcid,LOCALE_SISO639LANGNAME,buff,res->search_language) || + compare_info(lcid,LOCALE_SABBREVLANGNAME,buff,res->search_language) || + compare_info(lcid,LOCALE_SENGLANGUAGE,buff,res->search_language)) + { + TRACE(":Found language: %s->%s\n", res->search_language, buff); + flags |= FOUND_LANGUAGE; + memcpy(res->found_language,res->search_language,MAX_ELEM_LEN); + } + else if (res->match_flags & FOUND_LANGUAGE) + { + return CONTINUE_LOOKING; + } + + /* Check Country */ + if (compare_info(lcid,LOCALE_SISO3166CTRYNAME,buff,res->search_country) || + compare_info(lcid,LOCALE_SABBREVCTRYNAME,buff,res->search_country) || + compare_info(lcid,LOCALE_SENGCOUNTRY,buff,res->search_country)) + { + TRACE("Found country:%s->%s\n", res->search_country, buff); + flags |= FOUND_COUNTRY; + memcpy(res->found_country,res->search_country,MAX_ELEM_LEN); + } + else if (res->match_flags & FOUND_COUNTRY) + { + return CONTINUE_LOOKING; + } + + /* Check codepage */ + if (compare_info(lcid,LOCALE_IDEFAULTCODEPAGE,buff,res->search_codepage) || + (compare_info(lcid,LOCALE_IDEFAULTANSICODEPAGE,buff,res->search_codepage))) + { + TRACE("Found codepage:%s->%s\n", res->search_codepage, buff); + flags |= FOUND_CODEPAGE; + memcpy(res->found_codepage,res->search_codepage,MAX_ELEM_LEN); + } + else if (res->match_flags & FOUND_CODEPAGE) + { + return CONTINUE_LOOKING; + } + + if (flags > res->match_flags) + { + /* Found a better match than previously */ + res->match_flags = flags; + res->found_lang_id = LangID; + } + if (flags & (FOUND_LANGUAGE & FOUND_COUNTRY & FOUND_CODEPAGE)) + { + TRACE(":found exact locale match\n"); + return STOP_LOOKING; + } + return CONTINUE_LOOKING; +} + +/* Internal: Find the LCID for a locale specification */ +static LCID MSVCRT_locale_to_LCID(locale_search_t* locale) +{ + LCID lcid; + EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING, + (LPCSTR)LOCALE_ILANGUAGE,find_best_locale_proc, + (LONG_PTR)locale); + + if (!locale->match_flags) + return 0; + + /* If we were given something that didn't match, fail */ + if (locale->search_country[0] && !(locale->match_flags & FOUND_COUNTRY)) + return 0; + + lcid = MAKELCID(locale->found_lang_id, SORT_DEFAULT); + + /* Populate partial locale, translating LCID to locale string elements */ + if (!locale->found_codepage[0]) + { + /* Even if a codepage is not enumerated for a locale + * it can be set if valid */ + if (locale->search_codepage[0]) + { + if (IsValidCodePage(atoi(locale->search_codepage))) + memcpy(locale->found_codepage,locale->search_codepage,MAX_ELEM_LEN); + else + { + /* Special codepage values: OEM & ANSI */ + if (strcasecmp(locale->search_codepage,"OCP")) + { + GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE, + locale->found_codepage, MAX_ELEM_LEN); + } + if (strcasecmp(locale->search_codepage,"ACP")) + { + GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, + locale->found_codepage, MAX_ELEM_LEN); + } + else + return 0; + + if (!atoi(locale->found_codepage)) + return 0; + } + } + else + { + /* Prefer ANSI codepages if present */ + GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, + locale->found_codepage, MAX_ELEM_LEN); + if (!locale->found_codepage[0] || !atoi(locale->found_codepage)) + GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE, + locale->found_codepage, MAX_ELEM_LEN); + } + } + GetLocaleInfoA(lcid, LOCALE_SENGLANGUAGE|LOCALE_NOUSEROVERRIDE, + locale->found_language, MAX_ELEM_LEN); + GetLocaleInfoA(lcid, LOCALE_SENGCOUNTRY|LOCALE_NOUSEROVERRIDE, + locale->found_country, MAX_ELEM_LEN); + return lcid; +} + +/* INTERNAL: Set ctype behaviour for a codepage */ +static void msvcrt_set_ctype(unsigned int codepage, LCID lcid) +{ + CPINFO cp; + + memset(&cp, 0, sizeof(CPINFO)); + + if (GetCPInfo(codepage, &cp)) + { + int i; + char str[3]; + unsigned char *traverse = (unsigned char *)cp.LeadByte; + + memset(MSVCRT_current_ctype, 0, sizeof(MSVCRT__ctype)); + MSVCRT___lc_codepage = codepage; + MSVCRT___lc_collate_cp = codepage; + + /* Switch ctype macros to MBCS if needed */ + __mb_cur_max = cp.MaxCharSize; + + /* Set remaining ctype flags: FIXME: faster way to do this? */ + str[1] = str[2] = 0; + for (i = 0; i < 256; i++) + { + if (!(MSVCRT__pctype[i] & MSVCRT_LEADBYTE)) + { + str[0] = i; + GetStringTypeA(lcid, CT_CTYPE1, str, 1, MSVCRT__pctype + i); + } + } + + /* Set leadbyte flags */ + while (traverse[0] || traverse[1]) + { + for( i = traverse[0]; i <= traverse[1]; i++ ) + MSVCRT_current_ctype[i+1] |= MSVCRT_LEADBYTE; + traverse += 2; + }; + } +} + + +/* + * @implemented + */ +char *setlocale(int category, const char *locale) +{ + LCID lcid = 0; + locale_search_t lc; + int haveLang, haveCountry, haveCP; + char* next; + int lc_all = 0; + + TRACE("(%d %s)\n",category,locale); + + if (category < MSVCRT_LC_MIN || category > MSVCRT_LC_MAX) + return NULL; + + if (locale == NULL) + { + /* Report the current Locale */ + return MSVCRT_current_lc_all; + } + + LOCK_LOCALE; + + if (locale[0] == 'L' && locale[1] == 'C' && locale[2] == '_') + { + DPRINT1(":restore previous locale not implemented!\n"); + /* FIXME: Easiest way to do this is parse the string and + * call this function recursively with its elements, + * Where they differ for each lc_ type. + */ + UNLOCK_LOCALE; + return MSVCRT_current_lc_all; + } + + /* Default Locale: Special case handling */ + if (!strlen(locale) || ((toupper(locale[0]) == 'C') && !locale[1])) + { + MSVCRT_current_lc_all[0] = 'C'; + MSVCRT_current_lc_all[1] = '\0'; + MSVCRT___lc_codepage = GetACP(); + MSVCRT___lc_collate_cp = GetACP(); + + switch (category) { + case MSVCRT_LC_ALL: + lc_all = 1; /* Fall through all cases ... */ + case MSVCRT_LC_COLLATE: + if (!lc_all) break; + case MSVCRT_LC_CTYPE: + /* Restore C locale ctype info */ + __mb_cur_max = 1; + memcpy(MSVCRT_current_ctype, MSVCRT__ctype, sizeof(MSVCRT__ctype)); + if (!lc_all) break; + case MSVCRT_LC_MONETARY: + if (!lc_all) break; + case MSVCRT_LC_NUMERIC: + if (!lc_all) break; + case MSVCRT_LC_TIME: + break; + } + UNLOCK_LOCALE; + return MSVCRT_current_lc_all; + } + + /* Get locale elements */ + haveLang = haveCountry = haveCP = 0; + memset(&lc,0,sizeof(lc)); + + next = strchr(locale,'_'); + if (next && next != locale) + { + haveLang = 1; + memcpy(lc.search_language,locale,next-locale); + locale += next-locale+1; + } + + next = strchr(locale,'.'); + if (next) + { + haveCP = 1; + if (next == locale) + { + locale++; + lstrcpynA(lc.search_codepage, locale, MAX_ELEM_LEN); + } + else + { + if (haveLang) + { + haveCountry = 1; + memcpy(lc.search_country,locale,next-locale); + locale += next-locale+1; + } + else + { + haveLang = 1; + memcpy(lc.search_language,locale,next-locale); + locale += next-locale+1; + } + lstrcpynA(lc.search_codepage, locale, MAX_ELEM_LEN); + } + } + else + { + if (haveLang) + { + haveCountry = 1; + lstrcpynA(lc.search_country, locale, MAX_ELEM_LEN); + } + else + { + haveLang = 1; + lstrcpynA(lc.search_language, locale, MAX_ELEM_LEN); + } + } + + if (haveCountry) + remap_synonym(lc.search_country); + + if (haveCP && !haveCountry && !haveLang) + { + DPRINT1(":Codepage only locale not implemented\n"); + /* FIXME: Use default lang/country and skip locale_to_LCID() + * call below... + */ + UNLOCK_LOCALE; + return NULL; + } + + lcid = MSVCRT_locale_to_LCID(&lc); + + TRACE(":found LCID %d\n",lcid); + + if (lcid == 0) + { + UNLOCK_LOCALE; + return NULL; + } + + MSVCRT_current_lc_all_lcid = lcid; + + snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s", + lc.found_language,lc.found_country,lc.found_codepage); + + switch (category) { + case MSVCRT_LC_ALL: + lc_all = 1; /* Fall through all cases ... */ + case MSVCRT_LC_COLLATE: + if (!lc_all) break; + case MSVCRT_LC_CTYPE: + msvcrt_set_ctype(atoi(lc.found_codepage),lcid); + if (!lc_all) break; + case MSVCRT_LC_MONETARY: + if (!lc_all) break; + case MSVCRT_LC_NUMERIC: + if (!lc_all) break; + case MSVCRT_LC_TIME: + break; + } + UNLOCK_LOCALE; + return MSVCRT_current_lc_all; +} /* * @unimplemented */ -char *setlocale(int category, const char *locale) -{ - char lang[100]; - char country[100]; - char code_page[100]; - if (NULL != locale) { - parse_locale(locale,lang,country,code_page); - } - - //printf("%s %s %s %s\n",locale,lang,country,code_page); - - - switch ( category ) - { - case LC_COLLATE: - break; - case LC_CTYPE: - break; - case LC_MONETARY: - break; - case LC_NUMERIC: - break; - case LC_TIME: - break; - case LC_ALL: - break; - default: - break; - } - - return "C"; - +wchar_t* _wsetlocale(int category, const wchar_t* locale) +{ + static wchar_t fake[] = { + 'E','n','g','l','i','s','h','_','U','n','i','t','e','d',' ', + 'S','t','a','t','e','s','.','1','2','5','2',0 }; + + DPRINT1("%d %S\n", category, locale); + + return fake; } /*
16 years, 8 months
1
0
0
0
[jimtabor] 33723: Rename and add new internal functions.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon May 26 20:38:01 2008 New Revision: 33723 URL:
http://svn.reactos.org/svn/reactos?rev=33723&view=rev
Log: Rename and add new internal functions. Modified: trunk/reactos/subsystems/win32/win32k/include/cliprgn.h trunk/reactos/subsystems/win32/win32k/include/region.h trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c trunk/reactos/subsystems/win32/win32k/ntuser/painting.c trunk/reactos/subsystems/win32/win32k/ntuser/windc.c trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/path.c trunk/reactos/subsystems/win32/win32k/objects/region.c Modified: trunk/reactos/subsystems/win32/win32k/include/cliprgn.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/cliprgn.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/cliprgn.h [iso-8859-1] Mon May 26 20:38:01 2008 @@ -4,9 +4,12 @@ #include <include/dc.h> #include <include/region.h> -INT FASTCALL IntGdiGetClipBox(HDC hDC, LPRECT rc); -INT STDCALL IntGdiSelectVisRgn(HDC hdc, HRGN hrgn); -INT STDCALL IntGdiExtSelectClipRgn (PDC dc, HRGN hrgn, int fnMode); +INT FASTCALL IntGdiGetClipBox(PDC, LPRECT rc); +INT FASTCALL IntGdiSelectVisRgn(PDC, PROSRGNDATA); +INT FASTCALL IntGdiExtSelectClipRgn (PDC, PROSRGNDATA, int); +INT FASTCALL GdiGetClipBox(HDC hDC, LPRECT rc); +INT FASTCALL GdiSelectVisRgn(HDC hdc, HRGN hrgn); +INT FASTCALL GdiExtSelectClipRgn (PDC dc, HRGN hrgn, int fnMode); #endif /* not __WIN32K_CLIPRGN_H */ Modified: trunk/reactos/subsystems/win32/win32k/include/region.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] Mon May 26 20:38:01 2008 @@ -40,6 +40,7 @@ INT FASTCALL IntGdiCombineRgn(PROSRGNDATA, PROSRGNDATA, PROSRGNDATA, INT); INT FASTCALL REGION_Complexity(PROSRGNDATA); +PROSRGNDATA FASTCALL IntGdiCreateRectRgn(INT, INT, INT, INT); #define UnsafeIntCreateRectRgnIndirect(prc) \ NtGdiCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom) Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -1,3 +1,4 @@ + /* * ReactOS W32 Subsystem * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team @@ -1365,8 +1366,7 @@ UserEnterExclusive(); DPRINT("Enter NtUserPaintDesktop\n"); - - IntGdiGetClipBox(hDC, &Rect); + GdiGetClipBox(hDC, &Rect); hWndDesktop = IntGetDesktopWindow(); Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -1158,7 +1158,7 @@ RECT rcScroll, rcClip, rcSrc, rcDst; INT Result; - IntGdiGetClipBox(hDC, &rcClip); + GdiGetClipBox(hDC, &rcClip); rcScroll = rcClip; if (prcClip) { Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -341,7 +341,7 @@ } Dce->DCXFlags &= ~DCX_DCEDIRTY; - IntGdiSelectVisRgn(Dce->hDC, hRgnVisible); + GdiSelectVisRgn(Dce->hDC, hRgnVisible); if (Window != NULL) { Modified: trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -16,7 +16,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ */ #include <w32k.h> @@ -59,8 +58,8 @@ return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->w.DCOrgX, -Dc->w.DCOrgY); } -INT STDCALL -IntGdiSelectVisRgn(HDC hdc, HRGN hrgn) +INT FASTCALL +GdiSelectVisRgn(HDC hdc, HRGN hrgn) { int retval; DC *dc; @@ -96,9 +95,9 @@ } -int STDCALL IntGdiExtSelectClipRgn(PDC dc, - HRGN hrgn, - int fnMode) +int FASTCALL GdiExtSelectClipRgn(PDC dc, + HRGN hrgn, + int fnMode) { int retval; // dc->DC_Flags &= ~DC_FLAG_DIRTY_RAO; @@ -151,8 +150,8 @@ int STDCALL NtGdiExtSelectClipRgn(HDC hDC, - HRGN hrgn, - int fnMode) + HRGN hrgn, + int fnMode) { int retval; DC *dc; @@ -163,14 +162,14 @@ return ERROR; } - retval = IntGdiExtSelectClipRgn ( dc, hrgn, fnMode ); + retval = GdiExtSelectClipRgn ( dc, hrgn, fnMode ); DC_UnlockDc(dc); return retval; } INT FASTCALL -IntGdiGetClipBox(HDC hDC, LPRECT rc) +GdiGetClipBox(HDC hDC, LPRECT rc) { PROSRGNDATA Rgn; INT retval; @@ -201,7 +200,7 @@ NTSTATUS Status = STATUS_SUCCESS; RECT Saferect; - Ret = IntGdiGetClipBox(hDC, &Saferect); + Ret = GdiGetClipBox(hDC, &Saferect); _SEH_TRY { @@ -434,18 +433,15 @@ { if ( pDC->DcLevel.prgnClip ) { - TempRgn = REGION_AllocRgnWithHandle(1); - + TempRgn = IntGdiCreateRectRgn(0,0,0,0); if (TempRgn) - { - REGION_SetRectRgn(TempRgn, 0, 0, 0, 0); + { Ret = IntGdiCombineRgn( TempRgn, pDC->DcLevel.prgnMeta, pDC->DcLevel.prgnClip, RGN_AND); if ( Ret ) { - REGION_UnlockRgn(TempRgn); TempRgn = GDIOBJ_ShareLockObj(TempRgn->BaseObject.hHmgr, GDI_OBJECT_TYPE_REGION); @@ -465,8 +461,7 @@ pDC->erclClip.left = 0; pDC->erclClip.top = 0; pDC->erclClip.right = 0; - pDC->erclClip.bottom = 0; - + pDC->erclClip.bottom = 0; } else REGION_FreeRgn(TempRgn); Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -156,7 +156,7 @@ } hVisRgn = NtGdiCreateRectRgn(0, 0, 1, 1); - IntGdiSelectVisRgn(hNewDC, hVisRgn); + GdiSelectVisRgn(hNewDC, hVisRgn); if (Layout) NtGdiSetLayout( hNewDC, -1, Layout); DC_InitDC(hNewDC); @@ -841,7 +841,7 @@ hVisRgn = NtGdiCreateRectRgn(0, 0, ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulHorzRes, ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulVertRes); - IntGdiSelectVisRgn(hNewDC, hVisRgn); + GdiSelectVisRgn(hNewDC, hVisRgn); /* Initialize the DC state */ DC_InitDC(hNewDC); @@ -1472,7 +1472,7 @@ } DC_UnlockDc ( dc ); #else - IntGdiExtSelectClipRgn(dc, dcs->w.hClipRgn, RGN_COPY); + GdiExtSelectClipRgn(dc, dcs->w.hClipRgn, RGN_COPY); DC_UnlockDc ( dc ); #endif if(!hDC) return; // Not a MemoryDC or SaveLevel DC, return. @@ -1992,7 +1992,7 @@ hVisRgn = NtGdiCreateRectRgn(0, 0, pBmp->SurfObj.sizlBitmap.cx, pBmp->SurfObj.sizlBitmap.cy); BITMAPOBJ_UnlockBitmap(pBmp); - IntGdiSelectVisRgn(hDC, hVisRgn); + GdiSelectVisRgn(hDC, hVisRgn); return hOrgBmp; } Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -367,7 +367,7 @@ /* Construct a region from the path */ else if( PATH_PathToRegion( &dc->w.path, Dc_Attr->jFillMode, &hrgnPath ) ) { - success = IntGdiExtSelectClipRgn( dc, hrgnPath, Mode ) != ERROR; + success = GdiExtSelectClipRgn( dc, hrgnPath, Mode ) != ERROR; NtGdiDeleteObject( hrgnPath ); /* Empty the path */ Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -1181,6 +1181,7 @@ ASSERT(newReg->Buffer); } } + newReg->rdh.iType = RDH_RECTANGLES; if (oldRects != &newReg->rdh.rcBound) ExFreePool(oldRects); @@ -2209,6 +2210,21 @@ Right - Left, Bottom - Top); } +PROSRGNDATA +FASTCALL +IntGdiCreateRectRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect) +{ + PROSRGNDATA pRgn; + + if (!(pRgn = REGION_AllocRgnWithHandle(1))) return NULL; + + REGION_SetRectRgn(pRgn, LeftRect, TopRect, RightRect, BottomRect); + REGION_UnlockRgn(pRgn); + + return pRgn; +} + + HRGN STDCALL NtGdiCreateRectRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect) { @@ -2227,8 +2243,8 @@ REGION_UnlockRgn(pRgn); return hRgn; - -} +} + HRGN STDCALL @@ -2595,7 +2611,7 @@ { case CLIPRGN: hSrc = pDC->w.hClipRgn; -// if (dc->DcLevel.prgnClip) hSrc = ((PROSRGNDATA)dc->DcLevel.prgnClip)->BaseObject.hHmgr; +// if (pDC->DcLevel.prgnClip) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnClip)->BaseObject.hHmgr; break; case METARGN: if (pDC->DcLevel.prgnMeta) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnMeta)->BaseObject.hHmgr; @@ -2603,16 +2619,15 @@ case APIRGN: DPRINT1("hMetaRgn not implemented\n"); //hSrc = dc->hMetaClipRgn; - if (!hSrc) - { - hSrc = pDC->w.hClipRgn; - } + if (!hSrc) hSrc = pDC->w.hClipRgn; //if (!hSrc) rgn = dc->hMetaRgn; -// if (dc->prgnAPI) hSrc = ((PROSRGNDATA)dc->prgnAPI)->BaseObject.hHmgr; +// if (pDC->prgnAPI) hSrc = ((PROSRGNDATA)pDC->prgnAPI)->BaseObject.hHmgr; +// else if (pDC->DcLevel.prgnClip) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnClip)->BaseObject.hHmgr; +// else if (pDC->DcLevel.prgnMeta) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnMeta)->BaseObject.hHmgr; break; case SYSRGN: hSrc = pDC->w.hVisRgn; -// if (dc->prgnVis) hSrc = ((PROSRGNDATA)dc->prgnVis)->BaseObject.hHmgr; +// if (pDC->prgnVis) hSrc = ((PROSRGNDATA)pDC->prgnVis)->BaseObject.hHmgr; break; default: hSrc = 0; @@ -3568,17 +3583,17 @@ { HRGN hrgn; ROSRGNDATA *region; - EdgeTableEntry *pAET; /* Active Edge Table */ - INT y; /* current scanline */ - int iPts = 0; /* number of pts in buffer */ - EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/ - ScanLineList *pSLL; /* current scanLineList */ - POINT *pts; /* output buffer */ - EdgeTableEntry *pPrevAET; /* ptr to previous AET */ - EdgeTable ET; /* header node for ET */ - EdgeTableEntry AET; /* header node for AET */ - EdgeTableEntry *pETEs; /* EdgeTableEntries pool */ - ScanLineListBlock SLLBlock; /* header for scanlinelist */ + EdgeTableEntry *pAET; /* Active Edge Table */ + INT y; /* current scanline */ + int iPts = 0; /* number of pts in buffer */ + EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/ + ScanLineList *pSLL; /* current scanLineList */ + POINT *pts; /* output buffer */ + EdgeTableEntry *pPrevAET; /* ptr to previous AET */ + EdgeTable ET; /* header node for ET */ + EdgeTableEntry AET; /* header node for AET */ + EdgeTableEntry *pETEs; /* EdgeTableEntries pool */ + ScanLineListBlock SLLBlock; /* header for scanlinelist */ int fixWAET = FALSE; POINTBLOCK FirstPtBlock, *curPtBlock; /* PtBlock buffers */ POINTBLOCK *tmpPtBlock;
16 years, 8 months
1
0
0
0
[jimtabor] 33722: Removed NtGdi rect calls.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon May 26 18:57:30 2008 New Revision: 33722 URL:
http://svn.reactos.org/svn/reactos?rev=33722&view=rev
Log: Removed NtGdi rect calls. Modified: trunk/reactos/subsystems/win32/win32k/objects/rect.c Modified: trunk/reactos/subsystems/win32/win32k/objects/rect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/rect.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/rect.c [iso-8859-1] Mon May 26 18:57:30 2008 @@ -31,67 +31,10 @@ Rect->left = Rect->right = Rect->top = Rect->bottom = 0; } -BOOL STDCALL -NtGdiSetEmptyRect(PRECT UnsafeRect) -{ - RECT Rect; - NTSTATUS Status = STATUS_SUCCESS; - - IntGdiSetEmptyRect(&Rect); - - _SEH_TRY - { - ProbeForWrite(UnsafeRect, - sizeof(RECT), - 1); - *UnsafeRect = Rect; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - return TRUE; -} - BOOL FASTCALL IntGdiIsEmptyRect(const RECT* Rect) { return(Rect->left >= Rect->right || Rect->top >= Rect->bottom); -} - -BOOL STDCALL -NtGdiIsEmptyRect(const RECT* UnsafeRect) -{ - RECT Rect = {0}; - NTSTATUS Status = STATUS_SUCCESS; - - _SEH_TRY - { - ProbeForRead(UnsafeRect, - sizeof(RECT), - 1); - Rect = *UnsafeRect; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - return IntGdiIsEmptyRect(&Rect); } VOID FASTCALL @@ -101,53 +44,6 @@ Rect->right += x; Rect->top += y; Rect->bottom += y; -} - -BOOL STDCALL -NtGdiOffsetRect(LPRECT UnsafeRect, INT x, INT y) -{ - RECT Rect = {0}; - NTSTATUS Status = STATUS_SUCCESS; - - _SEH_TRY - { - ProbeForRead(UnsafeRect, - sizeof(RECT), - 1); - Rect = *UnsafeRect; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - IntGdiOffsetRect(&Rect, x, y); - - _SEH_TRY - { - ProbeForWrite(UnsafeRect, - sizeof(RECT), - 1); - *UnsafeRect = Rect; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - return TRUE; } BOOL FASTCALL @@ -183,61 +79,6 @@ return TRUE; } -BOOL STDCALL -NtGdiUnionRect(PRECT UnsafeDest, const RECT* UnsafeSrc1, const RECT* UnsafeSrc2) -{ - RECT Dest, Src1 = {0}, Src2 = {0}; - NTSTATUS Status = STATUS_SUCCESS; - BOOL Ret; - - _SEH_TRY - { - ProbeForRead(UnsafeSrc1, - sizeof(RECT), - 1); - ProbeForRead(UnsafeSrc2, - sizeof(RECT), - 1); - Src1 = *UnsafeSrc1; - Src2 = *UnsafeSrc2; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - Ret = IntGdiUnionRect(&Dest, &Src1, &Src2); - - if (Ret) - { - _SEH_TRY - { - ProbeForWrite(UnsafeDest, - sizeof(RECT), - 1); - *UnsafeDest = Dest; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - } - - return Ret; -} - VOID FASTCALL IntGdiSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom) { @@ -245,35 +86,6 @@ Rect->top = top; Rect->right = right; Rect->bottom = bottom; -} - -BOOL STDCALL -NtGdiSetRect(PRECT UnsafeRect, INT left, INT top, INT right, INT bottom) -{ - RECT Rect; - NTSTATUS Status = STATUS_SUCCESS; - - IntGdiSetRect(&Rect, left, top, right, bottom); - - _SEH_TRY - { - ProbeForWrite(UnsafeRect, - sizeof(RECT), - 1); - *UnsafeRect = Rect; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - return TRUE; } BOOL FASTCALL @@ -295,59 +107,5 @@ return TRUE; } -BOOL STDCALL -NtGdiIntersectRect(PRECT UnsafeDest, const RECT* UnsafeSrc1, const RECT* UnsafeSrc2) -{ - RECT Dest, Src1, Src2 = {0}; - NTSTATUS Status = STATUS_SUCCESS; - BOOL Ret; - - _SEH_TRY - { - ProbeForRead(UnsafeSrc1, - sizeof(RECT), - 1); - ProbeForRead(UnsafeSrc2, - sizeof(RECT), - 1); - Src1 = *UnsafeSrc1; - Src2 = *UnsafeSrc2; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - Ret = IntGdiIntersectRect(&Dest, &Src2, &Src2); - - if (Ret) - { - _SEH_TRY - { - ProbeForWrite(UnsafeDest, - sizeof(RECT), - 1); - *UnsafeDest = Dest; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - } - - return Ret; -} /* EOF */
16 years, 8 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
59
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
58
59
Results per page:
10
25
50
100
200