ICU 4.6  4.6
utypes.h
Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1996-2010, International Business Machines
00004 *   Corporation and others.  All Rights Reserved.
00005 **********************************************************************
00006 *
00007 *  FILE NAME : UTYPES.H (formerly ptypes.h)
00008 *
00009 *   Date        Name        Description
00010 *   12/11/96    helena      Creation.
00011 *   02/27/97    aliu        Added typedefs for UClassID, int8, int16, int32,
00012 *                           uint8, uint16, and uint32.
00013 *   04/01/97    aliu        Added XP_CPLUSPLUS and modified to work under C as
00014 *                            well as C++.
00015 *                           Modified to use memcpy() for uprv_arrayCopy() fns.
00016 *   04/14/97    aliu        Added TPlatformUtilities.
00017 *   05/07/97    aliu        Added import/export specifiers (replacing the old
00018 *                           broken EXT_CLASS).  Added version number for our
00019 *                           code.  Cleaned up header.
00020 *    6/20/97    helena      Java class name change.
00021 *   08/11/98    stephen     UErrorCode changed from typedef to enum
00022 *   08/12/98    erm         Changed T_ANALYTIC_PACKAGE_VERSION to 3
00023 *   08/14/98    stephen     Added uprv_arrayCopy() for int8_t, int16_t, int32_t
00024 *   12/09/98    jfitz       Added BUFFER_OVERFLOW_ERROR (bug 1100066)
00025 *   04/20/99    stephen     Cleaned up & reworked for autoconf.
00026 *                           Renamed to utypes.h.
00027 *   05/05/99    stephen     Changed to use <inttypes.h>
00028 *   12/07/99    helena      Moved copyright notice string from ucnv_bld.h here.
00029 *******************************************************************************
00030 */
00031 
00032 #ifndef UTYPES_H
00033 #define UTYPES_H
00034 
00035 
00036 #include "unicode/umachine.h"
00037 #include "unicode/utf.h"
00038 #include "unicode/uversion.h"
00039 #include "unicode/uconfig.h"
00040 
00056 #ifdef XP_CPLUSPLUS
00057 #   ifndef U_SHOW_CPLUSPLUS_API
00058 #       define U_SHOW_CPLUSPLUS_API 1
00059 #   endif
00060 #else
00061 #   undef U_SHOW_CPLUSPLUS_API
00062 #   define U_SHOW_CPLUSPLUS_API 0
00063 #endif
00064 
00071 #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API)
00072 #define U_HIDE_DRAFT_API 1
00073 #endif
00074 #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API)
00075 #define U_HIDE_INTERNAL_API 1
00076 #endif
00077 
00078 #ifdef U_HIDE_DRAFT_API
00079 #include "unicode/udraft.h"
00080 #endif
00081 
00082 #ifdef U_HIDE_DEPRECATED_API
00083 #include "unicode/udeprctd.h"
00084 #endif
00085 
00086 #ifdef U_HIDE_DEPRECATED_API
00087 #include "unicode/uobslete.h"
00088 #endif
00089 
00090 #ifdef U_HIDE_INTERNAL_API
00091 #include "unicode/uintrnal.h"
00092 #endif
00093 
00094 #ifdef U_HIDE_SYSTEM_API
00095 #include "unicode/usystem.h"
00096 #endif
00097 
00101 /*===========================================================================*/
00102 /* char Character set family                                                 */
00103 /*===========================================================================*/
00104 
00109 #define U_ASCII_FAMILY 0
00110 
00115 #define U_EBCDIC_FAMILY 1
00116 
00160 #ifndef U_CHARSET_FAMILY
00161 #   define U_CHARSET_FAMILY 0
00162 #endif
00163 
00184 #ifndef U_CHARSET_IS_UTF8
00185 #   define U_CHARSET_IS_UTF8 0
00186 #endif
00187 
00188 /*===========================================================================*/
00189 /* ICUDATA naming scheme                                                     */
00190 /*===========================================================================*/
00191 
00208 #if U_CHARSET_FAMILY
00209 #   if U_IS_BIG_ENDIAN
00210    /* EBCDIC - should always be BE */
00211 #     define U_ICUDATA_TYPE_LETTER "e"
00212 #     define U_ICUDATA_TYPE_LITLETTER e
00213 #   else
00214 #     error "Don't know what to do with little endian EBCDIC!"
00215 #     define U_ICUDATA_TYPE_LETTER "x"
00216 #     define U_ICUDATA_TYPE_LITLETTER x
00217 #   endif
00218 #else
00219 #   if U_IS_BIG_ENDIAN
00220       /* Big-endian ASCII */
00221 #     define U_ICUDATA_TYPE_LETTER "b"
00222 #     define U_ICUDATA_TYPE_LITLETTER b
00223 #   else
00224       /* Little-endian ASCII */
00225 #     define U_ICUDATA_TYPE_LETTER "l"
00226 #     define U_ICUDATA_TYPE_LITLETTER l
00227 #   endif
00228 #endif
00229 
00235 #define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER  
00236 #define U_USRDATA_NAME    "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER  
00237 #define U_USE_USRDATA     1  
00250 #define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM)
00251 
00256 #define U_DEF2_ICUDATA_ENTRY_POINT(major, minor) U_DEF_ICUDATA_ENTRY_POINT(major, minor)
00257 
00261 #ifndef U_DEF_ICUDATA_ENTRY_POINT
00262 /* affected by symbol renaming. See platform.h */
00263 #define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt##major##minor##_dat
00264 #endif
00265 
00277 #if defined(OS390) && defined(XP_CPLUSPLUS)
00278 #    define U_CALLCONV __cdecl
00279 #else
00280 #    define U_CALLCONV U_EXPORT2
00281 #endif
00282 
00288 #ifndef NULL
00289 #ifdef XP_CPLUSPLUS
00290 #define NULL    0
00291 #else
00292 #define NULL    ((void *)0)
00293 #endif
00294 #endif
00295 
00296 /*===========================================================================*/
00297 /* Calendar/TimeZone data types                                              */
00298 /*===========================================================================*/
00299 
00307 typedef double UDate;
00308 
00310 #define U_MILLIS_PER_SECOND        (1000)
00311 
00312 #define U_MILLIS_PER_MINUTE       (60000)
00313 
00314 #define U_MILLIS_PER_HOUR       (3600000)
00315 
00316 #define U_MILLIS_PER_DAY       (86400000)
00317 
00318 
00319 /*===========================================================================*/
00320 /* UClassID-based RTTI */
00321 /*===========================================================================*/
00322 
00365 typedef void* UClassID;
00366 
00367 /*===========================================================================*/
00368 /* Shared library/DLL import-export API control                              */
00369 /*===========================================================================*/
00370 
00371 /*
00372  * Control of symbol import/export.
00373  * ICU is separated into three libraries.
00374  */
00375 
00376 /*
00377  * \def U_COMBINED_IMPLEMENTATION
00378  * Set to export library symbols from inside the ICU library
00379  * when all of ICU is in a single library.
00380  * This can be set as a compiler option while building ICU, and it
00381  * needs to be the first one tested to override U_COMMON_API, U_I18N_API, etc.
00382  * @stable ICU 2.0
00383  */
00384 
00434 #if defined(U_COMBINED_IMPLEMENTATION)
00435 #define U_DATA_API     U_EXPORT
00436 #define U_COMMON_API   U_EXPORT
00437 #define U_I18N_API     U_EXPORT
00438 #define U_LAYOUT_API   U_EXPORT
00439 #define U_LAYOUTEX_API U_EXPORT
00440 #define U_IO_API       U_EXPORT
00441 #define U_TOOLUTIL_API U_EXPORT
00442 #elif defined(U_STATIC_IMPLEMENTATION)
00443 #define U_DATA_API
00444 #define U_COMMON_API
00445 #define U_I18N_API
00446 #define U_LAYOUT_API
00447 #define U_LAYOUTEX_API
00448 #define U_IO_API
00449 #define U_TOOLUTIL_API
00450 #elif defined(U_COMMON_IMPLEMENTATION)
00451 #define U_DATA_API     U_IMPORT
00452 #define U_COMMON_API   U_EXPORT
00453 #define U_I18N_API     U_IMPORT
00454 #define U_LAYOUT_API   U_IMPORT
00455 #define U_LAYOUTEX_API U_IMPORT
00456 #define U_IO_API       U_IMPORT
00457 #define U_TOOLUTIL_API U_IMPORT
00458 #elif defined(U_I18N_IMPLEMENTATION)
00459 #define U_DATA_API     U_IMPORT
00460 #define U_COMMON_API   U_IMPORT
00461 #define U_I18N_API     U_EXPORT
00462 #define U_LAYOUT_API   U_IMPORT
00463 #define U_LAYOUTEX_API U_IMPORT
00464 #define U_IO_API       U_IMPORT
00465 #define U_TOOLUTIL_API U_IMPORT
00466 #elif defined(U_LAYOUT_IMPLEMENTATION)
00467 #define U_DATA_API     U_IMPORT
00468 #define U_COMMON_API   U_IMPORT
00469 #define U_I18N_API     U_IMPORT
00470 #define U_LAYOUT_API   U_EXPORT
00471 #define U_LAYOUTEX_API U_IMPORT
00472 #define U_IO_API       U_IMPORT
00473 #define U_TOOLUTIL_API U_IMPORT
00474 #elif defined(U_LAYOUTEX_IMPLEMENTATION)
00475 #define U_DATA_API     U_IMPORT
00476 #define U_COMMON_API   U_IMPORT
00477 #define U_I18N_API     U_IMPORT
00478 #define U_LAYOUT_API   U_IMPORT
00479 #define U_LAYOUTEX_API U_EXPORT
00480 #define U_IO_API       U_IMPORT
00481 #define U_TOOLUTIL_API U_IMPORT
00482 #elif defined(U_IO_IMPLEMENTATION)
00483 #define U_DATA_API     U_IMPORT
00484 #define U_COMMON_API   U_IMPORT
00485 #define U_I18N_API     U_IMPORT
00486 #define U_LAYOUT_API   U_IMPORT
00487 #define U_LAYOUTEX_API U_IMPORT
00488 #define U_IO_API       U_EXPORT
00489 #define U_TOOLUTIL_API U_IMPORT
00490 #elif defined(U_TOOLUTIL_IMPLEMENTATION)
00491 #define U_DATA_API     U_IMPORT
00492 #define U_COMMON_API   U_IMPORT
00493 #define U_I18N_API     U_IMPORT
00494 #define U_LAYOUT_API   U_IMPORT
00495 #define U_LAYOUTEX_API U_IMPORT
00496 #define U_IO_API       U_IMPORT
00497 #define U_TOOLUTIL_API U_EXPORT
00498 #else
00499 #define U_DATA_API     U_IMPORT
00500 #define U_COMMON_API   U_IMPORT
00501 #define U_I18N_API     U_IMPORT
00502 #define U_LAYOUT_API   U_IMPORT
00503 #define U_LAYOUTEX_API U_IMPORT
00504 #define U_IO_API       U_IMPORT
00505 #define U_TOOLUTIL_API U_IMPORT
00506 #endif
00507 
00513 #ifdef __cplusplus
00514 #define U_STANDARD_CPP_NAMESPACE        ::
00515 #else
00516 #define U_STANDARD_CPP_NAMESPACE
00517 #endif
00518 
00519 
00520 /*===========================================================================*/
00521 /* Global delete operator                                                    */
00522 /*===========================================================================*/
00523 
00524 /*
00525  * The ICU4C library must not use the global new and delete operators.
00526  * These operators here are defined to enable testing for this.
00527  * See Jitterbug 2581 for details of why this is necessary.
00528  *
00529  * Verification that ICU4C's memory usage is correct, i.e.,
00530  * that global new/delete are not used:
00531  *
00532  * a) Check for imports of global new/delete (see uobject.cpp for details)
00533  * b) Verify that new is never imported.
00534  * c) Verify that delete is only imported from object code for interface/mixin classes.
00535  * d) Add global delete and delete[] only for the ICU4C library itself
00536  *    and define them in a way that crashes or otherwise easily shows a problem.
00537  *
00538  * The following implements d).
00539  * The operator implementations crash; this is intentional and used for library debugging.
00540  *
00541  * Note: This is currently only done on Windows because
00542  * some Linux/Unix compilers have problems with defining global new/delete.
00543  * On Windows, U_WINDOWS is defined, and it is _MSC_VER>=1200 for MSVC 6.0 and higher.
00544  */
00545 #if defined(XP_CPLUSPLUS) && defined(U_WINDOWS) && U_DEBUG && U_OVERRIDE_CXX_ALLOCATION && (_MSC_VER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION))
00546 
00547 #ifndef U_HIDE_INTERNAL_API
00548 
00553 inline void *
00554 operator new(size_t /*size*/) {
00555     char *q=NULL;
00556     *q=5; /* break it */
00557     return q;
00558 }
00559 
00560 #ifdef _Ret_bytecap_
00561 /* This is only needed to suppress a Visual C++ 2008 warning for operator new[]. */
00562 _Ret_bytecap_(_Size)
00563 #endif
00564 
00569 inline void *
00570 operator new[](size_t /*size*/) {
00571     char *q=NULL;
00572     *q=5; /* break it */
00573     return q;
00574 }
00575 
00581 inline void
00582 operator delete(void * /*p*/) {
00583     char *q=NULL;
00584     *q=5; /* break it */
00585 }
00586 
00592 inline void
00593 operator delete[](void * /*p*/) {
00594     char *q=NULL;
00595     *q=5; /* break it */
00596 }
00597 
00598 #endif /* U_HIDE_INTERNAL_API */
00599 #endif
00600 
00601 /*===========================================================================*/
00602 /* UErrorCode */
00603 /*===========================================================================*/
00604 
00619 typedef enum UErrorCode {
00620     /* The ordering of U_ERROR_INFO_START Vs U_USING_FALLBACK_WARNING looks weird
00621      * and is that way because VC++ debugger displays first encountered constant,
00622      * which is not the what the code is used for
00623      */
00624 
00625     U_USING_FALLBACK_WARNING  = -128,   
00627     U_ERROR_WARNING_START     = -128,   
00629     U_USING_DEFAULT_WARNING   = -127,   
00631     U_SAFECLONE_ALLOCATED_WARNING = -126, 
00633     U_STATE_OLD_WARNING       = -125,   
00635     U_STRING_NOT_TERMINATED_WARNING = -124,
00637     U_SORT_KEY_TOO_SHORT_WARNING = -123, 
00639     U_AMBIGUOUS_ALIAS_WARNING = -122,   
00641     U_DIFFERENT_UCA_VERSION = -121,     
00643     U_PLUGIN_CHANGED_LEVEL_WARNING = -120, 
00645     U_ERROR_WARNING_LIMIT,              
00648     U_ZERO_ERROR              =  0,     
00650     U_ILLEGAL_ARGUMENT_ERROR  =  1,     
00651     U_MISSING_RESOURCE_ERROR  =  2,     
00652     U_INVALID_FORMAT_ERROR    =  3,     
00653     U_FILE_ACCESS_ERROR       =  4,     
00654     U_INTERNAL_PROGRAM_ERROR  =  5,     
00655     U_MESSAGE_PARSE_ERROR     =  6,     
00656     U_MEMORY_ALLOCATION_ERROR =  7,     
00657     U_INDEX_OUTOFBOUNDS_ERROR =  8,     
00658     U_PARSE_ERROR             =  9,     
00659     U_INVALID_CHAR_FOUND      = 10,     
00660     U_TRUNCATED_CHAR_FOUND    = 11,     
00661     U_ILLEGAL_CHAR_FOUND      = 12,     
00662     U_INVALID_TABLE_FORMAT    = 13,     
00663     U_INVALID_TABLE_FILE      = 14,     
00664     U_BUFFER_OVERFLOW_ERROR   = 15,     
00665     U_UNSUPPORTED_ERROR       = 16,     
00666     U_RESOURCE_TYPE_MISMATCH  = 17,     
00667     U_ILLEGAL_ESCAPE_SEQUENCE = 18,     
00668     U_UNSUPPORTED_ESCAPE_SEQUENCE = 19, 
00669     U_NO_SPACE_AVAILABLE      = 20,     
00670     U_CE_NOT_FOUND_ERROR      = 21,     
00671     U_PRIMARY_TOO_LONG_ERROR  = 22,     
00672     U_STATE_TOO_OLD_ERROR     = 23,     
00673     U_TOO_MANY_ALIASES_ERROR  = 24,     
00675     U_ENUM_OUT_OF_SYNC_ERROR  = 25,     
00676     U_INVARIANT_CONVERSION_ERROR = 26,  
00677     U_INVALID_STATE_ERROR     = 27,     
00678     U_COLLATOR_VERSION_MISMATCH = 28,   
00679     U_USELESS_COLLATOR_ERROR  = 29,     
00680     U_NO_WRITE_PERMISSION     = 30,     
00682     U_STANDARD_ERROR_LIMIT,             
00683     /*
00684      * the error code range 0x10000 0x10100 are reserved for Transliterator
00685      */
00686     U_BAD_VARIABLE_DEFINITION=0x10000,
00687     U_PARSE_ERROR_START = 0x10000,    
00688     U_MALFORMED_RULE,                 
00689     U_MALFORMED_SET,                  
00690     U_MALFORMED_SYMBOL_REFERENCE,     
00691     U_MALFORMED_UNICODE_ESCAPE,       
00692     U_MALFORMED_VARIABLE_DEFINITION,  
00693     U_MALFORMED_VARIABLE_REFERENCE,   
00694     U_MISMATCHED_SEGMENT_DELIMITERS,  
00695     U_MISPLACED_ANCHOR_START,         
00696     U_MISPLACED_CURSOR_OFFSET,        
00697     U_MISPLACED_QUANTIFIER,           
00698     U_MISSING_OPERATOR,               
00699     U_MISSING_SEGMENT_CLOSE,          
00700     U_MULTIPLE_ANTE_CONTEXTS,         
00701     U_MULTIPLE_CURSORS,               
00702     U_MULTIPLE_POST_CONTEXTS,         
00703     U_TRAILING_BACKSLASH,             
00704     U_UNDEFINED_SEGMENT_REFERENCE,    
00705     U_UNDEFINED_VARIABLE,             
00706     U_UNQUOTED_SPECIAL,               
00707     U_UNTERMINATED_QUOTE,             
00708     U_RULE_MASK_ERROR,                
00709     U_MISPLACED_COMPOUND_FILTER,      
00710     U_MULTIPLE_COMPOUND_FILTERS,      
00711     U_INVALID_RBT_SYNTAX,             
00712     U_INVALID_PROPERTY_PATTERN,       
00713     U_MALFORMED_PRAGMA,               
00714     U_UNCLOSED_SEGMENT,               
00715     U_ILLEGAL_CHAR_IN_SEGMENT,        
00716     U_VARIABLE_RANGE_EXHAUSTED,       
00717     U_VARIABLE_RANGE_OVERLAP,         
00718     U_ILLEGAL_CHARACTER,              
00719     U_INTERNAL_TRANSLITERATOR_ERROR,  
00720     U_INVALID_ID,                     
00721     U_INVALID_FUNCTION,               
00722     U_PARSE_ERROR_LIMIT,              
00724     /*
00725      * the error code range 0x10100 0x10200 are reserved for formatting API parsing error
00726      */
00727     U_UNEXPECTED_TOKEN=0x10100,       
00728     U_FMT_PARSE_ERROR_START=0x10100,  
00729     U_MULTIPLE_DECIMAL_SEPARATORS,    
00730     U_MULTIPLE_DECIMAL_SEPERATORS = U_MULTIPLE_DECIMAL_SEPARATORS, 
00731     U_MULTIPLE_EXPONENTIAL_SYMBOLS,   
00732     U_MALFORMED_EXPONENTIAL_PATTERN,  
00733     U_MULTIPLE_PERCENT_SYMBOLS,       
00734     U_MULTIPLE_PERMILL_SYMBOLS,       
00735     U_MULTIPLE_PAD_SPECIFIERS,        
00736     U_PATTERN_SYNTAX_ERROR,           
00737     U_ILLEGAL_PAD_POSITION,           
00738     U_UNMATCHED_BRACES,               
00739     U_UNSUPPORTED_PROPERTY,           
00740     U_UNSUPPORTED_ATTRIBUTE,          
00741     U_ARGUMENT_TYPE_MISMATCH,         
00742     U_DUPLICATE_KEYWORD,              
00743     U_UNDEFINED_KEYWORD,              
00744     U_DEFAULT_KEYWORD_MISSING,        
00745     U_DECIMAL_NUMBER_SYNTAX_ERROR,    
00746     U_FMT_PARSE_ERROR_LIMIT,          
00748     /*
00749      * the error code range 0x10200 0x102ff are reserved for Break Iterator related error
00750      */
00751     U_BRK_INTERNAL_ERROR=0x10200,          
00752     U_BRK_ERROR_START=0x10200,             
00753     U_BRK_HEX_DIGITS_EXPECTED,             
00754     U_BRK_SEMICOLON_EXPECTED,              
00755     U_BRK_RULE_SYNTAX,                     
00756     U_BRK_UNCLOSED_SET,                    
00757     U_BRK_ASSIGN_ERROR,                    
00758     U_BRK_VARIABLE_REDFINITION,            
00759     U_BRK_MISMATCHED_PAREN,                
00760     U_BRK_NEW_LINE_IN_QUOTED_STRING,       
00761     U_BRK_UNDEFINED_VARIABLE,              
00762     U_BRK_INIT_ERROR,                      
00763     U_BRK_RULE_EMPTY_SET,                  
00764     U_BRK_UNRECOGNIZED_OPTION,             
00765     U_BRK_MALFORMED_RULE_TAG,              
00766     U_BRK_ERROR_LIMIT,                     
00768     /*
00769      * The error codes in the range 0x10300-0x103ff are reserved for regular expression related errrs
00770      */
00771     U_REGEX_INTERNAL_ERROR=0x10300,       
00772     U_REGEX_ERROR_START=0x10300,          
00773     U_REGEX_RULE_SYNTAX,                  
00774     U_REGEX_INVALID_STATE,                
00775     U_REGEX_BAD_ESCAPE_SEQUENCE,          
00776     U_REGEX_PROPERTY_SYNTAX,              
00777     U_REGEX_UNIMPLEMENTED,                
00778     U_REGEX_MISMATCHED_PAREN,             
00779     U_REGEX_NUMBER_TOO_BIG,               
00780     U_REGEX_BAD_INTERVAL,                 
00781     U_REGEX_MAX_LT_MIN,                   
00782     U_REGEX_INVALID_BACK_REF,             
00783     U_REGEX_INVALID_FLAG,                 
00784     U_REGEX_LOOK_BEHIND_LIMIT,            
00785     U_REGEX_SET_CONTAINS_STRING,          
00786     U_REGEX_OCTAL_TOO_BIG,                
00787     U_REGEX_MISSING_CLOSE_BRACKET,        
00788     U_REGEX_INVALID_RANGE,                
00789     U_REGEX_STACK_OVERFLOW,               
00790     U_REGEX_TIME_OUT,                     
00791     U_REGEX_STOPPED_BY_CALLER,            
00792     U_REGEX_ERROR_LIMIT,                  
00794     /*
00795      * The error code in the range 0x10400-0x104ff are reserved for IDNA related error codes
00796      */
00797     U_IDNA_PROHIBITED_ERROR=0x10400,
00798     U_IDNA_ERROR_START=0x10400,
00799     U_IDNA_UNASSIGNED_ERROR,
00800     U_IDNA_CHECK_BIDI_ERROR,
00801     U_IDNA_STD3_ASCII_RULES_ERROR,
00802     U_IDNA_ACE_PREFIX_ERROR,
00803     U_IDNA_VERIFICATION_ERROR,
00804     U_IDNA_LABEL_TOO_LONG_ERROR,
00805     U_IDNA_ZERO_LENGTH_LABEL_ERROR,
00806     U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR,
00807     U_IDNA_ERROR_LIMIT,
00808     /*
00809      * Aliases for StringPrep
00810      */
00811     U_STRINGPREP_PROHIBITED_ERROR = U_IDNA_PROHIBITED_ERROR,
00812     U_STRINGPREP_UNASSIGNED_ERROR = U_IDNA_UNASSIGNED_ERROR,
00813     U_STRINGPREP_CHECK_BIDI_ERROR = U_IDNA_CHECK_BIDI_ERROR,
00814     
00815     /*
00816      * The error code in the range 0x10500-0x105ff are reserved for Plugin related error codes
00817      */
00818     U_PLUGIN_ERROR_START=0x10500,         
00819     U_PLUGIN_TOO_HIGH=0x10500,            
00820     U_PLUGIN_DIDNT_SET_LEVEL,             
00821     U_PLUGIN_ERROR_LIMIT,                 
00823     U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT      
00824 } UErrorCode;
00825 
00826 /* Use the following to determine if an UErrorCode represents */
00827 /* operational success or failure. */
00828 
00829 #ifdef XP_CPLUSPLUS
00830 
00834     static
00835     inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); }
00840     static
00841     inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); }
00842 #else
00843 
00847 #   define U_SUCCESS(x) ((x)<=U_ZERO_ERROR)
00848 
00852 #   define U_FAILURE(x) ((x)>U_ZERO_ERROR)
00853 #endif
00854 
00861 U_STABLE const char * U_EXPORT2
00862 u_errorName(UErrorCode code);
00863 
00864 
00865 #endif /* _UTYPES */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines