25 #ifndef __UMACHINE_H__
26 #define __UMACHINE_H__
79 # define U_CFUNC extern "C"
80 # define U_CDECL_BEGIN extern "C" {
81 # define U_CDECL_END }
83 # define U_CFUNC extern
84 # define U_CDECL_BEGIN
88 #ifndef U_ATTRIBUTE_DEPRECATED
94 #if U_GCC_MAJOR_MINOR >= 302
95 # define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
101 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
102 # define U_ATTRIBUTE_DEPRECATED __declspec(deprecated)
104 # define U_ATTRIBUTE_DEPRECATED
109 #define U_CAPI U_CFUNC U_EXPORT
111 #define U_STABLE U_CAPI
113 #define U_DRAFT U_CAPI
115 #define U_DEPRECATED U_CAPI U_ATTRIBUTE_DEPRECATED
117 #define U_OBSOLETE U_CAPI
119 #define U_INTERNAL U_CAPI
129 #define U_OVERRIDE override
139 #if !defined(U_FINAL) || defined(U_IN_DOXYGEN)
140 #define U_FINAL final
150 # define INT8_MIN ((int8_t)(-128))
154 # define INT16_MIN ((int16_t)(-32767-1))
158 # define INT32_MIN ((int32_t)(-2147483647-1))
163 # define INT8_MAX ((int8_t)(127))
167 # define INT16_MAX ((int16_t)(32767))
171 # define INT32_MAX ((int32_t)(2147483647))
176 # define UINT8_MAX ((uint8_t)(255U))
180 # define UINT16_MAX ((uint16_t)(65535U))
184 # define UINT32_MAX ((uint32_t)(4294967295U))
187 #if defined(U_INT64_T_UNAVAILABLE)
188 # error int64_t is required for decimal format and rule-based number format.
196 # define INT64_C(c) c ## LL
204 # define UINT64_C(c) c ## ULL
208 # define U_INT64_MIN ((int64_t)(INT64_C(-9223372036854775807)-1))
212 # define U_INT64_MAX ((int64_t)(INT64_C(9223372036854775807)))
214 # ifndef U_UINT64_MAX
216 # define U_UINT64_MAX ((uint64_t)(UINT64_C(18446744073709551615)))
255 #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32)
256 # ifdef __STDC_ISO_10646__
257 # if (U_SIZEOF_WCHAR_T==2)
258 # define U_WCHAR_IS_UTF16
259 # elif (U_SIZEOF_WCHAR_T==4)
260 # define U_WCHAR_IS_UTF32
262 # elif defined __UCS2__
263 # if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T==2)
264 # define U_WCHAR_IS_UTF16
266 # elif defined(__UCS4__) || (U_PLATFORM == U_PF_OS400 && defined(__UTF32__))
267 # if (U_SIZEOF_WCHAR_T==4)
268 # define U_WCHAR_IS_UTF32
270 # elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T==4 && U_PLATFORM_IS_LINUX_BASED)
271 # define U_WCHAR_IS_UTF32
272 # elif U_PLATFORM_HAS_WIN32_API
273 # define U_WCHAR_IS_UTF16
280 #define U_SIZEOF_UCHAR 2
287 #if (U_PLATFORM == U_PF_AIX) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11)
290 # define U_CHAR16_IS_TYPEDEF 1
291 #elif defined(_MSC_VER) && (_MSC_VER < 1900)
294 # define U_CHAR16_IS_TYPEDEF 1
296 # define U_CHAR16_IS_TYPEDEF 0
329 #elif !defined(UCHAR_TYPE)
330 # define UCHAR_TYPE uint16_t
333 #if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
334 defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
336 typedef char16_t
UChar;
337 #elif defined(UCHAR_TYPE)
338 typedef UCHAR_TYPE
UChar;
339 #elif defined(__cplusplus)
340 typedef char16_t
UChar;
364 #if U_SIZEOF_WCHAR_T==2
366 #elif defined(__CHAR16_TYPE__)
409 #define U_SENTINEL (-1)
411 #include "unicode/urename.h"
uint16_t OldUChar
Default ICU 58 definition of UChar.
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
C API: Unicode Properties.
uint16_t UChar
The base type for UTF-16 code units and pointers.
C API: Definitions of integer types of various widths.
int8_t UBool
The ICU boolean type.