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
March 2013
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
531 discussions
Start a n
N
ew thread
Jacek Caban : secur32: Added support for grbitEnabledProtocols in schan_AcquireClientCredentials.
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: 0f2e0365ea1f5c6baba4cfd9c0ff69defe66d7ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f2e0365ea1f5c6baba4cfd9c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 27 12:22:23 2013 +0100 secur32: Added support for grbitEnabledProtocols in schan_AcquireClientCredentials. --- dlls/secur32/schannel.c | 169 ++++++++++++++++++++++++++++++++++++------- dlls/secur32/secur32_priv.h | 1 + 2 files changed, 145 insertions(+), 25 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 387eaad..87bb942 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -25,10 +25,13 @@ #include "windef.h" #include "winbase.h" +#include "winreg.h" #include "winnls.h" #include "sspi.h" #include "schannel.h" #include "secur32_priv.h" + +#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(secur32); @@ -62,6 +65,12 @@ static struct schan_handle *schan_free_handles; static SIZE_T schan_handle_table_size; static SIZE_T schan_handle_count; +/* Protocols enabled, only those may be used for the connection. */ +static DWORD config_enabled_protocols; + +/* Protocols disabled by default. They are enabled for using, but disabled when caller asks for default settings. */ +static DWORD config_default_disabled_protocols; + static ULONG_PTR schan_alloc_handle(void *object, enum schan_handle_type type) { struct schan_handle *handle; @@ -141,11 +150,110 @@ static void *schan_get_object(ULONG_PTR handle_idx, enum schan_handle_type type) return handle->object; } +static void read_config(void) +{ + DWORD enabled = 0, default_disabled = 0; + HKEY protocols_key, key; + WCHAR subkey_name[64]; + unsigned i; + DWORD res; + + static BOOL config_read = FALSE; + + static const WCHAR protocol_config_key_name[] = { + 'S','Y','S','T','E','M','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\', + 'S','e','c','u','r','i','t','y','P','r','o','v','i','d','e','r','s','\\', + 'S','C','H','A','N','N','E','L','\\', + 'P','r','o','t','o','c','o','l','s',0 }; + + static const WCHAR clientW[] = {'\\','C','l','i','e','n','t',0}; + static const WCHAR enabledW[] = {'e','n','a','b','l','e','d',0}; + static const WCHAR disabledbydefaultW[] = {'D','i','s','a','b','l','e','d','B','y','D','e','f','a','u','l','t',0}; + + static const struct { + WCHAR key_name[20]; + DWORD prot_client_flag; + BOOL enabled; /* If no config is present, enable the protocol */ + BOOL disabled_by_default; /* Disable if caller asks for default protocol set */ + } protocol_config_keys[] = { + {{'S','S','L',' ','2','.','0',0}, SP_PROT_SSL2_CLIENT, TRUE, TRUE}, + {{'S','S','L',' ','3','.','0',0}, SP_PROT_SSL3_CLIENT, TRUE, FALSE}, + {{'T','L','S',' ','1','.','0',0}, SP_PROT_TLS1_0_CLIENT, TRUE, FALSE}, + {{'T','L','S',' ','1','.','1',0}, SP_PROT_TLS1_1_CLIENT, TRUE, FALSE /* NOTE: not enabled by default on Windows */ }, + {{'T','L','S',' ','1','.','2',0}, SP_PROT_TLS1_2_CLIENT, TRUE, FALSE /* NOTE: not enabled by default on Windows */ } + }; + + /* No need for thread safety */ + if(config_read) + return; + + res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, protocol_config_key_name, 0, KEY_READ, &protocols_key); + if(res == ERROR_SUCCESS) { + DWORD type, size, value; + + for(i=0; i < sizeof(protocol_config_keys)/sizeof(*protocol_config_keys); i++) { + strcpyW(subkey_name, protocol_config_keys[i].key_name); + strcatW(subkey_name, clientW); + res = RegOpenKeyExW(protocols_key, subkey_name, 0, KEY_READ, &key); + if(res != ERROR_SUCCESS) { + if(protocol_config_keys[i].enabled) + enabled |= protocol_config_keys[i].prot_client_flag; + if(protocol_config_keys[i].disabled_by_default) + default_disabled |= protocol_config_keys[i].prot_client_flag; + continue; + } + + size = sizeof(value); + res = RegQueryValueExW(key, enabledW, NULL, &type, (BYTE*)&value, &size); + if(res == ERROR_SUCCESS) { + if(type == REG_DWORD && value) + enabled |= protocol_config_keys[i].prot_client_flag; + }else if(protocol_config_keys[i].enabled) { + enabled |= protocol_config_keys[i].prot_client_flag; + } + + size = sizeof(value); + res = RegQueryValueExW(key, disabledbydefaultW, NULL, &type, (BYTE*)&value, &size); + if(res == ERROR_SUCCESS) { + if(type != REG_DWORD || value) + default_disabled |= protocol_config_keys[i].prot_client_flag; + }else if(protocol_config_keys[i].disabled_by_default) { + default_disabled |= protocol_config_keys[i].prot_client_flag; + } + + RegCloseKey(key); + } + }else { + /* No config, enable all known protocols. */ + for(i=0; i < sizeof(protocol_config_keys)/sizeof(*protocol_config_keys); i++) { + if(protocol_config_keys[i].enabled) + enabled |= protocol_config_keys[i].prot_client_flag; + if(protocol_config_keys[i].disabled_by_default) + default_disabled |= protocol_config_keys[i].prot_client_flag; + } + } + + RegCloseKey(protocols_key); + + config_enabled_protocols = enabled; + config_default_disabled_protocols = default_disabled; + config_read = TRUE; + + TRACE("enabled %x, disabled by default %x\n", config_enabled_protocols, config_default_disabled_protocols); +} + static SECURITY_STATUS schan_QueryCredentialsAttributes( PCredHandle phCredential, ULONG ulAttribute, VOID *pBuffer) { + struct schan_credentials *cred; SECURITY_STATUS ret; + cred = schan_get_object(phCredential->dwLower, SCHAN_HANDLE_CRED); + if(!cred) + return SEC_E_INVALID_HANDLE; + switch (ulAttribute) { case SECPKG_ATTR_SUPPORTED_ALGS: @@ -285,6 +393,8 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan PCredHandle phCredential, PTimeStamp ptsExpiry) { struct schan_credentials *creds; + unsigned enabled_protocols; + ULONG_PTR handle; SECURITY_STATUS st = SEC_E_OK; TRACE("schanCred %p, phCredential %p, ptsExpiry %p\n", schanCred, phCredential, ptsExpiry); @@ -292,40 +402,49 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan if (schanCred) { st = schan_CheckCreds(schanCred); - if (st == SEC_E_NO_CREDENTIALS) - st = SEC_E_OK; + if (st != SEC_E_OK && st != SEC_E_NO_CREDENTIALS) + return st; + + st = SEC_E_OK; + } + + read_config(); + if(schanCred && schanCred->grbitEnabledProtocols) + enabled_protocols = schanCred->grbitEnabledProtocols & config_enabled_protocols; + else + enabled_protocols = config_enabled_protocols & ~config_default_disabled_protocols; + if(!enabled_protocols) { + ERR("Could not find matching protocol\n"); + return SEC_E_NO_AUTHENTICATING_AUTHORITY; } /* For now, the only thing I'm interested in is the direction of the * connection, so just store it. */ - if (st == SEC_E_OK) - { - ULONG_PTR handle; + creds = HeapAlloc(GetProcessHeap(), 0, sizeof(*creds)); + if (!creds) return SEC_E_INSUFFICIENT_MEMORY; - creds = HeapAlloc(GetProcessHeap(), 0, sizeof(*creds)); - if (!creds) return SEC_E_INSUFFICIENT_MEMORY; - - handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); - if (handle == SCHAN_INVALID_HANDLE) goto fail; + handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); + if (handle == SCHAN_INVALID_HANDLE) goto fail; - creds->credential_use = SECPKG_CRED_OUTBOUND; - if (!schan_imp_allocate_certificate_credentials(creds)) - { - schan_free_handle(handle, SCHAN_HANDLE_CRED); - goto fail; - } + creds->credential_use = SECPKG_CRED_OUTBOUND; + if (!schan_imp_allocate_certificate_credentials(creds)) + { + schan_free_handle(handle, SCHAN_HANDLE_CRED); + goto fail; + } - phCredential->dwLower = handle; - phCredential->dwUpper = 0; + creds->enabled_protocols = enabled_protocols; + phCredential->dwLower = handle; + phCredential->dwUpper = 0; - /* Outbound credentials have no expiry */ - if (ptsExpiry) - { - ptsExpiry->LowPart = 0; - ptsExpiry->HighPart = 0; - } + /* Outbound credentials have no expiry */ + if (ptsExpiry) + { + ptsExpiry->LowPart = 0; + ptsExpiry->HighPart = 0; } + return st; fail: @@ -348,7 +467,7 @@ static SECURITY_STATUS schan_AcquireServerCredentials(const SCHANNEL_CRED *schan ULONG_PTR handle; struct schan_credentials *creds; - creds = HeapAlloc(GetProcessHeap(), 0, sizeof(*creds)); + creds = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*creds)); if (!creds) return SEC_E_INSUFFICIENT_MEMORY; creds->credential_use = SECPKG_CRED_INBOUND; diff --git a/dlls/secur32/secur32_priv.h b/dlls/secur32/secur32_priv.h index bc4b74b..5b2ac89 100644 --- a/dlls/secur32/secur32_priv.h +++ b/dlls/secur32/secur32_priv.h @@ -214,6 +214,7 @@ typedef struct schan_credentials { ULONG credential_use; void *credentials; + DWORD enabled_protocols; } schan_credentials; struct schan_transport;
1
0
0
0
Ken Thomases : winemac: Set the ordering of color modes explicitly to reduce chance of picking an odd one .
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: 81d1bfd65d45c6565bce7effaf54aa4507bcd450 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81d1bfd65d45c6565bce7effa…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 27 07:01:37 2013 -0500 winemac: Set the ordering of color modes explicitly to reduce chance of picking an odd one. --- dlls/winemac.drv/opengl.c | 91 ++++++++++++++++++++++++--------------------- 1 files changed, 49 insertions(+), 42 deletions(-) diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index 58fd951..8a29d89 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -115,33 +115,55 @@ struct color_mode { int blue_bits, blue_shift; GLint alpha_bits, alpha_shift; BOOL is_float; + int color_ordering; }; +/* The value of "color_ordering" is somewhat arbitrary. It incorporates some + observations of the behavior of Windows systems, but also subjective judgments + about what color formats are more "normal" than others. + + On at least some Windows systems, integer color formats are listed before + floating-point formats. Within the integer formats, higher color bits were + usually listed before lower color bits, while for floating-point formats it + was the reverse. However, that leads D3D to select 64-bit integer formats in + preference to 32-bit formats when the latter would be sufficient. It seems + that a 32-bit format is much more likely to be normally used in that case. + + Also, there are certain odd color formats supported on the Mac which seem like + they would be less appropriate than more common ones. For instance, the color + formats with alpha in a separate byte (e.g. kCGLRGB888A8Bit with R8G8B8 in one + 32-bit value and A8 in a separate 8-bit value) and the formats with 10-bit RGB + components. + + For two color formats which differ only in whether or not they have alpha bits, + we use the same ordering. pixel_format_comparator() gives alpha bits a + different weight than color formats. + */ static const struct color_mode color_modes[] = { - { kCGLRGB444Bit, 16, 12, 4, 8, 4, 4, 4, 0, 0, 0, FALSE }, - { kCGLARGB4444Bit, 16, 16, 4, 8, 4, 4, 4, 0, 4, 12, FALSE }, - { kCGLRGB444A8Bit, 24, 20, 4, 8, 4, 4, 4, 0, 8, 16, FALSE }, - { kCGLRGB555Bit, 16, 15, 5, 10, 5, 5, 5, 0, 0, 0, FALSE }, - { kCGLARGB1555Bit, 16, 16, 5, 10, 5, 5, 5, 0, 1, 15, FALSE }, - { kCGLRGB555A8Bit, 24, 23, 5, 10, 5, 5, 5, 0, 8, 16, FALSE }, - { kCGLRGB565Bit, 16, 16, 5, 11, 6, 5, 5, 0, 0, 0, FALSE }, - { kCGLRGB565A8Bit, 24, 24, 5, 11, 6, 5, 5, 0, 8, 16, FALSE }, - { kCGLRGB888Bit, 32, 24, 8, 16, 8, 8, 8, 0, 0, 0, FALSE }, - { kCGLARGB8888Bit, 32, 32, 8, 16, 8, 8, 8, 0, 8, 24, FALSE }, - { kCGLRGB888A8Bit, 40, 32, 8, 16, 8, 8, 8, 0, 8, 32, FALSE }, - { kCGLRGB101010Bit, 32, 30, 10, 20, 10, 10, 10, 0, 0, 0, FALSE }, - { kCGLARGB2101010Bit, 32, 32, 10, 20, 10, 10, 10, 0, 2, 30, FALSE }, - { kCGLRGB101010_A8Bit, 40, 38, 10, 20, 10, 10, 10, 0, 8, 32, FALSE }, - { kCGLRGB121212Bit, 48, 36, 12, 24, 12, 12, 12, 0, 0, 0, FALSE }, - { kCGLARGB12121212Bit, 48, 48, 12, 24, 12, 12, 12, 0, 12, 36, FALSE }, - { kCGLRGB161616Bit, 64, 48, 16, 48, 16, 32, 16, 16, 0, 0, FALSE }, - { kCGLRGBA16161616Bit, 64, 64, 16, 48, 16, 32, 16, 16, 16, 0, FALSE }, - { kCGLRGBFloat64Bit, 64, 48, 16, 32, 16, 16, 16, 0, 0, 0, TRUE }, - { kCGLRGBAFloat64Bit, 64, 64, 16, 48, 16, 32, 16, 16, 16, 0, TRUE }, - { kCGLRGBFloat128Bit, 128, 96, 32, 96, 32, 64, 32, 32, 0, 0, TRUE }, - { kCGLRGBAFloat128Bit, 128, 128, 32, 96, 32, 64, 32, 32, 32, 0, TRUE }, - { kCGLRGBFloat256Bit, 256, 192, 64, 192, 64, 128, 64, 64, 0, 0, TRUE }, - { kCGLRGBAFloat256Bit, 256, 256, 64, 192, 64, 128, 64, 64, 64, 0, TRUE }, + { kCGLRGB444Bit, 16, 12, 4, 8, 4, 4, 4, 0, 0, 0, FALSE, 5 }, + { kCGLARGB4444Bit, 16, 16, 4, 8, 4, 4, 4, 0, 4, 12, FALSE, 5 }, + { kCGLRGB444A8Bit, 24, 20, 4, 8, 4, 4, 4, 0, 8, 16, FALSE, 10 }, + { kCGLRGB555Bit, 16, 15, 5, 10, 5, 5, 5, 0, 0, 0, FALSE, 4 }, + { kCGLARGB1555Bit, 16, 16, 5, 10, 5, 5, 5, 0, 1, 15, FALSE, 4 }, + { kCGLRGB555A8Bit, 24, 23, 5, 10, 5, 5, 5, 0, 8, 16, FALSE, 9 }, + { kCGLRGB565Bit, 16, 16, 5, 11, 6, 5, 5, 0, 0, 0, FALSE, 3 }, + { kCGLRGB565A8Bit, 24, 24, 5, 11, 6, 5, 5, 0, 8, 16, FALSE, 8 }, + { kCGLRGB888Bit, 32, 24, 8, 16, 8, 8, 8, 0, 0, 0, FALSE, 0 }, + { kCGLARGB8888Bit, 32, 32, 8, 16, 8, 8, 8, 0, 8, 24, FALSE, 0 }, + { kCGLRGB888A8Bit, 40, 32, 8, 16, 8, 8, 8, 0, 8, 32, FALSE, 7 }, + { kCGLRGB101010Bit, 32, 30, 10, 20, 10, 10, 10, 0, 0, 0, FALSE, 6 }, + { kCGLARGB2101010Bit, 32, 32, 10, 20, 10, 10, 10, 0, 2, 30, FALSE, 6 }, + { kCGLRGB101010_A8Bit, 40, 38, 10, 20, 10, 10, 10, 0, 8, 32, FALSE, 11 }, + { kCGLRGB121212Bit, 48, 36, 12, 24, 12, 12, 12, 0, 0, 0, FALSE, 2 }, + { kCGLARGB12121212Bit, 48, 48, 12, 24, 12, 12, 12, 0, 12, 36, FALSE, 2 }, + { kCGLRGB161616Bit, 64, 48, 16, 48, 16, 32, 16, 16, 0, 0, FALSE, 1 }, + { kCGLRGBA16161616Bit, 64, 64, 16, 48, 16, 32, 16, 16, 16, 0, FALSE, 1 }, + { kCGLRGBFloat64Bit, 64, 48, 16, 32, 16, 16, 16, 0, 0, 0, TRUE, 12 }, + { kCGLRGBAFloat64Bit, 64, 64, 16, 48, 16, 32, 16, 16, 16, 0, TRUE, 12 }, + { kCGLRGBFloat128Bit, 128, 96, 32, 96, 32, 64, 32, 32, 0, 0, TRUE, 13 }, + { kCGLRGBAFloat128Bit, 128, 128, 32, 96, 32, 64, 32, 32, 32, 0, TRUE, 13 }, + { kCGLRGBFloat256Bit, 256, 192, 64, 192, 64, 128, 64, 64, 0, 0, TRUE, 14 }, + { kCGLRGBAFloat256Bit, 256, 256, 64, 192, 64, 128, 64, 64, 64, 0, TRUE, 15 }, }; @@ -837,25 +859,10 @@ static CFComparisonResult pixel_format_comparator(const void *val1, const void * if (!pf1.accelerated && pf2.accelerated) return kCFCompareGreaterThan; - /* Integer color modes before floating-point. */ - if (!color_modes[pf1.color_mode].is_float && color_modes[pf2.color_mode].is_float) - return kCFCompareLessThan; - if (color_modes[pf1.color_mode].is_float && !color_modes[pf2.color_mode].is_float) - return kCFCompareGreaterThan; - - /* For integer color modes, higher color bits before lower. For floating-point mode, - the reverse. */ - if (color_modes[pf1.color_mode].color_bits - color_modes[pf1.color_mode].alpha_bits > - color_modes[pf2.color_mode].color_bits - color_modes[pf2.color_mode].alpha_bits) - return color_modes[pf1.color_mode].is_float ? kCFCompareGreaterThan : kCFCompareLessThan; - if (color_modes[pf1.color_mode].color_bits - color_modes[pf1.color_mode].alpha_bits < - color_modes[pf2.color_mode].color_bits - color_modes[pf2.color_mode].alpha_bits) - return color_modes[pf1.color_mode].is_float ? kCFCompareLessThan : kCFCompareGreaterThan; - - /* Mac-ism: in the rare case that color bits are equal but bpp are not, prefer fewer bpp. */ - if (color_modes[pf1.color_mode].bits_per_pixel < color_modes[pf2.color_mode].bits_per_pixel) + /* Explicit color mode ordering. */ + if (color_modes[pf1.color_mode].color_ordering < color_modes[pf2.color_mode].color_ordering) return kCFCompareLessThan; - if (color_modes[pf1.color_mode].bits_per_pixel > color_modes[pf2.color_mode].bits_per_pixel) + if (color_modes[pf1.color_mode].color_ordering > color_modes[pf2.color_mode].color_ordering) return kCFCompareGreaterThan; /* Non-pbuffer-capable before pbuffer-capable. */
1
0
0
0
Ken Thomases : winemac: Use kCGLPFANoRecovery for accelerated pixel formats in create_context().
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: 484cf761fcd75fb14da0d6a9865b6a597b9668d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=484cf761fcd75fb14da0d6a98…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 27 07:01:22 2013 -0500 winemac: Use kCGLPFANoRecovery for accelerated pixel formats in create_context(). --- dlls/winemac.drv/opengl.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index 8627b70..58fd951 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -2991,7 +2991,10 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share) attribs[n++] = kCGLPFAClosestPolicy; if (pf->accelerated) + { attribs[n++] = kCGLPFAAccelerated; + attribs[n++] = kCGLPFANoRecovery; + } else { attribs[n++] = kCGLPFARendererID;
1
0
0
0
Akihiro Sagawa : msvcrt/tests: Add unicode fgetwc tests.
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: cf2ce8c64ba0734762ac3ecb716b332daeafca43 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf2ce8c64ba0734762ac3ecb7…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Mar 27 23:16:50 2013 +0900 msvcrt/tests: Add unicode fgetwc tests. --- dlls/msvcrt/tests/file.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 25eab7a..5731437 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -865,6 +865,63 @@ static void test_fgetwc_locale(const char* text, const char* locale, int codepag unlink(tempfile); } +static void test_fgetwc_unicode(void) +{ + char temppath[MAX_PATH], tempfile[MAX_PATH]; + FILE *tempfh; + static const WCHAR wchar_text[] = { 0xfeff, 0xff1f, '!' }; + char utf8_text[BUFSIZ]; + int ret, i; + wint_t ch; + + GetTempPath(MAX_PATH, temppath); + GetTempFileName(temppath, "", 0, tempfile); + + if (!p_fopen_s) + { + win_skip("fopen_s not available\n"); + return; + } + + tempfh = fopen(tempfile, "wb"); + ok(tempfh != NULL, "can't open tempfile\n"); + fwrite(wchar_text, 1, sizeof(wchar_text), tempfh); + fclose(tempfh); + + tempfh = fopen(tempfile, "rt,ccs=unicode"); + ok(tempfh != NULL, "can't open tempfile\n"); + for (i = 1; i < sizeof(wchar_text)/sizeof(wchar_text[0]); i++) + { + ch = fgetwc(tempfh); + ok(ch == wchar_text[i], + "got %04hx, expected %04x (unicode[%d])\n", ch, wchar_text[i], i-1); + } + ch = fgetwc(tempfh); + ok(ch == WEOF, "got %04hx, expected WEOF (unicode)\n", ch); + fclose(tempfh); + + tempfh = fopen(tempfile, "wb"); + ok(tempfh != NULL, "can't open tempfile\n"); + ret = WideCharToMultiByte(CP_UTF8, 0, wchar_text, sizeof(wchar_text)/sizeof(wchar_text[0]), + utf8_text, sizeof(utf8_text), NULL, NULL); + ok(ret > 0, "utf-8 conversion failed\n"); + fwrite(utf8_text, sizeof(char), ret, tempfh); + fclose(tempfh); + + tempfh = fopen(tempfile, "rt, ccs=UTF-8"); + ok(tempfh != NULL, "can't open tempfile\n"); + for (i = 1; i < sizeof(wchar_text)/sizeof(wchar_text[0]); i++) + { + ch = fgetwc(tempfh); + ok(ch == wchar_text[i], + "got %04hx, expected %04x (utf8[%d])\n", ch, wchar_text[i], i-1); + } + ch = fgetwc(tempfh); + ok(ch == WEOF, "got %04hx, expected WEOF (utf8)\n", ch); + fclose(tempfh); + unlink(temppath); +} + static void test_fputwc(void) { char temppath[MAX_PATH]; @@ -2127,6 +2184,7 @@ START_TEST(file) test_fgetwc_locale("AB\x83\xa9", "English", 1252); /* \x83 is U+0083 */ test_fgetwc_locale("AB\x83\xa9", "C", 0); + test_fgetwc_unicode(); test_fputwc(); test_ctrlz(); test_file_put_get();
1
0
0
0
Akihiro Sagawa : msvcrt/tests: Add locale dependent fgetwc tests.
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: c2ce2fa06e0e8977b25823d64b9d6436fa3792fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c2ce2fa06e0e8977b25823d64…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Mar 27 23:16:47 2013 +0900 msvcrt/tests: Add locale dependent fgetwc tests. --- dlls/msvcrt/tests/file.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 79 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 938161c..25eab7a 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -33,6 +33,7 @@ #include <winnls.h> #include <process.h> #include <errno.h> +#include <locale.h> static HANDLE proc_handles[2]; @@ -43,6 +44,8 @@ static void init(void) { HMODULE hmod = GetModuleHandleA("msvcrt.dll"); + setlocale(LC_CTYPE, "C"); + p_fopen_s = (void*)GetProcAddress(hmod, "fopen_s"); p__wfopen_s = (void*)GetProcAddress(hmod, "_wfopen_s"); } @@ -792,6 +795,76 @@ static void test_fgetwc( void ) free(tempf); } +static void test_fgetwc_locale(const char* text, const char* locale, int codepage) +{ + char temppath[MAX_PATH], tempfile[MAX_PATH]; + FILE *tempfh; + static const WCHAR wchar_text[] = { 0xfeff, 0xff1f, '!' }; + WCHAR wtextW[BUFSIZ]; + int ret = 0, i; + wint_t ch; + + if (!setlocale(LC_CTYPE, locale)) + { + win_skip("%s locale not available\n", locale); + return; + } + + GetTempPath(MAX_PATH, temppath); + GetTempFileName(temppath, "", 0, tempfile); + + tempfh = fopen(tempfile, "wb"); + ok(tempfh != NULL, "can't open tempfile\n"); + fwrite(text, 1, strlen(text), tempfh); + fclose(tempfh); + + if (codepage != 0) + { + /* mbstowcs rejects invalid multibyte sequence, + so we use MultiByteToWideChar here. */ + ret = MultiByteToWideChar(codepage, 0, text, -1, + wtextW, sizeof(wtextW)/sizeof(wtextW[0])); + ok(ret > 0, "MultiByteToWideChar failed\n"); + } + else + { + /* C locale */ + const char *p; + for (p = text; *p != '\0'; p++) + wtextW[ret++] = (unsigned char)*p; + wtextW[ret++] = 0; + } + + tempfh = fopen(tempfile, "rt"); + ok(tempfh != NULL, "can't open tempfile\n"); + + for (i = 0; i < ret-1; i++) + { + ch = fgetwc(tempfh); + ok(ch == wtextW[i], "got %04hx, expected %04hx (cp%d[%d])\n", ch, wtextW[i], codepage, i); + } + ch = fgetwc(tempfh); + ok(ch == WEOF, "got %04hx, expected WEOF (cp%d)\n", ch, codepage); + fclose(tempfh); + + tempfh = fopen(tempfile, "wb"); + ok(tempfh != NULL, "can't open tempfile\n"); + fwrite(wchar_text, 1, sizeof(wchar_text), tempfh); + fclose(tempfh); + + tempfh = fopen(tempfile, "rb"); + ok(tempfh != NULL, "can't open tempfile\n"); + for (i = 0; i < sizeof(wchar_text)/sizeof(wchar_text[0]); i++) + { + ch = fgetwc(tempfh); + ok(ch == wchar_text[i], "got %04hx, expected %04x (cp%d[%d])\n", ch, wchar_text[i], codepage, i); + } + ch = fgetwc(tempfh); + ok(ch == WEOF, "got %04hx, expected WEOF (cp%d)\n", ch, codepage); + fclose(tempfh); + unlink(tempfile); +} + static void test_fputwc(void) { char temppath[MAX_PATH]; @@ -2048,6 +2121,12 @@ START_TEST(file) test_flsbuf(); test_fflush(); test_fgetwc(); + /* \x83\xa9 is double byte character, \xe0\x7f is not (undefined). */ + test_fgetwc_locale("AB\x83\xa9\xe0\x7f", "Japanese_Japan.932", 932); + /* \x83 is U+0192 */ + test_fgetwc_locale("AB\x83\xa9", "English", 1252); + /* \x83 is U+0083 */ + test_fgetwc_locale("AB\x83\xa9", "C", 0); test_fputwc(); test_ctrlz(); test_file_put_get();
1
0
0
0
Akihiro Sagawa : msvcrt: Fix mbtowc_l in C locale.
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: 23b8c4df1910832dd409f6c8cc8906ac64be4279 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23b8c4df1910832dd409f6c8c…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Mar 27 23:16:44 2013 +0900 msvcrt: Fix mbtowc_l in C locale. --- dlls/msvcrt/mbcs.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 121edbb..fdc5422 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -2016,7 +2016,9 @@ int CDECL MSVCRT_mbtowc_l(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n, if(n <= 0 || !str) return 0; - if(!MultiByteToWideChar(locinfo->lc_codepage, 0, str, n, &tmpdst, 1)) + if(!locinfo->lc_codepage) + tmpdst = (unsigned char)*str; + else if(!MultiByteToWideChar(locinfo->lc_codepage, 0, str, n, &tmpdst, 1)) return -1; if(dst) *dst = tmpdst;
1
0
0
0
Alexandre Julliard : inetcpl.cpl: Add a 256x256 icon.
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: 27a93bfc13c9025b64e43200477cca33cf7b50c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27a93bfc13c9025b64e432004…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 27 15:34:36 2013 +0100 inetcpl.cpl: Add a 256x256 icon. --- dlls/inetcpl.cpl/inetcpl.ico | Bin 25214 -> 82992 bytes dlls/inetcpl.cpl/inetcpl.svg | 2620 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 2358 insertions(+), 262 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=27a93bfc13c9025b64e43…
1
0
0
0
Alexandre Julliard : appwiz.cpl: Add a 256x256 icon.
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: 7964bd820f4bbbe4bf0c90108f711071ab2b49e1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7964bd820f4bbbe4bf0c90108…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 27 15:34:29 2013 +0100 appwiz.cpl: Add a 256x256 icon. --- dlls/appwiz.cpl/appwiz.ico | Bin 25214 -> 49609 bytes dlls/appwiz.cpl/appwiz.svg | 2157 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 1903 insertions(+), 254 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7964bd820f4bbbe4bf0c9…
1
0
0
0
Alexandre Julliard : wordpad: Add a 256x256 icon.
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: d1cebac78d527e0bf46f9d4b059f81ccd284edef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1cebac78d527e0bf46f9d4b0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 27 15:06:16 2013 +0100 wordpad: Add a 256x256 icon. --- programs/wordpad/wordpad.ico | Bin 25214 -> 58342 bytes programs/wordpad/wordpad.svg | 3816 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 3473 insertions(+), 343 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d1cebac78d527e0bf46f9…
1
0
0
0
Alexandre Julliard : winhlp32: Add a 256x256 icon.
by Alexandre Julliard
27 Mar '13
27 Mar '13
Module: wine Branch: master Commit: 4a99f2d4ca3553421a57cb2d54d8c741ee025120 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a99f2d4ca3553421a57cb2d5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 27 15:04:29 2013 +0100 winhlp32: Add a 256x256 icon. --- programs/winhlp32/winhelp.ico | Bin 25214 -> 67901 bytes programs/winhlp32/winhelp.svg | 2063 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 1843 insertions(+), 220 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4a99f2d4ca3553421a57c…
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
54
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
Results per page:
10
25
50
100
200