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
March
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 2012
----- 2025 -----
March 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
960 discussions
Start a n
N
ew thread
Francois Gouget : testbot/lib: Automatically reconnect to the database.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: tools Branch: master Commit: e81915fade44523f693da35762847a521feea824 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=e81915fade44523f693da357…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Oct 26 18:18:28 2012 +0200 testbot/lib: Automatically reconnect to the database. This way short idle timeouts don't break WineTestBot. --- testbot/lib/ObjectModel/DBIBackEnd.pm | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/testbot/lib/ObjectModel/DBIBackEnd.pm b/testbot/lib/ObjectModel/DBIBackEnd.pm index 5e61eed..72ff3c5 100644 --- a/testbot/lib/ObjectModel/DBIBackEnd.pm +++ b/testbot/lib/ObjectModel/DBIBackEnd.pm @@ -43,7 +43,13 @@ sub GetDb { my $self = shift; - if (! defined($self->{Db})) + if (defined $self->{Db} && !$self->{Db}->ping()) + { + # This connection no longer works, probably due to the database idle timeout + $self->{Db}->disconnect(); + $self->{Db} = undef; + } + if (!defined $self->{Db}) { $self->{Db} = DBI->connect(@{$self->{ConnectArgs}}); }
1
0
0
0
Dmitry Timoshkov : gdiplus: GdipGetLogFont should use device scale and transform when appropriate.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 84ea75f1c69df802c8e37e79a59a3819fc1748d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84ea75f1c69df802c8e37e79a…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Oct 24 18:11:29 2012 +0900 gdiplus: GdipGetLogFont should use device scale and transform when appropriate. --- dlls/gdiplus/font.c | 30 +++++++++++++++++++++++++----- dlls/gdiplus/tests/font.c | 21 +++++++-------------- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 6588f12..f6a5d1c 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -454,18 +454,22 @@ GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics, */ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW *lf) { - REAL height; + REAL angle, rel_height, height; + GpMatrix *matrix; + GpPointF pt[3]; TRACE("(%p, %p, %p)\n", font, graphics, lf); if (!font || !graphics || !lf) return InvalidParameter; + GdipCloneMatrix(graphics->worldtrans, &matrix); + if (font->unit == UnitPixel) { height = units_to_pixels(font->emSize, graphics->unit, graphics->yres); if (graphics->unit != UnitDisplay) - height *= graphics->scale; + GdipScaleMatrix(matrix, graphics->scale, graphics->scale, MatrixOrderAppend); } else { @@ -475,10 +479,26 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW height = units_to_pixels(font->emSize, font->unit, graphics->yres); } - lf->lfHeight = -(height + 0.5); + pt[0].X = 0.0; + pt[0].Y = 0.0; + pt[1].X = 1.0; + pt[1].Y = 0.0; + pt[2].X = 0.0; + pt[2].Y = 1.0; + GdipTransformMatrixPoints(matrix, pt, 3); + angle = -gdiplus_atan2((pt[1].Y - pt[0].Y), (pt[1].X - pt[0].X)); + rel_height = sqrt((pt[2].Y - pt[0].Y) * (pt[2].Y - pt[0].Y)+ + (pt[2].X - pt[0].X) * (pt[2].X - pt[0].X)); + GdipDeleteMatrix(matrix); + + lf->lfHeight = -gdip_round(height * rel_height); lf->lfWidth = 0; - lf->lfEscapement = 0; - lf->lfOrientation = 0; + lf->lfEscapement = lf->lfOrientation = gdip_round((angle / M_PI) * 1800.0); + if (lf->lfEscapement < 0) + { + lf->lfEscapement += 3600; + lf->lfOrientation += 3600; + } lf->lfWeight = font->otm.otmTextMetrics.tmWeight; lf->lfItalic = font->otm.otmTextMetrics.tmItalic ? 1 : 0; lf->lfUnderline = font->otm.otmTextMetrics.tmUnderlined ? 1 : 0; diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index fade7d3..de6d657 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -26,6 +26,7 @@ #include "wine/test.h" #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) +#define expect_(expected, got, precision) ok(abs((expected) - (got)) <= (precision), "Expected %d, got %d\n", (expected), (got)) #define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got)) #define expectf(expected, got) expectf_((expected), (got), 0.001) @@ -904,7 +905,6 @@ todo_wine expect(Ok, status); status = GdipGetLogFontA(font, graphics, &lf); expect(Ok, status); -todo_wine expect(-300, lf.lfHeight); expect(0, lf.lfWidth); expect(0, lf.lfEscapement); @@ -954,13 +954,10 @@ todo_wine expect(Ok, status); status = GdipGetLogFontA(font, graphics, &lf); expect(Ok, status); -todo_wine expect(-300, lf.lfHeight); expect(0, lf.lfWidth); -todo_wine - expect(3151, lf.lfEscapement); -todo_wine - expect(3151, lf.lfOrientation); + expect_(3151, lf.lfEscapement, 1); + expect_(3151, lf.lfOrientation, 1); status = GdipGetFontHeight(font, graphics, &height); expect(Ok, status); expectf(120.703125, height); @@ -1010,10 +1007,8 @@ todo_wine todo_wine expect(1032, lf.lfHeight); expect(0, lf.lfWidth); -todo_wine - expect(3099, lf.lfEscapement); -todo_wine - expect(3099, lf.lfOrientation); + expect_(3099, lf.lfEscapement, 1); + expect_(3099, lf.lfOrientation, 1); status = GdipGetFontHeight(font, graphics, &height); expect(Ok, status); expectf(120.703125, height); @@ -1063,10 +1058,8 @@ todo_wine todo_wine expect(1032, lf.lfHeight); expect(0, lf.lfWidth); -todo_wine - expect(3099, lf.lfEscapement); -todo_wine - expect(3099, lf.lfOrientation); + expect_(3099, lf.lfEscapement, 1); + expect_(3099, lf.lfOrientation, 1); status = GdipGetFontHeight(font, graphics, &height); expect(Ok, status); expectf(120.703125, height);
1
0
0
0
Dmitry Timoshkov : gdiplus: Move internal helper get_log_fontW() out of public GdipGetLogFontW() export.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 71eb1644821bb2707c5d6ccf3a14436ddb91410e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71eb1644821bb2707c5d6ccf3…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Oct 24 18:10:30 2012 +0900 gdiplus: Move internal helper get_log_fontW() out of public GdipGetLogFontW() export. --- dlls/gdiplus/font.c | 25 ++++++++++--------------- dlls/gdiplus/graphics.c | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index e4f979c..6588f12 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -449,10 +449,18 @@ GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics, return Ok; } -void get_log_fontW(const GpFont *font, GpGraphics *graphics, LOGFONTW *lf) +/******************************************************************************* + * GdipGetLogFontW [GDIPLUS.@] + */ +GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW *lf) { REAL height; + TRACE("(%p, %p, %p)\n", font, graphics, lf); + + if (!font || !graphics || !lf) + return InvalidParameter; + if (font->unit == UnitPixel) { height = units_to_pixels(font->emSize, graphics->unit, graphics->yres); @@ -481,21 +489,8 @@ void get_log_fontW(const GpFont *font, GpGraphics *graphics, LOGFONTW *lf) lf->lfQuality = DEFAULT_QUALITY; lf->lfPitchAndFamily = 0; strcpyW(lf->lfFaceName, font->family->FamilyName); -} - -/******************************************************************************* - * GdipGetLogFontW [GDIPLUS.@] - */ -GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, - LOGFONTW *lfw) -{ - TRACE("(%p, %p, %p)\n", font, graphics, lfw); - - if(!font || !graphics || !lfw) - return InvalidParameter; - get_log_fontW(font, graphics, lfw); - TRACE("=> %s,%d\n", debugstr_w(lfw->lfFaceName), lfw->lfHeight); + TRACE("=> %s,%d\n", debugstr_w(lf->lfFaceName), lf->lfHeight); return Ok; } diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index b2ebf40..726885b 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2133,6 +2133,38 @@ end: return stat; } +void get_log_fontW(const GpFont *font, GpGraphics *graphics, LOGFONTW *lf) +{ + REAL height; + + if (font->unit == UnitPixel) + { + height = units_to_pixels(font->emSize, graphics->unit, graphics->yres); + } + else + { + if (graphics->unit == UnitDisplay || graphics->unit == UnitPixel) + height = units_to_pixels(font->emSize, font->unit, graphics->xres); + else + height = units_to_pixels(font->emSize, font->unit, graphics->yres); + } + + lf->lfHeight = -(height + 0.5); + lf->lfWidth = 0; + lf->lfEscapement = 0; + lf->lfOrientation = 0; + lf->lfWeight = font->otm.otmTextMetrics.tmWeight; + lf->lfItalic = font->otm.otmTextMetrics.tmItalic ? 1 : 0; + lf->lfUnderline = font->otm.otmTextMetrics.tmUnderlined ? 1 : 0; + lf->lfStrikeOut = font->otm.otmTextMetrics.tmStruckOut ? 1 : 0; + lf->lfCharSet = font->otm.otmTextMetrics.tmCharSet; + lf->lfOutPrecision = OUT_DEFAULT_PRECIS; + lf->lfClipPrecision = CLIP_DEFAULT_PRECIS; + lf->lfQuality = DEFAULT_QUALITY; + lf->lfPitchAndFamily = 0; + strcpyW(lf->lfFaceName, font->family->FamilyName); +} + static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, GDIPCONST GpStringFormat *format, HFONT *hfont) { @@ -2153,8 +2185,6 @@ static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, unit_scale = units_scale(font->unit, graphics->unit, res); font_height = font->emSize * unit_scale; - if (graphics->unit != UnitDisplay) - font_height /= graphics->scale; } pt[0].X = 0.0;
1
0
0
0
Frédéric Delanoy : cmd: Display a clearer error message for not found commands.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 16d5f457e202c9da88a7124d745006c83ce4c703 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16d5f457e202c9da88a7124d7…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Oct 26 13:47:52 2012 +0200 cmd: Display a clearer error message for not found commands. --- po/ar.po | 5 +++++ po/bg.po | 5 +++++ po/ca.po | 5 +++++ po/cs.po | 5 +++++ po/da.po | 5 +++++ po/de.po | 5 +++++ po/el.po | 5 +++++ po/en.po | 6 ++++++ po/en_US.po | 6 ++++++ po/eo.po | 5 +++++ po/es.po | 5 +++++ po/fa.po | 5 +++++ po/fi.po | 5 +++++ po/fr.po | 5 +++++ po/he.po | 5 +++++ po/hi.po | 5 +++++ po/hu.po | 5 +++++ po/it.po | 5 +++++ po/ja.po | 5 +++++ po/ko.po | 5 +++++ po/lt.po | 5 +++++ po/ml.po | 5 +++++ po/nb_NO.po | 5 +++++ po/nl.po | 5 +++++ po/or.po | 5 +++++ po/pa.po | 5 +++++ po/pl.po | 5 +++++ po/pt_BR.po | 5 +++++ po/pt_PT.po | 5 +++++ po/rm.po | 5 +++++ po/ro.po | 5 +++++ po/ru.po | 5 +++++ po/sk.po | 5 +++++ po/sl.po | 5 +++++ po/sr_RS(a)cyrillic.po | 5 +++++ po/sr_RS(a)latin.po | 5 +++++ po/sv.po | 5 +++++ po/te.po | 5 +++++ po/th.po | 5 +++++ po/tr.po | 5 +++++ po/uk.po | 5 +++++ po/wa.po | 5 +++++ po/wine.pot | 5 +++++ po/zh_CN.po | 5 +++++ po/zh_TW.po | 5 +++++ programs/cmd/cmd.rc | 1 + programs/cmd/wcmd.h | 1 + programs/cmd/wcmdmain.c | 3 +-- 48 files changed, 230 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=16d5f457e202c9da88a71…
1
0
0
0
Huw Davies : gdi32: Use a symbol charmap if all else fails.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 7cd8dc6bf2b0d81338db9a6d13669b2f31da33d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7cd8dc6bf2b0d81338db9a6d1…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 26 14:04:05 2012 +0100 gdi32: Use a symbol charmap if all else fails. --- dlls/gdi32/freetype.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index c62070f..6af977c 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -4410,7 +4410,7 @@ static BOOL freetype_DeleteDC( PHYSDEV dev ) static FT_Encoding pick_charmap( FT_Face face, int charset ) { - static const FT_Encoding regular_order[] = { FT_ENCODING_UNICODE, FT_ENCODING_APPLE_ROMAN, 0 }; + static const FT_Encoding regular_order[] = { FT_ENCODING_UNICODE, FT_ENCODING_APPLE_ROMAN, FT_ENCODING_MS_SYMBOL, 0 }; static const FT_Encoding symbol_order[] = { FT_ENCODING_MS_SYMBOL, FT_ENCODING_UNICODE, FT_ENCODING_APPLE_ROMAN, 0 }; const FT_Encoding *encs = regular_order;
1
0
0
0
Huw Davies : gdi32: Simplify the code for charmap selection.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 8ef70039d366bf45900c7e7999767be2ccf9704c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ef70039d366bf45900c7e799…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 26 14:04:04 2012 +0100 gdi32: Simplify the code for charmap selection. --- dlls/gdi32/freetype.c | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 81ba8a3..c62070f 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -4408,6 +4408,21 @@ static BOOL freetype_DeleteDC( PHYSDEV dev ) return TRUE; } +static FT_Encoding pick_charmap( FT_Face face, int charset ) +{ + static const FT_Encoding regular_order[] = { FT_ENCODING_UNICODE, FT_ENCODING_APPLE_ROMAN, 0 }; + static const FT_Encoding symbol_order[] = { FT_ENCODING_MS_SYMBOL, FT_ENCODING_UNICODE, FT_ENCODING_APPLE_ROMAN, 0 }; + const FT_Encoding *encs = regular_order; + + if (charset == SYMBOL_CHARSET) encs = symbol_order; + + while (*encs != 0) + { + if (select_charmap( face, *encs )) break; + encs++; + } + return *encs; +} /************************************************************* * freetype_SelectFont @@ -4824,16 +4839,7 @@ found_face: ret->ntmFlags = face->ntmFlags; - if (ret->charset == SYMBOL_CHARSET && - select_charmap(ret->ft_face, FT_ENCODING_MS_SYMBOL)) { - /* No ops */ - } - else if (select_charmap(ret->ft_face, FT_ENCODING_UNICODE)) { - /* No ops */ - } - else { - select_charmap(ret->ft_face, FT_ENCODING_APPLE_ROMAN); - } + pick_charmap( ret->ft_face, ret->charset ); ret->orientation = FT_IS_SCALABLE(ret->ft_face) ? lf.lfOrientation : 0; ret->name = psub ? strdupW(psub->from.name) : strdupW(family->FamilyName);
1
0
0
0
Jacek Caban : jscript: Optimize object refcount handling.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 79a30a4e0ae3a7ef640fa38e3a9f77e1e73cc576 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79a30a4e0ae3a7ef640fa38e3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 26 13:28:17 2012 +0200 jscript: Optimize object refcount handling. --- dlls/jscript/dispex.c | 78 ++++++++++++++++++++++++++++++------------------ dlls/jscript/jscript.h | 21 +++++++++++- 2 files changed, 68 insertions(+), 31 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 2a5225f..211ed8a 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -543,46 +543,23 @@ static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, return E_NOINTERFACE; } - IUnknown_AddRef((IUnknown*)*ppv); + jsdisp_addref(This); return S_OK; } static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) { jsdisp_t *This = impl_from_IDispatchEx(iface); - LONG ref = InterlockedIncrement(&This->ref); - - TRACE("(%p) ref=%d\n", This, ref); - - return ref; + jsdisp_addref(This); + return This->ref; } static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface) { jsdisp_t *This = impl_from_IDispatchEx(iface); - LONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p) ref=%d\n", This, ref); - - if(!ref) { - dispex_prop_t *prop; - - for(prop = This->props; prop < This->props+This->prop_cnt; prop++) { - if(prop->type == PROP_JSVAL) - jsval_release(prop->u.val); - heap_free(prop->name); - } - heap_free(This->props); - script_release(This->ctx); - if(This->prototype) - jsdisp_release(This->prototype); - - if(This->builtin_info->destructor) - This->builtin_info->destructor(This); - else - heap_free(This); - } - + ULONG ref = --This->ref; + if(!ref) + jsdisp_free(This); return ref; } @@ -931,6 +908,49 @@ HRESULT create_dispex(script_ctx_t *ctx, const builtin_info_t *builtin_info, jsd return S_OK; } +void jsdisp_free(jsdisp_t *obj) +{ + dispex_prop_t *prop; + + TRACE("(%p)\n", obj); + + for(prop = obj->props; prop < obj->props+obj->prop_cnt; prop++) { + if(prop->type == PROP_JSVAL) + jsval_release(prop->u.val); + heap_free(prop->name); + } + heap_free(obj->props); + script_release(obj->ctx); + if(obj->prototype) + jsdisp_release(obj->prototype); + + if(obj->builtin_info->destructor) + obj->builtin_info->destructor(obj); + else + heap_free(obj); +} + +#ifdef TRACE_REFCNT + +jsdisp_t *jsdisp_addref(jsdisp_t *jsdisp) +{ + ULONG ref = ++jsdisp->ref; + TRACE("(%p) ref=%d\n", jsdisp, ref); + return jsdisp; +} + +void jsdisp_release(jsdisp_t *jsdisp) +{ + ULONG ref = --jsdisp->ref; + + TRACE("(%p) ref=%d\n", jsdisp, ref); + + if(!ref) + jsdisp_free(jsdisp); +} + +#endif + HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr) { jsdisp_t *prot = NULL; diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 2630ff0..18ac1db 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -223,18 +223,35 @@ static inline IDispatch *to_disp(jsdisp_t *jsdisp) jsdisp_t *as_jsdisp(IDispatch*) DECLSPEC_HIDDEN; jsdisp_t *to_jsdisp(IDispatch*) DECLSPEC_HIDDEN; +void jsdisp_free(jsdisp_t*) DECLSPEC_HIDDEN; +#ifndef TRACE_REFCNT + +/* + * We do a lot of refcount calls during script execution, so having an inline + * version is a nice perf win. Define TRACE_REFCNT macro when debugging + * refcount bugs to have traces. Also, since jsdisp_t is not thread safe anyways, + * there is no point in using atomic operations. + */ static inline jsdisp_t *jsdisp_addref(jsdisp_t *jsdisp) { - IDispatchEx_AddRef(&jsdisp->IDispatchEx_iface); + jsdisp->ref++; return jsdisp; } static inline void jsdisp_release(jsdisp_t *jsdisp) { - IDispatchEx_Release(&jsdisp->IDispatchEx_iface); + if(!--jsdisp->ref) + jsdisp_free(jsdisp); } +#else + +jsdisp_t *jsdisp_addref(jsdisp_t*) DECLSPEC_HIDDEN; +void jsdisp_release(jsdisp_t*) DECLSPEC_HIDDEN; + +#endif + HRESULT create_dispex(script_ctx_t*,const builtin_info_t*,jsdisp_t*,jsdisp_t**) DECLSPEC_HIDDEN; HRESULT init_dispex(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*) DECLSPEC_HIDDEN; HRESULT init_dispex_from_constr(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*) DECLSPEC_HIDDEN;
1
0
0
0
Frédéric Delanoy : cmd: Add support for GTR comparison operator in if statements.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 90c6f57fa9d9c9caf1b469ae82ed13bccb9625ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90c6f57fa9d9c9caf1b469ae8…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Thu Oct 25 23:48:07 2012 +0200 cmd: Add support for GTR comparison operator in if statements. --- programs/cmd/builtins.c | 9 ++++++++ programs/cmd/tests/test_builtins.cmd.exp | 32 +++++++++++++++--------------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 112d678..855040e 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2360,6 +2360,7 @@ static int evaluate_if_comparison(const WCHAR *leftOperand, const WCHAR *operato static const WCHAR equW[] = {'e','q','u','\0'}; static const WCHAR neqW[] = {'n','e','q','\0'}; static const WCHAR geqW[] = {'g','e','q','\0'}; + static const WCHAR gtrW[] = {'g','t','r','\0'}; /* == is a special case, as it always compares strings */ if (!lstrcmpiW(operator, eqeqW)) @@ -2412,6 +2413,14 @@ static int evaluate_if_comparison(const WCHAR *leftOperand, const WCHAR *operato : lstrcmpW (leftOperand, rightOperand) >= 0; } + if (!lstrcmpiW(operator, gtrW)) { + if (int_operands) + return leftOperand_int > rightOperand_int; + else + return caseInsensitive ? lstrcmpiW(leftOperand, rightOperand) > 0 + : lstrcmpW (leftOperand, rightOperand) > 0; + } + return -1; } diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index c451c70..aeaa14d 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -522,16 +522,16 @@ B GEQ AA AB GEQ AA BA GEQ AA AA GEQ AA -@todo_wine@B GTR A -@todo_wine@AB GTR A -@todo_wine@BA GTR A -@todo_wine@AA GTR A -@todo_wine@BA GTR B -@todo_wine@B GTR AB -@todo_wine@BA GTR AB -@todo_wine@B GTR AA -@todo_wine@AB GTR AA -@todo_wine@BA GTR AA +B GTR A +AB GTR A +BA GTR A +AA GTR A +BA GTR B +B GTR AB +BA GTR AB +B GTR AA +AB GTR AA +BA GTR AA ------ for numbers negative numbers handled negative numbers handled @@ -586,12 +586,12 @@ string/hexa compare ok 10 GEQ 10 10 GEQ 9 9 GEQ 9 -@todo_wine@1 GTR 0 -@todo_wine@10 GTR 0 -@todo_wine@9 GTR 0 -@todo_wine@10 GTR 1 -@todo_wine@9 GTR 1 -@todo_wine@10 GTR 9 +1 GTR 0 +10 GTR 0 +9 GTR 0 +10 GTR 1 +9 GTR 1 +10 GTR 9 ------ for numbers and stringified numbers strings and integers not equal strings and integers not equal
1
0
0
0
Frédéric Delanoy : cmd: Add support for GEQ comparison operator in if statements.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 73995c71e05a7bd33784b0f994951d6fc3ca9c9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73995c71e05a7bd33784b0f99…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Thu Oct 25 23:48:06 2012 +0200 cmd: Add support for GEQ comparison operator in if statements. --- programs/cmd/builtins.c | 9 ++++ programs/cmd/tests/test_builtins.cmd.exp | 76 +++++++++++++++--------------- 2 files changed, 47 insertions(+), 38 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index e15c7c8..112d678 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2359,6 +2359,7 @@ static int evaluate_if_comparison(const WCHAR *leftOperand, const WCHAR *operato static const WCHAR leqW[] = {'l','e','q','\0'}; static const WCHAR equW[] = {'e','q','u','\0'}; static const WCHAR neqW[] = {'n','e','q','\0'}; + static const WCHAR geqW[] = {'g','e','q','\0'}; /* == is a special case, as it always compares strings */ if (!lstrcmpiW(operator, eqeqW)) @@ -2403,6 +2404,14 @@ static int evaluate_if_comparison(const WCHAR *leftOperand, const WCHAR *operato : lstrcmpW (leftOperand, rightOperand) != 0; } + if (!lstrcmpiW(operator, geqW)) { + if (int_operands) + return leftOperand_int >= rightOperand_int; + else + return caseInsensitive ? lstrcmpiW(leftOperand, rightOperand) >= 0 + : lstrcmpW (leftOperand, rightOperand) >= 0; + } + return -1; } diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 9adc016..c451c70 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -507,21 +507,21 @@ A NEQ AA B NEQ AA AB NEQ AA BA NEQ AA -@todo_wine@A GEQ A -@todo_wine@B GEQ A -@todo_wine@AB GEQ A -@todo_wine@BA GEQ A -@todo_wine@AA GEQ A -@todo_wine@B GEQ B -@todo_wine@BA GEQ B -@todo_wine@B GEQ AB -@todo_wine@AB GEQ AB -@todo_wine@BA GEQ AB -@todo_wine@BA GEQ BA -@todo_wine@B GEQ AA -@todo_wine@AB GEQ AA -@todo_wine@BA GEQ AA -@todo_wine@AA GEQ AA +A GEQ A +B GEQ A +AB GEQ A +BA GEQ A +AA GEQ A +B GEQ B +BA GEQ B +B GEQ AB +AB GEQ AB +BA GEQ AB +BA GEQ BA +B GEQ AA +AB GEQ AA +BA GEQ AA +AA GEQ AA @todo_wine@B GTR A @todo_wine@AB GTR A @todo_wine@BA GTR A @@ -576,16 +576,16 @@ string/hexa compare ok 0 NEQ 9 1 NEQ 9 10 NEQ 9 -@todo_wine@0 GEQ 0 -@todo_wine@1 GEQ 0 -@todo_wine@10 GEQ 0 -@todo_wine@9 GEQ 0 -@todo_wine@1 GEQ 1 -@todo_wine@10 GEQ 1 -@todo_wine@9 GEQ 1 -@todo_wine@10 GEQ 10 -@todo_wine@10 GEQ 9 -@todo_wine@9 GEQ 9 +0 GEQ 0 +1 GEQ 0 +10 GEQ 0 +9 GEQ 0 +1 GEQ 1 +10 GEQ 1 +9 GEQ 1 +10 GEQ 10 +10 GEQ 9 +9 GEQ 9 @todo_wine@1 GTR 0 @todo_wine@10 GTR 0 @todo_wine@9 GTR 0 @@ -596,19 +596,19 @@ string/hexa compare ok strings and integers not equal strings and integers not equal foo -@todo_wine@"10" GEQ "1" -@todo_wine@'1' GEQ 1@or_broken@NT4 -@todo_wine@1 GEQ "1" -@todo_wine@"1" GEQ "1" -@todo_wine@'1' GEQ "1" -@todo_wine@"10" GEQ "1" -@todo_wine@non NT4@or_broken@1 GEQ '1' -@todo_wine@'1' GEQ '1' -@todo_wine@foo -@todo_wine@1 GEQ "10" -@todo_wine@foo -@todo_wine@'1' GEQ "10" -@todo_wine@"10" GEQ "10" +"10" GEQ "1" +'1' GEQ 1@or_broken@NT4 +1 GEQ "1" +"1" GEQ "1" +'1' GEQ "1" +"10" GEQ "1" +non NT4@or_broken@1 GEQ '1' +'1' GEQ '1' +foo +1 GEQ "10" +foo +'1' GEQ "10" +"10" GEQ "10" ------------ Testing for ------------ --- plain FOR A
1
0
0
0
Frédéric Delanoy : cmd: Add support for NEQ comparison operator in if statements.
by Alexandre Julliard
26 Oct '12
26 Oct '12
Module: wine Branch: master Commit: 80f8d49b07e493a6753518ff5b07ab475fc4b0d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80f8d49b07e493a6753518ff5…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Thu Oct 25 23:48:05 2012 +0200 cmd: Add support for NEQ comparison operator in if statements. --- programs/cmd/builtins.c | 9 ++++ programs/cmd/tests/test_builtins.cmd.exp | 64 +++++++++++++++--------------- 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 3a8dfba..e15c7c8 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2358,6 +2358,7 @@ static int evaluate_if_comparison(const WCHAR *leftOperand, const WCHAR *operato static const WCHAR lssW[] = {'l','s','s','\0'}; static const WCHAR leqW[] = {'l','e','q','\0'}; static const WCHAR equW[] = {'e','q','u','\0'}; + static const WCHAR neqW[] = {'n','e','q','\0'}; /* == is a special case, as it always compares strings */ if (!lstrcmpiW(operator, eqeqW)) @@ -2394,6 +2395,14 @@ static int evaluate_if_comparison(const WCHAR *leftOperand, const WCHAR *operato : lstrcmpW (leftOperand, rightOperand) == 0; } + if (!lstrcmpiW(operator, neqW)) { + if (int_operands) + return leftOperand_int != rightOperand_int; + else + return caseInsensitive ? lstrcmpiW(leftOperand, rightOperand) != 0 + : lstrcmpW (leftOperand, rightOperand) != 0; + } + return -1; } diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 009473e..9adc016 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -487,26 +487,26 @@ AB EQU AB BA EQU BA AA EQU AA A EQU a insensitive -@todo_wine@B NEQ A -@todo_wine@AB NEQ A -@todo_wine@BA NEQ A -@todo_wine@AA NEQ A -@todo_wine@A NEQ B -@todo_wine@AB NEQ B -@todo_wine@BA NEQ B -@todo_wine@AA NEQ B -@todo_wine@A NEQ AB -@todo_wine@B NEQ AB -@todo_wine@BA NEQ AB -@todo_wine@AA NEQ AB -@todo_wine@A NEQ BA -@todo_wine@B NEQ BA -@todo_wine@AB NEQ BA -@todo_wine@AA NEQ BA -@todo_wine@A NEQ AA -@todo_wine@B NEQ AA -@todo_wine@AB NEQ AA -@todo_wine@BA NEQ AA +B NEQ A +AB NEQ A +BA NEQ A +AA NEQ A +A NEQ B +AB NEQ B +BA NEQ B +AA NEQ B +A NEQ AB +B NEQ AB +BA NEQ AB +AA NEQ AB +A NEQ BA +B NEQ BA +AB NEQ BA +AA NEQ BA +A NEQ AA +B NEQ AA +AB NEQ AA +BA NEQ AA @todo_wine@A GEQ A @todo_wine@B GEQ A @todo_wine@AB GEQ A @@ -564,18 +564,18 @@ octal ok hexa ok string/hexa compare ok string/hexa compare ok -@todo_wine@1 NEQ 0 -@todo_wine@10 NEQ 0 -@todo_wine@9 NEQ 0 -@todo_wine@0 NEQ 1 -@todo_wine@10 NEQ 1 -@todo_wine@9 NEQ 1 -@todo_wine@0 NEQ 10 -@todo_wine@1 NEQ 10 -@todo_wine@9 NEQ 10 -@todo_wine@0 NEQ 9 -@todo_wine@1 NEQ 9 -@todo_wine@10 NEQ 9 +1 NEQ 0 +10 NEQ 0 +9 NEQ 0 +0 NEQ 1 +10 NEQ 1 +9 NEQ 1 +0 NEQ 10 +1 NEQ 10 +9 NEQ 10 +0 NEQ 9 +1 NEQ 9 +10 NEQ 9 @todo_wine@0 GEQ 0 @todo_wine@1 GEQ 0 @todo_wine@10 GEQ 0
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
96
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
Results per page:
10
25
50
100
200