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 2014
----- 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
4 participants
378 discussions
Start a n
N
ew thread
Nikolay Sivov : kernel32: Added support for C3_HIGHSURROGATE/ C3_LOWSURROGATE in GetStringTypeW().
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: 3a2db918d9b6de27ff96ccf7adafe2006157434f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a2db918d9b6de27ff96ccf7a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Jun 29 20:05:22 2014 +0400 kernel32: Added support for C3_HIGHSURROGATE/C3_LOWSURROGATE in GetStringTypeW(). --- dlls/kernel32/locale.c | 3 +++ dlls/kernel32/tests/locale.c | 16 ++++++++++++++++ include/winnls.h | 2 ++ 3 files changed, 21 insertions(+) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 26c00f5..b467886 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -2504,6 +2504,9 @@ BOOL WINAPI GetStringTypeW( DWORD type, LPCWSTR src, INT count, LPWORD chartype if ((c>=0x0600)&&(c<=0x06FF)) type3 |= C3_KASHIDA; if ((c>=0x3000)&&(c<=0x303F)) type3 |= C3_SYMBOL; + if ((c>=0xD800)&&(c<=0xDBFF)) type3 |= C3_HIGHSURROGATE; + if ((c>=0xDC00)&&(c<=0xDFFF)) type3 |= C3_LOWSURROGATE; + if ((c>=0xFF00)&&(c<=0xFF60)) type3 |= C3_FULLWIDTH; if ((c>=0xFF00)&&(c<=0xFF20)) type3 |= C3_SYMBOL; if ((c>=0xFF3B)&&(c<=0xFF40)) type3 |= C3_SYMBOL; diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index f92311e..4992525 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -3271,6 +3271,7 @@ static void test_GetStringTypeW(void) static const WCHAR space_special[] = {0x09, 0x0d, 0x85}; WORD types[20]; + WCHAR ch; int i; memset(types,0,sizeof(types)); @@ -3327,6 +3328,21 @@ static void test_GetStringTypeW(void) GetStringTypeW(CT_CTYPE1, space_special, 3, types); for (i = 0; i < 3; i++) ok(types[i] & C1_SPACE || broken(types[i] == C1_CNTRL) || broken(types[i] == 0), "incorrect types returned for %x -> (%x does not have %x)\n",space_special[i], types[i], C1_SPACE ); + + /* surrogate pairs */ + ch = 0xd800; + memset(types, 0, sizeof(types)); + GetStringTypeW(CT_CTYPE3, &ch, 1, types); + if (types[0] == C3_NOTAPPLICABLE) + win_skip("C3_HIGHSURROGATE/C3_LOWSURROGATE are not supported.\n"); + else { + ok(types[0] == C3_HIGHSURROGATE, "got %x\n", types[0]); + + ch = 0xdc00; + memset(types, 0, sizeof(types)); + GetStringTypeW(CT_CTYPE3, &ch, 1, types); + ok(types[0] == C3_LOWSURROGATE, "got %x\n", types[0]); + } } static void test_IdnToNameprepUnicode(void) diff --git a/include/winnls.h b/include/winnls.h index 9ed4344..b332b72 100644 --- a/include/winnls.h +++ b/include/winnls.h @@ -460,6 +460,8 @@ static const WCHAR LOCALE_NAME_SYSTEM_DEFAULT[] = {'!','s','y','s','-','d','e',' #define C3_IDEOGRAPH 0x0100 #define C3_KASHIDA 0x0200 #define C3_LEXICAL 0x0400 +#define C3_HIGHSURROGATE 0x0800 +#define C3_LOWSURROGATE 0x1000 #define C3_ALPHA 0x8000 #define C3_NOTAPPLICABLE 0x0000
1
0
0
0
Piotr Caban : msvcrt: Fix buffer allocation in setvbuf.
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: 0350b6c7fd68bcdec7d7ff56fec76b6d13864670 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0350b6c7fd68bcdec7d7ff56f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sun Jun 29 14:58:13 2014 +0200 msvcrt: Fix buffer allocation in setvbuf. --- dlls/msvcrt/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 44e9339..8b12ae9 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -4506,7 +4506,7 @@ int CDECL MSVCRT_setvbuf(MSVCRT_FILE* file, char *buf, int mode, MSVCRT_size_t s file->_flag |= MSVCRT__USERBUF; file->_bufsiz = size; }else { - file->_base = file->_ptr = malloc(size); + file->_base = file->_ptr = MSVCRT_malloc(size); if(!file->_base) { file->_bufsiz = 0; MSVCRT__unlock_file(file);
1
0
0
0
Frédéric Delanoy : msvcrt: Avoid potential integer overflow when computing median position in bsearch.
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: b9e306ee78ee4bb7ee51b8ffc3cf7a54ed00a2e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9e306ee78ee4bb7ee51b8ffc…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Sun Jun 29 12:05:36 2014 +0200 msvcrt: Avoid potential integer overflow when computing median position in bsearch. --- dlls/msvcrt/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c index d791699..fc5a5a9 100644 --- a/dlls/msvcrt/misc.c +++ b/dlls/msvcrt/misc.c @@ -139,7 +139,7 @@ void* CDECL MSVCRT_bsearch_s(const void *key, const void *base, while (min <= max) { - ssize_t cursor = (min + max) / 2; + ssize_t cursor = min + (max - min) / 2; int ret = compare(ctx, key,(const char *)base+(cursor*size)); if (!ret) return (char*)base+(cursor*size);
1
0
0
0
Nikolay Sivov : advapi32: Implement RegDeleteKeyValue().
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: da6d5e6ae60da276eb2a9b749c4d6eeb0b703afe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da6d5e6ae60da276eb2a9b749…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jun 28 20:15:47 2014 +0400 advapi32: Implement RegDeleteKeyValue(). --- dlls/advapi32/advapi32.spec | 4 +-- dlls/advapi32/registry.c | 56 +++++++++++++++++++++++++++++++++--------- dlls/advapi32/tests/registry.c | 53 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 13 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 0b654c8..0efdc2c 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -588,8 +588,8 @@ # @ stub RegDeleteKeyTransactedA # @ stub RegDeleteKeyTransactedW @ stdcall RegDeleteKeyW(long wstr) -# @ stub RegDeleteKeyValueA -# @ stub RegDeleteKeyValueW +@ stdcall RegDeleteKeyValueA(long str str) +@ stdcall RegDeleteKeyValueW(long wstr wstr) @ stdcall RegDeleteTreeA(long str) @ stdcall RegDeleteTreeW(long wstr) @ stdcall RegDeleteValueA(long str) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index 0a04bc7..c7ba3ef 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -2050,8 +2050,6 @@ LSTATUS WINAPI RegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_c return RtlNtStatusToDosError(status); } - - /****************************************************************************** * RegDeleteValueW [ADVAPI32.@] * @@ -2059,15 +2057,9 @@ LSTATUS WINAPI RegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_c */ LSTATUS WINAPI RegDeleteValueW( HKEY hkey, LPCWSTR name ) { - UNICODE_STRING nameW; - - if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE; - - RtlInitUnicodeString( &nameW, name ); - return RtlNtStatusToDosError( NtDeleteValueKey( hkey, &nameW ) ); + return RegDeleteKeyValueW( hkey, NULL, name ); } - /****************************************************************************** * RegDeleteValueA [ADVAPI32.@] * @@ -2083,22 +2075,64 @@ LSTATUS WINAPI RegDeleteValueW( HKEY hkey, LPCWSTR name ) */ LSTATUS WINAPI RegDeleteValueA( HKEY hkey, LPCSTR name ) { - ANSI_STRING nameA; + return RegDeleteKeyValueA( hkey, NULL, name ); +} + +/****************************************************************************** + * RegDeleteKeyValueW [ADVAPI32.@] + */ +LONG WINAPI RegDeleteKeyValueW( HKEY hkey, LPCWSTR subkey, LPCWSTR name ) +{ UNICODE_STRING nameW; + HKEY hsubkey = 0; + LONG ret; + + if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE; + + if (subkey) + { + if ((ret = RegOpenKeyExW( hkey, subkey, 0, KEY_SET_VALUE, &hsubkey ))) + return ret; + hkey = hsubkey; + } + + RtlInitUnicodeString( &nameW, name ); + ret = RtlNtStatusToDosError( NtDeleteValueKey( hkey, &nameW ) ); + if (hsubkey) RegCloseKey( hsubkey ); + return ret; +} + +/****************************************************************************** + * RegDeleteKeyValueA [ADVAPI32.@] + */ +LONG WINAPI RegDeleteKeyValueA( HKEY hkey, LPCSTR subkey, LPCSTR name ) +{ + UNICODE_STRING nameW; + HKEY hsubkey = 0; + ANSI_STRING nameA; NTSTATUS status; if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE; + if (subkey) + { + LONG ret = RegOpenKeyExA( hkey, subkey, 0, KEY_SET_VALUE, &hsubkey ); + if (ret) + return ret; + hkey = hsubkey; + } + RtlInitAnsiString( &nameA, name ); if (!(status = RtlAnsiStringToUnicodeString( &nameW, &nameA, TRUE ))) { status = NtDeleteValueKey( hkey, &nameW ); RtlFreeUnicodeString( &nameW ); } + + if (hsubkey) RegCloseKey( hsubkey ); return RtlNtStatusToDosError( status ); } - /****************************************************************************** * RegLoadKeyW [ADVAPI32.@] * diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index d339253..7c4db40 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -47,6 +47,7 @@ static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL); static NTSTATUS (WINAPI * pNtDeleteKey)(HANDLE); static NTSTATUS (WINAPI * pRtlFormatCurrentUserKeyPath)(UNICODE_STRING*); static NTSTATUS (WINAPI * pRtlFreeUnicodeString)(PUNICODE_STRING); +static LONG (WINAPI *pRegDeleteKeyValueA)(HKEY,LPCSTR,LPCSTR); static BOOL limited_user; @@ -135,6 +136,7 @@ static void InitFunctionPtrs(void) ADVAPI32_GET_PROC(RegGetValueA); ADVAPI32_GET_PROC(RegDeleteTreeA); ADVAPI32_GET_PROC(RegDeleteKeyExA); + ADVAPI32_GET_PROC(RegDeleteKeyValueA); pIsWow64Process = (void *)GetProcAddress( hkernel32, "IsWow64Process" ); pRtlFormatCurrentUserKeyPath = (void *)GetProcAddress( hntdll, "RtlFormatCurrentUserKeyPath" ); @@ -2768,6 +2770,56 @@ static void test_delete_value(void) "expect ERROR_FILE_NOT_FOUND, got %i\n", res); } +static void test_delete_key_value(void) +{ + HKEY subkey; + LONG ret; + + if (!pRegDeleteKeyValueA) + { + win_skip("RegDeleteKeyValue is not available.\n"); + return; + } + + ret = pRegDeleteKeyValueA(NULL, NULL, NULL); + ok(ret == ERROR_INVALID_HANDLE, "got %d\n", ret); + + ret = pRegDeleteKeyValueA(hkey_main, NULL, NULL); + ok(ret == ERROR_FILE_NOT_FOUND, "got %d\n", ret); + + ret = RegSetValueExA(hkey_main, "test", 0, REG_SZ, (const BYTE*)"value", 6); + ok(ret == ERROR_SUCCESS, "got %d\n", ret); + + ret = RegQueryValueExA(hkey_main, "test", NULL, NULL, NULL, NULL); + ok(ret == ERROR_SUCCESS, "got %d\n", ret); + + /* NULL subkey name means delete from open key */ + ret = pRegDeleteKeyValueA(hkey_main, NULL, "test"); + ok(ret == ERROR_SUCCESS, "got %d\n", ret); + + ret = RegQueryValueExA(hkey_main, "test", NULL, NULL, NULL, NULL); + ok(ret == ERROR_FILE_NOT_FOUND, "got %d\n", ret); + + /* now with real subkey */ + ret = RegCreateKeyExA(hkey_main, "Subkey1", 0, NULL, 0, KEY_WRITE|KEY_READ, NULL, &subkey, NULL); + ok(!ret, "failed with error %d\n", ret); + + ret = RegSetValueExA(subkey, "test", 0, REG_SZ, (const BYTE*)"value", 6); + ok(ret == ERROR_SUCCESS, "got %d\n", ret); + + ret = RegQueryValueExA(subkey, "test", NULL, NULL, NULL, NULL); + ok(ret == ERROR_SUCCESS, "got %d\n", ret); + + ret = pRegDeleteKeyValueA(hkey_main, "Subkey1", "test"); + ok(ret == ERROR_SUCCESS, "got %d\n", ret); + + ret = RegQueryValueExA(subkey, "test", NULL, NULL, NULL, NULL); + ok(ret == ERROR_FILE_NOT_FOUND, "got %d\n", ret); + + RegDeleteKeyA(subkey, ""); + RegCloseKey(subkey); +} + START_TEST(registry) { /* Load pointers for functions that are not available in all Windows versions */ @@ -2808,6 +2860,7 @@ START_TEST(registry) test_rw_order(); test_deleted_key(); test_delete_value(); + test_delete_key_value(); /* cleanup */ delete_key( hkey_main );
1
0
0
0
Nikolay Sivov : shell32: Implement PathYetAnotherMakeUniqueName().
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: f9a19f57e1cc696e660ad4f847516aeb768a293b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9a19f57e1cc696e660ad4f84…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jun 28 15:43:06 2014 +0400 shell32: Implement PathYetAnotherMakeUniqueName(). --- dlls/shell32/shellpath.c | 37 +++++++++++++------ dlls/shell32/tests/shellpath.c | 82 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 11 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 2dfed75..158b1d1 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -537,22 +537,37 @@ BOOL WINAPI PathMakeUniqueNameAW( /************************************************************************* * PathYetAnotherMakeUniqueName [SHELL32.75] - * - * NOTES - * exported by ordinal */ -BOOL WINAPI PathYetAnotherMakeUniqueName( - LPWSTR lpszBuffer, - LPCWSTR lpszPathName, - LPCWSTR lpszShortName, - LPCWSTR lpszLongName) +BOOL WINAPI PathYetAnotherMakeUniqueName(LPWSTR buffer, LPCWSTR path, LPCWSTR shortname, LPCWSTR longname) { - FIXME("(%p, %s, %s ,%s):stub.\n", - lpszBuffer, debugstr_w(lpszPathName), debugstr_w(lpszShortName), debugstr_w(lpszLongName)); + WCHAR pathW[MAX_PATH], retW[MAX_PATH]; + const WCHAR *file, *ext; + int i = 2; + + TRACE("(%p, %s, %s, %s)\n", buffer, debugstr_w(path), debugstr_w(shortname), debugstr_w(longname)); + + file = longname ? longname : shortname; + PathCombineW(pathW, path, file); + strcpyW(retW, pathW); + PathRemoveExtensionW(pathW); + + ext = PathFindExtensionW(file); + + /* now try to make it unique */ + while (PathFileExistsW(retW)) + { + static const WCHAR fmtW[] = {'%','s',' ','(','%','d',')','%','s',0}; + + sprintfW(retW, fmtW, pathW, i, ext); + i++; + } + + strcpyW(buffer, retW); + TRACE("ret - %s\n", debugstr_w(buffer)); + return TRUE; } - /* ########## cleaning and resolving paths ########## */ diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 7486fac..efdfbbd 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -101,6 +101,7 @@ static UINT (WINAPI *pGetSystemWow64DirectoryA)(LPSTR,UINT); static HRESULT (WINAPI *pSHGetKnownFolderPath)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR *); static HRESULT (WINAPI *pSHSetKnownFolderPath)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR); static HRESULT (WINAPI *pSHGetFolderPathEx)(REFKNOWNFOLDERID, DWORD, HANDLE, LPWSTR, DWORD); +static BOOL (WINAPI *pPathYetAnotherMakeUniqueName)(PWSTR, PCWSTR, PCWSTR, PCWSTR); static DLLVERSIONINFO shellVersion = { 0 }; static LPMALLOC pMalloc; @@ -207,6 +208,7 @@ static void loadShell32(void) pILFindLastID = (void *)GetProcAddress(hShell32, (LPCSTR)16); GET_PROC(SHFileOperationA) GET_PROC(SHGetMalloc) + GET_PROC(PathYetAnotherMakeUniqueName) ok(pSHGetMalloc != NULL, "shell32 is missing SHGetMalloc\n"); if (pSHGetMalloc) @@ -2631,6 +2633,85 @@ static void test_DoEnvironmentSubst(void) } } +static void test_PathYetAnotherMakeUniqueName(void) +{ + static const WCHAR shortW[] = {'f','i','l','e','.','t','s','t',0}; + static const WCHAR short2W[] = {'f','i','l','e',' ','(','2',')','.','t','s','t',0}; + static const WCHAR tmpW[] = {'t','m','p',0}; + static const WCHAR longW[] = {'n','a','m','e',0}; + static const WCHAR long2W[] = {'n','a','m','e',' ','(','2',')',0}; + WCHAR nameW[MAX_PATH], buffW[MAX_PATH], pathW[MAX_PATH]; + HANDLE file; + BOOL ret; + + if (!pPathYetAnotherMakeUniqueName) + { + win_skip("PathYetAnotherMakeUniqueName() is not available.\n"); + return; + } + +if (0) +{ + /* crashes on Windows */ + ret = pPathYetAnotherMakeUniqueName(NULL, NULL, NULL, NULL); + ok(!ret, "got %d\n", ret); + + ret = pPathYetAnotherMakeUniqueName(nameW, NULL, NULL, NULL); + ok(!ret, "got %d\n", ret); +} + + GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW); + + /* Using short name only first */ + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, shortW, NULL); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, shortW); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); + + /* now create a file with this name and get next name */ + file = CreateFileW(nameW, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); + ok(file != NULL, "got %p\n", file); + + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, shortW, NULL); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, short2W); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); + + CloseHandle(file); + + /* Using short and long */ + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, tmpW, longW); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, longW); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); + + file = CreateFileW(nameW, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); + ok(file != NULL, "got %p\n", file); + + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, tmpW, longW); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, long2W); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); + + CloseHandle(file); + + /* Using long only */ + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, NULL, longW); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, longW); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); +} + START_TEST(shellpath) { if (!init()) return; @@ -2659,5 +2740,6 @@ START_TEST(shellpath) test_SHGetFolderPathEx(); test_knownFolders(); test_DoEnvironmentSubst(); + test_PathYetAnotherMakeUniqueName(); } }
1
0
0
0
Marcus Meissner : packager: Fixed incorrect size (Coverity).
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: 7ef536001fa0da54dafbc32a206343ee59dc0fba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ef536001fa0da54dafbc32a2…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jun 28 12:22:44 2014 +0200 packager: Fixed incorrect size (Coverity). --- dlls/packager/packager_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/packager/packager_main.c b/dlls/packager/packager_main.c index 3f05f88..c1d194e 100644 --- a/dlls/packager/packager_main.c +++ b/dlls/packager/packager_main.c @@ -474,7 +474,7 @@ static HRESULT WINAPI PersistStorage_Load(IPersistStorage* iface, ++stream_filename; stream_filename_len = len - (stream_filename - filenameW); - len = GetTempPathW(sizeof(This->filename), This->filename); + len = GetTempPathW(sizeof(This->filename)/sizeof(WCHAR), This->filename); memcpy(This->filename + len, stream_filename, stream_filename_len * sizeof(WCHAR)); This->filename[len + stream_filename_len] = 0;
1
0
0
0
Marcus Meissner : windowscodecs: Fixed incorrect memset (Coverity).
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: 4cfad9c4625ee42206c977dd0e5001e68d98af8a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4cfad9c4625ee42206c977dd0…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jun 28 12:22:46 2014 +0200 windowscodecs: Fixed incorrect memset (Coverity). --- dlls/windowscodecs/pngformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 73416eb..a8ecb73 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -1138,7 +1138,7 @@ static HRESULT WINAPI PngFrameEncode_Initialize(IWICBitmapFrameEncode *iface, return hr; } else - memset(opt_values, sizeof(opt_values), 0); + memset(opt_values, 0, sizeof(opt_values)); if (V_VT(&opt_values[0]) == VT_EMPTY) interlace = FALSE;
1
0
0
0
Andrew Eikum : mmdevapi: Don' t stop sending event signals after IAudioClient::Stop.
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: b950b9a835f153865403e453ea32e448668082d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b950b9a835f153865403e453e…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Jun 27 11:04:23 2014 -0500 mmdevapi: Don't stop sending event signals after IAudioClient::Stop. --- dlls/mmdevapi/tests/capture.c | 6 +++--- dlls/mmdevapi/tests/render.c | 6 +++--- dlls/winealsa.drv/mmdevdrv.c | 40 +++++++++++++++++++-------------------- dlls/winecoreaudio.drv/mmdevdrv.c | 27 +++++++++++--------------- dlls/wineoss.drv/mmdevdrv.c | 34 +++++++++++++++++---------------- 5 files changed, 54 insertions(+), 59 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b950b9a835f153865403e…
1
0
0
0
Andrew Eikum : mmdevapi: Standardize period sizes.
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: wine Branch: master Commit: d5b597fee5b31b4834327540d25473de5695cf27 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d5b597fee5b31b4834327540d…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Jun 27 11:04:16 2014 -0500 mmdevapi: Standardize period sizes. --- dlls/winecoreaudio.drv/mmdevdrv.c | 4 ++-- dlls/wineoss.drv/mmdevdrv.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 81816ca..626add1 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -61,8 +61,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(coreaudio); #define NULL_PTR_ERR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, RPC_X_NULL_REF_POINTER) -static const REFERENCE_TIME DefaultPeriod = 200000; -static const REFERENCE_TIME MinimumPeriod = 100000; +static const REFERENCE_TIME DefaultPeriod = 100000; +static const REFERENCE_TIME MinimumPeriod = 50000; typedef struct _QueuedBufInfo { Float64 start_sampletime; diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index 1e0e116..922cbb0 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -57,8 +57,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(oss); #define NULL_PTR_ERR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, RPC_X_NULL_REF_POINTER) -static const REFERENCE_TIME DefaultPeriod = 200000; -static const REFERENCE_TIME MinimumPeriod = 100000; +static const REFERENCE_TIME DefaultPeriod = 100000; +static const REFERENCE_TIME MinimumPeriod = 50000; struct ACImpl; typedef struct ACImpl ACImpl;
1
0
0
0
Alexandre Julliard : Merge branch 'lxr'.
by Alexandre Julliard
30 Jun '14
30 Jun '14
Module: tools Branch: master Commit: d8bd93ef76a21dfd186c192e9246ae8b483d7cd7 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=d8bd93ef76a21dfd186c192e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 27 13:34:29 2014 +0200 Merge branch 'lxr'. ---
1
0
0
0
← Newer
1
2
3
4
5
...
38
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
Results per page:
10
25
50
100
200