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
August 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
461 discussions
Start a n
N
ew thread
Huw Davies : gdi32/tests: Add an option to match metrics exactly.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: 18edb16aced749978ae533a7282f7f747d5fa05e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=18edb16aced749978ae533a72…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Aug 28 14:21:10 2013 +0100 gdi32/tests: Add an option to match metrics exactly. --- dlls/gdi32/tests/font.c | 37 +++++++++++++++++++------------------ 1 files changed, 19 insertions(+), 18 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 17891e3..513d33e 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -31,7 +31,7 @@ #include "wine/test.h" /* Do not allow more than 1 deviation here */ -#define match_off_by_1(a, b) (abs((a) - (b)) <= 1) +#define match_off_by_1(a, b, exact) (abs((a) - (b)) <= ((exact) ? 0 : 1)) #define near_match(a, b) (abs((a) - (b)) <= 6) #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) @@ -1575,9 +1575,9 @@ static void test_GetKerningPairs(void) uiRet = GetOutlineTextMetricsW(hdc, sizeof(otm), &otm); ok(uiRet == sizeof(otm), "GetOutlineTextMetricsW error %d\n", GetLastError()); - ok(match_off_by_1(kd[i].tmHeight, otm.otmTextMetrics.tmHeight), "expected %d, got %d\n", + ok(match_off_by_1(kd[i].tmHeight, otm.otmTextMetrics.tmHeight, FALSE), "expected %d, got %d\n", kd[i].tmHeight, otm.otmTextMetrics.tmHeight); - ok(match_off_by_1(kd[i].tmAscent, otm.otmTextMetrics.tmAscent), "expected %d, got %d\n", + ok(match_off_by_1(kd[i].tmAscent, otm.otmTextMetrics.tmAscent, FALSE), "expected %d, got %d\n", kd[i].tmAscent, otm.otmTextMetrics.tmAscent); ok(kd[i].tmDescent == otm.otmTextMetrics.tmDescent, "expected %d, got %d\n", kd[i].tmDescent, otm.otmTextMetrics.tmDescent); @@ -1668,6 +1668,7 @@ struct font_data const char face_name[LF_FACESIZE]; int requested_height; int weight, height, ascent, descent, int_leading, ext_leading, dpi; + BOOL exact; }; static void test_height( HDC hdc, const struct font_data *fd ) @@ -1700,9 +1701,9 @@ static void test_height( HDC hdc, const struct font_data *fd ) { trace("found font %s, height %d charset %x dpi %d\n", lf.lfFaceName, lf.lfHeight, lf.lfCharSet, fd[i].dpi); ok(tm.tmWeight == fd[i].weight, "%s(%d): tm.tmWeight %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmWeight, fd[i].weight); - ok(match_off_by_1(tm.tmHeight, fd[i].height), "%s(%d): tm.tmHeight %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmHeight, fd[i].height); - ok(match_off_by_1(tm.tmAscent, fd[i].ascent), "%s(%d): tm.tmAscent %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmAscent, fd[i].ascent); - ok(match_off_by_1(tm.tmDescent, fd[i].descent), "%s(%d): tm.tmDescent %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmDescent, fd[i].descent); + ok(match_off_by_1(tm.tmHeight, fd[i].height, fd[i].exact), "%s(%d): tm.tmHeight %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmHeight, fd[i].height); + ok(match_off_by_1(tm.tmAscent, fd[i].ascent, fd[i].exact), "%s(%d): tm.tmAscent %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmAscent, fd[i].ascent); + ok(match_off_by_1(tm.tmDescent, fd[i].descent, fd[i].exact), "%s(%d): tm.tmDescent %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmDescent, fd[i].descent); #if 0 /* FIXME: calculation of tmInternalLeading in Wine doesn't match what Windows does */ ok(tm.tmInternalLeading == fd[i].int_leading, "%s(%d): tm.tmInternalLeading %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmInternalLeading, fd[i].int_leading); #endif @@ -1718,17 +1719,17 @@ static void test_height_selection(void) { static const struct font_data tahoma[] = { - {"Tahoma", -12, FW_NORMAL, 14, 12, 2, 2, 0, 96 }, - {"Tahoma", -24, FW_NORMAL, 29, 24, 5, 5, 0, 96 }, - {"Tahoma", -48, FW_NORMAL, 58, 48, 10, 10, 0, 96 }, - {"Tahoma", -96, FW_NORMAL, 116, 96, 20, 20, 0, 96 }, - {"Tahoma", -192, FW_NORMAL, 232, 192, 40, 40, 0, 96 }, - {"Tahoma", 12, FW_NORMAL, 12, 10, 2, 2, 0, 96 }, - {"Tahoma", 24, FW_NORMAL, 24, 20, 4, 4, 0, 96 }, - {"Tahoma", 48, FW_NORMAL, 48, 40, 8, 8, 0, 96 }, - {"Tahoma", 96, FW_NORMAL, 96, 80, 16, 17, 0, 96 }, - {"Tahoma", 192, FW_NORMAL, 192, 159, 33, 33, 0, 96 }, - {"", 0, 0, 0, 0, 0, 0, 0, 0 } + {"Tahoma", -12, FW_NORMAL, 14, 12, 2, 2, 0, 96, TRUE }, + {"Tahoma", -24, FW_NORMAL, 29, 24, 5, 5, 0, 96, TRUE }, + {"Tahoma", -48, FW_NORMAL, 58, 48, 10, 10, 0, 96, TRUE }, + {"Tahoma", -96, FW_NORMAL, 116, 96, 20, 20, 0, 96, TRUE }, + {"Tahoma", -192, FW_NORMAL, 232, 192, 40, 40, 0, 96, TRUE }, + {"Tahoma", 12, FW_NORMAL, 12, 10, 2, 2, 0, 96, TRUE }, + {"Tahoma", 24, FW_NORMAL, 24, 20, 4, 4, 0, 96, FALSE }, + {"Tahoma", 48, FW_NORMAL, 48, 40, 8, 8, 0, 96, TRUE }, + {"Tahoma", 96, FW_NORMAL, 96, 80, 16, 17, 0, 96, FALSE }, + {"Tahoma", 192, FW_NORMAL, 192, 159, 33, 33, 0, 96, FALSE }, + {"", 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; HDC hdc = CreateCompatibleDC(0); assert(hdc); @@ -3966,7 +3967,7 @@ static void test_GetTextMetrics2(const char *fontname, int font_height) SelectObject(hdc, of); DeleteObject(hf); - if (match_off_by_1(tm.tmAveCharWidth, ave_width) || width / height > 200) + if (match_off_by_1(tm.tmAveCharWidth, ave_width, FALSE) || width / height > 200) break; }
1
0
0
0
Huw Davies : gdi32/tests: Separate out the metrics checking code.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: 820c14cafc8e20ff02876237543262464e290a16 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=820c14cafc8e20ff028762375…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Aug 28 14:21:09 2013 +0100 gdi32/tests: Separate out the metrics checking code. --- dlls/gdi32/tests/font.c | 55 ++++++++++++++++++++++++++-------------------- 1 files changed, 31 insertions(+), 24 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 0c9ea06..17891e3 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1663,36 +1663,21 @@ todo_wine { ReleaseDC(0, hdc); } -static void test_height_selection(void) +struct font_data +{ + const char face_name[LF_FACESIZE]; + int requested_height; + int weight, height, ascent, descent, int_leading, ext_leading, dpi; +}; + +static void test_height( HDC hdc, const struct font_data *fd ) { - static const struct font_data - { - const char face_name[LF_FACESIZE]; - int requested_height; - int weight, height, ascent, descent, int_leading, ext_leading, dpi; - } fd[] = - { - {"Tahoma", -12, FW_NORMAL, 14, 12, 2, 2, 0, 96 }, - {"Tahoma", -24, FW_NORMAL, 29, 24, 5, 5, 0, 96 }, - {"Tahoma", -48, FW_NORMAL, 58, 48, 10, 10, 0, 96 }, - {"Tahoma", -96, FW_NORMAL, 116, 96, 20, 20, 0, 96 }, - {"Tahoma", -192, FW_NORMAL, 232, 192, 40, 40, 0, 96 }, - {"Tahoma", 12, FW_NORMAL, 12, 10, 2, 2, 0, 96 }, - {"Tahoma", 24, FW_NORMAL, 24, 20, 4, 4, 0, 96 }, - {"Tahoma", 48, FW_NORMAL, 48, 40, 8, 8, 0, 96 }, - {"Tahoma", 96, FW_NORMAL, 96, 80, 16, 17, 0, 96 }, - {"Tahoma", 192, FW_NORMAL, 192, 159, 33, 33, 0, 96 } - }; - HDC hdc; LOGFONT lf; HFONT hfont, old_hfont; TEXTMETRIC tm; INT ret, i; - hdc = CreateCompatibleDC(0); - assert(hdc); - - for (i = 0; i < sizeof(fd)/sizeof(fd[0]); i++) + for (i = 0; fd[i].face_name[0]; i++) { if (!is_truetype_font_installed(fd[i].face_name)) { @@ -1727,6 +1712,28 @@ static void test_height_selection(void) SelectObject(hdc, old_hfont); DeleteObject(hfont); } +} + +static void test_height_selection(void) +{ + static const struct font_data tahoma[] = + { + {"Tahoma", -12, FW_NORMAL, 14, 12, 2, 2, 0, 96 }, + {"Tahoma", -24, FW_NORMAL, 29, 24, 5, 5, 0, 96 }, + {"Tahoma", -48, FW_NORMAL, 58, 48, 10, 10, 0, 96 }, + {"Tahoma", -96, FW_NORMAL, 116, 96, 20, 20, 0, 96 }, + {"Tahoma", -192, FW_NORMAL, 232, 192, 40, 40, 0, 96 }, + {"Tahoma", 12, FW_NORMAL, 12, 10, 2, 2, 0, 96 }, + {"Tahoma", 24, FW_NORMAL, 24, 20, 4, 4, 0, 96 }, + {"Tahoma", 48, FW_NORMAL, 48, 40, 8, 8, 0, 96 }, + {"Tahoma", 96, FW_NORMAL, 96, 80, 16, 17, 0, 96 }, + {"Tahoma", 192, FW_NORMAL, 192, 159, 33, 33, 0, 96 }, + {"", 0, 0, 0, 0, 0, 0, 0, 0 } + }; + HDC hdc = CreateCompatibleDC(0); + assert(hdc); + + test_height( hdc, tahoma ); DeleteDC(hdc); }
1
0
0
0
Huw Davies : gdi32/tests: Split write_ttf_file() into a resource loader and tmp file writer.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: 2f76829c840258537cc109a7263f47a869b4edb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f76829c840258537cc109a72…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Aug 28 14:21:08 2013 +0100 gdi32/tests: Split write_ttf_file() into a resource loader and tmp file writer. --- dlls/gdi32/tests/font.c | 88 ++++++++++++++++++++++++---------------------- 1 files changed, 46 insertions(+), 42 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 2fc7069..0c9ea06 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -118,6 +118,52 @@ static BOOL is_font_installed(const char *name) return ret; } +static void *get_res_data(const char *fontname, DWORD *rsrc_size) +{ + HRSRC rsrc; + void *rsrc_data; + + rsrc = FindResource(GetModuleHandle(0), fontname, RT_RCDATA); + if (!rsrc) return NULL; + + rsrc_data = LockResource(LoadResource(GetModuleHandle(0), rsrc)); + if (!rsrc_data) return NULL; + + *rsrc_size = SizeofResource(GetModuleHandle(0), rsrc); + if (!*rsrc_size) return NULL; + + return rsrc_data; +} + +static BOOL write_tmp_file( const void *data, DWORD *size, char *tmp_name ) +{ + char tmp_path[MAX_PATH]; + HANDLE hfile; + BOOL ret; + + GetTempPath(MAX_PATH, tmp_path); + GetTempFileName(tmp_path, "ttf", 0, tmp_name); + + hfile = CreateFile(tmp_name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); + if (hfile == INVALID_HANDLE_VALUE) return FALSE; + + ret = WriteFile(hfile, data, *size, size, NULL); + + CloseHandle(hfile); + return ret; +} + +static BOOL write_ttf_file(const char *fontname, char *tmp_name) +{ + void *rsrc_data; + DWORD rsrc_size; + + rsrc_data = get_res_data( fontname, &rsrc_size ); + if (!rsrc_data) return FALSE; + + return write_tmp_file( rsrc_data, &rsrc_size, tmp_name ); +} + static void check_font(const char* test, const LOGFONTA* lf, HFONT hfont) { LOGFONTA getobj_lf; @@ -4499,48 +4545,6 @@ static void test_fullname2(void) } -static BOOL write_ttf_file(const char *fontname, char *tmp_name) -{ - char tmp_path[MAX_PATH]; - HRSRC rsrc; - void *rsrc_data; - DWORD rsrc_size; - HANDLE hfile; - BOOL ret; - - SetLastError(0xdeadbeef); - rsrc = FindResource(GetModuleHandle(0), fontname, RT_RCDATA); - ok(rsrc != 0, "FindResource error %d\n", GetLastError()); - if (!rsrc) return FALSE; - SetLastError(0xdeadbeef); - rsrc_data = LockResource(LoadResource(GetModuleHandle(0), rsrc)); - ok(rsrc_data != 0, "LockResource error %d\n", GetLastError()); - if (!rsrc_data) return FALSE; - SetLastError(0xdeadbeef); - rsrc_size = SizeofResource(GetModuleHandle(0), rsrc); - ok(rsrc_size != 0, "SizeofResource error %d\n", GetLastError()); - if (!rsrc_size) return FALSE; - - SetLastError(0xdeadbeef); - ret = GetTempPath(MAX_PATH, tmp_path); - ok(ret, "GetTempPath() error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = GetTempFileName(tmp_path, "ttf", 0, tmp_name); - ok(ret, "GetTempFileName() error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hfile = CreateFile(tmp_name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile() error %d\n", GetLastError()); - if (hfile == INVALID_HANDLE_VALUE) return FALSE; - - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, rsrc_data, rsrc_size, &rsrc_size, NULL); - ok(ret, "WriteFile() error %d\n", GetLastError()); - - CloseHandle(hfile); - return ret; -} - static void test_GetGlyphOutline_empty_contour(void) { HDC hdc;
1
0
0
0
Piotr Caban : msvcp60: Fix basic_filebuf::_Init implementation.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: b0cf3214775ad4d6be0913072cb7f02e51ffb6a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0cf3214775ad4d6be0913072…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 28 15:14:48 2013 +0200 msvcp60: Fix basic_filebuf::_Init implementation. --- dlls/msvcp60/ios.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/msvcp60/ios.c b/dlls/msvcp60/ios.c index 7e87607..e985e07 100644 --- a/dlls/msvcp60/ios.c +++ b/dlls/msvcp60/ios.c @@ -2310,7 +2310,8 @@ void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, b this->cvt = NULL; this->state0 = basic_filebuf_char__Init__Stinit; this->state = basic_filebuf_char__Init__Stinit; - this->str = NULL; + if(which == INITFL_new) + this->str = NULL; this->close = (which == INITFL_open); this->file = file; @@ -2802,7 +2803,8 @@ static void basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, bas this->cvt = NULL; this->state0 = basic_filebuf_short__Init__Stinit; this->state = basic_filebuf_short__Init__Stinit; - this->str = NULL; + if(which == INITFL_new) + this->str = NULL; this->close = (which == INITFL_open); this->file = file; @@ -2819,7 +2821,8 @@ void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, this->cvt = NULL; this->state0 = basic_filebuf_short__Init__Stinit; this->state = basic_filebuf_short__Init__Stinit; - this->str = NULL; + if(which == INITFL_new) + this->str = NULL; this->close = (which == INITFL_open); this->file = file;
1
0
0
0
Piotr Caban : msvcp90: Fix string leak in locale__Locimp__Makeloc function.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: 52aeccf960b732af1a39a143c332f7791c1a70f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52aeccf960b732af1a39a143c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 28 15:13:54 2013 +0200 msvcp90: Fix string leak in locale__Locimp__Makeloc function. --- dlls/msvcp100/locale.c | 2 +- dlls/msvcp100/msvcp.h | 1 + dlls/msvcp60/locale.c | 2 +- dlls/msvcp60/msvcp.h | 1 + dlls/msvcp71/locale.c | 2 +- dlls/msvcp71/msvcp.h | 1 + dlls/msvcp90/locale.c | 2 +- dlls/msvcp90/msvcp90.h | 1 + 8 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp100/locale.c b/dlls/msvcp100/locale.c index e0585bc..19aaef9 100644 --- a/dlls/msvcp100/locale.c +++ b/dlls/msvcp100/locale.c @@ -8460,7 +8460,7 @@ locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, categor locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); locimp->catmask |= cat; - _Yarn_char_copy_ctor(&locimp->name, &locinfo->newlocname); + _Yarn_char_op_assign(&locimp->name, &locinfo->newlocname); return locimp; } diff --git a/dlls/msvcp100/msvcp.h b/dlls/msvcp100/msvcp.h index de8d9e3..067ac76 100644 --- a/dlls/msvcp100/msvcp.h +++ b/dlls/msvcp100/msvcp.h @@ -88,6 +88,7 @@ _Yarn_char* __thiscall _Yarn_char_ctor_cstr(_Yarn_char*, const char*); _Yarn_char* __thiscall _Yarn_char_copy_ctor(_Yarn_char*, const _Yarn_char*); const char* __thiscall _Yarn_char_c_str(const _Yarn_char*); void __thiscall _Yarn_char_dtor(_Yarn_char*); +_Yarn_char* __thiscall _Yarn_char_op_assign(_Yarn_char*, const _Yarn_char*); /* class locale::facet */ typedef struct { diff --git a/dlls/msvcp60/locale.c b/dlls/msvcp60/locale.c index 7a6db3a..a2ce279 100644 --- a/dlls/msvcp60/locale.c +++ b/dlls/msvcp60/locale.c @@ -8110,7 +8110,7 @@ static locale__Locimp* locale__Locimp__Makeloc(const _Locinfo *locinfo, category locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); locimp->catmask |= cat; - basic_string_char_copy_ctor(&locimp->name, &locinfo->newlocname); + basic_string_char_assign(&locimp->name, &locinfo->newlocname); return locimp; } diff --git a/dlls/msvcp60/msvcp.h b/dlls/msvcp60/msvcp.h index cc0e688..0a8c57c 100644 --- a/dlls/msvcp60/msvcp.h +++ b/dlls/msvcp60/msvcp.h @@ -51,6 +51,7 @@ void basic_string_char_clear(basic_string_char*); basic_string_char* __thiscall basic_string_char_append_ch(basic_string_char*, char); MSVCP_size_t __thiscall basic_string_char_length(const basic_string_char*); basic_string_char* __thiscall basic_string_char_append_len_ch(basic_string_char*, MSVCP_size_t, char); +basic_string_char* __thiscall basic_string_char_assign(basic_string_char*, const basic_string_char*); typedef struct { diff --git a/dlls/msvcp71/locale.c b/dlls/msvcp71/locale.c index 4268566..2cb7bd7 100644 --- a/dlls/msvcp71/locale.c +++ b/dlls/msvcp71/locale.c @@ -8651,7 +8651,7 @@ static locale__Locimp* locale__Locimp__Makeloc(const _Locinfo *locinfo, category locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); locimp->catmask |= cat; - MSVCP_basic_string_char_copy_ctor(&locimp->name, &locinfo->newlocname); + MSVCP_basic_string_char_assign(&locimp->name, &locinfo->newlocname); return locimp; } diff --git a/dlls/msvcp71/msvcp.h b/dlls/msvcp71/msvcp.h index 5500eba..bf72081 100644 --- a/dlls/msvcp71/msvcp.h +++ b/dlls/msvcp71/msvcp.h @@ -55,6 +55,7 @@ const char* __stdcall MSVCP_basic_string_char_c_str(const basic_string_char*); void __thiscall MSVCP_basic_string_char_clear(basic_string_char*); basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char); MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*); +basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*); #define BUF_SIZE_WCHAR 8 typedef struct diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 5e11ece..a07b9d1 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -8949,7 +8949,7 @@ locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, categor locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); locimp->catmask |= cat; - MSVCP_basic_string_char_copy_ctor(&locimp->name, &locinfo->newlocname); + MSVCP_basic_string_char_assign(&locimp->name, &locinfo->newlocname); return locimp; } diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 95b0d0a..59f8544 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -55,6 +55,7 @@ const char* __stdcall MSVCP_basic_string_char_c_str(const basic_string_char*); void __thiscall MSVCP_basic_string_char_clear(basic_string_char*); basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char); MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*); +basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*); #define BUF_SIZE_WCHAR 8 typedef struct
1
0
0
0
Piotr Caban : msvcp60: Fix locale::dtor implementation.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: 7de8b5d12321a92ca394afd23e62f1efd3d3cb18 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7de8b5d12321a92ca394afd23…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 28 15:13:39 2013 +0200 msvcp60: Fix locale::dtor implementation. --- dlls/msvcp60/locale.c | 2 +- dlls/msvcp71/locale.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp60/locale.c b/dlls/msvcp60/locale.c index 62b6a93..7a6db3a 100644 --- a/dlls/msvcp60/locale.c +++ b/dlls/msvcp60/locale.c @@ -8278,7 +8278,7 @@ void __thiscall locale_dtor(locale *this) TRACE("(%p)\n", this); if(this->ptr && locale_facet__Decref(&this->ptr->facet)) { locale__Locimp_dtor(this->ptr); - MSVCRT_operator_delete(this); + MSVCRT_operator_delete(this->ptr); } } diff --git a/dlls/msvcp71/locale.c b/dlls/msvcp71/locale.c index 1a557a3..4268566 100644 --- a/dlls/msvcp71/locale.c +++ b/dlls/msvcp71/locale.c @@ -8810,7 +8810,7 @@ void __thiscall locale_dtor(locale *this) TRACE("(%p)\n", this); if(this->ptr && locale_facet__Decref(&this->ptr->facet)) { locale__Locimp_dtor(this->ptr); - MSVCRT_operator_delete(this); + MSVCRT_operator_delete(this->ptr); } }
1
0
0
0
Jacek Caban : mshtml: Added IHTMLDocument2::get_scripts implementation.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: c7417e45286039d5258467d5ce005ca9e616cc04 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7417e45286039d5258467d5c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 28 14:35:12 2013 +0200 mshtml: Added IHTMLDocument2::get_scripts implementation. --- dlls/mshtml/htmldoc.c | 29 +++++++++++++++++++++++++++-- dlls/mshtml/tests/dom.c | 8 ++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 8b5a160..ce9320c 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -406,8 +406,33 @@ static HRESULT WINAPI HTMLDocument_get_title(IHTMLDocument2 *iface, BSTR *p) static HRESULT WINAPI HTMLDocument_get_scripts(IHTMLDocument2 *iface, IHTMLElementCollection **p) { HTMLDocument *This = impl_from_IHTMLDocument2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsIDOMHTMLCollection *nscoll = NULL; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + if(!p) + return E_INVALIDARG; + + *p = NULL; + + if(!This->doc_node->nsdoc) { + WARN("NULL nsdoc\n"); + return E_UNEXPECTED; + } + + nsres = nsIDOMHTMLDocument_GetScripts(This->doc_node->nsdoc, &nscoll); + if(NS_FAILED(nsres)) { + ERR("GetImages failed: %08x\n", nsres); + return E_FAIL; + } + + if(nscoll) { + *p = create_collection_from_htmlcol(This->doc_node, nscoll); + nsIDOMHTMLCollection_Release(nscoll); + } + + return S_OK; } static HRESULT WINAPI HTMLDocument_put_designMode(IHTMLDocument2 *iface, BSTR v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index f4d30579..749d3c0 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -6075,6 +6075,14 @@ static void test_elems(IHTMLDocument2 *doc) IHTMLElementCollection_Release(collection); } + hres = IHTMLDocument2_get_scripts(doc, &collection); + ok(hres == S_OK, "get_scripts failed: %08x\n", hres); + if(hres == S_OK) { + static const elem_type_t script_types[] = {ET_SCRIPT}; + test_elem_collection((IUnknown*)collection, script_types, 1); + IHTMLElementCollection_Release(collection); + } + test_plugins_col(doc); elem = get_doc_elem(doc);
1
0
0
0
Jacek Caban : wbemdisp: Added WinMGMTS object stub implementation.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: 8c4e9ba4cfa4e1976a84dcb8bdfcf26b497a8480 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c4e9ba4cfa4e1976a84dcb8b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 28 12:14:31 2013 +0200 wbemdisp: Added WinMGMTS object stub implementation. --- .gitignore | 1 + dlls/wbemdisp/Makefile.in | 1 + dlls/wbemdisp/locator.c | 1 - dlls/wbemdisp/main.c | 63 ++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 61 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index de6c039..16238b3 100644 --- a/.gitignore +++ b/.gitignore @@ -140,6 +140,7 @@ dlls/vbscript/tests/vbsregexp55.h dlls/vbscript/vbscript_classes.h dlls/vbscript/vbsglobal.h dlls/vbscript/vbsregexp55.h +dlls/wbemdisp/wbemdisp_classes.h dlls/wbemprox/wql.tab.c dlls/wbemprox/wql.tab.h dlls/windowscodecs/windowscodecs_wincodec.h diff --git a/dlls/wbemdisp/Makefile.in b/dlls/wbemdisp/Makefile.in index dbd76d9..3f3ff49 100644 --- a/dlls/wbemdisp/Makefile.in +++ b/dlls/wbemdisp/Makefile.in @@ -6,6 +6,7 @@ C_SRCS = \ main.c IDL_R_SRCS = wbemdisp_classes.idl +IDL_H_SRCS = wbemdisp_classes.idl IDL_TLB_SRCS = wbemdisp_tlb.idl diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c index 6f3af95..68c24f7 100644 --- a/dlls/wbemdisp/locator.c +++ b/dlls/wbemdisp/locator.c @@ -23,7 +23,6 @@ #include "windef.h" #include "winbase.h" -#include "initguid.h" #include "objbase.h" #include "wbemdisp.h" diff --git a/dlls/wbemdisp/main.c b/dlls/wbemdisp/main.c index 078e3b5..8582cf1 100644 --- a/dlls/wbemdisp/main.c +++ b/dlls/wbemdisp/main.c @@ -23,17 +23,69 @@ #include "windef.h" #include "winbase.h" +#include "initguid.h" #include "objbase.h" #include "wbemdisp.h" #include "rpcproxy.h" #include "wine/debug.h" #include "wbemdisp_private.h" +#include "wbemdisp_classes.h" WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp); static HINSTANCE instance; +static HRESULT WINAPI WinMGMTS_QueryInterface(IParseDisplayName *iface, REFIID riid, void **ppv) +{ + if(IsEqualGUID(riid, &IID_IUnknown)) { + TRACE("(IID_IUnknown %p)\n", ppv); + *ppv = iface; + }else if(IsEqualGUID(riid, &IID_IParseDisplayName)) { + TRACE("(IID_IParseDisplayName %p)\n", ppv); + *ppv = iface; + }else { + WARN("Unsupported riid %s\n", debugstr_guid(riid)); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI WinMGMTS_AddRef(IParseDisplayName *iface) +{ + return 2; +} + +static ULONG WINAPI WinMGMTS_Release(IParseDisplayName *iface) +{ + return 1; +} + +static HRESULT WINAPI WinMGMTS_ParseDisplayName(IParseDisplayName *iface, IBindCtx *pbc, LPOLESTR pszDisplayName, + ULONG *pchEaten, IMoniker **ppmkOut) +{ + FIXME("(%p %s %p %p)\n", pbc, debugstr_w(pszDisplayName), pchEaten, ppmkOut); + return E_NOTIMPL; +} + +static const IParseDisplayNameVtbl WinMGMTSVtbl = { + WinMGMTS_QueryInterface, + WinMGMTS_AddRef, + WinMGMTS_Release, + WinMGMTS_ParseDisplayName +}; + +static IParseDisplayName winmgmts = { &WinMGMTSVtbl }; + +static HRESULT WinMGMTS_create(IUnknown *outer, void **ppv) +{ + *ppv = &winmgmts; + return S_OK; +} + struct factory { IClassFactory IClassFactory_iface; @@ -107,6 +159,7 @@ static const struct IClassFactoryVtbl factory_vtbl = }; static struct factory swbem_locator_cf = { { &factory_vtbl }, SWbemLocator_create }; +static struct factory winmgmts_cf = { { &factory_vtbl }, WinMGMTS_create }; BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { @@ -130,10 +183,12 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *obj ) TRACE( "%s, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(iid), obj ); if (IsEqualGUID( rclsid, &CLSID_SWbemLocator )) - { - cf = &swbem_locator_cf.IClassFactory_iface; - } - if (!cf) return CLASS_E_CLASSNOTAVAILABLE; + cf = &swbem_locator_cf.IClassFactory_iface; + else if (IsEqualGUID( rclsid, &CLSID_WinMGMTS )) + cf = &winmgmts_cf.IClassFactory_iface; + else + return CLASS_E_CLASSNOTAVAILABLE; + return IClassFactory_QueryInterface( cf, iid, obj ); }
1
0
0
0
Jacek Caban : wbemdisp: Use wbemdisp.idl to register SWbemLocator.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: 686de978c002a20964724c3586c2070152ee1054 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=686de978c002a20964724c358…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 28 12:14:20 2013 +0200 wbemdisp: Use wbemdisp.idl to register SWbemLocator. --- dlls/wbemdisp/wbemdisp_classes.idl | 8 -------- include/wbemdisp.idl | 11 ++++++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/wbemdisp/wbemdisp_classes.idl b/dlls/wbemdisp/wbemdisp_classes.idl index 1d468ec..4fdedb0 100644 --- a/dlls/wbemdisp/wbemdisp_classes.idl +++ b/dlls/wbemdisp/wbemdisp_classes.idl @@ -20,14 +20,6 @@ [ threading(apartment), - uuid(76a64158-cb41-11d1-8b02-00600806d9b6), - progid("WbemScripting.SWbemLocator.1"), - vi_progid("WbemScripting.SWbemLocator") -] -coclass SWbemLocator { interface ISWbemLocator; } - -[ - threading(apartment), uuid(172bddf8-ceea-11d1-8b05-00600806d9b6), progid("WINMGMTS.1"), vi_progid("WINMGMTS") diff --git a/include/wbemdisp.idl b/include/wbemdisp.idl index 62cc0e4..a3a9b68 100644 --- a/include/wbemdisp.idl +++ b/include/wbemdisp.idl @@ -18,6 +18,12 @@ import "dispex.idl"; +#ifndef __WIDL__ +#define threading(model) +#define progid(str) +#define vi_progid(str) +#endif + [ uuid(565783c6-cb41-11d1-8b02-00600806d9b6), helpstring("Microsoft WMI Scripting V1.2 Library"), @@ -1102,7 +1108,10 @@ interface ISWbemServices : IDispatch }; [ - uuid(76a64158-cb41-11d1-8b02-00600806d9b6) + threading(apartment), + uuid(76a64158-cb41-11d1-8b02-00600806d9b6), + progid("WbemScripting.SWbemLocator.1"), + vi_progid("WbemScripting.SWbemLocator") ] coclass SWbemLocator {
1
0
0
0
Jacek Caban : wbemdisp: Register WINMGMTS object.
by Alexandre Julliard
28 Aug '13
28 Aug '13
Module: wine Branch: master Commit: 782cee32ca1c3dc013465645a9c31e13c560042f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=782cee32ca1c3dc013465645a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 28 12:14:09 2013 +0200 wbemdisp: Register WINMGMTS object. --- dlls/wbemdisp/wbemdisp_classes.idl | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/wbemdisp/wbemdisp_classes.idl b/dlls/wbemdisp/wbemdisp_classes.idl index 660c950..1d468ec 100644 --- a/dlls/wbemdisp/wbemdisp_classes.idl +++ b/dlls/wbemdisp/wbemdisp_classes.idl @@ -25,3 +25,11 @@ vi_progid("WbemScripting.SWbemLocator") ] coclass SWbemLocator { interface ISWbemLocator; } + +[ + threading(apartment), + uuid(172bddf8-ceea-11d1-8b05-00600806d9b6), + progid("WINMGMTS.1"), + vi_progid("WINMGMTS") +] +coclass WinMGMTS { interface IParseDisplayName; }
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
47
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
Results per page:
10
25
50
100
200