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
December 2008
----- 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
31 participants
710 discussions
Start a n
N
ew thread
[gschneider] 37944: - IntGetDeviceGammaRamp: remove unneeded code, i * 256 is always smaller than 65535 (255*256=65280 is the biggest value), CID 35 - IntSetDeviceGammaRamp: don't copy data to NULL buffer, CID 195
by gschneider@svn.reactos.org
Author: gschneider Date: Mon Dec 8 13:44:13 2008 New Revision: 37944 URL:
http://svn.reactos.org/svn/reactos?rev=37944&view=rev
Log: - IntGetDeviceGammaRamp: remove unneeded code, i * 256 is always smaller than 65535 (255*256=65280 is the biggest value), CID 35 - IntSetDeviceGammaRamp: don't copy data to NULL buffer, CID 195 Modified: trunk/reactos/subsystems/win32/win32k/objects/icm.c Modified: trunk/reactos/subsystems/win32/win32k/objects/icm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/icm.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/icm.c [iso-8859-1] Mon Dec 8 13:44:13 2008 @@ -118,7 +118,6 @@ for(i=0; i<256; i++ ) { int NewValue = i * 256; - if (NewValue > 65535) NewValue = 65535; Ramp->Red[i] = Ramp->Green[i] = Ramp->Blue[i] = ((WORD)NewValue); } @@ -350,7 +349,8 @@ pGDev->pvGammaRamp = ExAllocatePoolWithTag(PagedPool, sizeof(GAMMARAMP), TAG_GDIICM); pGDev->flFlags |= PDEV_GAMMARAMP_TABLE; } - RtlCopyMemory( pGDev->pvGammaRamp, Ramp, sizeof(GAMMARAMP)); + if (pGDev->pvGammaRamp) + RtlCopyMemory( pGDev->pvGammaRamp, Ramp, sizeof(GAMMARAMP)); Ret = UpdateDeviceGammaRamp(hPDev);
16 years
1
0
0
0
[janderwald] 37943: - Experimental IInterrupt object implementation
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Dec 8 13:08:07 2008 New Revision: 37943 URL:
http://svn.reactos.org/svn/reactos?rev=37943&view=rev
Log: - Experimental IInterrupt object implementation Added: trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.c (with props) Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c Added: trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.c (added) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.c [iso-8859-1] Mon Dec 8 13:08:07 2008 @@ -1,0 +1,336 @@ +#include "private.h" + +typedef struct +{ + LIST_ENTRY ListEntry; + PINTERRUPTSYNCROUTINE SyncRoutine; + PVOID DynamicContext; +}SYNC_ENTRY, *PSYNC_ENTRY; + +typedef struct +{ + IInterruptSyncVtbl *lpVtbl; + + LONG ref; + KSPIN_LOCK Lock; + LIST_ENTRY ServiceRoutines; + PKINTERRUPT Interrupt; + INTERRUPTSYNCMODE Mode; + PRESOURCELIST ResourceList; + ULONG ResourceIndex; + + PINTERRUPTSYNCROUTINE SyncRoutine; + PVOID DynamicContext; +}IInterruptSyncImpl; + + +//--------------------------------------------------------------- +// IUnknown methods +// + +const GUID IID_IInterruptSync; + +NTSTATUS +NTAPI +IInterruptSync_fnQueryInterface( + IInterruptSync * iface, + IN REFIID refiid, + OUT PVOID* Output) +{ + IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface; + + if (IsEqualGUIDAligned(refiid, &IID_IInterruptSync)) + { + *Output = &This->lpVtbl; + _InterlockedIncrement(&This->ref); + return STATUS_SUCCESS; + } + + return STATUS_UNSUCCESSFUL; +} + +ULONG +NTAPI +IInterruptSync_fnAddRef( + IInterruptSync * iface) +{ + IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface; + + DPRINT("IInterruptSync_AddRef: This %p\n", This); + + return _InterlockedIncrement(&This->ref); +} + +ULONG +NTAPI +IInterruptSync_fnRelease( + IInterruptSync* iface) +{ + PLIST_ENTRY CurEntry; + PSYNC_ENTRY Entry; + IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface; + + _InterlockedDecrement(&This->ref); + + DPRINT("IInterruptSync_Release: This %p new ref %u\n", This, This->ref); + + if (This->ref == 0) + { + if (This->Interrupt) + { + DPRINT1("Interrupt not disconnected! %p\n", This->Interrupt); + IoDisconnectInterrupt(This->Interrupt); + } + while(!IsListEmpty(&This->ServiceRoutines)) + { + CurEntry = RemoveHeadList(&This->ServiceRoutines); + Entry = CONTAINING_RECORD(CurEntry, SYNC_ENTRY, ListEntry); + ExFreePoolWithTag(Entry, TAG_PORTCLASS); + } + + This->ResourceList->lpVtbl->Release(This->ResourceList); + ExFreePoolWithTag(This, TAG_PORTCLASS); + return 0; + } + /* Return new reference count */ + return This->ref; +} + +//--------------------------------------------------------------- +// IInterruptSync methods +// + + +BOOLEAN +NTAPI +IInterruptSynchronizedRoutine( + IN PVOID ServiceContext) +{ + IInterruptSyncImpl * This = (IInterruptSyncImpl*)ServiceContext; + + return This->SyncRoutine((IInterruptSync*)This, This->DynamicContext); +} + +NTSTATUS +NTAPI +IInterruptSync_fnCallSynchronizedRoutine( + IN IInterruptSync * iface, + IN PINTERRUPTSYNCROUTINE Routine, + IN PVOID DynamicContext) +{ + IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface; + + if (!This->Interrupt) + { + DPRINT("IInterruptSync_CallSynchronizedRoutine %p no interrupt connected\n", This); + return STATUS_UNSUCCESSFUL; + } + + This->SyncRoutine = Routine; + This->DynamicContext = DynamicContext; + + return KeSynchronizeExecution(This->Interrupt, IInterruptSynchronizedRoutine, (PVOID)This); +} + +NTAPI +PKINTERRUPT +IInterruptSync_fnGetKInterrupt( + IN IInterruptSync * iface) +{ + IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface; + + return This->Interrupt; +} + +BOOLEAN +NTAPI +IInterruptServiceRoutine( + IN PKINTERRUPT Interrupt, + IN PVOID ServiceContext) +{ + PLIST_ENTRY CurEntry; + PSYNC_ENTRY Entry; + NTSTATUS Status; + BOOL Success; + IInterruptSyncImpl * This = (IInterruptSyncImpl*)ServiceContext; + + if (This->Mode == InterruptSyncModeNormal) + { + CurEntry = This->ServiceRoutines.Flink; + while (CurEntry != &This->ServiceRoutines) + { + Entry = CONTAINING_RECORD(CurEntry, SYNC_ENTRY, ListEntry); + Status = Entry->SyncRoutine((IInterruptSync*)This, Entry->DynamicContext); + if (NT_SUCCESS(Status)) + { + return TRUE; + } + CurEntry = CurEntry->Flink; + } + return FALSE; + } + else if (This->Mode == InterruptSyncModeAll) + { + CurEntry = This->ServiceRoutines.Flink; + while (CurEntry != &This->ServiceRoutines) + { + Entry = CONTAINING_RECORD(CurEntry, SYNC_ENTRY, ListEntry); + Status = Entry->SyncRoutine((IInterruptSync*)This, Entry->DynamicContext); + CurEntry = CurEntry->Flink; + } + DPRINT("Returning TRUE with mode InterruptSyncModeAll\n"); + return TRUE; //FIXME + } + else if (This->Mode == InterruptSyncModeRepeat) + { + do + { + Success = FALSE; + CurEntry = This->ServiceRoutines.Flink; + while (CurEntry != &This->ServiceRoutines) + { + Entry = CONTAINING_RECORD(CurEntry, SYNC_ENTRY, ListEntry); + Status = Entry->SyncRoutine((IInterruptSync*)This, Entry->DynamicContext); + if (NT_SUCCESS(Status)) + Success = TRUE; + CurEntry = CurEntry->Flink; + } + }while(Success); + DPRINT("Returning TRUE with mode InterruptSyncModeRepeat\n"); + return TRUE; //FIXME + } + else + { + DPRINT("Unknown mode %u\n", This->Mode); + return FALSE; //FIXME + } +} + + +NTSTATUS +NTAPI +IInterruptSync_fnConnect( + IN IInterruptSync * iface) +{ + IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface; + NTSTATUS Status; + PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor; + + Descriptor = This->ResourceList->lpVtbl->FindTranslatedEntry(This->ResourceList, CmResourceTypeInterrupt, This->ResourceIndex); + if (!Descriptor) + return STATUS_UNSUCCESSFUL; + + if (IsListEmpty(&This->ServiceRoutines)) + return STATUS_UNSUCCESSFUL; + + Status = IoConnectInterrupt(&This->Interrupt, + IInterruptServiceRoutine, + (PVOID)This, + &This->Lock, Descriptor->u.Interrupt.Vector, + Descriptor->u.Interrupt.Level, + Descriptor->u.Interrupt.Level, //FIXME + LevelSensitive, //FIXME + TRUE, //FIXME + Descriptor->u.Interrupt.Affinity, + FALSE); + + return Status; +} + + +VOID +NTAPI +IInterruptSync_fnDisconnect( + IN IInterruptSync * iface) +{ + IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface; + + if (!This->Interrupt) + { + DPRINT("IInterruptSync_Disconnect %p no interrupt connected\n", This); + return; + } + + IoDisconnectInterrupt(This->Interrupt); + This->Interrupt = NULL; +} + +NTSTATUS +NTAPI +IInterruptSync_fnRegisterServiceRoutine( + IN IInterruptSync * iface, + IN PINTERRUPTSYNCROUTINE Routine, + IN PVOID DynamicContext, + IN BOOLEAN First) +{ + PSYNC_ENTRY NewEntry; + IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface; + + NewEntry = ExAllocatePoolWithTag(NonPagedPool, sizeof(SYNC_ENTRY), TAG_PORTCLASS); + if (!NewEntry) + return STATUS_INSUFFICIENT_RESOURCES; + + NewEntry->SyncRoutine = Routine; + NewEntry->DynamicContext = DynamicContext; + + if (First) + InsertHeadList(&This->ServiceRoutines, &NewEntry->ListEntry); + else + InsertTailList(&This->ServiceRoutines, &NewEntry->ListEntry); + + return STATUS_SUCCESS; +} + +static IInterruptSyncVtbl vt_IInterruptSyncVtbl = +{ + /* IUnknown methods */ + IInterruptSync_fnQueryInterface, + IInterruptSync_fnAddRef, + IInterruptSync_fnRelease, + /* IInterruptSync methods */ + IInterruptSync_fnCallSynchronizedRoutine, + IInterruptSync_fnGetKInterrupt, + IInterruptSync_fnConnect, + IInterruptSync_fnDisconnect, + IInterruptSync_fnRegisterServiceRoutine +}; + +/* + * @unimplemented + */ +NTSTATUS NTAPI +PcNewInterruptSync( + OUT PINTERRUPTSYNC* OutInterruptSync, + IN PUNKNOWN OuterUnknown OPTIONAL, + IN PRESOURCELIST ResourceList, + IN ULONG ResourceIndex, + IN INTERRUPTSYNCMODE Mode) +{ + IInterruptSyncImpl * This; + + + if (!OutInterruptSync || !ResourceList || Mode > InterruptSyncModeRepeat || Mode < 0) + return STATUS_INVALID_PARAMETER; + + if (ResourceIndex > ResourceList->lpVtbl->NumberOfEntriesOfType(ResourceList, CmResourceTypeInterrupt)) + return STATUS_INVALID_PARAMETER; + + ResourceList->lpVtbl->AddRef(ResourceList); + + This = ExAllocatePoolWithTag(NonPagedPool, sizeof(IInterruptSyncImpl), TAG_PORTCLASS); + if (!This) + return STATUS_INSUFFICIENT_RESOURCES; + + This->lpVtbl = &vt_IInterruptSyncVtbl; + This->ref = 1; + This->Mode = Mode; + This->Interrupt = NULL; + This->ResourceIndex = ResourceIndex; + This->ResourceList = ResourceList; + InitializeListHead(&This->ServiceRoutines); + KeInitializeSpinLock(&This->Lock); + + *OutInterruptSync = (PINTERRUPTSYNC)&This->lpVtbl; + return STATUS_UNSUCCESSFUL; +} + Propchange: trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1] Mon Dec 8 13:08:07 2008 @@ -15,6 +15,7 @@ <file>dma_slave.c</file> <file>adapter.c</file> <file>irp.c</file> + <file>interrupt.c</file> <file>drm.c</file> <file>stubs.c</file> <file>undoc.c</file> Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c [iso-8859-1] Mon Dec 8 13:08:07 2008 @@ -23,21 +23,6 @@ IN POOL_TYPE PoolType, IN PDEVICE_DESCRIPTION DeviceDescription, IN PDEVICE_OBJECT DeviceObject) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS NTAPI -PcNewInterruptSync( - OUT PINTERRUPTSYNC* OUtInterruptSync, - IN PUNKNOWN OuterUnknown OPTIONAL, - IN PRESOURCELIST ResourceList, - IN ULONG ResourceIndex, - IN INTERRUPTSYNCMODE Mode) { UNIMPLEMENTED; return STATUS_UNSUCCESSFUL;
16 years
1
0
0
0
[janderwald] 37942: - Add IID_IInterruptSync
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Dec 8 13:06:15 2008 New Revision: 37942 URL:
http://svn.reactos.org/svn/reactos?rev=37942&view=rev
Log: - Add IID_IInterruptSync Modified: trunk/reactos/include/ddk/portcls.h Modified: trunk/reactos/include/ddk/portcls.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/portcls.h?rev=…
============================================================================== --- trunk/reactos/include/ddk/portcls.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/portcls.h [iso-8859-1] Mon Dec 8 13:06:15 2008 @@ -694,7 +694,7 @@ IN BOOLEAN WriteToDevice) PURE; \ \ STDMETHOD_(NTSTATUS, Stop)( THIS ) PURE; \ - STDMETHOD_(NTSTATUS, ReadCounter)( THIS ) PURE; \ + STDMETHOD_(ULONG, ReadCounter)( THIS ) PURE; \ \ STDMETHOD_(NTSTATUS, WaitForTC)( THIS_ \ ULONG Timeout) PURE; @@ -705,16 +705,19 @@ IN BOOLEAN WriteToDevice); \ \ STDMETHODIMP_(NTSTATUS) Stop(void); \ - STDMETHODIMP_(NTSTATUS) ReadCounter)(void); \ + STDMETHODIMP_(ULONG) ReadCounter)(void); \ \ STDMETHODIMP_(NTSTATUS, WaitForTC)( \ ULONG Timeout); +#undef INTERFACE +#define INTERFACE IDmaChannelSlave + DECLARE_INTERFACE_(IDmaChannelSlave, IDmaChannel) { - DEFINE_ABSTRACT_UNKNOWN() - DEFINE_ABSTRACT_DMACHANNEL() - DEFINE_ABSTRACT_DMACHANNELSLAVE() + DEFINE_ABSTRACT_UNKNOWN(); + DEFINE_ABSTRACT_DMACHANNEL(); + DEFINE_ABSTRACT_DMACHANNELSLAVE(); }; typedef IDmaChannelSlave *PDMACHANNELSLAVE; @@ -737,6 +740,9 @@ IN struct IInterruptSync* InterruptSync, IN PVOID DynamicContext); +#undef INTERFACE +#define INTERFACE IInterruptSync + DECLARE_INTERFACE_(IInterruptSync, IUnknown) { DEFINE_ABSTRACT_UNKNOWN() @@ -754,6 +760,8 @@ IN PVOID DynamicContext, IN BOOLEAN First) PURE; }; + +DEFINE_GUID(IID_IInterruptSync, 0x22C6AC63L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE); #define IMP_IInterruptSync \ STDMETHODIMP_(NTSTATUS, CallSynchronizedRoutine)( \
16 years
1
0
0
0
[gschneider] 37941: Fix two duplicate checks - obviously copy/pasted, CIDs 74 and 75
by gschneider@svn.reactos.org
Author: gschneider Date: Mon Dec 8 11:02:19 2008 New Revision: 37941 URL:
http://svn.reactos.org/svn/reactos?rev=37941&view=rev
Log: Fix two duplicate checks - obviously copy/pasted, CIDs 74 and 75 Modified: trunk/reactos/dll/win32/imagehlp/modify.c Modified: trunk/reactos/dll/win32/imagehlp/modify.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imagehlp/modify.…
============================================================================== --- trunk/reactos/dll/win32/imagehlp/modify.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/imagehlp/modify.c [iso-8859-1] Mon Dec 8 11:02:19 2008 @@ -1044,7 +1044,7 @@ 0, 0, 0); - if (hMapping == 0) + if (BaseAddress == NULL) { CloseHandle(hMapping); CloseHandle(hFile); @@ -1110,7 +1110,7 @@ 0, 0, 0); - if (hMapping == 0) + if (BaseAddress == NULL) { CloseHandle(hMapping); CloseHandle(hFile);
16 years
1
0
0
0
[gschneider] 37940: - Remove unreachable code, CID 53 - Simplify parameter checks, fix return value, set last error correctly, fix typo
by gschneider@svn.reactos.org
Author: gschneider Date: Mon Dec 8 10:27:28 2008 New Revision: 37940 URL:
http://svn.reactos.org/svn/reactos?rev=37940&view=rev
Log: - Remove unreachable code, CID 53 - Simplify parameter checks, fix return value, set last error correctly, fix typo Modified: trunk/reactos/dll/win32/ws2_32/misc/ns.c Modified: trunk/reactos/dll/win32/ws2_32/misc/ns.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/misc/ns.c…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/misc/ns.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/misc/ns.c [iso-8859-1] Mon Dec 8 10:27:28 2008 @@ -382,7 +382,7 @@ /* - * @implement + * @implemented */ INT EXPORT @@ -396,14 +396,15 @@ int res=0; LONG inetaddr = 0; LPWSTR *bp=NULL; - - SOCKADDR_IN *sockaddr = (SOCKADDR_IN *) lpAddress; - - if (!lpAddressLength || !lpAddress) + SOCKADDR_IN *sockaddr; + + if (!lpAddressLength || !lpAddress || !AddressString) + { + WSASetLastError(WSAEINVAL); return SOCKET_ERROR; - - if (AddressString==NULL) - return WSAEINVAL; + } + + sockaddr = (SOCKADDR_IN *) lpAddress; /* Set right adress family */ if (lpProtocolInfo!=NULL) @@ -421,45 +422,40 @@ } else { - if (!lpAddress) - res = WSAEINVAL; + // translate ip string to ip + + /* rest sockaddr.sin_addr.s_addr + for we need to be sure it is zero when we come to while */ + memset(lpAddress,0,sizeof(SOCKADDR_IN)); + + /* Set right adress family */ + sockaddr->sin_family = AF_INET; + + /* Get port number */ + pos = wcscspn(AddressString,L":") + 1; + + if (pos < (int)wcslen(AddressString)) + sockaddr->sin_port = wcstol(&AddressString[pos], + bp, + 10); + else + sockaddr->sin_port = 0; + + /* Get ip number */ + pos=0; + inetaddr=0; + + while (pos < (int)wcslen(AddressString)) { - // translate now ip string to ip - - /* rest sockaddr.sin_addr.s_addr - for we need to be sure it is zero when we come to while */ - memset(lpAddress,0,sizeof(SOCKADDR_IN)); - - /* Set right adress family */ - sockaddr->sin_family = AF_INET; - - /* Get port number */ - pos = wcscspn(AddressString,L":") + 1; - - if (pos < (int)wcslen(AddressString)) - sockaddr->sin_port = wcstol(&AddressString[pos], - bp, - 10); - - else - sockaddr->sin_port = 0; - - /* Get ip number */ - pos=0; - inetaddr=0; - - while (pos < (int)wcslen(AddressString)) - { - inetaddr = (inetaddr<<8) + ((UCHAR)wcstol(&AddressString[pos], - bp, - 10)); - pos += wcscspn( &AddressString[pos],L".") +1 ; - } - - res = 0; - sockaddr->sin_addr.s_addr = inetaddr; + inetaddr = (inetaddr<<8) + ((UCHAR)wcstol(&AddressString[pos], + bp, + 10)); + pos += wcscspn( &AddressString[pos],L".") +1 ; } + + res = 0; + sockaddr->sin_addr.s_addr = inetaddr; } }
16 years
1
0
0
0
[cwittich] 37939: fix ConvertStringSidToSidW
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Dec 8 09:51:53 2008 New Revision: 37939 URL:
http://svn.reactos.org/svn/reactos?rev=37939&view=rev
Log: fix ConvertStringSidToSidW Modified: trunk/reactos/dll/win32/advapi32/sec/sid.c Modified: trunk/reactos/dll/win32/advapi32/sec/sid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/sid…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/sid.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/sid.c [iso-8859-1] Mon Dec 8 09:51:53 2008 @@ -1793,6 +1793,8 @@ if (*StringSid == '-') StringSid++; + pisid->SubAuthority[i] = atoiW(StringSid); + while (*StringSid) { while (*StringSid && *StringSid != '-') @@ -1800,7 +1802,7 @@ if (*StringSid == '-') StringSid++; - pisid->SubAuthority[i++] = atoiW(StringSid); + pisid->SubAuthority[++i] = atoiW(StringSid); } if (i != pisid->SubAuthorityCount)
16 years
1
0
0
0
[tkreuzer] 37938: revert 37924, which reverted 37889, which works now
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 8 07:43:12 2008 New Revision: 37938 URL:
http://svn.reactos.org/svn/reactos?rev=37938&view=rev
Log: revert 37924, which reverted 37889, which works now Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp branches/ros-amd64-bringup/reactos/tools/rbuild/module.cpp branches/ros-amd64-bringup/reactos/tools/rbuild/project.cpp Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Mon Dec 8 07:43:12 2008 @@ -1434,6 +1434,9 @@ "ifneq ($(ROS_GENERATE_RSYM),no)\n" ); fprintf ( fMakefile, "\t$(ECHO_RSYM)\n" ); + // FIXME! workaround until rsym can extract line numbers from DWARF + fprintf ( fMakefile, + "\t$(Q)${objcopy} -R .debug_abbrev -R .debug_aranges -R .debug_frame -R .debug_info -R .debug_line -R .debug_pubnames -R .debug_macinfo -R .debug_str -R .debug_loc -R .debug_pubtypes -R .debug_ranges -R .debug_static_func -R .debug_static_vars -R .debug_types -R .debug_weaknames $@\n\n" ); fprintf ( fMakefile, "\t$(Q)$(RSYM_TARGET) $@ $@\n\n" ); fprintf ( fMakefile, @@ -2015,16 +2018,6 @@ linkerflags ); } - if ( IsStaticLibrary ( module ) && module.isStartupLib ) - { - fprintf ( fMakefile, - "%s += -Wno-main\n\n", - cflagsMacro.c_str () ); - fprintf ( fMakefile, - "%s += -Wno-main\n\n", - cxxflagsMacro.c_str () ); - } - fprintf ( fMakefile, "\n\n" ); // future references to the macros will be to get their values Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rbuild/module.cpp [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rbuild/module.cpp [iso-8859-1] Mon Dec 8 07:43:12 2008 @@ -745,13 +745,17 @@ name = e.GetAttribute ( "property", true ); assert( name ); const Property *property = project.LookupProperty( name->value ); - if ( !property ) - { - // Property not found - throw InvalidOperationException ( __FILE__, - __LINE__, - "Test on unknown property '%s' at %s", - name->value.c_str (), e.location.c_str () ); + const string *PropertyValue; + const string EmptyString; + + if (property) + { + PropertyValue = &property->value; + } + else + { + // Property does not exist, treat it as being empty + PropertyValue = &EmptyString; } const XMLAttribute* value; @@ -759,7 +763,7 @@ assert( value ); bool negate = ( e.name == "ifnot" ); - bool equality = ( property->value == value->value ); + bool equality = ( *PropertyValue == value->value ); if ( equality == negate ) { // Failed, skip this element Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/project.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rbuild/project.cpp [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rbuild/project.cpp [iso-8859-1] Mon Dec 8 07:43:12 2008 @@ -399,13 +399,17 @@ name = e.GetAttribute ( "property", true ); assert( name ); const Property *property = LookupProperty( name->value ); - if ( !property ) - { - // Property not found - throw InvalidOperationException ( __FILE__, - __LINE__, - "Test on unknown property '%s' at %s", - name->value.c_str (), e.location.c_str () ); + const string *PropertyValue; + const string EmptyString; + + if (property) + { + PropertyValue = &property->value; + } + else + { + // Property does not exist, treat it as being empty + PropertyValue = &EmptyString; } const XMLAttribute* value; @@ -413,7 +417,7 @@ assert( value ); bool negate = ( e.name == "ifnot" ); - bool equality = ( property->value == value->value ); + bool equality = ( *PropertyValue == value->value ); if ( equality == negate ) { // Failed, skip this element
16 years
1
0
0
0
[tkreuzer] 37937: update rsym from trunk
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 8 07:42:25 2008 New Revision: 37937 URL:
http://svn.reactos.org/svn/reactos?rev=37937&view=rev
Log: update rsym from trunk Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c [iso-8859-1] Mon Dec 8 07:42:25 2008 @@ -697,19 +697,23 @@ Length = StartOfRawData; for (Section = 0; Section < OutFileHeader->NumberOfSections; Section++) { + DWORD SizeOfRawData; if (OutRelocSection == OutSectionHeaders + Section) { Data = (void *) ProcessedRelocs; + SizeOfRawData = ProcessedRelocsLength; } else if (RosSymLength > 0 && Section + 1 == OutFileHeader->NumberOfSections) { Data = (void *) PaddedRosSym; + SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData; } else { Data = (void *) ((char *) InData + OutSectionHeaders[Section].PointerToRawData); - } - for (i = 0; i < OutSectionHeaders[Section].SizeOfRawData / 2; i++) + SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData; + } + for (i = 0; i < SizeOfRawData / 2; i++) { CheckSum += ((unsigned short*) Data)[i]; CheckSum = 0xffff & (CheckSum + (CheckSum >> 16)); @@ -730,21 +734,24 @@ { if (0 != OutSectionHeaders[Section].SizeOfRawData) { + DWORD SizeOfRawData; fseek(OutFile, OutSectionHeaders[Section].PointerToRawData, SEEK_SET); if (OutRelocSection == OutSectionHeaders + Section) { Data = (void *) ProcessedRelocs; + SizeOfRawData = ProcessedRelocsLength; } else if (RosSymLength > 0 && Section + 1 == OutFileHeader->NumberOfSections) { Data = (void *) PaddedRosSym; + SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData; } else { Data = (void *) ((char *) InData + OutSectionHeaders[Section].PointerToRawData); - } - if (fwrite(Data, 1, OutSectionHeaders[Section].SizeOfRawData, OutFile) != - OutSectionHeaders[Section].SizeOfRawData) + SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData; + } + if (fwrite(Data, 1, SizeOfRawData, OutFile) != SizeOfRawData) { perror("Error writing section data\n"); free(PaddedRosSym);
16 years
1
0
0
0
[sginsberg] 37936: - 'STATIC' -> 'static'
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Dec 8 07:33:44 2008 New Revision: 37936 URL:
http://svn.reactos.org/svn/reactos?rev=37936&view=rev
Log: - 'STATIC' -> 'static' Modified: trunk/reactos/drivers/video/videoprt/ddc.c Modified: trunk/reactos/drivers/video/videoprt/ddc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/ddc…
============================================================================== --- trunk/reactos/drivers/video/videoprt/ddc.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/videoprt/ddc.c [iso-8859-1] Mon Dec 8 07:33:44 2008 @@ -35,11 +35,11 @@ #define WRITE_SDA(state) (i2c->WriteDataLine(HwDeviceExtension, state)) #define WRITE_SCL(state) (i2c->WriteClockLine(HwDeviceExtension, state)) -STATIC LARGE_INTEGER HalfPeriodDelay = {{0, 70}}; +static LARGE_INTEGER HalfPeriodDelay = {{0, 70}}; #define DELAY_HALF() KeDelayExecutionThread(KernelMode, FALSE, &HalfPeriodDelay) -STATIC BOOL +static BOOL I2CWrite(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Data) { UCHAR Bit; @@ -73,7 +73,7 @@ } -STATIC UCHAR +static UCHAR I2CRead(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, BOOL Ack) { INT Bit = 0x80; @@ -109,7 +109,7 @@ } -STATIC VOID +static VOID I2CStop(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c) { WRITE_SCL(LOW); @@ -121,7 +121,7 @@ } -STATIC BOOL +static BOOL I2CStart(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Address) { /* make sure the bus is free */ @@ -147,7 +147,7 @@ } -STATIC BOOL +static BOOL I2CRepStart(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Address) { /* setup lines for repeated start condition */
16 years
1
0
0
0
[fireball] 37935: - Move KeQueryRuntimeThread declaration to winddk.h (spotted by Stefan Ginsberg).
by fireball@svn.reactos.org
Author: fireball Date: Mon Dec 8 07:13:36 2008 New Revision: 37935 URL:
http://svn.reactos.org/svn/reactos?rev=37935&view=rev
Log: - Move KeQueryRuntimeThread declaration to winddk.h (spotted by Stefan Ginsberg). Modified: trunk/reactos/include/ddk/winddk.h trunk/reactos/ntoskrnl/include/internal/ke.h Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Mon Dec 8 07:13:36 2008 @@ -9874,6 +9874,13 @@ KeQueryPriorityThread( IN PRKTHREAD Thread); +NTKERNELAPI +ULONG +NTAPI +KeQueryRuntimeThread( + IN PKTHREAD Thread, + OUT PULONG UserTime); + #if !defined(_M_AMD64) NTKERNELAPI ULONGLONG Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Mon Dec 8 07:13:36 2008 @@ -721,11 +721,6 @@ KeQueryRuntimeProcess(IN PKPROCESS Process, OUT PULONG UserTime); -ULONG -NTAPI -KeQueryRuntimeThread(IN PKTHREAD Thread, - OUT PULONG UserTime); - /* INITIALIZATION FUNCTIONS *************************************************/ BOOLEAN
16 years
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200