ReactOS.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
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
List overview
Download
Ros-diffs
August 2016
----- 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
ros-diffs@reactos.org
20 participants
462 discussions
Start a n
N
ew thread
[tfaber] 72118: [CRT] - Remove pointless inline CORE-11794
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Aug 5 21:33:54 2016 New Revision: 72118 URL:
http://svn.reactos.org/svn/reactos?rev=72118&view=rev
Log: [CRT] - Remove pointless inline CORE-11794 Modified: trunk/reactos/sdk/lib/crt/include/internal/tls.h trunk/reactos/sdk/lib/crt/misc/tls.c Modified: trunk/reactos/sdk/lib/crt/include/internal/tls.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/include/intern…
============================================================================== --- trunk/reactos/sdk/lib/crt/include/internal/tls.h [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/include/internal/tls.h [iso-8859-1] Fri Aug 5 21:33:54 2016 @@ -57,10 +57,10 @@ typedef struct __thread_data thread_data_t; -extern inline BOOL msvcrt_init_tls(void); -extern inline BOOL msvcrt_free_tls(void); +extern BOOL msvcrt_init_tls(void); +extern BOOL msvcrt_free_tls(void); extern thread_data_t *msvcrt_get_thread_data(void); -extern inline void msvcrt_free_tls_mem(void); +extern void msvcrt_free_tls_mem(void); #define MSVCRT_ENABLE_PER_THREAD_LOCALE 1 #define MSVCRT_DISABLE_PER_THREAD_LOCALE 2 Modified: trunk/reactos/sdk/lib/crt/misc/tls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/misc/tls.c?rev…
============================================================================== --- trunk/reactos/sdk/lib/crt/misc/tls.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/misc/tls.c [iso-8859-1] Fri Aug 5 21:33:54 2016 @@ -6,7 +6,7 @@ /* Index to TLS */ static DWORD msvcrt_tls_index; -inline BOOL msvcrt_init_tls(void) +BOOL msvcrt_init_tls(void) { msvcrt_tls_index = TlsAlloc(); @@ -18,7 +18,7 @@ return TRUE; } -inline BOOL msvcrt_free_tls(void) +BOOL msvcrt_free_tls(void) { if (!TlsFree(msvcrt_tls_index)) { @@ -48,7 +48,7 @@ return ptr; } -inline void msvcrt_free_tls_mem(void) +void msvcrt_free_tls_mem(void) { thread_data_t *tls = TlsGetValue(msvcrt_tls_index);
8 years, 4 months
1
0
0
0
[hbelusca] 72117: [COMCTL32]: Addendum to r72116: Add the __REACTOS__ ifdefs to ease wine syncing, and update the patch in accordance. CORE-11532
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Aug 5 17:45:34 2016 New Revision: 72117 URL:
http://svn.reactos.org/svn/reactos?rev=72117&view=rev
Log: [COMCTL32]: Addendum to r72116: Add the __REACTOS__ ifdefs to ease wine syncing, and update the patch in accordance. CORE-11532 Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff trunk/reactos/dll/win32/comctl32/rebar.c Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] Fri Aug 5 17:45:34 2016 @@ -848,6 +848,28 @@ } TRACE("new client=(%s)\n", wine_dbgstr_rect(rect)); return 0; +@@ -3302,7 +3365,11 @@ REBAR_NCHitTest (const REBAR_INFO *infoP + (INT *)&nmmouse.dwItemSpec); + nmmouse.dwItemData = 0; + nmmouse.pt = clpt; ++#ifdef __REACTOS__ ++ nmmouse.dwHitInfo = scrap; ++#else + nmmouse.dwHitInfo = 0; ++#endif + if ((i = REBAR_Notify((NMHDR *) &nmmouse, infoPtr, NM_NCHITTEST))) { + TRACE("notify changed return value from %ld to %d\n", + ret, i); +@@ -3374,6 +3441,9 @@ REBAR_Paint (const REBAR_INFO *infoPtr, + { + if (hdc) { + TRACE("painting\n"); ++#ifdef __REACTOS__ ++ REBAR_EraseBkGnd (infoPtr, hdc); ++#endif + REBAR_Refresh (infoPtr, hdc); + } else { + PAINTSTRUCT ps; @@ -3652,7 +3728,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, return REBAR_ShowBand (infoPtr, wParam, lParam); Modified: trunk/reactos/dll/win32/comctl32/rebar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c…
============================================================================== --- trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] Fri Aug 5 17:45:34 2016 @@ -3378,7 +3378,11 @@ (INT *)&nmmouse.dwItemSpec); nmmouse.dwItemData = 0; nmmouse.pt = clpt; +#ifdef __REACTOS__ nmmouse.dwHitInfo = scrap; +#else + nmmouse.dwHitInfo = 0; +#endif if ((i = REBAR_Notify((NMHDR *) &nmmouse, infoPtr, NM_NCHITTEST))) { TRACE("notify changed return value from %ld to %d\n", ret, i); @@ -3450,7 +3454,9 @@ { if (hdc) { TRACE("painting\n"); +#ifdef __REACTOS__ REBAR_EraseBkGnd (infoPtr, hdc); +#endif REBAR_Refresh (infoPtr, hdc); } else { PAINTSTRUCT ps;
8 years, 4 months
1
0
0
0
[gadamopoulos] 72116: [COMCTL32] - rebar: actually pass the hittest flag to the NM_NCHITTEST notification. CORE-11532
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Aug 5 17:16:22 2016 New Revision: 72116 URL:
http://svn.reactos.org/svn/reactos?rev=72116&view=rev
Log: [COMCTL32] - rebar: actually pass the hittest flag to the NM_NCHITTEST notification. CORE-11532 Modified: trunk/reactos/dll/win32/comctl32/rebar.c Modified: trunk/reactos/dll/win32/comctl32/rebar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c…
============================================================================== --- trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] Fri Aug 5 17:16:22 2016 @@ -3378,7 +3378,7 @@ (INT *)&nmmouse.dwItemSpec); nmmouse.dwItemData = 0; nmmouse.pt = clpt; - nmmouse.dwHitInfo = 0; + nmmouse.dwHitInfo = scrap; if ((i = REBAR_Notify((NMHDR *) &nmmouse, infoPtr, NM_NCHITTEST))) { TRACE("notify changed return value from %ld to %d\n", ret, i); @@ -3450,6 +3450,7 @@ { if (hdc) { TRACE("painting\n"); + REBAR_EraseBkGnd (infoPtr, hdc); REBAR_Refresh (infoPtr, hdc); } else { PAINTSTRUCT ps;
8 years, 4 months
1
0
0
0
[hbelusca] 72115: [FASTFAT_NEW]: Fix add_pch command usage.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Aug 5 11:54:48 2016 New Revision: 72115 URL:
http://svn.reactos.org/svn/reactos?rev=72115&view=rev
Log: [FASTFAT_NEW]: Fix add_pch command usage. Modified: trunk/reactos/drivers/filesystems/fastfat_new/CMakeLists.txt Modified: trunk/reactos/drivers/filesystems/fastfat_new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/CMakeLists.txt [iso-8859-1] Fri Aug 5 11:54:48 2016 @@ -22,10 +22,10 @@ rw.c shutdown.c volume.c - fastfat.rc) + fastfat.h) -add_library(fastfat_new SHARED ${SOURCE}) +add_library(fastfat_new SHARED ${SOURCE} fastfat.rc) set_module_type(fastfat_new kernelmodedriver) target_link_libraries(fastfat_new ${PSEH_LIB} fullfat) add_importlibs(fastfat_new ntoskrnl hal) -add_pch(fastfat_new fastfat.h) +add_pch(fastfat_new fastfat.h SOURCE)
8 years, 4 months
1
0
0
0
[pschweitzer] 72114: [NET/USE] Always delete remembered connections on /delete ROSAPPS-303
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Fri Aug 5 10:58:09 2016 New Revision: 72114 URL:
http://svn.reactos.org/svn/reactos?rev=72114&view=rev
Log: [NET/USE] Always delete remembered connections on /delete ROSAPPS-303 Modified: trunk/reactos/base/applications/network/net/cmdUse.c Modified: trunk/reactos/base/applications/network/net/cmdUse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/net/cmdUse.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/net/cmdUse.c [iso-8859-1] Fri Aug 5 10:58:09 2016 @@ -126,7 +126,7 @@ return 1; } - return WNetCancelConnection(argv[2], FALSE); + return WNetCancelConnection2(argv[2], CONNECT_UPDATE_PROFILE, FALSE); } else {
8 years, 4 months
1
0
0
0
[pschweitzer] 72113: [FASTFAT] Refactor vfatMakeFCBFromDirEntry() and vfatUpdateFCB() so that they share code. It will help avoiding wild FCB modifications on renaming. CORE-11377
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Fri Aug 5 10:48:01 2016 New Revision: 72113 URL:
http://svn.reactos.org/svn/reactos?rev=72113&view=rev
Log: [FASTFAT] Refactor vfatMakeFCBFromDirEntry() and vfatUpdateFCB() so that they share code. It will help avoiding wild FCB modifications on renaming. CORE-11377 Modified: trunk/reactos/drivers/filesystems/fastfat/dirwr.c trunk/reactos/drivers/filesystems/fastfat/fcb.c Modified: trunk/reactos/drivers/filesystems/fastfat/dirwr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/dirwr.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/dirwr.c [iso-8859-1] Fri Aug 5 10:48:01 2016 @@ -638,8 +638,6 @@ { /* We're modifying an existing FCB - likely rename/move */ Status = vfatUpdateFCB(DeviceExt, *Fcb, &DirContext, ParentFcb); - (*Fcb)->dirIndex = DirContext.DirIndex; - (*Fcb)->startIndex = DirContext.StartIndex; } else { @@ -802,8 +800,6 @@ /* We're modifying an existing FCB - likely rename/move */ /* FIXME: check status */ vfatUpdateFCB(DeviceExt, *Fcb, &DirContext, ParentFcb); - (*Fcb)->dirIndex = DirContext.DirIndex; - (*Fcb)->startIndex = DirContext.StartIndex; } else { Modified: trunk/reactos/drivers/filesystems/fastfat/fcb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] Fri Aug 5 10:48:01 2016 @@ -358,6 +358,68 @@ } } +static +VOID +vfatInitFCBFromDirEntry( + PDEVICE_EXTENSION Vcb, + PVFATFCB Fcb, + PVFAT_DIRENTRY_CONTEXT DirContext) +{ + ULONG Size; + + RtlCopyMemory(&Fcb->entry, &DirContext->DirEntry, sizeof (DIR_ENTRY)); + RtlCopyUnicodeString(&Fcb->ShortNameU, &DirContext->ShortNameU); + if (Vcb->Flags & VCB_IS_FATX) + { + Fcb->ShortHash.Hash = Fcb->Hash.Hash; + } + else + { + Fcb->ShortHash.Hash = vfatNameHash(0, &Fcb->DirNameU); + Fcb->ShortHash.Hash = vfatNameHash(Fcb->ShortHash.Hash, &Fcb->ShortNameU); + } + + if (vfatFCBIsDirectory(Fcb)) + { + ULONG FirstCluster, CurrentCluster; + NTSTATUS Status = STATUS_SUCCESS; + Size = 0; + FirstCluster = vfatDirEntryGetFirstCluster(Vcb, &Fcb->entry); + if (FirstCluster == 1) + { + Size = Vcb->FatInfo.rootDirectorySectors * Vcb->FatInfo.BytesPerSector; + } + else if (FirstCluster != 0) + { + CurrentCluster = FirstCluster; + while (CurrentCluster != 0xffffffff && NT_SUCCESS(Status)) + { + Size += Vcb->FatInfo.BytesPerCluster; + Status = NextCluster(Vcb, FirstCluster, &CurrentCluster, FALSE); + } + } + } + else if (Fcb->Flags & FCB_IS_FATX_ENTRY) + { + Size = Fcb->entry.FatX.FileSize; + } + else + { + Size = Fcb->entry.Fat.FileSize; + } + Fcb->dirIndex = DirContext->DirIndex; + Fcb->startIndex = DirContext->StartIndex; + if ((Fcb->Flags & FCB_IS_FATX_ENTRY) && !vfatFCBIsRoot(Fcb)) + { + ASSERT(DirContext->DirIndex >= 2 && DirContext->StartIndex >= 2); + Fcb->dirIndex = DirContext->DirIndex-2; + Fcb->startIndex = DirContext->StartIndex-2; + } + Fcb->RFCB.FileSize.QuadPart = Size; + Fcb->RFCB.ValidDataLength.QuadPart = Size; + Fcb->RFCB.AllocationSize.QuadPart = ROUND_UP_64(Size, Vcb->FatInfo.BytesPerCluster); +} + NTSTATUS vfatUpdateFCB( PDEVICE_EXTENSION pVCB, @@ -391,31 +453,17 @@ Fcb->DirNameU.Buffer = Fcb->PathNameU.Buffer; vfatSplitPathName(&Fcb->PathNameU, &Fcb->DirNameU, &Fcb->LongNameU); - /* Copy short name */ - RtlCopyUnicodeString(&Fcb->ShortNameU, &DirContext->ShortNameU); - - /* Recompute hashes */ - Fcb->Hash.Hash = vfatNameHash(0, &Fcb->PathNameU); - if (pVCB->Flags & VCB_IS_FATX) - { - Fcb->ShortHash.Hash = Fcb->Hash.Hash; - - RtlCopyMemory(Fcb->entry.FatX.Filename, DirContext->DirEntry.FatX.Filename, 42); - Fcb->entry.FatX.FilenameLength = DirContext->DirEntry.FatX.FilenameLength; - } - else - { - Fcb->ShortHash.Hash = vfatNameHash(0, &Fcb->DirNameU); - Fcb->ShortHash.Hash = vfatNameHash(Fcb->ShortHash.Hash, &Fcb->ShortNameU); - - RtlCopyMemory(Fcb->entry.Fat.ShortName, DirContext->DirEntry.Fat.ShortName, 11); - } - - /* Set parent */ + /* Save old parent */ OldParent = Fcb->parentFcb; + + /* Reinit FCB */ + vfatInitFCBFromDirEntry(pVCB, Fcb, DirContext); + + if (vfatFCBIsDirectory(Fcb)) + { + CcFlushCache(&Fcb->SectionObjectPointers, NULL, 0, NULL); + } Fcb->parentFcb = ParentFcb; - - /* Add to the table */ vfatAddFCBToTable(pVCB, Fcb); /* If we moved across directories, dereference our old parent @@ -607,7 +655,6 @@ PVFATFCB *fileFCB) { PVFATFCB rcFCB; - ULONG Size; UNICODE_STRING NameU; NTSTATUS Status; @@ -618,57 +665,8 @@ } rcFCB = vfatNewFCB(vcb, &NameU); - RtlCopyMemory(&rcFCB->entry, &DirContext->DirEntry, sizeof (DIR_ENTRY)); - RtlCopyUnicodeString(&rcFCB->ShortNameU, &DirContext->ShortNameU); - if (vcb->Flags & VCB_IS_FATX) - { - rcFCB->ShortHash.Hash = rcFCB->Hash.Hash; - } - else - { - rcFCB->ShortHash.Hash = vfatNameHash(0, &rcFCB->DirNameU); - rcFCB->ShortHash.Hash = vfatNameHash(rcFCB->ShortHash.Hash, &rcFCB->ShortNameU); - } - - if (vfatFCBIsDirectory(rcFCB)) - { - ULONG FirstCluster, CurrentCluster; - NTSTATUS Status = STATUS_SUCCESS; - Size = 0; - FirstCluster = vfatDirEntryGetFirstCluster(vcb, &rcFCB->entry); - if (FirstCluster == 1) - { - Size = vcb->FatInfo.rootDirectorySectors * vcb->FatInfo.BytesPerSector; - } - else if (FirstCluster != 0) - { - CurrentCluster = FirstCluster; - while (CurrentCluster != 0xffffffff && NT_SUCCESS(Status)) - { - Size += vcb->FatInfo.BytesPerCluster; - Status = NextCluster(vcb, FirstCluster, &CurrentCluster, FALSE); - } - } - } - else if (rcFCB->Flags & FCB_IS_FATX_ENTRY) - { - Size = rcFCB->entry.FatX.FileSize; - } - else - { - Size = rcFCB->entry.Fat.FileSize; - } - rcFCB->dirIndex = DirContext->DirIndex; - rcFCB->startIndex = DirContext->StartIndex; - if ((rcFCB->Flags & FCB_IS_FATX_ENTRY) && !vfatFCBIsRoot(directoryFCB)) - { - ASSERT(DirContext->DirIndex >= 2 && DirContext->StartIndex >= 2); - rcFCB->dirIndex = DirContext->DirIndex-2; - rcFCB->startIndex = DirContext->StartIndex-2; - } - rcFCB->RFCB.FileSize.QuadPart = Size; - rcFCB->RFCB.ValidDataLength.QuadPart = Size; - rcFCB->RFCB.AllocationSize.QuadPart = ROUND_UP_64(Size, vcb->FatInfo.BytesPerCluster); + vfatInitFCBFromDirEntry(vcb, rcFCB, DirContext); + rcFCB->RefCount = 1; if (vfatFCBIsDirectory(rcFCB)) {
8 years, 4 months
1
0
0
0
[akhaldi] 72112: [0.4.2] * Merge the browseui addressband fix by Christoph in r72103. CORE-11766
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 5 09:36:22 2016 New Revision: 72112 URL:
http://svn.reactos.org/svn/reactos?rev=72112&view=rev
Log: [0.4.2] * Merge the browseui addressband fix by Christoph in r72103. CORE-11766 Modified: branches/ros-branch-0_4_2/reactos/ (props changed) branches/ros-branch-0_4_2/reactos/dll/win32/browseui/addressband.cpp Propchange: branches/ros-branch-0_4_2/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Aug 5 09:36:22 2016 @@ -20,4 +20,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 -/trunk/reactos:72020-72022,72026,72028,72030,72032-72034,72036,72063,72067,72078,72092 +/trunk/reactos:72020-72022,72026,72028,72030,72032-72034,72036,72063,72067,72078,72092,72103 Modified: branches/ros-branch-0_4_2/reactos/dll/win32/browseui/addressband.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_2/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_2/reactos/dll/win32/browseui/addressband.cpp [iso-8859-1] (original) +++ branches/ros-branch-0_4_2/reactos/dll/win32/browseui/addressband.cpp [iso-8859-1] Fri Aug 5 09:36:22 2016 @@ -72,7 +72,7 @@ { if (pdbi->dwMask & DBIM_MINSIZE) { - pdbi->ptMinSize.x = 400; + pdbi->ptMinSize.x = 100; pdbi->ptMinSize.y = 22; } if (pdbi->dwMask & DBIM_MAXSIZE) @@ -87,7 +87,7 @@ } if (pdbi->dwMask & DBIM_ACTUAL) { - pdbi->ptActual.x = 400; + pdbi->ptActual.x = 100; pdbi->ptActual.y = 22; } if (pdbi->dwMask & DBIM_TITLE)
8 years, 4 months
1
0
0
0
[gadamopoulos] 72111: [EXPLORER] - Fix subclassing the tasks toolbar which was broken in r65274. CORE-11532
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Aug 5 09:06:30 2016 New Revision: 72111 URL:
http://svn.reactos.org/svn/reactos?rev=72111&view=rev
Log: [EXPLORER] - Fix subclassing the tasks toolbar which was broken in r65274. CORE-11532 Modified: trunk/reactos/base/shell/explorer/taskswnd.cpp Modified: trunk/reactos/base/shell/explorer/taskswnd.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/tasksw…
============================================================================== --- trunk/reactos/base/shell/explorer/taskswnd.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/taskswnd.cpp [iso-8859-1] Fri Aug 5 09:06:30 2016 @@ -160,8 +160,29 @@ return SetButtonInfo(iButtonIndex, &tbbi) != 0; } + LRESULT OnNcHitTestToolbar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) + { + POINT pt; + + /* See if the mouse is on a button */ + pt.x = GET_X_LPARAM(lParam); + pt.y = GET_Y_LPARAM(lParam); + ScreenToClient(&pt); + + INT index = HitTest(&pt); + if (index < 0) + { + /* Make the control appear to be transparent outside of any buttons */ + return HTTRANSPARENT; + } + + bHandled = FALSE; + return 0; + } + public: BEGIN_MSG_MAP(CNotifyToolbar) + MESSAGE_HANDLER(WM_NCHITTEST, OnNcHitTestToolbar) END_MSG_MAP() BOOL Initialize(HWND hWndParent) @@ -1683,26 +1704,6 @@ return TRUE; } - LRESULT OnNcHitTestToolbar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) - { - POINT pt; - - /* See if the mouse is on a button */ - pt.x = GET_X_LPARAM(lParam); - pt.y = GET_Y_LPARAM(lParam); - ScreenToClient(&pt); - - INT index = m_TaskBar.HitTest(&pt); - if (index < 0) - { - /* Make the control appear to be transparent outside of any buttons */ - return HTTRANSPARENT; - } - - bHandled = FALSE; - return 0; - } - LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { LRESULT Ret = TRUE; @@ -1828,8 +1829,6 @@ MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu) MESSAGE_HANDLER(WM_TIMER, OnTimer) MESSAGE_HANDLER(m_ShellHookMsg, HandleShellHookMsg) - ALT_MSG_MAP(1) - MESSAGE_HANDLER(WM_NCHITTEST, OnNcHitTestToolbar) END_MSG_MAP() HWND _Init(IN HWND hWndParent, IN OUT ITrayWindow *tray)
8 years, 4 months
1
0
0
0
[mjansen] 72110: [ATL][ATL_APITEST] Add implementation + tests for most functions from CPoint, CSize, CRect. CORE-11747 #resolve Not all functions are implemented, the ones that are not implemented...
by mjansen@svn.reactos.org
Author: mjansen Date: Thu Aug 4 19:15:21 2016 New Revision: 72110 URL:
http://svn.reactos.org/svn/reactos?rev=72110&view=rev
Log: [ATL][ATL_APITEST] Add implementation + tests for most functions from CPoint, CSize, CRect. CORE-11747 #resolve Not all functions are implemented, the ones that are not implemented are left in a comment in the header. Added: trunk/reactos/sdk/lib/atl/atltypes.h (with props) trunk/rostests/apitests/atl/atltypes.cpp (with props) Modified: trunk/rostests/apitests/atl/CMakeLists.txt trunk/rostests/apitests/atl/testlist.c Added: trunk/reactos/sdk/lib/atl/atltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/atl/atltypes.h?rev…
============================================================================== --- trunk/reactos/sdk/lib/atl/atltypes.h (added) +++ trunk/reactos/sdk/lib/atl/atltypes.h [iso-8859-1] Thu Aug 4 19:15:21 2016 @@ -0,0 +1,566 @@ +/* + * ReactOS ATL + * + * Copyright 2016 Mark Jansen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#pragma once + + +class CSize; +class CRect; + + +class CPoint : public tagPOINT +{ +public: + + CPoint() throw() + { + x = y = 0; + } + + CPoint(int initX, int initY) throw() + { + x = initX; + y = initY; + } + + CPoint(POINT initPt) throw() + { + *((POINT*)this) = initPt; + } + + CPoint(SIZE initSize) throw() + { + *((SIZE*)this) = initSize; + } + + CPoint(LPARAM dwPoint) throw() + { + x = LOWORD(dwPoint); + y = HIWORD(dwPoint); + } + + void Offset(int xOffset, int yOffset) throw() + { + x += xOffset; + y += yOffset; + } + + void Offset(POINT point) throw() + { + Offset(point.x, point.y); + } + + void Offset(SIZE size) throw() + { + Offset(size.cx, size.cy); + } + + BOOL operator==(POINT point) const throw() + { + return (x == point.x && y == point.y); + } + + BOOL operator!=(POINT point) const throw() + { + return !(*this == point); + } + + void operator+=(SIZE size) throw() + { + Offset(size); + } + + void operator+=(POINT point) throw() + { + Offset(point); + } + + void operator-=(SIZE size) throw() + { + Offset(-size.cx, -size.cy); + } + + void operator-=(POINT point) throw() + { + Offset(-point.x, -point.y); + } + + CPoint operator+(SIZE size) const throw() + { + return CPoint(x + size.cx, y + size.cy); + } + + CPoint operator+(POINT point) const throw() + { + return CPoint(x + point.x, y + point.y); + } + + CRect operator+(const RECT* lpRect) const throw(); + + CSize operator-(POINT point) const throw(); + + CPoint operator-(SIZE size) const throw() + { + return CPoint(x - size.cx, y - size.cy); + } + + CRect operator-(const RECT* lpRect) const throw(); + + CPoint operator-() const throw() + { + return CPoint(-x, -y); + } +}; + +class CSize : public tagSIZE +{ +public: + CSize() throw() + { + cx = cy = 0; + } + + CSize(int initCX, int initCY) throw() + { + cx = initCX; + cy = initCY; + } + + CSize(SIZE initSize) throw() + { + *((SIZE*)this) = initSize; + } + + CSize(POINT initPt) throw() + { + *((POINT*)this) = initPt; + } + + CSize(DWORD dwSize) throw() + { + cx = LOWORD(dwSize); + cy = HIWORD(dwSize); + } + + BOOL operator==(SIZE size) const throw() + { + return (size.cx == cx && size.cy == cy); + } + + BOOL operator!=(SIZE size) const throw() + { + return !(*this == size); + } + + void operator+=(SIZE size) throw() + { + cx += size.cx; + cy += size.cy; + } + + void operator-=(SIZE size) throw() + { + cx -= size.cx; + cy -= size.cy; + } + + CSize operator+(SIZE size) const throw() + { + return CSize(cx + size.cx, cy + size.cy); + } + + CPoint operator+(POINT point) const throw() + { + return CPoint(cx + point.x, cy + point.y); + } + + CRect operator+(const RECT* lpRect) const throw(); + + CSize operator-(SIZE size) const throw() + { + return CSize(cx - size.cx, cy - size.cy); + } + + CPoint operator-(POINT point) const throw() + { + return CPoint(cx - point.x, cy - point.y); + } + + CRect operator-(const RECT* lpRect) const throw(); + + CSize operator-() const throw() + { + return CSize(-cx, -cy); + } +}; + + +CSize CPoint::operator-(POINT point) const throw() +{ + return CSize(x - point.x, y - point.y); +} + + +class CRect : public tagRECT +{ +public: + CRect() throw() + { + left = top = right = bottom = 0; + } + + CRect(int l, int t, int r, int b) throw() + { + left = l; + top = t; + right = r; + bottom = b; + } + + CRect(const RECT& srcRect) throw() + { + left = srcRect.left; + top = srcRect.top; + right = srcRect.right; + bottom = srcRect.bottom; + } + + CRect(LPCRECT lpSrcRect) throw() + { + left = lpSrcRect->left; + top = lpSrcRect->top; + right = lpSrcRect->right; + bottom = lpSrcRect->bottom; + } + + CRect(POINT point, SIZE size) throw() + { + left = point.x; + top = point.y; + right = point.x + size.cx; + bottom = point.y + size.cy; + } + + CRect(POINT topLeft, POINT bottomRight) throw() + { + left = topLeft.x; + top = topLeft.y; + right = bottomRight.x; + bottom = bottomRight.y; + } + + CPoint& BottomRight() throw() + { + return ((CPoint*)this)[1]; + } + + const CPoint& BottomRight() const throw() + { + return ((const CPoint*)this)[1]; + } + + CPoint CenterPoint() const throw() + { + return CPoint(left + (Width() >> 1), top + (Height() >> 1)); + } + + void CopyRect(LPCRECT lpSrcRect) throw() + { + ::CopyRect(this, lpSrcRect); + } + + void DeflateRect(int x, int y) throw() + { + ::InflateRect(this, -x, -y); + } + + void DeflateRect(SIZE size) throw() + { + ::InflateRect(this, -size.cx, -size.cy); + } + + void DeflateRect(LPCRECT lpRect) throw() + { + DeflateRect(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); + } + + void DeflateRect(int l, int t, int r, int b) throw() + { + left += l; + top += t; + right -= r; + bottom -= b; + } + + BOOL EqualRect(LPCRECT lpRect) const throw() + { + return ::EqualRect(this, lpRect); + } + + + int Height() const throw() + { + return bottom - top; + } + + void InflateRect(int x, int y) throw() + { + ::InflateRect(this, x, y); + } + + void InflateRect(SIZE size) throw() + { + ::InflateRect(this, size.cx, size.cy); + } + + void InflateRect(LPCRECT lpRect) throw() + { + InflateRect(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); + } + + void InflateRect(int l, int t, int r, int b) throw() + { + left -= l; + top -= t; + right += r; + bottom += b; + } + + BOOL IntersectRect(LPCRECT lpRect1, LPCRECT lpRect2) throw() + { + return ::IntersectRect(this, lpRect1, lpRect2); + } + + BOOL IsRectEmpty() const throw() + { + return ::IsRectEmpty(this); + } + + BOOL IsRectNull() const throw() + { + return (left == 0 && right == 0 && + top == 0 && bottom == 0); + } + + //void MoveToX(int x) throw() + //void MoveToXY(int x, int y) throw() + //void MoveToXY(POINT point) throw() + //void MoveToY(int y) throw() + //void NormalizeRect() throw() + + void OffsetRect(int x, int y) throw() + { + ::OffsetRect(this, x, y); + } + + void OffsetRect(POINT point) throw() + { + ::OffsetRect(this, point.x, point.y); + } + + void OffsetRect(SIZE size) throw() + { + ::OffsetRect(this, size.cx, size.cy); + } + + //BOOL PtInRect(POINT point) const throw() + //void SetRect(int x1, int y1, int x2, int y2) throw() + //void SetRectEmpty() throw() + //CSize Size() const throw() + //BOOL SubtractRect(LPCRECT lpRectSrc1, LPCRECT lpRectSrc2) throw() + + CPoint& TopLeft() throw() + { + return ((CPoint*)this)[0]; + } + + const CPoint& TopLeft() const throw() + { + return ((const CPoint*)this)[0]; + } + + BOOL UnionRect(LPCRECT lpRect1, LPCRECT lpRect2) throw() + { + return ::UnionRect(this, lpRect1, lpRect2); + } + + int Width() const throw() + { + return right - left; + } + + + BOOL operator==(const RECT& rect) const throw() + { + return (left == rect.left && + top == rect.top && + right == rect.right && + bottom == rect.bottom); + } + + BOOL operator!=(const RECT& rect) const throw() + { + return !(*this == rect); + } + + void operator=(const RECT& srcRect) throw() + { + left = srcRect.left; + top = srcRect.top; + right = srcRect.right; + bottom = srcRect.bottom; + } + + void operator+=(POINT point) throw() + { + OffsetRect(point); + } + + void operator+=(SIZE size) throw() + { + OffsetRect(size); + } + + void operator+=(LPCRECT lpRect) throw() + { + InflateRect(lpRect); + } + + void operator-=(POINT point) throw() + { + OffsetRect(-point.x, -point.y); + } + + void operator-=(SIZE size) throw() + { + OffsetRect(-size.cx, -size.cy); + } + + void operator-=(LPCRECT lpRect) throw() + { + DeflateRect(lpRect); + } + + + CRect operator+(POINT point) const throw() + { + CRect r(this); + r.OffsetRect(point); + return r; + } + + CRect operator+(LPCRECT lpRect) const throw() + { + CRect r(this); + r.InflateRect(lpRect); + return r; + } + + CRect operator+(SIZE size) const throw() + { + CRect r(this); + r.OffsetRect(size); + return r; + } + + CRect operator-(POINT point) const throw() + { + CRect r(this); + r.OffsetRect(-point.x, -point.y); + return r; + } + + CRect operator-(SIZE size) const throw() + { + CRect r(this); + r.OffsetRect(-size.cx, -size.cy); + return r; + } + + CRect operator-(LPCRECT lpRect) const throw() + { + CRect r(this); + r.DeflateRect(lpRect); + return r; + } + + void operator&=(const RECT& rect) throw() + { + IntersectRect(this, &rect); + } + + CRect operator&(const RECT& rect2) const throw() + { + CRect r; + r.IntersectRect(this, &rect2); + return r; + } + + void operator|=(const RECT& rect) throw() + { + UnionRect(this, &rect); + } + + CRect operator|(const RECT& rect2) const throw() + { + CRect r; + r.UnionRect(this, &rect2); + return r; + } + + operator LPRECT() throw() + { + return this; + } + + operator LPCRECT() const throw() + { + return this; + } +}; + +CRect CPoint::operator+(const RECT* lpRect) const throw() +{ + CRect r(lpRect); + r += *this; + return r; +} + +CRect CPoint::operator-(const RECT* lpRect) const throw() +{ + CRect r(lpRect); + r -= *this; + return r; +} + +CRect CSize::operator+(const RECT* lpRect) const throw() +{ + CRect r(lpRect); + r += *this; + return r; +} + +CRect CSize::operator-(const RECT* lpRect) const throw() +{ + CRect r(lpRect); + r -= *this; + return r; +} + Propchange: trunk/reactos/sdk/lib/atl/atltypes.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/atl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/CMakeLists.t…
============================================================================== --- trunk/rostests/apitests/atl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/CMakeLists.txt [iso-8859-1] Thu Aug 4 19:15:21 2016 @@ -4,6 +4,7 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl) add_executable(atl_apitest + atltypes.cpp CComBSTR.cpp CComHeapPtr.cpp CString.cpp Added: trunk/rostests/apitests/atl/atltypes.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/atltypes.cpp…
============================================================================== --- trunk/rostests/apitests/atl/atltypes.cpp (added) +++ trunk/rostests/apitests/atl/atltypes.cpp [iso-8859-1] Thu Aug 4 19:15:21 2016 @@ -0,0 +1,538 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for CPoint, CSize, CRect + * PROGRAMMER: Mark Jansen + * + * Code based on MSDN samples regarding CPoint, CSize, CRect + */ + +#include <apitest.h> +#include <windows.h> +#include <atltypes.h> + + +#define ok_size(x, y) \ + ok(x == y, "Wrong size, expected '%s' to equal '%s'\n", wine_dbgstr_size(&x), wine_dbgstr_size(&y)) + +#define ok_point(x, y) \ + ok(x == y, "Wrong point, expected '%s' to equal '%s'\n", wine_dbgstr_point(&x), wine_dbgstr_point(&y)) +#define nok_point(x, y) \ + ok(x != y, "Wrong point, expected '%s' NOT to equal '%s'\n", wine_dbgstr_point(&x), wine_dbgstr_point(&y)) + +#define ok_rect(x, y) \ + ok(x == y, "Wrong rect, expected '%s' to equal '%s'\n", wine_dbgstr_rect(&x), wine_dbgstr_rect(&y)) +#define nok_rect(x, y) \ + ok(x != y, "Wrong rect, expected '%s' to NOT equal '%s'\n", wine_dbgstr_rect(&x), wine_dbgstr_rect(&y)) + + +static void test_CSize() +{ + CSize empty; + ok(empty.cx == 0, "Expected cx to be 0, was %ld\n", empty.cx); + ok(empty.cy == 0, "Expected cy to be 0, was %ld\n", empty.cy); + + CSize szPointA(10, 25); + + SIZE sz; + sz.cx = 10; + sz.cy = 25; + CSize szPointB(sz); + + POINT pt; + pt.x = 10; + pt.y = 25; + CSize szPointC(pt); + + CPoint ptObject(10, 25); + CSize szPointD(ptObject); + + DWORD dw = MAKELONG(10, 25); + CSize szPointE(dw); + + ok_size(szPointA, szPointB); + ok_size(szPointB, szPointC); + ok_size(szPointC, szPointD); + ok_size(szPointD, szPointE); + + ptObject = szPointA + pt; + CPoint res(20,50); + ok_point(ptObject, res); + + ptObject = szPointA - pt; + res = CPoint(0, 0); + ok_point(ptObject, res); + + CSize sz1(135, 135); + CSize sz2(135, 135); + ok_size(sz1, sz2); + + sz1 = CSize(222, 222); + sz2 = CSize(111, 111); + ok(sz1 != sz2, "Wrong size, expected '%s' NOT to equal '%s'\n", wine_dbgstr_size(&sz1), wine_dbgstr_size(&sz2)); + + sz1 = CSize(100, 100); + sz2 = CSize(50, 25); + sz1 += sz2; + + CSize szResult(150, 125); + ok_size(sz1, szResult); + + sz1 = CSize(100, 100); + SIZE sz3; + sz3.cx = 50; + sz3.cy = 25; + + sz1 += sz3; + ok_size(sz1, szResult); + + sz1 = CSize(100, 100); + sz1 -= sz2; + + szResult = CSize(50, 75); + ok_size(sz1, szResult); + + sz3.cx = 50; + sz3.cy = 25; + + sz1 = CSize(100, 100); + sz1 -= sz3; + ok_size(sz1, szResult); + + sz1 = CSize(100, 100); + CSize szOut; + szOut = sz1 + sz2; + + szResult = CSize(150, 125); + ok_size(szOut, szResult); + + sz3.cx = 50; + sz3.cy = 25; + + szOut = sz1 + sz3; + ok_size(szOut, szResult); + + szOut = sz1 - sz2; + + szResult = CSize(50, 75); + ok_size(szOut, szResult); + + sz3.cx = 50; + sz3.cy = 25; + + szOut = sz1 - sz3; + ok_size(szOut, szResult); + + szResult = CSize(-50, -75); + + szOut = -szOut; + ok_size(szOut, szResult); + + RECT rc = { 1, 2, 3, 4 }; + + CRect rcres = sz1 + &rc; + CRect rcexp(101, 102, 103, 104); + ok_rect(rcexp, rcres); + + rcres = sz1 - &rc; + rcexp = CRect(-99, -98, -97, -96); + ok_rect(rcexp, rcres); +} + + +static void test_CPoint() +{ + CPoint empty; + + ok(empty.x == 0, "Expected x to be 0, was %ld\n", empty.x); + ok(empty.y == 0, "Expected y to be 0, was %ld\n", empty.y); + + CPoint ptTopLeft(0, 0); + POINT ptHere; + ptHere.x = 35; + ptHere.y = 95; + + CPoint ptMFCHere(ptHere); + + SIZE sHowBig; + sHowBig.cx = 300; + sHowBig.cy = 10; + + CPoint ptMFCBig(sHowBig); + DWORD dwSize; + dwSize = MAKELONG(35, 95); + + CPoint ptFromDouble(dwSize); + ok_point(ptFromDouble, ptMFCHere); + + CPoint ptStart(100, 100); + ptStart.Offset(35, 35); + + CPoint ptResult(135, 135); + ok_point(ptStart, ptResult); + + ptStart = CPoint(100, 100); + POINT pt; + + pt.x = 35; + pt.y = 35; + + ptStart.Offset(pt); + ok_point(ptStart, ptResult); + + ptStart = CPoint(100, 100); + SIZE size; + + size.cx = 35; + size.cy = 35; + + ptStart.Offset(size); + ok_point(ptStart, ptResult); + + CPoint ptFirst(256, 128); + CPoint ptTest(256, 128); + ok_point(ptFirst, ptTest); + + pt.x = 256; + pt.y = 128; + ok_point(ptTest, pt); + + ptTest = CPoint(111, 333); + nok_point(ptFirst, ptTest); + + pt.x = 333; + pt.y = 111; + nok_point(ptTest, pt); + + ptStart = CPoint(100, 100); + CSize szOffset(35, 35); + + ptStart += szOffset; + + ok_point(ptResult, ptStart); + + ptStart = CPoint(100, 100); + + ptStart += size; + ok_point(ptResult, ptStart); + + ptStart = CPoint(100, 100); + + ptStart -= szOffset; + + ptResult = CPoint(65, 65); + ok_point(ptResult, ptStart); + + + ptStart = CPoint(100, 100); + + ptStart -= size; + ok_point(ptResult, ptStart); + + ptStart = CPoint(100, 100); + CPoint ptEnd; + + ptEnd = ptStart + szOffset; + + ptResult = CPoint(135, 135); + ok_point(ptResult, ptEnd); + + ptEnd = ptStart + size; + ok_point(ptResult, ptEnd); + + ptEnd = ptStart + pt; + ptResult = CPoint(433, 211); + ok_point(ptResult, ptEnd); + + ptEnd = ptStart - szOffset; + ptResult = CPoint(65, 65); + ok_point(ptResult, ptEnd); + + ptEnd = ptStart - size; + ok_point(ptResult, ptEnd); + + szOffset = ptStart - pt; + CSize expected(-233, -11); + ok_size(szOffset, expected); + + ptStart += pt; + ptResult = CPoint(433, 211); + ok_point(ptResult, ptStart); + + ptStart -= pt; + ptResult = CPoint(100, 100); + ok_point(ptResult, ptStart); + + ptTest = CPoint(35, 35); + ptTest = -ptTest; + + CPoint ptNeg(-35, -35); + ok_point(ptTest, ptNeg); + + RECT rc = { 1, 2, 3, 4 }; + + CRect rcres = ptStart + &rc; + CRect rcexp(101, 102, 103, 104); + ok_rect(rcexp, rcres); + + rcres = ptStart - &rc; + rcexp = CRect(-99, -98, -97, -96); + ok_rect(rcexp, rcres); +} + + +static void test_CRect() +{ + CRect empty; + ok(empty.left == 0, "Expected left to be 0, was %ld\n", empty.left); + ok(empty.top == 0, "Expected top to be 0, was %ld\n", empty.top); + ok(empty.Width() == 0, "Expected Width to be 0, was %i\n", empty.Width()); + ok(empty.Height() == 0, "Expected Height to be 0, was %i\n", empty.Height()); + + CRect rect(0, 0, 100, 50); + ok(rect.Width() == 100, "Expected Width to be 100, was %i\n", rect.Width()); + ok(rect.Height() == 50, "Expected Height to be 50, was %i\n", rect.Height()); + + RECT sdkRect; + sdkRect.left = 0; + sdkRect.top = 0; + sdkRect.right = 100; + sdkRect.bottom = 50; + + CRect rect2(sdkRect); + CRect rect3(&sdkRect); + ok_rect(rect2, rect); + ok_rect(rect3, rect); + + CPoint pt(0, 0); + CSize sz(100, 50); + CRect rect4(pt, sz); + ok_rect(rect4, rect2); + + CPoint ptBottomRight(100, 50); + CRect rect5(pt, ptBottomRight); + ok_rect(rect5, rect4); + + rect = CRect(210, 150, 350, 900); + CPoint ptDown; + + ptDown = rect.BottomRight(); + + pt = CPoint(350, 900); + ok_point(ptDown, pt); + + rect2 = CRect(10, 10, 350, 350); + CPoint ptLow(180, 180); + + rect2.BottomRight() = ptLow; + + rect = CRect(10, 10, 180, 180); + ok_rect(rect2, rect); + + pt = CPoint(95, 95); + CPoint pt2 = rect2.CenterPoint(); + ok_point(pt2, pt); + + pt2 = rect2.BottomRight(); + pt = CPoint(180, 180); + ok_point(pt2, pt); + + pt2 = rect2.TopLeft(); + pt = CPoint(10, 10); + ok_point(pt2, pt); + + rect2.TopLeft().Offset(3, 3); + rect3 = CRect(13, 13, 180, 180); + ok_rect(rect3, rect2); + + CRect rectSource(35, 10, 125, 10); + CRect rectDest; + + rectDest.CopyRect(&rectSource); + + RECT rectSource2; + rectSource2.left = 0; + rectSource2.top = 0; + rectSource2.bottom = 480; + rectSource2.right = 640; + + rectDest.CopyRect(&rectSource2); + + rect = CRect(10, 10, 50, 50); + + rect.DeflateRect(1, 2); + + rect2 = CRect(11, 12, 49, 48); + ok_rect(rect2, rect); + + rect2 = CRect(10, 10, 50, 50); + CRect rectDeflate(1, 2, 3, 4); + + rect2.DeflateRect(&rectDeflate); + rect = CRect(11, 12, 47, 46); + ok_rect(rect2, rect); + + rect2.DeflateRect(sz); + rect = CRect(111, 62, -53, -4); + ok_rect(rect2, rect); + + rect2.OffsetRect(sz); + rect = CRect(211, 112, 47, 46); + ok_rect(rect2, rect); + + CRect rect1(35, 150, 10, 25); + rect2 = CRect(35, 150, 10, 25); + rect3 = CRect(98, 999, 6, 3); + + ok(rect1.EqualRect(rect2), "Expected EqualRect to return TRUE for %s, %s\n", wine_dbgstr_rect(&rect1), wine_dbgstr_rect(&rect2)); + ok(!rect1.EqualRect(rect3), "Expected EqualRect to return FALSE for %s, %s\n", wine_dbgstr_rect(&rect1), wine_dbgstr_rect(&rect3)); + + RECT test; + test.left = 35; + test.top = 150; + test.right = 10; + test.bottom = 25; + + ok(rect1.EqualRect(&test), "Expected EqualRect to return TRUE for %s, %s\n", wine_dbgstr_rect(&rect1), wine_dbgstr_rect(&test)); + + rect = test; + rect2 = CRect(35, 150, 10, 25); + ok_rect(rect, rect2); + + rect = CRect(0, 0, 300, 300); + rect.InflateRect(50, 200); + + rect2 = CRect(-50, -200, 350, 500); + ok_rect(rect, rect2); + + rect.InflateRect(sz); + rect2 = CRect(-150, -250, 450, 550); + ok_rect(rect, rect2); + + rect = CRect(20, 30, 80, 70); + + int nHt = rect.Height(); + + ok(nHt == 40, "Expected nHt to be 40, was %i\n", nHt); + + CRect rectOne(125, 0, 150, 200); + CRect rectTwo(0, 75, 350, 95); + CRect rectInter; + + rectInter.IntersectRect(rectOne, rectTwo); + + rect = CRect(125, 75, 150, 95); + ok_rect(rectInter, rect); + + CRect rectInter2 = rectOne; + rectInter2 &= rectTwo; + rect = CRect(125, 75, 150, 95); + ok_rect(rectInter2, rect); + + CRect rectNone(0, 0, 0, 0); + CRect rectSome(35, 50, 135, 150); + + ok(rectNone.IsRectEmpty(), "Expected IsRectEmpty to return TRUE for %s\n", wine_dbgstr_rect(&rectNone)); + ok(!rectSome.IsRectEmpty(), "Expected IsRectEmpty to return FALSE for %s\n", wine_dbgstr_rect(&rectSome)); + + CRect rectEmpty(35, 35, 35, 35); + ok(rectEmpty.IsRectEmpty(), "Expected IsRectEmpty to return TRUE for %s\n", wine_dbgstr_rect(&rectEmpty)); + + ok(rectNone.IsRectNull(), "Expected IsRectNull to return TRUE for %s\n", wine_dbgstr_rect(&rectNone)); + ok(!rectSome.IsRectNull(), "Expected IsRectNull to return FALSE for %s\n", wine_dbgstr_rect(&rectSome)); + + CRect rectNotNull(0, 0, 35, 50); + ok(!rectNotNull.IsRectNull(), "Expected IsRectNull to return FALSE for %s\n", wine_dbgstr_rect(&rectNotNull)); + + rect1 = CRect(35, 150, 10, 25); + rect2 = CRect(35, 150, 10, 25); + rect3 = CRect(98, 999, 6, 3); + + ok_rect(rect1, rect2); + + test.left = 35; + test.top = 150; + test.right = 10; + test.bottom = 25; + + ok_rect(rect1, test); + + nok_rect(rect1, rect3); + nok_rect(rect3, test); + + rect1 = CRect(100, 235, 200, 335); + pt = CPoint(35, 65); + rect2 = CRect(135, 300, 235, 400); + + rect1 += pt; + + ok_rect(rect1, rect2); + + rect1 = CRect(100, 235, 200, 335); + rect2 = rect1 + pt; + CRect rectResult(135, 300, 235, 400); + ok_rect(rectResult, rect2); + + rect2 = rect1 + &test; + rectResult = CRect(65, 85, 210, 360); + ok_rect(rectResult, rect2); + + rect2 = rect1 - (LPCRECT)&test; + rectResult = CRect(135, 385, 190, 310); + ok_rect(rectResult, rect2); + + rect2 = rect1 - pt; + rectResult = CRect(65, 170, 165, 270); + + ok_rect(rect2, rectResult); + + rect1 -= pt; + ok_rect(rect1, rectResult); + + rect1 = CRect(100, 0, 200, 300); + rect2 = CRect(0, 100, 300, 200); + + rect3 = rect1 & rect2; + + rectResult = CRect(100, 100, 200, 200); + ok_rect(rectResult, rect3); + + rect3 = rect1 | rect2; + rectResult = CRect(0, 0, 300, 300); + ok_rect(rectResult, rect3); + + rect1 |= rect2; + ok_rect(rectResult, rect1); + + rect1 += sz; + rectResult = CRect(100, 50, 400, 350); + ok_rect(rectResult, rect1); + + rect1 += &test; + rectResult = CRect(65, -100, 410, 375); + ok_rect(rectResult, rect1); + + rect1 -= sz; + rectResult = CRect(-35, -150, 310, 325); + ok_rect(rectResult, rect1); + + rect1 -= &test; + rectResult = CRect(0, 0, 300, 300); + ok_rect(rectResult, rect1); + + rect2 = rect1 + sz; + rectResult = CRect(100, 50, 400, 350); + ok_rect(rectResult, rect2); + + rect2 = rect1 - sz; + rectResult = CRect(-100, -50, 200, 250); + ok_rect(rectResult, rect2); +} + + +START_TEST(atltypes) +{ + test_CSize(); + test_CPoint(); + test_CRect(); +} Propchange: trunk/rostests/apitests/atl/atltypes.cpp ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/atl/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/testlist.c?r…
============================================================================== --- trunk/rostests/apitests/atl/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/testlist.c [iso-8859-1] Thu Aug 4 19:15:21 2016 @@ -1,12 +1,14 @@ #define STANDALONE #include <apitest.h> +extern void func_atltypes(void); extern void func_CComBSTR(void); extern void func_CComHeapPtr(void); extern void func_CString(void); const struct test winetest_testlist[] = { + { "atltypes", func_atltypes }, { "CComBSTR", func_CComBSTR }, { "CComHeapPtr", func_CComHeapPtr }, { "CString", func_CString },
8 years, 4 months
1
0
0
0
[mjansen] 72109: [INCLUDE/WINE] Update test.h with debug functions for POINT and SIZE.
by mjansen@svn.reactos.org
Author: mjansen Date: Thu Aug 4 19:11:50 2016 New Revision: 72109 URL:
http://svn.reactos.org/svn/reactos?rev=72109&view=rev
Log: [INCLUDE/WINE] Update test.h with debug functions for POINT and SIZE. Modified: trunk/reactos/sdk/include/reactos/wine/test.h Modified: trunk/reactos/sdk/include/reactos/wine/test.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/wine/t…
============================================================================== --- trunk/reactos/sdk/include/reactos/wine/test.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/wine/test.h [iso-8859-1] Thu Aug 4 19:11:50 2016 @@ -70,6 +70,8 @@ extern const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n ); extern const char *wine_dbgstr_guid( const GUID *guid ); +extern const char *wine_dbgstr_point( const POINT *guid ); +extern const char *wine_dbgstr_size( const SIZE *guid ); extern const char *wine_dbgstr_rect( const RECT *rect ); static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); } @@ -575,6 +577,36 @@ return res; } +const char *wine_dbgstr_point( const POINT *point ) +{ + char *res; + + if (!point) return "(null)"; + res = get_temp_buffer( 60 ); +#ifdef __ROS_LONG64__ + sprintf( res, "(%d,%d)", point->x, point->y ); +#else + sprintf( res, "(%ld,%ld)", point->x, point->y ); +#endif + release_temp_buffer( res, strlen(res) + 1 ); + return res; +} + +const char *wine_dbgstr_size( const SIZE *size ) +{ + char *res; + + if (!size) return "(null)"; + res = get_temp_buffer( 60 ); +#ifdef __ROS_LONG64__ + sprintf( res, "(%d,%d)", size->cx, size->cy ); +#else + sprintf( res, "(%ld,%ld)", size->cx, size->cy ); +#endif + release_temp_buffer( res, strlen(res) + 1 ); + return res; +} + const char *wine_dbgstr_rect( const RECT *rect ) { char *res;
8 years, 4 months
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
46
47
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
Results per page:
10
25
50
100
200