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
00135
00136 #if U_HAVE_NAMESPACE
00137 # define U_NAMESPACE_BEGIN namespace U_ICU_NAMESPACE {
00138 # define U_NAMESPACE_END }
00139 # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
00140 # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
00141 #else
00142 # define U_NAMESPACE_BEGIN
00143 # define U_NAMESPACE_END
00144 # define U_NAMESPACE_USE
00145 # define U_NAMESPACE_QUALIFIER
00146 #endif
00147
00149 #define U_CAPI U_CFUNC U_EXPORT
00150 #define U_STABLE U_CAPI
00151 #define U_DRAFT U_CAPI
00152 #define U_DEPRECATED U_CAPI
00153 #define U_OBSOLETE U_CAPI
00154 #define U_INTERNAL U_CAPI
00155
00156
00157
00158
00159
00160 #ifndef INT8_MIN
00161
00162 # define INT8_MIN ((int8_t)(-128))
00163 #endif
00164 #ifndef INT16_MIN
00165
00166 # define INT16_MIN ((int16_t)(-32767-1))
00167 #endif
00168 #ifndef INT32_MIN
00169
00170 # define INT32_MIN ((int32_t)(-2147483647-1))
00171 #endif
00172
00173 #ifndef INT8_MAX
00174
00175 # define INT8_MAX ((int8_t)(127))
00176 #endif
00177 #ifndef INT16_MAX
00178
00179 # define INT16_MAX ((int16_t)(32767))
00180 #endif
00181 #ifndef INT32_MAX
00182
00183 # define INT32_MAX ((int32_t)(2147483647))
00184 #endif
00185
00186 #ifndef UINT8_MAX
00187
00188 # define UINT8_MAX ((uint8_t)(255U))
00189 #endif
00190 #ifndef UINT16_MAX
00191
00192 # define UINT16_MAX ((uint16_t)(65535U))
00193 #endif
00194 #ifndef UINT32_MAX
00195
00196 # define UINT32_MAX ((uint32_t)(4294967295U))
00197 #endif
00198
00199 #if defined(U_INT64_T_UNAVAILABLE)
00200 # error int64_t is required for decimal format and rule-based number format.
00201 #else
00202 # ifndef INT64_C
00203
00208 # define INT64_C(c) c ## LL
00209 # endif
00210 # ifndef UINT64_C
00211
00216 # define UINT64_C(c) c ## ULL
00217 # endif
00218 # ifndef U_INT64_MIN
00219
00220 # define U_INT64_MIN ((int64_t)(INT64_C(-9223372036854775807)-1))
00221 # endif
00222 # ifndef U_INT64_MAX
00223
00224 # define U_INT64_MAX ((int64_t)(INT64_C(9223372036854775807)))
00225 # endif
00226 # ifndef U_UINT64_MAX
00227
00228 # define U_UINT64_MAX ((uint64_t)(UINT64_C(18446744073709551615)))
00229 # endif
00230 #endif
00231
00232
00233
00234
00235
00237 typedef int8_t UBool;
00238
00239 #ifndef TRUE
00240
00241 # define TRUE 1
00242 #endif
00243 #ifndef FALSE
00244
00245 # define FALSE 0
00246 #endif
00247
00248
00249
00250
00251
00252
00253
00254
00261 #ifndef U_HAVE_WCHAR_H
00262 # define U_HAVE_WCHAR_H 1
00263 #endif
00264
00271 #if U_SIZEOF_WCHAR_T==0
00272 # undef U_SIZEOF_WCHAR_T
00273 # define U_SIZEOF_WCHAR_T 4
00274 #endif
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288 #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32)
00289 # ifdef __STDC_ISO_10646__
00290 # if (U_SIZEOF_WCHAR_T==2)
00291 # define U_WCHAR_IS_UTF16
00292 # elif (U_SIZEOF_WCHAR_T==4)
00293 # define U_WCHAR_IS_UTF32
00294 # endif
00295 # elif defined __UCS2__
00296 # if (__OS390__ || __OS400__) && (U_SIZEOF_WCHAR_T==2)
00297 # define U_WCHAR_IS_UTF16
00298 # endif
00299 # elif defined __UCS4__
00300 # if (U_SIZEOF_WCHAR_T==4)
00301 # define U_WCHAR_IS_UTF32
00302 # endif
00303 # elif defined(U_WINDOWS)
00304 # define U_WCHAR_IS_UTF16
00305 # endif
00306 #endif
00307
00308
00309
00311 #define U_SIZEOF_UCHAR 2
00312
00324
00325 #if U_SIZEOF_WCHAR_T==2
00326 typedef wchar_t UChar;
00327 #else
00328 typedef uint16_t UChar;
00329 #endif
00330
00348 typedef int32_t UChar32;
00349
00350
00351
00352
00353
00354
00355
00356
00357 #ifndef U_HIDE_INTERNAL_API
00358
00365 #ifndef U_ALIGN_CODE
00366 # define U_ALIGN_CODE(n)
00367 #endif
00368
00369 #endif
00370
00371 #ifndef U_INLINE
00372 # ifdef XP_CPLUSPLUS
00373 # define U_INLINE inline
00374 # else
00375 # define U_INLINE
00376 # endif
00377 #endif
00378
00379 #include "unicode/urename.h"
00380
00381 #endif