winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
895 discussions
Start a n
N
ew thread
John Alway : user32/tests: Add a test for combo resizing from smaller item height.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: 35919eb6a18ccd11929cbde8d5bd737510a4534c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=35919eb6a18ccd11929cbde8…
Author: John Alway <thaleslv(a)yahoo.com> Date: Wed Nov 27 11:31:05 2019 +0300 user32/tests: Add a test for combo resizing from smaller item height. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/combo.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index 6b51ff9719..d203f37c2b 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -43,7 +43,7 @@ static HWND build_combo(DWORD style) return CreateWindowA("ComboBox", "Combo", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)COMBO_ID, NULL, 0); } -static int font_height(HFONT hFont) +static int get_font_height(HFONT hFont) { TEXTMETRICA tm; HFONT hFontOld; @@ -74,12 +74,13 @@ static BOOL is_font_installed(const char *name) static void test_setitemheight(DWORD style) { HWND hCombo = build_combo(style); + int i, font_height, height; + HFONT hFont; RECT r; - int i; trace("Style %x\n", style); GetClientRect(hCombo, &r); - expect_rect(r, 0, 0, 100, font_height(GetStockObject(SYSTEM_FONT)) + 8); + expect_rect(r, 0, 0, 100, get_font_height(GetStockObject(SYSTEM_FONT)) + 8); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); todo_wine expect_rect(r, 5, 5, 105, 105); @@ -92,6 +93,22 @@ static void test_setitemheight(DWORD style) } DestroyWindow(hCombo); + + /* Set item height below text height, force resize. */ + hCombo = build_combo(style); + + hFont = (HFONT)SendMessageA(hCombo, WM_GETFONT, 0, 0); + font_height = get_font_height(hFont); + SendMessageA(hCombo, CB_SETITEMHEIGHT, -1, font_height / 2); + height = SendMessageA(hCombo, CB_GETITEMHEIGHT, -1, 0); +todo_wine + ok(height == font_height / 2, "Unexpected item height %d, expected %d.\n", height, font_height / 2); + + SetWindowPos(hCombo, NULL, 10, 10, 150, 5 * font_height, SWP_SHOWWINDOW); + height = SendMessageA(hCombo, CB_GETITEMHEIGHT, -1, 0); + ok(height > font_height, "Unexpected item height %d, font height %d.\n", height, font_height); + + DestroyWindow(hCombo); } static void test_setfont(DWORD style) @@ -114,7 +131,7 @@ static void test_setfont(DWORD style) hFont2 = CreateFontA(8, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett"); GetClientRect(hCombo, &r); - expect_rect(r, 0, 0, 100, font_height(GetStockObject(SYSTEM_FONT)) + 8); + expect_rect(r, 0, 0, 100, get_font_height(GetStockObject(SYSTEM_FONT)) + 8); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); todo_wine expect_rect(r, 5, 5, 105, 105); @@ -123,39 +140,39 @@ static void test_setfont(DWORD style) of the window when it was created. The size of the calculated dropped area changes only by how much the selection area changes, not by how much the list area changes. */ - if (font_height(hFont1) == 10 && font_height(hFont2) == 8) + if (get_font_height(hFont1) == 10 && get_font_height(hFont2) == 8) { SendMessageA(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE); GetClientRect(hCombo, &r); expect_rect(r, 0, 0, 100, 18); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); - todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont1))); + todo_wine expect_rect(r, 5, 5, 105, 105 - (get_font_height(GetStockObject(SYSTEM_FONT)) - get_font_height(hFont1))); SendMessageA(hCombo, WM_SETFONT, (WPARAM)hFont2, FALSE); GetClientRect(hCombo, &r); expect_rect(r, 0, 0, 100, 16); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); - todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont2))); + todo_wine expect_rect(r, 5, 5, 105, 105 - (get_font_height(GetStockObject(SYSTEM_FONT)) - get_font_height(hFont2))); SendMessageA(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE); GetClientRect(hCombo, &r); expect_rect(r, 0, 0, 100, 18); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); - todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont1))); + todo_wine expect_rect(r, 5, 5, 105, 105 - (get_font_height(GetStockObject(SYSTEM_FONT)) - get_font_height(hFont1))); } else { ok(0, "Expected Marlett font heights 10/8, got %d/%d\n", - font_height(hFont1), font_height(hFont2)); + get_font_height(hFont1), get_font_height(hFont2)); } for (i = 1; i < 30; i++) { HFONT hFont = CreateFontA(i, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett"); - int height = font_height(hFont); + int height = get_font_height(hFont); SendMessageA(hCombo, WM_SETFONT, (WPARAM)hFont, FALSE); GetClientRect(hCombo, &r);
1
0
0
0
Nikolay Sivov : user32/combo: Force minimal item height.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: ad6a8d50e8b7e0bebdf9acb05fc9e707ba925629 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ad6a8d50e8b7e0bebdf9acb0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 27 11:31:04 2019 +0300 user32/combo: Force minimal item height. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/combo.c | 111 +++++++++++++++++++++++++++---------------------- dlls/user32/controls.h | 4 +- 2 files changed, 63 insertions(+), 52 deletions(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 631bad0aa9..ff5ed18878 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -75,6 +75,9 @@ static UINT CBitHeight, CBitWidth; #define COMBO_EDITBUTTONSPACE() 0 #define EDIT_CONTROL_PADDING() 1 +static void CBCalcPlacement(HEADCOMBO *combo); +static void CBResetPos(HEADCOMBO *combo, BOOL redraw); + /********************************************************************* * combo class descriptor */ @@ -181,6 +184,25 @@ static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc ) return 0; } +static INT combo_get_text_height(const HEADCOMBO *combo) +{ + HDC hdc = GetDC(combo->self); + HFONT prev_font = 0; + TEXTMETRICW tm; + + if (combo->hFont) + prev_font = SelectObject(hdc, combo->hFont); + + GetTextMetricsW(hdc, &tm); + + if (prev_font) + SelectObject(hdc, prev_font); + + ReleaseDC(combo->self, hdc); + + return tm.tmHeight + 4; +} + /*********************************************************************** * CBGetTextAreaHeight * @@ -193,35 +215,18 @@ static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc ) * This height was determined through experimentation. * CBCalcPlacement will add 2*COMBO_YBORDERSIZE pixels for the border */ -static INT CBGetTextAreaHeight(HEADCOMBO *lphc) +static INT CBGetTextAreaHeight(HEADCOMBO *lphc, BOOL clip_item_height) { - INT iTextItemHeight; + INT item_height, text_height; - if( lphc->editHeight ) /* explicitly set height */ + if (clip_item_height && !CB_OWNERDRAWN(lphc)) { - iTextItemHeight = lphc->editHeight; + text_height = combo_get_text_height(lphc); + if (lphc->item_height < text_height) + lphc->item_height = text_height; } - else - { - TEXTMETRICW tm; - HDC hDC = GetDC(lphc->self); - HFONT hPrevFont = 0; - INT baseUnitY; - - if (lphc->hFont) - hPrevFont = SelectObject( hDC, lphc->hFont ); - - GetTextMetricsW(hDC, &tm); - - baseUnitY = tm.tmHeight; - if( hPrevFont ) - SelectObject( hDC, hPrevFont ); - - ReleaseDC(lphc->self, hDC); - - iTextItemHeight = baseUnitY + 4; - } + item_height = lphc->item_height; /* * Check the ownerdraw case if we haven't asked the parent the size @@ -232,7 +237,7 @@ static INT CBGetTextAreaHeight(HEADCOMBO *lphc) { MEASUREITEMSTRUCT measureItem; RECT clientRect; - INT originalItemHeight = iTextItemHeight; + INT originalItemHeight = item_height; UINT id = (UINT)GetWindowLongPtrW( lphc->self, GWLP_ID ); /* @@ -249,10 +254,10 @@ static INT CBGetTextAreaHeight(HEADCOMBO *lphc) measureItem.CtlID = id; measureItem.itemID = -1; measureItem.itemWidth = clientRect.right; - measureItem.itemHeight = iTextItemHeight - 6; /* ownerdrawn cb is taller */ + measureItem.itemHeight = item_height - 6; /* ownerdrawn cb is taller */ measureItem.itemData = 0; SendMessageW(lphc->owner, WM_MEASUREITEM, id, (LPARAM)&measureItem); - iTextItemHeight = 6 + measureItem.itemHeight; + item_height = 6 + measureItem.itemHeight; /* * Send a second one in the case of a fixed ownerdraw list to calculate the @@ -273,10 +278,10 @@ static INT CBGetTextAreaHeight(HEADCOMBO *lphc) /* * Keep the size for the next time */ - lphc->editHeight = iTextItemHeight; + lphc->item_height = item_height; } - return iTextItemHeight; + return item_height; } /*********************************************************************** @@ -286,13 +291,12 @@ static INT CBGetTextAreaHeight(HEADCOMBO *lphc) * a re-arranging of the contents of the combobox and the recalculation * of the size of the "real" control window. */ -static void CBForceDummyResize( - LPHEADCOMBO lphc) +static void CBForceDummyResize(LPHEADCOMBO lphc) { RECT windowRect; int newComboHeight; - newComboHeight = CBGetTextAreaHeight(lphc) + 2*COMBO_YBORDERSIZE(); + newComboHeight = CBGetTextAreaHeight(lphc, FALSE) + 2*COMBO_YBORDERSIZE(); GetWindowRect(lphc->self, &windowRect); @@ -304,12 +308,17 @@ static void CBForceDummyResize( * this will cancel-out in the processing of the WM_WINDOWPOSCHANGING * message. */ + lphc->wState |= CBF_NORESIZE; SetWindowPos( lphc->self, NULL, 0, 0, windowRect.right - windowRect.left, newComboHeight, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); + lphc->wState &= ~CBF_NORESIZE; + + CBCalcPlacement(lphc); + CBResetPos(lphc, FALSE); } /*********************************************************************** @@ -326,7 +335,7 @@ static void CBCalcPlacement(HEADCOMBO *combo) InflateRect(&combo->textRect, -COMBO_XBORDERSIZE(), -COMBO_YBORDERSIZE()); /* Chop off the bottom part to fit with the height of the text area. */ - combo->textRect.bottom = combo->textRect.top + CBGetTextAreaHeight(combo); + combo->textRect.bottom = combo->textRect.top + CBGetTextAreaHeight(combo, FALSE); /* The button starts the same vertical position as the text area. */ combo->buttonRect = combo->textRect; @@ -412,11 +421,9 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG lphc->owner = hwndParent; - /* - * The item height and dropped width are not set when the control - * is created. - */ - lphc->droppedWidth = lphc->editHeight = 0; + lphc->droppedWidth = 0; + + lphc->item_height = combo_get_text_height(lphc); /* * The first time we go through, we want to measure the ownerdraw item @@ -1435,8 +1442,11 @@ static void CBResetPos(HEADCOMBO *combo, BOOL redraw) /*********************************************************************** * COMBO_Size */ -static void COMBO_Size( LPHEADCOMBO lphc ) +static void COMBO_Size( HEADCOMBO *lphc ) { + if (!lphc->hWndLBox || (lphc->wState & CBF_NORESIZE)) + return; + /* * Those controls are always the same height. So we have to make sure * they are not resized to another value. @@ -1449,7 +1459,7 @@ static void COMBO_Size( LPHEADCOMBO lphc ) GetWindowRect(lphc->self, &rc); curComboHeight = rc.bottom - rc.top; curComboWidth = rc.right - rc.left; - newComboHeight = CBGetTextAreaHeight(lphc) + 2*COMBO_YBORDERSIZE(); + newComboHeight = CBGetTextAreaHeight(lphc, TRUE) + 2*COMBO_YBORDERSIZE(); /* * Resizing a combobox has another side effect, it resizes the dropped @@ -1469,9 +1479,13 @@ static void COMBO_Size( LPHEADCOMBO lphc ) /* * Restore original height */ - if( curComboHeight != newComboHeight ) - SetWindowPos(lphc->self, 0, 0, 0, curComboWidth, newComboHeight, - SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOREDRAW); + if (curComboHeight != newComboHeight) + { + lphc->wState |= CBF_NORESIZE; + SetWindowPos(lphc->self, 0, 0, 0, curComboWidth, newComboHeight, + SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOREDRAW); + lphc->wState &= ~CBF_NORESIZE; + } } CBCalcPlacement(lphc); @@ -1485,10 +1499,8 @@ static void COMBO_Size( LPHEADCOMBO lphc ) */ static void COMBO_Font( LPHEADCOMBO lphc, HFONT hFont, BOOL bRedraw ) { - /* - * Set the font - */ lphc->hFont = hFont; + lphc->item_height = combo_get_text_height(lphc); /* * Propagate to owned windows. @@ -1524,7 +1536,7 @@ static LRESULT COMBO_SetItemHeight( LPHEADCOMBO lphc, INT index, INT height ) { if( height < 32768 ) { - lphc->editHeight = height + 2; /* Is the 2 for 2*EDIT_CONTROL_PADDING? */ + lphc->item_height = height + 2; /* Is the 2 for 2*EDIT_CONTROL_PADDING? */ /* * Redo the layout of the control. @@ -1781,8 +1793,7 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar return result; } case WM_SIZE: - if( lphc->hWndLBox && - !(lphc->wState & CBF_NORESIZE) ) COMBO_Size( lphc ); + COMBO_Size( lphc ); return TRUE; case WM_SETFONT: COMBO_Font( lphc, (HFONT)wParam, (BOOL)lParam ); @@ -1998,7 +2009,7 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar case CB_GETITEMHEIGHT: if( (INT)wParam >= 0 ) /* listbox item */ return SendMessageW(lphc->hWndLBox, LB_GETITEMHEIGHT, wParam, 0); - return CBGetTextAreaHeight(lphc); + return CBGetTextAreaHeight(lphc, FALSE); case CB_RESETCONTENT: SendMessageW(lphc->hWndLBox, LB_RESETCONTENT, 0, 0); if( (lphc->wState & CBF_EDIT) && CB_HASSTRINGS(lphc) ) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index d372bafcef..0b0f1c2801 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -219,8 +219,8 @@ typedef struct RECT droppedRect; INT droppedIndex; INT fixedOwnerDrawHeight; - INT droppedWidth; /* last two are not used unless set */ - INT editHeight; /* explicitly */ + INT droppedWidth; /* not used unless set explicitly */ + INT item_height; } HEADCOMBO,*LPHEADCOMBO; extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL ) DECLSPEC_HIDDEN;
1
0
0
0
Nikolay Sivov : user32/combo: Remove redundant argument from border painting helper.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: 722f4fc084a1c72cf9a04051e20145c0b4d43d43 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=722f4fc084a1c72cf9a04051…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 27 11:31:03 2019 +0300 user32/combo: Remove redundant argument from border painting helper. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/combo.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 52d2f7190d..631bad0aa9 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -766,16 +766,13 @@ static void CBPaintText( /*********************************************************************** * CBPaintBorder */ -static void CBPaintBorder( - HWND hwnd, - const HEADCOMBO *lphc, - HDC hdc) +static void CBPaintBorder(const HEADCOMBO *lphc, HDC hdc) { RECT clientRect; if (CB_GETTYPE(lphc) != CBS_SIMPLE) { - GetClientRect(hwnd, &clientRect); + GetClientRect(lphc->self, &clientRect); } else { @@ -818,7 +815,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC) /* * In non 3.1 look, there is a sunken border on the combobox */ - CBPaintBorder(lphc->self, lphc, hDC); + CBPaintBorder(lphc, hDC); CBPaintButton(lphc, hDC); /* paint the edit control padding area */
1
0
0
0
Nikolay Sivov : user32/combo: Remove unnecessary argument from button painting helper.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: 76ef090f3de3bcf7fa49b7469181d7f94dd2a2d9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=76ef090f3de3bcf7fa49b746…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 27 11:31:02 2019 +0300 user32/combo: Remove unnecessary argument from button painting helper. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/combo.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 40ff0ef521..52d2f7190d 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -574,10 +574,13 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG * * Paint combo button (normal, pressed, and disabled states). */ -static void CBPaintButton( LPHEADCOMBO lphc, HDC hdc, RECT rectButton) +static void CBPaintButton(HEADCOMBO *lphc, HDC hdc) { UINT buttonState = DFCS_SCROLLCOMBOBOX; + if (IsRectEmpty(&lphc->buttonRect)) + return; + if( lphc->wState & CBF_NOREDRAW ) return; @@ -588,7 +591,7 @@ static void CBPaintButton( LPHEADCOMBO lphc, HDC hdc, RECT rectButton) if (CB_DISABLED(lphc)) buttonState |= DFCS_INACTIVE; - DrawFrameControl(hdc, &rectButton, DFC_SCROLL, buttonState); + DrawFrameControl(hdc, &lphc->buttonRect, DFC_SCROLL, buttonState); } /*********************************************************************** @@ -816,11 +819,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC) * In non 3.1 look, there is a sunken border on the combobox */ CBPaintBorder(lphc->self, lphc, hDC); - - if( !IsRectEmpty(&lphc->buttonRect) ) - { - CBPaintButton(lphc, hDC, lphc->buttonRect); - } + CBPaintButton(lphc, hDC); /* paint the edit control padding area */ if (CB_GETTYPE(lphc) != CBS_DROPDOWNLIST)
1
0
0
0
Gijs Vermeulen : kernel32: Remove unused function.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: 22c2ce2fa605285102fc998c85952fd247b771a9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=22c2ce2fa605285102fc998c…
Author: Gijs Vermeulen <gijsvrm(a)codeweavers.com> Date: Wed Nov 27 18:21:52 2019 +0100 kernel32: Remove unused function. Signed-off-by: Gijs Vermeulen <gijsvrm(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 60428bcef0..3b485aeca0 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -176,17 +176,6 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; static CRITICAL_SECTION cache_section = { &critsect_debug, -1, 0, 0, 0, 0 }; -/* Copy Ascii string to Unicode without using codepages */ -static inline void strcpynAtoW( WCHAR *dst, const char *src, size_t n ) -{ - while (n > 1 && *src) - { - *dst++ = (unsigned char)*src++; - n--; - } - if (n) *dst = 0; -} - extern const unsigned short wctype_table[] DECLSPEC_HIDDEN; extern const unsigned short nameprep_char_type[] DECLSPEC_HIDDEN; extern const WCHAR nameprep_mapping[] DECLSPEC_HIDDEN;
1
0
0
0
Gijs Vermeulen : ntdll: Fix implicit declaration of mach_port_deallocate.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: 9bd292127e56b717c093cfb70b2851904287b68f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9bd292127e56b717c093cfb7…
Author: Gijs Vermeulen <gijsvrm(a)codeweavers.com> Date: Wed Nov 27 18:21:51 2019 +0100 ntdll: Fix implicit declaration of mach_port_deallocate. Signed-off-by: Gijs Vermeulen <gijsvrm(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/nt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 589fb68d7a..cdc893b6a2 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -79,6 +79,7 @@ #include "ddk/wdm.h" #ifdef __APPLE__ +#include <mach/mach.h> #include <mach/mach_init.h> #include <mach/mach_host.h> #include <mach/vm_map.h>
1
0
0
0
Jeff Smith : ucrtbase: Consolidate strftime code for formats %g %G %V.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: 251ef88e0106841061f5ac0a5b8a343a689e0a69 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=251ef88e0106841061f5ac0a…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Nov 27 17:52:37 2019 +0100 ucrtbase: Consolidate strftime code for formats %g %G %V. Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/time.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 1e7d5580a5..4283566102 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -1325,24 +1325,9 @@ static MSVCRT_size_t strftime_impl(STRFTIME_CHAR *str, MSVCRT_size_t max, break; case 'g': case 'G': - { - int iso_year = year; if(!MSVCRT_CHECK_PMT(year>=0 && year<=9999)) goto einval_error; - if (mstm->tm_yday - (mstm->tm_wday ? mstm->tm_wday : 7) + 4 < 0) - iso_year--; - else if(mstm->tm_yday - (mstm->tm_wday ? mstm->tm_wday : 7) + 5 > 365 + IsLeapYear(iso_year)) - iso_year++; - if(*format == 'G') - { - if (!strftime_int(str, &ret, max, iso_year, 4, 0, 9999)) - return 0; - } else { - if (!strftime_int(str, &ret, max, iso_year%100, 2, 0, 99)) - return 0; - } - break; - } + /* fall through */ case 'V': { int iso_year = year; @@ -1352,8 +1337,16 @@ static MSVCRT_size_t strftime_impl(STRFTIME_CHAR *str, MSVCRT_size_t max, else if(iso_days >= 365 + IsLeapYear(iso_year)) iso_days -= 365 + IsLeapYear(iso_year++); - if(!strftime_int(str, &ret, max, iso_days/7 + 1, alternate ? 0 : 2, 0, 53)) - return 0; + if(*format == 'G') { + if(!strftime_int(str, &ret, max, iso_year, 4, 0, 9999)) + return 0; + } else if(*format == 'g') { + if(!strftime_int(str, &ret, max, iso_year%100, 2, 0, 99)) + return 0; + } else { + if(!strftime_int(str, &ret, max, iso_days/7 + 1, alternate ? 0 : 2, 0, 53)) + return 0; + } break; } #endif
1
0
0
0
Jeff Smith : ucrtbase: Add support for strftime format %V.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: 4f5342fff0079bd8d8e01026fb502f3833c89d49 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4f5342fff0079bd8d8e01026…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Nov 27 17:52:31 2019 +0100 ucrtbase: Add support for strftime format %V. Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/time.c | 13 +++++++++++ dlls/ucrtbase/tests/misc.c | 57 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 67 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 339914b6b3..1e7d5580a5 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -1343,6 +1343,19 @@ static MSVCRT_size_t strftime_impl(STRFTIME_CHAR *str, MSVCRT_size_t max, } break; } + case 'V': + { + int iso_year = year; + int iso_days = mstm->tm_yday - (mstm->tm_wday ? mstm->tm_wday : 7) + 4; + if (iso_days < 0) + iso_days += 365 + IsLeapYear(--iso_year); + else if(iso_days >= 365 + IsLeapYear(iso_year)) + iso_days -= 365 + IsLeapYear(iso_year++); + + if(!strftime_int(str, &ret, max, iso_days/7 + 1, alternate ? 0 : 2, 0, 53)) + return 0; + break; + } #endif case 'H': if(!strftime_int(str, &ret, max, mstm->tm_hour, alternate ? 0 : 2, 0, 23)) diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c index 107bb7e84c..c1ab7f216a 100644 --- a/dlls/ucrtbase/tests/misc.c +++ b/dlls/ucrtbase/tests/misc.c @@ -992,9 +992,9 @@ static void test_strftime(void) {"%G", "1971", { 0, 0, 0, 2, 0, 72, 0, 1, 0 }}, {"%G", "1972", { 0, 0, 0, 3, 0, 72, 1, 2, 0 }}, {"%G", "2016", { 0, 0, 0, 1, 0, 117, 0, 0, 0 }}, - {"%V", "01", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE, TRUE}, - {"%V", "52", { 0, 0, 0, 1, 0, 117, 0, 0, 0 }, TRUE, TRUE}, - {"%V", "53", { 0, 0, 14, 1, 0, 121, 6, 0, 0 }, TRUE, TRUE}, + {"%V", "01", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, + {"%V", "52", { 0, 0, 0, 1, 0, 117, 0, 0, 0 }}, + {"%V", "53", { 0, 0, 14, 1, 0, 121, 6, 0, 0 }}, {"%y", "", { 0, 0, 0, 0, 0, -1901, 0, 0, 0 }}, {"%y", "00", { 0, 0, 0, 0, 0, -1900, 0, 0, 0 }}, {"%y", "99", { 0, 0, 0, 0, 0, 8099, 0, 0, 0 }}, @@ -1079,6 +1079,42 @@ static void test_strftime(void) { "%#x", "y1970", 0, L"yyyyy", 0, { 0, 0, 0, 1, 0, 70, 0, 0, 0 }}, }; + const struct { + int year; + int yday; + const char *ret[7]; + } tests_yweek[] = { + { 100, 0, { "99 52", "00 01", "00 01", "00 01", "00 01", "99 53", "99 52" }}, + { 100, 1, { "99 52", "00 01", "00 01", "00 01", "00 01", "00 01", "99 53" }}, + { 100, 2, { "99 53", "00 01", "00 01", "00 01", "00 01", "00 01", "00 01" }}, + { 100, 3, { "00 01", "00 01", "00 01", "00 01", "00 01", "00 01", "00 01" }}, + { 100, 4, { "00 01", "00 02", "00 01", "00 01", "00 01", "00 01", "00 01" }}, + { 100, 5, { "00 01", "00 02", "00 02", "00 01", "00 01", "00 01", "00 01" }}, + { 100, 6, { "00 01", "00 02", "00 02", "00 02", "00 01", "00 01", "00 01" }}, + { 100, 358, { "00 51", "00 52", "00 52", "00 52", "00 52", "00 52", "00 51" }}, + { 100, 359, { "00 51", "00 52", "00 52", "00 52", "00 52", "00 52", "00 52" }}, + { 100, 360, { "00 52", "00 52", "00 52", "00 52", "00 52", "00 52", "00 52" }}, + { 100, 361, { "00 52", "00 53", "00 52", "00 52", "00 52", "00 52", "00 52" }}, + { 100, 362, { "00 52", "00 53", "00 53", "00 52", "00 52", "00 52", "00 52" }}, + { 100, 363, { "00 52", "01 01", "00 53", "00 53", "00 52", "00 52", "00 52" }}, + { 100, 364, { "00 52", "01 01", "01 01", "00 53", "00 53", "00 52", "00 52" }}, + { 100, 365, { "00 52", "01 01", "01 01", "01 01", "00 53", "00 53", "00 52" }}, + { 101, 0, { "00 52", "01 01", "01 01", "01 01", "01 01", "00 53", "00 53" }}, + { 101, 1, { "00 53", "01 01", "01 01", "01 01", "01 01", "01 01", "00 53" }}, + { 101, 2, { "00 53", "01 01", "01 01", "01 01", "01 01", "01 01", "01 01" }}, + { 101, 3, { "01 01", "01 01", "01 01", "01 01", "01 01", "01 01", "01 01" }}, + { 101, 4, { "01 01", "01 02", "01 01", "01 01", "01 01", "01 01", "01 01" }}, + { 101, 5, { "01 01", "01 02", "01 02", "01 01", "01 01", "01 01", "01 01" }}, + { 101, 6, { "01 01", "01 02", "01 02", "01 02", "01 01", "01 01", "01 01" }}, + { 101, 358, { "01 51", "01 52", "01 52", "01 52", "01 52", "01 52", "01 51" }}, + { 101, 359, { "01 51", "01 52", "01 52", "01 52", "01 52", "01 52", "01 52" }}, + { 101, 360, { "01 52", "01 52", "01 52", "01 52", "01 52", "01 52", "01 52" }}, + { 101, 361, { "01 52", "01 53", "01 52", "01 52", "01 52", "01 52", "01 52" }}, + { 101, 362, { "01 52", "02 01", "01 53", "01 52", "01 52", "01 52", "01 52" }}, + { 101, 363, { "01 52", "02 01", "02 01", "01 53", "01 52", "01 52", "01 52" }}, + { 101, 364, { "01 52", "02 01", "02 01", "02 01", "01 53", "01 52", "01 52" }}, + }; + __lc_time_data time_data = { { "d1", "d2", "d3", "d4", "d5", "d6", "d7" }, { "day1", "day2", "day3", "day4", "day5", "day6", "day7" }, @@ -1093,6 +1129,7 @@ static void test_strftime(void) }; const struct tm epoch = { 0, 0, 0, 1, 0, 70, 4, 0, 0 }; + struct tm tm_yweek = { 0, 0, 0, 1, 0, 70, 0, 0, 0 }; char buf[256]; int i, ret=0; @@ -1131,6 +1168,20 @@ static void test_strftime(void) i, buf, tests_td[i].ret); } } + + for (i=0; i<ARRAY_SIZE(tests_yweek); i++) + { + int j; + tm_yweek.tm_year = tests_yweek[i].year; + tm_yweek.tm_yday = tests_yweek[i].yday; + for (j=0; j<7; j++) + { + tm_yweek.tm_wday = j; + p_strftime(buf, sizeof(buf), "%g %V", &tm_yweek); + ok(!strcmp(buf, tests_yweek[i].ret[j]), "%d,%d) buf = \"%s\", expected \"%s\"\n", + i, j, buf, tests_yweek[i].ret[j]); + } + } } static LONG* get_failures_counter(HANDLE *map)
1
0
0
0
Jeff Smith : ucrtbase: Use correct type for year with strftime format %g.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: cdcbb9f369ff5e83437fd45c39618f6771c81d27 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cdcbb9f369ff5e83437fd45c…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Nov 27 17:52:25 2019 +0100 ucrtbase: Use correct type for year with strftime format %g. Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/time.c | 16 ++++++++++------ dlls/ucrtbase/tests/misc.c | 8 ++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 592b049107..339914b6b3 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -1325,20 +1325,24 @@ static MSVCRT_size_t strftime_impl(STRFTIME_CHAR *str, MSVCRT_size_t max, break; case 'g': case 'G': - tmp = year; + { + int iso_year = year; + if(!MSVCRT_CHECK_PMT(year>=0 && year<=9999)) + goto einval_error; if (mstm->tm_yday - (mstm->tm_wday ? mstm->tm_wday : 7) + 4 < 0) - tmp--; - else if(mstm->tm_yday - (mstm->tm_wday ? mstm->tm_wday : 7) + 5 > 365 + IsLeapYear(tmp)) - tmp++; + iso_year--; + else if(mstm->tm_yday - (mstm->tm_wday ? mstm->tm_wday : 7) + 5 > 365 + IsLeapYear(iso_year)) + iso_year++; if(*format == 'G') { - if (!strftime_int(str, &ret, max, tmp, 4, 0, 9999)) + if (!strftime_int(str, &ret, max, iso_year, 4, 0, 9999)) return 0; } else { - if (!strftime_int(str, &ret, max, tmp%100, 2, 0, 99)) + if (!strftime_int(str, &ret, max, iso_year%100, 2, 0, 99)) return 0; } break; + } #endif case 'H': if(!strftime_int(str, &ret, max, mstm->tm_hour, alternate ? 0 : 2, 0, 23)) diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c index 9b43d73559..107bb7e84c 100644 --- a/dlls/ucrtbase/tests/misc.c +++ b/dlls/ucrtbase/tests/misc.c @@ -977,8 +977,8 @@ static void test_strftime(void) {"%r", "12:00:00 AM", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE, TRUE}, {"%r", "02:00:00 PM", { 0, 0, 14, 1, 0, 121, 6, 0, 0 }, TRUE, TRUE}, {"%t", "\t", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, - {"%g", "", { 0, 0, 0, 1, 0, -1901, 4, 0, 0 }, TRUE}, - {"%g", "", { 0, 0, 0, 1, 0, -1901, 3, 364, 0 }, TRUE, TRUE}, + {"%g", "", { 0, 0, 0, 1, 0, -1901, 4, 0, 0 }}, + {"%g", "", { 0, 0, 0, 1, 0, -1901, 3, 364, 0 }}, {"%g", "00", { 0, 0, 0, 1, 0, -1900, 4, 0, 0 }}, {"%g", "70", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, {"%g", "71", { 0, 0, 0, 2, 0, 72, 0, 1, 0 }}, @@ -986,8 +986,8 @@ static void test_strftime(void) {"%g", "16", { 0, 0, 0, 1, 0, 117, 0, 0, 0 }}, {"%g", "99", { 0, 0, 0, 1, 0, 8099, 4, 0, 0 }}, {"%g", "00", { 0, 0, 0, 1, 0, 8099, 3, 364, 0 }}, - {"%g", "", { 0, 0, 0, 1, 0, 8100, 0, 0, 0 }, TRUE, TRUE}, - {"%g", "", { 0, 0, 0, 1, 0, 8100, 4, 0, 0 }, TRUE, TRUE}, + {"%g", "", { 0, 0, 0, 1, 0, 8100, 0, 0, 0 }}, + {"%g", "", { 0, 0, 0, 1, 0, 8100, 4, 0, 0 }}, {"%G", "1970", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, {"%G", "1971", { 0, 0, 0, 2, 0, 72, 0, 1, 0 }}, {"%G", "1972", { 0, 0, 0, 3, 0, 72, 1, 2, 0 }},
1
0
0
0
Jeff Smith : ucrtbase: Expand tests for strftime format %g.
by Alexandre Julliard
27 Nov '19
27 Nov '19
Module: wine Branch: master Commit: d0319e20eb1903f6c6d7ac204a0d4785179eb765 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d0319e20eb1903f6c6d7ac20…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Nov 27 17:52:19 2019 +0100 ucrtbase: Expand tests for strftime format %g. Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ucrtbase/tests/misc.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c index 6314662eac..9b43d73559 100644 --- a/dlls/ucrtbase/tests/misc.c +++ b/dlls/ucrtbase/tests/misc.c @@ -927,7 +927,7 @@ static void test_strftime(void) const char *format; const char *ret; struct tm tm; - BOOL todo; + BOOL todo_value; BOOL todo_handler; } tests[] = { {"%C", "", { 0, 0, 0, 1, 0, -2000, 4, 0, 0 }}, @@ -974,26 +974,33 @@ static void test_strftime(void) {"%I", "11", { 0, 0, 23, 1, 0, 70, 4, 0, 0 }}, {"%I", "", { 0, 0, 24, 1, 0, 70, 4, 0, 0 }}, {"%n", "\n", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, - {"%r", "12:00:00 AM", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE}, - {"%r", "02:00:00 PM", { 0, 0, 14, 1, 0, 121, 6, 0, 0 }, TRUE}, + {"%r", "12:00:00 AM", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE, TRUE}, + {"%r", "02:00:00 PM", { 0, 0, 14, 1, 0, 121, 6, 0, 0 }, TRUE, TRUE}, {"%t", "\t", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, + {"%g", "", { 0, 0, 0, 1, 0, -1901, 4, 0, 0 }, TRUE}, + {"%g", "", { 0, 0, 0, 1, 0, -1901, 3, 364, 0 }, TRUE, TRUE}, + {"%g", "00", { 0, 0, 0, 1, 0, -1900, 4, 0, 0 }}, {"%g", "70", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, + {"%g", "71", { 0, 0, 0, 2, 0, 72, 0, 1, 0 }}, + {"%g", "72", { 0, 0, 0, 3, 0, 72, 1, 2, 0 }}, {"%g", "16", { 0, 0, 0, 1, 0, 117, 0, 0, 0 }}, + {"%g", "99", { 0, 0, 0, 1, 0, 8099, 4, 0, 0 }}, + {"%g", "00", { 0, 0, 0, 1, 0, 8099, 3, 364, 0 }}, + {"%g", "", { 0, 0, 0, 1, 0, 8100, 0, 0, 0 }, TRUE, TRUE}, + {"%g", "", { 0, 0, 0, 1, 0, 8100, 4, 0, 0 }, TRUE, TRUE}, {"%G", "1970", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, + {"%G", "1971", { 0, 0, 0, 2, 0, 72, 0, 1, 0 }}, + {"%G", "1972", { 0, 0, 0, 3, 0, 72, 1, 2, 0 }}, {"%G", "2016", { 0, 0, 0, 1, 0, 117, 0, 0, 0 }}, - {"%V", "01", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE}, - {"%V", "52", { 0, 0, 0, 1, 0, 117, 0, 0, 0 }, TRUE}, - {"%V", "53", { 0, 0, 14, 1, 0, 121, 6, 0, 0 }, TRUE}, + {"%V", "01", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE, TRUE}, + {"%V", "52", { 0, 0, 0, 1, 0, 117, 0, 0, 0 }, TRUE, TRUE}, + {"%V", "53", { 0, 0, 14, 1, 0, 121, 6, 0, 0 }, TRUE, TRUE}, {"%y", "", { 0, 0, 0, 0, 0, -1901, 0, 0, 0 }}, {"%y", "00", { 0, 0, 0, 0, 0, -1900, 0, 0, 0 }}, {"%y", "99", { 0, 0, 0, 0, 0, 8099, 0, 0, 0 }}, {"%y", "", { 0, 0, 0, 0, 0, 8100, 0, 0, 0 }}, - {"%g", "71", { 0, 0, 0, 2, 0, 72, 0, 1, 0 }}, - {"%g", "72", { 0, 0, 0, 3, 0, 72, 1, 2, 0 }}, - {"%G", "1971", { 0, 0, 0, 2, 0, 72, 0, 1, 0 }}, - {"%G", "1972", { 0, 0, 0, 3, 0, 72, 1, 2, 0 }}, - {"%c", "Thu Jan 1 00:00:00 1970", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE}, - {"%c", "Thu Feb 30 00:00:00 1970", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE}, + {"%c", "Thu Jan 1 00:00:00 1970", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE, TRUE}, + {"%c", "Thu Feb 30 00:00:00 1970", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE, TRUE}, {"%#c", "Thursday, January 01, 1970 00:00:00", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, {"%#c", "Thursday, February 30, 1970 00:00:00", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }}, {"%x", "01/01/70", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }}, @@ -1091,7 +1098,7 @@ static void test_strftime(void) for (i=0; i<ARRAY_SIZE(tests); i++) { - todo_wine_if(tests[i].todo || tests[i].todo_handler) { + todo_wine_if(tests[i].todo_handler) { if (!tests[i].ret[0]) SET_EXPECT(global_invalid_parameter_handler); ret = p_strftime(buf, sizeof(buf), tests[i].format, &tests[i].tm); @@ -1099,7 +1106,7 @@ static void test_strftime(void) CHECK_CALLED(global_invalid_parameter_handler); } - todo_wine_if(tests[i].todo) { + todo_wine_if(tests[i].todo_value) { ok(ret == strlen(tests[i].ret), "%d) ret = %d\n", i, ret); ok(!strcmp(buf, tests[i].ret), "%d) buf = \"%s\", expected \"%s\"\n", i, buf, tests[i].ret);
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200