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
October 2009
----- 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
3 participants
1207 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/monthcal: Implement MCM_GETMONTHRANGE for GMR_DAYSTATE flag and a single calendar control .
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: c68324dfedf2f1e25e984f3d87c9419db90ce1f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c68324dfedf2f1e25e984f3d8…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Oct 8 14:02:18 2009 +0400 comctl32/monthcal: Implement MCM_GETMONTHRANGE for GMR_DAYSTATE flag and a single calendar control. --- dlls/comctl32/monthcal.c | 73 ++++++++++++++++++++++++++++++++------- dlls/comctl32/tests/monthcal.c | 17 +++++---- 2 files changed, 70 insertions(+), 20 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 6394600..a44ae31 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -395,7 +395,7 @@ int MONTHCAL_CalculateDayOfWeek(WORD day, WORD month, WORD year) } /* properly updates date to point on next month */ -void inline MONTHCAL_GetNextMonth(SYSTEMTIME *date) +static inline void MONTHCAL_GetNextMonth(SYSTEMTIME *date) { if(++date->wMonth > 12) { @@ -407,7 +407,7 @@ void inline MONTHCAL_GetNextMonth(SYSTEMTIME *date) } /* properly updates date to point on prev month */ -void inline MONTHCAL_GetPrevMonth(SYSTEMTIME *date) +static inline void MONTHCAL_GetPrevMonth(SYSTEMTIME *date) { if(--date->wMonth < 1) { @@ -418,6 +418,45 @@ void inline MONTHCAL_GetPrevMonth(SYSTEMTIME *date) date->wYear); } +/* Returns full date for a first currently visible day */ +static void MONTHCAL_GetMinDate(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *date) +{ + int firstDay; + + firstDay = MONTHCAL_CalculateDayOfWeek(1, infoPtr->curSel.wMonth, infoPtr->curSel.wYear); + + *date = infoPtr->curSel; + MONTHCAL_GetPrevMonth(date); + + date->wDay = MONTHCAL_MonthLength(date->wMonth, date->wYear) + + (infoPtr->firstDay - firstDay) % 7 + 1; + + if(date->wDay > MONTHCAL_MonthLength(date->wMonth, date->wYear)) + date->wDay -= 7; + + /* fix day of week */ + date->wDayOfWeek = MONTHCAL_CalculateDayOfWeek(date->wDay, date->wMonth, + date->wYear); +} + +/* Returns full date for a last currently visible day */ +static void MONTHCAL_GetMaxDate(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *date) +{ + SYSTEMTIME st; + + *date = infoPtr->curSel; + MONTHCAL_GetNextMonth(date); + + MONTHCAL_GetMinDate(infoPtr, &st); + /* Use month length to get max day. 42 means max day count in calendar area */ + date->wDay = 42 - (MONTHCAL_MonthLength(st.wMonth, st.wYear) - st.wDay + 1) - + MONTHCAL_MonthLength(infoPtr->curSel.wMonth, infoPtr->curSel.wYear); + + /* fix day of week */ + date->wDayOfWeek = MONTHCAL_CalculateDayOfWeek(date->wDay, date->wMonth, + date->wYear); +} + /* From a given point, calculate the row (weekpos), column(daypos) and day in the calendar. day== 0 mean the last day of tha last month */ @@ -661,7 +700,7 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT RECT *titlemonth=&infoPtr->titlemonth; RECT *titleyear=&infoPtr->titleyear; RECT dayrect; - int i, j, m, mask, day, firstDay, prevMonth; + int i, j, m, mask, day, prevMonth; int textHeight = infoPtr->textHeight; SIZE size; HBRUSH hbr; @@ -673,6 +712,7 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT RECT rcTemp; RECT rcDay; /* used in MONTHCAL_CalcDayRect() */ int startofprescal; + SYSTEMTIME st; oldTextColor = SetTextColor(hdc, comctl32_color.clrWindowText); @@ -764,13 +804,8 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT } /* draw day numbers; first, the previous month */ - firstDay = MONTHCAL_CalculateDayOfWeek(1, infoPtr->curSel.wMonth, infoPtr->curSel.wYear); - - day = MONTHCAL_MonthLength(prevMonth, infoPtr->curSel.wYear) + - (infoPtr->firstDay - firstDay)%7 + 1; - - if (day > MONTHCAL_MonthLength(prevMonth, infoPtr->curSel.wYear)) - day -= 7; + MONTHCAL_GetMinDate(infoPtr, &st); + day = st.wDay; startofprescal = day; mask = 1<<(day-1); @@ -1181,7 +1216,8 @@ MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr, DWORD flag, SYSTEMTIME *st) if(st) { - if(flag == GMR_VISIBLE) + switch (flag) { + case GMR_VISIBLE: { /*FIXME: currently multicalendar feature isn't implelented, so entirely visible month is current */ @@ -1193,9 +1229,20 @@ MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr, DWORD flag, SYSTEMTIME *st) st[1].wDay = MONTHCAL_MonthLength(st[1].wMonth, st[1].wYear); st[1].wDayOfWeek = MONTHCAL_CalculateDayOfWeek(st[1].wDay, st[1].wMonth, st[1].wYear); + /* a single current month used */ + return 1; + } + case GMR_DAYSTATE: + { + /*FIXME: currently multicalendar feature isn't implelented, + min date from previous month and max date from next one returned */ + MONTHCAL_GetMinDate(infoPtr, &st[0]); + MONTHCAL_GetMaxDate(infoPtr, &st[1]); + break; + } + default: + WARN("Unknown flag value, got %d\n", flag); } - else - FIXME("only GMR_VISIBLE flag supported, got %d\n", flag); } return infoPtr->monthRange; diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 57142a6..d3f6681 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -1374,10 +1374,10 @@ static void test_monthcal_monthrange(void) todo_wine { expect(2, res); } - expect(2000, st_visible[0].wYear); - expect(11, st_visible[0].wMonth); - expect(1, st_visible[0].wDay); - expect(2000, st_visible[1].wYear); + expect(2000, st_visible[0].wYear); + expect(11, st_visible[0].wMonth); + expect(1, st_visible[0].wDay); + expect(2000, st_visible[1].wYear); todo_wine { expect(12, st_visible[1].wMonth); @@ -1386,9 +1386,12 @@ static void test_monthcal_monthrange(void) res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_DAYSTATE, (LPARAM)st_daystate); todo_wine { expect(4, res); - expect(2000, st_daystate[0].wYear); - expect(10, st_daystate[0].wMonth); - expect(29, st_daystate[0].wDay); + } + expect(2000, st_daystate[0].wYear); + expect(10, st_daystate[0].wMonth); + expect(29, st_daystate[0].wDay); + + todo_wine { expect(2001, st_daystate[1].wYear); expect(1, st_daystate[1].wMonth); expect(6, st_daystate[1].wDay);
1
0
0
0
Nikolay Sivov : comctl32: Use user32 control names from public header constants instead of defining over and over again .
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: f37130c83bb7effc62670f15d79e84119502271f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f37130c83bb7effc62670f15d…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Oct 8 01:04:08 2009 +0400 comctl32: Use user32 control names from public header constants instead of defining over and over again. --- dlls/comctl32/comboex.c | 6 ++---- dlls/comctl32/ipaddress.c | 3 +-- dlls/comctl32/listview.c | 5 ++--- dlls/comctl32/monthcal.c | 4 +--- dlls/comctl32/treeview.c | 3 +-- dlls/comctl32/updown.c | 6 ++---- 6 files changed, 9 insertions(+), 18 deletions(-) diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 1484ba8..d67b918 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -968,8 +968,6 @@ static INT COMBOEX_SetItemHeight (COMBOEX_INFO const *infoPtr, INT index, UINT h static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) { - static const WCHAR COMBOBOX[] = { 'C', 'o', 'm', 'b', 'o', 'B', 'o', 'x', 0 }; - static const WCHAR EDIT[] = { 'E', 'D', 'I', 'T', 0 }; static const WCHAR NIL[] = { 0 }; COMBOEX_INFO *infoPtr; LOGFONTW mylogfont; @@ -1011,7 +1009,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) /* We also need to place the edit control at the proper location */ /* (allow space for the icons). */ - infoPtr->hwndCombo = CreateWindowW (COMBOBOX, NIL, + infoPtr->hwndCombo = CreateWindowW (WC_COMBOBOXW, NIL, /* following line added to match native */ WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VSCROLL | CBS_NOINTEGRALHEIGHT | CBS_DROPDOWNLIST | @@ -1045,7 +1043,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) * It is created only for CBS_DROPDOWN style */ if ((cs->style & CBS_DROPDOWNLIST) == CBS_DROPDOWN) { - infoPtr->hwndEdit = CreateWindowExW (0, EDIT, NIL, + infoPtr->hwndEdit = CreateWindowExW (0, WC_EDITW, NIL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | ES_AUTOHSCROLL, 0, 0, 0, 0, /* will set later */ infoPtr->hwndCombo, diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index 42ac703..03b8d1c 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -189,7 +189,6 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc) static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate) { - static const WCHAR EDIT[] = { 'E', 'd', 'i', 't', 0 }; IPADDRESS_INFO *infoPtr; RECT rcClient, edit; int i, fieldsize; @@ -230,7 +229,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate) edit.left = rcClient.left + i*fieldsize + 6; edit.right = rcClient.left + (i+1)*fieldsize - 2; part->EditHwnd = - CreateWindowW (EDIT, NULL, WS_CHILD | WS_VISIBLE | ES_CENTER, + CreateWindowW (WC_EDITW, NULL, WS_CHILD | WS_VISIBLE | ES_CENTER, edit.left, edit.top, edit.right - edit.left, edit.bottom - edit.top, hwnd, (HMENU) 1, (HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE), NULL); diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index e1e8f96..6e73b55 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -11309,7 +11309,6 @@ static LRESULT CALLBACK EditLblWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPA */ static HWND CreateEditLabelT(LISTVIEW_INFO *infoPtr, LPCWSTR text, DWORD style, BOOL isW) { - WCHAR editName[5] = { 'E', 'd', 'i', 't', '\0' }; HWND hedit; HINSTANCE hinst = (HINSTANCE)GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_HINSTANCE); @@ -11319,9 +11318,9 @@ static HWND CreateEditLabelT(LISTVIEW_INFO *infoPtr, LPCWSTR text, DWORD style, /* Window will be resized and positioned after LVN_BEGINLABELEDIT */ if (isW) - hedit = CreateWindowW(editName, text, style, 0, 0, 0, 0, infoPtr->hwndSelf, 0, hinst, 0); + hedit = CreateWindowW(WC_EDITW, text, style, 0, 0, 0, 0, infoPtr->hwndSelf, 0, hinst, 0); else - hedit = CreateWindowA("Edit", (LPCSTR)text, style, 0, 0, 0, 0, infoPtr->hwndSelf, 0, hinst, 0); + hedit = CreateWindowA(WC_EDITA, (LPCSTR)text, style, 0, 0, 0, 0, infoPtr->hwndSelf, 0, hinst, 0); if (!hedit) return 0; diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 2450a5c..6394600 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -1681,10 +1681,8 @@ MONTHCAL_RButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam) /* creates updown control and edit box */ static void MONTHCAL_EditYear(MONTHCAL_INFO *infoPtr) { - static const WCHAR EditW[] = { 'E','D','I','T',0 }; - infoPtr->hWndYearEdit = - CreateWindowExW(0, EditW, 0, WS_VISIBLE | WS_CHILD | ES_READONLY, + CreateWindowExW(0, WC_EDITW, 0, WS_VISIBLE | WS_CHILD | ES_READONLY, infoPtr->titleyear.left + 3, infoPtr->titlebtnnext.top, infoPtr->titleyear.right - infoPtr->titleyear.left + 4, infoPtr->textHeight, infoPtr->hwndSelf, diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index a38434d..29db19a 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3674,7 +3674,6 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem) HDC hdc; HFONT hOldFont=0; TEXTMETRICW textMetric; - static const WCHAR EditW[] = {'E','d','i','t',0}; TRACE("%p %p\n", hwnd, hItem); if (!TREEVIEW_ValidItem(infoPtr, hItem)) @@ -3721,7 +3720,7 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem) infoPtr->editItem = hItem; hwndEdit = CreateWindowExW(WS_EX_LEFT, - EditW, + WC_EDITW, 0, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL | WS_CLIPSIBLINGS | ES_WANTRETURN | diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index bb78903..a212073 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -557,8 +557,6 @@ UPDOWN_Buddy_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) */ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud) { - static const WCHAR editW[] = { 'E', 'd', 'i', 't', 0 }; - static const WCHAR listboxW[] = { 'L', 'i', 's', 't', 'b', 'o', 'x', 0 }; RECT budRect; /* new coord for the buddy */ int x, width; /* new x position and width for the up-down */ WNDPROC baseWndProc; @@ -586,9 +584,9 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud) /* Store buddy window class type */ infoPtr->BuddyType = BUDDY_TYPE_UNKNOWN; if (GetClassNameW(bud, buddyClass, COUNT_OF(buddyClass))) { - if (lstrcmpiW(buddyClass, editW) == 0) + if (lstrcmpiW(buddyClass, WC_EDITW) == 0) infoPtr->BuddyType = BUDDY_TYPE_EDIT; - else if (lstrcmpiW(buddyClass, listboxW) == 0) + else if (lstrcmpiW(buddyClass, WC_LISTBOXW) == 0) infoPtr->BuddyType = BUDDY_TYPE_LISTBOX; }
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Fix the way a first day of week is handled.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: c8f35a136d51b949df252d932e9b10c2e2f85419 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8f35a136d51b949df252d932…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Oct 8 00:45:05 2009 +0400 comctl32/monthcal: Fix the way a first day of week is handled. --- dlls/comctl32/comctl32.h | 2 +- dlls/comctl32/datetime.c | 2 +- dlls/comctl32/monthcal.c | 80 ++++++++++++++++++++++++++++++---------------- 3 files changed, 54 insertions(+), 30 deletions(-) diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index e0d1970..4cad907 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -231,7 +231,7 @@ extern void UPDOWN_Unregister(void); int MONTHCAL_MonthLength(int month, int year); -int MONTHCAL_CalculateDayOfWeek(DWORD day, DWORD month, DWORD year); +int MONTHCAL_CalculateDayOfWeek(WORD day, WORD month, WORD year); extern void THEMING_Initialize(void); extern void THEMING_Uninitialize(void); diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 891ca91..097e442 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -88,7 +88,7 @@ typedef struct /* in monthcal.c */ extern int MONTHCAL_MonthLength(int month, int year); -extern int MONTHCAL_CalculateDayOfWeek(DWORD day, DWORD month, DWORD year); +extern int MONTHCAL_CalculateDayOfWeek(WORD day, WORD month, WORD year); /* this list of defines is closely related to `allowedformatchars' defined * in datetime.c; the high nibble indicates the `base type' of the format diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 745d99b..2450a5c 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -97,8 +97,10 @@ typedef struct INT delta; /* scroll rate; # of months that the */ /* control moves when user clicks a scroll button */ int visible; /* # of months visible */ - int firstDay; /* Start month calendar with firstDay's day */ - int firstDayHighWord; /* High word only used externally */ + int firstDay; /* Start month calendar with firstDay's day, + stored in SYSTEMTIME format */ + BOOL firstDaySet; /* first week day differs from locale defined */ + int monthRange; MONTHDAYSTATE *monthdayState; SYSTEMTIME todaysDate; @@ -177,10 +179,12 @@ static inline void MONTHCAL_NotifySelect(const MONTHCAL_INFO *infoPtr) int MONTHCAL_MonthLength(int month, int year) { const int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0}; - /*Wrap around, this eases handling*/ + /* Wrap around, this eases handling. Getting length only we shouldn't care + about year change here cause January and December have + the same day quantity */ if(month == 0) month = 12; - if(month == 13) + else if(month == 13) month = 1; /* if we have a leap year add 1 day to February */ @@ -372,9 +376,17 @@ static void MONTHCAL_CopyDate(const SYSTEMTIME *from, SYSTEMTIME *to) 0 = Sunday. */ -/* returns the day in the week(0 == sunday, 6 == saturday) */ -/* day(1 == 1st, 2 == 2nd... etc), year is the year value */ -int MONTHCAL_CalculateDayOfWeek(DWORD day, DWORD month, DWORD year) +/* Returns the day in the week + * + * PARAMETERS + * [i] day : day of month [1, 31] + * [I] month : month number [1, 12] + * [I] year : year value + * + * RETURN VALUE + * day of week in SYSTEMTIME format: (0 == sunday,..., 6 == saturday) + */ +int MONTHCAL_CalculateDayOfWeek(WORD day, WORD month, WORD year) { year-=(month < 3); @@ -751,14 +763,14 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT dayrect.right += infoPtr->width_increment; } -/* draw day numbers; first, the previous month */ - + /* draw day numbers; first, the previous month */ firstDay = MONTHCAL_CalculateDayOfWeek(1, infoPtr->curSel.wMonth, infoPtr->curSel.wYear); - day = MONTHCAL_MonthLength(prevMonth, infoPtr->curSel.wYear) + - (infoPtr->firstDay + 7 - firstDay)%7 + 1; + day = MONTHCAL_MonthLength(prevMonth, infoPtr->curSel.wYear) + + (infoPtr->firstDay - firstDay)%7 + 1; + if (day > MONTHCAL_MonthLength(prevMonth, infoPtr->curSel.wYear)) - day -=7; + day -= 7; startofprescal = day; mask = 1<<(day-1); @@ -921,7 +933,7 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT { /* calculate all those exceptions for january */ weeknum1 = MONTHCAL_CalculateDayOfWeek(1, 1, infoPtr->curSel.wYear); - if ((infoPtr->firstDay + 7 - weeknum1) % 7 > mindays) + if ((infoPtr->firstDay - weeknum1) % 7 > mindays) weeknum = 1; else { @@ -932,7 +944,7 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT weeknum += startofprescal + 7; weeknum /= 7; weeknum1 = MONTHCAL_CalculateDayOfWeek(1, 1, infoPtr->curSel.wYear - 1); - if ((infoPtr->firstDay + 7 - weeknum1) % 7 > mindays) weeknum++; + if ((infoPtr->firstDay - weeknum1) % 7 > mindays) weeknum++; } } else @@ -944,7 +956,7 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT weeknum += startofprescal + 7; weeknum /= 7; weeknum1 = MONTHCAL_CalculateDayOfWeek(1, 1, infoPtr->curSel.wYear); - if ((infoPtr->firstDay + 7 - weeknum1) % 7 > mindays) weeknum++; + if ((infoPtr->firstDay - weeknum1) % 7 > mindays) weeknum++; } dayrect = infoPtr->weeknums; @@ -1089,10 +1101,15 @@ MONTHCAL_SetMonthDelta(MONTHCAL_INFO *infoPtr, INT delta) } -static LRESULT +static inline LRESULT MONTHCAL_GetFirstDayOfWeek(const MONTHCAL_INFO *infoPtr) { - return MAKELONG(infoPtr->firstDay, infoPtr->firstDayHighWord); + int day; + + /* convert from SYSTEMTIME to locale format */ + day = (infoPtr->firstDay >= 0) ? (infoPtr->firstDay+6)%7 : infoPtr->firstDay; + + return MAKELONG(day, infoPtr->firstDaySet); } @@ -1115,34 +1132,42 @@ MONTHCAL_GetFirstDayOfWeek(const MONTHCAL_INFO *infoPtr) static LRESULT MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, INT day) { - int prev = MAKELONG(infoPtr->firstDay, infoPtr->firstDayHighWord); + LRESULT prev = MONTHCAL_GetFirstDayOfWeek(infoPtr); + int new_day; - TRACE("day %d\n", day); + TRACE("%d\n", day); if(day == -1) { - int localFirstDay; WCHAR buf[80]; GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK, buf, countof(buf)); TRACE("%s %d\n", debugstr_w(buf), strlenW(buf)); - localFirstDay = atoiW(buf); + new_day = atoiW(buf); - infoPtr->firstDay = localFirstDay; - infoPtr->firstDayHighWord = FALSE; + infoPtr->firstDaySet = FALSE; } else if(day >= 7) { - infoPtr->firstDay = 6; /* max first day allowed */ - infoPtr->firstDayHighWord = TRUE; + new_day = 6; /* max first day allowed */ + infoPtr->firstDaySet = TRUE; } else { - infoPtr->firstDay = day; - infoPtr->firstDayHighWord = TRUE; + /* Native behaviour for that case is broken: invalid date number >31 + got displayed at (0,0) position, current month starts always from + (1,0) position. Should be implemnted here as well. */ + if (day < -1) + FIXME("No bug compatibility for day=%d\n", day); + + new_day = day; + infoPtr->firstDaySet = TRUE; } + /* convert from locale to SYSTEMTIME format */ + infoPtr->firstDay = (new_day >= 0) ? (++new_day) % 7 : new_day; + InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); return prev; @@ -2248,7 +2273,6 @@ MONTHCAL_Create(HWND hwnd, LPCREATESTRUCTW lpcs) /* FIXME: calculate systemtime ->> localtime(substract timezoneinfo) */ GetLocalTime(&infoPtr->todaysDate); - infoPtr->firstDayHighWord = FALSE; MONTHCAL_SetFirstDayOfWeek(infoPtr, -1); infoPtr->maxSelCount = (infoPtr->dwStyle & MCS_MULTISELECT) ? 7 : 1;
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Cleanup top drawing helper namespace, reduce parameter count in prev/next draw helpers.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: bd58b130bac9586a8134f564ff9dfb70cb55366f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd58b130bac9586a8134f564f…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Oct 7 22:13:07 2009 +0400 comctl32/monthcal: Cleanup top drawing helper namespace, reduce parameter count in prev/next draw helpers. --- dlls/comctl32/monthcal.c | 189 +++++++++++++++++++++++---------------------- 1 files changed, 97 insertions(+), 92 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=bd58b130bac9586a8134f…
1
0
0
0
Alexandre Julliard : winex11: Rename the XRENDERINFO type to make it clear it's a pointer.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 344cf57f1bb569c7593d21d14e9effb493457ff0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=344cf57f1bb569c7593d21d14…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 8 12:10:59 2009 +0200 winex11: Rename the XRENDERINFO type to make it clear it's a pointer. --- dlls/winex11.drv/x11drv.h | 4 ++-- dlls/winex11.drv/xrender.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 3faffdf..eee5849 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -138,7 +138,7 @@ typedef struct /* X physical font */ typedef UINT X_PHYSFONT; -typedef struct tagXRENDERINFO *XRENDERINFO; +struct xrender_info; /* X physical device */ typedef struct @@ -163,7 +163,7 @@ typedef struct Drawable gl_drawable; Pixmap pixmap; /* Pixmap for a GLXPixmap gl_drawable */ int gl_copy; - XRENDERINFO xrender; + struct xrender_info *xrender; } X11DRV_PDEVICE; diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index d4474dd..8b2f0dd 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -140,7 +140,7 @@ typedef struct INT next; } gsCacheEntry; -struct tagXRENDERINFO +struct xrender_info { int cache_index; Picture pict; @@ -207,11 +207,11 @@ static CRITICAL_SECTION xrender_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; #define NATIVE_BYTE_ORDER LSBFirst #endif -static XRENDERINFO get_xrender_info(X11DRV_PDEVICE *physDev) +static struct xrender_info *get_xrender_info(X11DRV_PDEVICE *physDev) { if(!physDev->xrender) { - physDev->xrender = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct tagXRENDERINFO)); + physDev->xrender = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*physDev->xrender)); if(!physDev->xrender) { @@ -812,7 +812,7 @@ void X11DRV_XRender_Finalize(void) BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont) { LFANDSIZE lfsz; - XRENDERINFO info; + struct xrender_info *info; GetObjectW(hfont, sizeof(lfsz.lf), &lfsz.lf); TRACE("h=%d w=%d weight=%d it=%d charset=%d name=%s\n",
1
0
0
0
Roderick Colenbrander : winex11: Move XRENDERINFO allocation in a separate function.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 3e5e0ee80769f027e870c2759c3c3310ae440bcc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e5e0ee80769f027e870c2759…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Tue Oct 6 20:41:33 2009 +0200 winex11: Move XRENDERINFO allocation in a separate function. --- dlls/winex11.drv/xrender.c | 32 ++++++++++++++++++++++++-------- 1 files changed, 24 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 076b6d4..d4474dd 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -207,6 +207,23 @@ static CRITICAL_SECTION xrender_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; #define NATIVE_BYTE_ORDER LSBFirst #endif +static XRENDERINFO get_xrender_info(X11DRV_PDEVICE *physDev) +{ + if(!physDev->xrender) + { + physDev->xrender = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct tagXRENDERINFO)); + + if(!physDev->xrender) + { + ERR("Unable to allocate XRENDERINFO!\n"); + return NULL; + } + physDev->xrender->cache_index = -1; + } + + return physDev->xrender; +} + static BOOL get_xrender_template(const WineXRenderFormatTemplate *fmt, XRenderPictFormat *templ, unsigned long *mask) { templ->id = 0; @@ -795,6 +812,7 @@ void X11DRV_XRender_Finalize(void) BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont) { LFANDSIZE lfsz; + XRENDERINFO info; GetObjectW(hfont, sizeof(lfsz.lf), &lfsz.lf); TRACE("h=%d w=%d weight=%d it=%d charset=%d name=%s\n", @@ -806,15 +824,13 @@ BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont) GetWorldTransform( physDev->hdc, &lfsz.xform ); lfsz_calc_hash(&lfsz); + info = get_xrender_info(physDev); + if (!info) return 0; + EnterCriticalSection(&xrender_cs); - if(!physDev->xrender) { - physDev->xrender = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(*physDev->xrender)); - physDev->xrender->cache_index = -1; - } - else if(physDev->xrender->cache_index != -1) - dec_ref_cache(physDev->xrender->cache_index); - physDev->xrender->cache_index = GetCacheEntry(physDev, &lfsz); + if(info->cache_index != -1) + dec_ref_cache(info->cache_index); + info->cache_index = GetCacheEntry(physDev, &lfsz); LeaveCriticalSection(&xrender_cs); return 0; }
1
0
0
0
Piotr Caban : jscript: Fixed escaped characters processing.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 50705c568303e0b938c7620c9838a386b723eb3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=50705c568303e0b938c7620c9…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Oct 7 22:11:48 2009 +0200 jscript: Fixed escaped characters processing. --- dlls/jscript/lex.c | 16 +++++++++------- dlls/jscript/tests/api.js | 8 ++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 680ce55..43089d3 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -287,7 +287,7 @@ static BOOL unescape(WCHAR *str) i = hex_to_int(*++p); if(i == -1) return FALSE; - c += 1 << 4; + c += i << 4; i = hex_to_int(*++p); if(i == -1) @@ -297,13 +297,15 @@ static BOOL unescape(WCHAR *str) default: if(isdigitW(*p)) { c = *p++ - '0'; - while(isdigitW(*p)) - c = c*10 + (*p++ - '0'); - *pd++ = c; - continue; + if(isdigitW(*p)) { + c = c*8 + (*p++ - '0'); + if(isdigitW(*p)) + c = c*8 + (*p++ - '0'); + } + p--; } - - c = *p; + else + c = *p; } *pd++ = c; diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index ea1a5b2..be85566 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -66,6 +66,8 @@ tmp = escape("a1b c!d+e(a)*-_+./,"); ok(tmp === "a1b%20c%21d+e(a)*-_+./%2C", "escape('a1b c!d+e(a)*-_+./,') = " + tmp); tmp = escape(); ok(tmp === "undefined", "escape() = " + tmp); +tmp = escape('\u1234\123\xf3'); +ok(tmp == "%u1234S%F3", "escape('\u1234\123\xf3') = " + tmp); tmp = unescape("abc"); ok(tmp === "abc", "unescape('abc') = " + tmp); @@ -201,6 +203,12 @@ tmp = "abc".charCodeAt(true); ok(tmp === 0x62, "'abc'.charCodeAt(true) = " + tmp); tmp = "abc".charCodeAt(0,2); ok(tmp === 0x61, "'abc'.charCodeAt(0,2) = " + tmp); +tmp = "\u49F4".charCodeAt(0); +ok(tmp === 0x49F4, "'\u49F4'.charCodeAt(0) = " + tmp); +tmp = "\052".charCodeAt(0); +ok(tmp === 0x2A, "'\052'.charCodeAt(0) = " + tmp); +tmp = "\xa2".charCodeAt(0); +ok(tmp === 0xA2, "'\xa2'.charCodeAt(0) = " + tmp); tmp = "abcd".substring(1,3); ok(tmp === "bc", "'abcd'.substring(1,3) = " + tmp);
1
0
0
0
Piotr Caban : jscript: Fix implementation of Global.escape.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 38dbc74a0afc1379c1f3766f9153557808334a8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38dbc74a0afc1379c1f3766f9…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Oct 7 22:11:43 2009 +0200 jscript: Fix implementation of Global.escape. --- dlls/jscript/global.c | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 5fd8114..ef86f26 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -301,8 +301,7 @@ static HRESULT JSGlobal_escape(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D { BSTR ret, str; const WCHAR *ptr; - DWORD len = 0, i, size; - char buf[4]; + DWORD len = 0; HRESULT hres; TRACE("\n"); @@ -325,17 +324,13 @@ static HRESULT JSGlobal_escape(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D return hres; for(ptr=str; *ptr; ptr++) { - if(isalnumW(*ptr) || *ptr=='*' || *ptr=='@' || *ptr=='-' || *ptr=='_' - || *ptr=='+' || *ptr=='.' || *ptr=='/') + if(*ptr > 0xff) + len += 6; + else if(isalnum((char)*ptr) || *ptr=='*' || *ptr=='@' || *ptr=='-' + || *ptr=='_' || *ptr=='+' || *ptr=='.' || *ptr=='/') len++; - else { - size = WideCharToMultiByte(CP_UTF8, 0, ptr, 1, NULL, 0, NULL, NULL)*3; - if(!size) { - FIXME("throw Error\n"); - return E_FAIL; - } - len += size; - } + else + len += 3; } ret = SysAllocStringLen(NULL, len); @@ -344,16 +339,21 @@ static HRESULT JSGlobal_escape(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D len = 0; for(ptr=str; *ptr; ptr++) { - if(isalnumW(*ptr) || *ptr=='*' || *ptr=='@' || *ptr=='-' || *ptr=='_' - || *ptr=='+' || *ptr=='.' || *ptr=='/') + if(*ptr > 0xff) { + ret[len++] = '%'; + ret[len++] = 'u'; + ret[len++] = int_to_char(*ptr >> 12); + ret[len++] = int_to_char((*ptr >> 8) & 0xf); + ret[len++] = int_to_char((*ptr >> 4) & 0xf); + ret[len++] = int_to_char(*ptr & 0xf); + } + else if(isalnum((char)*ptr) || *ptr=='*' || *ptr=='@' || *ptr=='-' + || *ptr=='_' || *ptr=='+' || *ptr=='.' || *ptr=='/') ret[len++] = *ptr; else { - size = WideCharToMultiByte(CP_UTF8, 0, ptr, 1, buf, sizeof(buf), NULL, NULL); - for(i=0; i<size; i++) { - ret[len++] = '%'; - ret[len++] = int_to_char(buf[i] >> 4); - ret[len++] = int_to_char(buf[i] & 0xf); - } + ret[len++] = '%'; + ret[len++] = int_to_char(*ptr >> 4); + ret[len++] = int_to_char(*ptr & 0xf); } }
1
0
0
0
Piotr Caban : jscript: Added Date.toGMTString implementation.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: adc2a5697b745c49ea33a14721f2c5dc1172c408 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adc2a5697b745c49ea33a1472…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Oct 7 22:11:38 2009 +0200 jscript: Added Date.toGMTString implementation. --- dlls/jscript/date.c | 19 ++++++++++++------- dlls/jscript/tests/api.js | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index c753587..f8d3522 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -675,9 +675,8 @@ static HRESULT Date_valueOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP return S_OK; } -/* ECMA-262 3rd Edition 15.9.5.42 */ -static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, - VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) +static inline HRESULT create_utc_string(script_ctx_t *ctx, vdisp_t *jsthis, + VARIANT *retv, jsexcept_t *ei) { static const WCHAR NaNW[] = { 'N','a','N',0 }; static const WCHAR formatADW[] = { '%','s',',',' ','%','d',' ','%','s',' ','%','d',' ', @@ -702,8 +701,6 @@ static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, int len, size, year, day; DWORD lcid_en, week_id, month_id; - TRACE("\n"); - if(!(date = date_this(jsthis))) return throw_type_error(ctx, ei, IDS_NOT_DATE, NULL); @@ -781,11 +778,19 @@ static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, return S_OK; } +/* ECMA-262 3rd Edition 15.9.5.42 */ +static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, + VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) +{ + TRACE("\n"); + return create_utc_string(ctx, jsthis, retv, ei); +} + static HRESULT Date_toGMTString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + return create_utc_string(ctx, jsthis, retv, ei); } /* ECMA-262 3rd Edition 15.9.5.3 */ diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 268820c..ea1a5b2 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1874,6 +1874,7 @@ testFunctions(Date.prototype, [ ["toString", 0], ["toTimeString", 0], ["toUTCString", 0], + ["toGMTString", 0], ["valueOf", 0] ]);
1
0
0
0
Stefan Dösinger : wined3d: Don' t reserve clipping constants needlessly.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 8a68f418dbea0967003818e5bbac10e5ffc22512 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a68f418dbea0967003818e5b…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Oct 6 20:59:44 2009 +0200 wined3d: Don't reserve clipping constants needlessly. --- dlls/wined3d/arb_program_shader.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 691792d..39bd0b5 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -648,8 +648,15 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s if(reg_maps->constf[idx] & (1 << shift)) highest_constf = i; } - clip_limit = GL_LIMITS(clipplanes); - if(ctx->target_version == ARB) clip_limit = min(clip_limit, 4); + if(use_nv_clip(gl_info) && ctx->target_version >= NV2) + { + clip_limit = GL_LIMITS(clipplanes); + } + else + { + unsigned int mask = ctx->cur_vs_args->boolclip.clipplane_mask; + clip_limit = min(count_bits(mask), 4); + } *num_clipplanes = min(clip_limit, max_constantsF - highest_constf - 1); max_constantsF -= *num_clipplanes; if(*num_clipplanes < clip_limit)
1
0
0
0
← Newer
1
...
87
88
89
90
91
92
93
...
121
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200