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
July 2010
----- 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
892 discussions
Start a n
N
ew thread
Thomas Mullaly : urlmon: Implemented canonicalization functions for IPv4 addresses.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: a3dd8f4598b838d647dc2d7e2b94621acbb990ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3dd8f4598b838d647dc2d7e2…
Author: Thomas Mullaly <thomas.mullaly(a)gmail.com> Date: Wed Jun 23 23:21:14 2010 -0400 urlmon: Implemented canonicalization functions for IPv4 addresses. --- dlls/urlmon/uri.c | 203 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 192 insertions(+), 11 deletions(-) diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index cbd8c15..060b92e 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -30,20 +30,25 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { const IUriVtbl *lpIUriVtbl; LONG ref; - BSTR raw_uri; + + BSTR raw_uri; /* Information about the canonicalized URI's buffer. */ - WCHAR *canon_uri; - DWORD canon_size; - DWORD canon_len; + WCHAR *canon_uri; + DWORD canon_size; + DWORD canon_len; + + INT scheme_start; + DWORD scheme_len; + URL_SCHEME scheme_type; - INT scheme_start; - DWORD scheme_len; - URL_SCHEME scheme_type; + INT userinfo_start; + DWORD userinfo_len; + INT userinfo_split; - INT userinfo_start; - DWORD userinfo_len; - INT userinfo_split; + INT host_start; + DWORD host_len; + Uri_HOST_TYPE host_type; } Uri; typedef struct { @@ -233,6 +238,34 @@ static inline void pct_encode_val(WCHAR val, WCHAR *dest) { dest[2] = hexDigits[val & 0xf]; } +/* Converts an IPv4 address in numerical form into it's fully qualified + * string form. This function returns the number of characters written + * to 'dest'. If 'dest' is NULL this function will return the number of + * characters that would have been written. + * + * It's up to the caller to ensure there's enough space in 'dest' for the + * address. + */ +static DWORD ui2ipv4(WCHAR *dest, UINT address) { + static const WCHAR formatW[] = + {'%','u','.','%','u','.','%','u','.','%','u',0}; + DWORD ret = 0; + UCHAR digits[4]; + + digits[0] = (address >> 24) & 0xff; + digits[1] = (address >> 16) & 0xff; + digits[2] = (address >> 8) & 0xff; + digits[3] = address & 0xff; + + if(!dest) { + WCHAR tmp[16]; + ret = sprintfW(tmp, formatW, digits[0], digits[1], digits[2], digits[3]); + } else + ret = sprintfW(dest, formatW, digits[0], digits[1], digits[2], digits[3]); + + return ret; +} + /* Checks if the characters pointed to by 'ptr' are * a percent encoded data octet. * @@ -823,12 +856,160 @@ static BOOL canonicalize_userinfo(const parse_data *data, Uri *uri, DWORD flags, return TRUE; } +/* Attempts to canonicalize an implicit IPv4 address. */ +static BOOL canonicalize_implicit_ipv4address(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly) { + uri->host_start = uri->canon_len; + + TRACE("%u\n", data->implicit_ipv4); + /* For unknown scheme types Window's doesn't convert + * the value into an IP address, but, it still considers + * it an IPv4 address. + */ + if(data->scheme_type == URL_SCHEME_UNKNOWN) { + if(!computeOnly) + memcpy(uri->canon_uri+uri->canon_len, data->host, data->host_len*sizeof(WCHAR)); + uri->canon_len += data->host_len; + } else { + if(!computeOnly) + uri->canon_len += ui2ipv4(uri->canon_uri+uri->canon_len, data->implicit_ipv4); + else + uri->canon_len += ui2ipv4(NULL, data->implicit_ipv4); + } + + uri->host_len = uri->canon_len - uri->host_start; + uri->host_type = Uri_HOST_IPV4; + + if(!computeOnly) + TRACE("%p %p %x %d): Canonicalized implicit IP address=%s len=%d\n", + data, uri, flags, computeOnly, + debugstr_wn(uri->canon_uri+uri->host_start, uri->host_len), + uri->host_len); + + return TRUE; +} + +/* Attempts to canonicalize an IPv4 address. + * + * If the parse_data represents a URI that has an implicit IPv4 address + * (ex.
http://256/
, this function will convert 256 into 0.0.1.0). If + * the implicit IP address exceeds the value of UINT_MAX (maximum value + * for an IPv4 address) it's canonicalized as if were a reg-name. + * + * If the parse_data contains a partial or full IPv4 address it normalizes it. + * A partial IPv4 address is something like "192.0" and would be normalized to + * "192.0.0.0". With a full (or partial) IPv4 address like "192.002.01.003" would + * be normalized to "192.2.1.3". + * + * NOTES: + * Window's ONLY normalizes IPv4 address for known scheme types (one that isn't + * URL_SCHEME_UNKNOWN). For unknown scheme types, it simply copies the data from + * the original URI into the canonicalized URI, but, it still recognizes URI's + * host type as HOST_IPV4. + */ +static BOOL canonicalize_ipv4address(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly) { + if(data->has_implicit_ip) + return canonicalize_implicit_ipv4address(data, uri, flags, computeOnly); + else { + uri->host_start = uri->canon_len; + + /* Windows only normalizes for known scheme types. */ + if(data->scheme_type != URL_SCHEME_UNKNOWN) { + /* parse_data contains a partial or full IPv4 address, so normalize it. */ + DWORD i, octetDigitCount = 0, octetCount = 0; + BOOL octetHasDigit = FALSE; + + for(i = 0; i < data->host_len; ++i) { + if(data->host[i] == '0' && !octetHasDigit) { + /* Can ignore leading zeros if: + * 1) It isn't the last digit of the octet. + * 2) i+1 != data->host_len + * 3) i+1 != '.' + */ + if(octetDigitCount == 2 || + i+1 == data->host_len || + data->host[i+1] == '.') { + if(!computeOnly) + uri->canon_uri[uri->canon_len] = data->host[i]; + ++uri->canon_len; + TRACE("Adding zero\n"); + } + } else if(data->host[i] == '.') { + if(!computeOnly) + uri->canon_uri[uri->canon_len] = data->host[i]; + ++uri->canon_len; + + octetDigitCount = 0; + octetHasDigit = FALSE; + ++octetCount; + } else { + if(!computeOnly) + uri->canon_uri[uri->canon_len] = data->host[i]; + ++uri->canon_len; + + ++octetDigitCount; + octetHasDigit = TRUE; + } + } + + /* Make sure the canonicalized IP address has 4 dec-octets. + * If doesn't add "0" ones until there is 4; + */ + for( ; octetCount < 3; ++octetCount) { + if(!computeOnly) { + uri->canon_uri[uri->canon_len] = '.'; + uri->canon_uri[uri->canon_len+1] = '0'; + } + + uri->canon_len += 2; + } + } else { + /* Windows doesn't normalize addresses in unknown schemes. */ + if(!computeOnly) + memcpy(uri->canon_uri+uri->canon_len, data->host, data->host_len*sizeof(WCHAR)); + uri->canon_len += data->host_len; + } + + uri->host_len = uri->canon_len - uri->host_start; + if(!computeOnly) + TRACE("(%p %p %x %d): Canonicalized IPv4 address, ip=%s len=%d\n", + data, uri, flags, computeOnly, + debugstr_wn(uri->canon_uri+uri->host_start, uri->host_len), + uri->host_len); + } + + return TRUE; +} + +static BOOL canonicalize_host(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly) { + uri->host_start = -1; + uri->host_len = 0; + + if(data->host) { + switch(data->host_type) { + case Uri_HOST_IPV4: + uri->host_type = Uri_HOST_IPV4; + if(!canonicalize_ipv4address(data, uri, flags, computeOnly)) + return FALSE; + + break; + default: + WARN("(%p %p %x %d): Canonicalization not supported yet\n", data, + uri, flags, computeOnly); + } + } + + return TRUE; +} + /* Canonicalizes the authority of the URI represented by the parse_data. */ static BOOL canonicalize_authority(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly) { if(!canonicalize_userinfo(data, uri, flags, computeOnly)) return FALSE; - /* TODO: canonicalize the host and port information. */ + if(!canonicalize_host(data, uri, flags, computeOnly)) + return FALSE; + + /* TODO Canonicalize port information. */ return TRUE; }
1
0
0
0
Thomas Mullaly : urlmon: Implemented a parser for IPv4 addresses.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: 89026cf980a55e1baef39b5630da28cbe51f2d9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89026cf980a55e1baef39b563…
Author: Thomas Mullaly <thomas.mullaly(a)gmail.com> Date: Mon Jun 21 17:03:02 2010 -0400 urlmon: Implemented a parser for IPv4 addresses. --- dlls/urlmon/uri.c | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 201 insertions(+), 1 deletions(-) diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index 526624f..cbd8c15 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -23,6 +23,8 @@ #define NO_SHLWAPI_REG #include "shlwapi.h" +#define UINT_MAX 0xffffffff + WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { @@ -55,6 +57,8 @@ typedef struct { BOOL is_relative; BOOL is_opaque; BOOL has_implicit_scheme; + BOOL has_implicit_ip; + UINT implicit_ipv4; const WCHAR *scheme; DWORD scheme_len; @@ -63,6 +67,10 @@ typedef struct { const WCHAR *userinfo; DWORD userinfo_len; INT userinfo_split; + + const WCHAR *host; + DWORD host_len; + Uri_HOST_TYPE host_type; } parse_data; static const CHAR hexDigits[] = "0123456789ABCDEF"; @@ -252,6 +260,135 @@ static BOOL check_pct_encoded(const WCHAR **ptr) { return TRUE; } +/* dec-octet = DIGIT ; 0-9 + * / %x31-39 DIGIT ; 10-99 + * / "1" 2DIGIT ; 100-199 + * / "2" %x30-34 DIGIT ; 200-249 + * / "25" %x30-35 ; 250-255 + */ +static BOOL check_dec_octet(const WCHAR **ptr) { + const WCHAR *c1, *c2, *c3; + + c1 = *ptr; + /* A dec-octet must be at least 1 digit long. */ + if(*c1 < '0' || *c1 > '9') + return FALSE; + + ++(*ptr); + + c2 = *ptr; + /* Since the 1 digit requirment was meet, it doesn't + * matter if this is a DIGIT value, it's considered a + * dec-octet. + */ + if(*c2 < '0' || *c2 > '9') + return TRUE; + + ++(*ptr); + + c3 = *ptr; + /* Same explanation as above. */ + if(*c3 < '0' || *c3 > '9') + return TRUE; + + /* Anything > 255 isn't a valid IP dec-octet. */ + if(*c1 >= '2' && *c2 >= '5' && *c3 >= '5') { + *ptr = c1; + return FALSE; + } + + ++(*ptr); + return TRUE; +} + +/* Checks if there is an implicit IPv4 address in the host component of the URI. + * The max value of an implicit IPv4 address is UINT_MAX. + * + * Ex: + * "234567" would be considered an implicit IPv4 address. + */ +static BOOL check_implicit_ipv4(const WCHAR **ptr, UINT *val) { + const WCHAR *start = *ptr; + ULONGLONG ret = 0; + *val = 0; + + while(is_num(**ptr)) { + ret = ret*10 + (**ptr - '0'); + + if(ret > UINT_MAX) { + *ptr = start; + return FALSE; + } + ++(*ptr); + } + + if(*ptr == start) + return FALSE; + + *val = ret; + return TRUE; +} + +/* Checks if the string contains an IPv4 address. + * + * This function has a strict mode or a non-strict mode of operation + * When 'strict' is set to FALSE this function will return TRUE if + * the string contains at least 'dec-octet "." dec-octet' since partial + * IPv4 addresses will be normalized out into full IPv4 addresses. When + * 'strict' is set this function expects there to be a full IPv4 address. + * + * IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet + */ +static BOOL check_ipv4address(const WCHAR **ptr, BOOL strict) { + const WCHAR *start = *ptr; + + if(!check_dec_octet(ptr)) { + *ptr = start; + return FALSE; + } + + if(**ptr != '.') { + *ptr = start; + return FALSE; + } + + ++(*ptr); + if(!check_dec_octet(ptr)) { + *ptr = start; + return FALSE; + } + + if(**ptr != '.') { + if(strict) { + *ptr = start; + return FALSE; + } else + return TRUE; + } + + ++(*ptr); + if(!check_dec_octet(ptr)) { + *ptr = start; + return FALSE; + } + + if(**ptr != '.') { + if(strict) { + *ptr = start; + return FALSE; + } else + return TRUE; + } + + ++(*ptr); + if(!check_dec_octet(ptr)) { + *ptr = start; + return FALSE; + } + + /* Found a four digit ip address. */ + return TRUE; +} /* Tries to parse the scheme name of the URI. * * scheme = ALPHA *(ALPHA | NUM | '+' | '-' | '.') as defined by RFC 3896. @@ -448,6 +585,68 @@ static void parse_userinfo(const WCHAR **ptr, parse_data *data, DWORD flags) { ++(*ptr); } +/* Attempts to parse a IPv4 address from the URI. + * + * NOTES: + * Window's normalizes IPv4 addresses, This means there's three + * possibilities for the URI to contain an IPv4 address. + * 1) A well formed address (ex. 192.2.2.2). + * 2) A partially formed address. For example "192.0" would + * normalize to "192.0.0.0" during canonicalization. + * 3) An implicit IPv4 address. For example "256" would + * normalize to "0.0.1.0" during canonicalization. Also + * note that the maximum value for an implicit IP address + * is UINT_MAX, if the value in the URI exceeds this then + * it is not considered an IPv4 address. + */ +static BOOL parse_ipv4address(const WCHAR **ptr, parse_data *data, DWORD flags) { + const BOOL is_unknown = data->scheme_type == URL_SCHEME_UNKNOWN; + data->host = *ptr; + + if(!check_ipv4address(ptr, FALSE)) { + if(!check_implicit_ipv4(ptr, &data->implicit_ipv4)) { + TRACE("(%p %p %x): URI didn't contain anything looking like an IPv4 address.\n", + ptr, data, flags); + *ptr = data->host; + data->host = NULL; + return FALSE; + } else + data->has_implicit_ip = TRUE; + } + + /* Check if what we found is the only part of the host name (if it isn't + * we don't have an IPv4 address). + */ + if(!is_auth_delim(**ptr, !is_unknown) && **ptr != ':') { + *ptr = data->host; + data->host = NULL; + data->has_implicit_ip = FALSE; + return FALSE; + } + + data->host_len = *ptr - data->host; + data->host_type = Uri_HOST_IPV4; + TRACE("(%p %p %x): IPv4 address found. host=%s host_len=%d host_type=%d\n", + ptr, data, flags, debugstr_wn(data->host, data->host_len), + data->host_len, data->host_type); + return TRUE; +} + +/* Parses the host information from the URI. + * + * host = IP-literal / IPv4address / reg-name + */ +static BOOL parse_host(const WCHAR **ptr, parse_data *data, DWORD flags) { + if(!parse_ipv4address(ptr, data, flags)) { + WARN("(%p %p %x): Only IPv4 parsing is implemented so far.\n", ptr, data, flags); + data->host_type = Uri_HOST_UNKNOWN; + } + + /* TODO parse IP-Literal / reg-name. */ + + return TRUE; +} + /* Parses the authority information from the URI. * * authority = [ userinfo "@" ] host [ ":" port ] @@ -455,7 +654,8 @@ static void parse_userinfo(const WCHAR **ptr, parse_data *data, DWORD flags) { static BOOL parse_authority(const WCHAR **ptr, parse_data *data, DWORD flags) { parse_userinfo(ptr, data, flags); - /* TODO: Parse host and port information. */ + if(!parse_host(ptr, data, flags)) + return FALSE; return TRUE; }
1
0
0
0
Vincent Povirk : wineboot: Don' t abort shutdown if we have to terminate a process.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: da8904d150694ba82b201ec72e2e94cba9dd4475 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da8904d150694ba82b201ec72…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Jul 22 16:49:35 2010 -0500 wineboot: Don't abort shutdown if we have to terminate a process. We can sometimes get a FALSE result from WM_QUERYENDSESSION as a side-effect of terminating a process. We should continue the shutdown process in this case. --- programs/wineboot/shutdown.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/programs/wineboot/shutdown.c b/programs/wineboot/shutdown.c index cebe16b..ac3019c 100644 --- a/programs/wineboot/shutdown.c +++ b/programs/wineboot/shutdown.c @@ -113,6 +113,7 @@ struct endtask_dlg_data { struct window_info *win; BOOL cancelled; + BOOL terminated; }; static INT_PTR CALLBACK endtask_dlg_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) @@ -138,6 +139,7 @@ static INT_PTR CALLBACK endtask_dlg_proc( HWND hwnd, UINT msg, WPARAM wparam, LP WINE_TRACE( "terminating process %04x\n", data->win[0].pid ); TerminateProcess( handle, 0 ); CloseHandle( handle ); + data->terminated = TRUE; } return TRUE; case MAKEWPARAM(IDCANCEL, BN_CLICKED): @@ -175,6 +177,7 @@ static LRESULT send_messages_with_timeout_dialog( cb_data->window_count = count; dlg_data.win = win; + dlg_data.terminated = FALSE; dlg_data.cancelled = FALSE; for (i = 0; i < count; i++) @@ -211,7 +214,7 @@ static LRESULT send_messages_with_timeout_dialog( } if (!cb_data->window_count) { - result = cb_data->result; + result = dlg_data.terminated || cb_data->result; HeapFree( GetProcessHeap(), 0, cb_data ); if (!result) goto cleanup;
1
0
0
0
Vincent Povirk : wineboot: Query windows from all desktops when --end-session --kill is used.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: 4f30ff875bfc556a2a69bf45218129cd196e5105 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f30ff875bfc556a2a69bf452…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue May 18 13:36:36 2010 -0500 wineboot: Query windows from all desktops when --end-session --kill is used. --- programs/wineboot/shutdown.c | 39 +++++++++++++++++++++++++++++++++++++++ programs/wineboot/wineboot.c | 7 ++++++- 2 files changed, 45 insertions(+), 1 deletions(-) diff --git a/programs/wineboot/shutdown.c b/programs/wineboot/shutdown.c index ed80bf0..cebe16b 100644 --- a/programs/wineboot/shutdown.c +++ b/programs/wineboot/shutdown.c @@ -322,6 +322,45 @@ BOOL shutdown_close_windows( BOOL force ) return (result != 0); } +static BOOL CALLBACK shutdown_one_desktop( LPWSTR name, LPARAM force ) +{ + HDESK hdesk; + + WINE_TRACE("Shutting down desktop %s\n", wine_dbgstr_w(name)); + + hdesk = OpenDesktopW( name, 0, FALSE, GENERIC_ALL ); + if (hdesk == NULL) + { + WINE_ERR("Cannot open desktop %s, err=%i\n", wine_dbgstr_w(name), GetLastError()); + return 0; + } + + if (!SetThreadDesktop( hdesk )) + { + CloseDesktop( hdesk ); + WINE_ERR("Cannot set thread desktop %s, err=%i\n", wine_dbgstr_w(name), GetLastError()); + return 0; + } + + CloseDesktop( hdesk ); + + return shutdown_close_windows( force ); +} + +BOOL shutdown_all_desktops( BOOL force ) +{ + BOOL ret; + HDESK prev_desktop; + + prev_desktop = GetThreadDesktop(GetCurrentThreadId()); + + ret = EnumDesktopsW( NULL, shutdown_one_desktop, (LPARAM)force ); + + SetThreadDesktop(prev_desktop); + + return ret; +} + /* forcibly kill all processes without any cleanup */ void kill_processes( BOOL kill_desktop ) { diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 32ac3ac..02d3746 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -88,6 +88,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wineboot); #define MAX_LINE_LENGTH (2*MAX_PATH+2) extern BOOL shutdown_close_windows( BOOL force ); +extern BOOL shutdown_all_desktops( BOOL force ); extern void kill_processes( BOOL kill_desktop ); static WCHAR windowsdir[MAX_PATH]; @@ -1142,7 +1143,11 @@ int main( int argc, char *argv[] ) if (end_session) { - if (!shutdown_close_windows( force )) return 1; + if (kill) + { + if (!shutdown_all_desktops( force )) return 1; + } + else if (!shutdown_close_windows( force )) return 1; } if (kill) kill_processes( shutdown );
1
0
0
0
Aric Stewart : usp10: Start implementing Chaining Context Substitution Format 3: Coverage-based Chaining Context Glyph Substitution.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: 1b37809dba65745828d7895ad5fda9bc3fd1e403 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1b37809dba65745828d7895ad…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu Jul 22 16:18:02 2010 -0500 usp10: Start implementing Chaining Context Substitution Format 3: Coverage-based Chaining Context Glyph Substitution. --- dlls/usp10/shape.c | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 133 insertions(+), 0 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 0a4f5b9..0018ae5 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -185,6 +185,42 @@ typedef struct{ WORD Component[1]; }GSUB_Ligature; +typedef struct{ + WORD SequenceIndex; + WORD LookupListIndex; + +}GSUB_SubstLookupRecord; + +typedef struct{ + WORD SubstFormat; /* = 1 */ + WORD Coverage; + WORD ChainSubRuleSetCount; + WORD ChainSubRuleSet[1]; +}GSUB_ChainContextSubstFormat1; + +typedef struct { + WORD SubstFormat; /* = 3 */ + WORD BacktrackGlyphCount; + WORD Coverage[1]; +}GSUB_ChainContextSubstFormat3_1; + +typedef struct{ + WORD InputGlyphCount; + WORD Coverage[1]; +}GSUB_ChainContextSubstFormat3_2; + +typedef struct{ + WORD LookaheadGlyphCount; + WORD Coverage[1]; +}GSUB_ChainContextSubstFormat3_3; + +typedef struct{ + WORD SubstCount; + GSUB_SubstLookupRecord SubstLookupRecord[1]; +}GSUB_ChainContextSubstFormat3_4; + +static INT GSUB_apply_lookup(const GSUB_LookupList* lookup, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count); + /* the orders of joined_forms and contextual_features need to line up */ static const char* contextual_features[] = { @@ -429,6 +465,101 @@ static INT GSUB_apply_LigatureSubst(const GSUB_LookupTable *look, WORD *glyphs, return GSUB_E_NOGLYPH; } +static INT GSUB_apply_ChainContextSubst(const GSUB_LookupList* lookup, const GSUB_LookupTable *look, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) +{ + int j; + BOOL done = FALSE; + + TRACE("Chaining Contextual Substitution Subtable\n"); + for (j = 0; j < GET_BE_WORD(look->SubTableCount) && !done; j++) + { + const GSUB_ChainContextSubstFormat1 *ccsf1; + int offset; + int dirLookahead = write_dir; + int dirBacktrack = -1 * write_dir; + + offset = GET_BE_WORD(look->SubTable[j]); + ccsf1 = (const GSUB_ChainContextSubstFormat1*)((const BYTE*)look+offset); + if (GET_BE_WORD(ccsf1->SubstFormat) == 1) + { + FIXME(" TODO: subtype 1 (Simple context glyph substitution)\n"); + return -1; + } + else if (GET_BE_WORD(ccsf1->SubstFormat) == 2) + { + FIXME(" TODO: subtype 2 (Class-based Chaining Context Glyph Substitution)\n"); + return -1; + } + else if (GET_BE_WORD(ccsf1->SubstFormat) == 3) + { + int k; + int indexGlyphs; + const GSUB_ChainContextSubstFormat3_1 *ccsf3_1; + const GSUB_ChainContextSubstFormat3_2 *ccsf3_2; + const GSUB_ChainContextSubstFormat3_3 *ccsf3_3; + const GSUB_ChainContextSubstFormat3_4 *ccsf3_4; + int newIndex = glyph_index; + + ccsf3_1 = (const GSUB_ChainContextSubstFormat3_1 *)ccsf1; + + TRACE(" subtype 3 (Coverage-based Chaining Context Glyph Substitution)\n"); + + for (k = 0; k < GET_BE_WORD(ccsf3_1->BacktrackGlyphCount); k++) + { + offset = GET_BE_WORD(ccsf3_1->Coverage[k]); + if (GSUB_is_glyph_covered((const BYTE*)ccsf3_1+offset, glyphs[glyph_index + (dirBacktrack * (k+1))]) == -1) + break; + } + if (k != GET_BE_WORD(ccsf3_1->BacktrackGlyphCount)) + return -1; + TRACE("Matched Backtrack\n"); + + ccsf3_2 = (const GSUB_ChainContextSubstFormat3_2 *)(((LPBYTE)ccsf1)+sizeof(GSUB_ChainContextSubstFormat3_1) + (sizeof(WORD) * (GET_BE_WORD(ccsf3_1->BacktrackGlyphCount)-1))); + + indexGlyphs = GET_BE_WORD(ccsf3_2->InputGlyphCount); + for (k = 0; k < indexGlyphs; k++) + { + offset = GET_BE_WORD(ccsf3_2->Coverage[k]); + if (GSUB_is_glyph_covered((const BYTE*)ccsf3_1+offset, glyphs[glyph_index + (write_dir * k)]) == -1) + break; + } + if (k != indexGlyphs) + return -1; + TRACE("Matched IndexGlyphs\n"); + + ccsf3_3 = (const GSUB_ChainContextSubstFormat3_3 *)(((LPBYTE)ccsf3_2)+sizeof(GSUB_ChainContextSubstFormat3_2) + (sizeof(WORD) * (GET_BE_WORD(ccsf3_2->InputGlyphCount)-1))); + + for (k = 0; k < GET_BE_WORD(ccsf3_3->LookaheadGlyphCount); k++) + { + offset = GET_BE_WORD(ccsf3_3->Coverage[k]); + if (GSUB_is_glyph_covered((const BYTE*)ccsf3_1+offset, glyphs[glyph_index + (dirLookahead * (indexGlyphs + k+1))]) == -1) + break; + } + if (k != GET_BE_WORD(ccsf3_3->LookaheadGlyphCount)) + return -1; + TRACE("Matched LookAhead\n"); + + ccsf3_4 = (const GSUB_ChainContextSubstFormat3_4 *)(((LPBYTE)ccsf3_3)+sizeof(GSUB_ChainContextSubstFormat3_3) + (sizeof(WORD) * (GET_BE_WORD(ccsf3_3->LookaheadGlyphCount)-1))); + + for (k = 0; k < GET_BE_WORD(ccsf3_4->SubstCount); k++) + { + int lookupIndex = GET_BE_WORD(ccsf3_4->SubstLookupRecord[k].LookupListIndex); + int SequenceIndex = GET_BE_WORD(ccsf3_4->SubstLookupRecord[k].SequenceIndex) * write_dir; + + TRACE("SUBST: %i -> %i %i\n",k, SequenceIndex, lookupIndex); + newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); + if (newIndex == -1) + { + ERR("Chain failed to generate a glyph\n"); + return -1; + } + } + return newIndex + 1; + } + } + return -1; +} + static INT GSUB_apply_lookup(const GSUB_LookupList* lookup, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) { int offset; @@ -443,6 +574,8 @@ static INT GSUB_apply_lookup(const GSUB_LookupList* lookup, INT lookup_index, WO return GSUB_apply_SingleSubst(look, glyphs, glyph_index, write_dir, glyph_count); case 4: return GSUB_apply_LigatureSubst(look, glyphs, glyph_index, write_dir, glyph_count); + case 6: + return GSUB_apply_ChainContextSubst(lookup, look, glyphs, glyph_index, write_dir, glyph_count); default: FIXME("We do not handle SubType %i\n",GET_BE_WORD(look->LookupType)); }
1
0
0
0
David Hedberg : shell32: Implement Set/ GetCurrentViewMode in the default shellview.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: 0e7a5bf76c0d24f320c70b03251c9abf2ae20eda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e7a5bf76c0d24f320c70b032…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Thu Jul 22 22:08:07 2010 +0200 shell32: Implement Set/GetCurrentViewMode in the default shellview. --- dlls/shell32/shlview.c | 71 +++++++--- dlls/shell32/tests/shlview.c | 341 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 393 insertions(+), 19 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0e7a5bf76c0d24f320c70…
1
0
0
0
André Hentschel : krnl386.exe16: Add an error code.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: 4291823ff2ce693b87353a629bb4f52e44b35be6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4291823ff2ce693b87353a629…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Jul 22 19:08:02 2010 +0200 krnl386.exe16: Add an error code. --- dlls/krnl386.exe16/int21.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/krnl386.exe16/int21.c b/dlls/krnl386.exe16/int21.c index 4f7ae02..39e195a 100644 --- a/dlls/krnl386.exe16/int21.c +++ b/dlls/krnl386.exe16/int21.c @@ -3587,6 +3587,8 @@ static void INT21_GetExtendedError( CONTEXT86 *context ) locus = EL_Disk; break; case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + case ERROR_INVALID_NAME: class = EC_NotFound; action = SA_Abort; locus = EL_Disk; @@ -3626,11 +3628,6 @@ static void INT21_GetExtendedError( CONTEXT86 *context ) action = SA_Abort; locus = EL_Memory; break; - case ERROR_PATH_NOT_FOUND: - class = EC_NotFound; - action = SA_Abort; - locus = EL_Disk; - break; case ERROR_SEEK: class = EC_NotFound; action = SA_Ignore;
1
0
0
0
Igor Paliychuk : cmdlgtst: Add Ukrainian translation.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: 70ef03208fa6f9ebad9be66731655ef3e7e135b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70ef03208fa6f9ebad9be6673…
Author: Igor Paliychuk <Igor-hkr(a)mail.ru> Date: Thu Jul 22 17:22:14 2010 +0300 cmdlgtst: Add Ukrainian translation. --- programs/cmdlgtst/Makefile.in | 1 + programs/cmdlgtst/Uk.rc | 301 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 302 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=70ef03208fa6f9ebad9be…
1
0
0
0
Piotr Caban : atl: Improved AtlInternalQueryInterface implementation.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: 1dc86ebb9b4aca5aa8c9de6e12a940c872792574 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1dc86ebb9b4aca5aa8c9de6e1…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jul 22 18:37:12 2010 +0200 atl: Improved AtlInternalQueryInterface implementation. --- dlls/atl/atl_main.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c index 7780b41..88795c9 100644 --- a/dlls/atl/atl_main.c +++ b/dlls/atl/atl_main.c @@ -259,7 +259,7 @@ HRESULT WINAPI AtlInternalQueryInterface(void* this, const _ATL_INTMAP_ENTRY* pE TRACE("Trying entry %i (%s %i %p)\n",i,debugstr_guid(pEntries[i].piid), pEntries[i].dw, pEntries[i].pFunc); - if (pEntries[i].piid && IsEqualGUID(iid,pEntries[i].piid)) + if (!pEntries[i].piid || IsEqualGUID(iid,pEntries[i].piid)) { TRACE("MATCH\n"); if (pEntries[i].pFunc == (_ATL_CREATORARGFUNC*)1) @@ -267,14 +267,15 @@ HRESULT WINAPI AtlInternalQueryInterface(void* this, const _ATL_INTMAP_ENTRY* pE TRACE("Offset\n"); *ppvObject = ((LPSTR)this+pEntries[i].dw); IUnknown_AddRef((IUnknown*)*ppvObject); - rc = S_OK; + return S_OK; } else { TRACE("Function\n"); rc = pEntries[i].pFunc(this, iid, ppvObject, pEntries[i].dw); + if(rc==S_OK || pEntries[i].piid) + return rc; } - break; } i++; }
1
0
0
0
Alexandre Julliard : include: Don't install tlb files, they are platform-dependent.
by Alexandre Julliard
23 Jul '10
23 Jul '10
Module: wine Branch: master Commit: c1de11eee5a829ec83438719fae7f93690423f6c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c1de11eee5a829ec83438719f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 11:34:23 2010 +0200 include: Don't install tlb files, they are platform-dependent. --- include/Makefile.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/Makefile.in b/include/Makefile.in index d1f653a..b228795 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -552,7 +552,7 @@ IDL_H_SRCS = $(PUBLIC_IDL_H_SRCS) $(PRIVATE_IDL_H_SRCS) @MAKE_RULES@ -OBJDIR_INCLUDES = $(PUBLIC_IDL_H_SRCS:.idl=.h) $(IDL_TLB_SRCS:.idl=.tlb) +OBJDIR_INCLUDES = $(PUBLIC_IDL_H_SRCS:.idl=.h) all: $(IDL_H_SRCS:.idl=.h) $(IDL_TLB_SRCS:.idl=.tlb)
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
90
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
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200