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 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
777 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Use wined3d_texture_load_location() in surface_load_texture().
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: bdfee1574e1d6134ef5a2ba40345d482ae7329d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdfee1574e1d6134ef5a2ba40…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 3 15:25:31 2016 +0200 wined3d: Use wined3d_texture_load_location() in surface_load_texture(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c3a491f..8ba63fd 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2908,7 +2908,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, == WINED3D_LOCATION_TEXTURE_RGB) { FIXME_(d3d_perf)("Downloading RGB surface %p to reload it as sRGB.\n", surface); - surface_load_location(surface, context, texture->resource.map_binding); + wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding); } } else @@ -2917,7 +2917,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, == WINED3D_LOCATION_TEXTURE_SRGB) { FIXME_(d3d_perf)("Downloading sRGB surface %p to reload it as RGB.\n", surface); - surface_load_location(surface, context, texture->resource.map_binding); + wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding); } } @@ -2925,7 +2925,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, { WARN("Trying to load a texture from sysmem, but no simple location is valid.\n"); /* Lets hope we get it from somewhere... */ - surface_load_location(surface, context, WINED3D_LOCATION_SYSMEM); + wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_SYSMEM); } wined3d_texture_prepare_texture(texture, context, srgb); @@ -2943,7 +2943,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, { TRACE("Removing the pbo attached to surface %p.\n", surface); - surface_load_location(surface, context, WINED3D_LOCATION_SYSMEM); + wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_SYSMEM); wined3d_texture_set_map_binding(texture, WINED3D_LOCATION_SYSMEM); }
1
0
0
0
Henri Verbeet : wined3d: Use wined3d_texture_load_location() in surface_load_drawable().
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: 1091de5c6162f9b5129a3613059d497cdc6552e6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1091de5c6162f9b5129a36130…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 3 15:25:30 2016 +0200 wined3d: Use wined3d_texture_load_location() in surface_load_drawable(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index fdc7a51..c3a491f 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2819,6 +2819,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface, static HRESULT surface_load_drawable(struct wined3d_surface *surface, struct wined3d_context *context) { + unsigned int sub_resource_idx = surface_get_sub_resource_idx(surface); struct wined3d_texture *texture = surface->container; RECT r; @@ -2830,7 +2831,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface, } surface_get_rect(surface, NULL, &r); - surface_load_location(surface, context, WINED3D_LOCATION_TEXTURE_RGB); + wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); surface_blt_to_drawable(texture->resource.device, context, WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
1
0
0
0
Henri Verbeet : wined3d: Use wined3d_texture_load_location() in surface_load_sysmem().
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: df099ca72b0eff7256e1199c0f501b36d35e45d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=df099ca72b0eff7256e1199c0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 3 15:25:29 2016 +0200 wined3d: Use wined3d_texture_load_location() in surface_load_sysmem(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 744912c..fdc7a51 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2792,7 +2792,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface, } if (sub_resource->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)) - surface_load_location(surface, context, WINED3D_LOCATION_TEXTURE_RGB); + wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); /* Download the surface to system memory. */ if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
1
0
0
0
Henri Verbeet : wined3d: Use wined3d_texture_load_location() in surface_upload_from_surface().
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: 4119b907b57b142b75ffabd6588a85cdafe4ce06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4119b907b57b142b75ffabd65…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 3 15:25:28 2016 +0200 wined3d: Use wined3d_texture_load_location() in surface_upload_from_surface(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 68a6f7d..744912c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1188,7 +1188,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P if (update_w == dst_w && update_h == dst_h) wined3d_texture_prepare_texture(dst_texture, context, FALSE); else - surface_load_location(dst_surface, context, WINED3D_LOCATION_TEXTURE_RGB); + wined3d_texture_load_location(dst_texture, dst_sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); wined3d_texture_bind_and_dirtify(dst_texture, context, FALSE); wined3d_texture_get_memory(src_texture, src_sub_resource_idx, &data,
1
0
0
0
Henri Verbeet : wined3d: Use wined3d_texture_load_location() in surface_blt_fbo().
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: 2437c77ebd5df99b8c408ff782d364ed4d60a26f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2437c77ebd5df99b8c408ff78…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 3 15:25:27 2016 +0200 wined3d: Use wined3d_texture_load_location() in surface_blt_fbo(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 8ae4b73..68a6f7d 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -502,6 +502,7 @@ static void surface_blt_fbo(const struct wined3d_device *device, struct wined3d_surface *dst_surface, DWORD dst_location, const RECT *dst_rect_in) { unsigned int dst_sub_resource_idx = surface_get_sub_resource_idx(dst_surface); + unsigned int src_sub_resource_idx = surface_get_sub_resource_idx(src_surface); struct wined3d_texture *dst_texture = dst_surface->container; struct wined3d_texture *src_texture = src_surface->container; const struct wined3d_gl_info *gl_info; @@ -545,9 +546,9 @@ static void surface_blt_fbo(const struct wined3d_device *device, * surface isn't required if the entire surface is overwritten. (And is * in fact harmful if we're being called by surface_load_location() with * the purpose of loading the destination surface.) */ - surface_load_location(src_surface, old_ctx, src_location); + wined3d_texture_load_location(src_texture, src_sub_resource_idx, old_ctx, src_location); if (!surface_is_full_rect(dst_surface, &dst_rect)) - surface_load_location(dst_surface, old_ctx, dst_location); + wined3d_texture_load_location(dst_texture, dst_sub_resource_idx, old_ctx, dst_location); else wined3d_texture_prepare_location(dst_texture, dst_sub_resource_idx, old_ctx, dst_location);
1
0
0
0
Iván Matellanes : msvcirt: Implement istream:: operator>> for streambufs.
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: 4c17eda4a25ebbc3f4c06daddafee06244b98465 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c17eda4a25ebbc3f4c06dadd…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Aug 3 10:34:28 2016 +0100 msvcirt: Implement istream::operator>> for streambufs. Signed-off-by: Iván Matellanes <matellanesivan(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 | 31 +++++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index e04262a..9a0a05b 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -3724,7 +3724,17 @@ istream* __thiscall istream_read_long_double(istream *this, double *ld) DEFINE_THISCALL_WRAPPER(istream_read_streambuf, 8) istream* __thiscall istream_read_streambuf(istream *this, streambuf *sb) { - FIXME("(%p %p) stub\n", this, sb); + ios *base = istream_get_ios(this); + int ch; + + TRACE("(%p %p)\n", this, sb); + + if (istream_ipfx(this, 0)) { + while ((ch = streambuf_sbumpc(base->sb)) != EOF) + if (streambuf_sputc(sb, ch) == EOF) + base->state |= IOSTATE_failbit; + istream_isfx(this); + } return this; } diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index 7e0f33c..ad0f057 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -338,6 +338,7 @@ static istream* (*__thiscall p_istream_read_unsigned_long)(istream*, ULONG*); static istream* (*__thiscall p_istream_read_float)(istream*, float*); static istream* (*__thiscall p_istream_read_double)(istream*, double*); static istream* (*__thiscall p_istream_read_long_double)(istream*, double*); +static istream* (*__thiscall p_istream_read_streambuf)(istream*, streambuf*); /* Emulate a __thiscall */ #ifdef __i386__ @@ -564,6 +565,7 @@ static BOOL init(void) SET(p_istream_read_float, "??5istream@@QEAAAEAV0@AEAM@Z"); SET(p_istream_read_double, "??5istream@@QEAAAEAV0@AEAN@Z"); SET(p_istream_read_long_double, "??5istream@@QEAAAEAV0@AEAO@Z"); + SET(p_istream_read_streambuf, "??5istream@@QEAAAEAV0@PEAVstreambuf@@@Z"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); p_operator_delete = (void*)GetProcAddress(msvcrt, "??3@YAXPAX@Z"); @@ -712,6 +714,7 @@ static BOOL init(void) SET(p_istream_read_float, "??5istream@@QAEAAV0@AAM@Z"); SET(p_istream_read_double, "??5istream@@QAEAAV0@AAN@Z"); SET(p_istream_read_long_double, "??5istream@@QAEAAV0@AAO@Z"); + SET(p_istream_read_streambuf, "??5istream@@QAEAAV0@PAVstreambuf@@@Z"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); @@ -4887,7 +4890,7 @@ static void test_istream_getdouble(void) static void test_istream_read(void) { istream is, *pis; - strstreambuf ssb, *pssb; + strstreambuf ssb, ssb_test, *pssb; int len, ret, i; /* makes tables narrower */ @@ -4903,9 +4906,10 @@ static void test_istream_read(void) ULONG ul, ulong_out[] = {4294967295ul, 4294967294ul, 2147483648ul, 1ul}; float f, float_out[] = {123.456f, 0.0f, 1.0f, 0.1f, -1.0f, -0.1f, FLT_MIN, -FLT_MIN, FLT_MAX, -FLT_MAX}; double d, double_out[] = {1.0, 0.1, 0.0, INFINITY, -INFINITY}; + const char *sbf_out[] = {"", "abcd\n", "abcdef"}; struct istream_read_test { enum { type_chr, type_str, type_shrt, type_ushrt, type_int, type_uint, - type_long, type_ulong, type_flt, type_dbl, type_ldbl } type; + type_long, type_ulong, type_flt, type_dbl, type_ldbl, type_sbf } type; const char *stream_content; ios_flags flags; int width; @@ -5041,8 +5045,19 @@ static void test_istream_read(void) {type_ldbl, "-1.69781699841e-1475l", 0, 6, /* 0.0 */ 2, IOSTATE_goodbit, 6, 20, FALSE}, {type_ldbl, "1.69781699841e1475", 0, 6, /* INF */ 3, IOSTATE_eofbit, 6, 18, FALSE}, {type_ldbl, "-1.69781699841e1475", 0, 6, /* -INF */ 4, IOSTATE_eofbit, 6, 19, FALSE}, + /* streambuf */ + {type_sbf, "", FLAGS_skipws, 6, /* "" */ 0, IOSTATE_faileof, 6, 0, FALSE}, + {type_sbf, " ", FLAGS_skipws, 6, /* "" */ 0, IOSTATE_faileof, 6, 2, FALSE}, + {type_sbf, "\r\nabcd\n", FLAGS_skipws, 6, /* "abc\n" */ 1, IOSTATE_goodbit, 6, 8, FALSE}, + {type_sbf, "abcdefg\n", 0, 6, /* "abcde" */ 2, IOSTATE_failbit, 6, 9, FALSE}, + {type_sbf, "abcdefg\n", 0, 0, /* "" */ 0, IOSTATE_failbit, 0, 9, FALSE} }; + pssb = call_func2(p_strstreambuf_dynamic_ctor, &ssb_test, 64); + ok(pssb == &ssb_test, "wrong return, expected %p got %p\n", &ssb_test, pssb); + ret = (int) call_func1(p_streambuf_allocate, &ssb_test.base); + ok(ret == 1, "expected 1 got %d\n", ret); + ssb_test.dynamic = 0; pssb = call_func2(p_strstreambuf_dynamic_ctor, &ssb, 64); ok(pssb == &ssb, "wrong return, expected %p got %p\n", &ssb, pssb); ret = (int) call_func1(p_streambuf_allocate, &ssb.base); @@ -5127,6 +5142,16 @@ static void test_istream_read(void) ok(d == double_out[tests[i].expected_val], "Test %d: expected %f got %f\n", i, double_out[tests[i].expected_val], d); break; + case type_sbf: + ssb_test.base.pbase = ssb_test.base.pptr = ssb_test.base.base; + ssb_test.base.epptr = ssb_test.base.base + tests[i].width; + pis = call_func2(p_istream_read_streambuf, &is, &ssb_test.base); + len = strlen(sbf_out[tests[i].expected_val]); + ok(ssb_test.base.pptr == ssb_test.base.pbase + len, "Test %d: wrong put pointer, expected %p got %p\n", + i, ssb_test.base.pbase + len, ssb_test.base.pptr); + ok(!strncmp(ssb_test.base.pbase, sbf_out[tests[i].expected_val], len), + "Test %d: expected %s got %s\n", i, sbf_out[tests[i].expected_val], ssb_test.base.pbase); + break; } ok(pis == &is, "Test %d: wrong return, expected %p got %p\n", i, &is, pis); @@ -5139,8 +5164,10 @@ static void test_istream_read(void) ssb.base.base + tests[i].expected_offset, ssb.base.gptr); } + ssb_test.dynamic = 1; call_func1(p_istream_vbase_dtor, &is); call_func1(p_strstreambuf_dtor, &ssb); + call_func1(p_strstreambuf_dtor, &ssb_test); } START_TEST(msvcirt)
1
0
0
0
Iván Matellanes : msvcirt: Implement istream:: operator>> for floats.
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: 9736024e99bc0781f269a8546e33fa1793c0dcbb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9736024e99bc0781f269a8546…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Aug 3 10:34:27 2016 +0100 msvcirt: Implement istream::operator>> for floats. Signed-off-by: Iván Matellanes <matellanesivan(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 | 37 ++++++++++++++++++++++-- dlls/msvcirt/tests/msvcirt.c | 69 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 102 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9736024e99bc0781f269a…
1
0
0
0
Iván Matellanes : msvcirt: Implement istream:: operator>> for integers.
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: d8bb77d84223d57fcf0d6f23a3d11a01c2c42206 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d8bb77d84223d57fcf0d6f23a…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Aug 3 10:34:26 2016 +0100 msvcirt: Implement istream::operator>> for integers. Signed-off-by: Iván Matellanes <matellanesivan(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 | 78 ++++++++++++++++++++++++-- dlls/msvcirt/tests/msvcirt.c | 128 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 199 insertions(+), 7 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d8bb77d84223d57fcf0d6…
1
0
0
0
Iván Matellanes : msvcirt: Implement istream:: operator>> for strings.
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: 605f7a45dad4ae13c51e7fcb462578330964578d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=605f7a45dad4ae13c51e7fcb4…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Wed Aug 3 10:34:25 2016 +0100 msvcirt: Implement istream::operator>> for strings. Signed-off-by: Iván Matellanes <matellanesivan(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 | 25 ++++++++++++++++++++++++- dlls/msvcirt/tests/msvcirt.c | 31 +++++++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index 361285a..605072a 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -3514,7 +3514,30 @@ istream* __thiscall istream_read_char(istream *this, char *ch) DEFINE_THISCALL_WRAPPER(istream_read_str, 8) istream* __thiscall istream_read_str(istream *this, char *str) { - FIXME("(%p %p) stub\n", this, str); + ios *base = istream_get_ios(this); + int ch, count = 0; + + TRACE("(%p %p)\n", this, str); + + if (istream_ipfx(this, 0)) { + if (str) { + for (ch = streambuf_sgetc(base->sb); + count < (unsigned int) base->width - 1 && !isspace(ch); + ch = streambuf_snextc(base->sb)) { + if (ch == EOF) { + base->state |= IOSTATE_eofbit; + break; + } + str[count++] = ch; + } + } + if (!count) /* nothing to output */ + base->state |= IOSTATE_failbit; + else /* append a null terminator */ + str[count] = 0; + base->width = 0; + istream_isfx(this); + } return this; } diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index a706703..6d97566 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -328,6 +328,7 @@ static streampos (*__thiscall p_istream_tellg)(istream*); static int (*__thiscall p_istream_getint)(istream*, char*); static int (*__thiscall p_istream_getdouble)(istream*, char*, int); static istream* (*__thiscall p_istream_read_char)(istream*, char*); +static istream* (*__thiscall p_istream_read_str)(istream*, char*); /* Emulate a __thiscall */ #ifdef __i386__ @@ -544,6 +545,7 @@ static BOOL init(void) SET(p_istream_getint, "?getint@istream@@AEAAHPEAD@Z"); SET(p_istream_getdouble, "?getdouble@istream@@AEAAHPEADH@Z"); SET(p_istream_read_char, "??5istream@@QEAAAEAV0@AEAD@Z"); + SET(p_istream_read_str, "??5istream@@QEAAAEAV0@PEAD@Z"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); p_operator_delete = (void*)GetProcAddress(msvcrt, "??3@YAXPAX@Z"); @@ -682,6 +684,7 @@ static BOOL init(void) SET(p_istream_getint, "?getint@istream@@AAEHPAD@Z"); SET(p_istream_getdouble, "?getdouble@istream@@AAEHPADH@Z"); SET(p_istream_read_char, "??5istream@@QAEAAV0@AAD@Z"); + SET(p_istream_read_str, "??5istream@@QAEAAV0@PAD@Z"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); @@ -4863,9 +4866,10 @@ static void test_istream_read(void) /* makes tables narrower */ const ios_io_state IOSTATE_faileof = IOSTATE_failbit|IOSTATE_eofbit; - char c, char_out[] = {-85, ' ', 'a', -50}; + char c, st[8], char_out[] = {-85, ' ', 'a', -50}; + const char *str_out[] = {"AAAAAAA", "abc", "a", "abc", "ab", "abcde"}; struct istream_read_test { - enum { type_chr } type; + enum { type_chr, type_str } type; const char *stream_content; ios_flags flags; int width; @@ -4882,6 +4886,22 @@ static void test_istream_read(void) {type_chr, " abc ", FLAGS_skipws, 6, /* 'a' */ 2, IOSTATE_goodbit, 6, 2, FALSE}, {type_chr, " a", FLAGS_skipws, 0, /* 'a' */ 2, IOSTATE_goodbit, 0, 2, FALSE}, {type_chr, "\xce", 0, 6, /* -50 */ 3, IOSTATE_goodbit, 6, 1, FALSE}, + /* str */ + {type_str, "", FLAGS_skipws, 6, /* "AAAAAAA" */ 0, IOSTATE_faileof, 6, 0, FALSE}, + {type_str, " ", FLAGS_skipws, 6, /* "AAAAAAA" */ 0, IOSTATE_faileof, 6, 1, FALSE}, + {type_str, " abc", FLAGS_skipws, 6, /* "abc" */ 1, IOSTATE_eofbit, 0, 4, FALSE}, + {type_str, " abc ", FLAGS_skipws, 6, /* "abc" */ 1, IOSTATE_goodbit, 0, 4, FALSE}, + {type_str, " a\tc", FLAGS_skipws, 6, /* "a" */ 2, IOSTATE_goodbit, 0, 2, FALSE}, + {type_str, " a\tc", 0, 6, /* "AAAAAAA" */ 0, IOSTATE_failbit, 0, 0, FALSE}, + {type_str, "abcde\n", 0, 4, /* "abc" */ 3, IOSTATE_goodbit, 0, 3, FALSE}, + {type_str, "abc\n", 0, 4, /* "abc" */ 3, IOSTATE_goodbit, 0, 3, FALSE}, + {type_str, "ab\r\n", 0, 3, /* "ab" */ 4, IOSTATE_goodbit, 0, 2, FALSE}, + {type_str, "abc", 0, 4, /* "abc" */ 3, IOSTATE_goodbit, 0, 3, FALSE}, + {type_str, "abc", 0, 1, /* "AAAAAAA" */ 0, IOSTATE_failbit, 0, 0, FALSE}, + {type_str, "\n", 0, 1, /* "AAAAAAA" */ 0, IOSTATE_failbit, 0, 0, FALSE}, + {type_str, "abcde\n", 0, 0, /* "abcde" */ 5, IOSTATE_goodbit, 0, 5, FALSE}, + {type_str, "\n", 0, 0, /* "AAAAAAA" */ 0, IOSTATE_failbit, 0, 0, FALSE}, + {type_str, "abcde", 0, -1, /* "abcde" */ 5, IOSTATE_eofbit, 0, 5, FALSE}, }; pssb = call_func2(p_strstreambuf_dynamic_ctor, &ssb, 64); @@ -4907,6 +4927,13 @@ static void test_istream_read(void) ok(c == char_out[tests[i].expected_val], "Test %d: expected %d got %d\n", i, char_out[tests[i].expected_val], c); break; + case type_str: + memset(st, 'A', sizeof(st)); + st[7] = 0; + pis = call_func2(p_istream_read_str, &is, st); + ok(!strcmp(st, str_out[tests[i].expected_val]), "Test %d: expected %s got %s\n", i, + str_out[tests[i].expected_val], st); + break; } ok(pis == &is, "Test %d: wrong return, expected %p got %p\n", i, &is, pis);
1
0
0
0
Daniel Lehman : msvcp140: Add sprintf.
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: 69ad826ebb286ba004b010b864da494e50be753d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=69ad826ebb286ba004b010b86…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Fri Apr 8 16:14:28 2016 -0700 msvcp140: Add sprintf. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/msvcp_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/msvcp90/msvcp_main.c b/dlls/msvcp90/msvcp_main.c index a60c4b6..c9a72d2 100644 --- a/dlls/msvcp90/msvcp_main.c +++ b/dlls/msvcp90/msvcp_main.c @@ -117,6 +117,16 @@ int __cdecl _scprintf(const char* fmt, ...) __ms_va_end(valist); return ret; } + +int __cdecl sprintf(char *buf, const char *fmt, ...) +{ + int ret; + __ms_va_list valist; + __ms_va_start(valist, fmt); + ret = __stdio_common_vsprintf(UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR, buf, -1, fmt, NULL, valist); + __ms_va_end(valist); + return ret; +} #endif static void init_cxx_funcs(void)
1
0
0
0
← Newer
1
...
68
69
70
71
72
73
74
...
78
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
Results per page:
10
25
50
100
200