Initial commit of the sharedFoundation library

This commit is contained in:
Anonymous
2014-01-13 06:41:27 -07:00
parent 004d02c834
commit f1479f792b
202 changed files with 27918 additions and 0 deletions
@@ -0,0 +1,58 @@
// ======================================================================
//
// ByteOrder.cpp
// copyright (c) 2001 Sony Online Entertainment
//
// ======================================================================
#include "sharedFoundation/FirstSharedFoundation.h"
#include "sharedFoundation/ByteOrder.h"
// ======================================================================
// I'm using the arguments, but the compiler can't tell that
#pragma warning(disable: 4100)
__declspec(naked) ulong ntohl(ulong netLong)
{
_asm
{
mov eax, [esp+4]
bswap eax
ret
}
} //lint !e533 !e715 // function should return a value, argument not referenced
__declspec(naked) ulong htonl(ulong hostLong)
{
_asm
{
mov eax, [esp+4]
bswap eax
ret
}
} //lint !e533 !e715 // function should return a value, argument not referenced
__declspec(naked) ushort ntohs(ushort netShort)
{
_asm
{
mov eax, [esp+4]
bswap eax
shr eax, 16
ret
}
} //lint !e533 !e715 // function should return a value, argument not referenced
__declspec(naked) ushort htons(ushort hostShort)
{
_asm
{
mov eax, [esp+4]
bswap eax
shr eax, 16
ret
}
} //lint !e533 !e715 // function should return a value, argument not referenced
// ======================================================================