This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes

svn path=/branches/shell32_new-bringup/; revision=51893
This commit is contained in:
Ged Murphy 2011-05-24 18:40:34 +00:00
parent 4596e5e59b
commit 4019caae75
23116 changed files with 0 additions and 1109022 deletions

77
lib/rtl/memgen.c Normal file
View file

@ -0,0 +1,77 @@
/* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/rtl/mem.c
* PURPOSE: Memory functions
* PROGRAMMER: David Welch (welch@mcmail.com)
*/
/* INCLUDES *****************************************************************/
#include <rtl.h>
#define NDEBUG
#include <debug.h>
#undef RtlUlonglongByteSwap
#undef RtlUlongByteSwap
#undef RtlUshortByteSwap
/*************************************************************************
* RtlUshortByteSwap
*
* Swap the bytes of an unsigned short value.
*
* NOTES
* Based on the inline versions in Wine winternl.h
*
* @implemented
*/
USHORT FASTCALL
RtlUshortByteSwap (IN USHORT Source)
{
return (Source >> 8) | (Source << 8);
}
/*************************************************************************
* RtlUlongByteSwap [NTDLL.@]
*
* Swap the bytes of an unsigned int value.
*
* NOTES
* Based on the inline versions in Wine winternl.h
*
* @implemented
*/
ULONG
FASTCALL
RtlUlongByteSwap(
IN ULONG Source
)
{
return ((ULONG)RtlUshortByteSwap((USHORT)Source) << 16) | RtlUshortByteSwap((USHORT)(Source >> 16));
}
/*************************************************************************
* RtlUlonglongByteSwap
*
* Swap the bytes of an unsigned long long value.
*
* PARAMS
* i [I] Value to swap bytes of
*
* RETURNS
* The value with its bytes swapped.
*
* @implemented
*/
ULONGLONG FASTCALL
RtlUlonglongByteSwap (IN ULONGLONG Source)
{
return ((ULONGLONG) RtlUlongByteSwap (Source) << 32) | RtlUlongByteSwap (Source>>32);
}
/* EOF */