[ create a new paste ] login | about

Link: http://codepad.org/ox63dH5e    [ raw code | fork ]

k06a - C++, pasted on Jun 14:
// LittleBigEndianNames.h
//

#include "LittleBigEndian.h"

typedef signed __int8   i8;
typedef signed __int16 i16;
typedef signed __int32 i32;
typedef signed __int64 i64;

typedef unsigned __int8   u8;
typedef unsigned __int16 u16;
typedef unsigned __int32 u32;
typedef unsigned __int64 u64;

#ifdef BIG_ENDIAN

// Little Endian

typedef LittleEndian<i16> i16le;
typedef LittleEndian<i32> i32le;
typedef LittleEndian<i64> i64le;

typedef LittleEndian<u16> u16le;
typedef LittleEndian<u32> u32le;
typedef LittleEndian<u64> u64le;

// Big Endian

typedef i16 i16be;
typedef i32 i32be;
typedef i64 i64be;

typedef u16 u16be;
typedef u32 u32be;
typedef u64 u64be;

#else

// Little Endian

typedef i16 i16le;
typedef i32 i32le;
typedef i64 i64le;

typedef u16 u16le;
typedef u32 u32le;
typedef u64 u64le;

// Big Endian

typedef BigEndian<i16> i16be;
typedef BigEndian<i32> i32be;
typedef BigEndian<i64> i64be;

typedef BigEndian<u16> u16be;
typedef BigEndian<u32> u32be;
typedef BigEndian<u64> u64be;

#endif


Create a new paste based on this one


Comments: