winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2007
----- 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
5 participants
856 discussions
Start a n
N
ew thread
Francois Gouget : winapi: Add support for GDIPCONST.
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: 8304759634bd7774979a63ffb169bba99e10b27a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8304759634bd7774979a63ffb…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Jun 21 11:15:26 2007 +0200 winapi: Add support for GDIPCONST. --- tools/winapi/winapi_parser.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/winapi/winapi_parser.pm b/tools/winapi/winapi_parser.pm index bf3021d..01774cd 100644 --- a/tools/winapi/winapi_parser.pm +++ b/tools/winapi/winapi_parser.pm @@ -434,14 +434,14 @@ sub parse_c_file($$) { $argument =~ s/^\s*(.*?)\s*$/$1/; # print " " . ($n + 1) . ": '$argument'\n"; $argument =~ s/^(?:IN OUT|IN|OUT)?\s+//; - $argument =~ s/^(?:const|CONST|volatile)?\s+//; + $argument =~ s/^(?:const|CONST|GDIPCONST|volatile)?\s+//; if($argument =~ /^\.\.\.$/) { $argument_type = "..."; $argument_name = "..."; } elsif($argument =~ /^ ((?:interface\s+|struct\s+|union\s+|enum\s+|register\s+|(?:signed\s+|unsigned\s+)? (?:short\s+(?=int)|long\s+(?=int))?)?(?:\w+|ElfW\(\w+\)|WS\(\w+\)))\s* - ((?:__RPC_FAR|const|CONST|volatile)?\s*(?:\*\s*(?:__RPC_FAR|const|CONST|volatile)?\s*?)*)\s* + ((?:__RPC_FAR|const|CONST|GDIPCONST|volatile)?\s*(?:\*\s*(?:__RPC_FAR|const|CONST|volatile)?\s*?)*)\s* (\w*)\s*(\[\])?(?:\s+OPTIONAL)?$/x) { $argument_type = $1;
1
0
0
0
Francois Gouget : advapi32: Add more RegGetValue() conformance tests, and fix Wine accordingly.
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: 1da7a32b116c169f07bfef060894df2b1f71a4b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1da7a32b116c169f07bfef060…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Jun 21 02:12:30 2007 +0200 advapi32: Add more RegGetValue() conformance tests, and fix Wine accordingly. --- dlls/advapi32/registry.c | 22 ++++++++++++++-------- dlls/advapi32/tests/registry.c | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index cb905ed..e62206b 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -1451,6 +1451,8 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, hKey, debugstr_w(pszSubKey), debugstr_w(pszValue), dwFlags, pdwType, pvData, pcbData, cbData); + if (pvData && !pcbData) + return ERROR_INVALID_PARAMETER; if ((dwFlags & RRF_RT_REG_EXPAND_SZ) && !(dwFlags & RRF_NOEXPAND)) return ERROR_INVALID_PARAMETER; @@ -1466,7 +1468,7 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, * if the passed buffer was too small as the expanded string might be * smaller than the unexpanded one and could fit into cbData bytes. */ if ((ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && - (dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND))) + dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND)) { do { HeapFree(GetProcessHeap(), 0, pvBuf); @@ -1478,7 +1480,7 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, break; } - if (ret == ERROR_MORE_DATA) + if (ret == ERROR_MORE_DATA || !pvData) ret = RegQueryValueExW(hKey, pszValue, NULL, &dwType, pvBuf, &cbData); else @@ -1496,6 +1498,7 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, if (ret == ERROR_SUCCESS) { + /* Recheck dwType in case it changed since the first call */ if (dwType == REG_EXPAND_SZ) { cbData = ExpandEnvironmentStringsW(pvBuf, pvData, @@ -1504,7 +1507,7 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, if(pcbData && cbData > *pcbData) ret = ERROR_MORE_DATA; } - else if (pcbData) + else if (pvData) CopyMemory(pvData, pvBuf, *pcbData); } @@ -1516,7 +1519,7 @@ LONG WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, ADVAPI_ApplyRestrictions(dwFlags, dwType, cbData, &ret); - if (pcbData && ret != ERROR_SUCCESS && (dwFlags & RRF_ZEROONFAILURE)) + if (pvData && ret != ERROR_SUCCESS && (dwFlags & RRF_ZEROONFAILURE)) ZeroMemory(pvData, *pcbData); if (pdwType) *pdwType = dwType; @@ -1543,6 +1546,8 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, hKey, pszSubKey, pszValue, dwFlags, pdwType, pvData, pcbData, cbData); + if (pvData && !pcbData) + return ERROR_INVALID_PARAMETER; if ((dwFlags & RRF_RT_REG_EXPAND_SZ) && !(dwFlags & RRF_NOEXPAND)) return ERROR_INVALID_PARAMETER; @@ -1558,7 +1563,7 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, * if the passed buffer was too small as the expanded string might be * smaller than the unexpanded one and could fit into cbData bytes. */ if ((ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && - (dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND))) + dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND)) { do { HeapFree(GetProcessHeap(), 0, pvBuf); @@ -1570,7 +1575,7 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, break; } - if (ret == ERROR_MORE_DATA) + if (ret == ERROR_MORE_DATA || !pvData) ret = RegQueryValueExA(hKey, pszValue, NULL, &dwType, pvBuf, &cbData); else @@ -1588,6 +1593,7 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, if (ret == ERROR_SUCCESS) { + /* Recheck dwType in case it changed since the first call */ if (dwType == REG_EXPAND_SZ) { cbData = ExpandEnvironmentStringsA(pvBuf, pvData, @@ -1596,7 +1602,7 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, if(pcbData && cbData > *pcbData) ret = ERROR_MORE_DATA; } - else if (pcbData) + else if (pvData) CopyMemory(pvData, pvBuf, *pcbData); } @@ -1608,7 +1614,7 @@ LONG WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, ADVAPI_ApplyRestrictions(dwFlags, dwType, cbData, &ret); - if (pcbData && ret != ERROR_SUCCESS && (dwFlags & RRF_ZEROONFAILURE)) + if (pvData && ret != ERROR_SUCCESS && (dwFlags & RRF_ZEROONFAILURE)) ZeroMemory(pvData, *pcbData); if (pdwType) *pdwType = dwType; diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 0cc58f1..cdd4835 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -598,6 +598,10 @@ static void test_get_value(void) return; } + /* Invalid parameter */ + ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD, &type, &dw, NULL); + ok(ret == ERROR_INVALID_PARAMETER, "ret=%d\n", ret); + /* Query REG_DWORD using RRF_RT_REG_DWORD (ok) */ size = type = dw = 0xdeadbeef; ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD, &type, &dw, &size); @@ -629,6 +633,13 @@ static void test_get_value(void) /* ... except the buffer, which is zeroed out */ ok(dw == 0, "dw=%d\n", dw); + /* Test RRF_ZEROONFAILURE with a NULL buffer... */ + type = size = 0xbadbeef; + ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_SZ|RRF_ZEROONFAILURE, &type, NULL, &size); + ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); + ok(size == 4, "size=%d\n", size); + ok(type == REG_DWORD, "type=%d\n", type); + /* Query REG_DWORD using RRF_RT_DWORD (ok) */ size = type = dw = 0xdeadbeef; ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_DWORD, &type, &dw, &size); @@ -678,6 +689,15 @@ static void test_get_value(void) ok(type == REG_SZ, "type=%d\n", type); ok(!strcmp(sTestpath1, buf), "sTestpath=\"%s\" buf=\"%s\"\n", sTestpath1, buf); + /* Query REG_SZ using RRF_RT_REG_SZ and no buffer (ok) */ + type = 0xdeadbeef; size = 0; + ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ, &type, NULL, &size); + ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ + ok(size == strlen(sTestpath1)+1 || size == strlen(sTestpath1)+2, + "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); + ok(type == REG_SZ, "type=%d\n", type); + /* Query REG_SZ using RRF_RT_REG_SZ|RRF_NOEXPAND (ok) */ buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ|RRF_NOEXPAND, &type, buf, &size); @@ -686,6 +706,14 @@ static void test_get_value(void) ok(type == REG_SZ, "type=%d\n", type); ok(!strcmp(sTestpath1, buf), "sTestpath=\"%s\" buf=\"%s\"\n", sTestpath1, buf); + /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ and no buffer (ok, expands) */ + size = 0xbadbeef; + ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_SZ, NULL, NULL, &size); + ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath1 length + 1 here. */ + ok((size == strlen(expanded)+1) || (size == strlen(sTestpath1)+1), + "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); + /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ (ok, expands) */ buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_SZ, &type, buf, &size); @@ -703,7 +731,15 @@ static void test_get_value(void) ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); ok(type == REG_EXPAND_SZ, "type=%d\n", type); ok(!strcmp(sTestpath1, buf), "sTestpath=\"%s\" buf=\"%s\"\n", sTestpath1, buf); - + + /* Query REG_EXPAND_SZ using RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND and no buffer (ok, doesn't expand) */ + size = 0xbadbeef; + ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND, NULL, NULL, &size); + ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ + ok(size == strlen(sTestpath1)+1 || size == strlen(sTestpath1)+2, + "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); + /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ|RRF_NOEXPAND (type mismatch) */ ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_SZ|RRF_NOEXPAND, NULL, NULL, NULL); ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret);
1
0
0
0
Dan Hipschman : widl: Fix warnings about unused function parameters.
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: bf5e46a60aa1cfcbb6efd61ebf4d34eb9fb0084d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf5e46a60aa1cfcbb6efd61eb…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Wed Jun 20 16:51:23 2007 -0700 widl: Fix warnings about unused function parameters. --- tools/widl/typegen.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 7b3bd13..8c76e6e 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -992,7 +992,7 @@ static void write_descriptors(FILE *file, type_t *type, unsigned int *tfsoff) } static int write_no_repeat_pointer_descriptions( - FILE *file, const attr_list_t *attrs, type_t *type, + FILE *file, type_t *type, size_t *offset_in_memory, size_t *offset_in_buffer, unsigned int *typestring_offset) { @@ -1028,7 +1028,7 @@ static int write_no_repeat_pointer_descriptions( const var_t *v; LIST_FOR_EACH_ENTRY( v, type->fields, const var_t, entry ) written += write_no_repeat_pointer_descriptions( - file, v->attrs, v->type, + file, v->type, offset_in_memory, offset_in_buffer, typestring_offset); } else @@ -1303,7 +1303,6 @@ static int write_varying_array_pointer_descriptions( } static void write_pointer_description(FILE *file, type_t *type, - size_t mem_offset, int level, unsigned int *typestring_offset) { size_t offset_in_buffer; @@ -1314,7 +1313,7 @@ static void write_pointer_description(FILE *file, type_t *type, offset_in_memory = 0; offset_in_buffer = 0; write_no_repeat_pointer_descriptions( - file, NULL, type, + file, type, &offset_in_memory, &offset_in_buffer, typestring_offset); /* pass 2: search for pointers in fixed arrays */ @@ -1518,7 +1517,7 @@ static size_t write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); *typestring_offset += 2; - write_pointer_description(file, type, 0, 0, typestring_offset); + write_pointer_description(file, type, typestring_offset); print_file(file, 2, "0x%x, /* FC_END */\n", RPC_FC_END); *typestring_offset += 1; } @@ -1631,7 +1630,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type, print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); *tfsoff += 2; - write_pointer_description(file, type, 0, 0, tfsoff); + write_pointer_description(file, type, tfsoff); print_file(file, 2, "0x%x, /* FC_END */\n", RPC_FC_END); *tfsoff += 1; }
1
0
0
0
Dan Hipschman : widl: Add tests for arrays of pointers.
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: 4e8c8d03e50a13c62711a3afb1bb424a56a9382a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4e8c8d03e50a13c62711a3afb…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Wed Jun 20 16:50:44 2007 -0700 widl: Add tests for arrays of pointers. --- dlls/rpcrt4/tests/server.c | 28 ++++++++++++++++++++++++++++ dlls/rpcrt4/tests/server.idl | 2 ++ tools/widl/typegen.c | 2 +- 3 files changed, 31 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index 65226db..a0291e0 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -257,6 +257,21 @@ s_square_encu(encu_t *eu) } } +int +s_sum_parr(int *a[3]) +{ + return s_sum_pcarr(a, 3); +} + +int +s_sum_pcarr(int *a[], int n) +{ + int i, s = 0; + for (i = 0; i < n; ++i) + s += *a[i]; + return s; +} + void s_stop(void) { @@ -494,14 +509,27 @@ us_t_UserFree(ULONG *flags, us_t *pus) static void pointer_tests(void) { + static int a[] = {1, 2, 3, 4}; static char p1[] = "11"; test_list_t *list = make_list(make_list(make_list(null_list()))); static test_us_t tus = {{p1}}; + int *pa[4]; ok(test_list_length(list) == 3, "RPC test_list_length\n"); ok(square_puint(p1) == 121, "RPC square_puint\n"); ok(square_test_us(&tus) == 121, "RPC square_test_us\n"); + pa[0] = &a[0]; + pa[1] = &a[1]; + pa[2] = &a[2]; + ok(sum_parr(pa) == 6, "RPC sum_parr\n"); + + pa[0] = &a[0]; + pa[1] = &a[1]; + pa[2] = &a[2]; + pa[3] = &a[3]; + ok(sum_pcarr(pa, 4) == 10, "RPC sum_pcarr\n"); + free_list(list); } diff --git a/dlls/rpcrt4/tests/server.idl b/dlls/rpcrt4/tests/server.idl index e7873f5..d409c53 100644 --- a/dlls/rpcrt4/tests/server.idl +++ b/dlls/rpcrt4/tests/server.idl @@ -158,5 +158,7 @@ interface IServer } encu_t; double square_encu(encu_t *eu); + int sum_parr(int *a[3]); + int sum_pcarr([size_is(n)] int *a[], int n); void stop(void); } diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 823f6e5..7b3bd13 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1518,7 +1518,7 @@ static size_t write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); *typestring_offset += 2; - write_pointer_description(file, type->ref, 0, 0, typestring_offset); + write_pointer_description(file, type, 0, 0, typestring_offset); print_file(file, 2, "0x%x, /* FC_END */\n", RPC_FC_END); *typestring_offset += 1; }
1
0
0
0
H. Verbeet : wined3d: Make use of the texUnitMap in drawStridedSlow as well .
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: c60bdca5b055d275088e709637cbd2734c291d67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c60bdca5b055d275088e70963…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Jun 21 00:01:05 2007 +0200 wined3d: Make use of the texUnitMap in drawStridedSlow as well. --- dlls/wined3d/drawprim.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 115f3e3..b996ae2 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -284,7 +284,6 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData const void *idxData, short idxSize, ULONG minIndex, ULONG startIdx, ULONG startVertex) { unsigned int textureNo = 0; - unsigned int texture_idx = 0; const WORD *pIdxBufS = NULL; const DWORD *pIdxBufL = NULL; LONG vx_index; @@ -318,7 +317,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData /* Adding the stream offset once is cheaper than doing it every iteration. Do not modify the strided data, it is a pointer * to the strided Data in the device and might be needed intact on the next draw */ - for (textureNo = 0, texture_idx = 0; textureNo < GL_LIMITS(texture_stages); ++textureNo) { + for (textureNo = 0; textureNo < GL_LIMITS(texture_stages); ++textureNo) { if(sd->u.s.texCoords[textureNo].lpData) { texCoords[textureNo] = sd->u.s.texCoords[textureNo].lpData + streamOffset[sd->u.s.texCoords[textureNo].streamNo]; } else { @@ -383,7 +382,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData } /* Texture coords --------------------------- */ - for (textureNo = 0, texture_idx = 0; textureNo < GL_LIMITS(texture_stages); ++textureNo) { + for (textureNo = 0; textureNo < GL_LIMITS(texture_stages); ++textureNo) { if (!GL_SUPPORT(ARB_MULTITEXTURE) && textureNo > 0) { FIXME("Program using multiple concurrent textures which this opengl implementation doesn't support\n"); @@ -399,23 +398,22 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData if (coordIdx > 7) { VTRACE(("tex: %d - Skip tex coords, as being system generated\n", textureNo)); - ++texture_idx; continue; } else if (coordIdx < 0) { FIXME("tex: %d - Coord index %d is less than zero, expect a crash.\n", textureNo, coordIdx); - ++texture_idx; continue; } ptrToCoords = (float *)(texCoords[coordIdx] + (SkipnStrides * sd->u.s.texCoords[coordIdx].dwStride)); if (texCoords[coordIdx] == NULL) { TRACE("tex: %d - Skipping tex coords, as no data supplied\n", textureNo); - ++texture_idx; continue; } else { - + int texture_idx = This->texUnitMap[textureNo]; int coordsToUse = sd->u.s.texCoords[coordIdx].dwType + 1; /* 0 == WINED3DDECLTYPE_FLOAT1 etc */ + if (texture_idx == -1) continue; + /* The coords to supply depend completely on the fvf / vertex shader */ switch (coordsToUse) { case 4: q = ptrToCoords[3]; /* drop through */ @@ -492,7 +490,6 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData } } } - if (/*!GL_SUPPORT(NV_REGISTER_COMBINERS) || This->stateBlock->textures[textureNo]*/TRUE) ++texture_idx; } /* End of textures */ /* Diffuse -------------------------------- */
1
0
0
0
H. Verbeet : wined3d: Use texture2D to sample in pshader_glsl_texdp3tex().
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: 2e786e09bb3354ee6d3fb96fa7f100e8c2e1efc7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2e786e09bb3354ee6d3fb96fa…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Jun 21 00:00:59 2007 +0200 wined3d: Use texture2D to sample in pshader_glsl_texdp3tex(). --- dlls/wined3d/glsl_shader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index afffa23..244316a 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1625,7 +1625,7 @@ void pshader_glsl_texdp3tex(SHADER_OPCODE_ARG* arg) { shader_glsl_append_dst(arg->buffer, arg); shader_glsl_get_write_mask(arg->dst, dst_mask); - shader_addline(arg->buffer, "texture1D(Psampler%u, dot(gl_TexCoord[%u].xyz, %s))%s);\n", + shader_addline(arg->buffer, "texture2D(Psampler%u, vec2(dot(gl_TexCoord[%u].xyz, %s), 0.5))%s);\n", sampler_idx, sampler_idx, src0_param.param_str, dst_mask); }
1
0
0
0
Alexander Nicolaysen Sørnes : wordpad: Remove unnecessary toolbar resizing code.
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: bb1a13774ef1d104a0e0b2b8bab229fb87b20490 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb1a13774ef1d104a0e0b2b8b…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Thu Jun 14 22:09:33 2007 +0200 wordpad: Remove unnecessary toolbar resizing code. --- programs/wordpad/wordpad.c | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-) diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 12c2d43..1b859b7 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -822,8 +822,6 @@ static LRESULT OnSize( HWND hWnd, WPARAM wParam, LPARAM lParam ) HWND hwndEditor = GetDlgItem(hWnd, IDC_EDITOR); HWND hwndStatusBar = GetDlgItem(hWnd, IDC_STATUSBAR); HWND hwndReBar = GetDlgItem(hWnd, IDC_REBAR); - HWND hwndToolBar = GetDlgItem(hwndReBar, IDC_TOOLBAR); - HWND hwndFormatBar = GetDlgItem(hwndReBar, IDC_FORMATBAR); int rebarHeight = 0; REBARBANDINFOW rbbinfo; int rebarRows = 2; @@ -840,26 +838,6 @@ static LRESULT OnSize( HWND hWnd, WPARAM wParam, LPARAM lParam ) nStatusSize = 0; } } - if (hwndToolBar) - { - rc.left = rc.top = 0; - rc.right = LOWORD(lParam); - rc.bottom = HIWORD(lParam); - SendMessageW(hwndToolBar, TB_AUTOSIZE, 0, 0); - SendMessageW(hwndReBar, RB_SIZETORECT, 0, (LPARAM)&rc); - GetClientRect(hwndReBar, &rc); - MoveWindow(hwndReBar, 0, 0, LOWORD(lParam), rc.right, FALSE); - } - if (hwndFormatBar) - { - rc.left = rc.top = 0; - rc.right = LOWORD(lParam); - rc.bottom = HIWORD(lParam); - SendMessageW(hwndFormatBar, TB_AUTOSIZE, 0, 0); - SendMessageW(hwndReBar, RB_SIZETORECT, 0, (LPARAM)&rc); - GetClientRect(hwndReBar, &rc); - MoveWindow(hwndReBar, 0, 0, LOWORD(lParam), rc.right, FALSE); - } if (hwndReBar) { rbbinfo.cbSize = sizeof(rbbinfo);
1
0
0
0
Alexander Nicolaysen Sørnes : wordpad: Set default font effects to 0.
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: 40bee2c46b755698af93a6882c4a5f11ac693cca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=40bee2c46b755698af93a6882…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Thu Jun 14 20:03:21 2007 +0200 wordpad: Set default font effects to 0. --- programs/wordpad/wordpad.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 1dd869b..12c2d43 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -319,7 +319,8 @@ static void DoDefaultFont(void) ZeroMemory(&fmt, sizeof(fmt)); fmt.cbSize = sizeof(fmt); - fmt.dwMask = CFM_FACE; + fmt.dwMask = CFM_FACE | CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE; + fmt.dwEffects = 0; lstrcpyW(fmt.szFaceName, szFaceName);
1
0
0
0
Stefan Dösinger : wined3d: Emulate tracking of multiple material properties.
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: b081cbaf40519dc9556d3fab57e02a2296cf4e66 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b081cbaf40519dc9556d3fab5…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Wed Jun 20 14:36:32 2007 +0200 wined3d: Emulate tracking of multiple material properties. --- dlls/wined3d/drawprim.c | 57 ++++++++++++++++++++++++++++++++++++++- dlls/wined3d/state.c | 21 ++++++++++++++ dlls/wined3d/wined3d_private.h | 2 + 3 files changed, 78 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 1cde3a9..115f3e3 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -510,6 +510,19 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData D3DCOLOR_B_G(diffuseColor), D3DCOLOR_B_B(diffuseColor), D3DCOLOR_B_A(diffuseColor))); + + if(This->activeContext->num_untracked_materials) { + unsigned char i; + float color[4]; + color[0] = D3DCOLOR_B_R(diffuseColor) / 255.0; + color[1] = D3DCOLOR_B_G(diffuseColor) / 255.0; + color[2] = D3DCOLOR_B_B(diffuseColor) / 255.0; + color[3] = D3DCOLOR_B_A(diffuseColor) / 255.0; + + for(i = 0; i < This->activeContext->num_untracked_materials; i++) { + glMaterialfv(GL_FRONT_AND_BACK, This->activeContext->untracked_materials[i], color); + } + } } /* Specular ------------------------------- */ @@ -1030,15 +1043,55 @@ void drawPrimitive(IWineD3DDevice *iface, { GLenum glPrimType; + BOOL emulation = FALSE; + WineDirect3DVertexStridedData *strided = &This->strided_streams; + WineDirect3DVertexStridedData stridedlcl; /* Ok, Work out which primitive is requested and how many vertexes that will be */ UINT calculatedNumberOfindices = primitiveToGl(PrimitiveType, NumPrimitives, &glPrimType); if (numberOfVertices == 0 ) numberOfVertices = calculatedNumberOfindices; - if (This->useDrawStridedSlow) { + if(!This->strided_streams.u.s.position_transformed && !use_vs(This)) { + if(This->activeContext->num_untracked_materials && + This->stateBlock->renderState[WINED3DRS_LIGHTING]) { + IWineD3DVertexBufferImpl *vb; + + FIXME("Using software emulation because not all material properties could be tracked\n"); + emulation = TRUE; + + strided = &stridedlcl; + memcpy(&stridedlcl, &This->strided_streams, sizeof(stridedlcl)); + +#define FIXVBO(type) \ +if(stridedlcl.u.s.type.VBO) { \ + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[stridedlcl.u.s.type.streamNo]; \ + stridedlcl.u.s.type.VBO = 0; \ + stridedlcl.u.s.type.lpData = (BYTE *) ((unsigned long) stridedlcl.u.s.type.lpData + (unsigned long) vb->resource.allocatedMemory); \ +} + FIXVBO(position); + FIXVBO(blendWeights); + FIXVBO(blendMatrixIndices); + FIXVBO(normal); + FIXVBO(pSize); + FIXVBO(diffuse); + FIXVBO(specular); + for(i = 0; i < WINED3DDP_MAXTEXCOORD; i++) FIXVBO(texCoords[i]); + FIXVBO(position2); + FIXVBO(normal2); + FIXVBO(tangent); + FIXVBO(binormal); + FIXVBO(tessFactor); + FIXVBO(fog); + FIXVBO(depth); + FIXVBO(sample); +#undef FIXVBO + } + } + + if (This->useDrawStridedSlow || emulation) { /* Immediate mode drawing */ - drawStridedSlow(iface, &This->strided_streams, calculatedNumberOfindices, + drawStridedSlow(iface, strided, calculatedNumberOfindices, glPrimType, idxData, idxSize, minIndex, StartIdx, StartVertexIndex); } else if(This->instancedDraw) { /* Instancing emulation with mixing immediate mode and arrays */ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 1c72785..3b7c5c9 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -980,6 +980,7 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine isDiffuseSupplied = diffuse->lpData || diffuse->VBO; + context->num_untracked_materials = 0; if (isDiffuseSupplied && stateblock->renderState[WINED3DRS_COLORVERTEX]) { TRACE("diff %d, amb %d, emis %d, spec %d\n", stateblock->renderState[WINED3DRS_DIFFUSEMATERIALSOURCE], @@ -993,10 +994,30 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine } else { Parm = GL_DIFFUSE; } + if(stateblock->renderState[WINED3DRS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) { + context->untracked_materials[context->num_untracked_materials] = GL_EMISSION; + context->num_untracked_materials++; + } + if(stateblock->renderState[WINED3DRS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) { + context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; + context->num_untracked_materials++; + } } else if (stateblock->renderState[WINED3DRS_AMBIENTMATERIALSOURCE] == WINED3DMCS_COLOR1) { Parm = GL_AMBIENT; + if(stateblock->renderState[WINED3DRS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) { + context->untracked_materials[context->num_untracked_materials] = GL_EMISSION; + context->num_untracked_materials++; + } + if(stateblock->renderState[WINED3DRS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) { + context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; + context->num_untracked_materials++; + } } else if (stateblock->renderState[WINED3DRS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) { Parm = GL_EMISSION; + if(stateblock->renderState[WINED3DRS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) { + context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; + context->num_untracked_materials++; + } } else if (stateblock->renderState[WINED3DRS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) { Parm = GL_SPECULAR; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1c35ea4..3c0dfee 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -507,6 +507,8 @@ struct WineD3DContext { BOOL namedArraysLoaded, numberedArraysLoaded; BOOL lastWasPow2Texture[MAX_TEXTURES]; GLenum tracking_parm; /* Which source is tracking current colour */ + unsigned char num_untracked_materials; + GLenum untracked_materials[2]; BOOL last_was_blit, last_was_ckey; char texShaderBumpMap;
1
0
0
0
Stefan Dösinger : wined3d: Unload texture coords for all supported texture stages.
by Alexandre Julliard
21 Jun '07
21 Jun '07
Module: wine Branch: master Commit: 35ee1e9693f086fa996dec020c74570e3523d942 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35ee1e9693f086fa996dec020…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Wed Jun 20 14:23:04 2007 +0200 wined3d: Unload texture coords for all supported texture stages. --- dlls/wined3d/state.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index d6522f2..1c72785 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1812,7 +1812,7 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W static void unloadTexCoords(IWineD3DStateBlockImpl *stateblock) { int texture_idx; - for (texture_idx = 0; texture_idx < GL_LIMITS(textures); ++texture_idx) { + for (texture_idx = 0; texture_idx < GL_LIMITS(texture_stages); ++texture_idx) { GL_EXTCALL(glClientActiveTextureARB(GL_TEXTURE0_ARB + texture_idx)); glDisableClientState(GL_TEXTURE_COORD_ARRAY); }
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
86
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
Results per page:
10
25
50
100
200