📄 xos_stddef.h.svn-base
字号:
#ifndef xOSSTDDEF_H
#define xOSSTDDEF_H
//**************************************************************
//Copyright (C), 2008-2008, AnyLook Co., Ltd.
//File name: xOS_StdDef.h
//Author: AnyLook
//Version: 1.0
//Date: 2008/07/31
//Description:
// xOS typedef file
//Others:
//Function List:
//<Name> <desc>
//Simple
//History:
//<author> <time> <version > <desc>
// AnyLook 2008/07/31 1.0 build this moudle
//**************************************************************
#if defined(COMDEF_H) // guards against a known re-definer
#define _BOOLEAN_DEFINED
#define _UINT32_DEFINED
#define _UINT16_DEFINED
#define _UINT8_DEFINED
#define _INT32_DEFINED
#define _INT16_DEFINED
#define _INT8_DEFINED
#define _UINT64_DEFINED
#define _INT64_DEFINED
#define _BYTE_DEFINED
#endif // #if !defined(COMDEF_H)
// -----------------------------------------------------------------------
// Standard Types
// -----------------------------------------------------------------------
// The following definitions are the same accross platforms. This first
// group are the sanctioned types.
//
#ifndef _BOOLEAN_DEFINED
typedef unsigned char boolean; // Boolean value type.
#define _BOOLEAN_DEFINED
#endif
#ifndef _UINT32_DEFINED
typedef unsigned long int uint32; // Unsigned 32 bit value
#define _UINT32_DEFINED
#endif
#ifndef _UINT16_DEFINED
typedef unsigned short uint16; //Unsigned 16 bit value
#define _UINT16_DEFINED
#endif
#ifndef _UINT8_DEFINED
typedef unsigned char uint8; //Unsigned 8 bit value
#define _UINT8_DEFINED
#endif
#ifndef _INT32_DEFINED
typedef signed long int int32; // Signed 32 bit value
#define _INT32_DEFINED
#endif
#ifndef _INT16_DEFINED
typedef signed short int16; //Signed 16 bit value
#define _INT16_DEFINED
#endif
#ifndef _INT8_DEFINED
typedef signed char int8; //Signed 8 bit value
#define _INT8_DEFINED
#endif
#if defined(__GNUC__)
#define __int64 long long
#endif
#ifndef _UINT64_DEFINED
typedef unsigned __int64 uint64; //Unsigned 64 bit value
#define _UINT64_DEFINED
#endif
#ifndef _INT64_DEFINED
typedef __int64 int64; // Signed 64 bit value
#define _INT64_DEFINED
#endif
#ifndef _BYTE_DEFINED
typedef unsigned char byte; // byte type
#define _BYTE_DEFINED
#endif
#ifndef _WCHAR_DEFINED
typedef uint16 wchar;
#define _WCHAR_DEFINED
#endif
// -----------------------------------------------------------------------
// Function Calling Conventions
// -----------------------------------------------------------------------
#ifndef CDECL
#ifdef _MSC_VER
#define CDECL __cdecl
#else
#define CDECL
#endif // _MSC_VER
#endif //CDECL
// -----------------------------------------------------------------------
// Constants
// -----------------------------------------------------------------------
#ifndef TRUE
#define TRUE 1 // Boolean true value.
#endif
#ifndef FALSE
#define FALSE 0 // Boolean false value.
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef MIN_INT8
#define MIN_INT8 -128
#endif
#ifndef MIN_INT16
#define MIN_INT16 -32768
#endif
#ifndef MIN_INT32
#define MIN_INT32 (~0x7fffffff) // -2147483648 is unsigned
#endif
#ifndef MIN_INT64
#define MIN_INT64 (~0x7fffffffffffffffLL) // -9223372036854775808 is unsigned
#endif
#ifndef MAX_INT8
#define MAX_INT8 127
#endif
#ifndef MAX_INT16
#define MAX_INT16 32767
#endif
#ifndef MAX_INT32
#define MAX_INT32 2147483647
#endif
#ifndef MAX_INT64
#define MAX_INT64 9223372036854775807LL
#endif
#ifndef MAX_UINT8
#define MAX_UINT8 255
#endif
#ifndef MAX_UINT16
#define MAX_UINT16 65535
#endif
#ifndef MAX_UINT32
#define MAX_UINT32 4294967295u
#endif
#ifndef MAX_UINT64
#define MAX_UINT64 18446744073709551615uLL
#endif
#ifndef MIN_AECHAR
#define MIN_AECHAR 0
#endif
#ifndef MAX_AECHAR
#define MAX_AECHAR 65535
#endif
// -----------------------------------------------------------------------
// Preprocessor helpers
// -----------------------------------------------------------------------
#define __STR__(x) #x
#define __TOSTR__(x) __STR__(x)
#define __FILE_LINE__ __FILE__ ":" __TOSTR__(__LINE__)
//
//=======================================================================
// DATA STRUCTURES DOCUMENTATION
//=======================================================================
//
//boolean
//
//Description:
// This type is used to express boolean values (TRUE or FALSE).
//
//Definition:
// typedef unsigned char boolean
//
//=======================================================================
//
//uint32
//
//Description:
// This is a 32-bit unsigned integer.
//
//Definition:
// typedef unsigned long int uint32
//
//=======================================================================
//
//uint16
//
//Description:
// This is a 16-bit unsigned integer.
//
//Definition:
// typedef unsigned short uint16
//
//=======================================================================
//
//uint8
//
//Description:
// This is an 8-bit unsigned integer.
//
//Definition:
// typedef unsigned char uint8
//
//=======================================================================
//
//int32
//
//Description:
// This is a 32-bit signed integer.
//
//Definition:
// typedef signed long int int32
//
//=======================================================================
//
//int16
//
//Description:
// This is a 16-bit signed integer.
//
//Definition:
// typedef signed short int16
//
//=======================================================================
//
//int8
//
//Description:
// This is an 8-bit signed integer.
//
//Definition:
// typedef signed char int8
//
//=======================================================================
//
//uint64
//
//Description:
// This is a 64-bit unsigned integer.
//
//Definition:
// typedef unsigned __int64 uint64
//
//=======================================================================
//
//int64
//
//Description:
// This is a 64-bit signed integer.
//
//Definition:
// typedef __int64 int64
//
//=======================================================================
//
//byte
//
//Description:
// This is a byte.
//
//Definition:
// typedef unsigned char byte
//
//=======================================================================
//
//AEEUID
//
//Description:
// This is a BREW unique ID. Used to express unique types, interfaces, classes
// groups and privileges. The BREW ClassID Generator generates
// unique IDs that can be used anywhere you need a new AEEIID, AEECLSID,
// or AEEPRIVID.
//
//Definition:
// typedef uint32 AEEUID
//
//=======================================================================
//
//AEEIID
//
//Description:
// This is an interface ID type, used to denote a BREW interface. It is a special case
// of AEEUID.
//
//Definition:
// typedef uint32 AEEIID
//
//=======================================================================
//
//AEECLSID
//
//Description:
// This is a classe ID type, used to denote a BREW class. It is a special case
// of AEEUID.
//
//Definition:
// typedef uint32 AEECLSID
//
//=======================================================================
//
//AEEPRIVID
//
//Description:
// This is a privilege ID type, used to express a privilege. It is a special case
// of AEEUID.
//
//Definition:
// typedef uint32 AEEPRIVID
//
//=======================================================================
//
//AECHAR
//
//Description:
// This is a 16-bit character type.
//
//Definition:
// typedef uint16 AECHAR
//
//
//=======================================================================
//CONSTANTS DOCUMENTATION
//=======================================================================
//
//TRUE
//
//Description:
// TRUE is the boolean "true."
//
//Definition:
//
// #define TRUE 1
//
//=======================================================================
//
//FALSE
//
//Description:
// FALSE is the boolean "false."
//
//Definition:
//
// #define FALSE 0
//
//=======================================================================
//
//NULL
//
//Description:
// NULL is the null value, usually used to test a pointer.
//
//Definition:
//
// #define NULL 0
//
//
//=======================================================================
//
//MIN_INT8
//
//Description:
// MIN_INT8 is the minimum signed 8-bit integer value.
//
//Definition:
//
// #define MIN_INT8 -128
//
//=======================================================================
//
//MIN_INT16
//
//Description:
// MIN_INT16 is the minimum signed 16-bit integer value
//
//Definition:
//
// #define MIN_INT16 -32768
//
//
//=======================================================================
//
//MIN_INT32
//
//Description:
// MIN_INT32 is the minimum signed 32-bit integer value.
//
//Definition:
//
// #define MIN_INT32 (~0x7fffffff)
//
//Comments:
// We use (~0x7fffffff), because -2147483648 is treated as unsigned by
// compilers
//
//=======================================================================
//
//MIN_INT64
//
//Description:
// MIN_INT64 is the minimum signed 64-bit integer value.
//
//Definition:
//
// #define MIN_INT64 (~0x7fffffffffffffffll)
//
//Comments:
// We use (~0x7fffffffffffffffll), because -9223372036854775808 is
// treated as unsigned by compilers
//
//=======================================================================
//
//MAX_INT8
//
//Description:
// MAX_INT8 is the maximum signed 8-bit integer value
//
//Definition:
//
// #define MAX_INT8 127
//
//=======================================================================
//
//MAX_INT16
//
//Description:
// MAX_INT16 is the maximum signed 16-bit integer value.
//
//Definition:
//
// #define MAX_INT16 32767
//
//=======================================================================
//
//MAX_INT32
//
//Description:
// MAX_INT32 is the maximum signed 32-bit integer value.
//
//Definition:
//
// #define MAX_INT32 2147483647
//
//=======================================================================
//
//MAX_INT64
//
//Description:
// MAX_INT64 is the maximum signed 64-bit integer value.
//
//Definition:
//
// #define MAX_INT64 9223372036854775807ll
//
//=======================================================================
//
//MAX_UINT8
//
//Description:
// MAX_UINT8 is the maximum unsigned 8-bit integer value.
//
//Definition:
//
// #define MAX_UINT8 255
//
//=======================================================================
//
//MAX_UINT16
//
//Description:
// MAX_UINT16 is the maximum unsigned 16-bit integer value.
//
//Definition:
//
// #define MAX_UINT16 65535
//
//=======================================================================
//
//MAX_UINT32
//
//Description:
// MAX_UINT32 is the maximum unsigned 32-bit integer value.
//
//Definition:
//
// #define MAX_UINT32 4294967295u
//
//
//=======================================================================
//
//MAX_UINT64
//
//Description:
// MAX_UINT64 is the maximum unsigned 64-bit integer value.
//
//Definition:
//
// #define MAX_UINT64 18446744073709551615ull
//
//=======================================================================
//
//MIN_AECHAR
//
//Description:
// MIN_AECHAR is the minimum AECHAR value.
//
//Definition:
//
// #define MIN_AECHAR 0
//
//=======================================================================
//
//MAX_AECHAR
//
//Description:
// MAX_AECHAR is the maximum AECHAR value.
//
//Definition:
//
// #define MAX_AECHAR 65535
//
//=======================================================================
//MACROS DOCUMENTATION
//=======================================================================
//
//__STR__()
//
//Description:
// The __STR__() makes a token into a string, used to string-ize things already
// defined.
//
//Definition:
//
// #define __STR__(x) #x
//
//Parameters:
// x: token to make into a string
//
//=======================================================================
//
//__TOSTR__()
//
//Description:
// The __TOSTR__() makes a token's value into a string, used to string-ize things
// already defined, used with __STR__.
//
//Definition:
//
// #define __TOSTR__(x) __STR__(x)
//
//Parameters:
// x: token to evaluate and string-ize
//
//Evaluation Value:
// the token's replacement as a string
//
//=======================================================================
//
//__FILE_LINE__
//
//Description:
// The compiler's __FILE__ (a string) and __LINE__ (an integer) are pasted
// together as a single string with a ":" between.
//
//Definition:
//
// #define __FILE_LINE__ __FILE__ ":" __TOSTR__(__LINE__)
//
//Evaluation Value:
// __FILE__":""__LINE__"
//
//=======================================================================
#endif //xOSSTDDEF_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -