00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __UMACHINE_H__
00024 #define __UMACHINE_H__
00025
00026
00039
00040
00041
00042
00043
00044 #if defined(U_PALMOS)
00045 # include "unicode/ppalmos.h"
00046 #elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
00047 # include "unicode/pwin32.h"
00048 #else
00049 # include "unicode/platform.h"
00050 #endif
00051
00052
00053
00054
00055
00056 #include <stddef.h>
00057
00058
00059
00060
00061
00062
00063 #ifdef __cplusplus
00064 # ifndef XP_CPLUSPLUS
00065 # define XP_CPLUSPLUS
00066 # endif
00067 #else
00068 # undef XP_CPLUSPLUS
00069 #endif
00070
00071
00072
00073
00074
00075
00076
00095 #ifdef XP_CPLUSPLUS
00096 # define U_CFUNC extern "C"
00097 # define U_CDECL_BEGIN extern "C" {
00098 # define U_CDECL_END }
00099 #else
00100 # define U_CFUNC extern
00101 # define U_CDECL_BEGIN
00102 # define U_CDECL_END
00103 #endif
00104
00106 #define U_CAPI U_CFUNC U_EXPORT
00107 #define U_STABLE U_CAPI
00108 #define U_DRAFT U_CAPI
00109 #define U_DEPRECATED U_CAPI
00110 #define U_OBSOLETE U_CAPI
00111 #define U_INTERNAL U_CAPI
00112
00113
00114
00115
00116
00117 #ifndef INT8_MIN
00118
00119 # define INT8_MIN ((int8_t)(-128))
00120 #endif
00121 #ifndef INT16_MIN
00122
00123 # define INT16_MIN ((int16_t)(-32767-1))
00124 #endif
00125 #ifndef INT32_MIN
00126
00127 # define INT32_MIN ((int32_t)(-2147483647-1))
00128 #endif
00129
00130 #ifndef INT8_MAX
00131
00132 # define INT8_MAX ((int8_t)(127))
00133 #endif
00134 #ifndef INT16_MAX
00135
00136 # define INT16_MAX ((int16_t)(32767))
00137 #endif
00138 #ifndef INT32_MAX
00139
00140 # define INT32_MAX ((int32_t)(2147483647))
00141 #endif
00142
00143 #ifndef UINT8_MAX
00144
00145 # define UINT8_MAX ((uint8_t)(255U))
00146 #endif
00147 #ifndef UINT16_MAX
00148
00149 # define UINT16_MAX ((uint16_t)(65535U))
00150 #endif
00151 #ifndef UINT32_MAX
00152
00153 # define UINT32_MAX ((uint32_t)(4294967295U))
00154 #endif
00155
00156 #if defined(U_INT64_T_UNAVAILABLE)
00157 # error int64_t is required for decimal format and rule-based number format.
00158 #else
00159 # ifndef INT64_C
00160
00165 # define INT64_C(c) c ## LL
00166 # endif
00167 # ifndef UINT64_C
00168
00173 # define UINT64_C(c) c ## ULL
00174 # endif
00175 # ifndef U_INT64_MIN
00176
00177 # define U_INT64_MIN ((int64_t)(INT64_C(-9223372036854775807)-1))
00178 # endif
00179 # ifndef U_INT64_MAX
00180
00181 # define U_INT64_MAX ((int64_t)(INT64_C(9223372036854775807)))
00182 # endif
00183 # ifndef U_UINT64_MAX
00184
00185 # define U_UINT64_MAX ((uint64_t)(UINT64_C(18446744073709551615)))
00186 # endif
00187 #endif
00188
00189
00190
00191
00192
00194 typedef int8_t UBool;
00195
00196 #ifndef TRUE
00197
00198 # define TRUE 1
00199 #endif
00200 #ifndef FALSE
00201
00202 # define FALSE 0
00203 #endif
00204
00205
00206
00207
00208
00209
00210
00211
00218 #ifndef U_HAVE_WCHAR_H
00219 # define U_HAVE_WCHAR_H 1
00220 #endif
00221
00228 #if U_SIZEOF_WCHAR_T==0
00229 # undef U_SIZEOF_WCHAR_T
00230 # define U_SIZEOF_WCHAR_T 4
00231 #endif
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245 #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32)
00246 # ifdef __STDC_ISO_10646__
00247 # if (U_SIZEOF_WCHAR_T==2)
00248 # define U_WCHAR_IS_UTF16
00249 # elif (U_SIZEOF_WCHAR_T==4)
00250 # define U_WCHAR_IS_UTF32
00251 # endif
00252 # elif defined __UCS2__
00253 # if (__OS390__ || __OS400__) && (U_SIZEOF_WCHAR_T==2)
00254 # define U_WCHAR_IS_UTF16
00255 # endif
00256 # elif defined __UCS4__
00257 # if (U_SIZEOF_WCHAR_T==4)
00258 # define U_WCHAR_IS_UTF32
00259 # endif
00260 # elif defined(U_WINDOWS)
00261 # define U_WCHAR_IS_UTF16
00262 # endif
00263 #endif
00264
00265
00266
00268 #define U_SIZEOF_UCHAR 2
00269
00281
00282 #if U_SIZEOF_WCHAR_T==2
00283 typedef wchar_t UChar;
00284 #else
00285 typedef uint16_t UChar;
00286 #endif
00287
00305 typedef int32_t UChar32;
00306
00307
00308
00309
00310
00311
00312
00313
00314 #ifndef U_HIDE_INTERNAL_API
00315
00322 #ifndef U_ALIGN_CODE
00323 # define U_ALIGN_CODE(n)
00324 #endif
00325
00326 #endif
00327
00328 #ifndef U_INLINE
00329 # ifdef XP_CPLUSPLUS
00330 # define U_INLINE inline
00331 # else
00332 # define U_INLINE
00333 # endif
00334 #endif
00335
00336 #include "unicode/urename.h"
00337
00338 #endif