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
00026
00027
00028
00029
00030
00031
00032 #ifndef UTYPES_H
00033 #define UTYPES_H
00034
00035 #include "unicode/umachine.h"
00036 #include "unicode/utf.h"
00037
00048
00049
00050
00051
00089 #define U_ASCII_FAMILY 0
00090 #define U_EBCDIC_FAMILY 1
00091
00092 #ifndef U_CHARSET_FAMILY
00093 # define U_CHARSET_FAMILY 0
00094 #endif
00095
00096
00097
00098
00099
00101 #define U_ICU_VERSION "1.7"
00102
00104 #define U_ICU_VERSION_SHORT "17"
00105
00107 #define U_MAX_VERSION_LENGTH 4
00108
00110 #define U_VERSION_DELIMITER '.'
00111
00113 #define U_MAX_VERSION_STRING_LENGTH 20
00114
00116 typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
00117
00118
00119
00120
00121
00131 #if U_CHARSET_FAMILY
00132 # if U_IS_BIG_ENDIAN
00133
00134 # define U_ICUDATA_TYPE_LETTER "e"
00135 # else
00136 # error "Don't know what to do with little endian EBCDIC!"
00137 # define U_ICUDATA_TYPE_LETTER "x"
00138 # endif
00139 #else
00140 # if U_IS_BIG_ENDIAN
00141
00142 # define U_ICUDATA_TYPE_LETTER "b"
00143 # else
00144
00145 # define U_ICUDATA_TYPE_LETTER "l"
00146 # endif
00147 #endif
00148
00151 #define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
00152
00158 #if defined(OS390) && defined(XP_CPLUSPLUS)
00159 # define U_CALLCONV __cdecl
00160 #else
00161 # define U_CALLCONV
00162 #endif
00163
00168 #ifndef NULL
00169 #ifdef XP_CPLUSPLUS
00170 #define NULL 0
00171 #else
00172 #define NULL ((void *)0)
00173 #endif
00174 #endif
00175
00180 #ifndef U_MAX_PTR
00181 #define U_MAX_PTR ((void*)-1)
00182 #endif
00183
00184
00185
00186
00187
00194 typedef double UDate;
00195
00196
00197 #define U_MILLIS_PER_SECOND (1000)
00198 #define U_MILLIS_PER_MINUTE (60000)
00199 #define U_MILLIS_PER_HOUR (3600000)
00200 #define U_MILLIS_PER_DAY (86400000)
00201
00202
00203
00204
00205
00206
00249 typedef void* UClassID;
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00278 #ifdef U_COMMON_IMPLEMENTATION
00279 #define U_COMMON_API U_EXPORT
00280 #define U_I18N_API U_IMPORT
00281 #define U_LAYOUT_API U_IMPORT
00282 #elif defined(U_I18N_IMPLEMENTATION)
00283 #define U_COMMON_API U_IMPORT
00284 #define U_I18N_API U_EXPORT
00285 #define U_LAYOUT_API U_IMPORT
00286 #elif defined(U_LAYOUT_IMPLEMENTATION)
00287 #define U_COMMON_API U_IMPORT
00288 #define U_I18N_API U_IMPORT
00289 #define U_LAYOUT_API U_EXPORT
00290 #else
00291 #define U_COMMON_API U_IMPORT
00292 #define U_I18N_API U_IMPORT
00293 #define U_LAYOUT_API U_IMPORT
00294 #endif
00295
00300 #ifdef __cplusplus
00301 #define U_STANDARD_CPP_NAMESPACE ::
00302 #else
00303 #define U_STANDARD_CPP_NAMESPACE
00304 #endif
00305
00306
00307
00308
00309
00323 enum UErrorCode {
00324 U_ERROR_INFO_START = -128,
00325 U_USING_FALLBACK_ERROR = -128,
00326 U_USING_DEFAULT_ERROR = -127,
00327 U_ERROR_INFO_LIMIT,
00329 U_ZERO_ERROR = 0,
00331 U_ILLEGAL_ARGUMENT_ERROR = 1,
00332 U_MISSING_RESOURCE_ERROR = 2,
00333 U_INVALID_FORMAT_ERROR = 3,
00334 U_FILE_ACCESS_ERROR = 4,
00335 U_INTERNAL_PROGRAM_ERROR = 5,
00336 U_MESSAGE_PARSE_ERROR = 6,
00337 U_MEMORY_ALLOCATION_ERROR = 7,
00338 U_INDEX_OUTOFBOUNDS_ERROR = 8,
00339 U_PARSE_ERROR = 9,
00340 U_INVALID_CHAR_FOUND = 10,
00341 U_TRUNCATED_CHAR_FOUND = 11,
00342 U_ILLEGAL_CHAR_FOUND = 12,
00343 U_INVALID_TABLE_FORMAT = 13,
00344 U_INVALID_TABLE_FILE = 14,
00345 U_BUFFER_OVERFLOW_ERROR = 15,
00346 U_UNSUPPORTED_ERROR = 16,
00347 U_RESOURCE_TYPE_MISMATCH = 17,
00348 U_ILLEGAL_ESCAPE_SEQUENCE = 18,
00349 U_UNSUPPORTED_ESCAPE_SEQUENCE = 19,
00350 U_ERROR_LIMIT
00351 };
00352
00353 #ifndef XP_CPLUSPLUS
00354 typedef enum UErrorCode UErrorCode;
00355 #endif
00356
00357
00358
00359
00360 #ifdef XP_CPLUSPLUS
00361
00365 inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); }
00370 inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); }
00371 #else
00372
00376 # define U_SUCCESS(x) ((x)<=U_ZERO_ERROR)
00377
00381 # define U_FAILURE(x) ((x)>U_ZERO_ERROR)
00382 #endif
00383
00389 U_CAPI const char * U_EXPORT2
00390 u_errorName(UErrorCode code);
00391
00392 #define U_COPYRIGHT_STRING \
00393 " Copyright (C) 2000, International Business Machines Corporation and others. All Rights Reserved. "
00394
00395 #define U_COPYRIGHT_STRING_LENGTH 160
00396
00401 typedef void *UMTX;
00402
00403
00404
00405
00406
00407 #include "unicode/putil.h"
00408
00409 #endif