重新定义一些类型,防止由于各种平台和编译器的不同,而产生的类型字节数差异,方便移植。
1typedef unsigned char boolean; /* Boolean value type. */
2typedef unsigned long int uint32; /* Unsigned 32 bit value */
3typedef unsigned short uint16; /* Unsigned 16 bit value */
4typedef unsigned char uint8; /* Unsigned 8 bit value */
5typedef signed long int int32; /* Signed 32 bit value */
6typedef signed short int16; /* Signed 16 bit value */
7typedef signed char int8; /* Signed 8 bit value */
不建议使用:
1typedef unsigned char byte; /* Unsigned 8 bit value type. */
2typedef unsigned short word; /* Unsinged 16 bit value type. */
3typedef unsigned long dword; /* Unsigned 32 bit value type. */
4typedef unsigned char uint1; /* Unsigned 8 bit value type. */
5typedef unsigned short uint2; /* Unsigned 16 bit value type. */
6typedef unsigned long uint4; /* Unsigned 32 bit value type. */
7typedef signed char int1; /* Signed 8 bit value type. */
8typedef signed short int2; /* Signed 16 bit value type. */
9typedef long int int4; /* Signed 32 bit value type. */
10typedef signed long sint31; /* Signed 32 bit value */
11typedef signed short sint15; /* Signed 16 bit value */
12typedef signed char sint7; /* Signed 8 bit value */
|