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
March 2013
----- 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
2 participants
531 discussions
Start a n
N
ew thread
Daniel Jelinski : comctl32/listview: Fix custom draw prepaint handling.
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 704412b459cfafada2a04fa2f62be149e5597537 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=704412b459cfafada2a04fa2f…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Sun Mar 3 15:22:43 2013 +0100 comctl32/listview: Fix custom draw prepaint handling. --- dlls/comctl32/listview.c | 14 +------------- dlls/comctl32/tests/listview.c | 5 ++++- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 9f4305a..4ae974e 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -5037,7 +5037,7 @@ static void LISTVIEW_RefreshList(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, D */ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcErase) { - COLORREF oldTextColor = 0, oldBkColor = 0, oldClrTextBk, oldClrText; + COLORREF oldTextColor = 0, oldBkColor = 0; NMLVCUSTOMDRAW nmlvcd; HFONT hOldFont = 0; DWORD cdmode; @@ -5094,21 +5094,12 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra hdcOrig, infoPtr->rcList.left, infoPtr->rcList.top, SRCCOPY); } - /* FIXME: Shouldn't need to do this */ - oldClrTextBk = infoPtr->clrTextBk; - oldClrText = infoPtr->clrText; - infoPtr->cditemmode = CDRF_DODEFAULT; GetClientRect(infoPtr->hwndSelf, &rcClient); customdraw_fill(&nmlvcd, infoPtr, hdc, &rcClient, 0); cdmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd); if (cdmode & CDRF_SKIPDEFAULT) goto enddraw; - prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE); - - /* Use these colors to draw the items */ - infoPtr->clrTextBk = nmlvcd.clrTextBk; - infoPtr->clrText = nmlvcd.clrText; /* nothing to draw */ if(infoPtr->nItemCount == 0) goto enddraw; @@ -5157,9 +5148,6 @@ enddraw: if (cdmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); - infoPtr->clrTextBk = oldClrTextBk; - infoPtr->clrText = oldClrText; - if(hbmp) { BitBlt(hdcOrig, infoPtr->rcList.left, infoPtr->rcList.top, infoPtr->rcList.right - infoPtr->rcList.left, diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index fef3f60..1147c0b 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1765,7 +1765,10 @@ static LRESULT WINAPI cd_wndproc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) return CDRF_NOTIFYSUBITEMDRAW; case CDDS_ITEMPREPAINT | CDDS_SUBITEM: clr = GetBkColor(nmlvcd->nmcd.hdc); - todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr); + if (nmlvcd->iSubItem) + todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr); + else + ok(clr == c0ffee, "clr=%.8x\n", clr); return CDRF_NOTIFYPOSTPAINT; case CDDS_ITEMPOSTPAINT | CDDS_SUBITEM: clr = GetBkColor(nmlvcd->nmcd.hdc);
1
0
0
0
Daniel Jelinski : comctl32/listview: Fix font handling in custom draw.
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 0ee1df5926110cfd17c7b938fcefcdaace388302 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ee1df5926110cfd17c7b938f…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Sat Mar 2 23:12:00 2013 +0100 comctl32/listview: Fix font handling in custom draw. --- dlls/comctl32/listview.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 2dc0a95..9f4305a 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4577,7 +4577,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS NMLVCUSTOMDRAW nmlvcd; HIMAGELIST himl; LVITEMW lvItem; - HFONT hOldFont; TRACE("(hdc=%p, nItem=%d, nSubItem=%d, pos=%s)\n", hdc, nItem, nSubItem, wine_dbgstr_point(&pos)); @@ -4615,7 +4614,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS /* fill in the custom draw structure */ customdraw_fill(&nmlvcd, infoPtr, hdc, &rcBox, &lvItem); - hOldFont = GetCurrentObject(hdc, OBJ_FONT); if (nSubItem > 0) cdmode = infoPtr->cditemmode; if (cdmode & CDRF_SKIPDEFAULT) goto postpaint; if (cdmode & CDRF_NOTIFYITEMDRAW) @@ -4741,8 +4739,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS postpaint: if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); - if (cdsubitemmode & CDRF_NEWFONT) - SelectObject(hdc, hOldFont); return TRUE; } @@ -4869,6 +4865,7 @@ static void LISTVIEW_RefreshReport(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, /* iterate through the invalidated rows */ while(iterator_next(i)) { + SelectObject(hdc, infoPtr->hFont); LISTVIEW_GetItemOrigin(infoPtr, i->nItem, &Position); Position.y += Origin.y; @@ -5016,6 +5013,7 @@ static void LISTVIEW_RefreshList(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, D while(iterator_prev(i)) { + SelectObject(hdc, infoPtr->hFont); LISTVIEW_GetItemOrigin(infoPtr, i->nItem, &Position); Position.x += Origin.x; Position.y += Origin.y; @@ -5342,6 +5340,7 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP POINT pos; HDC hdc, hdcOrig; HBITMAP hbmp, hOldbmp; + HFONT hOldFont; HIMAGELIST dragList = 0; TRACE("iItem=%d Count=%d\n", iItem, infoPtr->nItemCount); @@ -5362,6 +5361,7 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP hdc = CreateCompatibleDC(hdcOrig); hbmp = CreateCompatibleBitmap(hdcOrig, size.cx, size.cy); hOldbmp = SelectObject(hdc, hbmp); + hOldFont = SelectObject(hdc, infoPtr->hFont); rcItem.left = rcItem.top = 0; rcItem.right = size.cx; @@ -5378,6 +5378,7 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP else SelectObject(hdc, hOldbmp); + SelectObject(hdc, hOldFont); DeleteObject(hbmp); DeleteDC(hdc); ReleaseDC(infoPtr->hwndSelf, hdcOrig);
1
0
0
0
Daniel Jelinski : comctl32/imagelist: Fixed merging of images without mask.
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 634d190478846c0224e799a740045a77c91f76f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=634d190478846c0224e799a74…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Fri Mar 1 19:48:08 2013 +0100 comctl32/imagelist: Fixed merging of images without mask. --- dlls/comctl32/imagelist.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 54d864e..03c359f 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -2134,8 +2134,13 @@ ImageList_Merge (HIMAGELIST himl1, INT i1, HIMAGELIST himl2, INT i2, BitBlt (himlDst->hdcImage, xOff1, yOff1, himl1->cx, himl1->cy, himl1->hdcImage, pt1.x, pt1.y, SRCCOPY); if (i2 >= 0 && i2 < himl2->cCurImage) { - BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcMask , pt2.x, pt2.y, SRCAND); - BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCPAINT); + if (himl2->flags & ILC_MASK) + { + BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcMask , pt2.x, pt2.y, SRCAND); + BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCPAINT); + } + else + BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCCOPY); } /* copy mask */
1
0
0
0
Alexandre Julliard : gdi32: Increment the face refcount when loading the same font file multiple times .
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 591a31ba67ba1fcf8baea702b6460868ab3522e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=591a31ba67ba1fcf8baea702b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 4 11:35:50 2013 +0100 gdi32: Increment the face refcount when loading the same font file multiple times. --- dlls/gdi32/freetype.c | 7 +++++++ dlls/gdi32/tests/font.c | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 5b10d0d..a452fa0 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1304,6 +1304,13 @@ static BOOL insert_face_in_family_list( Face *face, Family *family ) debugstr_w(family->FamilyName), debugstr_w(face->StyleName), cursor->font_version, face->font_version); + if (face->file && face->dev == cursor->dev && face->ino == cursor->ino) + { + cursor->refcount++; + TRACE("Font %s already in list, refcount now %d\n", + debugstr_w(face->file), cursor->refcount); + return FALSE; + } if (face->font_version <= cursor->font_version) { TRACE("Original font %s is newer so skipping %s\n", diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index b72a423..aa94dea 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4567,6 +4567,7 @@ static void test_CreateScalableFontResource(void) char fot_name[MAX_PATH]; char *file_part; DWORD ret; + int i; if (!pAddFontResourceExA || !pRemoveFontResourceExA) { @@ -4655,6 +4656,22 @@ static void test_CreateScalableFontResource(void) ret = pRemoveFontResourceExA(fot_name, 0, 0); ok(!ret, "RemoveFontResourceEx() should fail\n"); + /* test refcounting */ + for (i = 0; i < 5; i++) + { + SetLastError(0xdeadbeef); + ret = pAddFontResourceExA(fot_name, 0, 0); + ok(ret, "AddFontResourceEx() error %d\n", GetLastError()); + } + for (i = 0; i < 5; i++) + { + SetLastError(0xdeadbeef); + ret = pRemoveFontResourceExA(fot_name, 0, 0); + ok(ret, "RemoveFontResourceEx() error %d\n", GetLastError()); + } + ret = pRemoveFontResourceExA(fot_name, 0, 0); + ok(!ret, "RemoveFontResourceEx() should fail\n"); + DeleteFile(fot_name); /* test hidden font resource */
1
0
0
0
Alexandre Julliard : gdi32: Store the font stat information when loading it .
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 93c1389b7c134c0377b6ba7648cc5c574c9eb585 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93c1389b7c134c0377b6ba764…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 4 11:35:28 2013 +0100 gdi32: Store the font stat information when loading it. --- dlls/gdi32/freetype.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index d7cc777..5b10d0d 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -263,6 +263,8 @@ typedef struct tagFace { WCHAR *StyleName; WCHAR *FullName; WCHAR *file; + dev_t dev; + ino_t ino; void *font_data_ptr; DWORD font_data_size; FT_Long face_index; @@ -1761,6 +1763,7 @@ static inline void get_fontsig( FT_Face ft_face, FONTSIGNATURE *fs ) static Face *create_face( FT_Face ft_face, FT_Long face_index, const char *file, void *font_data_ptr, DWORD font_data_size, DWORD flags ) { + struct stat st; Face *face = HeapAlloc( GetProcessHeap(), 0, sizeof(*face) ); My_FT_Bitmap_Size *size = (My_FT_Bitmap_Size *)ft_face->available_sizes; @@ -1779,11 +1782,18 @@ static Face *create_face( FT_Face ft_face, FT_Long face_index, const char *file, if (flags & ADDFONT_VERTICAL_FONT) face->FullName = prepend_at( face->FullName ); + face->dev = 0; + face->ino = 0; if (file) { face->file = towstr( CP_UNIXCP, file ); face->font_data_ptr = NULL; face->font_data_size = 0; + if (!stat( file, &st )) + { + face->dev = st.st_dev; + face->ino = st.st_ino; + } } else { @@ -1986,8 +1996,7 @@ static int remove_font_resource( const char *file, DWORD flags ) { Family *family, *family_next; Face *face, *face_next; - char *filename; - struct stat st, st2; + struct stat st; int count = 0; if (stat( file, &st ) == -1) return 0; @@ -1998,14 +2007,12 @@ static int remove_font_resource( const char *file, DWORD flags ) { if (!face->file) continue; if (LOWORD(face->flags) != LOWORD(flags)) continue; - filename = strWtoA( CP_UNIXCP, face->file ); - if (!stat( filename, &st2 ) && st.st_dev == st2.st_dev && st.st_ino == st2.st_ino) + if (st.st_dev == face->dev && st.st_ino == face->ino) { - TRACE( "removing matching face %s\n", debugstr_w(face->file) ); + TRACE( "removing matching face %s refcount %d\n", debugstr_w(face->file), face->refcount ); release_face( face ); count++; } - HeapFree( GetProcessHeap(), 0, filename ); } release_family( family ); }
1
0
0
0
Frédéric Delanoy : vbscript: Specify correct variable in memory allocation check (coverity).
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: d0d269ab7fd1fb424dc7e5007f730451553abc6d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0d269ab7fd1fb424dc7e5007…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Sun Mar 3 23:53:07 2013 +0100 vbscript: Specify correct variable in memory allocation check (coverity). --- dlls/vbscript/vbregexp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/vbscript/vbregexp.c b/dlls/vbscript/vbregexp.c index 02e63ab..f3fb874 100644 --- a/dlls/vbscript/vbregexp.c +++ b/dlls/vbscript/vbregexp.c @@ -314,7 +314,7 @@ static HRESULT create_sub_matches(DWORD pos, match_state_t *result, SubMatches * ret->result = result; if(result) { ret->match = heap_alloc((result->match_len+1) * sizeof(WCHAR)); - if(!ret) { + if(!ret->match) { heap_free(ret); return E_OUTOFMEMORY; }
1
0
0
0
Alexandre Julliard : vbscript: Tweak enum macros to avoid confusing winapi_extract.
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 1e7d7d098529da37bf64deea86caef08692bce9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e7d7d098529da37bf64deea8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Mar 4 11:19:50 2013 +0100 vbscript: Tweak enum macros to avoid confusing winapi_extract. --- dlls/vbscript/vbregexp.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/vbscript/vbregexp.c b/dlls/vbscript/vbregexp.c index 0aaa140..02e63ab 100644 --- a/dlls/vbscript/vbregexp.c +++ b/dlls/vbscript/vbregexp.c @@ -25,21 +25,21 @@ WINE_DEFAULT_DEBUG_CHANNEL(vbscript); #define REGEXP_TID_LIST \ - XDIID(RegExp2) \ - XDIID(Match2) \ - XDIID(MatchCollection2) \ + XDIID(RegExp2), \ + XDIID(Match2), \ + XDIID(MatchCollection2), \ XDIID(SubMatches) typedef enum { -#define XDIID(iface) iface ## _tid, -REGEXP_TID_LIST +#define XDIID(iface) iface ## _tid + REGEXP_TID_LIST, #undef XDIID REGEXP_LAST_tid } regexp_tid_t; static REFIID tid_ids[] = { -#define XDIID(iface) &IID_I ## iface, -REGEXP_TID_LIST +#define XDIID(iface) &IID_I ## iface + REGEXP_TID_LIST #undef XDIID };
1
0
0
0
Jacek Caban : jscript: Use jsstr_substr in jsregexp.c where possible.
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 20e85dd21b05436ee9393f0eac77231b69f13139 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20e85dd21b05436ee9393f0ea…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 4 10:57:24 2013 +0100 jscript: Use jsstr_substr in jsregexp.c where possible. --- dlls/jscript/jsregexp.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/jscript/jsregexp.c b/dlls/jscript/jsregexp.c index d291580..f9b9992 100644 --- a/dlls/jscript/jsregexp.c +++ b/dlls/jscript/jsregexp.c @@ -346,10 +346,10 @@ static HRESULT create_match_array(script_ctx_t *ctx, jsstr_t *input, return hres; for(i=0; i < result->paren_count; i++) { - if(result->parens[i].index == -1) - str = jsstr_empty(); + if(result->parens[i].index != -1) + str = jsstr_substr(input, result->parens[i].index, result->parens[i].length); else - str = jsstr_alloc_len(input->str+result->parens[i].index, result->parens[i].length); + str = jsstr_empty(); if(!str) { hres = E_OUTOFMEMORY; break; @@ -866,7 +866,7 @@ static HRESULT RegExpConstr_leftContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD case DISPATCH_PROPERTYGET: { jsstr_t *ret; - ret = jsstr_alloc_len(ctx->last_match->str, ctx->last_match_index); + ret = jsstr_substr(ctx->last_match, 0, ctx->last_match_index); if(!ret) return E_OUTOFMEMORY; @@ -892,7 +892,8 @@ static HRESULT RegExpConstr_rightContext(script_ctx_t *ctx, vdisp_t *jsthis, WOR case DISPATCH_PROPERTYGET: { jsstr_t *ret; - ret = jsstr_alloc(ctx->last_match->str+ctx->last_match_index+ctx->last_match_length); + ret = jsstr_substr(ctx->last_match, ctx->last_match_index+ctx->last_match_length, + jsstr_length(ctx->last_match) - ctx->last_match_index - ctx->last_match_length); if(!ret) return E_OUTOFMEMORY;
1
0
0
0
Jacek Caban : jscript: Added jsstr_substr helper and use it in String object implementation.
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 6e3895ad76835bede5b49426f3c5e37a73b61bb2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e3895ad76835bede5b49426f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 4 10:57:14 2013 +0100 jscript: Added jsstr_substr helper and use it in String object implementation. --- dlls/jscript/jsstr.h | 5 +++++ dlls/jscript/string.c | 27 +++++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/dlls/jscript/jsstr.h b/dlls/jscript/jsstr.h index 8ac7410..8883dcb 100644 --- a/dlls/jscript/jsstr.h +++ b/dlls/jscript/jsstr.h @@ -59,6 +59,11 @@ static inline BOOL jsstr_eq(jsstr_t *str1, jsstr_t *str2) return len == jsstr_length(str2) && !memcmp(str1->str, str2->str, len*sizeof(WCHAR)); } +static inline jsstr_t *jsstr_substr(jsstr_t *str, unsigned off, unsigned len) +{ + return jsstr_alloc_len(str->str+off, len); +} + int jsstr_cmp(jsstr_t*,jsstr_t*) DECLSPEC_HIDDEN; jsstr_t *jsstr_concat(jsstr_t*,jsstr_t*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index e607754..70be13a 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -276,7 +276,7 @@ static HRESULT String_charAt(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, uns } if(0 <= pos && pos < jsstr_length(str)) { - ret = jsstr_alloc_len(str->str+pos, 1); + ret = jsstr_substr(str, pos, 1); if(!ret) return E_OUTOFMEMORY; }else { @@ -649,10 +649,10 @@ static HRESULT rep_call(script_ctx_t *ctx, jsdisp_t *func, if(SUCCEEDED(hres)) { for(i=0; i < match->paren_count; i++) { - if(match->parens[i].index == -1) - tmp_str = jsstr_empty(); + if(match->parens[i].index != -1) + tmp_str = jsstr_substr(str, match->parens[i].index, match->parens[i].length); else - tmp_str = jsstr_alloc_len(str->str+match->parens[i].index, match->parens[i].length); + tmp_str = jsstr_empty(); if(!tmp_str) { hres = E_OUTOFMEMORY; break; @@ -1016,7 +1016,7 @@ static HRESULT String_slice(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsi end = start; if(r) { - jsstr_t *retstr = jsstr_alloc_len(str->str+start, end-start); + jsstr_t *retstr = jsstr_substr(str, start, end-start); if(!retstr) { jsstr_release(str); return E_OUTOFMEMORY; @@ -1225,15 +1225,14 @@ static HRESULT String_substring(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, } if(r) { - jsstr_t *ret = jsstr_alloc_len(str->str+start, end-start); - if(!ret) { - jsstr_release(str); - return E_OUTOFMEMORY; - } - *r = jsval_string(ret); + jsstr_t *ret = jsstr_substr(str, start, end-start); + if(ret) + *r = jsval_string(ret); + else + hres = E_OUTOFMEMORY; } jsstr_release(str); - return S_OK; + return hres; } /* ECMA-262 3rd Edition B.2.3 */ @@ -1280,7 +1279,7 @@ static HRESULT String_substr(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, uns hres = S_OK; if(r) { - jsstr_t *ret = jsstr_alloc_len(str->str+start, len); + jsstr_t *ret = jsstr_substr(str, start, len); if(ret) *r = jsval_string(ret); else @@ -1426,7 +1425,7 @@ static HRESULT String_idx_get(jsdisp_t *jsdisp, unsigned idx, jsval_t *r) TRACE("%p[%u] = %s\n", string, idx, debugstr_wn(string->str->str+idx, 1)); - ret = jsstr_alloc_len(string->str->str+idx, 1); + ret = jsstr_substr(string->str, idx, 1); if(!ret) return E_OUTOFMEMORY;
1
0
0
0
Dmitry Timoshkov : gdiplus: GdipDrawString should not clip the string if StringFormatFlagsNoClip is specified .
by Alexandre Julliard
04 Mar '13
04 Mar '13
Module: wine Branch: master Commit: 9fb88c79994c8d5a1561ca446139bbf99386e68e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9fb88c79994c8d5a1561ca446…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Mar 4 17:52:24 2013 +0900 gdiplus: GdipDrawString should not clip the string if StringFormatFlagsNoClip is specified. --- dlls/gdiplus/graphics.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 806cfa9..a450ded 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4907,7 +4907,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string GpPointF pt[3], rectcpy[4]; POINT corners[4]; REAL rel_width, rel_height, margin_x; - INT save_state; + INT save_state, format_flags = 0; REAL offsety = 0.0; struct draw_string_args args; RectF scaled_rect; @@ -4932,6 +4932,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string if(format){ TRACE("may be ignoring some format flags: attr %x\n", format->attr); + format_flags = format->attr; + /* Should be no need to explicitly test for StringAlignmentNear as * that is default behavior if no alignment is passed. */ if(format->vertalign != StringAlignmentNear){ @@ -4985,7 +4987,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string if (scaled_rect.Width >= 1 << 23 || scaled_rect.Width < 0.5) scaled_rect.Width = 1 << 23; if (scaled_rect.Height >= 1 << 23 || scaled_rect.Height < 0.5) scaled_rect.Height = 1 << 23; - if (scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23) + if (!(format_flags & StringFormatFlagsNoClip) && + scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23) { /* FIXME: If only the width or only the height is 0, we should probably still clip */ rgn = CreatePolygonRgn(corners, 4, ALTERNATE);
1
0
0
0
← Newer
1
...
45
46
47
48
49
50
51
...
54
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
Results per page:
10
25
50
100
200