ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
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
November 2011
----- 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
16 participants
274 discussions
Start a n
N
ew thread
[pschweitzer] 54554: [MSVCRT_APITEST] Add MSDN example
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Nov 30 23:47:41 2011 New Revision: 54554 URL:
http://svn.reactos.org/svn/reactos?rev=54554&view=rev
Log: [MSVCRT_APITEST] Add MSDN example Modified: trunk/rostests/apitests/msvcrt/ieee.c Modified: trunk/rostests/apitests/msvcrt/ieee.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/ieee.c?re…
============================================================================== --- trunk/rostests/apitests/msvcrt/ieee.c [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/ieee.c [iso-8859-1] Wed Nov 30 23:47:41 2011 @@ -3,6 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * PURPOSE: Tests for IEEE floatting-point functions * PROGRAMMER: Pierre Schweitzer (pierre(a)reactos.org) + * REFERENCES:
http://msdn.microsoft.com/en-US/library/h7zkk1bz%28v=VS.80%29.aspx
*/ #include <wine/test.h> @@ -61,6 +62,9 @@ ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); tested.l = 0x7FFFFFFFFFFFFFFFLL; ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); + + /* MSDN example */ + ok(_finite(2.387000) == TRUE, "_finite = FALSE\n"); } void test_fpclass(void) @@ -150,6 +154,10 @@ tested.l = 0x7FFFFFFFFFFFFFFFLL; class = _fpclass(tested.d); ok(class == _FPCLASS_QNAN, "class = %d\n", class); + + /* MSDN example */ + class = _fpclass(2.387000); + ok(class == _FPCLASS_PN, "class = %d\n", class); } void test_isnan(void) @@ -198,6 +206,9 @@ ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); tested.l = 0x7FFFFFFFFFFFFFFFLL; ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); + + /* MSDN example */ + ok(_isnan(2.387000) == FALSE, "_isnan = TRUE\n"); } void test_j0(void) @@ -334,6 +345,14 @@ result.d = _j0(tested.d); ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); ok(errno == EDOM, "errno: %d\n", errno); + + /* MSDN example */ + errno = 0xDEADBEEF; + tested.d = 2.387000; + expected.l = 0x3F83059F9F6F30CALL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); } void test_j1(void) @@ -470,6 +489,14 @@ result.d = _j1(tested.d); ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); ok(errno == EDOM, "errno: %d\n", errno); + + /* MSDN example */ + errno = 0xDEADBEEF; + tested.d = 2.387000; + expected.l = 0x3FE0BBEFC62ABAB1LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); } void test_scalb(void) @@ -606,6 +633,14 @@ result.d = _scalb(tested.d, 3); ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); ok(errno == EDOM, "errno: %d\n", errno); + + /* MSDN example */ + errno = 0xDEADBEEF; + tested.d = 2.387000; + expected.l = 0x4033189374BC6A7FLL; + result.d = _scalb(tested.d, 3); + ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); } void test_y0(void) @@ -742,6 +777,14 @@ result.d = _y0(tested.d); ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); ok(errno == EDOM, "errno: %d\n", errno); + + /* MSDN example */ + errno = 0xDEADBEEF; + tested.d = 2.387000; + expected.l = 0x3FE05FB1B1E49E66LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); } void test_y1(void) @@ -878,6 +921,14 @@ result.d = _y1(tested.d); ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); ok(errno == EDOM, "errno: %d\n", errno); + + /* MSDN example */ + errno = 0xDEADBEEF; + tested.d = 2.387000; + expected.l = 0x3FB828EC13723EE6LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); } START_TEST(ieee)
13 years
1
0
0
0
[cgutman] 54553: [NDIS] - Fix parsing of hex strings
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Nov 30 22:27:14 2011 New Revision: 54553 URL:
http://svn.reactos.org/svn/reactos?rev=54553&view=rev
Log: [NDIS] - Fix parsing of hex strings Modified: trunk/reactos/drivers/network/ndis/ndis/config.c Modified: trunk/reactos/drivers/network/ndis/ndis/config.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Wed Nov 30 22:27:14 2011 @@ -366,7 +366,7 @@ } BOOLEAN -IsValidNumericString(PNDIS_STRING String, NDIS_PARAMETER_TYPE *ParameterType) +IsValidNumericString(PNDIS_STRING String, ULONG Base) /* * FUNCTION: Determines if a string is a valid number * ARGUMENTS: @@ -375,7 +375,7 @@ * TRUE if it is valid, FALSE if not */ { - ULONG i, Base; + ULONG i; /* I don't think this will ever happen, but we warn it if it does */ if (String->Length == 0) @@ -384,25 +384,8 @@ return FALSE; } - /* Set the default parameter type */ - *ParameterType = NdisParameterInteger; - Base = 10; - for (i = 0; i < String->Length / sizeof(WCHAR); i++) { - /* Look at the second character for the base */ - if (i == 1) - { - if (String->Buffer[i] == L'X' || - String->Buffer[i] == L'x') - { - NDIS_DbgPrint(MID_TRACE, ("Identified hex string\n")); - *ParameterType = NdisParameterHexInteger; - Base = 0x10; - continue; - } - } - /* Skip any NULL characters we find */ if (String->Buffer[i] == UNICODE_NULL) continue; @@ -669,17 +652,25 @@ else if (KeyInformation->Type == REG_SZ) { UNICODE_STRING str; + ULONG Base; + + if (ParameterType == NdisParameterInteger) + Base = 10; + else if (ParameterType == NdisParameterHexInteger) + Base = 16; + else + Base = 0; str.Length = str.MaximumLength = (USHORT)KeyInformation->DataLength; str.Buffer = (PWCHAR)KeyInformation->Data; - if (IsValidNumericString(&str, &(*ParameterValue)->ParameterType) && - ((*Status = RtlUnicodeStringToInteger(&str, 0, + if (Base != 0 && IsValidNumericString(&str, Base) && + ((*Status = RtlUnicodeStringToInteger(&str, Base, &(*ParameterValue)->ParameterData.IntegerData)) == STATUS_SUCCESS)) { NDIS_DbgPrint(MAX_TRACE, ("NdisParameter(Hex)Integer\n")); - /* IsValidNumericString sets the parameter type when parsing the string */ + (*ParameterValue)->ParameterType = ParameterType; } else {
13 years
1
0
0
0
[pschweitzer] 54552: [CRT] Fix error handling for j0, j1, y0, y1 Bessel functions. Remove useless defines
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Nov 30 22:04:54 2011 New Revision: 54552 URL:
http://svn.reactos.org/svn/reactos?rev=54552&view=rev
Log: [CRT] Fix error handling for j0, j1, y0, y1 Bessel functions. Remove useless defines Modified: trunk/reactos/lib/sdk/crt/math/j0_y0.c trunk/reactos/lib/sdk/crt/math/j1_y1.c Modified: trunk/reactos/lib/sdk/crt/math/j0_y0.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/j0_y0.c?r…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/j0_y0.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/j0_y0.c [iso-8859-1] Wed Nov 30 22:04:54 2011 @@ -2,8 +2,6 @@ #include <float.h> #include "ieee754/ieee754.h" -typedef int fpclass_t; -fpclass_t _fpclass(double __d); int *_errno(void); /* @@ -11,7 +9,7 @@ */ double _j0(double num) { - /* FIXME: errno handling */ + if (!_finite(num)) *_errno() = EDOM; return __ieee754_j0(num); } @@ -21,7 +19,12 @@ double _y0(double num) { double retval; - if (!_finite(num)) *_errno() = EDOM; + int fpclass = _fpclass(num); + + if (!_finite(num) || fpclass == _FPCLASS_NN || + fpclass == _FPCLASS_ND || fpclass == _FPCLASS_NZ) + *_errno() = EDOM; + retval = __ieee754_y0(num); if (_fpclass(retval) == _FPCLASS_NINF) { Modified: trunk/reactos/lib/sdk/crt/math/j1_y1.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/j1_y1.c?r…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/j1_y1.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/j1_y1.c [iso-8859-1] Wed Nov 30 22:04:54 2011 @@ -2,8 +2,6 @@ #include <float.h> #include "ieee754/ieee754.h" -typedef int fpclass_t; -fpclass_t _fpclass(double __d); int *_errno(void); /* @@ -11,7 +9,7 @@ */ double _j1(double num) { - /* FIXME: errno handling */ + if (!_finite(num)) *_errno() = EDOM; return __ieee754_j1(num); } @@ -21,7 +19,12 @@ double _y1(double num) { double retval; - if (!_finite(num)) *_errno() = EDOM; + int fpclass = _fpclass(num); + + if (!_finite(num) || fpclass == _FPCLASS_NN || + fpclass == _FPCLASS_ND || fpclass == _FPCLASS_NZ) + *_errno() = EDOM; + retval = __ieee754_y1(num); if (_fpclass(retval) == _FPCLASS_NINF) {
13 years
1
0
0
0
[cgutman] 54551: [NTOSKRNL] - Only flush pages if we can't satisfy Mm's target without using dirty pages
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Nov 30 21:58:46 2011 New Revision: 54551 URL:
http://svn.reactos.org/svn/reactos?rev=54551&view=rev
Log: [NTOSKRNL] - Only flush pages if we can't satisfy Mm's target without using dirty pages Modified: trunk/reactos/ntoskrnl/cc/view.c Modified: trunk/reactos/ntoskrnl/cc/view.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=545…
============================================================================== --- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Wed Nov 30 21:58:46 2011 @@ -304,18 +304,15 @@ LIST_ENTRY FreeList; PFN_NUMBER Page; ULONG i; + BOOLEAN FlushedPages = FALSE; DPRINT("CcRosTrimCache(Target %d)\n", Target); InitializeListHead(&FreeList); - /* Flush dirty pages to disk */ - CcRosFlushDirtyPages(Target, NrFreed); - - if ((*NrFreed) != 0) DPRINT1("Flushed %d dirty cache pages to disk\n", (*NrFreed)); - *NrFreed = 0; +retry: KeAcquireGuardedMutex(&ViewLock); current_entry = CacheSegmentLRUListHead.Flink; @@ -375,6 +372,25 @@ } KeReleaseGuardedMutex(&ViewLock); + + /* Try flushing pages if we haven't met our target */ + if (Target > 0 && !FlushedPages) + { + /* Flush dirty pages to disk */ + CcRosFlushDirtyPages(Target, &PagesFreed); + FlushedPages = TRUE; + + /* We can only swap as many pages as we flushed */ + if (PagesFreed < Target) Target = PagesFreed; + + /* Check if we flushed anything */ + if (PagesFreed != 0) + { + /* Try again after flushing dirty pages */ + DPRINT1("Flushed %d dirty cache pages to disk\n", PagesFreed); + goto retry; + } + } while (!IsListEmpty(&FreeList)) {
13 years
1
0
0
0
[pschweitzer] 54550: [MSVCRT_APITEST] Add more tests
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Nov 30 21:03:35 2011 New Revision: 54550 URL:
http://svn.reactos.org/svn/reactos?rev=54550&view=rev
Log: [MSVCRT_APITEST] Add more tests Modified: trunk/rostests/apitests/msvcrt/ieee.c Modified: trunk/rostests/apitests/msvcrt/ieee.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/ieee.c?re…
============================================================================== --- trunk/rostests/apitests/msvcrt/ieee.c [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/ieee.c [iso-8859-1] Wed Nov 30 21:03:35 2011 @@ -7,6 +7,7 @@ #include <wine/test.h> #include <float.h> +#include <math.h> typedef union { @@ -199,7 +200,7 @@ ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); } -void test_scalb(void) +void test_j0(void) { ieee_double tested; ieee_double expected; @@ -210,6 +211,278 @@ errno = 0xDEADBEEF; tested.l = 0xFFFFFFFFFFFFFFFFLL; expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF7FFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFEFFFFFFFFFFFFFLL; + expected.l = 0x1FE7206E1D6FDCFALL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8010000000000000LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x800FFFFFFFFFFFFFLL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000001LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000000LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000000LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000001LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x000FFFFFFFFFFFFFLL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0010000000000000LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FEFFFFFFFFFFFFFLL; + expected.l = 0x1FE7206E1D6FDCFALL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000001LL; + expected.l = 0x7FF8000000000001LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF7FFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF8000000000000LL; + expected.l = 0x7FF8000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FFFFFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); +} + +void test_j1(void) +{ + ieee_double tested; + ieee_double expected; + ieee_double result; + + expected.l = 0; + + errno = 0xDEADBEEF; + tested.l = 0xFFFFFFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF7FFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFEFFFFFFFFFFFFFLL; + expected.l = 0x9FE7206E1D6FDCFALL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8010000000000000LL; + expected.l = 0x8008000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x800FFFFFFFFFFFFFLL; + expected.l = 0x8008000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000001LL; + expected.l = 0x8000000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000000LL; + expected.l = 0x8000000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000000LL; + expected.l = 0x0000000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000001LL; + expected.l = 0x0000000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x000FFFFFFFFFFFFFLL; + expected.l = 0x0008000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0010000000000000LL; + expected.l = 0x0008000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FEFFFFFFFFFFFFFLL; + expected.l = 0x1FE7206E1D6FDCFALL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000001LL; + expected.l = 0x7FF8000000000001LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF7FFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF8000000000000LL; + expected.l = 0x7FF8000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FFFFFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); +} + +void test_scalb(void) +{ + ieee_double tested; + ieee_double expected; + ieee_double result; + + expected.l = 0; + + errno = 0xDEADBEEF; + tested.l = 0xFFFFFFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; result.d = _scalb(tested.d, 3); ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); ok(errno == EDOM, "errno: %d\n", errno); @@ -332,6 +605,278 @@ expected.l = 0x7FFFFFFFFFFFFFFFLL; result.d = _scalb(tested.d, 3); ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); +} + +void test_y0(void) +{ + ieee_double tested; + ieee_double expected; + ieee_double result; + + expected.l = 0; + + errno = 0xDEADBEEF; + tested.l = 0xFFFFFFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF7FFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFEFFFFFFFFFFFFFLL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8010000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x800FFFFFFFFFFFFFLL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000001LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000000LL; + expected.l = 0xFFF0000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == ERANGE, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000000LL; + expected.l = 0xFFF0000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == ERANGE, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000001LL; + expected.l = 0xC07D9FFC3469E1B3LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x000FFFFFFFFFFFFFLL; + expected.l = 0xC07C30D8F820740ELL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0010000000000000LL; + expected.l = 0xC07C30D8F820740ELL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FEFFFFFFFFFFFFFLL; + expected.l = 0x9FD5A36F8428F58BLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000001LL; + expected.l = 0x7FF8000000000001LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF7FFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF8000000000000LL; + expected.l = 0x7FF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FFFFFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); +} + +void test_y1(void) +{ + ieee_double tested; + ieee_double expected; + ieee_double result; + + expected.l = 0; + + errno = 0xDEADBEEF; + tested.l = 0xFFFFFFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF7FFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFEFFFFFFFFFFFFFLL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8010000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x800FFFFFFFFFFFFFLL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000001LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == ERANGE, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == ERANGE, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000001LL; + expected.l = 0xFFF0000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x000FFFFFFFFFFFFFLL; + expected.l = 0xFFC45F306DC9C884LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0010000000000000LL; + expected.l = 0xFFC45F306DC9C883LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FEFFFFFFFFFFFFFLL; + expected.l = 0x9FD5A36F8428F58BLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000001LL; + expected.l = 0x7FF8000000000001LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF7FFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF8000000000000LL; + expected.l = 0x7FF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FFFFFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); ok(errno == EDOM, "errno: %d\n", errno); } @@ -340,5 +885,9 @@ test_finite(); test_fpclass(); test_isnan(); + test_j0(); + test_j1(); test_scalb(); + test_y0(); + test_y1(); }
13 years
1
0
0
0
[cgutman] 54549: [NTOSKRNL] - Optimize CcRosTrimCache by eliminating an extra loop of all segments - Allow swapping of dirty segments by flushing them first
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Nov 30 17:10:43 2011 New Revision: 54549 URL:
http://svn.reactos.org/svn/reactos?rev=54549&view=rev
Log: [NTOSKRNL] - Optimize CcRosTrimCache by eliminating an extra loop of all segments - Allow swapping of dirty segments by flushing them first Modified: trunk/reactos/ntoskrnl/cc/view.c Modified: trunk/reactos/ntoskrnl/cc/view.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=545…
============================================================================== --- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Wed Nov 30 17:10:43 2011 @@ -302,79 +302,80 @@ ULONG PagesFreed; KIRQL oldIrql; LIST_ENTRY FreeList; - + PFN_NUMBER Page; + ULONG i; + DPRINT("CcRosTrimCache(Target %d)\n", Target); - + + InitializeListHead(&FreeList); + + /* Flush dirty pages to disk */ + CcRosFlushDirtyPages(Target, NrFreed); + + if ((*NrFreed) != 0) DPRINT1("Flushed %d dirty cache pages to disk\n", (*NrFreed)); + *NrFreed = 0; - - InitializeListHead(&FreeList); KeAcquireGuardedMutex(&ViewLock); + current_entry = CacheSegmentLRUListHead.Flink; - while (current_entry != &CacheSegmentLRUListHead && Target > 0) + while (current_entry != &CacheSegmentLRUListHead) { current = CONTAINING_RECORD(current_entry, CACHE_SEGMENT, CacheSegmentLRUListEntry); current_entry = current_entry->Flink; - + KeAcquireSpinLock(¤t->Bcb->BcbLock, &oldIrql); - if (current->MappedCount > 0 && !current->Dirty && !current->PageOut) + /* Reference the cache segment */ + CcRosCacheSegmentIncRefCount(current); + + /* Check if it's mapped and not dirty */ + if (current->MappedCount > 0 && !current->Dirty) { - ULONG i; - - CcRosCacheSegmentIncRefCount(current); - current->PageOut = TRUE; + /* We have to break these locks because Cc sucks */ KeReleaseSpinLock(¤t->Bcb->BcbLock, oldIrql); KeReleaseGuardedMutex(&ViewLock); + + /* Page out the segment */ for (i = 0; i < current->Bcb->CacheSegmentSize / PAGE_SIZE; i++) { - PFN_NUMBER Page; - Page = (PFN_NUMBER)(MmGetPhysicalAddress((char*)current->BaseAddress + i * PAGE_SIZE).QuadPart >> PAGE_SHIFT); + Page = (PFN_NUMBER)(MmGetPhysicalAddress((PUCHAR)current->BaseAddress + (i * PAGE_SIZE)).QuadPart >> PAGE_SHIFT); + MmPageOutPhysicalAddress(Page); } + + /* Reacquire the locks */ KeAcquireGuardedMutex(&ViewLock); KeAcquireSpinLock(¤t->Bcb->BcbLock, &oldIrql); - CcRosCacheSegmentDecRefCount(current); } - + + /* Dereference the cache segment */ + CcRosCacheSegmentDecRefCount(current); + + /* Check if we can free this entry now */ if (current->ReferenceCount == 0) { - PagesPerSegment = current->Bcb->CacheSegmentSize / PAGE_SIZE; - // PagesFreed = PagesPerSegment; - PagesFreed = min(PagesPerSegment, Target); - Target -= PagesFreed; - (*NrFreed) += PagesFreed; - } - - KeReleaseSpinLock(¤t->Bcb->BcbLock, oldIrql); - } - - current_entry = CacheSegmentLRUListHead.Flink; - while (current_entry != &CacheSegmentLRUListHead) - { - current = CONTAINING_RECORD(current_entry, CACHE_SEGMENT, - CacheSegmentLRUListEntry); - current->PageOut = FALSE; - current_entry = current_entry->Flink; - - KeAcquireSpinLock(¤t->Bcb->BcbLock, &oldIrql); - if (current->ReferenceCount == 0) - { + ASSERT(!current->Dirty); + ASSERT(!current->MappedCount); + RemoveEntryList(¤t->BcbSegmentListEntry); - KeReleaseSpinLock(¤t->Bcb->BcbLock, oldIrql); RemoveEntryList(¤t->CacheSegmentListEntry); RemoveEntryList(¤t->CacheSegmentLRUListEntry); InsertHeadList(&FreeList, ¤t->BcbSegmentListEntry); + + /* Calculate how many pages we freed for Mm */ + PagesPerSegment = current->Bcb->CacheSegmentSize / PAGE_SIZE; + PagesFreed = min(PagesPerSegment, Target); + Target -= PagesFreed; + (*NrFreed) += PagesFreed; } - else - { - KeReleaseSpinLock(¤t->Bcb->BcbLock, oldIrql); - } - } - + + KeReleaseSpinLock(¤t->Bcb->BcbLock, oldIrql); + } + KeReleaseGuardedMutex(&ViewLock); - + while (!IsListEmpty(&FreeList)) { current_entry = RemoveHeadList(&FreeList); @@ -382,7 +383,9 @@ BcbSegmentListEntry); CcRosInternalFreeCacheSegment(current); } - + + DPRINT1("Evicted %d cache pages\n", (*NrFreed)); + return(STATUS_SUCCESS); }
13 years
1
0
0
0
[tfaber] 54548: [NTDLL_APITEST] - Add NtAllocateVirtualMemory test, which is a small stress test for virtual memory allocation/freeing/reuse - Can be used to reproduce bug 5857 in third stage (inst...
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Nov 30 17:00:23 2011 New Revision: 54548 URL:
http://svn.reactos.org/svn/reactos?rev=54548&view=rev
Log: [NTDLL_APITEST] - Add NtAllocateVirtualMemory test, which is a small stress test for virtual memory allocation/freeing/reuse - Can be used to reproduce bug 5857 in third stage (install with VT-x enabled, then disable for the test) - Shows that the bug is a race condition in Mm, and not heap's fault - I've put ASSERTs instead of ok's for easier debugging Added: trunk/rostests/apitests/ntdll/NtAllocateVirtualMemory.c (with props) Modified: trunk/rostests/apitests/ntdll/CMakeLists.txt trunk/rostests/apitests/ntdll/ntdll_apitest.rbuild trunk/rostests/apitests/ntdll/testlist.c Modified: trunk/rostests/apitests/ntdll/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/CMakeLists…
============================================================================== --- trunk/rostests/apitests/ntdll/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/ntdll/CMakeLists.txt [iso-8859-1] Wed Nov 30 17:00:23 2011 @@ -1,7 +1,6 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) list(APPEND SOURCE + NtAllocateVirtualMemory.c NtFreeVirtualMemory.c RtlInitializeBitMap.c SystemInfo.c Added: trunk/rostests/apitests/ntdll/NtAllocateVirtualMemory.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/NtAllocate…
============================================================================== --- trunk/rostests/apitests/ntdll/NtAllocateVirtualMemory.c (added) +++ trunk/rostests/apitests/ntdll/NtAllocateVirtualMemory.c [iso-8859-1] Wed Nov 30 17:00:23 2011 @@ -1,0 +1,245 @@ +/* + * PROJECT: ReactOS API Tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Stress Test for virtual memory allocation + * PROGRAMMER: Thomas Faber <thfabba(a)gmx.de> + */ + +#define WIN32_NO_STATUS +#include <stdio.h> +#include <wine/test.h> +#include <ndk/rtlfuncs.h> +#include <ndk/mmfuncs.h> + +static PVOID Allocations[4096] = { NULL }; +static ULONG CurrentAllocation = 0; + +static +VOID +ValidateAllocations(VOID) +{ + ULONG i; + + ASSERT(CurrentAllocation < sizeof(Allocations) / sizeof(Allocations[0])); + for (i = 0; i < CurrentAllocation; ++i) + { + PUCHAR UserBuffer = Allocations[i]; + SIZE_T AllocationSize; + SIZE_T DataSize; + + if (UserBuffer == NULL) + continue; + + AllocationSize = ((PSIZE_T)UserBuffer)[-2]; + DataSize = ((PSIZE_T)UserBuffer)[-1]; + ASSERT(DataSize != 0); + ASSERT(((SIZE_T)UserBuffer + DataSize) % PAGE_SIZE == 0); + } +} + +static +PVOID +Allocate( + SIZE_T DataSize) +{ + NTSTATUS Status; + PVOID AllocationStart = NULL; + SIZE_T AllocationSize = PAGE_ROUND_UP(DataSize + PAGE_SIZE + 2 * sizeof(SIZE_T)); + PVOID FirstPageStart; + SIZE_T NumberOfPages = AllocationSize / PAGE_SIZE; + SIZE_T Size; + PUCHAR UserBuffer; + + Status = NtAllocateVirtualMemory(NtCurrentProcess(), &AllocationStart, 0, &AllocationSize, MEM_RESERVE, PAGE_NOACCESS); + + if (!NT_SUCCESS(Status)) + return NULL; + + FirstPageStart = (PUCHAR)AllocationStart + AllocationSize - PAGE_SIZE * NumberOfPages; + Size = (NumberOfPages - 1) * PAGE_SIZE; + Status = NtAllocateVirtualMemory(NtCurrentProcess(), &FirstPageStart, 0, &Size, MEM_COMMIT, PAGE_READWRITE); + if (!NT_SUCCESS(Status)) + { + Size = 0; + Status = NtFreeVirtualMemory(NtCurrentProcess(), &AllocationStart, &AllocationSize, MEM_RELEASE); + ASSERT(Status == STATUS_SUCCESS); + return NULL; + } + + UserBuffer = AllocationStart; + UserBuffer += AllocationSize - PAGE_SIZE - DataSize; + RtlFillMemory(FirstPageStart, UserBuffer - (PUCHAR)FirstPageStart, 0xae); + RtlZeroMemory(UserBuffer, DataSize); + ((PSIZE_T)UserBuffer)[-2] = AllocationSize; + ((PSIZE_T)UserBuffer)[-1] = DataSize; + + Allocations[CurrentAllocation++] = UserBuffer; + ValidateAllocations(); + return UserBuffer; +} + +static +VOID +Free( + PVOID UserBuffer) +{ + NTSTATUS Status; + PVOID AllocationStart; + SIZE_T Zero = 0; + SIZE_T AllocationSize; + SIZE_T DataSize; + ULONG i; + + AllocationSize = ((PSIZE_T)UserBuffer)[-2]; + DataSize = ((PSIZE_T)UserBuffer)[-1]; + ASSERT(DataSize != 0); + + AllocationStart = (PUCHAR)UserBuffer + DataSize + PAGE_SIZE - AllocationSize; + ASSERT((SIZE_T)AllocationStart % PAGE_SIZE == 0); + + RtlFillMemory(UserBuffer, DataSize, 0xbe); + ((PSIZE_T)UserBuffer)[-1] = 0; + ((PSIZE_T)UserBuffer)[-2] = 0xFAFBFCFD; + + for (i = 0; i < CurrentAllocation; ++i) + if (Allocations[i] == UserBuffer) + { + Allocations[i] = NULL; + break; + } + ValidateAllocations(); + + Status = NtFreeVirtualMemory(NtCurrentProcess(), &AllocationStart, &Zero, MEM_RELEASE); + ASSERT(Status == STATUS_SUCCESS); +} + +static +PVOID +ReAllocate( + PVOID OldUserBuffer, + SIZE_T NewDataSize) +{ + PVOID NewUserBuffer; + SIZE_T OldDataSize; + + OldDataSize = ((PSIZE_T)OldUserBuffer)[-1]; + ASSERT(OldDataSize != 0); + + NewUserBuffer = Allocate(NewDataSize); + ASSERT(((PSIZE_T)OldUserBuffer)[-1] == OldDataSize); + RtlCopyMemory(NewUserBuffer, OldUserBuffer, min(OldDataSize, NewDataSize)); + ASSERT(((PSIZE_T)OldUserBuffer)[-1] == OldDataSize); + Free(OldUserBuffer); + return NewUserBuffer; +} + +static +VOID +AccessMemory1( + PVOID UserBuffer, + SIZE_T DataSize) +{ + PBYTE Buffer = UserBuffer; + SIZE_T i; + + for (i = 0; i < DataSize; ++i) + Buffer[i] = LOBYTE(i); +} + +static +BOOLEAN +CheckMemory1( + PVOID UserBuffer, + SIZE_T DataSize) +{ + PBYTE Buffer = UserBuffer; + SIZE_T i; + + for (i = 0; i < DataSize; ++i) + if (Buffer[i] != LOBYTE(i)) + { + trace("Mismatch in region %p at index %lu. Value=%02x\n", UserBuffer, (ULONG)i, Buffer[i]); + ASSERT(FALSE); + return FALSE; + } + return TRUE; +} + +static +VOID +AccessMemory2( + PVOID UserBuffer, + SIZE_T DataSize) +{ + PBYTE Buffer = UserBuffer; + SIZE_T i; + + for (i = 0; i < DataSize; ++i) + Buffer[i] = UCHAR_MAX - LOBYTE(i); +} + +static +BOOLEAN +CheckMemory2( + PVOID UserBuffer, + SIZE_T DataSize) +{ + PBYTE Buffer = UserBuffer; + SIZE_T i; + + for (i = 0; i < DataSize; ++i) + if (Buffer[i] != UCHAR_MAX - LOBYTE(i)) + { + trace("Mismatch in region %p at index %lu. Value=%02x\n", UserBuffer, (ULONG)i, Buffer[i]); + ASSERT(FALSE); + return FALSE; + } + return TRUE; +} + +#define RUNS 32 + +START_TEST(NtAllocateVirtualMemory) +{ + PVOID Mem1, Mem2; + SIZE_T Size1, Size2; + ULONG i; + + Size1 = 32; + Mem1 = Allocate(Size1); + AccessMemory1(Mem1, Size1); + Size2 = 128; + Mem2 = Allocate(Size2); + AccessMemory2(Mem2, Size2); + for (i = 0; i < RUNS; ++i) + { + PVOID New; + ok(CheckMemory1(Mem1, Size1) == TRUE, "CheckMemory1 failure\n"); + New = ReAllocate(Mem1, Size1 * 3 / 2); + if (New == NULL) + { + skip("Realloc failure\n"); + break; + } + Mem1 = New; + ok(CheckMemory1(Mem1, Size1) == TRUE, "CheckMemory1 failure\n"); + Size1 = Size1 * 3 / 2; + AccessMemory1(Mem1, Size1); + + ok(CheckMemory2(Mem2, Size2) == TRUE, "CheckMemory2 failure\n"); + New = ReAllocate(Mem2, Size2 + 128); + if (New == NULL) + { + skip("Realloc failure\n"); + break; + } + Mem2 = New; + ok(CheckMemory2(Mem2, Size2) == TRUE, "CheckMemory2 failure\n"); + Size2 += 128; + AccessMemory2(Mem2, Size2); + } + ok(CheckMemory2(Mem2, Size2) == TRUE, "CheckMemory2 failure\n"); + Free(Mem2); + ok(CheckMemory1(Mem1, Size1) == TRUE, "CheckMemory1 failure\n"); + Free(Mem1); +} Propchange: trunk/rostests/apitests/ntdll/NtAllocateVirtualMemory.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/ntdll/ntdll_apitest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/ntdll_apit…
============================================================================== --- trunk/rostests/apitests/ntdll/ntdll_apitest.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/ntdll/ntdll_apitest.rbuild [iso-8859-1] Wed Nov 30 17:00:23 2011 @@ -10,7 +10,8 @@ <library>pseh</library> <file>testlist.c</file> - <file>NtFreeVirtualMemory.c</file> + <file>NtAllocateVirtualMemory.c</file> + <file>NtFreeVirtualMemory.c</file> <file>RtlInitializeBitMap.c</file> <file>ZwContinue.c</file> <file>SystemInfo.c</file> Modified: trunk/rostests/apitests/ntdll/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/testlist.c…
============================================================================== --- trunk/rostests/apitests/ntdll/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/ntdll/testlist.c [iso-8859-1] Wed Nov 30 17:00:23 2011 @@ -5,17 +5,19 @@ #define STANDALONE #include "wine/test.h" +extern void func_NtAllocateVirtualMemory(void); +extern void func_NtFreeVirtualMemory(void); +extern void func_NtSystemInformation(void); extern void func_RtlInitializeBitMap(void); extern void func_ZwContinue(void); -extern void func_NtFreeVirtualMemory(void); -extern void func_NtSystemInformation(void); const struct test winetest_testlist[] = { - { "RtlInitializeBitMap", func_RtlInitializeBitMap }, - { "ZwContinue", func_ZwContinue }, - { "NtFreeVirtualMemory", func_NtFreeVirtualMemory }, - { "NtSystemInformation", func_NtSystemInformation }, + { "NtAllocateVirtualMemory", func_NtAllocateVirtualMemory }, + { "NtFreeVirtualMemory", func_NtFreeVirtualMemory }, + { "NtSystemInformation", func_NtSystemInformation }, + { "RtlInitializeBitMap", func_RtlInitializeBitMap }, + { "ZwContinue", func_ZwContinue }, { 0, 0 } };
13 years
1
0
0
0
[rharabien] 54547: [SHELL32] - Restore functionality of Start Menu from old shell32
by rharabien@svn.reactos.org
Author: rharabien Date: Wed Nov 30 12:21:27 2011 New Revision: 54547 URL:
http://svn.reactos.org/svn/reactos?rev=54547&view=rev
Log: [SHELL32] - Restore functionality of Start Menu from old shell32 Modified: trunk/reactos/dll/win32/shell32/shell32_main.cpp trunk/reactos/dll/win32/shell32/startmenu.cpp trunk/reactos/dll/win32/shell32/startmenu.h Modified: trunk/reactos/dll/win32/shell32/shell32_main.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] Wed Nov 30 12:21:27 2011 @@ -1287,7 +1287,7 @@ OBJECT_ENTRY(CLSID_RecycleBin, CRecycleBin) OBJECT_ENTRY(CLSID_OpenWithMenu, COpenWithMenu) OBJECT_ENTRY(CLSID_NewMenu, CNewMenu) -OBJECT_ENTRY(CLSID_StartMenu, CStartMenuCallback) +OBJECT_ENTRY(CLSID_StartMenu, CStartMenu) OBJECT_ENTRY(CLSID_MenuBandSite, CMenuBandSite) END_OBJECT_MAP() Modified: trunk/reactos/dll/win32/shell32/startmenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/startmen…
============================================================================== --- trunk/reactos/dll/win32/shell32/startmenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/startmenu.cpp [iso-8859-1] Wed Nov 30 12:21:27 2011 @@ -22,148 +22,324 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell32start); -CStartMenuCallback::CStartMenuCallback() -{ -} - -CStartMenuCallback::~CStartMenuCallback() -{ -} - -HRESULT STDMETHODCALLTYPE CStartMenuCallback::SetSite(IUnknown *pUnkSite) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CStartMenuCallback::GetSite(REFIID riid, void **ppvSite) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CStartMenuCallback::CallbackSM(LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ +CStartMenu::CStartMenu() +{ + m_pBandSite = NULL; + m_pUnkSite = NULL; +} + +CStartMenu::~CStartMenu() +{ +} + +HRESULT STDMETHODCALLTYPE CStartMenu::ContextSensitiveHelp(BOOL fEnterMode) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::GetWindow(HWND *phwnd) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::GetClient(IUnknown **ppunkClient) +{ + TRACE("(%p, %p)\n", this, ppunkClient); + + *ppunkClient = (IUnknown*)m_pBandSite; + (*ppunkClient)->AddRef(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::OnPosRectChangeDB(LPRECT prc) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::SetClient(IUnknown *punkClient) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::OnSelect(DWORD dwSelectType) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::SetSubMenu(IMenuPopup *pmp, BOOL fSet) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::SetSite(IUnknown *pUnkSite) +{ + TRACE("(%p, %p)\n", this, pUnkSite); + + if (m_pUnkSite) + m_pUnkSite->Release(); + m_pUnkSite = pUnkSite; + if (m_pUnkSite) + m_pUnkSite->AddRef(); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::GetSite(REFIID riid, void **ppvSite) +{ + TRACE("(%p, %s, %p)\n", this, debugstr_guid(&riid), ppvSite); + + if (!m_pUnkSite) + return E_FAIL; + + return m_pUnkSite->QueryInterface(riid, ppvSite); +} + +HRESULT STDMETHODCALLTYPE CStartMenu::Initialize() +{ + HRESULT hr; + CComObject<CMenuBandSite> *pBandSiteObj; + + TRACE("(%p)\n", this); + + //pBandSiteObj = new CComObject<CMenuBandSite>(); + ATLTRY (pBandSiteObj = new CComObject<CMenuBandSite>); + if (pBandSiteObj == NULL) + return E_OUTOFMEMORY; + + hr = pBandSiteObj->QueryInterface(IID_IBandSite, (VOID**)&m_pBandSite); + if (FAILED(hr)) + return NULL; + + return m_pBandSite->AddBand((IMenuBand*)this); +} + +HRESULT STDMETHODCALLTYPE CStartMenu::IsMenuMessage(MSG *pmsg) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenu::TranslateMenuMessage(MSG *pmsg, LRESULT *plRet) +{ + UNIMPLEMENTED; return E_NOTIMPL; } CMenuBandSite::CMenuBandSite() { + m_pObjects = NULL; + m_cObjects = 0; } CMenuBandSite::~CMenuBandSite() { } +HRESULT STDMETHODCALLTYPE CMenuBandSite::AddBand(IUnknown *punk) +{ + IUnknown **pObjects; + + TRACE("punk %p\n", punk); + + if (!punk) + return E_FAIL; + + pObjects = (IUnknown**)CoTaskMemAlloc(sizeof(IUnknown*) * (m_cObjects + 1)); + if (!pObjects) + return E_FAIL; + + RtlMoveMemory(pObjects, m_pObjects, sizeof(IUnknown*) * m_cObjects); + + CoTaskMemFree(m_pObjects); + + m_pObjects = pObjects; + + m_pObjects[m_cObjects] = punk; + punk->AddRef(); + + m_cObjects++; + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::EnumBands(UINT uBand, DWORD *pdwBandID) +{ + ULONG Index, ObjectCount; + + TRACE("uBand %uu pdwBandID %p\n", uBand, pdwBandID); + + if (uBand == (UINT)-1) + return m_cObjects; + + ObjectCount = 0; + + for(Index = 0; Index < m_cObjects; Index++) + { + if (m_pObjects[Index] != NULL) + { + if (uBand == ObjectCount) + { + *pdwBandID = Index; + return S_OK; + } + ObjectCount++; + } + } + return E_FAIL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::RemoveBand(DWORD dwBandID) +{ + TRACE("dwBandID %u\n", dwBandID); + + if (m_cObjects <= dwBandID) + return E_FAIL; + + if (m_pObjects[dwBandID]) + { + m_pObjects[dwBandID]->Release(); + m_pObjects[dwBandID] = NULL; + } + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv) +{ + TRACE("dwBandID %u riid %p ppv %p\n", dwBandID, riid, ppv); + + if (m_cObjects <= dwBandID) + return E_FAIL; + + if (m_pObjects[dwBandID]) + { + return m_pObjects[dwBandID]->QueryInterface(riid, ppv); + } + + return E_FAIL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::SetBandSiteInfo(const BANDSITEINFO *pbsinfo) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::GetBandSiteInfo(BANDSITEINFO *pbsinfo) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + HRESULT STDMETHODCALLTYPE CMenuBandSite::GetWindow(HWND *phwnd) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::ContextSensitiveHelp(BOOL fEnterMode) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::SetDeskBarSite(IUnknown *punkSite) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::SetModeDBC(DWORD dwMode) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::UIActivateDBC(DWORD dwState) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::GetSize(DWORD dwWhich, LPRECT prc) { + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) +{ + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::UIActivateIO(BOOL fActivate, LPMSG lpMsg) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::HasFocusIO() { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::TranslateAcceleratorIO(LPMSG lpMsg) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::OnWinEvent(HWND paramC, UINT param10, WPARAM param14, LPARAM param18, LRESULT *param1C) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::IsWindowOwner(HWND paramC) { + UNIMPLEMENTED; return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMenuBandSite::QueryService(REFGUID guidService, REFIID riid, void **ppvObject) { - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::AddBand(IUnknown *punk) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::EnumBands(UINT uBand, DWORD *pdwBandID) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::RemoveBand(DWORD dwBandID) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::SetBandSiteInfo(const BANDSITEINFO *pbsinfo) -{ - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE CMenuBandSite::GetBandSiteInfo(BANDSITEINFO *pbsinfo) -{ - return E_NOTIMPL; -} + UNIMPLEMENTED; + return E_NOTIMPL; +} Modified: trunk/reactos/dll/win32/shell32/startmenu.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/startmen…
============================================================================== --- trunk/reactos/dll/win32/shell32/startmenu.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/startmenu.h [iso-8859-1] Wed Nov 30 12:21:27 2011 @@ -21,51 +21,91 @@ #ifndef _STARTMENU_H_ #define _STARTMENU_H_ -class CStartMenuCallback : - public CComCoClass<CStartMenuCallback, &CLSID_NULL>, +class CStartMenu : + public CComCoClass<CStartMenu, &CLSID_StartMenu>, public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IMenuPopup, public IObjectWithSite, - public IShellMenuCallback + public IInitializeObject, + public IMenuBand // FIXME { private: + IBandSite *m_pBandSite; + IUnknown *m_pUnkSite; + public: - CStartMenuCallback(); - ~CStartMenuCallback(); + CStartMenu(); + ~CStartMenu(); + + // *** IOleWindow methods *** + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); + + // *** IDeskBar methods *** + virtual HRESULT STDMETHODCALLTYPE GetClient(IUnknown **ppunkClient); + virtual HRESULT STDMETHODCALLTYPE OnPosRectChangeDB(LPRECT prc); + virtual HRESULT STDMETHODCALLTYPE SetClient(IUnknown *punkClient); + + // *** IMenuPopup methods *** + virtual HRESULT STDMETHODCALLTYPE OnSelect(DWORD dwSelectType); + virtual HRESULT STDMETHODCALLTYPE Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags); + virtual HRESULT STDMETHODCALLTYPE SetSubMenu(IMenuPopup *pmp, BOOL fSet); // *** IObjectWithSite methods *** virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); - // *** IShellMenuCallback methods *** - virtual HRESULT STDMETHODCALLTYPE CallbackSM(LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam); + // *** IInitializeObject methods *** + virtual HRESULT STDMETHODCALLTYPE Initialize(); + + // *** IMenuBand methods *** FIXME + virtual HRESULT STDMETHODCALLTYPE IsMenuMessage(MSG *pmsg); + virtual HRESULT STDMETHODCALLTYPE TranslateMenuMessage(MSG *pmsg, LRESULT *plRet); -DECLARE_NO_REGISTRY() -DECLARE_NOT_AGGREGATABLE(CStartMenuCallback) +DECLARE_REGISTRY_RESOURCEID(IDR_STARTMENU) +DECLARE_NOT_AGGREGATABLE(CStartMenu) DECLARE_PROTECT_FINAL_CONSTRUCT() -BEGIN_COM_MAP(CStartMenuCallback) +BEGIN_COM_MAP(CStartMenu) + COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) + COM_INTERFACE_ENTRY_IID(IID_IDeskBar, IDeskBar) + COM_INTERFACE_ENTRY_IID(IID_IMenuPopup, IMenuPopup) COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) - COM_INTERFACE_ENTRY_IID(IID_IShellMenuCallback, IShellMenuCallback) + COM_INTERFACE_ENTRY_IID(IID_IInitializeObject, IInitializeObject) + COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand) // FIXME: Win does not export it END_COM_MAP() }; class CMenuBandSite : public CComCoClass<CMenuBandSite, &CLSID_MenuBandSite>, public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IBandSite, public IDeskBarClient, + public IOleCommandTarget, public IInputObject, public IInputObjectSite, public IWinEventHandler, - public IServiceProvider, - public IOleCommandTarget, - public IBandSite + public IServiceProvider { private: + IUnknown **m_pObjects; + ULONG m_cObjects; + public: CMenuBandSite(); ~CMenuBandSite(); - + + // *** IBandSite methods *** + virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk); + virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID); + virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName); + virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); + virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); + virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv); + virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); + virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); + // *** IOleWindow methods *** virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); @@ -75,6 +115,10 @@ virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode); virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState); virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc); + + // *** IOleCommandTarget methods *** + virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); + virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); // *** IInputObject methods *** virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); @@ -91,34 +135,20 @@ // *** IServiceProvider methods *** virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); - // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); - - // *** IBandSite methods *** - virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID); - virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName); - virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); - virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv); - virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); - virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); - DECLARE_REGISTRY_RESOURCEID(IDR_MENUBANDSITE) DECLARE_NOT_AGGREGATABLE(CMenuBandSite) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CMenuBandSite) + COM_INTERFACE_ENTRY_IID(IID_IBandSite, IBandSite) COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) COM_INTERFACE_ENTRY_IID(IID_IDeskBarClient, IDeskBarClient) + COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject) COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite) COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler) COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) - COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) - COM_INTERFACE_ENTRY_IID(IID_IBandSite, IBandSite) END_COM_MAP() };
13 years
1
0
0
0
[rharabien] 54546: [EXPLORER-NEW] - Improve start menu initialization a bit so it shows what failed
by rharabien@svn.reactos.org
Author: rharabien Date: Wed Nov 30 12:20:08 2011 New Revision: 54546 URL:
http://svn.reactos.org/svn/reactos?rev=54546&view=rev
Log: [EXPLORER-NEW] - Improve start menu initialization a bit so it shows what failed Modified: trunk/reactos/base/shell/explorer-new/startmnu.c Modified: trunk/reactos/base/shell/explorer-new/startmnu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/st…
============================================================================== --- trunk/reactos/base/shell/explorer-new/startmnu.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/startmnu.c [iso-8859-1] Wed Nov 30 12:20:08 2011 @@ -843,110 +843,120 @@ IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons) { - HRESULT hRet; + HRESULT hr; IObjectWithSite *pOws = NULL; IMenuPopup *pMp = NULL; IStartMenuSite *pSms = NULL; IMenuBand *pMb = NULL; IInitializeObject *pIo; - IUnknown *pUnk; - IBandSite *pBs; + IUnknown *pUnk = NULL; + IBandSite *pBs = NULL; DWORD dwBandId = 0; pSms = CreateStartMenuSite(Tray); if (pSms == NULL) return NULL; - hRet = CoCreateInstance(&CLSID_StartMenu, - NULL, - CLSCTX_INPROC_SERVER, - &IID_IMenuPopup, - (PVOID*)&pMp); - if (SUCCEEDED(hRet)) - { - hRet = IMenuPopup_QueryInterface(pMp, - &IID_IObjectWithSite, - (PVOID*)&pOws); - if (SUCCEEDED(hRet)) - { - /* Set the menu site so we can handle messages */ - hRet = IObjectWithSite_SetSite(pOws, - (IUnknown*)pSms); - if (SUCCEEDED(hRet)) - { - /* Initialize the menu object */ - hRet = IMenuPopup_QueryInterface(pMp, - &IID_IInitializeObject, - (PVOID*)&pIo); - if (SUCCEEDED(hRet)) - { - //hRet = IInitializeObject_Initialize(pIo); - hRet = pIo->lpVtbl->Initialize(pIo); - - //IInitializeObject_Release(pIo); - pIo->lpVtbl->Release(pIo); - } - else - hRet = S_OK; - - /* Everything is initialized now. Let's get the IMenuBand interface. */ - if (SUCCEEDED(hRet)) - { - hRet = IMenuPopup_GetClient(pMp, - &pUnk); - - if (SUCCEEDED(hRet)) - { - hRet = IUnknown_QueryInterface(pUnk, - &IID_IBandSite, - (PVOID*)&pBs); - - if (SUCCEEDED(hRet)) - { - /* Finally we have the IBandSite interface, there's only one - band in it that apparently provides the IMenuBand interface */ - hRet = IBandSite_EnumBands(pBs, - 0, - &dwBandId); - if (SUCCEEDED(hRet)) - { - hRet = IBandSite_GetBandObject(pBs, - dwBandId, - &IID_IMenuBand, - (PVOID*)&pMb); - } - - IBandSite_Release(pBs); - } - - IUnknown_Release(pUnk); - } - } - } - - IObjectWithSite_Release(pOws); - } - } - - IStartMenuSite_Release(pSms); - - if (!SUCCEEDED(hRet)) - { - DbgPrint("Failed to initialize the start menu: 0x%x!\n", hRet); - - if (pMp != NULL) - IMenuPopup_Release(pMp); - - if (pMb != NULL) - IMenuBand_Release(pMb); - - return NULL; + hr = CoCreateInstance(&CLSID_StartMenu, + NULL, + CLSCTX_INPROC_SERVER, + &IID_IMenuPopup, + (PVOID*)&pMp); + if (FAILED(hr)) + { + DbgPrint("CoCreateInstance failed: %x\n", hr); + goto cleanup; + } + + hr = IMenuPopup_QueryInterface(pMp, + &IID_IObjectWithSite, + (PVOID*)&pOws); + if (FAILED(hr)) + { + DbgPrint("IMenuPopup_QueryInterface failed: %x\n", hr); + goto cleanup; + } + + /* Set the menu site so we can handle messages */ + hr = IObjectWithSite_SetSite(pOws, (IUnknown*)pSms); + if (FAILED(hr)) + { + DbgPrint("IObjectWithSite_SetSite failed: %x\n", hr); + goto cleanup; + } + + /* Initialize the menu object */ + hr = IMenuPopup_QueryInterface(pMp, &IID_IInitializeObject, (PVOID*)&pIo); + if (SUCCEEDED(hr)) + { + //hr = IInitializeObject_Initialize(pIo); + hr = pIo->lpVtbl->Initialize(pIo); + + //IInitializeObject_Release(pIo); + pIo->lpVtbl->Release(pIo); + } + else + hr = S_OK; + + /* Everything is initialized now. Let's get the IMenuBand interface. */ + if (FAILED(hr)) + { + DbgPrint("IMenuPopup_QueryInterface failed: %x\n", hr); + goto cleanup; + } + + hr = IMenuPopup_GetClient(pMp, &pUnk); + if (FAILED(hr)) + { + DbgPrint("IMenuPopup_GetClient failed: %x\n", hr); + goto cleanup; + } + + hr = IUnknown_QueryInterface(pUnk, &IID_IBandSite, (PVOID*)&pBs); + if (FAILED(hr)) + { + DbgPrint("IUnknown_QueryInterface pBs failed: %x\n", hr); + goto cleanup; + } + + /* Finally we have the IBandSite interface, there's only one + band in it that apparently provides the IMenuBand interface */ + hr = IBandSite_EnumBands(pBs, 0, &dwBandId); + if (FAILED(hr)) + { + DbgPrint("IBandSite_EnumBands failed: %x\n", hr); + goto cleanup; + } + + hr = IBandSite_GetBandObject(pBs, dwBandId, &IID_IMenuBand, (PVOID*)&pMb); + if (FAILED(hr)) + { + DbgPrint("IBandSite_GetBandObject failed: %x\n", hr); + goto cleanup; } UpdateStartMenu(pMp, hbmBanner, bSmallIcons); - *ppMenuBand = pMb; +cleanup: + if (SUCCEEDED(hr)) + *ppMenuBand = pMb; + else if (pMb != NULL) + IMenuBand_Release(pMb); + + if (pBs != NULL) + IBandSite_Release(pBs); + if (pUnk != NULL) + IUnknown_Release(pUnk); + if (pOws != NULL) + IObjectWithSite_Release(pOws); + if (pMp != NULL) + IMenuPopup_Release(pMp); + if (pSms != NULL) + IStartMenuSite_Release(pSms); + + if (FAILED(hr)) + return NULL; return pMp; }
13 years
1
0
0
0
[dgorbachev] 54545: [SsStars] Update Starfield screensaver translations (bug #6270): - Polish by Wojtek Kozlowski <=wojtekkozlo664=AT=op=DOT=pl=>; - Russian by Evilslon <=evilslon=AT=mail=DOT=ru=>.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Wed Nov 30 11:27:50 2011 New Revision: 54545 URL:
http://svn.reactos.org/svn/reactos?rev=54545&view=rev
Log: [SsStars] Update Starfield screensaver translations (bug #6270): - Polish by Wojtek Kozlowski <=wojtekkozlo664=AT=op=DOT=pl=>; - Russian by Evilslon <=evilslon=AT=mail=DOT=ru=>. Modified: trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc trunk/rosapps/applications/screensavers/ssstars/resource.rc Modified: trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc [iso-8859-1] Wed Nov 30 11:27:50 2011 @@ -1,4 +1,4 @@ -LANGUAGE LANG_POLISH, SUBLANG_NEUTRAL +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT // Dialog @@ -24,15 +24,15 @@ WS_TABSTOP CONTROL "",IDC_IMAGE_COSMOS,"Static",SS_BITMAP | SS_CENTERIMAGE, 4,4,284,92 - GROUPBOX "Advanced",IDC_STATIC,16,180,260,72 - CONTROL "Enable background blending",IDC_CHECK_DOBLENDING, + GROUPBOX "Zaawansowane",IDC_STATIC,16,180,260,72 + CONTROL "W³¹cz ³¹czenie t³a",IDC_CHECK_DOBLENDING, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,196,110,10 - CONTROL "Enable accurate perspective correction", + CONTROL "W³¹cz precyzyjn¹ poprawê perspektywy", IDC_CHECK_PERSPECTIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,208,142,10 - CONTROL "Enable texture filtering",IDC_CHECK_FILTERING, + CONTROL "W³¹cz filtrowanie tekstur",IDC_CHECK_FILTERING, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,220,90,10 - CONTROL "Enable smooth shading",IDC_CHECK_SHADING,"Button", + CONTROL "W³¹cz wyg³adzanie cieni",IDC_CHECK_SHADING,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,24,232,100,10 PUSHBUTTON "OK",IDOK,60,260,52,16 PUSHBUTTON "Anuluj",IDCANCEL,120,260,52,16 Modified: trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc [iso-8859-1] Wed Nov 30 11:27:50 2011 @@ -1,52 +1,52 @@ -LANGUAGE LANG_RUSSIAN, SUBLANG_NEUTRAL +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT // Dialog DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 292, 282 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Ïàðàìåòðû çàñòàâêè" +CAPTION "ÐаÑамеÑÑÑ Ð·Ð°ÑÑавки" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Íàñòðîéêè",IDC_STATIC,16,100,260,76 - RTEXT "Êîëè÷åñòâî çâ¸çä:",IDC_STATIC,24,116,68,12, + GROUPBOX "ÐаÑÑÑойки",IDC_STATIC,16,100,260,76 + RTEXT "ÐолиÑеÑÑво звÑзд:",IDC_STATIC,24,116,68,12, SS_CENTERIMAGE CONTROL "Slider1",IDC_SLIDER_NUM_OF_STARS,"msctls_trackbar32", TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,96,116,140,12 CTEXT "Static",IDC_TEXT_NUM_OF_STARS,240,116,24,12, SS_CENTERIMAGE,WS_EX_STATICEDGE - RTEXT "Ñêîðîñòü:",IDC_STATIC,24,137,68,12,SS_CENTERIMAGE + RTEXT "СкоÑоÑÑÑ:",IDC_STATIC,24,137,68,12,SS_CENTERIMAGE CONTROL "Slider1",IDC_SLIDER_SPEED,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,96,137,140,12 CTEXT "Static",IDC_TEXT_SPEED,240,137,24,12,SS_CENTERIMAGE, WS_EX_STATICEDGE - RTEXT "Âðàùåíèå:",IDC_STATIC,24,156,68,12,SS_CENTERIMAGE + RTEXT "ÐÑаÑение:",IDC_STATIC,24,156,68,12,SS_CENTERIMAGE COMBOBOX IDC_COMBO_ROTATION,100,156,80,60,CBS_DROPDOWNLIST | WS_TABSTOP CONTROL "",IDC_IMAGE_COSMOS,"Static",SS_BITMAP | SS_CENTERIMAGE, 4,4,284,92 - GROUPBOX "Advanced",IDC_STATIC,16,180,260,72 - CONTROL "Enable background blending",IDC_CHECK_DOBLENDING, + GROUPBOX "ÐополниÑелÑнÑе наÑÑÑойки",IDC_STATIC,16,180,260,72 + CONTROL "ÐклÑÑиÑÑ Ñоновое ÑмеÑивание",IDC_CHECK_DOBLENDING, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,196,110,10 - CONTROL "Enable accurate perspective correction", + CONTROL "ÐклÑÑиÑÑ ÑоÑнÑÑ ÐºÐ¾ÑÑекÑÐ¸Ñ Ð¿ÐµÑÑпекÑивÑ", IDC_CHECK_PERSPECTIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,208,142,10 - CONTROL "Enable texture filtering",IDC_CHECK_FILTERING, + CONTROL "ÐклÑÑиÑÑ ÑилÑÑÑаÑÐ¸Ñ ÑекÑÑÑÑ",IDC_CHECK_FILTERING, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,220,90,10 - CONTROL "Enable smooth shading",IDC_CHECK_SHADING,"Button", + CONTROL "ÐклÑÑиÑÑ Ð¼Ñгкие Ñени",IDC_CHECK_SHADING,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,24,232,100,10 PUSHBUTTON "OK",IDOK,60,260,52,16 - PUSHBUTTON "Îòìåíà",IDCANCEL,120,260,52,16 - PUSHBUTTON "Î ïðîãðàììå",IDC_BUTTON_ABOUT,179,260,52,16 + PUSHBUTTON "ÐÑмена",IDCANCEL,120,260,52,16 + PUSHBUTTON "РпÑогÑамме",IDC_BUTTON_ABOUT,179,260,52,16 END // String Tables STRINGTABLE DISCARDABLE BEGIN - IDS_DESCRIPTION "Çâ¸çäíîå ïîëå" - IDS_ROTATION_NONE "Îòñóòñòâóåò" - IDS_ROTATION_LINEAR "Ëèíåéíîå" - IDS_ROTATION_PERIODIC "Ïåðèîäè÷åñêîå" - IDS_LICENSE "Çâ¸çäíîå ïîëå - ýòî ñâîáîäíîå ÏÎ, ðàñïðîñòðàíÿåìîå ïîä ëèöåíçèåé GNU GPL." - IDS_AUTHOR "Çàñòàâêó ñîçäàë Carlo Bramini" + IDS_DESCRIPTION "ÐвÑздное поле" + IDS_ROTATION_NONE "ÐÑÑÑÑÑÑвÑеÑ" + IDS_ROTATION_LINEAR "Ðинейное" + IDS_ROTATION_PERIODIC "ÐеÑиодиÑеÑкое" + IDS_LICENSE "ÐвÑздное поле â ÑÑо Ñвободное ÐÐ, ÑаÑпÑоÑÑÑанÑемое под лиÑензией GNU GPL." + IDS_AUTHOR "ÐаÑÑÐ°Ð²ÐºÑ Ñоздал ÐаÑло ÐÑамини" END Modified: trunk/rosapps/applications/screensavers/ssstars/resource.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/resource.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/screensavers/ssstars/resource.rc [iso-8859-1] Wed Nov 30 11:27:50 2011 @@ -47,9 +47,8 @@ // Language resources #include "lang/en-US.rc" #include "lang/it-IT.rc" -#include "lang/ru-RU.rc" // UTF-8 #pragma code_page(65001) - +#include "lang/ru-RU.rc" #include "lang/pl-PL.rc"
13 years
1
0
0
0
← Newer
1
2
3
4
...
28
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
Results per page:
10
25
50
100
200