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
September 2016
----- 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
18 participants
342 discussions
Start a n
N
ew thread
[jimtabor] 72650: [USER32] - Sync with Wine Staging 1.9.18.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sun Sep 11 00:57:38 2016 New Revision: 72650 URL:
http://svn.reactos.org/svn/reactos?rev=72650&view=rev
Log: [USER32] - Sync with Wine Staging 1.9.18. Modified: trunk/reactos/win32ss/user/user32/controls/button.c Modified: trunk/reactos/win32ss/user/user32/controls/button.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/contro…
============================================================================== --- trunk/reactos/win32ss/user/user32/controls/button.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/controls/button.c [iso-8859-1] Sun Sep 11 00:57:38 2016 @@ -135,10 +135,6 @@ OB_Paint /* BS_OWNERDRAW */ }; -static HBITMAP hbitmapCheckBoxes = 0; -static WORD checkBoxWidth = 0, checkBoxHeight = 0; - - /********************************************************************* * button class descriptor */ @@ -272,7 +268,8 @@ } } } - + else + return 0; #else if (!IsWindow( hWnd )) return 0; #endif @@ -299,14 +296,6 @@ break; case WM_CREATE: - if (!hbitmapCheckBoxes) - { - BITMAP bmp; - hbitmapCheckBoxes = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_CHECKBOXES)); - GetObjectW( hbitmapCheckBoxes, sizeof(bmp), &bmp ); - checkBoxWidth = bmp.bmWidth / 4; - checkBoxHeight = bmp.bmHeight / 3; - } if (btn_type >= MAX_BTN_TYPE) return -1; /* abort */ @@ -400,8 +389,9 @@ break; /* fall through */ case WM_LBUTTONUP: - { +#ifdef _REACTOS_ BOOL TellParent = FALSE; //// ReactOS see note below. +#endif state = get_button_state( hWnd ); if (!(state & BUTTON_BTNPRESSED)) break; state &= BUTTON_NSTATES; @@ -429,15 +419,27 @@ (state & BST_INDETERMINATE) ? 0 : ((state & 3) + 1), 0 ); break; } +#ifdef _REACTOS_ TellParent = TRUE; // <---- Fix CORE-10194, Notify parent after capture is released. - } +#else + ReleaseCapture(); + BUTTON_NOTIFY_PARENT(hWnd, BN_CLICKED); +#endif + } +#ifdef _REACTOS_ ReleaseCapture(); if (TellParent) BUTTON_NOTIFY_PARENT(hWnd, BN_CLICKED); - } +#else + else + { + ReleaseCapture(); + } +#endif break; case WM_CAPTURECHANGED: TRACE("WM_CAPTURECHANGED %p\n", hWnd); + if (hWnd == (HWND)lParam) break; state = get_button_state( hWnd ); if (state & BUTTON_BTNPRESSED) { @@ -459,36 +461,37 @@ { /* Clear an old text here as Windows does */ // +// ReactOS Note : // wine Bug:
http://bugs.winehq.org/show_bug.cgi?id=25790
// Patch:
http://source.winehq.org/patches/data/70889
// By: Alexander LAW, Replicate Windows behavior of WM_SETTEXT handler regarding WM_CTLCOLOR* // #ifdef __REACTOS__ if (style & WS_VISIBLE) - { -#endif +#else + if (IsWindowVisible(hWnd)) +#endif + { HDC hdc = GetDC(hWnd); HBRUSH hbrush; RECT client, rc; HWND parent = GetParent(hWnd); -#ifdef __REACTOS__ - UINT ctlMessage = (btn_type == BS_PUSHBUTTON || - btn_type == BS_DEFPUSHBUTTON || - btn_type == BS_PUSHLIKE || - btn_type == BS_USERBUTTON || - btn_type == BS_OWNERDRAW) ? - WM_CTLCOLORBTN : WM_CTLCOLORSTATIC; -#endif + UINT message = (btn_type == BS_PUSHBUTTON || + btn_type == BS_DEFPUSHBUTTON || + btn_type == BS_PUSHLIKE || + btn_type == BS_USERBUTTON || + btn_type == BS_OWNERDRAW) ? + WM_CTLCOLORBTN : WM_CTLCOLORSTATIC; if (!parent) parent = hWnd; #ifdef __REACTOS__ - hbrush = GetControlColor(parent, hWnd, hdc, ctlMessage); -#else - hbrush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORSTATIC, - (WPARAM)hdc, (LPARAM)hWnd); - if (!hbrush) /* did the app forget to call DefWindowProc ? */ - hbrush = (HBRUSH)DefWindowProcW(parent, WM_CTLCOLORSTATIC, - (WPARAM)hdc, (LPARAM)hWnd); + hbrush = GetControlColor(parent, hWnd, hdc, message); +#else + hbrush = (HBRUSH)SendMessageW(parent, message, + (WPARAM)hdc, (LPARAM)hWnd); + if (!hbrush) /* did the app forget to call DefWindowProc ? */ + hbrush = (HBRUSH)DefWindowProcW(parent, message, + (WPARAM)hdc, (LPARAM)hWnd); #endif GetClientRect(hWnd, &client); @@ -499,9 +502,7 @@ if (rc.bottom > client.bottom) rc.bottom = client.bottom; FillRect(hdc, &rc, hbrush); ReleaseDC(hWnd, hdc); -#ifdef __REACTOS__ - } -#endif + } if (unicode) DefWindowProcW( hWnd, WM_SETTEXT, wParam, lParam ); else DefWindowProcA( hWnd, WM_SETTEXT, wParam, lParam ); @@ -842,11 +843,8 @@ static BOOL CALLBACK BUTTON_DrawTextCallback(HDC hdc, LPARAM lp, WPARAM wp, int cx, int cy) { RECT rc; - rc.left = 0; - rc.top = 0; - rc.right = cx; - rc.bottom = cy; - + + SetRect(&rc, 0, 0, cx, cy); DrawTextW(hdc, (LPCWSTR)lp, -1, &rc, (UINT)wp); return TRUE; } @@ -1026,7 +1024,7 @@ { RECT rbox, rtext, client; HBRUSH hBrush; - int delta; + int delta, text_offset, checkBoxWidth, checkBoxHeight; UINT dtFlags; HFONT hFont; LONG state = get_button_state( hwnd ); @@ -1043,7 +1041,12 @@ GetClientRect(hwnd, &client); rbox = rtext = client; + checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1; + checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1; + if ((hFont = get_button_font( hwnd ))) SelectObject( hDC, hFont ); + GetCharWidthW( hDC, '0', '0', &text_offset ); + text_offset /= 2; parent = GetParent(hwnd); if (!parent) parent = hwnd; @@ -1062,12 +1065,12 @@ { /* magic +4 is what CTL3D expects */ - rtext.right -= checkBoxWidth + 4; + rtext.right -= checkBoxWidth + text_offset;; rbox.left = rbox.right - checkBoxWidth; } else { - rtext.left += checkBoxWidth + 4; + rtext.left += checkBoxWidth + text_offset;; rbox.right = checkBoxWidth; }
8 years, 3 months
1
0
0
0
[dchapyshev] 72649: [NtUser] Unnecessary check is removed and correct value of an error code is returned * Fixes 2 tests for win32knt_apitest:NtUserEnumDisplaySettings
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 10 22:30:53 2016 New Revision: 72649 URL:
http://svn.reactos.org/svn/reactos?rev=72649&view=rev
Log: [NtUser] Unnecessary check is removed and correct value of an error code is returned * Fixes 2 tests for win32knt_apitest:NtUserEnumDisplaySettings Modified: trunk/reactos/win32ss/user/ntuser/display.c Modified: trunk/reactos/win32ss/user/ntuser/display.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/displa…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] Sat Sep 10 22:30:53 2016 @@ -477,9 +477,6 @@ return STATUS_UNSUCCESSFUL; } - if (iModeNum >= pGraphicsDevice->cDevModes) - return STATUS_NO_MORE_ENTRIES; - iFoundMode = 0; for (i = 0; i < pGraphicsDevice->cDevModes; i++) { @@ -504,7 +501,7 @@ } /* Nothing was found */ - return STATUS_INVALID_PARAMETER; + return STATUS_INVALID_PARAMETER_2; } NTSTATUS
8 years, 3 months
1
0
0
0
[dchapyshev] 72648: [NtUser] Fix 3 new tests for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 10 18:39:40 2016 New Revision: 72648 URL:
http://svn.reactos.org/svn/reactos?rev=72648&view=rev
Log: [NtUser] Fix 3 new tests for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/syspar…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] Sat Sep 10 18:39:40 2016 @@ -912,7 +912,12 @@ case SPI_SETNONCLIENTMETRICS: { - if (!SpiSet(&gspv.ncm, pvParam, sizeof(NONCLIENTMETRICSW), fl)) + LPNONCLIENTMETRICSW metrics = (LPNONCLIENTMETRICSW)pvParam; + + /* Fixup user's structure size */ + metrics->cbSize = sizeof(NONCLIENTMETRICSW); + + if (!SpiSet(&gspv.ncm, metrics, sizeof(NONCLIENTMETRICSW), fl)) return 0; if (fl & SPIF_UPDATEINIFILE) @@ -949,7 +954,12 @@ case SPI_SETMINIMIZEDMETRICS: { - if (!SpiSet(&gspv.mm, pvParam, sizeof(MINIMIZEDMETRICS), fl)) + LPMINIMIZEDMETRICS metrics = (LPMINIMIZEDMETRICS)pvParam; + + /* Fixup user's structure size */ + metrics->cbSize = sizeof(MINIMIZEDMETRICS); + + if (!SpiSet(&gspv.mm, metrics, sizeof(MINIMIZEDMETRICS), fl)) return 0; gspv.mm.iWidth = max(0, gspv.mm.iWidth); @@ -975,7 +985,12 @@ case SPI_SETICONMETRICS: { - if (!SpiSet(&gspv.im, pvParam, sizeof(ICONMETRICSW), fl)) + LPICONMETRICSW metrics = (LPICONMETRICSW)pvParam; + + /* Fixup user's structure size */ + metrics->cbSize = sizeof(ICONMETRICSW); + + if (!SpiSet(&gspv.im, metrics, sizeof(ICONMETRICSW), fl)) return 0; if (fl & SPIF_UPDATEINIFILE)
8 years, 3 months
1
0
0
0
[dchapyshev] 72647: [WIN32KNT_APITEST] Add some tests for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS. It is checked in win2k3
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 10 18:36:56 2016 New Revision: 72647 URL:
http://svn.reactos.org/svn/reactos?rev=72647&view=rev
Log: [WIN32KNT_APITEST] Add some tests for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS. It is checked in win2k3 Modified: trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c Modified: trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/win32nt/ntuser/N…
============================================================================== --- trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c [iso-8859-1] (original) +++ trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c [iso-8859-1] Sat Sep 10 18:36:56 2016 @@ -716,8 +716,6 @@ /* Test uiParam < 0 */ TEST(NtUserSystemParametersInfo(SPI_GETICONTITLELOGFONT, -1, &buf.lf, 0) == 1); - - } void @@ -740,30 +738,60 @@ Test_SPI_SETNONCLIENTMETRICS(void) { NONCLIENTMETRICSW metrics; + NONCLIENTMETRICSW origMetrics; metrics.cbSize = sizeof(NONCLIENTMETRICSW); TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &metrics, 0) == 1); TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), (PVOID)0xdeadbeef, 0) == 0); + + origMetrics = metrics; + + metrics.cbSize = sizeof(NONCLIENTMETRICSW) + 10; + TEST(NtUserSystemParametersInfo(SPI_SETNONCLIENTMETRICS, 0, (PVOID)&metrics, 0) == 1); + TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, (PVOID)&metrics, 0) == 1); + ok(metrics.cbSize == sizeof(NONCLIENTMETRICSW), "Expected size: %lu, got %lu\n", (ULONG)sizeof(NONCLIENTMETRICSW), (ULONG)metrics.cbSize); + + TEST(NtUserSystemParametersInfo(SPI_SETNONCLIENTMETRICS, 0, (PVOID)&origMetrics, 0) == 1); } void Test_SPI_SETMINIMIZEDMETRICS(void) { MINIMIZEDMETRICS metrics; + MINIMIZEDMETRICS origMetrics; metrics.cbSize = sizeof(MINIMIZEDMETRICS); TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), (PVOID)&metrics, 0) == 1); TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), (PVOID)0xdeadbeef, 0) == 0); + + origMetrics = metrics; + + metrics.cbSize = sizeof(MINIMIZEDMETRICS) + 10; + TEST(NtUserSystemParametersInfo(SPI_SETMINIMIZEDMETRICS, 0, (PVOID)&metrics, 0) == 1); + TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, 0, (PVOID)&metrics, 0) == 1); + ok(metrics.cbSize == sizeof(MINIMIZEDMETRICS), "Expected size: %lu, got %lu\n", (ULONG)sizeof(MINIMIZEDMETRICS), (ULONG)metrics.cbSize); + + TEST(NtUserSystemParametersInfo(SPI_SETMINIMIZEDMETRICS, 0, (PVOID)&origMetrics, 0) == 1); } void Test_SPI_SETICONMETRICS(void) { ICONMETRICSW metrics; + ICONMETRICSW origMetrics; metrics.cbSize = sizeof(ICONMETRICSW); TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW), (PVOID)&metrics, 0) == 1); TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW), (PVOID)0xdeadbeef, 0) == 0); + + origMetrics = metrics; + + metrics.cbSize = sizeof(ICONMETRICSW) + 10; + TEST(NtUserSystemParametersInfo(SPI_SETICONMETRICS, 0, (PVOID)&metrics, 0) == 1); + TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, 0, (PVOID)&metrics, 0) == 1); + ok(metrics.cbSize == sizeof(ICONMETRICSW), "Expected size: %lu, got %lu\n", (ULONG)sizeof(ICONMETRICSW), (ULONG)metrics.cbSize); + + TEST(NtUserSystemParametersInfo(SPI_SETICONMETRICS, 0, (PVOID)&origMetrics, 0) == 1); } void
8 years, 3 months
1
0
0
0
[dchapyshev] 72646: [NtUser] - Initialize cbSize for animationinfo - Use widechar versions of structures
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 10 17:58:32 2016 New Revision: 72646 URL:
http://svn.reactos.org/svn/reactos?rev=72646&view=rev
Log: [NtUser] - Initialize cbSize for animationinfo - Use widechar versions of structures Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c trunk/reactos/win32ss/user/ntuser/sysparams.h Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/syspar…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] Sat Sep 10 17:58:32 2016 @@ -312,6 +312,7 @@ gspv.serialkeys.cbSize = sizeof(SERIALKEYS); gspv.soundsentry.cbSize = sizeof(SOUNDSENTRYW); gspv.highcontrast.cbSize = sizeof(HIGHCONTRASTW); + gspv.animationinfo.cbSize = sizeof(ANIMATIONINFO); /* Make sure we don't use broken values */ SpiFixupValues(); Modified: trunk/reactos/win32ss/user/ntuser/sysparams.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/syspar…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/sysparams.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/sysparams.h [iso-8859-1] Sat Sep 10 17:58:32 2016 @@ -52,7 +52,7 @@ /* Accessability */ ACCESSTIMEOUT accesstimeout; - HIGHCONTRAST highcontrast; + HIGHCONTRASTW highcontrast; BOOL bScreenReader; #if(WINVER >= 0x0600) AUDIODESCRIPTION audiodescription; @@ -63,7 +63,7 @@ #endif /* Sound */ - SOUNDSENTRY soundsentry; + SOUNDSENTRYW soundsentry; BOOL bShowSounds; BOOL bBeep; @@ -175,11 +175,11 @@ STICKYKEYS stickykeys; ACCESSTIMEOUT accesstimeout; SERIALKEYS serialkeys; - SOUNDSENTRY soundsentry; + SOUNDSENTRYW soundsentry; NONCLIENTMETRICSW ncmetrics; MINIMIZEDMETRICS mmmetrics; - ICONMETRICS iconmetrics; - HIGHCONTRAST highcontrast; + ICONMETRICSW iconmetrics; + HIGHCONTRASTW highcontrast; ANIMATIONINFO animationinfo; #if(WINVER >= 0x0600) AUDIODESCRIPTION audiodescription;
8 years, 3 months
1
0
0
0
[dchapyshev] 72645: [WIN32KNT_APITEST] - Remove wrong tests. Win2k3 ignores the size of structure for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS [NtUser] - Remove wrong checks
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 10 16:17:35 2016 New Revision: 72645 URL:
http://svn.reactos.org/svn/reactos?rev=72645&view=rev
Log: [WIN32KNT_APITEST] - Remove wrong tests. Win2k3 ignores the size of structure for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS [NtUser] - Remove wrong checks Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/syspar…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] Sat Sep 10 16:17:35 2016 @@ -906,27 +906,11 @@ case SPI_GETNONCLIENTMETRICS: { - LPNONCLIENTMETRICSW metrics = (LPNONCLIENTMETRICSW)pvParam; - - if (uiParam != 0 && uiParam != sizeof(NONCLIENTMETRICSW)) - return 0; - - if (!metrics || metrics->cbSize != sizeof(NONCLIENTMETRICSW)) - return 0; - return SpiGet(pvParam, &gspv.ncm, sizeof(NONCLIENTMETRICSW), fl); } case SPI_SETNONCLIENTMETRICS: { - LPNONCLIENTMETRICSW metrics = (LPNONCLIENTMETRICSW)pvParam; - - if (uiParam != 0 && uiParam != sizeof(NONCLIENTMETRICSW)) - return 0; - - if (!metrics || metrics->cbSize != sizeof(NONCLIENTMETRICSW)) - return 0; - if (!SpiSet(&gspv.ncm, pvParam, sizeof(NONCLIENTMETRICSW), fl)) return 0; @@ -959,27 +943,11 @@ case SPI_GETMINIMIZEDMETRICS: { - LPMINIMIZEDMETRICS metrics = (LPMINIMIZEDMETRICS)pvParam; - - if (uiParam != 0 && uiParam != sizeof(MINIMIZEDMETRICS)) - return 0; - - if (!metrics || metrics->cbSize != sizeof(MINIMIZEDMETRICS)) - return 0; - return SpiGet(pvParam, &gspv.mm, sizeof(MINIMIZEDMETRICS), fl); } case SPI_SETMINIMIZEDMETRICS: { - LPMINIMIZEDMETRICS metrics = (LPMINIMIZEDMETRICS)pvParam; - - if (uiParam != 0 && uiParam != sizeof(MINIMIZEDMETRICS)) - return 0; - - if (!metrics || metrics->cbSize != sizeof(MINIMIZEDMETRICS)) - return 0; - if (!SpiSet(&gspv.mm, pvParam, sizeof(MINIMIZEDMETRICS), fl)) return 0; @@ -1001,27 +969,11 @@ case SPI_GETICONMETRICS: { - LPICONMETRICSW IconMetrics = (LPICONMETRICSW)pvParam; - - if (uiParam != 0 && uiParam != sizeof(ICONMETRICSW)) - return 0; - - if (!IconMetrics || IconMetrics->cbSize != sizeof(ICONMETRICSW)) - return 0; - return SpiGet(pvParam, &gspv.im, sizeof(ICONMETRICSW), fl); } case SPI_SETICONMETRICS: { - LPICONMETRICSW IconMetrics = (LPICONMETRICSW)pvParam; - - if (uiParam != 0 && uiParam != sizeof(ICONMETRICSW)) - return 0; - - if (!IconMetrics || IconMetrics->cbSize != sizeof(ICONMETRICSW)) - return 0; - if (!SpiSet(&gspv.im, pvParam, sizeof(ICONMETRICSW), fl)) return 0; Modified: trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/win32nt/ntuser/N…
============================================================================== --- trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c [iso-8859-1] (original) +++ trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c [iso-8859-1] Sat Sep 10 16:17:35 2016 @@ -743,7 +743,6 @@ metrics.cbSize = sizeof(NONCLIENTMETRICSW); TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &metrics, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW) + 1, &metrics, 0) == 0); TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), (PVOID)0xdeadbeef, 0) == 0); } @@ -754,7 +753,6 @@ metrics.cbSize = sizeof(MINIMIZEDMETRICS); TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), (PVOID)&metrics, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS) + 1, (PVOID)&metrics, 0) == 0); TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), (PVOID)0xdeadbeef, 0) == 0); } @@ -765,7 +763,6 @@ metrics.cbSize = sizeof(ICONMETRICSW); TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW), (PVOID)&metrics, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW) + 1, (PVOID)&metrics, 0) == 0); TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW), (PVOID)0xdeadbeef, 0) == 0); }
8 years, 3 months
1
0
0
0
[ekohl] 72644: [NTOSKRNL] Fix lock/unlock order in SeLockSubjectContext/SeUnlockSubjectContext. Patch by Volodymyr Shcherbyna. CORE-11966 #resolve #comment Thanks a lot!
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Sep 10 13:54:16 2016 New Revision: 72644 URL:
http://svn.reactos.org/svn/reactos?rev=72644&view=rev
Log: [NTOSKRNL] Fix lock/unlock order in SeLockSubjectContext/SeUnlockSubjectContext. Patch by Volodymyr Shcherbyna. CORE-11966 #resolve #comment Thanks a lot! Modified: trunk/reactos/ntoskrnl/se/access.c Modified: trunk/reactos/ntoskrnl/se/access.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/access.c?rev=7…
============================================================================== --- trunk/reactos/ntoskrnl/se/access.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/access.c [iso-8859-1] Sat Sep 10 13:54:16 2016 @@ -338,12 +338,14 @@ PrimaryToken = SubjectContext->PrimaryToken; ClientToken = SubjectContext->ClientToken; + /* Unlock the impersonation one if it's there */ + if (ClientToken) + { + SepReleaseTokenLock(ClientToken); + } + /* Always unlock the primary one */ SepReleaseTokenLock(PrimaryToken); - - /* Unlock the impersonation one if it's there */ - if (!ClientToken) return; - SepReleaseTokenLock(ClientToken); } /*
8 years, 3 months
1
0
0
0
[cwittich] 72643: [CRT] sync ischira.c to wine 1.9.16
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 10 11:40:54 2016 New Revision: 72643 URL:
http://svn.reactos.org/svn/reactos?rev=72643&view=rev
Log: [CRT] sync ischira.c to wine 1.9.16 Modified: trunk/reactos/media/doc/README.WINE trunk/reactos/sdk/lib/crt/mbstring/ischira.c Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 10 11:40:54 2016 @@ -299,8 +299,9 @@ reactos/sdk/lib/crt/string/strtoul.c # Synced to WineStaging-1.9.9 reactos/sdk/lib/crt/string/strxfrm.c # Synced to Wine-1.9.16 reactos/sdk/lib/crt/string/wcs.c # Synced at 20080611 - reactos/sdk/lib/crt/string/wctype.c # Synced at WineStaging-1.9.16 - reactos/sdk/lib/crt/string/wtoi64.c # Synced at Wine-1.9.16 + reactos/sdk/lib/crt/string/wctype.c # Synced to WineStaging-1.9.16 + reactos/sdk/lib/crt/string/wtoi64.c # Synced to Wine-1.9.16 + reactos/sdk/lib/crt/mbstring/ischira.c # Synced to Wine-1.9.16 reactos/sdk/lib/crt/wine/heap.c # Synced at 20080529 reactos/sdk/lib/crt/wine/undname.c # Synced to WineStaging-1.9.16 reactos/sdk/lib/crt/process/thread.c # Synced to WineStaging-1.7.55 Modified: trunk/reactos/sdk/lib/crt/mbstring/ischira.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/mbstring/ischi…
============================================================================== --- trunk/reactos/sdk/lib/crt/mbstring/ischira.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/mbstring/ischira.c [iso-8859-1] Sat Sep 10 11:40:54 2016 @@ -1,58 +1,54 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/sdk/crt/mbstring/ischira.c - * PURPOSE: - * PROGRAMER: - * UPDATE HISTORY: - * 12/04/99: Ariadne Created - * 05/30/08: Samuel Serapion adapted from PROJECT C Library - * - */ - +#include <precomp.h> #include <mbctype.h> - -/* - * @implemented +/********************************************************************* + * _ismbchira(MSVCRT.@) */ -int _ismbchira( unsigned int c ) +int CDECL _ismbchira(unsigned int c) { - return ((c>=0x829F) && (c<=0x82F1)); + if(get_mbcinfo()->mbcodepage == 932) + { + /* Japanese/Hiragana, CP 932 */ + return (c >= 0x829f && c <= 0x82f1); + } + return 0; } -/* - * @implemented +/********************************************************************* + * _ismbckata(MSVCRT.@) */ -int _ismbckata( unsigned int c ) +int CDECL _ismbckata(unsigned int c) { - return ((c>=0x8340) && (c<=0x8396)); + if(get_mbcinfo()->mbcodepage == 932) + { + /* Japanese/Katakana, CP 932 */ + return (c >= 0x8340 && c <= 0x8396 && c != 0x837f); + } + return 0; } -/* - * @implemented +/********************************************************************* + * _mbctohira (MSVCRT.@) + * + * Converts a sjis katakana character to hiragana. */ -unsigned int _mbctohira( unsigned int c ) +unsigned int CDECL _mbctohira(unsigned int c) { - if (c >= 0x8340 && c <= 0x837e) - return c - 0xa1; - else if (c >= 0x8380 && c <= 0x8396) - return c - 0xa2; - else - return c; + if(_ismbckata(c) && c <= 0x8393) + return (c - 0x8340 - (c >= 0x837f ? 1 : 0)) + 0x829f; + return c; } -/* - * @implemented +/********************************************************************* + * _mbctokata (MSVCRT.@) + * + * Converts a sjis hiragana character to katakana. */ -unsigned int _mbctokata( unsigned int c ) +unsigned int CDECL _mbctokata(unsigned int c) { - if (c >= 0x829f && c <= 0x82dd) - return c + 0xa1; - else if (c >= 0x82de && c <= 0x82f1) - return c + 0xa2; - else - return c; + if(_ismbchira(c)) + return (c - 0x829f) + 0x8340 + (c >= 0x82de ? 1 : 0); + return c; }
8 years, 3 months
1
0
0
0
[cwittich] 72642: [CRT] fix build
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 10 07:18:50 2016 New Revision: 72642 URL:
http://svn.reactos.org/svn/reactos?rev=72642&view=rev
Log: [CRT] fix build Modified: trunk/reactos/sdk/lib/crt/string/wtoi64.c Modified: trunk/reactos/sdk/lib/crt/string/wtoi64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/string/wtoi64.…
============================================================================== --- trunk/reactos/sdk/lib/crt/string/wtoi64.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/string/wtoi64.c [iso-8859-1] Sat Sep 10 07:18:50 2016 @@ -9,7 +9,7 @@ ULONGLONG RunningTotal = 0; BOOL bMinus = FALSE; - while (isspaceW(*str)) { + while (iswctype((int)*str, _SPACE)) { str++; } /* while */ @@ -48,13 +48,15 @@ BOOL negative = FALSE; __int64 ret = 0; +#ifndef _LIBCNT_ TRACE("(%s %p %d %p)\n", debugstr_w(nptr), endptr, base, locale); +#endif if (!MSVCRT_CHECK_PMT(nptr != NULL)) return 0; if (!MSVCRT_CHECK_PMT(base == 0 || base >= 2)) return 0; if (!MSVCRT_CHECK_PMT(base <= 36)) return 0; - while(isspaceW(*nptr)) nptr++; + while (iswctype((int)*nptr, _SPACE)) nptr++; if(*nptr == '-') { negative = TRUE; @@ -62,7 +64,7 @@ } else if(*nptr == '+') nptr++; - if((base==0 || base==16) && *nptr=='0' && tolowerW(*(nptr+1))=='x') { + if((base==0 || base==16) && *nptr=='0' && towlower(*(nptr+1))=='x') { base = 16; nptr += 2; } @@ -75,7 +77,7 @@ } while(*nptr) { - wchar_t cur = tolowerW(*nptr); + wchar_t cur = towlower(*nptr); int v; if(cur>='0' && cur<='9') { @@ -95,10 +97,14 @@ if(!negative && (ret>_I64_MAX/base || ret*base>_I64_MAX-v)) { ret = _I64_MAX; +#ifndef _LIBCNT_ *_errno() = ERANGE; +#endif } else if(negative && (ret<_I64_MIN/base || ret*base<_I64_MIN-v)) { ret = _I64_MIN; +#ifndef _LIBCNT_ *_errno() = ERANGE; +#endif } else ret = ret*base + v; } @@ -129,13 +135,15 @@ BOOL negative = FALSE; unsigned __int64 ret = 0; +#ifndef _LIBCNT_ TRACE("(%s %p %d %p)\n", debugstr_w(nptr), endptr, base, locale); +#endif if (!MSVCRT_CHECK_PMT(nptr != NULL)) return 0; if (!MSVCRT_CHECK_PMT(base == 0 || base >= 2)) return 0; if (!MSVCRT_CHECK_PMT(base <= 36)) return 0; - while(isspaceW(*nptr)) nptr++; + while (iswctype((int)*nptr, _SPACE)) nptr++; if(*nptr == '-') { negative = TRUE; @@ -143,7 +151,7 @@ } else if(*nptr == '+') nptr++; - if((base==0 || base==16) && *nptr=='0' && tolowerW(*(nptr+1))=='x') { + if((base==0 || base==16) && *nptr=='0' && towlower(*(nptr+1))=='x') { base = 16; nptr += 2; } @@ -156,7 +164,7 @@ } while(*nptr) { - wchar_t cur = tolowerW(*nptr); + wchar_t cur = towlower(*nptr); int v; if(cur>='0' && cur<='9') { @@ -173,8 +181,10 @@ if(ret>_UI64_MAX/base || ret*base>_UI64_MAX-v) { ret = _UI64_MAX; +#ifndef _LIBCNT_ *_errno() = ERANGE; - } else +#endif + } else ret = ret*base + v; }
8 years, 3 months
1
0
0
0
[cwittich] 72641: [CRT] sync wtoi64.c with wine 1.9.16
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 10 06:52:50 2016 New Revision: 72641 URL:
http://svn.reactos.org/svn/reactos?rev=72641&view=rev
Log: [CRT] sync wtoi64.c with wine 1.9.16 Modified: trunk/reactos/media/doc/README.WINE trunk/reactos/sdk/lib/crt/string/wtoi64.c Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 10 06:52:50 2016 @@ -300,6 +300,7 @@ reactos/sdk/lib/crt/string/strxfrm.c # Synced to Wine-1.9.16 reactos/sdk/lib/crt/string/wcs.c # Synced at 20080611 reactos/sdk/lib/crt/string/wctype.c # Synced at WineStaging-1.9.16 + reactos/sdk/lib/crt/string/wtoi64.c # Synced at Wine-1.9.16 reactos/sdk/lib/crt/wine/heap.c # Synced at 20080529 reactos/sdk/lib/crt/wine/undname.c # Synced to WineStaging-1.9.16 reactos/sdk/lib/crt/process/thread.c # Synced to WineStaging-1.7.55 Modified: trunk/reactos/sdk/lib/crt/string/wtoi64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/string/wtoi64.…
============================================================================== --- trunk/reactos/sdk/lib/crt/string/wtoi64.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/string/wtoi64.c [iso-8859-1] Sat Sep 10 06:52:50 2016 @@ -1,72 +1,196 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/sdk/crt/string/wtoi64.c - * PURPOSE: Unknown - * PROGRAMER: Unknown - * UPDATE HISTORY: - * 25/11/05: Added license header +#include <precomp.h> +#include <internal/wine/msvcrt.h> + +/********************************************************************* + * _wtoi64_l (MSVCRT.@) */ +__int64 CDECL _wtoi64_l(const wchar_t *str, _locale_t locale) +{ + ULONGLONG RunningTotal = 0; + BOOL bMinus = FALSE; -#include <precomp.h> + while (isspaceW(*str)) { + str++; + } /* while */ -/* - * @implemented + if (*str == '+') { + str++; + } else if (*str == '-') { + bMinus = TRUE; + str++; + } /* if */ + + while (*str >= '0' && *str <= '9') { + RunningTotal = RunningTotal * 10 + *str - '0'; + str++; + } /* while */ + + return bMinus ? -RunningTotal : RunningTotal; +} + +/********************************************************************* + * _wtoi64 (MSVCRT.@) */ -__int64 -CDECL -_wtoi64 (const wchar_t *nptr) +__int64 CDECL _wtoi64(const wchar_t *str) { - int c; - __int64 value; - int sign; - - if (nptr == NULL) - return 0; - - while (iswctype((int)*nptr, _SPACE)) - ++nptr; - - c = (int)*nptr++; - sign = c; - if (c == L'-' || c == L'+') - c = (int)*nptr++; - - value = 0; - - while (iswctype(c, _DIGIT)) - { - value = 10 * value + (c - L'0'); - c = (int)*nptr++; - } - - if (sign == L'-') - return -value; - else - return value; + return _wtoi64_l(str, NULL); } -/* - * @unimplemented +/********************************************************************* + * _wcstoi64_l (MSVCRT.@) + * + * FIXME: locale parameter is ignored */ -__int64 -CDECL -_wcstoi64 (const wchar_t *nptr, wchar_t **endptr, int base) +__int64 CDECL _wcstoi64_l(const wchar_t *nptr, + wchar_t **endptr, int base, _locale_t locale) { - TRACE("_wcstoi64 is UNIMPLEMENTED\n"); - return 0; + BOOL negative = FALSE; + __int64 ret = 0; + + TRACE("(%s %p %d %p)\n", debugstr_w(nptr), endptr, base, locale); + + if (!MSVCRT_CHECK_PMT(nptr != NULL)) return 0; + if (!MSVCRT_CHECK_PMT(base == 0 || base >= 2)) return 0; + if (!MSVCRT_CHECK_PMT(base <= 36)) return 0; + + while(isspaceW(*nptr)) nptr++; + + if(*nptr == '-') { + negative = TRUE; + nptr++; + } else if(*nptr == '+') + nptr++; + + if((base==0 || base==16) && *nptr=='0' && tolowerW(*(nptr+1))=='x') { + base = 16; + nptr += 2; + } + + if(base == 0) { + if(*nptr=='0') + base = 8; + else + base = 10; + } + + while(*nptr) { + wchar_t cur = tolowerW(*nptr); + int v; + + if(cur>='0' && cur<='9') { + if(cur >= '0'+base) + break; + v = cur-'0'; + } else { + if(cur<'a' || cur>='a'+base-10) + break; + v = cur-'a'+10; + } + + if(negative) + v = -v; + + nptr++; + + if(!negative && (ret>_I64_MAX/base || ret*base>_I64_MAX-v)) { + ret = _I64_MAX; + *_errno() = ERANGE; + } else if(negative && (ret<_I64_MIN/base || ret*base<_I64_MIN-v)) { + ret = _I64_MIN; + *_errno() = ERANGE; + } else + ret = ret*base + v; + } + + if(endptr) + *endptr = (wchar_t*)nptr; + + return ret; } -/* - * @unimplemented +/********************************************************************* + * _wcstoi64 (MSVCRT.@) */ -unsigned __int64 -CDECL -_wcstoui64 (const wchar_t *nptr, wchar_t **endptr, int base) +__int64 CDECL _wcstoi64(const wchar_t *nptr, + wchar_t **endptr, int base) { - TRACE("_wcstoui64 is UNIMPLEMENTED\n"); - return 0; + return _wcstoi64_l(nptr, endptr, base, NULL); +} + +/********************************************************************* + * _wcstoui64_l (MSVCRT.@) + * + * FIXME: locale parameter is ignored + */ +unsigned __int64 CDECL _wcstoui64_l(const wchar_t *nptr, + wchar_t **endptr, int base, _locale_t locale) +{ + BOOL negative = FALSE; + unsigned __int64 ret = 0; + + TRACE("(%s %p %d %p)\n", debugstr_w(nptr), endptr, base, locale); + + if (!MSVCRT_CHECK_PMT(nptr != NULL)) return 0; + if (!MSVCRT_CHECK_PMT(base == 0 || base >= 2)) return 0; + if (!MSVCRT_CHECK_PMT(base <= 36)) return 0; + + while(isspaceW(*nptr)) nptr++; + + if(*nptr == '-') { + negative = TRUE; + nptr++; + } else if(*nptr == '+') + nptr++; + + if((base==0 || base==16) && *nptr=='0' && tolowerW(*(nptr+1))=='x') { + base = 16; + nptr += 2; + } + + if(base == 0) { + if(*nptr=='0') + base = 8; + else + base = 10; + } + + while(*nptr) { + wchar_t cur = tolowerW(*nptr); + int v; + + if(cur>='0' && cur<='9') { + if(cur >= '0'+base) + break; + v = *nptr-'0'; + } else { + if(cur<'a' || cur>='a'+base-10) + break; + v = cur-'a'+10; + } + + nptr++; + + if(ret>_UI64_MAX/base || ret*base>_UI64_MAX-v) { + ret = _UI64_MAX; + *_errno() = ERANGE; + } else + ret = ret*base + v; + } + + if(endptr) + *endptr = (wchar_t*)nptr; + + return negative ? -ret : ret; +} + +/********************************************************************* + * _wcstoui64 (MSVCRT.@) + */ +unsigned __int64 CDECL _wcstoui64(const wchar_t *nptr, + wchar_t **endptr, int base) +{ + return _wcstoui64_l(nptr, endptr, base, NULL); }
8 years, 3 months
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
35
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
Results per page:
10
25
50
100
200