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