Author: fireball Date: Fri Sep 26 04:42:15 2008 New Revision: 36533
URL: http://svn.reactos.org/svn/reactos?rev=36533&view=rev Log: - Apply Art's bitmap patch from the branch, and change the other 2 functions similarly (bit set & clear).
Modified: trunk/reactos/lib/rtl/bitmap.c
Modified: trunk/reactos/lib/rtl/bitmap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/bitmap.c?rev=36533&... ============================================================================== --- trunk/reactos/lib/rtl/bitmap.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/bitmap.c [iso-8859-1] Fri Sep 26 04:42:15 2008 @@ -440,12 +440,12 @@ RtlClearBit(PRTL_BITMAP BitMapHeader, ULONG BitNumber) { - PULONG Ptr; + PUCHAR Ptr;
if (BitNumber >= BitMapHeader->SizeOfBitMap) return;
- Ptr = (PULONG)BitMapHeader->Buffer + (BitNumber / 32); - *Ptr &= ~(1 << (BitNumber % 32)); + Ptr = (PUCHAR)BitMapHeader->Buffer + (BitNumber / 8); + *Ptr &= ~(1 << (BitNumber % 8)); }
/* @@ -457,7 +457,7 @@ IN ULONG StartingIndex, IN ULONG NumberToClear) { - LPBYTE lpOut; + LPBYTE lpOut;
if (!BitMapHeader || !NumberToClear || StartingIndex >= BitMapHeader->SizeOfBitMap || @@ -540,12 +540,6 @@ return ~0U; }
- - - - - - /* * @implemented */ @@ -557,7 +551,6 @@ { return NTDLL_FindRuns(BitMapHeader, RunArray, SizeOfRunArray, LocateLongestRuns, NTDLL_FindClearRun); } -
/* * @unimplemented @@ -745,9 +738,6 @@ }
- - - /* * @implemented */ @@ -797,14 +787,14 @@ RtlSetBit(PRTL_BITMAP BitMapHeader, ULONG BitNumber) { - PULONG Ptr; + PUCHAR Ptr;
if (BitNumber >= BitMapHeader->SizeOfBitMap) return;
- Ptr = (PULONG)BitMapHeader->Buffer + (BitNumber / 32); - - *Ptr |= (1 << (BitNumber % 32)); + Ptr = (PUCHAR)BitMapHeader->Buffer + (BitNumber / 8); + + *Ptr |= (1 << (BitNumber % 8)); }
@@ -867,14 +857,14 @@ RtlTestBit(PRTL_BITMAP BitMapHeader, ULONG BitNumber) { - PULONG Ptr; + PUCHAR Ptr;
if (BitNumber >= BitMapHeader->SizeOfBitMap) return FALSE;
- Ptr = (PULONG)BitMapHeader->Buffer + (BitNumber / 32); - - return (BOOLEAN)(*Ptr & (1 << (BitNumber % 32))); + Ptr = (PUCHAR)BitMapHeader->Buffer + (BitNumber / 8); + + return (BOOLEAN)(*Ptr & (1 << (BitNumber % 8))); }
/*