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
December 2011
----- 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
810 discussions
Start a n
N
ew thread
Piotr Caban : msvcp90: Added ctype<wchar_t>:: toupper functions implementation.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: 8f3a5198bc5abe1a0f105c1665f82fdc3973ce74 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f3a5198bc5abe1a0f105c166…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 22 18:24:55 2011 +0100 msvcp90: Added ctype<wchar_t>::toupper functions implementation. --- dlls/msvcp90/locale.c | 29 +++++++++++++++++++++-------- dlls/msvcp90/msvcp90.spec | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 24d521f..0ffc25c 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -2207,15 +2207,23 @@ const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this, return call_ctype_wchar_do_tolower(this, first, last); } +/* _Towupper */ +wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype) +{ + TRACE("(%d %p)\n", ch, ctype); + return toupperW(ch); +} + /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */ /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */ /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */ /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch, 8) +#define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \ + wchar_t, (const ctype_wchar*, wchar_t), (this, ch)) wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch) { - FIXME("(%p %d) stub\n", this, ch); - return 0; + return _Towupper(ch, &this->ctype); } /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */ @@ -2223,11 +2231,16 @@ wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */ /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper, 12) +#define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \ + const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \ + (this, first, last)) const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this, wchar_t *first, const wchar_t *last) { - FIXME("(%p %p %p) stub\n", this, first, last); - return NULL; + TRACE("(%p %p %p)\n", this, first, last); + for(; first<last; first++) + *first = _Towupper(*first, &this->ctype); + return last; } /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */ @@ -2237,8 +2250,8 @@ const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this, DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch, 8) wchar_t __thiscall ctype_wchar_toupper_ch(const ctype_wchar *this, wchar_t ch) { - FIXME("(%p %d) stub\n", this, ch); - return 0; + TRACE("(%p %d)\n", this, ch); + return call_ctype_wchar_do_toupper_ch(this, ch); } /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */ @@ -2249,8 +2262,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper, 12) const wchar_t* __thiscall ctype_wchar_toupper(const ctype_wchar *this, wchar_t *first, const wchar_t *last) { - FIXME("(%p %p %p) stub\n", this, first, last); - return NULL; + TRACE("(%p %p %p)\n", this, first, last); + return call_ctype_wchar_do_toupper(this, first, last); } /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index f03e024..1555fac 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5801,7 +5801,7 @@ @ cdecl _Tolower(long ptr) @ cdecl _Toupper(long ptr) @ cdecl _Towlower(long ptr) -@ stub _Towupper +@ cdecl _Towupper(long ptr) @ cdecl _Wcrtomb(ptr long ptr ptr) @ cdecl _Wcscoll(ptr ptr ptr ptr ptr) @ stub _Wcsxfrm
1
0
0
0
Piotr Caban : msvcp90: Added ctype<wchar_t>:: tolower functions implementation.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: b4e9bd74cf89fdd95ad7c78051afcc727165b933 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4e9bd74cf89fdd95ad7c7805…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 22 18:24:46 2011 +0100 msvcp90: Added ctype<wchar_t>::tolower functions implementation. --- dlls/msvcp90/locale.c | 31 ++++++++++++++++++++++--------- dlls/msvcp90/msvcp90.spec | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 1a71f6f..24d521f 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -2148,15 +2148,23 @@ MSVCP_size_t __cdecl ctype_wchar__Getcat(const locale_facet **facet, const local return LC_CTYPE; } +/* _Towlower */ +wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype) +{ + TRACE("(%d %p)\n", ch, ctype); + return tolowerW(ch); +} + /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */ /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */ /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */ /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch, 8) -char __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch) +#define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \ + wchar_t, (const ctype_wchar*, wchar_t), (this, ch)) +wchar_t __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch) { - FIXME("(%p %d) stub\n", this, ch); - return 0; + return _Towlower(ch, &this->ctype); } /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */ @@ -2164,11 +2172,16 @@ char __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch) /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */ /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower, 12) +#define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \ + const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \ + (this, first, last)) const wchar_t* __thiscall ctype_wchar_do_tolower(const ctype_wchar *this, wchar_t *first, const wchar_t *last) { - FIXME("(%p %p %p) stub\n", this, first, last); - return NULL; + TRACE("(%p %p %p)\n", this, first, last); + for(; first<last; first++) + *first = _Towlower(*first, &this->ctype); + return last; } /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */ @@ -2178,8 +2191,8 @@ const wchar_t* __thiscall ctype_wchar_do_tolower(const ctype_wchar *this, DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch, 8) wchar_t __thiscall ctype_wchar_tolower_ch(const ctype_wchar *this, wchar_t ch) { - FIXME("(%p %d) stub\n", this, ch); - return 0; + TRACE("(%p %d)\n", this, ch); + return call_ctype_wchar_do_tolower_ch(this, ch); } /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */ @@ -2190,8 +2203,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower, 12) const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this, wchar_t *first, const wchar_t *last) { - FIXME("(%p %p %p) stub\n", this, first, last); - return NULL; + TRACE("(%p %p %p)\n", this, first, last); + return call_ctype_wchar_do_tolower(this, first, last); } /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index a5b5dbc..f03e024 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5800,7 +5800,7 @@ @ stub _Strxfrm @ cdecl _Tolower(long ptr) @ cdecl _Toupper(long ptr) -@ stub _Towlower +@ cdecl _Towlower(long ptr) @ stub _Towupper @ cdecl _Wcrtomb(ptr long ptr ptr) @ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
1
0
0
0
Piotr Caban : msvcp90: Added ctype<wchar_t>::widen functions implementation .
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: a75d94289b00b54c09bacc273d502be7e041ce8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a75d94289b00b54c09bacc273…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 22 18:24:36 2011 +0100 msvcp90: Added ctype<wchar_t>::widen functions implementation. --- dlls/msvcp90/locale.c | 118 ++++++++++++++++++++++++++++++++++++++------- dlls/msvcp90/msvcp90.spec | 12 ++-- 2 files changed, 107 insertions(+), 23 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a75d94289b00b54c09bac…
1
0
0
0
Piotr Caban : msvcp90: Added ctype<wchar_t>:: narrow functions implementation.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: 138db092982df47d31dbf3361e55e7b26f77d7a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=138db092982df47d31dbf3361…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 22 18:24:21 2011 +0100 msvcp90: Added ctype<wchar_t>::narrow functions implementation. --- dlls/msvcp90/locale.c | 82 ++++++++++++++++++++++++++++++++++-------- dlls/msvcp90/msvcp90.h | 5 +++ dlls/msvcp90/msvcp90.spec | 2 +- dlls/msvcp90/msvcp90_main.c | 5 +++ 4 files changed, 77 insertions(+), 17 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 7474586..76e55ac 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -22,6 +22,8 @@ #include "msvcp90.h" #include "locale.h" +#include "errno.h" +#include "limits.h" #include "windef.h" #include "winbase.h" @@ -1826,6 +1828,38 @@ ctype_wchar* __thiscall MSVCP_ctype_short_vector_dtor(ctype_wchar *this, unsigne return MSVCP_ctype_wchar_vector_dtor(this, flags); } +/* _Wcrtomb */ +int __cdecl _Wcrtomb(char *s, wchar_t wch, int *state, const _Cvtvec *cvt) +{ + int cp, size; + BOOL def; + + TRACE("%p %d %p %p\n", s, wch, state, cvt); + + if(cvt) + cp = cvt->page; + else + cp = ___lc_codepage_func(); + + if(!cp) { + if(wch > 255) { + *_errno() = EILSEQ; + return -1; + } + + *s = wch & 255; + return 1; + } + + size = WideCharToMultiByte(cp, 0, &wch, 1, s, MB_LEN_MAX, NULL, &def); + if(!size || def) { + *_errno() = EILSEQ; + return -1; + } + + return size; +} + /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */ /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */ /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */ @@ -1833,8 +1867,11 @@ ctype_wchar* __thiscall MSVCP_ctype_short_vector_dtor(ctype_wchar *this, unsigne DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow, 12) char __thiscall ctype_wchar__Donarrow(const ctype_wchar *this, wchar_t ch, char dflt) { - FIXME("(%p %d %d) stub\n", this, ch, dflt); - return 0; + char buf[MB_LEN_MAX]; + + TRACE("(%p %d %d)\n", this, ch, dflt); + + return _Wcrtomb(buf, ch, NULL, &this->cvt)==1 ? buf[0] : dflt; } /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */ @@ -1842,10 +1879,11 @@ char __thiscall ctype_wchar__Donarrow(const ctype_wchar *this, wchar_t ch, char /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */ /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch, 12) -wchar_t __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt) +#define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \ + char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt)) +char __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt) { - FIXME("(%p %d %d) stub\n", this, ch, dflt); - return 0; + return ctype_wchar__Donarrow(this, ch, dflt); } /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */ @@ -1853,11 +1891,16 @@ wchar_t __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */ /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow, 20) +#define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \ + const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \ + (this, first, last, dflt, dest)) const wchar_t* __thiscall ctype_wchar_do_narrow(const ctype_wchar *this, const wchar_t *first, const wchar_t *last, char dflt, char *dest) { - FIXME("(%p %p %p %d %p) stub\n", this, first, last, dflt, dest); - return NULL; + TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest); + for(; first<last; first++) + *dest++ = ctype_wchar__Donarrow(this, *first, dflt); + return last; } /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */ @@ -1865,11 +1908,18 @@ const wchar_t* __thiscall ctype_wchar_do_narrow(const ctype_wchar *this, /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */ /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s, 24) +#define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \ + const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \ + (this, first, last, dflt, dest, size)) const wchar_t* __thiscall ctype_wchar__Do_narrow_s(const ctype_wchar *this, const wchar_t *first, const wchar_t *last, char dflt, char *dest, MSVCP_size_t size) { - FIXME("(%p %p %p %d %p %lu) stub\n", this, first, last, dflt, dest, size); - return NULL; + TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size); + /* This function converts all multi-byte characters to dflt, + * thanks to it result size is known before converting */ + if(last-first > size) + ctype_base__Xran(); + return ctype_wchar_do_narrow(this, first, last, dflt, dest); } /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */ @@ -1879,8 +1929,8 @@ const wchar_t* __thiscall ctype_wchar__Do_narrow_s(const ctype_wchar *this, DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch, 12) char __thiscall ctype_wchar_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt) { - FIXME("(%p %d %d) stub\n", this, ch, dflt); - return 0; + TRACE("(%p %d %d)\n", this, ch, dflt); + return call_ctype_wchar_do_narrow_ch(this, ch, dflt); } /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */ @@ -1891,8 +1941,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow, 20) const wchar_t* __thiscall ctype_wchar_narrow(const ctype_wchar *this, const wchar_t *first, const wchar_t *last, char dflt, char *dest) { - FIXME("(%p %p %p %d %p) stub\n", this, first, last, dflt, dest); - return NULL; + TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest); + return call_ctype_wchar_do_narrow(this, first, last, dflt, dest); } /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */ @@ -1901,10 +1951,10 @@ const wchar_t* __thiscall ctype_wchar_narrow(const ctype_wchar *this, /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s, 24) const wchar_t* __thiscall ctype_wchar__Narrow_s(const ctype_wchar *this, const wchar_t *first, - const wchar_t *last, char dflt, char *dest, unsigned int size) + const wchar_t *last, char dflt, char *dest, MSVCP_size_t size) { - FIXME("(%p %p %p %d %p %d) stub\n", this, first, last, dflt, dest, size); - return NULL; + TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size); + return call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size); } /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */ diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 61567e8..c34e1b9 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -145,6 +145,11 @@ extern void *vtbl_wrapper_28; extern void *vtbl_wrapper_32; extern void *vtbl_wrapper_36; extern void *vtbl_wrapper_40; +extern void *vtbl_wrapper_44; +extern void *vtbl_wrapper_48; +extern void *vtbl_wrapper_52; +extern void *vtbl_wrapper_56; +extern void *vtbl_wrapper_60; #else diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 976ab8f..bcf9087 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5802,7 +5802,7 @@ @ cdecl _Toupper(long ptr) @ stub _Towlower @ stub _Towupper -@ stub _Wcrtomb +@ cdecl _Wcrtomb(ptr long ptr ptr) @ cdecl _Wcscoll(ptr ptr ptr ptr ptr) @ stub _Wcsxfrm # extern _Xbig diff --git a/dlls/msvcp90/msvcp90_main.c b/dlls/msvcp90/msvcp90_main.c index ac29af9..fa9513f 100644 --- a/dlls/msvcp90/msvcp90_main.c +++ b/dlls/msvcp90/msvcp90_main.c @@ -49,6 +49,11 @@ DEFINE_VTBL_WRAPPER(28); DEFINE_VTBL_WRAPPER(32); DEFINE_VTBL_WRAPPER(36); DEFINE_VTBL_WRAPPER(40); +DEFINE_VTBL_WRAPPER(44); +DEFINE_VTBL_WRAPPER(48); +DEFINE_VTBL_WRAPPER(52); +DEFINE_VTBL_WRAPPER(56); +DEFINE_VTBL_WRAPPER(60); #endif
1
0
0
0
Piotr Caban : msvcp90: Added ctype<wchar_t> constructors implementation.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: b4a93e46ccea70b69e9cd5d8452831c2bd17067a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4a93e46ccea70b69e9cd5d84…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 22 18:24:07 2011 +0100 msvcp90: Added ctype<wchar_t> constructors implementation. --- dlls/msvcp90/locale.c | 72 +++++++++++++++++++++++++++++++++++++----------- 1 files changed, 55 insertions(+), 17 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index ad72732..7474586 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -1674,16 +1674,16 @@ extern const vtable_ptr MSVCP_ctype_short_vtable; /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */ locale_id* __cdecl ctype_wchar__Id_func(void) { - FIXME("() stub\n"); - return NULL; + TRACE("()\n"); + return &ctype_wchar_id; } /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */ /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */ locale_id* __cdecl ctype_short__Id_func(void) { - FIXME("() stub\n"); - return NULL; + TRACE("()\n"); + return &ctype_short_id; } /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */ @@ -1693,7 +1693,9 @@ locale_id* __cdecl ctype_short__Id_func(void) DEFINE_THISCALL_WRAPPER(ctype_wchar__Init, 8) void __thiscall ctype_wchar__Init(ctype_wchar *this, _Locinfo *locinfo) { - FIXME("(%p %p) stub\n", this, locinfo); + TRACE("(%p %p)\n", this, locinfo); + this->ctype = _Locinfo__Getctype(locinfo); + this->cvt = _Locinfo__Getcvt(locinfo); } /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */ @@ -1702,9 +1704,11 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo, 12) ctype_wchar* __thiscall ctype_wchar_ctor_locinfo(ctype_wchar *this, _Locinfo *locinfo, MSVCP_size_t refs) { - FIXME("(%p %p %lu) stub\n", this, locinfo, refs); + TRACE("(%p %p %lu)\n", this, locinfo, refs); + ctype_base_ctor_refs(&this->base, refs); this->base.facet.vtable = &MSVCP_ctype_wchar_vtable; - return NULL; + ctype_wchar__Init(this, locinfo); + return this; } /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */ @@ -1723,9 +1727,17 @@ ctype_wchar* __thiscall ctype_short_ctor_locinfo(ctype_wchar *this, DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs, 8) ctype_wchar* __thiscall ctype_wchar_ctor_refs(ctype_wchar *this, MSVCP_size_t refs) { - FIXME("(%p %lu) stub\n", this, refs); + _Locinfo locinfo; + + TRACE("(%p %lu)\n", this, refs); + + ctype_base_ctor_refs(&this->base, refs); this->base.facet.vtable = &MSVCP_ctype_wchar_vtable; - return NULL; + + _Locinfo_ctor(&locinfo); + ctype_wchar__Init(this, &locinfo); + _Locinfo_dtor(&locinfo); + return this; } /* ??0?$ctype@G@std@@QAE@I@Z */ @@ -1739,13 +1751,22 @@ ctype_wchar* __thiscall ctype_short_ctor_refs(ctype_wchar *this, MSVCP_size_t re } /* ??0?$ctype@G@std@@IAE@PBDI@Z */ +/* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */ DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name, 12) ctype_wchar* __thiscall ctype_short_ctor_name(ctype_wchar *this, const char *name, MSVCP_size_t refs) { - FIXME("(%p %s %lu) stub\n", this, debugstr_a(name), refs); + _Locinfo locinfo; + + TRACE("(%p %s %lu)\n", this, debugstr_a(name), refs); + + ctype_base_ctor_refs(&this->base, refs); this->base.facet.vtable = &MSVCP_ctype_short_vtable; - return NULL; + + _Locinfo_ctor_cstr(&locinfo, name); + ctype_wchar__Init(this, &locinfo); + _Locinfo_dtor(&locinfo); + return this; } /* ??_F?$ctype@_W@std@@QAEXXZ */ @@ -1753,9 +1774,8 @@ ctype_wchar* __thiscall ctype_short_ctor_name(ctype_wchar *this, DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor, 4) ctype_wchar* __thiscall ctype_wchar_ctor(ctype_wchar *this) { - FIXME("(%p) stub\n", this); - this->base.facet.vtable = &MSVCP_ctype_wchar_vtable; - return NULL; + TRACE("(%p)\n", this); + return ctype_short_ctor_refs(this, 0); } /* ??_F?$ctype@G@std@@QAEXXZ */ @@ -1775,7 +1795,9 @@ ctype_wchar* __thiscall ctype_short_ctor(ctype_wchar *this) DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor, 4) void __thiscall ctype_wchar_dtor(ctype_wchar *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + if(this->ctype.delfl) + free((void*)this->ctype.table); } DEFINE_THISCALL_WRAPPER(MSVCP_ctype_wchar_vector_dtor, 8) @@ -1972,8 +1994,24 @@ const char* __thiscall ctype_wchar__Widen_s(const ctype_wchar *this, /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ MSVCP_size_t __cdecl ctype_wchar__Getcat(const locale_facet **facet, const locale *loc) { - FIXME("(%p %p) stub\n", facet, loc); - return 0; + TRACE("(%p %p)\n", facet, loc); + + if(facet && !*facet) { + _Locinfo locinfo; + + *facet = MSVCRT_operator_new(sizeof(ctype_wchar)); + if(!*facet) { + ERR("Out of memory\n"); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); + return 0; + } + + _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); + ctype_wchar_ctor_locinfo((ctype_wchar*)*facet, &locinfo, 0); + _Locinfo_dtor(&locinfo); + } + + return LC_CTYPE; } /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
1
0
0
0
Aric Stewart : usp10: Implement ScriptGetFontScriptTags.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: 525d9d151973b795a364a44d6f6c582d462c8cd2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=525d9d151973b795a364a44d6…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu Dec 22 10:46:34 2011 -0600 usp10: Implement ScriptGetFontScriptTags. --- dlls/usp10/shape.c | 60 +++++++++++++++++++++++++++++++++++++++++++ dlls/usp10/tests/usp10.c | 44 +++++++++++++++++++++++++++++++ dlls/usp10/usp10.c | 9 ++++++ dlls/usp10/usp10.spec | 2 +- dlls/usp10/usp10_internal.h | 1 + 5 files changed, 115 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index c238d09..7f23296 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -3775,3 +3775,63 @@ DWORD CMAP_GetGlyphIndex(HDC hdc, ScriptCache *psc, DWORD utf32c, LPWORD pgi, DW } return 0; } + +static HRESULT GSUB_GetFontScriptTags(LPCVOID table, OPENTYPE_TAG searchingFor, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags, LPCVOID* script_table) +{ + const GSUB_ScriptList *script; + const GSUB_Header* header = (const GSUB_Header*)table; + int i; + HRESULT rc = S_OK; + + script = (const GSUB_ScriptList*)((const BYTE*)header + GET_BE_WORD(header->ScriptList)); + + *pcTags = 0; + TRACE("%i scripts in this font\n",GET_BE_WORD(script->ScriptCount)); + if (!searchingFor && cMaxTags < GET_BE_WORD(script->ScriptCount)) + rc = E_OUTOFMEMORY; + for (i = 0; i < GET_BE_WORD(script->ScriptCount); i++) + { + if (searchingFor) + { + if (strncmp(script->ScriptRecord[i].ScriptTag, (char*)&searchingFor,4)==0) + { + pScriptTags[0] = MS_MAKE_TAG(script->ScriptRecord[i].ScriptTag[0], script->ScriptRecord[i].ScriptTag[1], script->ScriptRecord[i].ScriptTag[2], script->ScriptRecord[i].ScriptTag[3]); + *pcTags = 1; + if (script_table) + { + int offset = GET_BE_WORD(script->ScriptRecord[i].Script); + *script_table = ((const BYTE*)script + offset); + } + break; + } + } + else if (i < cMaxTags) + { + pScriptTags[i] = MS_MAKE_TAG(script->ScriptRecord[i].ScriptTag[0], script->ScriptRecord[i].ScriptTag[1], script->ScriptRecord[i].ScriptTag[2], script->ScriptRecord[i].ScriptTag[3]); + *pcTags = *pcTags + 1; + } + } + return rc; +} + +HRESULT SHAPE_GetFontScriptTags( HDC hdc, ScriptCache *psc, + SCRIPT_ANALYSIS *psa, int cMaxTags, + OPENTYPE_TAG *pScriptTags, int *pcTags) +{ + HRESULT hr; + OPENTYPE_TAG searching = 0x00000000; + + if (!psc->GSUB_Table) + psc->GSUB_Table = load_gsub_table(hdc); + + if (psa) + { + if (ShapingData[psa->eScript].otTag[0] != 0) + searching = MS_MAKE_TAG(ShapingData[psa->eScript].otTag[0], ShapingData[psa->eScript].otTag[1], ShapingData[psa->eScript].otTag[2], ShapingData[psa->eScript].otTag[3]); + } + + hr = GSUB_GetFontScriptTags(psc->GSUB_Table, searching, cMaxTags, pScriptTags, pcTags, NULL); + if (FAILED(hr)) + *pcTags = 0; + return hr; +} diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 2e05f48..cdd1510 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -59,6 +59,8 @@ static HRESULT (WINAPI *pScriptShapeOpenType)( HDC hdc, SCRIPT_CACHE *psc, SCRIP static DWORD (WINAPI *pGetGlyphIndicesW)(HDC hdc, LPCWSTR lpstr, INT count, LPWORD pgi, DWORD flags); +static HRESULT (WINAPI *pScriptGetFontScriptTags)( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags); + static inline void _test_items_ok(LPCWSTR string, DWORD cchString, SCRIPT_CONTROL *Control, SCRIPT_STATE *State, DWORD nItems, const itemTest* items, BOOL nItemsToDo, @@ -2865,6 +2867,46 @@ static void test_newlines(void) ok(count == 4, "got %d expected 4\n", count); } +static void test_ScriptGetFontFunctions(HDC hdc) +{ + HRESULT hr; + pScriptGetFontScriptTags = (void*)GetProcAddress(GetModuleHandleA("usp10.dll"), "ScriptGetFontScriptTags"); + if (!pScriptGetFontScriptTags) + { + win_skip("ScriptGetFontScriptTags not available on this platform\n"); + } + else + { + SCRIPT_CACHE sc = NULL; + OPENTYPE_TAG tags[5]; + int count = 0; + + hr = pScriptGetFontScriptTags(hdc, &sc, NULL, 0, NULL, NULL); + ok(hr == E_INVALIDARG,"Incorrect return code\n"); + ok(sc == NULL, "ScriptCache should remain uninitialized\n"); + hr = pScriptGetFontScriptTags(hdc, &sc, NULL, 0, NULL, &count); + ok(hr == E_INVALIDARG,"Incorrect return code\n"); + ok(sc == NULL, "ScriptCache should remain uninitialized\n"); + hr = pScriptGetFontScriptTags(hdc, &sc, NULL, 5, tags, NULL); + ok(hr == E_INVALIDARG,"Incorrect return code\n"); + ok(sc == NULL, "ScriptCache should remain uninitialized\n"); + hr = pScriptGetFontScriptTags(hdc, &sc, NULL, 0, tags, &count); + ok(hr == E_INVALIDARG,"Incorrect return code\n"); + ok(sc == NULL, "ScriptCache should remain uninitialized\n"); + hr = pScriptGetFontScriptTags(NULL, &sc, NULL, 5, tags, &count); + ok(hr == E_PENDING,"Incorrect return code\n"); + ok(sc == NULL, "ScriptCache should remain uninitialized\n"); + hr = pScriptGetFontScriptTags(hdc, &sc, NULL, 5, tags, &count); + ok((hr == S_OK || hr == E_OUTOFMEMORY),"Incorrect return code\n"); + if (hr == S_OK) + ok(count <= 5, "Count should be less or equal to 5 with S_OK return\n"); + else if (hr == E_OUTOFMEMORY) + ok(count == 0, "Count should be 0 with E_OUTOFMEMORY return\n"); + ok(sc != NULL, "ScriptCache should be initialized\n"); + ScriptFreeCache(&sc); + } +} + START_TEST(usp10) { HWND hwnd; @@ -2917,6 +2959,8 @@ START_TEST(usp10) test_ScriptBreak(); test_newlines(); + test_ScriptGetFontFunctions(hdc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); } diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 93d7b0f..14674a7 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -3525,3 +3525,12 @@ HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *sva, const int *advance, for (i = 0; i < num_glyphs; i++) justify[i] = advance[i]; return S_OK; } + +HRESULT WINAPI ScriptGetFontScriptTags( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags) +{ + HRESULT hr; + if (!pScriptTags || !pcTags || cMaxTags == 0) return E_INVALIDARG; + if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr; + + return SHAPE_GetFontScriptTags(hdc, (ScriptCache *)*psc, psa, cMaxTags, pScriptTags, pcTags); +} diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec index 05269c5..63375a5 100644 --- a/dlls/usp10/usp10.spec +++ b/dlls/usp10/usp10.spec @@ -10,7 +10,7 @@ @ stub ScriptGetFontFeatureTags @ stub ScriptGetFontLanguageTags @ stdcall ScriptGetFontProperties(long ptr ptr) -@ stub ScriptGetFontScriptTags +@ stdcall ScriptGetFontScriptTags(long ptr ptr long ptr ptr) @ stdcall ScriptGetGlyphABCWidth(ptr ptr long ptr) @ stdcall ScriptGetLogicalWidths(ptr long long ptr ptr ptr ptr) @ stdcall ScriptGetProperties(ptr long) diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index ea04324..559a0bc 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -184,6 +184,7 @@ void SHAPE_ApplyDefaultOpentypeFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYS HRESULT SHAPE_CheckFontForRequiredFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa) DECLSPEC_HIDDEN; void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp) DECLSPEC_HIDDEN; INT SHAPE_does_GSUB_feature_apply_to_chars(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, const WCHAR *chars, INT write_dir, INT count, const char* feature) DECLSPEC_HIDDEN; +HRESULT SHAPE_GetFontScriptTags( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags); void Indic_ReorderCharacters( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, LPWSTR input, int cChars, IndicSyllable **syllables, int *syllable_count, lexical_function lexical_f, reorder_function reorder_f, BOOL modern) DECLSPEC_HIDDEN; void Indic_ParseSyllables( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, LPCWSTR input, const int cChar, IndicSyllable **syllables, int *syllable_count, lexical_function lex, BOOL modern);
1
0
0
0
Jörg Höhle : winealsa: Use an ALSA buffer of 4 periods to limit prefill.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: 6d17715b01dc09a2091e5d7ed4932da8f2504e02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6d17715b01dc09a2091e5d7ed…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Fri Nov 11 06:33:24 2011 +0400 winealsa: Use an ALSA buffer of 4 periods to limit prefill. --- dlls/winealsa.drv/mmdevdrv.c | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index e79a7b6..2557e6e 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -945,6 +945,24 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, This->hw_params, &alsa_period_us, NULL)) < 0) WARN("Unable to set period time near %u: %d (%s)\n", alsa_period_us, err, snd_strerror(err)); + /* ALSA updates the output variable alsa_period_us */ + + This->mmdev_period_frames = MulDiv(fmt->nSamplesPerSec, + This->mmdev_period_rt, 10000000); + + This->bufsize_frames = MulDiv(duration, fmt->nSamplesPerSec, 10000000); + + /* Buffer 4 ALSA periods if large enough, else 4 mmdevapi periods */ + This->alsa_bufsize_frames = This->mmdev_period_frames * 4; + if(err < 0 || alsa_period_us < period / 10) + err = snd_pcm_hw_params_set_buffer_size_near(This->pcm_handle, + This->hw_params, &This->alsa_bufsize_frames); + else{ + unsigned int periods = 4; + err = snd_pcm_hw_params_set_periods_near(This->pcm_handle, This->hw_params, &periods, NULL); + } + if(err < 0) + WARN("Unable to set buffer size: %d (%s)\n", err, snd_strerror(err)); if((err = snd_pcm_hw_params(This->pcm_handle, This->hw_params)) < 0){ WARN("Unable to set hw params: %d (%s)\n", err, snd_strerror(err)); @@ -1008,12 +1026,10 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, /* Check if the ALSA buffer is so small that it will run out before * the next MMDevAPI period tick occurs. Allow a little wiggle room * with 120% of the period time. */ - This->mmdev_period_frames = (fmt->nSamplesPerSec * This->mmdev_period_rt) / 10000000.; if(This->alsa_bufsize_frames < 1.2 * This->mmdev_period_frames) - FIXME("ALSA buffer time is smaller than our period time. Expect underruns. (%lu < %u)\n", + FIXME("ALSA buffer time is too small. Expect underruns. (%lu < %u * 1.2)\n", This->alsa_bufsize_frames, This->mmdev_period_frames); - This->bufsize_frames = ceil((duration / 10000000.) * fmt->nSamplesPerSec); This->local_buffer = HeapAlloc(GetProcessHeap(), 0, This->bufsize_frames * fmt->nBlockAlign); if(!This->local_buffer){
1
0
0
0
André Hentschel : include: Add CM_DRP_* and CM_CRP_* defines to cfgmgr32.h.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: 821358d05e28ad1d68696d3f48acc6bc7eaecc42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=821358d05e28ad1d68696d3f4…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Dec 21 20:49:57 2011 +0100 include: Add CM_DRP_* and CM_CRP_* defines to cfgmgr32.h. --- include/cfgmgr32.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/include/cfgmgr32.h b/include/cfgmgr32.h index 64f0881..e3966f9 100644 --- a/include/cfgmgr32.h +++ b/include/cfgmgr32.h @@ -108,6 +108,56 @@ typedef DWORD CONFIGRET; #define MAX_GUID_STRING_LEN 39 #define MAX_PROFILE_LEN 80 +#define CM_DRP_DEVICEDESC 0x01 +#define CM_DRP_HARDWAREID 0x02 +#define CM_DRP_COMPATIBLEIDS 0x03 +#define CM_DRP_UNUSED0 0x04 +#define CM_DRP_SERVICE 0x05 +#define CM_DRP_UNUSED1 0x06 +#define CM_DRP_UNUSED2 0x07 +#define CM_DRP_CLASS 0x08 +#define CM_DRP_CLASSGUID 0x09 +#define CM_DRP_DRIVER 0x0A +#define CM_DRP_CONFIGFLAGS 0x0B +#define CM_DRP_MFG 0x0C +#define CM_DRP_FRIENDLYNAME 0x0D +#define CM_DRP_LOCATION_INFORMATION 0x0E +#define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0F +#define CM_DRP_CAPABILITIES 0x10 +#define CM_DRP_UI_NUMBER 0x11 +#define CM_DRP_UPPERFILTERS 0x12 +#define CM_DRP_LOWERFILTERS 0x13 +#define CM_DRP_BUSTYPEGUID 0x14 +#define CM_DRP_LEGACYBUSTYPE 0x15 +#define CM_DRP_BUSNUMBER 0x16 +#define CM_DRP_ENUMERATOR_NAME 0x17 +#define CM_DRP_SECURITY 0x18 +#define CM_DRP_SECURITY_SDS 0x19 +#define CM_DRP_DEVTYPE 0x1A +#define CM_DRP_EXCLUSIVE 0x1B +#define CM_DRP_CHARACTERISTICS 0x1C +#define CM_DRP_ADDRESS 0x1D +#define CM_DRP_UI_NUMBER_DESC_FORMAT 0x1E +#define CM_DRP_DEVICE_POWER_DATA 0x1F +#define CM_DRP_REMOVAL_POLICY 0x20 +#define CM_DRP_REMOVAL_POLICY_HW_DEFAULT 0x21 +#define CM_DRP_REMOVAL_POLICY_OVERRIDE 0x22 +#define CM_DRP_INSTALL_STATE 0x23 +#define CM_DRP_LOCATION_PATHS 0x24 +#define CM_DRP_BASE_CONTAINERID 0x25 +#define CM_DRP_MIN 0x01 +#define CM_DRP_MAX 0x25 + +#define CM_CRP_UPPERFILTERS CM_DRP_UPPERFILTERS +#define CM_CRP_LOWERFILTERS CM_DRP_LOWERFILTERS +#define CM_CRP_SECURITY CM_DRP_SECURITY +#define CM_CRP_SECURITY_SDS CM_DRP_SECURITY_SDS +#define CM_CRP_DEVTYPE CM_DRP_DEVTYPE +#define CM_CRP_EXCLUSIVE CM_DRP_EXCLUSIVE +#define CM_CRP_CHARACTERISTICS CM_DRP_CHARACTERISTICS +#define CM_CRP_MIN CM_DRP_MIN +#define CM_CRP_MAX CM_DRP_MAX + typedef DWORD DEVINST, *PDEVINST; typedef DWORD DEVNODE, *PDEVNODE; typedef HANDLE HMACHINE, *PHMACHINE;
1
0
0
0
Stefan Leichter : dhcpcsvc: New stub dll.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: 9aeda0df492133875e9984ac036ab7d9861c2140 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9aeda0df492133875e9984ac0…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Thu Dec 22 00:04:05 2011 +0100 dhcpcsvc: New stub dll. --- configure | 1 + configure.ac | 1 + dlls/dhcpcsvc/Makefile.in | 5 ++++ dlls/dhcpcsvc/dhcpcsvc.c | 41 +++++++++++++++++++++++++++++++++++++++ dlls/dhcpcsvc/dhcpcsvc.spec | 45 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 1000905..804487f 100755 --- a/configure +++ b/configure @@ -14988,6 +14988,7 @@ wine_fn_config_test dlls/ddraw/tests ddraw_test wine_fn_config_dll ddrawex enable_ddrawex wine_fn_config_test dlls/ddrawex/tests ddrawex_test wine_fn_config_dll devenum enable_devenum po +wine_fn_config_dll dhcpcsvc enable_dhcpcsvc wine_fn_config_dll dinput enable_dinput implib,po,staticimplib wine_fn_config_test dlls/dinput/tests dinput_test wine_fn_config_dll dinput8 enable_dinput8 implib diff --git a/configure.ac b/configure.ac index b050b60..1a7b56f 100644 --- a/configure.ac +++ b/configure.ac @@ -2497,6 +2497,7 @@ WINE_CONFIG_TEST(dlls/ddraw/tests) WINE_CONFIG_DLL(ddrawex) WINE_CONFIG_TEST(dlls/ddrawex/tests) WINE_CONFIG_DLL(devenum,,[po]) +WINE_CONFIG_DLL(dhcpcsvc) WINE_CONFIG_DLL(dinput,,[implib,po,staticimplib]) WINE_CONFIG_TEST(dlls/dinput/tests) WINE_CONFIG_DLL(dinput8,,[implib]) diff --git a/dlls/dhcpcsvc/Makefile.in b/dlls/dhcpcsvc/Makefile.in new file mode 100644 index 0000000..c1d86ca --- /dev/null +++ b/dlls/dhcpcsvc/Makefile.in @@ -0,0 +1,5 @@ +MODULE = dhcpcsvc.dll + +C_SRCS = dhcpcsvc.c + +@MAKE_DLL_RULES@ diff --git a/dlls/dhcpcsvc/dhcpcsvc.c b/dlls/dhcpcsvc/dhcpcsvc.c new file mode 100644 index 0000000..4927aac --- /dev/null +++ b/dlls/dhcpcsvc/dhcpcsvc.c @@ -0,0 +1,41 @@ +/* + * Copyright 2011 Stefan Leichter + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dhcpcsvc); + +BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) +{ + TRACE("%p, %u, %p\n", hinst, reason, reserved); + + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls( hinst ); + break; + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} diff --git a/dlls/dhcpcsvc/dhcpcsvc.spec b/dlls/dhcpcsvc/dhcpcsvc.spec new file mode 100644 index 0000000..97194a6 --- /dev/null +++ b/dlls/dhcpcsvc/dhcpcsvc.spec @@ -0,0 +1,45 @@ +@ stub DhcpAcquireParameters +@ stub DhcpAcquireParametersByBroadcast +@ stub DhcpCApiCleanup +@ stub DhcpCApiInitialize +@ stub DhcpDeRegisterConnectionStateNotification +@ stub DhcpDeRegisterOptions +@ stub DhcpDeRegisterParamChange +@ stub DhcpDelPersistentRequestParams +@ stub DhcpEnumClasses +@ stub DhcpFallbackRefreshParams +@ stub DhcpFreeMem +@ stub DhcpGetDhcpServicedConnctions +@ stub DhcpGetNotificationStatus +@ stub DhcpHandlePnPEvent +@ stub DhcpLeaseIpAddress +@ stub DhcpLeaseIpAddressEx +@ stub DhcpNotifyConfigChange +@ stub DhcpNotifyConfigChangeEx +@ stub DhcpNotifyMediaReconnected +@ stub DhcpOpenGlobalEvent +@ stub DhcpPersistentRequestParams +@ stub DhcpQueryHWInfo +@ stub DhcpRegisterConnectionStateNotification +@ stub DhcpRegisterOptions +@ stub DhcpRegisterParamChange +@ stub DhcpReleaseIpAddressLease +@ stub DhcpReleaseIpAddressLeaseEx +@ stub DhcpReleaseParameters +@ stub DhcpRemoveDNSRegistration +@ stub DhcpRenewIpAddressLease +@ stub DhcpRenewIpAddressLeaseEx +@ stub DhcpRequestCachedParams +@ stub DhcpRequestOptions +@ stub DhcpRequestParams +@ stub DhcpSetMSFTVendorSpecificOptions +@ stub DhcpStaticRefreshParams +@ stub DhcpUndoRequestParams +@ stub McastApiCleanup +@ stub McastApiStartup +@ stub McastEnumerateScopes +@ stub McastGenUID +@ stub McastReleaseAddress +@ stub McastRenewAddress +@ stub McastRequestAddress +@ stub ServiceMain
1
0
0
0
Huw Davies : gdi32/tests: Add tests for geometric solid pens.
by Alexandre Julliard
22 Dec '11
22 Dec '11
Module: wine Branch: master Commit: 8caa0a05bd41abf72c1e175ea563d3292d0414fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8caa0a05bd41abf72c1e175ea…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Dec 22 13:00:44 2011 +0000 gdi32/tests: Add tests for geometric solid pens. --- dlls/gdi32/tests/dib.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/tests/dib.c b/dlls/gdi32/tests/dib.c index 120c449..5fd3f99 100644 --- a/dlls/gdi32/tests/dib.c +++ b/dlls/gdi32/tests/dib.c @@ -137,6 +137,8 @@ static const char *sha1_graphics_a8r8g8b8[] = "e462052a03dbe4ec3814db7700e166d00d4d686f", "a27917d4db49ce77989fae246015aeb2a28520ee", "657514a4ca1f2b6ca7a125ad58dfed82099a37d1", + "5e0549fdcf0fc7c50054dccc51d37fc734ab8134", + "eca1998a4d79fb81b2a4103f79e3b846a864eaaf", NULL }; @@ -200,6 +202,8 @@ static const char *sha1_graphics_a8r8g8b8_bitfields[] = "0cda6b3297003b3ccd6d5baa17e1ca9bb7c56f08", "b2c8e1ebb9435031fe068442f479d1304096e79f", "657514a4ca1f2b6ca7a125ad58dfed82099a37d1", + "5e0549fdcf0fc7c50054dccc51d37fc734ab8134", + "eca1998a4d79fb81b2a4103f79e3b846a864eaaf", NULL }; @@ -263,6 +267,8 @@ static const char *sha1_graphics_a8b8g8r8[] = "87f57a31253a38dbf3dc3070473328fa04b68a48", "db64cc4d830fc35ed170b53943e722b2342954d4", "9988ceca44dafbee247aece1f027c06c27c01652", + "d80d45a97bc877b50ba2c3f720d5197f2f1c5fc5", + "b76e0724496e471b01ef8b34f8beba69f5bde261", NULL }; @@ -326,6 +332,8 @@ static const char *sha1_graphics_r10g10b10[] = "8ea5d7e4bebc40a1d91b04b12e1c11a42c188095", "317521e576801acaea62c76fe16813cdfe20f4ad", "ce0fc29bb0281d6c955d64e239254ef9e6dbc06d", + "5ab49e7b61eddd3bab4182f362a38e1ab6a5a3b7", + "555b6f04ba8dec9e2a60693dcaac594227052727", NULL }; @@ -389,6 +397,8 @@ static const char *sha1_graphics_r6g6b6[] = "aecb242c31f31a90f071b6455ea7d808d4ea22e3", "77ea86e51a94b11a8081b29696cb4115687843e3", "d67b897cad72d31e75359094007b1346fd8806ea", + "442bcf4d94a649c9406c3b0bf2f00cb7c6a4d1d4", + "3d0853f4f7580d7cd5148c21c34d878ecf39a5f3", NULL }; @@ -452,6 +462,8 @@ static const char *sha1_graphics_24[] = "354b92008a8409c62d0fa1dff1532c5943aa37a2", "8dc9cb7deae5c24d1eae004d53893fa6caf4723c", "cf311a96d41bd98fdbdfb5dfaac4ba1ba9b7d6da", + "bf5ec23456efe00e1e0931c17de9040ab2092858", + "0bbdf0a0489428f96e3c1d3e5305f9a893820852", NULL }; @@ -519,6 +531,8 @@ static const char *sha1_graphics_r5g5b5[] = "295ec16530126046790fb734e99f86f5b3b74ed8", "d98b0561010606b55a1b9b85fbc93640f681d256", "1c1499051860b7caa25173b328ca9c862f01dd1a", + "a655512753bc90e6d4eb3848f69e96db1ad348e5", + "2230f36f12d4becb242e2962fa1b3694db2496ca", NULL }; @@ -581,6 +595,8 @@ static const char *sha1_graphics_r4g4b4[] = "7587a9c87cab1eca827807f351bb67ca184d1ac5", "b53ef0b5c674822e784903a9dbdd3b386d9f2350", "5505d2ed20dc61ffe48832ecf5329162a5ceb734", + "9f72be4467219a345b1164205d1fbfda2d64271e", + "13d1634e03bc49cfe14a32278d9b1f5ddbb9be10", NULL }; @@ -649,6 +665,8 @@ static const char *sha1_graphics_8_color[] = "e58d9c0acf0219d0839e1dbd162e08a765ed7f0f", "34ca0f9660e1889f9f2c0deb80535d3c4f349fa4", "2c07272462c68cf5944b03e2aa049475b99143c5", + "07ca369fb875d37b9cf855045f528af1827edec4", + "5e9e3e71b06c5efe20f93b3838e745b40b878471", NULL }; @@ -722,6 +740,8 @@ static const char *sha1_graphics_8_grayscale[] = "0ca8775d9a61ccc251d1e6f2e3cfd26a24ae24a2", "17ae603c199a5d6695d198a7f36e6d7263990951", "1918a33f59d3500204ffc573318a39e9ff754221", + "5449d1aef0d2d6af9ac3fd7adb32c23ddc9be1e2", + "55d302ece31a9b7fc4be4a07a53767ba210273e7", NULL }; @@ -788,6 +808,8 @@ static const char *sha1_graphics_8[] = "bd28d77cd85b20a2384d6b25082cfd884bba683e", "7e591ec8ae9bb61c3a443c93f071cab2b8978394", "f81c70b6ee2d4690f9f7c797c66582b176f8dcef", + "d3f359cac7318ce09e0531d51c8c2b316cf3a23b", + "293c41a7ed923a4617560481ae8815cebf83701a", NULL }; @@ -850,6 +872,8 @@ static const char *sha1_graphics_4[] = "28a6b9f7927e99e53cf46f0333d29168cb10e920", "029552113292cc110fd6b7888e766628950aaeef", "297f6ad15200bffbf15198324ee8f27a61a6f2d4", + "70cfa427a1a0d6f2232b1fd544905d48af69cb98", + "287ea7db721e641439888cb9f4bac3a5f16124eb", NULL }; @@ -912,6 +936,8 @@ static const char *sha1_graphics_4_grayscale[] = "ada3b7c34946e584dcdf4203e07cfa3dad02bc63", "c2f61571b067a44b30f56b4658c9606f0edfc0f3", "58f400c9bb78e49a879276fb049edfc9c981740a", + "cb3794f676d6e9502f27172ac7d79a12ca2ba32c", + "aa89612798fbc4e11a73b6233c0ac4832e6af2f9", NULL }; @@ -992,6 +1018,8 @@ static const char *sha1_graphics_1[] = "781d8c5cbc28591fd48fce06f984c502fdc6b363", "df510792a7790cc699532b1420d43c6d4da2ae2f", "55c26d22f11d80b73383fa57d0fac552d705b092", + "14443b33a9879bf829ed3b06e1aef0d7dcf662cc", + "53ab1fcccd09fa5cbff77497f36a70a3b3cb8b81", NULL }; @@ -1157,6 +1185,11 @@ static const RECT wide_lines[] = { 61, 200, 61, 100}, }; +static const POINT poly_lines[] = +{ + {100, 100}, {200, 100}, {200, 200}, {100, 200} +}; + static const RECT patblt_clips[] = { {120, 120, 140, 126}, /* unclipped */ @@ -1228,6 +1261,7 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh { DWORD dib_size = get_dib_size(bmi); HPEN solid_pen, dashed_pen, wide_pen, orig_pen; + LOGBRUSH log_brush; HBRUSH solid_brush, dib_brush, hatch_brush, orig_brush; HBITMAP bmp; INT i, j, x, y, hatch_style; @@ -2275,6 +2309,32 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh compare_hash(bmi, bits, sha1, "wide pen" ); memset(bits, 0xcc, dib_size); + SelectObject( hdc, orig_pen ); + DeleteObject( wide_pen ); + + log_brush.lbStyle = BS_SOLID; + log_brush.lbColor = RGB(0xff, 0, 0); + log_brush.lbHatch = 0; + + wide_pen = ExtCreatePen( PS_GEOMETRIC | PS_ENDCAP_FLAT | PS_JOIN_MITER | PS_SOLID, + 9, &log_brush, 0, NULL ); + SelectObject( hdc, wide_pen ); + + Polyline( hdc, poly_lines, sizeof(poly_lines) / sizeof(poly_lines[0]) ); + compare_hash(bmi, bits, sha1, "wide pen - flat caps, mitred" ); + memset(bits, 0xcc, dib_size); + + SelectObject( hdc, orig_pen ); + DeleteObject( wide_pen ); + + wide_pen = ExtCreatePen( PS_GEOMETRIC | PS_ENDCAP_SQUARE | PS_JOIN_BEVEL | PS_SOLID, + 16, &log_brush, 0, NULL ); + SelectObject( hdc, wide_pen ); + + Polyline( hdc, poly_lines, sizeof(poly_lines) / sizeof(poly_lines[0]) ); + compare_hash(bmi, bits, sha1, "wide pen - square caps, bevelled" ); + memset(bits, 0xcc, dib_size); + SelectObject(hdc, orig_brush); SelectObject(hdc, orig_pen); DeleteObject(hrgn);
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
81
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Results per page:
10
25
50
100
200