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 2009
----- 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
21 participants
654 discussions
Start a n
N
ew thread
[cgutman] 42354: - Copy the datagram data to all matching receive requests instead of just the first one we find - Fix (completely broken) datagram truncation
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 3 01:17:39 2009 New Revision: 42354 URL:
http://svn.reactos.org/svn/reactos?rev=42354&view=rev
Log: - Copy the datagram data to all matching receive requests instead of just the first one we find - Fix (completely broken) datagram truncation Modified: trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c Modified: trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/d…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] Mon Aug 3 01:17:39 2009 @@ -95,67 +95,56 @@ { PLIST_ENTRY CurrentEntry; PDATAGRAM_RECEIVE_REQUEST Current = NULL; - BOOLEAN Found; PTA_IP_ADDRESS RTAIPAddress; TI_DbgPrint(MAX_TRACE, ("There is a receive request.\n")); /* Search receive request list to find a match */ - Found = FALSE; CurrentEntry = AddrFile->ReceiveQueue.Flink; - while((CurrentEntry != &AddrFile->ReceiveQueue) && (!Found)) { + while(CurrentEntry != &AddrFile->ReceiveQueue) { Current = CONTAINING_RECORD(CurrentEntry, DATAGRAM_RECEIVE_REQUEST, ListEntry); - + CurrentEntry = CurrentEntry->Flink; if( DstPort == AddrFile->Port && (AddrIsEqual(DstAddress, &AddrFile->Address) || AddrIsUnspecified(&AddrFile->Address) || AddrIsUnspecified(DstAddress))) { - Found = TRUE; + /* Remove the request from the queue */ RemoveEntryList(&Current->ListEntry); - break; - } else { - CurrentEntry = CurrentEntry->Flink; + + TI_DbgPrint(MAX_TRACE, ("Suitable receive request found.\n")); + + TI_DbgPrint(MAX_TRACE, + ("Target Buffer: %x, Source Buffer: %x, Size %d\n", + Current->Buffer, DataBuffer, DataSize)); + + /* Copy the data into buffer provided by the user */ + RtlCopyMemory( Current->Buffer, + DataBuffer, + MIN(Current->BufferSize, DataSize) ); + + RTAIPAddress = (PTA_IP_ADDRESS)Current->ReturnInfo->RemoteAddress; + RTAIPAddress->TAAddressCount = 1; + RTAIPAddress->Address->AddressType = TDI_ADDRESS_TYPE_IP; + RTAIPAddress->Address->Address->sin_port = SrcPort; + + TI_DbgPrint(MAX_TRACE, ("(A: %08x) Addr %08x Port %04x\n", + RTAIPAddress, + SrcAddress->Address.IPv4Address, SrcPort)); + + RtlCopyMemory( &RTAIPAddress->Address->Address->in_addr, + &SrcAddress->Address.IPv4Address, + sizeof(SrcAddress->Address.IPv4Address) ); + + /* Complete the receive request */ + if (Current->BufferSize < DataSize) + Current->Complete(Current->Context, STATUS_BUFFER_OVERFLOW, Current->BufferSize); + else + Current->Complete(Current->Context, STATUS_SUCCESS, DataSize); } } TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql); - - if (Found) - { - TI_DbgPrint(MAX_TRACE, ("Suitable receive request found.\n")); - - TI_DbgPrint(MAX_TRACE, - ("Target Buffer: %x, Source Buffer: %x, Size %d\n", - Current->Buffer, DataBuffer, DataSize)); - - if (DataSize > Current->BufferSize) - { - Current->Complete(Current->Context, STATUS_BUFFER_TOO_SMALL, DataSize); - return; - } - - /* Copy the data into buffer provided by the user */ - RtlCopyMemory( Current->Buffer, - DataBuffer, - DataSize ); - - RTAIPAddress = (PTA_IP_ADDRESS)Current->ReturnInfo->RemoteAddress; - RTAIPAddress->TAAddressCount = 1; - RTAIPAddress->Address->AddressType = TDI_ADDRESS_TYPE_IP; - RTAIPAddress->Address->Address->sin_port = SrcPort; - - TI_DbgPrint(MAX_TRACE, ("(A: %08x) Addr %08x Port %04x\n", - RTAIPAddress, - SrcAddress->Address.IPv4Address, SrcPort)); - - RtlCopyMemory( &RTAIPAddress->Address->Address->in_addr, - &SrcAddress->Address.IPv4Address, - sizeof(SrcAddress->Address.IPv4Address) ); - - /* Complete the receive request */ - Current->Complete(Current->Context, STATUS_SUCCESS, DataSize); - } } else if (AddrFile->RegisteredReceiveDatagramHandler) {
15 years, 4 months
1
0
0
0
[tkreuzer] 42353: asm version of DIB_32BPP_ColorFill: - Add frame pointer - Get rid of algin_draw, 32bpp surfaces must be DWORD aligned - Optimize the loop - Add comments
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Aug 3 00:31:29 2009 New Revision: 42353 URL:
http://svn.reactos.org/svn/reactos?rev=42353&view=rev
Log: asm version of DIB_32BPP_ColorFill: - Add frame pointer - Get rid of algin_draw, 32bpp surfaces must be DWORD aligned - Optimize the loop - Add comments Modified: trunk/reactos/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s Modified: trunk/reactos/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s [iso-8859-1] Mon Aug 3 00:31:29 2009 @@ -4,78 +4,62 @@ * FILE: subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.c * PURPOSE: ASM optimised 32bpp ColorFill * PROGRAMMERS: Magnus Olsen + * Timo Kreuzer (timo.kreuzer(a)rectos.org) */ - .globl _DIB_32BPP_ColorFill - .intel_syntax noprefix +.intel_syntax noprefix - .def _DIB_32BPP_ColorFill; - .scl 2; - .type 32; - .endef - - _DIB_32BPP_ColorFill: - sub esp, 24 - mov ecx, [esp+32] - mov [esp+8], ebx - mov ebx, [esp+28] - mov [esp+20], ebp - mov ebp, [esp+36] - mov [esp+12], esi - mov [esp+16], edi - mov edi, [ecx] - mov esi, [ecx+8] - mov edx, [ebx+36] - sub esi, edi - mov edi, [ecx+4] - mov eax, edi - imul eax, edx - add eax, [ebx+32] - mov ebx, [ecx] - lea eax, [eax+ebx*4] - mov [esp+4], eax - mov eax, [ecx+12] - cmp eax, edi - jbe end - sub eax, edi - mov [esp], eax - lea esi, [esi+0] +/* + * BOOLEAN + * _cdecl + * DIB_32BPP_ColorFill(SURFOBJ* pso, RECTL* prcl, ULONG iColor); +*/ - for_loop: - mov eax, ebp - cld - mov ebx, esi - mov edi, [esp+4] - test edi, 3 - jnz algin_draw - mov ecx, esi - rep stosd - add [esp+4], edx - dec dword ptr [esp] - jnz for_loop - end: - mov ebx, [esp+8] - mov eax, 1 - mov esi, [esp+12] - mov edi, [esp+16] - mov ebp, [esp+20] - add esp, 24 - ret +.globl _DIB_32BPP_ColorFill +_DIB_32BPP_ColorFill: + push ebp + mov ebp, esp + push ebx + push esi + push edi + sub esp, 4 /* Space for lDelta */ - algin_draw: - stosd - dec ebx - mov ecx, ebx - rol eax, 16 - stosd - add [esp+4], edx - dec dword ptr [esp] - jnz for_loop + mov edx, [ebp+12] /* edx = prcl */ + mov ecx, [ebp+8] /* ecx = pso */ - mov ebx, [esp+8] - mov eax, 1 - mov esi, [esp+12] - mov edi, [esp+16] - mov ebp, [esp+20] - add esp, 24 - ret + mov ebx, [ecx+0x24] /* ebx = pso->lDelta; */ + mov [esp], ebx /* lDelta = pso->lDelta; */ + mov edi, [edx+4] /* edi = prcl->top; */ + mov eax, edi /* eax = prcl->top; */ + imul eax, ebx /* eax = prcl->top * pso->lDelta; */ + add eax, [ecx+0x20] /* eax += pso->pvScan0; */ + mov ebx, [edx] /* ebx = prcl->left; */ + lea esi, [eax+ebx*4] /* esi = pvLine0 = eax + 4 * prcl->left; */ + + mov ebx, [edx+8] /* ebx = prcl->right; */ + sub ebx, [edx] /* ebx = prcl->right - prcl->left; */ + jbe end /* if (ebx <= 0) goto end; */ + + mov edx, [edx+12] /* edx = prcl->bottom; */ + sub edx, edi /* edx -= prcl->top; */ + jbe end /* if (eax <= 0) goto end; */ + + mov eax, [ebp+16] /* eax = iColor; */ + cld + +for_loop: /* do { */ + mov edi, esi /* edi = pvLine0; */ + mov ecx, ebx /* ecx = cx; */ + rep stosd /* memset(pvLine0, iColor, cx); */ + add esi, [esp] /* pvLine0 += lDelta; */ + dec edx /* cy--; */ + jnz for_loop /* } while (cy > 0); */ + +end: + mov eax, 1 + add esp, 4 + pop edi + pop esi + pop ebx + pop ebp + ret
15 years, 4 months
1
0
0
0
[dgorbachev] 42352: Remove r42305 hack, preserve racial purity of KiSystemStartupReal.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Aug 2 23:27:26 2009 New Revision: 42352 URL:
http://svn.reactos.org/svn/reactos?rev=42352&view=rev
Log: Remove r42305 hack, preserve racial purity of KiSystemStartupReal. Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] Sun Aug 2 23:27:26 2009 @@ -712,34 +712,18 @@ Ke386SetDs(KGDT_R3_DATA | RPL_MASK); Ke386SetEs(KGDT_R3_DATA | RPL_MASK); - /* HACK compensates for KiRosPrepareForSystemStartup hack */ - if ((ULONG)Idt == KiIdtDescriptor.Base) - { - USHORT FlippedSelector; - - FlippedSelector = KiIdt[2].Selector; - KiIdt[2].Selector = KiIdt[2].ExtendedOffset; - KiIdt[2].ExtendedOffset = FlippedSelector; - - FlippedSelector = KiIdt[8].Selector; - KiIdt[8].Selector = KiIdt[8].ExtendedOffset; - KiIdt[8].ExtendedOffset = FlippedSelector; - } - else - { - /* Save NMI and double fault traps */ - RtlCopyMemory(&NmiEntry, &Idt[2], sizeof(KIDTENTRY)); - RtlCopyMemory(&DoubleFaultEntry, &Idt[8], sizeof(KIDTENTRY)); - - /* Copy kernel's trap handlers */ - RtlCopyMemory(Idt, - (PVOID)KiIdtDescriptor.Base, - KiIdtDescriptor.Limit + 1); - - /* Restore NMI and double fault */ - RtlCopyMemory(&Idt[2], &NmiEntry, sizeof(KIDTENTRY)); - RtlCopyMemory(&Idt[8], &DoubleFaultEntry, sizeof(KIDTENTRY)); - } + /* Save NMI and double fault traps */ + RtlCopyMemory(&NmiEntry, &Idt[2], sizeof(KIDTENTRY)); + RtlCopyMemory(&DoubleFaultEntry, &Idt[8], sizeof(KIDTENTRY)); + + /* Copy kernel's trap handlers */ + RtlCopyMemory(Idt, + (PVOID)KiIdtDescriptor.Base, + KiIdtDescriptor.Limit + 1); + + /* Restore NMI and double fault */ + RtlCopyMemory(&Idt[2], &NmiEntry, sizeof(KIDTENTRY)); + RtlCopyMemory(&Idt[8], &DoubleFaultEntry, sizeof(KIDTENTRY)); AppCpuInit: /* Loop until we can release the freeze lock */
15 years, 4 months
1
0
0
0
[dgorbachev] 42351: Add a new hack.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Aug 2 23:27:01 2009 New Revision: 42351 URL:
http://svn.reactos.org/svn/reactos?rev=42351&view=rev
Log: Add a new hack. Modified: trunk/reactos/ntoskrnl/ke/freeldr.c Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] Sun Aug 2 23:27:01 2009 @@ -66,6 +66,9 @@ ULONG NumberDescriptors = 0; MEMORY_DESCRIPTOR MDArray[60] = { { 0, 0, 0 }, }; +/* Old boot style IDT */ +KIDTENTRY KiHackIdt[256]; + /* FUNCTIONS *****************************************************************/ PMEMORY_ALLOCATION_DESCRIPTOR @@ -1266,10 +1269,16 @@ #if defined(_M_IX86) PKTSS Tss; PKGDTENTRY TssEntry; + KDESCRIPTOR IdtDescriptor = { 0, 0, 0 }; + + Ke386GetInterruptDescriptorTable(*(PKDESCRIPTOR)&IdtDescriptor.Limit); + RtlCopyMemory(KiHackIdt, (PVOID)IdtDescriptor.Base, IdtDescriptor.Limit + 1); + IdtDescriptor.Base = (ULONG)&KiHackIdt; + IdtDescriptor.Limit = sizeof(KiHackIdt) - 1; /* Load the GDT and IDT */ Ke386SetGlobalDescriptorTable(*(PKDESCRIPTOR)&KiGdtDescriptor.Limit); - Ke386SetInterruptDescriptorTable(*(PKDESCRIPTOR)&KiIdtDescriptor.Limit); + Ke386SetInterruptDescriptorTable(*(PKDESCRIPTOR)&IdtDescriptor.Limit); /* Initialize the boot TSS */ Tss = &KiBootTss;
15 years, 4 months
1
0
0
0
[dgorbachev] 42350: Love Nystrom (=lovenystrom=at=hotmail=dot=com=), bug #4727 - Change some 'suspiciously looking' code in bootvid.dll. - BOOTCHAR_HEIGHT: a new macro to use instead of a plain integer. - CHAR_GEN_UPSIDE_DOWN: define it for upside down font data.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Aug 2 23:26:05 2009 New Revision: 42350 URL:
http://svn.reactos.org/svn/reactos?rev=42350&view=rev
Log: Love Nystrom (=lovenystrom=at=hotmail=dot=com=), bug #4727 - Change some 'suspiciously looking' code in bootvid.dll. - BOOTCHAR_HEIGHT: a new macro to use instead of a plain integer. - CHAR_GEN_UPSIDE_DOWN: define it for upside down font data. Modified: trunk/reactos/drivers/base/bootvid/i386/bootdata.c trunk/reactos/drivers/base/bootvid/i386/vga.c trunk/reactos/drivers/base/bootvid/precomp.h Modified: trunk/reactos/drivers/base/bootvid/i386/bootdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/i386/…
============================================================================== --- trunk/reactos/drivers/base/bootvid/i386/bootdata.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/bootvid/i386/bootdata.c [iso-8859-1] Sun Aug 2 23:26:05 2009 @@ -48,7 +48,10 @@ 0x0 // End of command stream }; -UCHAR FontData[256 * 13] = +// +// The character generator is in natural order, top of char is first element. +// +UCHAR FontData[256 * BOOTCHAR_HEIGHT] = { 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 0 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 13 Modified: trunk/reactos/drivers/base/bootvid/i386/vga.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/i386/…
============================================================================== --- trunk/reactos/drivers/base/bootvid/i386/vga.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/bootvid/i386/vga.c [iso-8859-1] Sun Aug 2 23:26:05 2009 @@ -146,10 +146,10 @@ ULONG i, j, XOffset; /* Get the font line for this character */ - FontChar = &FontData[Character * 13 - Top]; + FontChar = &FontData[Character * BOOTCHAR_HEIGHT]; /* Loop each pixel height */ - i = 13; + i = BOOTCHAR_HEIGHT; do { /* Loop each pixel width */ @@ -158,15 +158,20 @@ do { /* Check if we should draw this pixel */ - if (FontChar[Top] & (UCHAR)j) +#ifdef CHAR_GEN_UPSIDE_DOWN + if (FontChar[i] & (UCHAR)j) +#else + /* Normal character generator (top of char is first element) */ + if (FontChar[BOOTCHAR_HEIGHT - i] & (UCHAR)j) +#endif { /* We do, use the given Text Color */ SetPixel(XOffset, Top, (UCHAR)TextColor); } else if (BackTextColor < 16) { - /* This is a background pixel. We're drawing it unless it's */ - /* transparent. */ + /* This is a background pixel. */ + /* We're drawing it unless it's transparent. */ SetPixel(XOffset, Top, (UCHAR)BackTextColor); } Modified: trunk/reactos/drivers/base/bootvid/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/preco…
============================================================================== --- trunk/reactos/drivers/base/bootvid/precomp.h [iso-8859-1] (original) +++ trunk/reactos/drivers/base/bootvid/precomp.h [iso-8859-1] Sun Aug 2 23:26:05 2009 @@ -2,6 +2,11 @@ #include "arc/arc.h" #include "halfuncs.h" #include "drivers/bootvid/bootvid.h" + +/* Define if FontData has upside down characters */ +#undef CHAR_GEN_UPSIDE_DOWN + +#define BOOTCHAR_HEIGHT 13 // // Command Stream Definitions @@ -43,4 +48,4 @@ extern ULONG curr_y; extern ULONG_PTR VgaRegisterBase; extern ULONG_PTR VgaBase; -extern UCHAR FontData[256 * 13]; +extern UCHAR FontData[256 * BOOTCHAR_HEIGHT];
15 years, 4 months
1
0
0
0
[sginsberg] 42349: - Wooops, fix dxg and dxapi build after 42346.
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Aug 2 23:04:13 2009 New Revision: 42349 URL:
http://svn.reactos.org/svn/reactos?rev=42349&view=rev
Log: - Wooops, fix dxg and dxapi build after 42346. Modified: trunk/reactos/drivers/directx/dxapi/dxapi_driver.h trunk/reactos/drivers/directx/dxg/dxg_int.h Modified: trunk/reactos/drivers/directx/dxapi/dxapi_driver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxapi/dxap…
============================================================================== --- trunk/reactos/drivers/directx/dxapi/dxapi_driver.h [iso-8859-1] (original) +++ trunk/reactos/drivers/directx/dxapi/dxapi_driver.h [iso-8859-1] Sun Aug 2 23:04:13 2009 @@ -10,6 +10,7 @@ #include <windef.h> #include <winerror.h> #include <wingdi.h> +#define NT_BUILD_ENVIRONMENT #include <winddi.h> #include <prntfont.h> #include <dde.h> Modified: trunk/reactos/drivers/directx/dxg/dxg_int.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/dxg_in…
============================================================================== --- trunk/reactos/drivers/directx/dxg/dxg_int.h [iso-8859-1] (original) +++ trunk/reactos/drivers/directx/dxg/dxg_int.h [iso-8859-1] Sun Aug 2 23:04:13 2009 @@ -11,6 +11,7 @@ #define STARTF_USESIZE 2 #define STARTF_USEPOSITION 4 #define INTERNAL_CALL NTAPI +#define NT_BUILD_ENVIRONMENT #include <stdarg.h> #include <windef.h>
15 years, 4 months
1
0
0
0
[fireball] 42348: - Create stock bitmap in win32k and use it whenever a stock bitmap is selected into the DC. - Bring in GDIOBJ_ConvertToStockObj from trunk. - Fixes arwinss issue nr. 7.
by fireball@svn.reactos.org
Author: fireball Date: Sun Aug 2 22:53:12 2009 New Revision: 42348 URL:
http://svn.reactos.org/svn/reactos?rev=42348&view=rev
Log: - Create stock bitmap in win32k and use it whenever a stock bitmap is selected into the DC. - Bring in GDIOBJ_ConvertToStockObj from trunk. - Fixes arwinss issue nr. 7. Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c branches/arwinss/reactos/include/psdk/ntrosgdi.h branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h branches/arwinss/reactos/subsystems/win32/win32k/main/init.c branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] Sun Aug 2 22:53:12 2009 @@ -19,6 +19,9 @@ #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(rosgdidrv); + +/* GLOBALS ****************************************************************/ +HANDLE hStockBitmap; /* FUNCTIONS **************************************************************/ @@ -123,6 +126,10 @@ hKernelDC = (*pdev)->hKernelDC; else hKernelDC = 0; + + /* Save stock bitmap's handle */ + if (dcInfo.dwType == OBJ_MEMDC && !hStockBitmap) + hStockBitmap = GetCurrentObject( hdc, OBJ_BITMAP ); /* Call the win32 kernel */ bRet = RosGdiCreateDC(&dcInfo, &hKernelDC, driver, device, output, initData); @@ -453,8 +460,18 @@ HBITMAP CDECL RosDrv_SelectBitmap( NTDRV_PDEVICE *physDev, HBITMAP hbitmap ) { - RosGdiSelectBitmap(physDev->hKernelDC, hbitmap); - + BOOL bRes, bStock = FALSE; + + /* Check if it's a stock bitmap */ + if (hbitmap == hStockBitmap) bStock = TRUE; + + /* Select the bitmap into the DC */ + bRes = RosGdiSelectBitmap(physDev->hKernelDC, hbitmap, bStock); + + /* If there was an error, return 0 */ + if (!bRes) return 0; + + /* Return handle of selected bitmap as a success*/ return hbitmap; } Modified: branches/arwinss/reactos/include/psdk/ntrosgdi.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/psdk/nt…
============================================================================== --- branches/arwinss/reactos/include/psdk/ntrosgdi.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/psdk/ntrosgdi.h [iso-8859-1] Sun Aug 2 22:53:12 2009 @@ -101,7 +101,7 @@ BOOL APIENTRY RosGdiDeleteDC( HDC physDev ); BOOL APIENTRY RosGdiGetDCOrgEx( HDC physDev, LPPOINT lpp ); BOOL APIENTRY RosGdiPaintRgn( HDC physDev, HRGN hrgn ); -VOID APIENTRY RosGdiSelectBitmap( HDC physDev, HBITMAP hbitmap ); +BOOL APIENTRY RosGdiSelectBitmap( HDC physDev, HBITMAP hbitmap, BOOL stock ); VOID APIENTRY RosGdiSelectBrush( HDC physDev, LOGBRUSH *pLogBrush ); HFONT APIENTRY RosGdiSelectFont( HDC physDev, HFONT hfont, HANDLE gdiFont ); VOID APIENTRY RosGdiSelectPen( HDC physDev, LOGPEN *pLogPen, EXTLOGPEN *pExtLogPen ); Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c [iso-8859-1] Sun Aug 2 22:53:12 2009 @@ -11,6 +11,9 @@ #include <win32k.h> #define NDEBUG #include <debug.h> + +/* GLOBALS *******************************************************************/ +HGDIOBJ hStockBmp; /* PUBLIC FUNCTIONS **********************************************************/ @@ -293,5 +296,17 @@ return bRet; } +VOID +CreateStockBitmap() +{ + SIZE slSize; + + /* Create 1x1 bitmap */ + slSize.cx = 1; slSize.cy = 1; + hStockBmp = GreCreateBitmap(slSize, 1, 1, 0, NULL); + + /* Convert it to a stock object */ + GDIOBJ_ConvertToStockObj(&hStockBmp); +} /* EOF */ Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] Sun Aug 2 22:53:12 2009 @@ -185,21 +185,26 @@ return FALSE; } -VOID APIENTRY RosGdiSelectBitmap( HDC physDev, HBITMAP hbitmap ) +BOOL APIENTRY RosGdiSelectBitmap( HDC physDev, HBITMAP hbitmap, BOOL bStock ) { PDC pDC; PSURFACE pSurface; HGDIOBJ hBmpKern; - SIZEL slSize; - - hBmpKern = GDI_MapUserHandle(hbitmap); - if (!hBmpKern) - { - DPRINT1("Trying to select an unknown bitmap %x to the DC %x!\n", hbitmap, physDev); - - /* It probably is a stock bitmap, so select it */ - slSize.cx = 1; slSize.cy = 1; - hBmpKern = GreCreateBitmap(slSize, 1, 1, 0, NULL); + + if (bStock) + { + /* Selecting stock bitmap */ + hBmpKern = hStockBmp; + } + else + { + /* Selecting usual bitmap */ + hBmpKern = GDI_MapUserHandle(hbitmap); + if (!hBmpKern) + { + DPRINT1("Trying to select an unknown bitmap %x to the DC %x!\n", hbitmap, physDev); + return FALSE; + } } DPRINT("Selecting %x bitmap to hdc %x\n", hBmpKern, physDev); @@ -220,6 +225,8 @@ /* Release the DC object */ DC_Unlock(pDC); + + return TRUE; } VOID APIENTRY RosGdiSelectBrush( HDC physDev, LOGBRUSH *pLogBrush ) Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c [iso-8859-1] Sun Aug 2 22:53:12 2009 @@ -1050,6 +1050,139 @@ } BOOL APIENTRY +GDIOBJ_ConvertToStockObj(HGDIOBJ *phObj) +{ + /* + * FIXME !!!!! THIS FUNCTION NEEDS TO BE FIXED - IT IS NOT SAFE WHEN OTHER THREADS + * MIGHT ATTEMPT TO LOCK THE OBJECT DURING THIS CALL!!! + */ + PGDI_TABLE_ENTRY Entry; + HANDLE ProcessId, LockedProcessId, PrevProcId; + PTHREADINFO Thread; + HGDIOBJ hObj; + + GDIDBG_INITLOOPTRACE(); + + ASSERT(phObj); + hObj = *phObj; + + DPRINT("GDIOBJ_ConvertToStockObj: hObj: 0x%08x\n", hObj); + + Thread = PsGetCurrentThreadWin32Thread(); + + if (!GDI_HANDLE_IS_STOCKOBJ(hObj)) + { + ProcessId = PsGetCurrentProcessId(); + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); + + Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, hObj); + +LockHandle: + /* lock the object, we must not convert stock objects, so don't check!!! */ + PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, ProcessId); + if (PrevProcId == ProcessId) + { + LONG NewType, PrevType, OldType; + + /* we're locking an object that belongs to our process. First calculate + the new object type including the stock object flag and then try to + exchange it.*/ + /* On Windows the higher 16 bit of the type field don't contain the + full type from the handle, but the base type. + (type = BRSUH, PEN, EXTPEN, basetype = BRUSH) */ + OldType = ((ULONG)hObj & GDI_HANDLE_BASETYPE_MASK) | ((ULONG)hObj >> GDI_ENTRY_UPPER_SHIFT); + /* We are currently not using bits 24..31 (flags) of the type field, but for compatibility + we copy them as we can't get them from the handle */ + OldType |= Entry->Type & GDI_ENTRY_FLAGS_MASK; + + /* As the object should be a stock object, set it's flag, but only in the lower 16 bits */ + NewType = OldType | GDI_ENTRY_STOCK_MASK; + + /* Try to exchange the type field - but only if the old (previous type) matches! */ + PrevType = InterlockedCompareExchange(&Entry->Type, NewType, OldType); + if (PrevType == OldType && Entry->KernelData != NULL) + { + PTHREADINFO PrevThread; + PBASEOBJECT Object; + + /* We successfully set the stock object flag. + KernelData should never be NULL here!!! */ + ASSERT(Entry->KernelData); + + Object = Entry->KernelData; + + PrevThread = Object->Tid; + if (Object->cExclusiveLock == 0 || PrevThread == Thread) + { + /* dereference the process' object counter */ + if (PrevProcId != GDI_GLOBAL_PROCESS) + { + PEPROCESS OldProcess; + PPROCESSINFO W32Process; + NTSTATUS Status; + + /* FIXME */ + Status = PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1), &OldProcess); + if (NT_SUCCESS(Status)) + { + W32Process = (PPROCESSINFO)OldProcess->Win32Process; + if (W32Process != NULL) + { + InterlockedDecrement(&W32Process->GDIHandleCount); + } + ObDereferenceObject(OldProcess); + } + } + + hObj = (HGDIOBJ)((ULONG)(hObj) | GDI_HANDLE_STOCK_MASK); + *phObj = hObj; + Object->hHmgr = hObj; + + /* remove the process id lock and make it global */ + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, GDI_GLOBAL_PROCESS); + + /* we're done, successfully converted the object */ + return TRUE; + } + else + { + GDIDBG_TRACELOOP(hObj, PrevThread, Thread); + + /* WTF?! The object is already locked by a different thread! + Release the lock, wait a bit and try again! + FIXME - we should give up after some time unless we want to wait forever! */ + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); + + DelayExecution(); + goto LockHandle; + } + } + else + { + DPRINT1("Attempted to convert object 0x%x that is deleted! Should never get here!!!\n", hObj); + DPRINT1("OldType = 0x%x, Entry->Type = 0x%x, NewType = 0x%x, Entry->KernelData = 0x%x\n", OldType, Entry->Type, NewType, Entry->KernelData); + } + } + else if (PrevProcId == LockedProcessId) + { + GDIDBG_TRACELOOP(hObj, PrevProcId, ProcessId); + + /* the object is currently locked, wait some time and try again. + FIXME - we shouldn't loop forever! Give up after some time! */ + DelayExecution(); + /* try again */ + goto LockHandle; + } + else + { + DPRINT1("Attempted to convert invalid handle: 0x%x\n", hObj); + } + } + + return FALSE; +} + +BOOL APIENTRY GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS NewOwner) { PGDI_TABLE_ENTRY Entry; Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/include/gre.h [iso-8859-1] Sun Aug 2 22:53:12 2009 @@ -62,6 +62,10 @@ INT FASTCALL BitsPerFormat(ULONG Format); +/* bitmap.c */ +extern HGDIOBJ hStockBmp; +VOID CreateStockBitmap(); + /* font.c */ VOID NTAPI GreTextOut(PDC pDC, INT x, INT y, UINT flags, Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/init.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/main/init.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/main/init.c [iso-8859-1] Sun Aug 2 22:53:12 2009 @@ -345,6 +345,9 @@ /* Initialize handle-mapping */ GDI_InitHandleMapping(); + /* Create stock objects */ + CreateStockBitmap(); + /* Init video driver implementation */ InitDcImpl(); Modified: branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sun Aug 2 22:53:12 2009 @@ -17,7 +17,7 @@ RosGdiDeleteDC 1 RosGdiGetDCOrgEx 2 RosGdiPaintRgn 2 -RosGdiSelectBitmap 2 +RosGdiSelectBitmap 3 RosGdiSelectBrush 2 RosGdiSelectFont 3 RosGdiSelectPen 3
15 years, 4 months
1
0
0
0
[fireball] 42347: - Remove _NTDRIVER_ define, in arwinss freetype is built as a usual usermode dll.
by fireball@svn.reactos.org
Author: fireball Date: Sun Aug 2 22:51:16 2009 New Revision: 42347 URL:
http://svn.reactos.org/svn/reactos?rev=42347&view=rev
Log: - Remove _NTDRIVER_ define, in arwinss freetype is built as a usual usermode dll. Modified: branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild Modified: branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/3rdparty/fr…
============================================================================== --- branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/3rdparty/freetype/freetype.rbuild [iso-8859-1] Sun Aug 2 22:51:16 2009 @@ -4,7 +4,6 @@ <importlibrary definition="freetype.def" /> <include base="freetype">include</include> <define name="_DISABLE_TIDENTS" /> - <define name="__NTDRIVER__" /> <define name="__NO_CTYPE_INLINES" /> <define name="FT2_BUILD_LIBRARY" /> <if property="NSWPAT" value="0">
15 years, 4 months
1
0
0
0
[sginsberg] 42346: - probe.h: "NTOSKRNL unfortunately doesn't export RtlRaiseStatus!" -- no, but it does export ExRaiseStatus, so use it instead from win32k instead of "W32kRaiseStatus". Also use ExRaiseAccessViolation instead of RtlRaiseStatus(STATUS_ACCESS_VIOLATION) to save some space. - ddraw.h: Don't check if WINNT is defined, our winnt.h defines _WINNT_H. Also fix the way CO_E_NOTINITIALIZED is defined. - Define NT_BUILD_ENVIRONMENT in win32k so the define in ddraw.h doesn't conflict with
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Aug 2 22:35:19 2009 New Revision: 42346 URL:
http://svn.reactos.org/svn/reactos?rev=42346&view=rev
Log: - probe.h: "NTOSKRNL unfortunately doesn't export RtlRaiseStatus!" -- no, but it does export ExRaiseStatus, so use it instead from win32k instead of "W32kRaiseStatus". Also use ExRaiseAccessViolation instead of RtlRaiseStatus(STATUS_ACCESS_VIOLATION) to save some space. - ddraw.h: Don't check if WINNT is defined, our winnt.h defines _WINNT_H. Also fix the way CO_E_NOTINITIALIZED is defined. - Define NT_BUILD_ENVIRONMENT in win32k so the define in ddraw.h doesn't conflict with winerror.h. Not sure if this is correct, but our headers are a mess. - Add a hack to disable C4276 (caused by napi.h) until a more proper fix is devised. - Win32K now fully compiles in MSVC. Modified: trunk/reactos/include/dxsdk/ddraw.h trunk/reactos/include/reactos/probe.h trunk/reactos/subsystems/win32/win32k/misc/err.c trunk/reactos/subsystems/win32/win32k/pch.h trunk/reactos/subsystems/win32/win32k/win32k.rbuild Modified: trunk/reactos/include/dxsdk/ddraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/ddraw.h?rev=…
============================================================================== --- trunk/reactos/include/dxsdk/ddraw.h [iso-8859-1] (original) +++ trunk/reactos/include/dxsdk/ddraw.h [iso-8859-1] Sun Aug 2 22:35:19 2009 @@ -8,8 +8,8 @@ #include <objbase.h> #else #define IUnknown void -#if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT) - #define CO_E_NOTINITIALIZED 0x800401F0 +#if !defined(NT_BUILD_ENVIRONMENT) && !defined(_WINNT_H) + #define CO_E_NOTINITIALIZED 0x800401F0L #endif #endif Modified: trunk/reactos/include/reactos/probe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/probe.h?re…
============================================================================== --- trunk/reactos/include/reactos/probe.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/probe.h [iso-8859-1] Sun Aug 2 22:35:19 2009 @@ -12,14 +12,6 @@ #if defined(_WIN32K_) static const LARGE_STRING __emptyLargeString = {0, 0, 0, NULL}; -#endif - -#if defined(_WIN32K_) -/* - * NOTE: NTOSKRNL unfortunately doesn't export RtlRaiseStatus! - */ -VOID NTAPI W32kRaiseStatus(NTSTATUS Status); -#define RtlRaiseStatus W32kRaiseStatus #endif /* @@ -29,7 +21,7 @@ do { \ if ((ULONG_PTR)(Ptr) + sizeof(Type) - 1 < (ULONG_PTR)(Ptr) || \ (ULONG_PTR)(Ptr) + sizeof(Type) - 1 >= (ULONG_PTR)MmUserProbeAddress) { \ - RtlRaiseStatus (STATUS_ACCESS_VIOLATION); \ + ExRaiseAccessViolation(); \ } \ *(volatile Type *)(Ptr) = *(volatile Type *)(Ptr); \ } while (0) @@ -60,7 +52,7 @@ #define ProbeForReadGenericType(Ptr, Type, Default) \ (((ULONG_PTR)(Ptr) + sizeof(Type) - 1 < (ULONG_PTR)(Ptr) || \ (ULONG_PTR)(Ptr) + sizeof(Type) - 1 >= (ULONG_PTR)MmUserProbeAddress) ? \ - ExRaiseStatus (STATUS_ACCESS_VIOLATION), Default : \ + ExRaiseAccessViolation(), Default : \ *(const volatile Type *)(Ptr)) #define ProbeForReadBoolean(Ptr) ProbeForReadGenericType(Ptr, BOOLEAN, FALSE) @@ -90,7 +82,7 @@ do { \ if ((ULONG_PTR)(Ptr) + sizeof(HANDLE) - 1 < (ULONG_PTR)(Ptr) || \ (ULONG_PTR)(Ptr) + sizeof(HANDLE) - 1 >= (ULONG_PTR)MmUserProbeAddress) { \ - RtlRaiseStatus (STATUS_ACCESS_VIOLATION); \ + ExRaiseAccessViolation(); \ } \ *(volatile HANDLE *)(Ptr) = NULL; \ } while (0) @@ -113,7 +105,7 @@ ArraySize = ItemSize * ItemCount; if (ArraySize / ItemSize != ItemCount) { - RtlRaiseStatus (STATUS_INVALID_PARAMETER); + ExRaiseStatus(STATUS_INVALID_PARAMETER); } /* Probe the array */ @@ -135,7 +127,7 @@ ArraySize = ItemSize * ItemCount; if (ArraySize / ItemSize != ItemCount) { - RtlRaiseStatus (STATUS_INVALID_PARAMETER); + ExRaiseStatus(STATUS_INVALID_PARAMETER); } /* Probe the array */ Modified: trunk/reactos/subsystems/win32/win32k/misc/err.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/mi…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/misc/err.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/misc/err.c [iso-8859-1] Sun Aug 2 22:35:19 2009 @@ -61,22 +61,4 @@ return 0; } -VOID -APIENTRY -W32kRaiseStatus(NTSTATUS Status) -{ - EXCEPTION_RECORD ExceptionRecord; - - /* Create an exception record */ - ExceptionRecord.ExceptionCode = Status; - ExceptionRecord.ExceptionRecord = NULL; - ExceptionRecord.NumberParameters = 0; - ExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE; - - RtlRaiseException(&ExceptionRecord); - - /* If we returned, raise a status */ - W32kRaiseStatus(Status); -} - /* EOF */ Modified: trunk/reactos/subsystems/win32/win32k/pch.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/pc…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/pch.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/pch.h [iso-8859-1] Sun Aug 2 22:35:19 2009 @@ -36,6 +36,7 @@ #include <winerror.h> #include <wingdi.h> +#define NT_BUILD_ENVIRONMENT #include <winddi.h> #include <winuser.h> #include <prntfont.h> Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] Sun Aug 2 22:35:19 2009 @@ -10,6 +10,7 @@ <include base="ReactOS">include/reactos/subsys</include> <include base="ReactOS">include/reactos/drivers</include> <compilerflag compilerset="gcc">-fms-extensions</compilerflag> + <compilerflag compilerset="msc">/wd4276</compilerflag> <define name="LANGPACK" /> <define name="_WIN32K_" /> <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
15 years, 4 months
1
0
0
0
[jmorlan] 42345: ReadFile: When reading from a console handle with processed input mode enabled, simulate EOF if the first character read is ^Z (Bug 4745)
by jmorlan@svn.reactos.org
Author: jmorlan Date: Sun Aug 2 20:56:05 2009 New Revision: 42345 URL:
http://svn.reactos.org/svn/reactos?rev=42345&view=rev
Log: ReadFile: When reading from a console handle with processed input mode enabled, simulate EOF if the first character read is ^Z (Bug 4745) Modified: trunk/reactos/dll/win32/kernel32/file/rw.c Modified: trunk/reactos/dll/win32/kernel32/file/rw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/rw…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/rw.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/rw.c [iso-8859-1] Sun Aug 2 20:56:05 2009 @@ -148,11 +148,22 @@ if (IsConsoleHandle(hFile)) { - return ReadConsoleA(hFile, + if (ReadConsoleA(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, - NULL); + NULL)) + { + DWORD dwMode; + GetConsoleMode(hFile, &dwMode); + if ((dwMode & ENABLE_PROCESSED_INPUT) && *(char *)lpBuffer == 0x1a) + { + /* EOF character entered; simulate end-of-file */ + *lpNumberOfBytesRead = 0; + } + return TRUE; + } + return FALSE; } if (lpOverlapped != NULL)
15 years, 4 months
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Results per page:
10
25
50
100
200