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
00092 #define U_ASCII_FAMILY 0
00093 #define U_EBCDIC_FAMILY 1
00094
00095 #ifndef U_CHARSET_FAMILY
00096 # define U_CHARSET_FAMILY 0
00097 #endif
00098
00099
00100
00101
00102
00104 #define U_ICU_VERSION_MAJOR_NUM 1
00105
00107 #define U_ICU_VERSION_MINOR_NUM 8
00108
00110 #define U_ICU_VERSION_PATCHLEVEL_NUM 0
00111
00113 #define U_ICU_VERSION "1.8"
00114
00116 #define U_ICU_VERSION_SHORT "18"
00117
00119 #define U_MAX_VERSION_LENGTH 4
00120
00122 #define U_VERSION_DELIMITER '.'
00123
00125 #define U_MAX_VERSION_STRING_LENGTH 20
00126
00128 typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
00129
00130
00131
00132
00133
00143 #if U_CHARSET_FAMILY
00144 # if U_IS_BIG_ENDIAN
00145
00146 # define U_ICUDATA_TYPE_LETTER "e"
00147 # else
00148 # error "Don't know what to do with little endian EBCDIC!"
00149 # define U_ICUDATA_TYPE_LETTER "x"
00150 # endif
00151 #else
00152 # if U_IS_BIG_ENDIAN
00153
00154 # define U_ICUDATA_TYPE_LETTER "b"
00155 # else
00156
00157 # define U_ICUDATA_TYPE_LETTER "l"
00158 # endif
00159 #endif
00160
00163 #define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
00164
00170 #if defined(OS390) && defined(XP_CPLUSPLUS)
00171 # define U_CALLCONV __cdecl
00172 #else
00173 # define U_CALLCONV
00174 #endif
00175
00180 #ifndef NULL
00181 #ifdef XP_CPLUSPLUS
00182 #define NULL 0
00183 #else
00184 #define NULL ((void *)0)
00185 #endif
00186 #endif
00187
00188
00189
00190
00191
00198 typedef double UDate;
00199
00200
00201 #define U_MILLIS_PER_SECOND (1000)
00202 #define U_MILLIS_PER_MINUTE (60000)
00203 #define U_MILLIS_PER_HOUR (3600000)
00204 #define U_MILLIS_PER_DAY (86400000)
00205
00206
00207
00208
00209
00210
00253 typedef void* UClassID;
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00291 #if defined(U_COMBINED_IMPLEMENTATION)
00292 #define U_COMMON_API U_EXPORT
00293 #define U_I18N_API U_EXPORT
00294 #define U_LAYOUT_API U_EXPORT
00295 #elif defined(U_COMMON_IMPLEMENTATION)
00296 #define U_COMMON_API U_EXPORT
00297 #define U_I18N_API U_IMPORT
00298 #define U_LAYOUT_API U_IMPORT
00299 #elif defined(U_I18N_IMPLEMENTATION)
00300 #define U_COMMON_API U_IMPORT
00301 #define U_I18N_API U_EXPORT
00302 #define U_LAYOUT_API U_IMPORT
00303 #elif defined(U_LAYOUT_IMPLEMENTATION)
00304 #define U_COMMON_API U_IMPORT
00305 #define U_I18N_API U_IMPORT
00306 #define U_LAYOUT_API U_EXPORT
00307 #else
00308 #define U_COMMON_API U_IMPORT
00309 #define U_I18N_API U_IMPORT
00310 #define U_LAYOUT_API U_IMPORT
00311 #endif
00312
00317 #ifdef __cplusplus
00318 #define U_STANDARD_CPP_NAMESPACE ::
00319 #else
00320 #define U_STANDARD_CPP_NAMESPACE
00321 #endif
00322
00323
00324
00325
00326
00340 enum UErrorCode {
00341 U_ERROR_INFO_START = -128,
00342 U_USING_FALLBACK_ERROR = -128,
00343 U_USING_DEFAULT_ERROR = -127,
00344 U_SAFECLONE_ALLOCATED_ERROR = -126,
00345 U_ERROR_INFO_LIMIT,
00347 U_ZERO_ERROR = 0,
00349 U_ILLEGAL_ARGUMENT_ERROR = 1,
00350 U_MISSING_RESOURCE_ERROR = 2,
00351 U_INVALID_FORMAT_ERROR = 3,
00352 U_FILE_ACCESS_ERROR = 4,
00353 U_INTERNAL_PROGRAM_ERROR = 5,
00354 U_MESSAGE_PARSE_ERROR = 6,
00355 U_MEMORY_ALLOCATION_ERROR = 7,
00356 U_INDEX_OUTOFBOUNDS_ERROR = 8,
00357 U_PARSE_ERROR = 9,
00358 U_INVALID_CHAR_FOUND = 10,
00359 U_TRUNCATED_CHAR_FOUND = 11,
00360 U_ILLEGAL_CHAR_FOUND = 12,
00361 U_INVALID_TABLE_FORMAT = 13,
00362 U_INVALID_TABLE_FILE = 14,
00363 U_BUFFER_OVERFLOW_ERROR = 15,
00364 U_UNSUPPORTED_ERROR = 16,
00365 U_RESOURCE_TYPE_MISMATCH = 17,
00366 U_ILLEGAL_ESCAPE_SEQUENCE = 18,
00367 U_UNSUPPORTED_ESCAPE_SEQUENCE = 19,
00368 U_NO_SPACE_AVAILABLE = 20,
00369 U_ERROR_LIMIT
00370 };
00371
00372 #ifndef XP_CPLUSPLUS
00373 typedef enum UErrorCode UErrorCode;
00374 #endif
00375
00376
00377
00378
00379 #ifdef XP_CPLUSPLUS
00380
00384 inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); }
00389 inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); }
00390 #else
00391
00395 # define U_SUCCESS(x) ((x)<=U_ZERO_ERROR)
00396
00400 # define U_FAILURE(x) ((x)>U_ZERO_ERROR)
00401 #endif
00402
00408 U_CAPI const char * U_EXPORT2
00409 u_errorName(UErrorCode code);
00410
00411 #define U_COPYRIGHT_STRING \
00412 " Copyright (C) 2001, International Business Machines Corporation and others. All Rights Reserved. "
00413
00414 #define U_COPYRIGHT_STRING_LENGTH 128
00415
00420 typedef void *UMTX;
00421
00422
00423
00424
00425
00426 #include "unicode/putil.h"
00427
00428 #endif