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
June 2016
----- 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
592 discussions
Start a n
N
ew thread
Iván Matellanes : msvcirt: Implement ostream:: operator<< for floats.
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: e4df032cce0042bd7d31288d992555bcef93c8f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4df032cce0042bd7d31288d9…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Jun 22 13:59:50 2016 +0100 msvcirt: Implement ostream::operator<< for floats. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 47 ++++++++++++++++++-- dlls/msvcirt/tests/msvcirt.c | 102 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 143 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e4df032cce0042bd7d312…
1
0
0
0
Iván Matellanes : msvcirt: Implement ostream:: operator<< for integers.
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: c969efcaf219300244bbd460f028acb56982630a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c969efcaf219300244bbd460f…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Jun 22 13:59:49 2016 +0100 msvcirt: Implement ostream::operator<< for integers. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 51 +++++++++++++++++++++++++++++++++++++------- dlls/msvcirt/tests/msvcirt.c | 43 +++++++++++++++++++++++++++++++++++-- 2 files changed, 84 insertions(+), 10 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c969efcaf219300244bbd…
1
0
0
0
Iván Matellanes : msvcirt: Implement ostream:: operator<< for strings.
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: 65935c4c881bc3304b588d13c3d9ed3b49246db7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=65935c4c881bc3304b588d13c…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Jun 22 13:59:48 2016 +0100 msvcirt: Implement ostream::operator<< for strings. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 9 ++++++--- dlls/msvcirt/tests/msvcirt.c | 21 +++++++++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index a09b4d6..9ec61c3 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -2625,7 +2625,11 @@ ostream* __thiscall ostream_print_unsigned_char(ostream *this, unsigned char c) DEFINE_THISCALL_WRAPPER(ostream_print_str, 8) ostream* __thiscall ostream_print_str(ostream *this, const char *str) { - FIXME("(%p %s) stub\n", this, str); + TRACE("(%p %s)\n", this, str); + if (ostream_opfx(this)) { + ostream_writepad(this, "", str); + ostream_osfx(this); + } return this; } @@ -2634,8 +2638,7 @@ ostream* __thiscall ostream_print_str(ostream *this, const char *str) DEFINE_THISCALL_WRAPPER(ostream_print_unsigned_str, 8) ostream* __thiscall ostream_print_unsigned_str(ostream *this, const unsigned char *str) { - FIXME("(%p %s) stub\n", this, str); - return this; + return ostream_print_str(this, (const char*) str); } /* ??6ostream@@QAEAAV0@F@Z */ diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index 2d776ad..2ce59e4 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -271,6 +271,7 @@ static ostream* (*__thiscall p_ostream_seekp)(ostream*, streampos); static streampos (*__thiscall p_ostream_tellp)(ostream*); static ostream* (*__thiscall p_ostream_writepad)(ostream*, const char*, const char*); static ostream* (*__thiscall p_ostream_print_char)(ostream*, char); +static ostream* (*__thiscall p_ostream_print_str)(ostream*, const char*); /* Emulate a __thiscall */ #ifdef __i386__ @@ -446,6 +447,7 @@ static BOOL init(void) SET(p_ostream_tellp, "?tellp@ostream@@QEAAJXZ"); SET(p_ostream_writepad, "?writepad@ostream@@AEAAAEAV1@PEBD0@Z"); SET(p_ostream_print_char, "??6ostream@@QEAAAEAV0@D@Z"); + SET(p_ostream_print_str, "??6ostream@@QEAAAEAV0@PEBD@Z"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); p_operator_delete = (void*)GetProcAddress(msvcrt, "??3@YAXPAX@Z"); @@ -551,6 +553,7 @@ static BOOL init(void) SET(p_ostream_tellp, "?tellp@ostream@@QAEJXZ"); SET(p_ostream_writepad, "?writepad@ostream@@AAEAAV1@PBD0@Z"); SET(p_ostream_print_char, "??6ostream@@QAEAAV0@D@Z"); + SET(p_ostream_print_str, "??6ostream@@QAEAAV0@PBD@Z"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); @@ -3013,8 +3016,9 @@ static void test_ostream_print(void) int i; char param_char[] = {'a', '9', 'e'}; + const char* param_str[] = {"Test", "800", "3.14159", " Test"}; struct ostream_print_test { - enum { type_chr } type; + enum { type_chr, type_str } type; int param_index; ios_io_state state; ios_flags flags; @@ -3035,7 +3039,18 @@ static void test_ostream_print(void) {type_chr, /* 'a' */ 0, IOSTATE_goodbit, FLAGS_internal|FLAGS_hex|FLAGS_showbase, 6, ' ', 4, " a", IOSTATE_goodbit}, {type_chr, /* '9' */ 1, IOSTATE_goodbit, FLAGS_oct|FLAGS_showbase|FLAGS_uppercase, 6, 'i', 2, "i9", IOSTATE_goodbit}, {type_chr, /* '9' */ 1, IOSTATE_goodbit, FLAGS_showpos|FLAGS_scientific, 0, 'i', 2, "i9", IOSTATE_goodbit}, - {type_chr, /* 'e' */ 2, IOSTATE_goodbit, FLAGS_left|FLAGS_right|FLAGS_uppercase, 0, '*', 8, "e*******", IOSTATE_goodbit} + {type_chr, /* 'e' */ 2, IOSTATE_goodbit, FLAGS_left|FLAGS_right|FLAGS_uppercase, 0, '*', 8, "e*******", IOSTATE_goodbit}, + /* const char* */ + {type_str, /* "Test" */ 0, IOSTATE_badbit, 0, 6, ' ', 0, "", IOSTATE_badbit|IOSTATE_failbit}, + {type_str, /* "Test" */ 0, IOSTATE_eofbit, 0, 6, ' ', 0, "", IOSTATE_eofbit|IOSTATE_failbit}, + {type_str, /* "Test" */ 0, IOSTATE_goodbit, 0, 6, ' ', 0, "Test", IOSTATE_goodbit}, + {type_str, /* "Test" */ 0, IOSTATE_goodbit, 0, 6, ' ', 6, " Test", IOSTATE_goodbit}, + {type_str, /* "Test" */ 0, IOSTATE_goodbit, FLAGS_internal, 6, 'x', 6, "xxTest", IOSTATE_goodbit}, + {type_str, /* "Test" */ 0, IOSTATE_goodbit, FLAGS_left, 6, ' ', 5, "Test ", IOSTATE_goodbit}, + {type_str, /* "Test" */ 0, IOSTATE_goodbit, FLAGS_left|FLAGS_hex|FLAGS_showpoint, 6, '?', 6, "Test??", IOSTATE_goodbit}, + {type_str, /* "800" */ 1, IOSTATE_goodbit, FLAGS_showbase|FLAGS_showpos, 6, ' ', 4, " 800", IOSTATE_goodbit}, + {type_str, /* "3.14159" */ 2, IOSTATE_goodbit, FLAGS_scientific, 2, 'x', 2, "3.14159", IOSTATE_goodbit}, + {type_str, /* " Test" */ 3, IOSTATE_goodbit, FLAGS_skipws, 6, 'x', 2, " Test", IOSTATE_goodbit} }; pssb = call_func1(p_strstreambuf_ctor, &ssb); @@ -3054,6 +3069,8 @@ static void test_ostream_print(void) switch (tests[i].type) { case type_chr: pos = call_func2(p_ostream_print_char, &os, (int) param_char[tests[i].param_index]); break; + case type_str: + pos = call_func2(p_ostream_print_str, &os, param_str[tests[i].param_index]); break; } length = ssb.base.pptr - ssb.base.pbase;
1
0
0
0
Iván Matellanes : msvcirt: Implement ostream:: operator<< for characters.
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: 81cf0b2c487e7281ed9ab40cbfd5471fa5c6847d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81cf0b2c487e7281ed9ab40cb…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Jun 22 13:59:47 2016 +0100 msvcirt: Implement ostream::operator<< for characters. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 12 ++++++-- dlls/msvcirt/tests/msvcirt.c | 70 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 3 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index ce5c021..a09b4d6 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -2599,7 +2599,14 @@ ostream* __thiscall ostream_writepad(ostream *this, const char *str1, const char DEFINE_THISCALL_WRAPPER(ostream_print_char, 8) ostream* __thiscall ostream_print_char(ostream *this, char c) { - FIXME("(%p %c) stub\n", this, c); + const char c_str[2] = {c, 0}; + + TRACE("(%p %c)\n", this, c); + + if (ostream_opfx(this)) { + ostream_writepad(this, "", c_str); + ostream_osfx(this); + } return this; } @@ -2608,8 +2615,7 @@ ostream* __thiscall ostream_print_char(ostream *this, char c) DEFINE_THISCALL_WRAPPER(ostream_print_unsigned_char, 8) ostream* __thiscall ostream_print_unsigned_char(ostream *this, unsigned char c) { - FIXME("(%p %c) stub\n", this, c); - return this; + return ostream_print_char(this, c); } /* ??6ostream@@QAEAAV0@PBC@Z */ diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index 428ddf3..2d776ad 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -270,6 +270,7 @@ static ostream* (*__thiscall p_ostream_seekp_offset)(ostream*, streamoff, ios_se static ostream* (*__thiscall p_ostream_seekp)(ostream*, streampos); static streampos (*__thiscall p_ostream_tellp)(ostream*); static ostream* (*__thiscall p_ostream_writepad)(ostream*, const char*, const char*); +static ostream* (*__thiscall p_ostream_print_char)(ostream*, char); /* Emulate a __thiscall */ #ifdef __i386__ @@ -444,6 +445,7 @@ static BOOL init(void) SET(p_ostream_seekp, "?seekp@ostream@@QEAAAEAV1@J@Z"); SET(p_ostream_tellp, "?tellp@ostream@@QEAAJXZ"); SET(p_ostream_writepad, "?writepad@ostream@@AEAAAEAV1@PEBD0@Z"); + SET(p_ostream_print_char, "??6ostream@@QEAAAEAV0@D@Z"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); p_operator_delete = (void*)GetProcAddress(msvcrt, "??3@YAXPAX@Z"); @@ -548,6 +550,7 @@ static BOOL init(void) SET(p_ostream_seekp, "?seekp@ostream@@QAEAAV1@J@Z"); SET(p_ostream_tellp, "?tellp@ostream@@QAEJXZ"); SET(p_ostream_writepad, "?writepad@ostream@@AAEAAV1@PBD0@Z"); + SET(p_ostream_print_char, "??6ostream@@QAEAAV0@D@Z"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); @@ -3002,6 +3005,72 @@ if (0) /* crashes on native */ ok(_unlink(filename2) == 0, "Couldn't unlink file named '%s'\n", filename2); } +static void test_ostream_print(void) +{ + ostream os, *pos; + strstreambuf ssb, *pssb; + LONG length, expected_length; + int i; + + char param_char[] = {'a', '9', 'e'}; + struct ostream_print_test { + enum { type_chr } type; + int param_index; + ios_io_state state; + ios_flags flags; + int precision; + int fill; + int width; + const char *expected_text; + ios_io_state expected_flags; + } tests[] = { + /* char */ + {type_chr, /* 'a' */ 0, IOSTATE_badbit, 0, 6, ' ', 0, "", IOSTATE_badbit|IOSTATE_failbit}, + {type_chr, /* 'a' */ 0, IOSTATE_eofbit, 0, 6, ' ', 0, "", IOSTATE_eofbit|IOSTATE_failbit}, + {type_chr, /* 'a' */ 0, IOSTATE_goodbit, 0, 6, ' ', 0, "a", IOSTATE_goodbit}, + {type_chr, /* 'a' */ 0, IOSTATE_goodbit, 0, 6, ' ', 4, " a", IOSTATE_goodbit}, + {type_chr, /* 'a' */ 0, IOSTATE_goodbit, 0, 6, 'x', 3, "xxa", IOSTATE_goodbit}, + {type_chr, /* 'a' */ 0, IOSTATE_goodbit, FLAGS_left, 6, ' ', 4, "a ", IOSTATE_goodbit}, + {type_chr, /* 'a' */ 0, IOSTATE_goodbit, FLAGS_left|FLAGS_internal, 6, ' ', 4, " a", IOSTATE_goodbit}, + {type_chr, /* 'a' */ 0, IOSTATE_goodbit, FLAGS_internal|FLAGS_hex|FLAGS_showbase, 6, ' ', 4, " a", IOSTATE_goodbit}, + {type_chr, /* '9' */ 1, IOSTATE_goodbit, FLAGS_oct|FLAGS_showbase|FLAGS_uppercase, 6, 'i', 2, "i9", IOSTATE_goodbit}, + {type_chr, /* '9' */ 1, IOSTATE_goodbit, FLAGS_showpos|FLAGS_scientific, 0, 'i', 2, "i9", IOSTATE_goodbit}, + {type_chr, /* 'e' */ 2, IOSTATE_goodbit, FLAGS_left|FLAGS_right|FLAGS_uppercase, 0, '*', 8, "e*******", IOSTATE_goodbit} + }; + + pssb = call_func1(p_strstreambuf_ctor, &ssb); + ok(pssb == &ssb, "wrong return, expected %p got %p\n", &ssb, pssb); + pos = call_func3(p_ostream_sb_ctor, &os, &ssb.base, TRUE); + ok(pos == &os, "wrong return, expected %p got %p\n", &os, pos); + + for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { + os.base_ios.state = tests[i].state; + os.base_ios.flags = tests[i].flags; + os.base_ios.precision = tests[i].precision; + os.base_ios.fill = tests[i].fill; + os.base_ios.width = tests[i].width; + ssb.base.pptr = ssb.base.pbase; + + switch (tests[i].type) { + case type_chr: + pos = call_func2(p_ostream_print_char, &os, (int) param_char[tests[i].param_index]); break; + } + + length = ssb.base.pptr - ssb.base.pbase; + expected_length = strlen(tests[i].expected_text); + ok(pos == &os, "Test %d: wrong return, expected %p got %p\n", i, &os, pos); + ok(os.base_ios.state == tests[i].expected_flags, "Test %d: expected %d got %d\n", i, + tests[i].expected_flags, os.base_ios.state); + ok(os.base_ios.width == 0, "Test %d: expected 0 got %d\n", i, os.base_ios.width); + ok(expected_length == length, "Test %d: wrong output length, expected %d got %d\n", i, expected_length, length); + ok(!strncmp(tests[i].expected_text, ssb.base.pbase, length), + "Test %d: wrong output, expected '%s' got '%s'\n", i, tests[i].expected_text, ssb.base.pbase); + } + + call_func1(p_ostream_vbase_dtor, &os); + call_func1(p_strstreambuf_dtor, &ssb); +} + START_TEST(msvcirt) { if(!init()) @@ -3013,6 +3082,7 @@ START_TEST(msvcirt) test_stdiobuf(); test_ios(); test_ostream(); + test_ostream_print(); FreeLibrary(msvcrt); FreeLibrary(msvcirt);
1
0
0
0
Michael Stefaniuc : shell32: Avoid using CopyRect().
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: ee3deec635b03f0508f3d087ab1999b889c2205b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee3deec635b03f0508f3d087a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 22 11:54:09 2016 +0200 shell32: Avoid using CopyRect(). Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/ebrowser.c | 7 +++---- dlls/shell32/shlmenu.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/shell32/ebrowser.c b/dlls/shell32/ebrowser.c index 0cee30f..bbccf88 100644 --- a/dlls/shell32/ebrowser.c +++ b/dlls/shell32/ebrowser.c @@ -498,7 +498,7 @@ static LRESULT navpane_splitter_beginresize(ExplorerBrowserImpl *This, HWND hwnd SetCapture(hwnd); - CopyRect(&This->splitter_rc, &This->navpane.rc); + This->splitter_rc = This->navpane.rc; This->splitter_rc.left = This->splitter_rc.right - SPLITTER_WIDTH; splitter_draw(GetParent(hwnd), &This->splitter_rc); @@ -516,8 +516,7 @@ static LRESULT navpane_splitter_resizing(ExplorerBrowserImpl *This, HWND hwnd, L dx = (SHORT)LOWORD(lParam); TRACE("%d.\n", dx); - CopyRect(&rc, &This->navpane.rc); - + rc = This->navpane.rc; new_width = This->navpane.width + dx; if(new_width > NP_MIN_WIDTH && This->sv_rc.right - new_width > SV_MIN_WIDTH) { @@ -525,7 +524,7 @@ static LRESULT navpane_splitter_resizing(ExplorerBrowserImpl *This, HWND hwnd, L rc.left = rc.right - SPLITTER_WIDTH; splitter_draw(GetParent(hwnd), &This->splitter_rc); splitter_draw(GetParent(hwnd), &rc); - CopyRect(&This->splitter_rc, &rc); + This->splitter_rc = rc; } return TRUE; diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c index 694b5d1..7a960ad 100644 --- a/dlls/shell32/shlmenu.c +++ b/dlls/shell32/shlmenu.c @@ -613,7 +613,7 @@ LRESULT WINAPI FileMenu_DrawItem( clrPrevBkgnd = SetBkColor(lpdis->hDC, GetSysColor (COLOR_MENU)); } - CopyRect(&TextRect, &(lpdis->rcItem)); + TextRect = lpdis->rcItem; /* add the menubitmap */ menuinfo = FM_GetMenuInfo(pMyItem->hMenu);
1
0
0
0
Michael Stefaniuc : user32/tests: Avoid using CopyRect().
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: ce888709821b6f05705acbcef0b5e51e6bf78eca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce888709821b6f05705acbcef…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 22 11:53:03 2016 +0200 user32/tests: Avoid using CopyRect(). Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/win.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index c135fdf..8505983 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -1078,7 +1078,7 @@ static void test_nonclient_area(HWND hwnd) if (IsRectEmpty(&rc_window) || IsRectEmpty(&rc_client) || rc_window.right > 32768 || rc_window.bottom > 32768) return; - CopyRect(&rc, &rc_client); + rc = rc_client; MapWindowPoints(hwnd, 0, (LPPOINT)&rc, 2); FixedAdjustWindowRectEx(&rc, style, menu, exstyle); @@ -1086,7 +1086,7 @@ static void test_nonclient_area(HWND hwnd) "window rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, win=%s, calc=%s\n", style, exstyle, menu, wine_dbgstr_rect(&rc_window), wine_dbgstr_rect(&rc)); - CopyRect(&rc, &rc_client); + rc = rc_client; MapWindowPoints(hwnd, 0, (LPPOINT)&rc, 2); wine_AdjustWindowRectEx(&rc, style, menu, exstyle); ok(EqualRect(&rc, &rc_window), @@ -1094,7 +1094,7 @@ static void test_nonclient_area(HWND hwnd) style, exstyle, menu, wine_dbgstr_rect(&rc_window), wine_dbgstr_rect(&rc)); - CopyRect(&rc, &rc_window); + rc = rc_window; DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc); MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2); ok(EqualRect(&rc, &rc_client), @@ -1111,11 +1111,11 @@ static void test_nonclient_area(HWND hwnd) /* and now test AdjustWindowRectEx and WM_NCCALCSIZE on synthetic data */ SetRect(&rc_client, 0, 0, 250, 150); - CopyRect(&rc_window, &rc_client); + rc_window = rc_client; MapWindowPoints(hwnd, 0, (LPPOINT)&rc_window, 2); FixedAdjustWindowRectEx(&rc_window, style, menu, exstyle); - CopyRect(&rc, &rc_window); + rc = rc_window; DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc); MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2); ok(EqualRect(&rc, &rc_client), @@ -5278,14 +5278,14 @@ static LRESULT WINAPI parentdc_window_procA(HWND hwnd, UINT msg, WPARAM wparam, { case WM_PAINT: GetClientRect(hwnd, &rc); - CopyRect(&t->client, &rc); + t->client = rc; GetWindowRect(hwnd, &rc); trace("WM_PAINT: hwnd %p, client rect %s, window rect %s\n", hwnd, wine_dbgstr_rect(&t->client), wine_dbgstr_rect(&rc)); BeginPaint(hwnd, &ps); - CopyRect(&t->paint, &ps.rcPaint); + t->paint = ps.rcPaint; GetClipBox(ps.hdc, &rc); - CopyRect(&t->clip, &rc); + t->clip = rc; trace("clip rect %s, paint rect %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&ps.rcPaint)); EndPaint(hwnd, &ps);
1
0
0
0
Michael Stefaniuc : comdlg32: Avoid using CopyRect().
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: 4e7272f087f814007a3225a5e08d8d8d811be8bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4e7272f087f814007a3225a5e…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 22 11:52:30 2016 +0200 comdlg32: Avoid using CopyRect(). Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comdlg32/colordlg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index 8b307ae..6bf54c3 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -247,7 +247,7 @@ static void CC_DrawFocusRect(CCPRIV *lpp, HWND hwnd, int x, int y, int rows, int /* draw it */ hdc = GetDC(hwnd); DrawFocusRect(hdc, &rect); - CopyRect(&lpp->focusRect, &rect); + lpp->focusRect = rect; lpp->hwndFocus = hwnd; ReleaseDC(hwnd, hdc); }
1
0
0
0
Michael Stefaniuc : avifil32: Avoid using CopyRect().
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: e8a2a68f5956d0ac2a2a65c0c4751681ca8d099e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e8a2a68f5956d0ac2a2a65c0c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 22 11:51:48 2016 +0200 avifil32: Avoid using CopyRect(). Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/avifil32/editstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/avifil32/editstream.c b/dlls/avifil32/editstream.c index 3aa8637..45a4d98 100644 --- a/dlls/avifil32/editstream.c +++ b/dlls/avifil32/editstream.c @@ -655,7 +655,7 @@ static HRESULT WINAPI IAVIEditStream_fnSetInfo(IAVIEditStream*iface, This->sInfo.dwRate = asi->dwRate; This->sInfo.dwScale = asi->dwScale; This->sInfo.dwQuality = asi->dwQuality; - CopyRect(&This->sInfo.rcFrame, &asi->rcFrame); + This->sInfo.rcFrame = asi->rcFrame; memcpy(This->sInfo.szName, asi->szName, sizeof(asi->szName)); This->sInfo.dwEditCount++;
1
0
0
0
Józef Kucia : d3d10core/tests: Use get_rtv_desc() in test_render_target_views().
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: eab40edba5e457459270e14c0f8113d7457bc419 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eab40edba5e457459270e14c0…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jun 22 11:37:35 2016 +0200 d3d10core/tests: Use get_rtv_desc() in test_render_target_views(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d10core/tests/device.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index eabc659..1f70e22 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -2166,7 +2166,7 @@ static void test_render_target_views(void) static struct test { struct texture texture; - struct rtv rtv; + struct rtv_desc rtv; DWORD expected_colors[4]; } tests[] = @@ -2238,23 +2238,7 @@ static void test_render_target_views(void) hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); ok(SUCCEEDED(hr), "Test %u: Failed to create texture, hr %#x.\n", i, hr); - rtv_desc.Format = texture_desc.Format; - rtv_desc.ViewDimension = test->rtv.dimension; - if (test->rtv.dimension == D3D10_RTV_DIMENSION_TEXTURE2D) - { - U(rtv_desc).Texture2D.MipSlice = test->rtv.miplevel_idx; - } - else if (test->rtv.dimension == D3D10_RTV_DIMENSION_TEXTURE2DARRAY) - { - U(rtv_desc).Texture2DArray.MipSlice = test->rtv.miplevel_idx; - U(rtv_desc).Texture2DArray.FirstArraySlice = test->rtv.layer_idx; - U(rtv_desc).Texture2DArray.ArraySize = test->rtv.layer_count; - } - else - { - trace("Test %u: Unhandled view dimension %#x.\n", i, test->rtv.dimension); - } - + get_rtv_desc(&rtv_desc, &test->rtv); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv); ok(SUCCEEDED(hr), "Test %u: Failed to create render target view, hr %#x.\n", i, hr);
1
0
0
0
Józef Kucia : d3d11/tests: Use get_rtv_desc() in test_render_target_views().
by Alexandre Julliard
22 Jun '16
22 Jun '16
Module: wine Branch: master Commit: 7e1fd3d3c9f2df922f2a567342ed40252b0603aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e1fd3d3c9f2df922f2a56734…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jun 22 11:37:34 2016 +0200 d3d11/tests: Use get_rtv_desc() in test_render_target_views(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 3c92855..8626b68 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -5637,20 +5637,12 @@ static void test_render_target_views(void) UINT miplevel_count; UINT array_size; }; - struct rtv - { - DXGI_FORMAT format; - D3D11_RTV_DIMENSION dimension; - unsigned int miplevel_idx; - unsigned int layer_idx; - unsigned int layer_count; - }; static const struct vec4 red = {1.0f, 0.0f, 0.0f, 1.0f}; static struct test { struct texture texture; - struct rtv rtv; + struct rtv_desc rtv; DWORD expected_colors[4]; } tests[] = @@ -5724,23 +5716,7 @@ static void test_render_target_views(void) hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &texture); ok(SUCCEEDED(hr), "Test %u: Failed to create texture, hr %#x.\n", i, hr); - rtv_desc.Format = texture_desc.Format; - rtv_desc.ViewDimension = test->rtv.dimension; - if (test->rtv.dimension == D3D11_RTV_DIMENSION_TEXTURE2D) - { - U(rtv_desc).Texture2D.MipSlice = test->rtv.miplevel_idx; - } - else if (test->rtv.dimension == D3D11_RTV_DIMENSION_TEXTURE2DARRAY) - { - U(rtv_desc).Texture2DArray.MipSlice = test->rtv.miplevel_idx; - U(rtv_desc).Texture2DArray.FirstArraySlice = test->rtv.layer_idx; - U(rtv_desc).Texture2DArray.ArraySize = test->rtv.layer_count; - } - else - { - trace("Test %u: Unhandled view dimension %#x.\n", i, test->rtv.dimension); - } - + get_rtv_desc(&rtv_desc, &test->rtv); hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, &rtv_desc, &rtv); ok(SUCCEEDED(hr), "Test %u: Failed to create render target view, hr %#x.\n", i, hr);
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
60
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
Results per page:
10
25
50
100
200