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
February 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
783 discussions
Start a n
N
ew thread
Alexandre Julliard : advapi32/tests: Avoid crashing if ReadEventLogA fails.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: 4f6d085073cab7ff60f1d31d881c778c8d5cc692 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f6d085073cab7ff60f1d31d8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 18 14:06:10 2010 +0100 advapi32/tests: Avoid crashing if ReadEventLogA fails. --- dlls/advapi32/tests/eventlog.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index c0f516a..3907873 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -776,21 +776,21 @@ static void test_readwrite(void) /* Needed to catch earlier Vista (with no ServicePack for example) */ buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); - ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - - buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed); - ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, needed, &read, &needed); - - record = (EVENTLOGRECORD *)buf; + if (ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, + 0, buf, sizeof(EVENTLOGRECORD), &read, &needed)) + { + buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed); + ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, + 0, buf, needed, &read, &needed); - /* Vista and W2K8 return EVENTLOG_SUCCESS, Windows versions before return - * the written eventtype (0x20 in this case). - */ - if (record->EventType == EVENTLOG_SUCCESS) - on_vista = TRUE; + record = (EVENTLOGRECORD *)buf; + /* Vista and W2K8 return EVENTLOG_SUCCESS, Windows versions before return + * the written eventtype (0x20 in this case). + */ + if (record->EventType == EVENTLOG_SUCCESS) + on_vista = TRUE; + } HeapFree(GetProcessHeap(), 0, buf); } ok(ret, "Expected success : %d\n", GetLastError());
1
0
0
0
Alexandre Julliard : advapi32: Implemented RegDeleteKeyExA/W.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: 9b7d1041fc198d62145ddedcda174c7fc515eb86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b7d1041fc198d62145ddedcd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 18 13:12:31 2010 +0100 advapi32: Implemented RegDeleteKeyExA/W. --- dlls/advapi32/advapi32.spec | 2 + dlls/advapi32/registry.c | 66 ++++++++++++++++++++++++++++--------------- include/winreg.h | 3 ++ 3 files changed, 48 insertions(+), 23 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 806cecf..892e84a 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -472,6 +472,8 @@ @ stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr) @ stdcall RegCreateKeyW(long wstr ptr) @ stdcall RegDeleteKeyA(long str) +@ stdcall RegDeleteKeyExA(long str long long) +@ stdcall RegDeleteKeyExW(long wstr long long) @ stdcall RegDeleteKeyW(long wstr) @ stdcall RegDeleteTreeA(long str) @ stdcall RegDeleteTreeW(long wstr) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index b9cb8c5..faae2b1 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -931,11 +931,9 @@ LSTATUS WINAPI RegCloseKey( HKEY hkey ) /****************************************************************************** - * RegDeleteKeyW [ADVAPI32.@] - * - * See RegDeleteKeyA. + * RegDeleteKeyExW [ADVAPI32.@] */ -LSTATUS WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name ) +LSTATUS WINAPI RegDeleteKeyExW( HKEY hkey, LPCWSTR name, REGSAM access, DWORD reserved ) { DWORD ret; HKEY tmp; @@ -944,7 +942,8 @@ LSTATUS WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name ) if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; - if (!(ret = RegOpenKeyExW( hkey, name, 0, DELETE, &tmp ))) + access &= KEY_WOW64_64KEY | KEY_WOW64_32KEY; + if (!(ret = RegOpenKeyExW( hkey, name, 0, access | DELETE, &tmp ))) { ret = RtlNtStatusToDosError( NtDeleteKey( tmp ) ); RegCloseKey( tmp ); @@ -955,24 +954,20 @@ LSTATUS WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name ) /****************************************************************************** - * RegDeleteKeyA [ADVAPI32.@] - * - * Delete a registry key. - * - * PARAMS - * hkey [I] Handle to parent key containing the key to delete - * name [I] Name of the key user hkey to delete - * - * NOTES - * - * MSDN is wrong when it says that hkey must be opened with the DELETE access - * right. In reality, it opens a new handle with DELETE access. + * RegDeleteKeyW [ADVAPI32.@] * - * RETURNS - * Success: ERROR_SUCCESS - * Failure: Error code + * See RegDeleteKeyA. */ -LSTATUS WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name ) +LSTATUS WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name ) +{ + return RegDeleteKeyExW( hkey, name, 0, 0 ); +} + + +/****************************************************************************** + * RegDeleteKeyExA [ADVAPI32.@] + */ +LSTATUS WINAPI RegDeleteKeyExA( HKEY hkey, LPCSTR name, REGSAM access, DWORD reserved ) { DWORD ret; HKEY tmp; @@ -981,7 +976,8 @@ LSTATUS WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name ) if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; - if (!(ret = RegOpenKeyExA( hkey, name, 0, DELETE, &tmp ))) + access &= KEY_WOW64_64KEY | KEY_WOW64_32KEY; + if (!(ret = RegOpenKeyExA( hkey, name, 0, access | DELETE, &tmp ))) { if (!is_version_nt()) /* win95 does recursive key deletes */ { @@ -989,7 +985,7 @@ LSTATUS WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name ) while(!RegEnumKeyA(tmp, 0, name, sizeof(name))) { - if(RegDeleteKeyA(tmp, name)) /* recurse */ + if(RegDeleteKeyExA(tmp, name, access, reserved)) /* recurse */ break; } } @@ -1001,6 +997,30 @@ LSTATUS WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name ) } +/****************************************************************************** + * RegDeleteKeyA [ADVAPI32.@] + * + * Delete a registry key. + * + * PARAMS + * hkey [I] Handle to parent key containing the key to delete + * name [I] Name of the key user hkey to delete + * + * NOTES + * + * MSDN is wrong when it says that hkey must be opened with the DELETE access + * right. In reality, it opens a new handle with DELETE access. + * + * RETURNS + * Success: ERROR_SUCCESS + * Failure: Error code + */ +LSTATUS WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name ) +{ + return RegDeleteKeyExA( hkey, name, 0, 0 ); +} + + /****************************************************************************** * RegSetValueExW [ADVAPI32.@] diff --git a/include/winreg.h b/include/winreg.h index e532459..145a026 100644 --- a/include/winreg.h +++ b/include/winreg.h @@ -104,6 +104,9 @@ WINADVAPI LSTATUS WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSA WINADVAPI LSTATUS WINAPI RegDeleteKeyA(HKEY,LPCSTR); WINADVAPI LSTATUS WINAPI RegDeleteKeyW(HKEY,LPCWSTR); #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey) +WINADVAPI LSTATUS WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD); +WINADVAPI LSTATUS WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD); +#define RegDeleteKeyEx WINELIB_NAME_AW(RegDeleteKeyEx) WINADVAPI LSTATUS WINAPI RegDeleteKeyValueA(HKEY,LPCSTR,LPCSTR); WINADVAPI LSTATUS WINAPI RegDeleteKeyValueW(HKEY,LPCWSTR,LPCWSTR); #define RegDeleteKeyValue WINELIB_NAME_AW(RegDeleteKeyValue)
1
0
0
0
Alexandre Julliard : ntdll: Properly handle empty but present ACLs in self-relative descriptors.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: 8543c32442d79c33b59b8f6a96c849f6ba5f13df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8543c32442d79c33b59b8f6a9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 18 12:57:33 2010 +0100 ntdll: Properly handle empty but present ACLs in self-relative descriptors. --- dlls/ntdll/sec.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index 64efdb5..6784848 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -478,12 +478,12 @@ NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR pSourceSD, PSECUR length = RtlLengthSid( Group ); RtlCopySid(length, SELF_RELATIVE_FIELD( dst, Group ), Group); } - if (src->Control & SE_SACL_PRESENT) + if ((src->Control & SE_SACL_PRESENT) && src->Sacl) { Sacl = (PACL)SELF_RELATIVE_FIELD( src, Sacl ); copy_acl(Sacl->AclSize, (PACL)SELF_RELATIVE_FIELD( dst, Sacl ), Sacl); } - if (src->Control & SE_DACL_PRESENT) + if ((src->Control & SE_DACL_PRESENT) && src->Dacl) { Dacl = (PACL)SELF_RELATIVE_FIELD( src, Dacl ); copy_acl(Dacl->AclSize, (PACL)SELF_RELATIVE_FIELD( dst, Dacl ), Dacl); @@ -604,7 +604,7 @@ NTSTATUS WINAPI RtlGetDaclSecurityDescriptor( if ( (*lpbDaclPresent = (SE_DACL_PRESENT & lpsd->Control) ? 1 : 0) ) { - if ( SE_SELF_RELATIVE & lpsd->Control) + if ((SE_SELF_RELATIVE & lpsd->Control) && lpsd->Dacl) *pDacl = (PACL)SELF_RELATIVE_FIELD( lpsd, Dacl ); else *pDacl = lpsd->Dacl; @@ -673,7 +673,7 @@ NTSTATUS WINAPI RtlGetSaclSecurityDescriptor( if ( (*lpbSaclPresent = (SE_SACL_PRESENT & lpsd->Control) ? 1 : 0) ) { - if (SE_SELF_RELATIVE & lpsd->Control) + if ((SE_SELF_RELATIVE & lpsd->Control) && lpsd->Sacl) *pSacl = (PACL)SELF_RELATIVE_FIELD( lpsd, Sacl ); else *pSacl = lpsd->Sacl; @@ -944,14 +944,14 @@ NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD( status = STATUS_BUFFER_TOO_SMALL; } - if (pRel->Control & SE_DACL_PRESENT && + if ((pRel->Control & SE_DACL_PRESENT) && pRel->Dacl && *lpdwDaclSize < ((PACL)SELF_RELATIVE_FIELD(pRel,Dacl))->AclSize) { *lpdwDaclSize = ((PACL)SELF_RELATIVE_FIELD(pRel,Dacl))->AclSize; status = STATUS_BUFFER_TOO_SMALL; } - if (pRel->Control & SE_SACL_PRESENT && + if ((pRel->Control & SE_SACL_PRESENT) && pRel->Sacl && *lpdwSaclSize < ((PACL)SELF_RELATIVE_FIELD(pRel,Sacl))->AclSize) { *lpdwSaclSize = ((PACL)SELF_RELATIVE_FIELD(pRel,Sacl))->AclSize; @@ -983,7 +983,7 @@ NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD( pAbs->Owner = NULL; pAbs->Group = NULL; - if (pRel->Control & SE_SACL_PRESENT) + if ((pRel->Control & SE_SACL_PRESENT) && pRel->Sacl) { PACL pAcl = (PACL)SELF_RELATIVE_FIELD( pRel, Sacl ); @@ -991,7 +991,7 @@ NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD( pAbs->Sacl = pSacl; } - if (pRel->Control & SE_DACL_PRESENT) + if ((pRel->Control & SE_DACL_PRESENT) && pRel->Dacl) { PACL pAcl = (PACL)SELF_RELATIVE_FIELD( pRel, Dacl ); memcpy(pDacl, pAcl, pAcl->AclSize);
1
0
0
0
Alexandre Julliard : server: Fix tracing of invalid ACLs.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: 9c87c88837bb708e83792a38fe819585f4592b3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c87c88837bb708e83792a38f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 18 12:57:03 2010 +0100 server: Fix tracing of invalid ACLs. --- server/trace.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/server/trace.c b/server/trace.c index 03e4c04..529316d 100644 --- a/server/trace.c +++ b/server/trace.c @@ -822,7 +822,7 @@ static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t siz { if (size < sizeof(ACL)) { - fprintf( stderr, "<invalid acl>}\n" ); + fprintf( stderr, "<invalid acl>}" ); return; } size -= sizeof(ACL); @@ -832,10 +832,7 @@ static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t siz const SID *sid = NULL; data_size_t sid_size = 0; - if (size < sizeof(ACE_HEADER)) - return; - if (size < ace->AceSize) - return; + if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break; size -= ace->AceSize; if (i != 0) fputc( ',', stderr ); fprintf( stderr, "{AceType=" );
1
0
0
0
Dan Kegel : cmd: Fix 'else', with tests.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: 8110dde8ae405081459b62ae2dbf0710c8332b6b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8110dde8ae405081459b62ae2…
Author: Dan Kegel <dank(a)kegel.com> Date: Wed Feb 17 23:11:04 2010 -0800 cmd: Fix 'else', with tests. --- programs/cmd/builtins.c | 2 +- programs/cmd/tests/test_builtins.cmd | 13 +++++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 4 ++++ 3 files changed, 18 insertions(+), 1 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index d1019cc..fdb4404 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1072,7 +1072,7 @@ void WCMD_part_execute(CMD_LIST **cmdList, WCHAR *firstcmd, WCHAR *variable, /* Execute any statements appended to the line */ /* FIXME: Only if previous call worked for && or failed for || */ if ((*cmdList)->prevDelim == CMD_ONFAILURE || - (*cmdList)->prevDelim != CMD_ONSUCCESS) { + (*cmdList)->prevDelim == CMD_ONSUCCESS) { if (processThese && (*cmdList)->command) { WCMD_execute ((*cmdList)->command, (*cmdList)->redirects, variable, value, cmdList); diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 2c30f6c..317fbdd 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -23,3 +23,16 @@ cd dummydir echo %~dp0 cd .. rmdir dummydir + +echo ------------ Testing if/else -------------- +echo if/else should work with blocks +if 0 == 0 ( + echo if seems to work +) else ( + echo if seems to be broken +) +if 1 == 0 ( + echo else seems to be broken +) else ( + echo else seems to work +) diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index a72e35d..c53aa1f 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -16,3 +16,7 @@ bar ~dp0 should be directory containing batch file @pwd@\ @pwd@\ +------------ Testing if/else -------------- +if/else should work with blocks +if seems to work +else seems to work
1
0
0
0
Piotr Caban : oleaut32: Store names in list.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: 12feffe49eef72abaef49a9e7067d24deedeeb0c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=12feffe49eef72abaef49a9e7…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Feb 18 03:21:21 2010 +0100 oleaut32: Store names in list. --- dlls/oleaut32/typelib2.c | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 21e9c73..347ab7a 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -120,6 +120,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(typelib2); typedef struct tagCyclicList { struct tagCyclicList *next; int indice; + int name; union { int val; @@ -194,8 +195,6 @@ typedef struct tagICreateTypeInfo2Impl struct tagCyclicList *typedata; /* tail of cyclic list */ - int names[42]; - int datawidth; struct tagICreateTypeInfo2Impl *next_typeinfo; @@ -1447,7 +1446,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( /* update the index data */ insert->indice = ((0x6000 | This->typeinfo->cImplTypes) << 16) | index; - This->names[index] = -1; + insert->name = -1; /* ??? */ if (!This->typeinfo->res2) This->typeinfo->res2 = 0x20; @@ -1688,7 +1687,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( /* update the index data */ insert->indice = 0x40000000 + index; - This->names[index] = -1; + insert->name = -1; /* figure out type widths and whatnot */ ctl2_encode_typedesc(This->typelib, &pVarDesc->elemdescVar.tdesc, @@ -1754,7 +1753,6 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( FIXME("(%p,%d,%s,%d), stub!\n", iface, index, debugstr_w(*rgszNames), cNames); offset = ctl2_alloc_name(This->typelib, rgszNames[0]); - This->names[index] = offset; namedata = This->typelib->typelib_segment_data[MSFT_SEG_NAME] + offset; namedata[9] &= ~0x10; @@ -1766,6 +1764,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( for(i=0; i<index; i++) iter = iter->next; + iter->name = offset; + for (i = 1; i < cNames; i++) { /* FIXME: Almost certainly easy to break */ offset = ctl2_alloc_name(This->typelib, rgszNames[i]); @@ -1786,7 +1786,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetVarName( LPOLESTR szName) { ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; - int offset; + CyclicList *iter; + int offset, i; char *namedata; TRACE("(%p,%d,%s), stub!\n", iface, index, debugstr_w(szName)); @@ -1807,8 +1808,12 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetVarName( if ((This->typeinfo->typekind & 15) == TKIND_ENUM) { namedata[9] |= 0x20; } - This->names[index] = offset; + iter = This->typedata->next->next; + for(i=0; i<index; i++) + iter = iter->next; + + iter->name = offset; return S_OK; } @@ -3362,7 +3367,8 @@ static void ctl2_write_typeinfos(ICreateTypeLib2Impl *This, HANDLE hFile) for(iter=typeinfo->typedata->next->next; iter!=typeinfo->typedata->next; iter=iter->next) ctl2_write_chunk(hFile, &iter->indice, sizeof(int)); - ctl2_write_chunk(hFile, typeinfo->names, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4); + for(iter=typeinfo->typedata->next->next; iter!=typeinfo->typedata->next; iter=iter->next) + ctl2_write_chunk(hFile, &iter->name, sizeof(int)); for(iter=typeinfo->typedata->next->next; iter!=typeinfo->typedata->next; iter=iter->next) { ctl2_write_chunk(hFile, &offset, sizeof(int));
1
0
0
0
Piotr Caban : oleaut32: Store indices in list.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: 8354e376282590f602abb9cdfe41acc715e02e49 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8354e376282590f602abb9cdf…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Feb 18 03:20:57 2010 +0100 oleaut32: Store indices in list. --- dlls/oleaut32/typelib2.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index eb30724..21e9c73 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -119,6 +119,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(typelib2); /* Used for storing cyclic list. Tail address is kept */ typedef struct tagCyclicList { struct tagCyclicList *next; + int indice; + union { int val; int *data; @@ -192,7 +194,6 @@ typedef struct tagICreateTypeInfo2Impl struct tagCyclicList *typedata; /* tail of cyclic list */ - int indices[42]; int names[42]; int datawidth; @@ -1445,7 +1446,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( } /* update the index data */ - This->indices[index] = ((0x6000 | This->typeinfo->cImplTypes) << 16) | index; + insert->indice = ((0x6000 | This->typeinfo->cImplTypes) << 16) | index; This->names[index] = -1; /* ??? */ @@ -1686,7 +1687,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( typedata[3] = (sizeof(VARDESC) << 16) | 0; /* update the index data */ - This->indices[index] = 0x40000000 + index; + insert->indice = 0x40000000 + index; This->names[index] = -1; /* figure out type widths and whatnot */ @@ -3358,7 +3359,9 @@ static void ctl2_write_typeinfos(ICreateTypeLib2Impl *This, HANDLE hFile) for(iter=iter->next; iter!=typeinfo->typedata->next; iter=iter->next) ctl2_write_chunk(hFile, iter->u.data, iter->u.data[0] & 0xffff); - ctl2_write_chunk(hFile, typeinfo->indices, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4); + for(iter=typeinfo->typedata->next->next; iter!=typeinfo->typedata->next; iter=iter->next) + ctl2_write_chunk(hFile, &iter->indice, sizeof(int)); + ctl2_write_chunk(hFile, typeinfo->names, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4); for(iter=typeinfo->typedata->next->next; iter!=typeinfo->typedata->next; iter=iter->next) {
1
0
0
0
Piotr Caban : oleaut32: Compute TypeInfo offsets while writing data.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: 21bfd64e6c3285972d43f28d912d270ee0be317e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21bfd64e6c3285972d43f28d9…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Feb 18 03:20:33 2010 +0100 oleaut32: Compute TypeInfo offsets while writing data. --- dlls/oleaut32/typelib2.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 8c27916..eb30724 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -194,7 +194,6 @@ typedef struct tagICreateTypeInfo2Impl int indices[42]; int names[42]; - int offsets[42]; int datawidth; @@ -1384,7 +1383,6 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; CyclicList *insert; - int offset; int *typedata; int i; int decoded_size; @@ -1417,7 +1415,6 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( This->typedata->next = insert; This->typedata = insert; - offset = This->typedata->next->u.val; This->typedata->next->u.val += 0x18 + (pFuncDesc->cParams * 12); typedata = This->typedata->u.data; @@ -1450,7 +1447,6 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( /* update the index data */ This->indices[index] = ((0x6000 | This->typeinfo->cImplTypes) << 16) | index; This->names[index] = -1; - This->offsets[index] = offset; /* ??? */ if (!This->typeinfo->res2) This->typeinfo->res2 = 0x20; @@ -1641,7 +1637,6 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; CyclicList *insert; - int offset; INT *typedata; int var_datawidth; int var_alignment; @@ -1682,7 +1677,6 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( This->typedata->next = insert; This->typedata = insert; - offset = This->typedata->next->u.val; This->typedata->next->u.val += 0x14; typedata = This->typedata->u.data; @@ -1694,7 +1688,6 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( /* update the index data */ This->indices[index] = 0x40000000 + index; This->names[index] = -1; - This->offsets[index] = offset; /* figure out type widths and whatnot */ ctl2_encode_typedesc(This->typelib, &pVarDesc->elemdescVar.tdesc, @@ -3356,6 +3349,7 @@ static void ctl2_write_typeinfos(ICreateTypeLib2Impl *This, HANDLE hFile) for (typeinfo = This->typeinfos; typeinfo; typeinfo = typeinfo->next_typeinfo) { CyclicList *iter; + int offset = 0; if (!typeinfo->typedata) continue; @@ -3366,7 +3360,11 @@ static void ctl2_write_typeinfos(ICreateTypeLib2Impl *This, HANDLE hFile) ctl2_write_chunk(hFile, typeinfo->indices, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4); ctl2_write_chunk(hFile, typeinfo->names, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4); - ctl2_write_chunk(hFile, typeinfo->offsets, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4); + + for(iter=typeinfo->typedata->next->next; iter!=typeinfo->typedata->next; iter=iter->next) { + ctl2_write_chunk(hFile, &offset, sizeof(int)); + offset += iter->u.data[0] & 0xffff; + } } }
1
0
0
0
Piotr Caban : oleaut32: Store CreateTypeInfo->typedata in list.
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: d1c174837f8a93cedcb69b997f71f20de0041809 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1c174837f8a93cedcb69b997…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Feb 18 03:19:41 2010 +0100 oleaut32: Store CreateTypeInfo->typedata in list. --- dlls/oleaut32/typelib2.c | 105 +++++++++++++++++++++++++++++++++++++-------- 1 files changed, 86 insertions(+), 19 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 4c90f61..8c27916 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -116,6 +116,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(typelib2); /*================== Implementation Structures ===================================*/ +/* Used for storing cyclic list. Tail address is kept */ +typedef struct tagCyclicList { + struct tagCyclicList *next; + union { + int val; + int *data; + }u; +} CyclicList; + enum MSFT_segment_index { MSFT_SEG_TYPEINFO = 0, /* type information */ MSFT_SEG_IMPORTINFO, /* import information */ @@ -181,9 +190,7 @@ typedef struct tagICreateTypeInfo2Impl ICreateTypeLib2Impl *typelib; MSFT_TypeInfoBase *typeinfo; - INT *typedata; - int typedata_allocated; - int typedata_length; + struct tagCyclicList *typedata; /* tail of cyclic list */ int indices[42]; int names[42]; @@ -1376,6 +1383,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( { ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; + CyclicList *insert; int offset; int *typedata; int i; @@ -1387,14 +1395,31 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( /* return E_OUTOFMEMORY; */ if (!This->typedata) { - This->typedata = HeapAlloc(GetProcessHeap(), 0, 0x2000); - This->typedata[0] = 0; + This->typedata = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); + if(!This->typedata) + return E_OUTOFMEMORY; + + This->typedata->next = This->typedata; + This->typedata->u.val = 0; } /* allocate type data space for us */ - offset = This->typedata[0]; - This->typedata[0] += 0x18 + (pFuncDesc->cParams * 12); - typedata = This->typedata + (offset >> 2) + 1; + insert = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); + if(!insert) + return E_OUTOFMEMORY; + insert->u.data = HeapAlloc(GetProcessHeap(), 0, sizeof(int[6])+sizeof(int[3])*pFuncDesc->cParams); + if(!insert->u.data) { + HeapFree(GetProcessHeap(), 0, insert); + return E_OUTOFMEMORY; + } + + insert->next = This->typedata->next; + This->typedata->next = insert; + This->typedata = insert; + + offset = This->typedata->next->u.val; + This->typedata->next->u.val += 0x18 + (pFuncDesc->cParams * 12); + typedata = This->typedata->u.data; /* fill out the basic type information */ typedata[0] = (0x18 + (pFuncDesc->cParams * 12)) | (index << 16); @@ -1614,6 +1639,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( VARDESC* pVarDesc) { ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; + + CyclicList *insert; int offset; INT *typedata; int var_datawidth; @@ -1633,14 +1660,31 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( } if (!This->typedata) { - This->typedata = HeapAlloc(GetProcessHeap(), 0, 0x2000); - This->typedata[0] = 0; + This->typedata = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); + if(!This->typedata) + return E_OUTOFMEMORY; + + This->typedata->next = This->typedata; + This->typedata->u.val = 0; } /* allocate type data space for us */ - offset = This->typedata[0]; - This->typedata[0] += 0x14; - typedata = This->typedata + (offset >> 2) + 1; + insert = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); + if(!insert) + return E_OUTOFMEMORY; + insert->u.data = HeapAlloc(GetProcessHeap(), 0, sizeof(int[5])); + if(!insert->u.data) { + HeapFree(GetProcessHeap(), 0, insert); + return E_OUTOFMEMORY; + } + + insert->next = This->typedata->next; + This->typedata->next = insert; + This->typedata = insert; + + offset = This->typedata->next->u.val; + This->typedata->next->u.val += 0x14; + typedata = This->typedata->u.data; /* fill out the basic type information */ typedata[0] = 0x14 | (index << 16); @@ -1708,6 +1752,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( { ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; + CyclicList *iter; UINT i; int offset; char *namedata; @@ -1723,12 +1768,14 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( *((INT *)namedata) = This->typelib->typelib_typeinfo_offsets[This->typeinfo->typekind >> 16]; } + iter = This->typedata->next->next; + for(i=0; i<index; i++) + iter = iter->next; + for (i = 1; i < cNames; i++) { /* FIXME: Almost certainly easy to break */ - int *paramdata = &This->typedata[This->offsets[index] >> 2]; - offset = ctl2_alloc_name(This->typelib, rgszNames[i]); - paramdata[(i * 3) + 5] = offset; + iter->u.data[(i * 3) + 5] = offset; } return S_OK; @@ -3049,7 +3096,21 @@ static ULONG WINAPI ICreateTypeLib2_fnRelease(ICreateTypeLib2 *iface) while (This->typeinfos) { ICreateTypeInfo2Impl *typeinfo = This->typeinfos; This->typeinfos = typeinfo->next_typeinfo; - HeapFree(GetProcessHeap(), 0, typeinfo->typedata); + if(typeinfo->typedata) { + CyclicList *iter, *rem; + + rem = typeinfo->typedata->next; + typeinfo->typedata->next = NULL; + iter = rem->next; + HeapFree(GetProcessHeap(), 0, rem); + + while(iter) { + rem = iter; + iter = iter->next; + HeapFree(GetProcessHeap(), 0, rem->u.data); + HeapFree(GetProcessHeap(), 0, rem); + } + } HeapFree(GetProcessHeap(), 0, typeinfo); } @@ -3273,7 +3334,7 @@ static void ctl2_finalize_typeinfos(ICreateTypeLib2Impl *This, int filesize) typeinfo->typeinfo->memoffset = filesize; if (typeinfo->typedata) { ICreateTypeInfo2_fnLayOut((ICreateTypeInfo2 *)typeinfo); - filesize += typeinfo->typedata[0] + ((typeinfo->typeinfo->cElement >> 16) * 12) + ((typeinfo->typeinfo->cElement & 0xffff) * 12) + 4; + filesize += typeinfo->typedata->next->u.val + ((typeinfo->typeinfo->cElement >> 16) * 12) + ((typeinfo->typeinfo->cElement & 0xffff) * 12) + 4; } } } @@ -3294,9 +3355,15 @@ static void ctl2_write_typeinfos(ICreateTypeLib2Impl *This, HANDLE hFile) ICreateTypeInfo2Impl *typeinfo; for (typeinfo = This->typeinfos; typeinfo; typeinfo = typeinfo->next_typeinfo) { + CyclicList *iter; + if (!typeinfo->typedata) continue; - ctl2_write_chunk(hFile, typeinfo->typedata, typeinfo->typedata[0] + 4); + iter = typeinfo->typedata->next; + ctl2_write_chunk(hFile, &iter->u.val, sizeof(int)); + for(iter=iter->next; iter!=typeinfo->typedata->next; iter=iter->next) + ctl2_write_chunk(hFile, iter->u.data, iter->u.data[0] & 0xffff); + ctl2_write_chunk(hFile, typeinfo->indices, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4); ctl2_write_chunk(hFile, typeinfo->names, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4); ctl2_write_chunk(hFile, typeinfo->offsets, ((typeinfo->typeinfo->cElement & 0xffff) + (typeinfo->typeinfo->cElement >> 16)) * 4);
1
0
0
0
Marcus Meissner : winedbg: Segment registers are not affected by rex prefix (Coverity).
by Alexandre Julliard
18 Feb '10
18 Feb '10
Module: wine Branch: master Commit: a3afe94831e23f1595a59b4258df9f5a23f3d8a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3afe94831e23f1595a59b425…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Thu Feb 18 00:06:16 2010 +0100 winedbg: Segment registers are not affected by rex prefix (Coverity). --- programs/winedbg/db_disasm64.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/winedbg/db_disasm64.c b/programs/winedbg/db_disasm64.c index 4d4e2eb..d7f7c03 100644 --- a/programs/winedbg/db_disasm64.c +++ b/programs/winedbg/db_disasm64.c @@ -1495,11 +1495,11 @@ db_disasm(db_addr_t loc, boolean_t altfmt) break; case S: - db_printf("%s", db_seg_reg[f_reg(rex, regmodrm)]); + db_printf("%s", db_seg_reg[f_reg(0, regmodrm)]); break; case Si: - db_printf("%s", db_seg_reg[f_reg(rex, inst)]); + db_printf("%s", db_seg_reg[f_reg(0, inst)]); break; case A:
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
79
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
Results per page:
10
25
50
100
200