📄 typedefs.h
字号:
/*********************************************************************************** GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001* R99 Version 3.3.0 * REL-4 Version 4.1.0 *********************************************************************************** File : typedefs.h* Description : Definition of platform independent data* types and constants*** The following platform independent data types and corresponding* preprocessor (#define) constants are defined:** defined type meaning corresponding constants* ----------------------------------------------------------* Char character (none)* Bool boolean true, false* Word8 8-bit signed minWord8, maxWord8* UWord8 8-bit unsigned minUWord8, maxUWord8* Word16 16-bit signed minWord16, maxWord16* UWord16 16-bit unsigned minUWord16, maxUWord16* Word32 32-bit signed minWord32, maxWord32* UWord32 32-bit unsigned minUWord32, maxUWord32* Float floating point minFloat, maxFloat*** The following compile switches are #defined:** PLATFORM string indicating platform progam is compiled on* possible values: "OSF", "PC", "SUN"** OSF only defined if the current platform is an Alpha* PC only defined if the current platform is a PC* SUN only defined if the current platform is a Sun* * LSBFIRST is defined if the byte order on this platform is* "least significant byte first" -> defined on DEC Alpha* and PC, undefined on Sun**********************************************************************************/#ifndef typedefs_h#define typedefs_h "$Id $"/********************************************************************************** INCLUDE FILES*********************************************************************************///#include <float.h>//#include <limits.h>/********************************************************************************** DEFINITION OF CONSTANTS *********************************************************************************//* ********* define char type */typedef char Char;/* ********* define 8 bit signed/unsigned types & constants */typedef signed char Word8;#define minWord8 (-128)#define maxWord8 127typedef unsigned char UWord8;#define minUWord8 0#define maxUWord8 0xff/* ********* define 16 bit signed/unsigned types & constants */typedef short Word16;#define minWord16 (-32768) /* minimum (signed) short value */#define maxWord16 32767 /* maximum (signed) short value */typedef unsigned short UWord16;#define minUWord16 0#define maxUWord16 0xffff /* maximum unsigned short value *//* ********* define 32 bit signed/unsigned types & constants */typedef int Word32;#define minWord32 (-2147483647 - 1) /* minimum (signed) int value */#define maxWord32 2147483647 /* maximum (signed) int value */typedef unsigned int UWord32;#define minUWord32 0#define maxUWord32 0xffffffff /* maximum unsigned int value *//* ********* define floating point type & constants *//* use "#if 0" below if Float should be double; use "#if 1" below if Float should be float */typedef double Float;#define maxFloat 1.7976931348623158e+308 /* max value */#define minFloat 2.2250738585072014e-308 /* min positive value *//* ********* define complex type */typedef struct { Float r; /* real part */ Float i; /* imaginary part */} CPX;/* ********* define boolean type */typedef int Bool;#define false 0#define true 1/* ********* Check current platform */#if defined(__MSDOS__)#define PC#define PLATFORM "PC"#define LSBFIRST#elif defined(__osf__)#define OSF#define PLATFORM "OSF"#define LSBFIRST#elif defined(__sun__) || defined(__sun)#define SUN#define PLATFORM "SUN"#undef LSBFIRST#elif defined(linux) && defined(i386)#define PC#define PLATFORM "PC"#define LSBFIRST#else#error "can't determine architecture; adapt typedefs.h to your platform"#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -