00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _CX_TYPES_H
00026 #define _CX_TYPES_H
00027
00028 #include <limits.h>
00029 #include <float.h>
00030
00031 #include <cxmacros.h>
00032
00033 CX_BEGIN_DECLS
00034
00035
00036
00037
00038
00039
00040 #define CX_E 2.7182818284590452354e0
00041 #define CX_LN2 6.9314718055994530942e-1
00042 #define CX_LN10 2.3025850929940456840e0
00043 #define CX_PI 3.14159265358979323846e0
00044 #define CX_PI_2 1.57079632679489661923e0
00045 #define CX_PI_4 0.78539816339744830962e0
00046 #define CX_SQRT2 1.4142135623730950488e0
00047
00048
00049
00050
00051
00052
00053 #define CX_MINSHORT SHRT_MIN
00054 #define CX_MAXSHORT SHRT_MAX
00055 #define CX_MAXUSHORT USHRT_MAX
00056 #define CX_MININT INT_MIN
00057 #define CX_MAXINT INT_MAX
00058 #define CX_MAXUINT UINT_MAX
00059 #define CX_MINLONG LONG_MIN
00060 #define CX_MAXLONG LONG_MAX
00061 #define CX_MAXULONG ULONG_MAX
00062
00063 #define CX_MINFLOAT FLT_MIN
00064 #define CX_MAXFLOAT FLT_MAX
00065 #define CX_MINDOUBLE DBL_MIN
00066 #define CX_MAXDOUBLE DBL_MAX
00067
00068
00069 #define CX_MININT64 ((cxint64) 0x8000000000000000)
00070 #define CX_MAXINT64 ((cxint64) 0x7fffffffffffffff)
00071 #define CX_MAXUINT64 ((cxuint64) 0xffffffffffffffff)
00072
00073
00074
00075
00076
00077
00078 typedef signed char cxint8;
00079 typedef unsigned char cxuint8;
00080 typedef signed short cxint16;
00081 typedef unsigned short cxuint16;
00082 typedef signed int cxint32;
00083 typedef unsigned int cxuint32;
00084
00085
00086 CX_GNUC_EXTENSION typedef signed long long cxint64;
00087 CX_GNUC_EXTENSION typedef unsigned long long cxuint64;
00088
00089 typedef cxint32 cxssize;
00090 typedef cxuint32 cxsize;
00091
00092
00093
00094
00095
00096 typedef char cxchar;
00097 typedef short cxshort;
00098 typedef int cxint;
00099 typedef long cxlong;
00100
00101 typedef unsigned char cxbyte;
00102
00103 typedef unsigned char cxuchar;
00104 typedef unsigned short cxushort;
00105 typedef unsigned int cxuint;
00106 typedef unsigned long cxulong;
00107
00108 typedef float cxfloat;
00109 typedef double cxdouble;
00110
00111 typedef void * cxptr;
00112 typedef const void * cxcptr;
00113
00114 typedef int cxbool;
00115
00116
00117
00118
00119
00120
00121 typedef cxint (*cx_compare_func) (cxcptr a, cxcptr b);
00122 typedef cxint (*cx_compare_data_func) (cxcptr a, cxcptr b, cxptr data);
00123
00124 typedef cxbool (*cx_equal_func) (cxcptr a, cxcptr b);
00125
00126 typedef void (*cx_free_func) (cxptr data);
00127
00128 CX_END_DECLS
00129
00130 #endif