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
July 2013
----- 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
13 participants
199 discussions
Start a n
N
ew thread
[fireball] 59554: [RTL] - Victor Martinez Calvo: Add a missing status check in RtlpQueryRemoteProcessModules. - Aleksey Bragin: The code is quite ugly, adding this check makes it just a little bit ...
by fireball@svn.reactos.org
Author: fireball Date: Mon Jul 22 13:45:56 2013 New Revision: 59554 URL:
http://svn.reactos.org/svn/reactos?rev=59554&view=rev
Log: [RTL] - Victor Martinez Calvo: Add a missing status check in RtlpQueryRemoteProcessModules. - Aleksey Bragin: The code is quite ugly, adding this check makes it just a little bit less uglier :-) CORE-7059 #resolve #comment Committed in 59554, thanks. Modified: trunk/reactos/lib/rtl/dbgbuffer.c Modified: trunk/reactos/lib/rtl/dbgbuffer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dbgbuffer.c?rev=59…
============================================================================== --- trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] Mon Jul 22 13:45:56 2013 @@ -159,6 +159,13 @@ sizeof(LDR_DATA_TABLE_ENTRY), NULL); + if (!NT_SUCCESS(Status)) + { + /* failure */ + DPRINT( "NtReadVirtualMemory 3 0x%lx \n", Status); + return Status; + } + /* Import module name from remote Process user space. */ Unicode.Length = lmModule.FullDllName.Length; Unicode.MaximumLength = lmModule.FullDllName.MaximumLength;
11 years, 5 months
1
0
0
0
[fireball] 59553: [PING] - Alexander Yastrebov: Properly write data into the standard output device depending whether it's a char or a block device. CORE-6628 #resolve #comment Patch committed in r...
by fireball@svn.reactos.org
Author: fireball Date: Mon Jul 22 13:28:56 2013 New Revision: 59553 URL:
http://svn.reactos.org/svn/reactos?rev=59553&view=rev
Log: [PING] - Alexander Yastrebov: Properly write data into the standard output device depending whether it's a char or a block device. CORE-6628 #resolve #comment Patch committed in revision 59552, thank you Alexander and sorry that it took so long! Modified: trunk/reactos/base/applications/network/ping/ping.c Modified: trunk/reactos/base/applications/network/ping/ping.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/ping/ping.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/ping/ping.c [iso-8859-1] Mon Jul 22 13:28:56 2013 @@ -143,10 +143,13 @@ va_list valist; WCHAR Buf[1024]; + CHAR AnsiBuf[1024]; LPWSTR pBuf = Buf; + PCHAR pAnsiBuf = AnsiBuf; LPWSTR Format; DWORD written; UINT DataLength; + int AnsiLength; va_start(valist, uID); @@ -169,7 +172,28 @@ return; } - WriteConsole(hStdOutput, pBuf, DataLength, &written, NULL); + if(GetFileType(hStdOutput) == FILE_TYPE_CHAR) + { + /* Is a console or a printer */ + WriteConsole(hStdOutput, pBuf, DataLength, &written, NULL); + } + else + { + /* Is a pipe, socket, file or other */ + AnsiLength = WideCharToMultiByte(CP_ACP, 0, pBuf, DataLength,\ + NULL, 0, NULL, NULL); + + if(AnsiLength >= sizeof(AnsiBuf)) + pAnsiBuf = (PCHAR)HeapAlloc(GetProcessHeap(), 0, AnsiLength); + + AnsiLength = WideCharToMultiByte(CP_OEMCP, 0, pBuf, DataLength,\ + pAnsiBuf, AnsiLength, " ", NULL); + + WriteFile(hStdOutput, pAnsiBuf, AnsiLength, &written, NULL); + + if(pAnsiBuf != AnsiBuf) + HeapFree(NULL, 0, pAnsiBuf); + } if(pBuf != Buf) LocalFree(pBuf);
11 years, 5 months
1
0
0
0
[fireball] 59552: [KMTESTS] - Beautify the source code a little. Also improve english in debug prints.
by fireball@svn.reactos.org
Author: fireball Date: Mon Jul 22 12:11:38 2013 New Revision: 59552 URL:
http://svn.reactos.org/svn/reactos?rev=59552&view=rev
Log: [KMTESTS] - Beautify the source code a little. Also improve english in debug prints. Modified: trunk/rostests/kmtests/ntos_ke/KeDevQueue.c Modified: trunk/rostests/kmtests/ntos_ke/KeDevQueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ke/KeDevQueu…
============================================================================== --- trunk/rostests/kmtests/ntos_ke/KeDevQueue.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ke/KeDevQueue.c [iso-8859-1] Mon Jul 22 12:11:38 2013 @@ -43,13 +43,13 @@ /* Check for properly setting up fields */ ok(!testing_queue->Busy, "(Initialize testing) Test 1:\tExpected 'not busy' status\n"); - DPRINT1("1 test complete\n"); + DPRINT1("Test 1 completed\n"); ok(testing_queue->Size == sizeof(KDEVICE_QUEUE), "(Initialize testing) Test 2:\tExpected another size for KDEVICE_QUEUE\n"); - DPRINT1("2 test complete\n"); + DPRINT1("Test 2 completed\n"); ok(testing_queue->Type == DeviceQueueObject, "(Initialize testing) Test 3:\tExpected type == DeviceQueueObject\n"); - DPRINT1("3 test complete\n"); + DPRINT1("Test 3 completed\n"); /* Make sure it does not write outside allocated buffer */ double_queue = ExAllocatePool(NonPagedPool, sizeof(KDEVICE_QUEUE) * 2); @@ -58,7 +58,7 @@ KeInitializeDeviceQueue(double_queue); ok(Check_mem((void*)((char*)double_queue + sizeof(KDEVICE_QUEUE)), NUMBER, sizeof(KDEVICE_QUEUE)), "(Initialize testing) Test 4:\tFunction uses someone else's memory \n"); - DPRINT1("4 test complete\n"); + DPRINT1("Test 4 completed\n"); //==================================================================== @@ -92,7 +92,7 @@ KeInsertDeviceQueue(testing_queue, element); ok(!element->Inserted, "Wrong 'Inserted' status\n"); - DPRINT1("1 test complete\n"); + DPRINT1("Test 1 completed\n"); /* Fill the queue*/ elem_array = ExAllocatePool(NonPagedPool, sizeof(PKDEVICE_QUEUE_ENTRY) * INSERT_COUNT); @@ -112,13 +112,13 @@ /* Check how the queue was filled */ next = &testing_queue->DeviceListHead; - DPRINT1("Arrow of tests starting\n"); + DPRINT1("Bunch of tests starting\n"); for (i = 0; i < INSERT_COUNT; i++) { next = next->Flink; key = CONTAINING_RECORD(next, KDEVICE_QUEUE_ENTRY, DeviceListEntry)->SortKey; ok(key == i, "Sort key was changed\n"); } - DPRINT1("Arrow of tests complete\n"); + DPRINT1("Bunch of tests completed\n"); trace("****************************************************\n\n"); DPRINT1("KeInsertDeviceQueue test finish\n"); @@ -146,7 +146,6 @@ trace("****************************************************\n\n"); DPRINT1("Finish KeRemoveDeviceQueue test\n"); -//==================================================================== trace("******* Testing KeRemoveEntryDeviceQueue *********** \n"); DPRINT1("\nStart KeRemoveEntryDeviceQueue test\n"); @@ -157,13 +156,13 @@ KeInsertDeviceQueue(testing_queue, elem_array[i]); } - //Delete half elements + /* Delete half of all elements in the queue */ DPRINT1("Deleting elements\n"); for (i = 0; i < INSERT_COUNT / 2; i++) { ok(KeRemoveEntryDeviceQueue(testing_queue, elem_array[i * 2 + 1]), "Element is not deleted\n"); } - //Checking queue + /* Checking queue */ DPRINT1("Checking\n"); next = &testing_queue->DeviceListHead; for (i = 0; i < INSERT_COUNT / 2 + 1; i++) { @@ -171,15 +170,14 @@ next = next->Flink; } - //Trying delete elements, which are not in this queue + /* Trying delete elements, which are not in this queue */ DPRINT1("Trying delete nonexistent elements\n"); for (i = 0; i < INSERT_COUNT / 2; i++) { ok(!KeRemoveEntryDeviceQueue(testing_queue, elem_array[i * 2 + 1]), "Wrong remove operation\n"); } trace("****************************************************\n\n"); -//Îñâîáîæäåíåè ïàìÿòè -//==================================================================== + /* Freeing memory */ for (i = 0; i < INSERT_COUNT; i++) { ExFreePool(elem_array[i]); }
11 years, 5 months
1
0
0
0
[hbelusca] 59551: [HAL] Update the PCI hardware IDs. Extracted from the pci.ids database from http://pciids.sourceforge.net/ from 2013.07.20 Maintained by Martin Mares <mj@ucw.cz> and other volunte...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Jul 21 23:03:04 2013 New Revision: 59551 URL:
http://svn.reactos.org/svn/reactos?rev=59551&view=rev
Log: [HAL] Update the PCI hardware IDs. Extracted from the pci.ids database from
http://pciids.sourceforge.net/
from 2013.07.20 Maintained by Martin Mares <mj(a)ucw.cz> and other volunteers from the PCI ID Project at
http://pci-ids.ucw.cz/
. Modified: trunk/reactos/hal/halx86/legacy/bus/pci_classes.ids trunk/reactos/hal/halx86/legacy/bus/pci_vendors.ids [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/hal/halx86/legacy/bus/pci_classes.ids URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bus/pci_…
Modified: trunk/reactos/hal/halx86/legacy/bus/pci_vendors.ids URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bus/pci_…
11 years, 5 months
1
0
0
0
[tkreuzer] 59550: [DIBLIB] Fix right-to-left SRCCOPY, silence a warning [WIN32K] Improve EngBitBlt and EndCopyBits to properly handle device managed surfaces and support RLE compression.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Jul 21 20:33:10 2013 New Revision: 59550 URL:
http://svn.reactos.org/svn/reactos?rev=59550&view=rev
Log: [DIBLIB] Fix right-to-left SRCCOPY, silence a warning [WIN32K] Improve EngBitBlt and EndCopyBits to properly handle device managed surfaces and support RLE compression. Modified: branches/dib_rewrite/win32ss/gdi/diblib/BitBlt_SRCCOPY.c branches/dib_rewrite/win32ss/gdi/diblib/DibLib.h branches/dib_rewrite/win32ss/gdi/eng/bitblt_new.c Modified: branches/dib_rewrite/win32ss/gdi/diblib/BitBlt_SRCCOPY.c URL:
http://svn.reactos.org/svn/reactos/branches/dib_rewrite/win32ss/gdi/diblib/…
============================================================================== --- branches/dib_rewrite/win32ss/gdi/diblib/BitBlt_SRCCOPY.c [iso-8859-1] (original) +++ branches/dib_rewrite/win32ss/gdi/diblib/BitBlt_SRCCOPY.c [iso-8859-1] Sun Jul 21 20:33:10 2013 @@ -24,13 +24,38 @@ } } +VOID +FASTCALL +Dib_BitBlt_SRCCOPY_EqSurfR2L(PBLTDATA pBltData) +{ + ULONG cLines, cjWidth; + PBYTE pjDestBase = pBltData->siDst.pjBase; + PBYTE pjSrcBase = pBltData->siSrc.pjBase; + + /* Calculate the width in bytes */ + cjWidth = pBltData->ulWidth * pBltData->siDst.jBpp / 8; + + pjDestBase -= (cjWidth - 1); + pjSrcBase -= (cjWidth - 1); + + /* Loop all lines */ + cLines = pBltData->ulHeight; + while (cLines--) + { + /* Use memmove to handle copying right-to-left with overlap */ + memmove(pjDestBase, pjSrcBase, cjWidth); + pjDestBase += pBltData->siDst.cjAdvanceY; + pjSrcBase += pBltData->siSrc.cjAdvanceY; + } +} + #define Dib_BitBlt_SRCCOPY_S8_D8_EqSurf Dib_BitBlt_SRCCOPY_EqSurf #define Dib_BitBlt_SRCCOPY_S16_D16_EqSurf Dib_BitBlt_SRCCOPY_EqSurf #define Dib_BitBlt_SRCCOPY_S24_D24_EqSurf Dib_BitBlt_SRCCOPY_EqSurf -#define Dib_BitBlt_SRCCOPY_S8_D8_EqSurfR2L Dib_BitBlt_SRCCOPY_EqSurf -#define Dib_BitBlt_SRCCOPY_S16_D16_EqSurfR2L Dib_BitBlt_SRCCOPY_EqSurf -#define Dib_BitBlt_SRCCOPY_S24_D24_EqSurfR2L Dib_BitBlt_SRCCOPY_EqSurf -#define Dib_BitBlt_SRCCOPY_S32_D32_EqSurfR2L Dib_BitBlt_SRCCOPY_EqSurf +#define Dib_BitBlt_SRCCOPY_S8_D8_EqSurfR2L Dib_BitBlt_SRCCOPY_EqSurfR2L +#define Dib_BitBlt_SRCCOPY_S16_D16_EqSurfR2L Dib_BitBlt_SRCCOPY_EqSurfR2L +#define Dib_BitBlt_SRCCOPY_S24_D24_EqSurfR2L Dib_BitBlt_SRCCOPY_EqSurfR2L +#define Dib_BitBlt_SRCCOPY_S32_D32_EqSurfR2L Dib_BitBlt_SRCCOPY_EqSurfR2L /* special movsd optimization on x86, only for left-to-right */ #if defined(_M_IX86) || defined(_M_AMD64) @@ -60,6 +85,7 @@ /* This definition will be checked against in DibLib_BitBlt.h for all "redirected" functions */ #define Dib_BitBlt_SRCCOPY_EqSurf_manual 1 +#define Dib_BitBlt_SRCCOPY_EqSurfR2L_manual 1 #define __USES_SOURCE 1 #define __USES_PATTERN 0 Modified: branches/dib_rewrite/win32ss/gdi/diblib/DibLib.h URL:
http://svn.reactos.org/svn/reactos/branches/dib_rewrite/win32ss/gdi/diblib/…
============================================================================== --- branches/dib_rewrite/win32ss/gdi/diblib/DibLib.h [iso-8859-1] (original) +++ branches/dib_rewrite/win32ss/gdi/diblib/DibLib.h [iso-8859-1] Sun Jul 21 20:33:10 2013 @@ -8,6 +8,7 @@ #include <stdarg.h> #include <windef.h> #include <wingdi.h> +#define _ENGINE_EXPORT_ #include <winddi.h> #ifdef _OPTIMIZE_DIBLIB Modified: branches/dib_rewrite/win32ss/gdi/eng/bitblt_new.c URL:
http://svn.reactos.org/svn/reactos/branches/dib_rewrite/win32ss/gdi/eng/bit…
============================================================================== --- branches/dib_rewrite/win32ss/gdi/eng/bitblt_new.c [iso-8859-1] (original) +++ branches/dib_rewrite/win32ss/gdi/eng/bitblt_new.c [iso-8859-1] Sun Jul 21 20:33:10 2013 @@ -14,6 +14,184 @@ }; #endif + +BOOL +APIENTRY +EngSrcBufferedBitBlt ( + _Inout_ SURFOBJ *psoTrg, + _In_ SURFOBJ *psoSrc, + _In_opt_ SURFOBJ *psoMask, + _In_opt_ CLIPOBJ *pco, + _In_opt_ XLATEOBJ *pxlo, + _In_ RECTL *prclTrg, + _When_(psoSrc, _In_) POINTL *pptlSrc, + _When_(psoMask, _In_) POINTL *pptlMask, + _In_opt_ BRUSHOBJ *pbo, + _When_(pbo, _In_) POINTL *pptlBrush, + _In_ ROP4 rop4) +{ + BOOL bResult; + PSURFACE psurfTmp; + SURFOBJ* psoTmp; + RECTL rclTmp; + ULONG iTmpBitmapFormat; + + /* Setup the target rect for the temp surface */ + rclTmp.left = 0; + rclTmp.top = 0; + rclTmp.right = prclTrg->right - prclTrg->left; + rclTmp.bottom = prclTrg->bottom - prclTrg->top; + + /* Get the bitmap format for the temp surface */ + iTmpBitmapFormat = psoSrc->iBitmapFormat; + if (iTmpBitmapFormat == BMF_4RLE) iTmpBitmapFormat = BMF_4BPP; + if (iTmpBitmapFormat == BMF_8RLE) iTmpBitmapFormat = BMF_8BPP; + + /* Allocate a surface */ + psurfTmp = SURFACE_AllocSurface(STYPE_BITMAP, + rclTmp.right, + rclTmp.bottom, + iTmpBitmapFormat, + 0, + 0, + NULL); + if (psurfTmp == NULL) + { + ERR("Failed to allocate a surface\n"); + return FALSE; + } + + psoTmp = &psurfTmp->SurfObj; + + /* Check if we have an RLE compressed source */ + if ((psoSrc->iBitmapFormat == BMF_4RLE) || + (psoSrc->iBitmapFormat == BMF_8RLE)) + { + SIZEL sizl; + + /* Decompress the bitmap */ + sizl.cx = rclTmp.right; + sizl.cy = rclTmp.bottom; + DecompressBitmap(sizl, + psoSrc->pvBits, + psoTmp->pvBits, + psoTmp->lDelta, + psoSrc->iBitmapFormat); + bResult = TRUE; + } + else if ((psoSrc->iBitmapFormat > BMF_8RLE)) + { + ERR("Bitmap format %d is not supported!\n", psoSrc->iBitmapFormat); + return FALSE; + } + else + { + /* Copy the bits to the temp surface */ + bResult = EngCopyBits(psoTmp, psoSrc, NULL, NULL, &rclTmp, pptlSrc); + } + + if (bResult) + { + /* Do the actual operation from the temp surface */ + bResult = IntEngBitBlt(psoTrg, + psoTmp, + psoMask, + pco, + pxlo, + prclTrg, + (PPOINTL)&rclTmp, + pptlMask, + pbo, + pptlBrush, + rop4); + } + + /* Delete the temp surface */ + GDIOBJ_vDeleteObject(&psurfTmp->BaseObject); + + return bResult; +} + +BOOL +APIENTRY +EngTrgBufferedBitBlt ( + _Inout_ SURFOBJ *psoTrg, + _In_opt_ SURFOBJ *psoSrc, + _In_opt_ SURFOBJ *psoMask, + _In_opt_ CLIPOBJ *pco, + _In_opt_ XLATEOBJ *pxlo, + _In_ RECTL *prclTrg, + _When_(psoSrc, _In_) POINTL *pptlSrc, + _When_(psoMask, _In_) POINTL *pptlMask, + _In_opt_ BRUSHOBJ *pbo, + _When_(pbo, _In_) POINTL *pptlBrush, + _In_ ROP4 rop4) +{ + BOOL bResult = TRUE; + PSURFACE psurfTmp; + SURFOBJ* psoTmp; + RECTL rclTmp; + ULONG iTmpBitmapFormat; + + /* Setup the target rect for the temp surface */ + rclTmp.left = 0; + rclTmp.top = 0; + rclTmp.right = prclTrg->right - prclTrg->left; + rclTmp.bottom = prclTrg->bottom - prclTrg->top; + + /* Get the bitmap format for the temp surface */ + iTmpBitmapFormat = psoTrg->iBitmapFormat; + + /* Allocate a surface */ + psurfTmp = SURFACE_AllocSurface(STYPE_BITMAP, + rclTmp.right, + rclTmp.bottom, + iTmpBitmapFormat, + 0, + 0, + NULL); + if (psurfTmp == NULL) + { + ERR("Failed to allocate a surface\n"); + return FALSE; + } + + psoTmp = &psurfTmp->SurfObj; + + /* Check if the ROP uses the target pixels */ + if (ROP4_USES_DEST(rop4)) + { + /* Copy the target bits to the target surface */ + bResult = EngCopyBits(psoTmp, psoSrc, NULL, NULL, &rclTmp, (PPOINTL)prclTrg); + } + + if (bResult) + { + /* Do the actual operation to the temp surface */ + bResult = IntEngBitBlt(psoTmp, + psoSrc, + psoMask, + pco, + pxlo, + &rclTmp, + pptlSrc, + pptlMask, + pbo, + pptlBrush, + rop4); + } + + if (bResult) + { + /* Copy the bits to the target surface */ + bResult = EngCopyBits(psoTrg, psoTmp, NULL, NULL, prclTrg, (PPOINTL)&rclTmp); + } + + /* Delete the temp surface */ + GDIOBJ_vDeleteObject(&psurfTmp->BaseObject); + + return bResult; +} static void @@ -98,7 +276,7 @@ BOOL APIENTRY -EngBitBlt( +EngBitBlt ( _Inout_ SURFOBJ *psoTrg, _In_opt_ SURFOBJ *psoSrc, _In_opt_ SURFOBJ *psoMask, @@ -112,37 +290,63 @@ _In_ ROP4 rop4) { BLTDATA bltdata; - ULONG i, iFunctionIndex, iDirection = CD_ANY; - RECTL rcTrg; + ULONG i, iFunctionIndex, iDirection; PFN_DIBFUNCTION pfnBitBlt; BOOL bEnumMore; RECT_ENUM rcenum; PSIZEL psizlPat; SURFOBJ *psoPattern; + PFN_DrvCopyBits pfnCopyBits; //static int count = 0; //if (++count >= 1230) __debugbreak(); /* Sanity checks */ - ASSERT(psoTrg); - ASSERT(psoTrg->iBitmapFormat >= BMF_1BPP); - ASSERT(psoTrg->iBitmapFormat <= BMF_32BPP); - ASSERT(prclTrg); - ASSERT(prclTrg->left >= 0); - ASSERT(prclTrg->top >= 0); - ASSERT(prclTrg->right <= psoTrg->sizlBitmap.cx); - ASSERT(prclTrg->bottom <= psoTrg->sizlBitmap.cy); + NT_ASSERT(psoTrg); + NT_ASSERT(psoTrg->iBitmapFormat >= BMF_1BPP); + NT_ASSERT(psoTrg->iBitmapFormat <= BMF_32BPP); + NT_ASSERT(prclTrg); + NT_ASSERT(prclTrg->left >= 0); + NT_ASSERT(prclTrg->top >= 0); + NT_ASSERT(prclTrg->right <= psoTrg->sizlBitmap.cx); + NT_ASSERT(prclTrg->bottom <= psoTrg->sizlBitmap.cy); ASSERT_DEVLOCK(psoTrg); ASSERT_DEVLOCK(psoSrc); ASSERT_DEVLOCK(psoMask); - rcTrg = *prclTrg; - + /* Check if the target is not a bitmap */ + if (psoTrg->iType != STYPE_BITMAP) + { + /* Check for special case SRCCOPY to device */ + if ((rop4 == ROP4_SRCCOPY) && + ((psoSrc->iType == STYPE_BITMAP) || (psoSrc->hdev == psoTrg->hdev))) + { + /* Use the driver's DrvCopyBits */ + pfnCopyBits = GDIDEVFUNCS(psoTrg).CopyBits; + return pfnCopyBits(psoTrg, psoSrc, pco, pxlo, prclTrg, pptlSrc); + } + + /* We need to do a buffered bitblt */ + return EngTrgBufferedBitBlt(psoTrg, + psoSrc, + psoMask, + pco, + pxlo, + prclTrg, + pptlSrc, + pptlMask, + pbo, + pptlBrush, + rop4); + } + + if (!pxlo) pxlo = &gexloTrivial.xlo; + + /* Initialize the BLTINFO structure */ bltdata.dy = 1; bltdata.rop4 = rop4; bltdata.apfnDoRop[0] = gapfnRop[ROP4_BKGND(rop4)]; bltdata.apfnDoRop[1] = gapfnRop[ROP4_FGND(rop4)]; - if (!pxlo) pxlo = &gexloTrivial.xlo; bltdata.pxlo = pxlo; bltdata.pfnXlate = XLATEOBJ_pfnXlate(pxlo); @@ -150,30 +354,61 @@ if (ROP4_USES_SOURCE(rop4)) { /* Sanity checks */ - ASSERT(psoSrc); - ASSERT(psoSrc->iBitmapFormat >= BMF_1BPP); - ASSERT(psoSrc->iBitmapFormat <= BMF_32BPP); - ASSERT(pptlSrc); - ASSERT(pptlSrc->x >= 0); - ASSERT(pptlSrc->y >= 0); - ASSERT(pptlSrc->x <= psoSrc->sizlBitmap.cx); - ASSERT(pptlSrc->y <= psoSrc->sizlBitmap.cy); - - /* Check if source and target are equal */ + NT_ASSERT(psoSrc); + NT_ASSERT(psoSrc->iBitmapFormat >= BMF_1BPP); + NT_ASSERT(psoSrc->iBitmapFormat <= BMF_8RLE); + NT_ASSERT(pptlSrc); + NT_ASSERT(pptlSrc->x >= 0); + NT_ASSERT(pptlSrc->y >= 0); + NT_ASSERT(pptlSrc->x <= psoSrc->sizlBitmap.cx); + NT_ASSERT(pptlSrc->y <= psoSrc->sizlBitmap.cy); + + /* Check for special case SRCCOPY from device */ + if ((rop4 == ROP4_SRCCOPY) && + (psoSrc->iType != STYPE_BITMAP) && + ((psoTrg->iType == STYPE_BITMAP) || (psoSrc->hdev == psoTrg->hdev))) + { + /* Use the driver's DrvCopyBits */ + pfnCopyBits = GDIDEVFUNCS(psoSrc).CopyBits; + return pfnCopyBits(psoTrg, psoSrc, pco, pxlo, prclTrg, pptlSrc); + } + + /* Check if the source is not a normal bitmap */ + if ((psoSrc->iType != STYPE_BITMAP) || + (psoSrc->iBitmapFormat > BMF_32BPP)) + { + /* We need to do a buffered bitblt */ + return EngSrcBufferedBitBlt(psoTrg, + psoSrc, + psoMask, + pco, + pxlo, + prclTrg, + pptlSrc, + pptlMask, + pbo, + pptlBrush, + rop4); + } + + /* Check if source and target surface are equal */ if (psoSrc == psoTrg) { /* Analyze the copying direction */ - if (rcTrg.top > pptlSrc->y) + if (prclTrg->top > pptlSrc->y) { /* Need to copy from bottom to top */ - iDirection = rcTrg.left < pptlSrc->x ? CD_RIGHTUP : CD_LEFTUP; + iDirection = prclTrg->left < pptlSrc->x ? CD_RIGHTUP : CD_LEFTUP; bltdata.dy = -1; } else - iDirection = rcTrg.left < pptlSrc->x ? CD_RIGHTDOWN : CD_LEFTDOWN; + { + /* We copy from top to bottom */ + iDirection = prclTrg->left < pptlSrc->x ? CD_RIGHTDOWN : CD_LEFTDOWN; + } /* Check for special right to left case */ - if ((rcTrg.top == pptlSrc->y) && (rcTrg.left > pptlSrc->x)) + if ((prclTrg->top == pptlSrc->y) && (prclTrg->left > pptlSrc->x)) { /* Use 0 as target format to get special right to left versions */ bltdata.siDst.iFormat = 0; @@ -189,11 +424,12 @@ } else { + iDirection = CD_ANY; bltdata.siDst.iFormat = psoTrg->iBitmapFormat; bltdata.siSrc.iFormat = psoSrc->iBitmapFormat; } - /* Set the source format info */ + /* Set the rest of the source format info */ bltdata.siSrc.pvScan0 = psoSrc->pvScan0; bltdata.siSrc.lDelta = psoSrc->lDelta; bltdata.siSrc.cjAdvanceY = bltdata.dy * psoSrc->lDelta; @@ -201,10 +437,11 @@ } else { + iDirection = CD_ANY; bltdata.siDst.iFormat = psoTrg->iBitmapFormat; } - /* Set the destination format info */ + /* Set the rest of the destination format info */ bltdata.siDst.pvScan0 = psoTrg->pvScan0; bltdata.siDst.lDelta = psoTrg->lDelta; bltdata.siDst.cjAdvanceY = bltdata.dy * psoTrg->lDelta; @@ -214,7 +451,7 @@ if (ROP4_USES_PATTERN(rop4)) { /* Must have a brush */ - ASSERT(pbo); // FIXME: test this! + NT_ASSERT(pbo); // FIXME: test this! /* Copy the solid color */ bltdata.ulSolidColor = pbo->iSolidColor; @@ -258,8 +495,8 @@ if (ROP4_USES_MASK(rop4)) { /* Must have a mask surface and point */ - ASSERT(psoMask); - ASSERT(pptlMask); + NT_ASSERT(psoMask); + NT_ASSERT(pptlMask); //__debugbreak(); @@ -307,7 +544,7 @@ else { /* Use the target rect */ - rcenum.arcl[0] = rcTrg; + rcenum.arcl[0] = *prclTrg; rcenum.c = 1; bEnumMore = FALSE; } @@ -319,7 +556,7 @@ for (i = 0; i < rcenum.c; i++) { /* Intersect this rect with the target rect */ - if (!RECTL_bIntersectRect(&rcenum.arcl[i], &rcenum.arcl[i], &rcTrg)) + if (!RECTL_bIntersectRect(&rcenum.arcl[i], &rcenum.arcl[i], prclTrg)) { /* This rect is outside the bounds, continue */ continue; @@ -396,11 +633,11 @@ //__debugbreak(); /* Sanity checks */ - ASSERT(IS_VALID_ROP4(rop4)); - ASSERT(psoTrg); - ASSERT(psoTrg->iBitmapFormat >= BMF_1BPP); - ASSERT(psoTrg->iBitmapFormat <= BMF_32BPP); - ASSERT(prclTrg); + NT_ASSERT(IS_VALID_ROP4(rop4)); + NT_ASSERT(psoTrg); + NT_ASSERT(psoTrg->iBitmapFormat >= BMF_1BPP); + NT_ASSERT(psoTrg->iBitmapFormat <= BMF_32BPP); + NT_ASSERT(prclTrg); /* Clip the target rect to the extents of the target surface */ rcClipped.left = max(prclTrg->left, 0); @@ -409,10 +646,11 @@ rcClipped.bottom = min(prclTrg->bottom, psoTrg->sizlBitmap.cy); /* If no clip object is given, use trivial one */ - if (!pco) pco = (CLIPOBJ*)&gxcoTrivial; - - /* Check if there is something to clip */ - if (pco->iDComplexity != DC_TRIVIAL) + if (pco == NULL) + pco = (CLIPOBJ*)&gxcoTrivial; + + /* Check if there is anything to clip */ + else if (pco->iDComplexity != DC_TRIVIAL) { /* Clip the target rect to the bounds of the clipping region */ if (!RECTL_bIntersectRect(&rcClipped, &rcClipped, &pco->rclBounds)) @@ -420,10 +658,11 @@ /* Nothing left */ return TRUE; } - } - - /* Don't pass a clip object with a single rectangle */ - if (pco->iDComplexity == DC_RECT) pco = (CLIPOBJ*)&gxcoTrivial; + + /* Don't pass a clip object with a single rectangle */ + if (pco->iDComplexity == DC_RECT) + pco = (CLIPOBJ*)&gxcoTrivial; + } /* Calculate initial offset and size */ ptOffset.x = rcClipped.left - prclTrg->left; @@ -435,8 +674,8 @@ if (ROP4_USES_SOURCE(rop4)) { /* Must have a source surface and point */ - ASSERT(psoSrc); - ASSERT(pptlSrc); + NT_ASSERT(psoSrc); + NT_ASSERT(pptlSrc); /* Get the source point */ ptSrc = *pptlSrc; @@ -455,8 +694,8 @@ if (ROP4_USES_MASK(rop4)) { /* Must have a mask surface and point */ - ASSERT(psoMask); - ASSERT(pptlMask); + NT_ASSERT(psoMask); + NT_ASSERT(pptlMask); /* Get the mask point */ ptMask = *pptlMask; @@ -503,7 +742,7 @@ (SURFOBJ_flags(psoSrc) & HOOK_BITBLT)) { ERR("Need to copy to standard bitmap format!\n"); - ASSERT(FALSE); + NT_ASSERT(FALSE); } pfnBitBlt = GDIDEVFUNCS(psoTrg).BitBlt; @@ -636,12 +875,33 @@ { PFN_DrvCopyBits pfnCopyBits; + /* Check if we have 2 incompatible non-bitmap surfaces */ + if ((psoSrc->iType != STYPE_BITMAP) && + (psoTrg->iType != STYPE_BITMAP) && + (psoSrc->hdev != psoTrg->hdev)) + { + /* We need to create a temp bitmap */ + return EngSrcBufferedBitBlt(psoTrg, + psoSrc, + NULL, + pco, + pxlo, + prclTrg, + pptlSrc, + NULL, + NULL, + NULL, + ROP4_SRCCOPY); + } + /* Is the target surface device managed? */ - if (SURFOBJ_flags(psoTrg) & HOOK_COPYBITS) + if ((psoTrg->iType != STYPE_BITMAP) || + (SURFOBJ_flags(psoTrg) & HOOK_COPYBITS)) { pfnCopyBits = GDIDEVFUNCS(psoTrg).CopyBits; } - if (SURFOBJ_flags(psoSrc) & HOOK_COPYBITS) + else if ((psoSrc->iType != STYPE_BITMAP) || + (SURFOBJ_flags(psoSrc) & HOOK_COPYBITS)) { pfnCopyBits = GDIDEVFUNCS(psoSrc).CopyBits; }
11 years, 5 months
1
0
0
0
[akhaldi] 59549: [LIBXSLT] * Silence some warnings.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 21 16:57:57 2013 New Revision: 59549 URL:
http://svn.reactos.org/svn/reactos?rev=59549&view=rev
Log: [LIBXSLT] * Silence some warnings. Modified: trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt Modified: trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libxslt/CMake…
============================================================================== --- trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt [iso-8859-1] Sun Jul 21 16:57:57 2013 @@ -47,6 +47,6 @@ add_cd_file(TARGET libxslt DESTINATION reactos/system32 FOR all) if(NOT MSVC) - add_target_compile_flags(libxslt "-Wno-pointer-sign") + add_target_compile_flags(libxslt "-Wno-pointer-sign -Wno-unused-but-set-variable -Wno-unused-function") allow_warnings(libxslt) endif()
11 years, 5 months
1
0
0
0
[pschweitzer] 59548: [CDMAKE] Use calloc instead of malloc + memset
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Jul 21 16:15:16 2013 New Revision: 59548 URL:
http://svn.reactos.org/svn/reactos?rev=59548&view=rev
Log: [CDMAKE] Use calloc instead of malloc + memset Modified: trunk/reactos/tools/cdmake/cdmake.c trunk/reactos/tools/cdmake/dirhash.c Modified: trunk/reactos/tools/cdmake/cdmake.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/cdmake.c?rev=…
============================================================================== --- trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] Sun Jul 21 16:15:16 2013 @@ -652,10 +652,9 @@ { PDIR_RECORD d; - d = malloc(sizeof(DIR_RECORD)); + d = calloc(1, sizeof(DIR_RECORD)); if (d == NULL) error_exit("Insufficient memory"); - memset ( d, 0, sizeof(DIR_RECORD) ); d->next_in_memory = root.next_in_memory; root.next_in_memory = d; @@ -687,10 +686,9 @@ char *n; */ - d = malloc(sizeof(DIR_RECORD)); + d = calloc(1, sizeof(DIR_RECORD)); if (d == NULL) error_exit("Insufficient memory"); - memset ( d, 0, sizeof(DIR_RECORD) ); d->next_in_memory = root.next_in_memory; root.next_in_memory = d; @@ -1071,8 +1069,7 @@ new_empty_dirrecord(PDIR_RECORD d, BOOL directory) { PDIR_RECORD new_d; - new_d = malloc(sizeof(*new_d)); - memset(new_d, 0, sizeof(*new_d)); + new_d = calloc(1, sizeof(*new_d)); new_d->parent = d; new_d->level = d->level + 1; new_d->next_in_directory = d->first_record; Modified: trunk/reactos/tools/cdmake/dirhash.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.c?rev…
============================================================================== --- trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] Sun Jul 21 16:15:16 2013 @@ -111,8 +111,7 @@ free(parentname); free(parentcase); hashcode = djb_hash(targetnorm); - de = malloc(sizeof(*de)); - memset(de, 0, sizeof(*de)); + de = calloc(1, sizeof(*de)); de->parent = parent_de; de->normalized_name = strdup(targetnorm); de->case_name = strdup(chop_filename(casename)); @@ -139,8 +138,7 @@ targetnorm = strdup(targetdir); normalize_dirname(targetnorm); de = dir_hash_create_dir(dh, targetdir, targetnorm); - tf = malloc(sizeof(*tf)); - memset(tf, 0, sizeof(*tf)); + tf = calloc(1, sizeof(*tf)); tf->next = de->head; de->head = tf; tf->source_name = strdup(source);
11 years, 5 months
1
0
0
0
[akhaldi] 59547: * Improve the way we create bootcd, livecd and bootcdregtest. The effort results in ~28% *smaller* build folder, and *much* faster generation of the ISOs. [CDMAKE] * Introduce a wa...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 21 13:33:03 2013 New Revision: 59547 URL:
http://svn.reactos.org/svn/reactos?rev=59547&view=rev
Log: * Improve the way we create bootcd, livecd and bootcdregtest. The effort results in ~28% *smaller* build folder, and *much* faster generation of the ISOs. [CDMAKE] * Introduce a way to create an iso using a file map instead of the current on-disk layout. This allows us to massively reduce the IO and the disk space needed to perform the creation of the 3 ISOs, and at the same time speed up the process. Brought to you by Art Yerkes (arty) with review/bug fix by Thomas Faber. [CMAKE] * Leverage the newly introduced cdmake feature. * Silence cdmake verbosity. * Write the contents of the file lists at once, instead of appending to it one item by one. [VGAFONTS] * Don't include the cab file twice. Added: trunk/reactos/tools/cdmake/dirhash.c (with props) trunk/reactos/tools/cdmake/dirhash.h (with props) trunk/reactos/tools/cdmake/dirsep.h (with props) Modified: trunk/reactos/CMakeLists.txt trunk/reactos/boot/CMakeLists.txt trunk/reactos/cmake/CMakeMacros.cmake trunk/reactos/media/vgafonts/CMakeLists.txt trunk/reactos/tools/cdmake/CMakeLists.txt trunk/reactos/tools/cdmake/cdmake.c Modified: trunk/reactos/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=59547&r…
============================================================================== --- trunk/reactos/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/CMakeLists.txt [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -235,6 +235,9 @@ add_subdirectory(subsystems) add_subdirectory(win32ss) + # Create {bootcd, livecd, bootcdregtest}.lst + create_iso_lists() + file(MAKE_DIRECTORY ${REACTOS_BINARY_DIR}/include/reactos) add_dependency_footer() Modified: trunk/reactos/boot/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/CMakeLists.txt?rev=59…
============================================================================== --- trunk/reactos/boot/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/CMakeLists.txt [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -1,50 +1,27 @@ ##bootcd #clear it out -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcd.cmake - "file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bootcd)\n") +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcd.lst "") add_custom_target(bootcd - ${CMAKE_COMMAND} -D CD_DIR=${CMAKE_CURRENT_BINARY_DIR}/bootcd - -P ${CMAKE_CURRENT_BINARY_DIR}/bootcd.cmake - COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin ${CMAKE_CURRENT_BINARY_DIR}/bootcd REACTOS ${REACTOS_BINARY_DIR}/bootcd.iso + COMMAND native-cdmake -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin @${CMAKE_CURRENT_BINARY_DIR}/bootcd.lst REACTOS ${REACTOS_BINARY_DIR}/bootcd.iso DEPENDS native-cdmake VERBATIM) - + ##bootcdregtest #clear it out -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.cmake - "file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest)\n") +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.lst "") add_custom_target(bootcdregtest - ${CMAKE_COMMAND} -D CD_DIR=${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest - -P ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.cmake - COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isobtrt.bin ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest REACTOS ${REACTOS_BINARY_DIR}/bootcdregtest.iso + COMMAND native-cdmake -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isobtrt.bin @${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.lst REACTOS ${REACTOS_BINARY_DIR}/bootcdregtest.iso DEPENDS native-cdmake VERBATIM) - ##livecd -#clear it out -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake - "file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/livecd)\n") -#create profiles directories too -file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake - "file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles)\n") -file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake - "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/All Users\")\n") -file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake - "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/All Users/Desktop\")\n") -file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake - "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/Default User\")\n") -file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake - "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/Default User/Desktop\")\n") -file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake - "file(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/livecd/Profiles/Default User/My Documents\")\n") +#clear it out and create the empty Desktop folder +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.lst "Profiles/Default User/Desktop\n") add_custom_target(livecd - ${CMAKE_COMMAND} -D CD_DIR=${CMAKE_CURRENT_BINARY_DIR}/livecd - -P ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake - COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin ${CMAKE_CURRENT_BINARY_DIR}/livecd REACTOS ${REACTOS_BINARY_DIR}/livecd.iso + COMMAND native-cdmake -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin @${CMAKE_CURRENT_BINARY_DIR}/livecd.lst REACTOS ${REACTOS_BINARY_DIR}/livecd.iso DEPENDS native-cdmake VERBATIM) Modified: trunk/reactos/cmake/CMakeMacros.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
============================================================================== --- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -227,13 +227,14 @@ if(_CD_NO_CAB) #directly on cd foreach(item ${_CD_FILE}) - file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.cmake "file(COPY \"${item}\" DESTINATION \"\${CD_DIR}/${_CD_DESTINATION}\")\n") + if(_CD_NAME_ON_CD) + #rename it in the cd tree + set(__file ${_CD_NAME_ON_CD}) + else() + get_filename_component(__file ${item} NAME) + endif() + set_property(GLOBAL APPEND PROPERTY BOOTCD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}") endforeach() - if(_CD_NAME_ON_CD) - get_filename_component(__file ${_CD_FILE} NAME) - #rename it in the cd tree - file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.cmake "file(RENAME \${CD_DIR}/${_CD_DESTINATION}/${__file} \${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n") - endif() if(_CD_TARGET) #manage dependency add_dependencies(bootcd ${_CD_TARGET}) @@ -259,13 +260,14 @@ add_dependencies(livecd ${_CD_TARGET}) endif() foreach(item ${_CD_FILE}) - file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.cmake "file(COPY \"${item}\" DESTINATION \"\${CD_DIR}/${_CD_DESTINATION}\")\n") + if(_CD_NAME_ON_CD) + #rename it in the cd tree + set(__file ${_CD_NAME_ON_CD}) + else() + get_filename_component(__file ${item} NAME) + endif() + set_property(GLOBAL APPEND PROPERTY LIVECD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}") endforeach() - if(_CD_NAME_ON_CD) - get_filename_component(__file ${_CD_FILE} NAME) - #rename it in the cd tree - file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.cmake "file(RENAME \${CD_DIR}/${_CD_DESTINATION}/${__file} \${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n") - endif() endif() #end livecd #do we add it to regtest? @@ -275,13 +277,14 @@ if(_CD_NO_CAB) #directly on cd foreach(item ${_CD_FILE}) - file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcdregtest.cmake "file(COPY \"${item}\" DESTINATION \"\${CD_DIR}/${_CD_DESTINATION}\")\n") + if(_CD_NAME_ON_CD) + #rename it in the cd tree + set(__file ${_CD_NAME_ON_CD}) + else() + get_filename_component(__file ${item} NAME) + endif() + set_property(GLOBAL APPEND PROPERTY BOOTCDREGTEST_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}") endforeach() - if(_CD_NAME_ON_CD) - get_filename_component(__file ${_CD_FILE} NAME) - #rename it in the cd tree - file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcdregtest.cmake "file(RENAME \${CD_DIR}/${_CD_DESTINATION}/${__file} \${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n") - endif() if(_CD_TARGET) #manage dependency add_dependencies(bootcdregtest ${_CD_TARGET}) @@ -296,6 +299,23 @@ #endif() endif() endif() #end bootcd +endfunction() + +function(create_iso_lists) + get_property(_filelist GLOBAL PROPERTY BOOTCD_FILE_LIST) + string(REPLACE ";" "\n" _filelist "${_filelist}") + file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.lst "${_filelist}") + unset(_filelist) + + get_property(_filelist GLOBAL PROPERTY LIVECD_FILE_LIST) + string(REPLACE ";" "\n" _filelist "${_filelist}") + file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.lst "${_filelist}") + unset(_filelist) + + get_property(_filelist GLOBAL PROPERTY BOOTCDREGTEST_FILE_LIST) + string(REPLACE ";" "\n" _filelist "${_filelist}") + file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcdregtest.lst "${_filelist}") + unset(_filelist) endfunction() # Create module_clean targets Modified: trunk/reactos/media/vgafonts/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/vgafonts/CMakeLists.…
============================================================================== --- trunk/reactos/media/vgafonts/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/media/vgafonts/CMakeLists.txt [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -18,4 +18,3 @@ add_custom_target(vgafonts DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vgafonts.cab) add_cd_file(TARGET vgafonts FILE ${CMAKE_CURRENT_BINARY_DIR}/vgafonts.cab DESTINATION reactos NO_CAB FOR all) -add_cd_file(TARGET vgafonts FILE ${CMAKE_CURRENT_BINARY_DIR}/vgafonts.cab DESTINATION reactos FOR all) Modified: trunk/reactos/tools/cdmake/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/CMakeLists.tx…
============================================================================== --- trunk/reactos/tools/cdmake/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/CMakeLists.txt [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -1,2 +1,2 @@ +add_executable(cdmake cdmake.c dirhash.c llmosrt.c) -add_executable(cdmake cdmake.c llmosrt.c) Modified: trunk/reactos/tools/cdmake/cdmake.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/cdmake.c?rev=…
============================================================================== --- trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -33,8 +33,13 @@ #include <stdlib.h> #include <string.h> #ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN +# include <windows.h> # include <io.h> # include <dos.h> +# ifdef _MSC_VER +# define R_OK 4 +# endif #else # if defined(__FreeBSD__) || defined(__APPLE__) # include <sys/uio.h> @@ -45,28 +50,19 @@ # include <sys/types.h> # include <dirent.h> # include <unistd.h> +# define TRUE 1 +# define FALSE 0 #endif // _WIN32 #include <ctype.h> #include <setjmp.h> #include <time.h> -#ifndef _WIN32 -#ifndef MAX_PATH -#define MAX_PATH 260 -#endif -#define DIR_SEPARATOR_CHAR '/' -#define DIR_SEPARATOR_STRING "/" -#else -#define DIR_SEPARATOR_CHAR '\\' -#define DIR_SEPARATOR_STRING "\\" -#endif +#include "dirsep.h" +#include "dirhash.h" typedef unsigned char BYTE; typedef unsigned short WORD; typedef unsigned long DWORD; typedef int BOOL; - -const BOOL TRUE = 1; -const BOOL FALSE = 0; // file system parameters @@ -115,6 +111,7 @@ char extension[MAX_EXTENSION_LENGTH+1]; char extension_on_cd[MAX_CDEXTENSION_LENGTH+1]; char *joliet_name; + const char *orig_name; DATE_AND_TIME date_and_time; DWORD sector; DWORD size; @@ -172,6 +169,8 @@ DWORD joliet_path_table_size; DWORD joliet_little_endian_path_table_sector; DWORD joliet_big_endian_path_table_sector; + +struct target_dir_hash specified_files; /*----------------------------------------------------------------------------- This function edits a 32-bit unsigned number into a comma-delimited form, such @@ -1067,6 +1066,159 @@ } #endif + +static PDIR_RECORD +new_empty_dirrecord(PDIR_RECORD d, BOOL directory) +{ + PDIR_RECORD new_d; + new_d = malloc(sizeof(*new_d)); + memset(new_d, 0, sizeof(*new_d)); + new_d->parent = d; + new_d->level = d->level + 1; + new_d->next_in_directory = d->first_record; + d->first_record = new_d; + new_d->next_in_memory = root.next_in_memory; + root.next_in_memory = new_d; + if (directory) + { + new_d->flags |= DIRECTORY_FLAG; + new_d->next_in_path_table = root.next_in_path_table; + root.next_in_path_table = new_d; + } + return new_d; +} + +#if _WIN32 +static int +get_cd_file_time(HANDLE handle, DATE_AND_TIME *cd_time_info) +{ + FILETIME file_time; + SYSTEMTIME sys_time; + if (!GetFileTime(handle, NULL, NULL, &file_time)) + { + return -1; + } + FileTimeToSystemTime(&file_time, &sys_time); + memset(cd_time_info, 0, sizeof(*cd_time_info)); + cd_time_info->year = sys_time.wYear; + cd_time_info->month = sys_time.wMonth - 1; + cd_time_info->day = sys_time.wDay; + cd_time_info->hour = sys_time.wHour; + cd_time_info->minute = sys_time.wMinute; + cd_time_info->second = sys_time.wSecond; + return 0; +} +#endif + +static void +scan_specified_files(PDIR_RECORD d, struct target_dir_entry *dir) +{ + PDIR_RECORD new_d; +#if _WIN32 + HANDLE open_file; + LARGE_INTEGER file_size; +#else + struct stat stbuf; +#endif + struct target_file *file; + struct target_dir_entry *child; + + d->first_record = NULL; + + for (file = dir->head; file; file = file->next) + { + if (strcmp(file->target_name, DIRECTORY_TIMESTAMP) == 0) + { +#if _WIN32 + if ((open_file = CreateFileA(file->source_name, + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL)) == INVALID_HANDLE_VALUE) + { + error_exit("Can't open timestamp file %s\n", file->source_name); + } + + if (get_cd_file_time(open_file, &d->date_and_time) == -1) + { + error_exit("Can't stat timestamp file %s\n", file->source_name); + } + CloseHandle(open_file); +#else + if (stat(file->target_name, &stbuf) == -1) + { + error_exit("Can't stat timestamp file %s\n", file->source_name); + } + convert_date_and_time(&d->date_and_time, &stbuf.st_ctime); +#endif + } + else + { + if (verbosity == VERBOSE) + { + printf("%d: file %s (from %s)\n", + d->level, + file->target_name, + file->source_name); + } + new_d = new_empty_dirrecord(d, FALSE); + parse_filename_into_dirrecord(file->target_name, new_d, FALSE); +#if _WIN32 + if ((open_file = CreateFileA(file->source_name, + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL)) == INVALID_HANDLE_VALUE) + { + error_exit("Can't open file %s\n", file->source_name); + } + if (get_cd_file_time(open_file, &new_d->date_and_time) == -1) + { + error_exit("Can't stat file %s\n", file->source_name); + } + if (!GetFileSizeEx(open_file, &file_size)) + { + error_exit("Can't get file size of %s\n", file->source_name); + } + new_d->size = new_d->joliet_size = file_size.QuadPart; + new_d->orig_name = file->source_name; + CloseHandle(open_file); +#else + if (stat(file->source_name, &stbuf) == -1) + { + error_exit("Can't find '%s' (target %s)\n", + file->source_name, + file->target_name); + } + convert_date_and_time(&new_d->date_and_time, &stbuf.st_mtime); + new_d->size = new_d->joliet_size = stbuf.st_size; + new_d->orig_name = file->source_name; +#endif + } + } + + for (child = dir->child; child; child = child->next) + { + if (verbosity == VERBOSE) + { + printf("%d: directory %s\n", d->level, child->case_name); + } + new_d = new_empty_dirrecord(d, TRUE); + parse_filename_into_dirrecord(child->case_name, new_d, TRUE); + scan_specified_files(new_d, child); + } + + /* sort directory */ + d->first_record = sort_linked_list(d->first_record, + 0, + compare_directory_order); + source[0] = 0; + end_source = source; +} /*----------------------------------------------------------------------------- This function loads the file specifications for the file or directory @@ -1455,14 +1607,23 @@ } else { + const char *file_source; old_end_source = end_source; - get_file_specifications(q); - *end_source = 0; + if (!q->orig_name) + { + get_file_specifications(q); + *end_source = 0; + file_source = source; + } + else + { + file_source = q->orig_name; + } if (verbosity == VERBOSE) - printf("Writing %s\n", source); - file = fopen(source, "rb"); + printf("Writing contents of %s\n", file_source); + file = fopen(file_source, "rb"); if (file == NULL) - error_exit("Can't open %s\n", source); + error_exit("Can't open %s\n", file_source); fseek(file, 0, SEEK_SET); while (size > 0) { @@ -1472,7 +1633,7 @@ if (fread (cd.buffer + cd.count, n, 1, file) < 1) { fclose(file); - error_exit("Read error in file %s\n", source); + error_exit("Read error in file %s\n", file_source); } cd.count += n; if (cd.count == BUFFER_SIZE) @@ -1626,23 +1787,71 @@ if (cd.filespecs[0] == 0) error_exit("Missing image file specifications"); - - // set source[] and end_source to source directory, with a terminating directory separator - - end_source = source + strlen(source); - if (end_source[-1] == ':') - *end_source++ = '.'; - if (end_source[-1] != DIR_SEPARATOR_CHAR) - *end_source++ = DIR_SEPARATOR_CHAR; - - // scan all files and create directory structure in memory - - make_directory_records(&root); - - // sort path table entries - - root.next_in_path_table = sort_linked_list(root.next_in_path_table, 1, - compare_path_table_order); + if (source[0] != '@') + { + /* set source[] and end_source to source directory, + * with a terminating directory separator */ + end_source = source + strlen(source); + if (end_source[-1] == ':') + *end_source++ = '.'; + if (end_source[-1] != DIR_SEPARATOR_CHAR) + *end_source++ = DIR_SEPARATOR_CHAR; + + /* scan all files and create directory structure in memory */ + make_directory_records(&root); + } + else + { + char *trimmedline, *targetname, *srcname, *eq; + char lineread[1024]; + FILE *f = fopen(source+1, "r"); + if (!f) + { + error_exit("Can't open cd description %s\n", source+1); + } + while (fgets(lineread, sizeof(lineread), f)) + { + /* We treat these characters as line endings */ + trimmedline = strtok(lineread, "\t\r\n;"); + eq = strchr(trimmedline, '='); + if (!eq) + { + char *normdir; + /* Treat this as a directory name */ + targetname = trimmedline; + normdir = strdup(targetname); + normalize_dirname(normdir); + dir_hash_create_dir(&specified_files, targetname, normdir); + free(normdir); + } + else + { + targetname = strtok(lineread, "="); + srcname = strtok(NULL, ""); + +#if _WIN32 + if (_access(srcname, R_OK) == 0) + dir_hash_add_file(&specified_files, srcname, targetname); + else + error_exit("can't access file '%s' (target %s)\n", srcname, targetname); +#else + if (access(srcname, R_OK) == 0) + dir_hash_add_file(&specified_files, srcname, targetname); + else + error_exit("can't access file '%s' (target %s)\n", srcname, targetname); +#endif + } + } + fclose(f); + + /* scan all files and create directory structure in memory */ + scan_specified_files(&root, &specified_files.root); + } + + /* sort path table entries */ + root.next_in_path_table = sort_linked_list(root.next_in_path_table, + 1, + compare_path_table_order); // initialize CD-ROM write buffer @@ -1704,9 +1913,9 @@ if (verbosity >= NORMAL) puts("CD-ROM image made successfully"); + dir_hash_destroy(&specified_files); release_memory(); return 0; } - /* EOF */ Added: trunk/reactos/tools/cdmake/dirhash.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.c?rev…
============================================================================== --- trunk/reactos/tools/cdmake/dirhash.c (added) +++ trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -0,0 +1,205 @@ +#include <string.h> +#include <malloc.h> +#include "dirsep.h" +#include "dirhash.h" + +/* This is the famous DJB hash */ +static unsigned int +djb_hash(const char *name) +{ + unsigned int val = 5381; + int i = 0; + + for (i = 0; name[i]; i++) + { + val = (33 * val) + name[i]; + } + + return val; +} + +static const char * +chop_filename(const char *target) +{ + char *last_slash = strrchr(target, '/'); + if (!last_slash) + last_slash = strrchr(target, '\\'); + if (last_slash) + return last_slash + 1; + else + return target; +} + +static void +chop_dirname(const char *name, char **dirname) +{ + char *last_slash = strrchr(name, '/'); + if (!last_slash) + last_slash = strrchr(name, '\\'); + if (!last_slash) + { + free(*dirname); + *dirname = malloc(1); + **dirname = 0; + } + else + { + char *newdata = malloc(last_slash - name + 1); + memcpy(newdata, name, last_slash - name); + newdata[last_slash - name] = 0; + free(*dirname); + *dirname = newdata; + } +} + +static struct target_dir_entry * +get_entry_by_normname(struct target_dir_hash *dh, const char *norm) +{ + unsigned int hashcode; + struct target_dir_entry *de; + hashcode = djb_hash(norm); + de = dh->buckets[hashcode % NUM_DIR_HASH_BUCKETS]; + while (de && strcmp(de->normalized_name, norm)) + de = de->next; + return de; +} + +void normalize_dirname(char *filename) +{ + int i, tgt; + int slash = 1; + + for (i = 0, tgt = 0; filename[i]; i++) { + if (slash) { + if (filename[i] != '/' && filename[i] != '\\') { + filename[tgt++] = toupper(filename[i]); + slash = 0; + } + } else { + if (filename[i] == '/' || filename[i] == '\\') { + slash = 1; + filename[tgt++] = DIR_SEPARATOR_CHAR; + } else { + filename[tgt++] = toupper(filename[i]); + } + } + } + filename[tgt] = 0; +} + +struct target_dir_entry * +dir_hash_create_dir(struct target_dir_hash *dh, const char *casename, const char *targetnorm) +{ + unsigned int hashcode; + struct target_dir_entry *de, *parent_de; + char *parentname = NULL; + char *parentcase = NULL; + struct target_dir_entry **ent; + if (!dh->root.normalized_name) + { + dh->root.normalized_name = strdup(""); + dh->root.case_name = strdup(""); + hashcode = djb_hash(""); + dh->buckets[hashcode % NUM_DIR_HASH_BUCKETS] = &dh->root; + } + de = get_entry_by_normname(dh, targetnorm); + if (de) + return de; + chop_dirname(targetnorm, &parentname); + chop_dirname(casename, &parentcase); + parent_de = dir_hash_create_dir(dh, parentcase, parentname); + free(parentname); + free(parentcase); + hashcode = djb_hash(targetnorm); + de = malloc(sizeof(*de)); + memset(de, 0, sizeof(*de)); + de->parent = parent_de; + de->normalized_name = strdup(targetnorm); + de->case_name = strdup(chop_filename(casename)); + de->next = parent_de->child; + parent_de->child = de; + ent = &dh->buckets[hashcode % NUM_DIR_HASH_BUCKETS]; + while ((*ent)) + { + ent = &(*ent)->next; + } + *ent = de; + return de; +} + +void dir_hash_add_file(struct target_dir_hash *dh, const char *source, const char *target) +{ + unsigned int hashcode; + struct target_file *tf; + struct target_dir_entry *de; + const char *filename = chop_filename(target); + char *targetdir = NULL; + char *targetnorm; + chop_dirname(target, &targetdir); + targetnorm = strdup(targetdir); + normalize_dirname(targetnorm); + de = dir_hash_create_dir(dh, targetdir, targetnorm); + tf = malloc(sizeof(*tf)); + memset(tf, 0, sizeof(*tf)); + tf->next = de->head; + de->head = tf; + tf->source_name = strdup(source); + tf->target_name = strdup(filename); +} + +struct target_dir_entry * +dir_hash_next_dir(struct target_dir_hash *dh, struct target_dir_traversal *t) +{ + if (t->i == -1) + return NULL; + if (!t->it) + { + while (++t->i != NUM_DIR_HASH_BUCKETS) + { + if (dh->buckets[t->i]) + { + t->it = dh->buckets[t->i]; + return t->it; + } + } + t->i = -1; + return NULL; + } + else + { + t->it = t->it->next; + if (!t->it) + { + t->i = -1; + return NULL; + } + else + return t->it; + } +} + +void dir_hash_destroy_dir(struct target_dir_entry *de) +{ + struct target_file *tf; + struct target_dir_entry *te; + while ((te = de->child)) + { + de->child = te->next; + dir_hash_destroy_dir(te); + free(te); + } + while ((tf = de->head)) + { + de->head = tf->next; + free(tf->source_name); + free(tf->target_name); + free(tf); + } + free(de->normalized_name); + free(de->case_name); +} + +void dir_hash_destroy(struct target_dir_hash *dh) +{ + dir_hash_destroy_dir(&dh->root); +} Propchange: trunk/reactos/tools/cdmake/dirhash.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/tools/cdmake/dirhash.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.h?rev…
============================================================================== --- trunk/reactos/tools/cdmake/dirhash.h (added) +++ trunk/reactos/tools/cdmake/dirhash.h [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -0,0 +1,38 @@ +#ifndef _REACTOS_TOOLS_CDMAKE_DIRHASH_H_ +#define _REACTOS_TOOLS_CDMAKE_DIRHASH_H_ + +#define NUM_DIR_HASH_BUCKETS 1024 + +struct target_file { + struct target_file *next; + char *source_name; + char *target_name; +}; + +struct target_dir_entry { + struct target_dir_entry *next; + struct target_dir_entry *parent; + struct target_dir_entry *child; + struct target_file *head; + char *normalized_name; + char *case_name; +}; + +struct target_dir_hash { + struct target_dir_entry *buckets[NUM_DIR_HASH_BUCKETS]; + struct target_dir_entry root; +}; + +struct target_dir_traversal { + struct target_dir_entry *it; + int i; +}; + +void normalize_dirname(char *filename); +void dir_hash_add_file(struct target_dir_hash *dh, const char *source, const char *target); +struct target_dir_entry * +dir_hash_create_dir(struct target_dir_hash *dh, const char *casename, const char *targetnorm); +struct target_dir_entry *dir_hash_next_dir(struct target_dir_hash *dh, struct target_dir_traversal *t); +void dir_hash_destroy(struct target_dir_hash *dh); + +#endif//_REACTOS_TOOLS_CDMAKE_DIRHASH_H_ Propchange: trunk/reactos/tools/cdmake/dirhash.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/tools/cdmake/dirsep.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirsep.h?rev=…
============================================================================== --- trunk/reactos/tools/cdmake/dirsep.h (added) +++ trunk/reactos/tools/cdmake/dirsep.h [iso-8859-1] Sun Jul 21 13:33:03 2013 @@ -0,0 +1,10 @@ +#ifndef _WIN32 +#ifndef MAX_PATH +#define MAX_PATH 260 +#endif +#define DIR_SEPARATOR_CHAR '/' +#define DIR_SEPARATOR_STRING "/" +#else +#define DIR_SEPARATOR_CHAR '\\' +#define DIR_SEPARATOR_STRING "\\" +#endif Propchange: trunk/reactos/tools/cdmake/dirsep.h ------------------------------------------------------------------------------ svn:eol-style = native
11 years, 5 months
1
0
0
0
[tfaber] 59546: [KMTESTS:SE] - Remove broken prototypes
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jul 20 19:40:32 2013 New Revision: 59546 URL:
http://svn.reactos.org/svn/reactos?rev=59546&view=rev
Log: [KMTESTS:SE] - Remove broken prototypes Modified: trunk/rostests/kmtests/ntos_se/SeQueryInfoToken.c Modified: trunk/rostests/kmtests/ntos_se/SeQueryInfoToken.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_se/SeQueryIn…
============================================================================== --- trunk/rostests/kmtests/ntos_se/SeQueryInfoToken.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_se/SeQueryInfoToken.c [iso-8859-1] Sat Jul 20 19:40:32 2013 @@ -12,21 +12,6 @@ #define NDEBUG #include <debug.h> - -//------------------------------------------------------------------------------// -// Functions required forWorking with ACCESS_STATE structure // -//------------------------------------------------------------------------------// - -NTKERNELAPI NTSTATUS NTAPI SeCreateAccessState( - PACCESS_STATE AccessState, - PVOID AuxData, - ACCESS_MASK DesiredAccess, - PGENERIC_MAPPING Mapping - ); - -NTKERNELAPI VOID NTAPI SeDeleteAccessState( - PACCESS_STATE AccessState - ); //------------------------------------------------------------------------------// // Testing Functions //
11 years, 5 months
1
0
0
0
[tfaber] 59545: [KMTEST] - Fix platform includes
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jul 20 19:36:41 2013 New Revision: 59545 URL:
http://svn.reactos.org/svn/reactos?rev=59545&view=rev
Log: [KMTEST] - Fix platform includes Modified: trunk/rostests/kmtests/include/kmt_platform.h Modified: trunk/rostests/kmtests/include/kmt_platform.h URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/include/kmt_platf…
============================================================================== --- trunk/rostests/kmtests/include/kmt_platform.h [iso-8859-1] (original) +++ trunk/rostests/kmtests/include/kmt_platform.h [iso-8859-1] Sat Jul 20 19:36:41 2013 @@ -21,8 +21,9 @@ #include <ntifs.h> #include <ndk/exfuncs.h> #include <ndk/kefuncs.h> +#include <ndk/mmfuncs.h> #include <ndk/obfuncs.h> -#include <ndk/mmfuncs.h> +#include <ndk/sefuncs.h> #include <ntstrsafe.h> #elif defined KMT_USER_MODE @@ -30,7 +31,10 @@ #define UNICODE #include <windef.h> #include <winbase.h> +#include <winreg.h> #include <winsvc.h> +#include <ndk/cmfuncs.h> +#include <ndk/obfuncs.h> #include <ndk/rtlfuncs.h> #include <ndk/mmfuncs.h> #include <strsafe.h>
11 years, 5 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
20
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Results per page:
10
25
50
100
200