ICU 4.8.1.1  4.8.1.1
utypes.h
Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1996-2011, 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 #include "float.h"
00041 
00057 #ifdef XP_CPLUSPLUS
00058 #   ifndef U_SHOW_CPLUSPLUS_API
00059 #       define U_SHOW_CPLUSPLUS_API 1
00060 #   endif
00061 #else
00062 #   undef U_SHOW_CPLUSPLUS_API
00063 #   define U_SHOW_CPLUSPLUS_API 0
00064 #endif
00065 
00078 #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API)
00079 #define U_HIDE_DRAFT_API 1
00080 #endif
00081 #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API)
00082 #define U_HIDE_INTERNAL_API 1
00083 #endif
00084 
00085 #ifdef U_HIDE_DRAFT_API
00086 #include "unicode/udraft.h"
00087 #endif
00088 
00089 #ifdef U_HIDE_DEPRECATED_API
00090 #include "unicode/udeprctd.h"
00091 #endif
00092 
00093 #ifdef U_HIDE_DEPRECATED_API
00094 #include "unicode/uobslete.h"
00095 #endif
00096 
00097 #ifdef U_HIDE_INTERNAL_API
00098 #include "unicode/uintrnal.h"
00099 #endif
00100 
00101 #ifdef U_HIDE_SYSTEM_API
00102 #include "unicode/usystem.h"
00103 #endif
00104 
00108 /*===========================================================================*/
00109 /* char Character set family                                                 */
00110 /*===========================================================================*/
00111 
00116 #define U_ASCII_FAMILY 0
00117 
00122 #define U_EBCDIC_FAMILY 1
00123 
00167 #ifndef U_CHARSET_FAMILY
00168 #   define U_CHARSET_FAMILY 0
00169 #endif
00170 
00191 #ifndef U_CHARSET_IS_UTF8
00192 #   define U_CHARSET_IS_UTF8 0
00193 #endif
00194 
00195 /*===========================================================================*/
00196 /* ICUDATA naming scheme                                                     */
00197 /*===========================================================================*/
00198 
00215 #if U_CHARSET_FAMILY
00216 #   if U_IS_BIG_ENDIAN
00217    /* EBCDIC - should always be BE */
00218 #     define U_ICUDATA_TYPE_LETTER "e"
00219 #     define U_ICUDATA_TYPE_LITLETTER e
00220 #   else
00221 #     error "Don't know what to do with little endian EBCDIC!"
00222 #     define U_ICUDATA_TYPE_LETTER "x"
00223 #     define U_ICUDATA_TYPE_LITLETTER x
00224 #   endif
00225 #else
00226 #   if U_IS_BIG_ENDIAN
00227       /* Big-endian ASCII */
00228 #     define U_ICUDATA_TYPE_LETTER "b"
00229 #     define U_ICUDATA_TYPE_LITLETTER b
00230 #   else
00231       /* Little-endian ASCII */
00232 #     define U_ICUDATA_TYPE_LETTER "l"
00233 #     define U_ICUDATA_TYPE_LITLETTER l
00234 #   endif
00235 #endif
00236 
00242 #define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER  
00243 #define U_USRDATA_NAME    "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER  
00244 #define U_USE_USRDATA     1  
00257 #define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM)
00258 
00263 #define U_DEF2_ICUDATA_ENTRY_POINT(major, minor) U_DEF_ICUDATA_ENTRY_POINT(major, minor)
00264 
00268 #ifndef U_DEF_ICUDATA_ENTRY_POINT
00269 /* affected by symbol renaming. See platform.h */
00270 #define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt##major##minor##_dat
00271 #endif
00272 
00284 #if defined(OS390) && defined(XP_CPLUSPLUS)
00285 #    define U_CALLCONV __cdecl
00286 #else
00287 #    define U_CALLCONV U_EXPORT2
00288 #endif
00289 
00295 #ifndef NULL
00296 #ifdef XP_CPLUSPLUS
00297 #define NULL    0
00298 #else
00299 #define NULL    ((void *)0)
00300 #endif
00301 #endif
00302 
00303 /*===========================================================================*/
00304 /* Calendar/TimeZone data types                                              */
00305 /*===========================================================================*/
00306 
00314 typedef double UDate;
00315 
00317 #define U_MILLIS_PER_SECOND        (1000)
00318 
00319 #define U_MILLIS_PER_MINUTE       (60000)
00320 
00321 #define U_MILLIS_PER_HOUR       (3600000)
00322 
00323 #define U_MILLIS_PER_DAY       (86400000)
00324 
00329 #define U_DATE_MAX DBL_MAX
00330 
00335 #define U_DATE_MIN -U_DATE_MAX
00336 
00337 
00338 
00339 /*===========================================================================*/
00340 /* UClassID-based RTTI */
00341 /*===========================================================================*/
00342 
00385 typedef void* UClassID;
00386 
00387 /*===========================================================================*/
00388 /* Shared library/DLL import-export API control                              */
00389 /*===========================================================================*/
00390 
00391 /*
00392  * Control of symbol import/export.
00393  * ICU is separated into three libraries.
00394  */
00395 
00396 /*
00397  * \def U_COMBINED_IMPLEMENTATION
00398  * Set to export library symbols from inside the ICU library
00399  * when all of ICU is in a single library.
00400  * This can be set as a compiler option while building ICU, and it
00401  * needs to be the first one tested to override U_COMMON_API, U_I18N_API, etc.
00402  * @stable ICU 2.0
00403  */
00404 
00454 #if defined(U_COMBINED_IMPLEMENTATION)
00455 #define U_DATA_API     U_EXPORT
00456 #define U_COMMON_API   U_EXPORT
00457 #define U_I18N_API     U_EXPORT
00458 #define U_LAYOUT_API   U_EXPORT
00459 #define U_LAYOUTEX_API U_EXPORT
00460 #define U_IO_API       U_EXPORT
00461 #define U_TOOLUTIL_API U_EXPORT
00462 #elif defined(U_STATIC_IMPLEMENTATION)
00463 #define U_DATA_API
00464 #define U_COMMON_API
00465 #define U_I18N_API
00466 #define U_LAYOUT_API
00467 #define U_LAYOUTEX_API
00468 #define U_IO_API
00469 #define U_TOOLUTIL_API
00470 #elif defined(U_COMMON_IMPLEMENTATION)
00471 #define U_DATA_API     U_IMPORT
00472 #define U_COMMON_API   U_EXPORT
00473 #define U_I18N_API     U_IMPORT
00474 #define U_LAYOUT_API   U_IMPORT
00475 #define U_LAYOUTEX_API U_IMPORT
00476 #define U_IO_API       U_IMPORT
00477 #define U_TOOLUTIL_API U_IMPORT
00478 #elif defined(U_I18N_IMPLEMENTATION)
00479 #define U_DATA_API     U_IMPORT
00480 #define U_COMMON_API   U_IMPORT
00481 #define U_I18N_API     U_EXPORT
00482 #define U_LAYOUT_API   U_IMPORT
00483 #define U_LAYOUTEX_API U_IMPORT
00484 #define U_IO_API       U_IMPORT
00485 #define U_TOOLUTIL_API U_IMPORT
00486 #elif defined(U_LAYOUT_IMPLEMENTATION)
00487 #define U_DATA_API     U_IMPORT
00488 #define U_COMMON_API   U_IMPORT
00489 #define U_I18N_API     U_IMPORT
00490 #define U_LAYOUT_API   U_EXPORT
00491 #define U_LAYOUTEX_API U_IMPORT
00492 #define U_IO_API       U_IMPORT
00493 #define U_TOOLUTIL_API U_IMPORT
00494 #elif defined(U_LAYOUTEX_IMPLEMENTATION)
00495 #define U_DATA_API     U_IMPORT
00496 #define U_COMMON_API   U_IMPORT
00497 #define U_I18N_API     U_IMPORT
00498 #define U_LAYOUT_API   U_IMPORT
00499 #define U_LAYOUTEX_API U_EXPORT
00500 #define U_IO_API       U_IMPORT
00501 #define U_TOOLUTIL_API U_IMPORT
00502 #elif defined(U_IO_IMPLEMENTATION)
00503 #define U_DATA_API     U_IMPORT
00504 #define U_COMMON_API   U_IMPORT
00505 #define U_I18N_API     U_IMPORT
00506 #define U_LAYOUT_API   U_IMPORT
00507 #define U_LAYOUTEX_API U_IMPORT
00508 #define U_IO_API       U_EXPORT
00509 #define U_TOOLUTIL_API U_IMPORT
00510 #elif defined(U_TOOLUTIL_IMPLEMENTATION)
00511 #define U_DATA_API     U_IMPORT
00512 #define U_COMMON_API   U_IMPORT
00513 #define U_I18N_API     U_IMPORT
00514 #define U_LAYOUT_API   U_IMPORT
00515 #define U_LAYOUTEX_API U_IMPORT
00516 #define U_IO_API       U_IMPORT
00517 #define U_TOOLUTIL_API U_EXPORT
00518 #else
00519 #define U_DATA_API     U_IMPORT
00520 #define U_COMMON_API   U_IMPORT
00521 #define U_I18N_API     U_IMPORT
00522 #define U_LAYOUT_API   U_IMPORT
00523 #define U_LAYOUTEX_API U_IMPORT
00524 #define U_IO_API       U_IMPORT
00525 #define U_TOOLUTIL_API U_IMPORT
00526 #endif
00527 
00533 #ifdef __cplusplus
00534 #define U_STANDARD_CPP_NAMESPACE        ::
00535 #else
00536 #define U_STANDARD_CPP_NAMESPACE
00537 #endif
00538 
00539 
00540 /*===========================================================================*/
00541 /* Global delete operator                                                    */
00542 /*===========================================================================*/
00543 
00544 /*
00545  * The ICU4C library must not use the global new and delete operators.
00546  * These operators here are defined to enable testing for this.
00547  * See Jitterbug 2581 for details of why this is necessary.
00548  *
00549  * Verification that ICU4C's memory usage is correct, i.e.,
00550  * that global new/delete are not used:
00551  *
00552  * a) Check for imports of global new/delete (see uobject.cpp for details)
00553  * b) Verify that new is never imported.
00554  * c) Verify that delete is only imported from object code for interface/mixin classes.
00555  * d) Add global delete and delete[] only for the ICU4C library itself
00556  *    and define them in a way that crashes or otherwise easily shows a problem.
00557  *
00558  * The following implements d).
00559  * The operator implementations crash; this is intentional and used for library debugging.
00560  *
00561  * Note: This is currently only done on Windows because
00562  * some Linux/Unix compilers have problems with defining global new/delete.
00563  * On Windows, U_WINDOWS is defined, and it is _MSC_VER>=1200 for MSVC 6.0 and higher.
00564  */
00565 #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))
00566 
00567 #ifndef U_HIDE_INTERNAL_API
00568 
00573 inline void *
00574 operator new(size_t /*size*/) {
00575     char *q=NULL;
00576     *q=5; /* break it */
00577     return q;
00578 }
00579 
00580 #ifdef _Ret_bytecap_
00581 /* This is only needed to suppress a Visual C++ 2008 warning for operator new[]. */
00582 _Ret_bytecap_(_Size)
00583 #endif
00584 
00589 inline void *
00590 operator new[](size_t /*size*/) {
00591     char *q=NULL;
00592     *q=5; /* break it */
00593     return q;
00594 }
00595 
00601 inline void
00602 operator delete(void * /*p*/) {
00603     char *q=NULL;
00604     *q=5; /* break it */
00605 }
00606 
00612 inline void
00613 operator delete[](void * /*p*/) {
00614     char *q=NULL;
00615     *q=5; /* break it */
00616 }
00617 
00618 #endif /* U_HIDE_INTERNAL_API */
00619 #endif
00620 
00621 /*===========================================================================*/
00622 /* UErrorCode */
00623 /*===========================================================================*/
00624 
00639 typedef enum UErrorCode {
00640     /* The ordering of U_ERROR_INFO_START Vs U_USING_FALLBACK_WARNING looks weird
00641      * and is that way because VC++ debugger displays first encountered constant,
00642      * which is not the what the code is used for
00643      */
00644 
00645     U_USING_FALLBACK_WARNING  = -128,   
00647     U_ERROR_WARNING_START     = -128,   
00649     U_USING_DEFAULT_WARNING   = -127,   
00651     U_SAFECLONE_ALLOCATED_WARNING = -126, 
00653     U_STATE_OLD_WARNING       = -125,   
00655     U_STRING_NOT_TERMINATED_WARNING = -124,
00657     U_SORT_KEY_TOO_SHORT_WARNING = -123, 
00659     U_AMBIGUOUS_ALIAS_WARNING = -122,   
00661     U_DIFFERENT_UCA_VERSION = -121,     
00663     U_PLUGIN_CHANGED_LEVEL_WARNING = -120, 
00665     U_ERROR_WARNING_LIMIT,              
00668     U_ZERO_ERROR              =  0,     
00670     U_ILLEGAL_ARGUMENT_ERROR  =  1,     
00671     U_MISSING_RESOURCE_ERROR  =  2,     
00672     U_INVALID_FORMAT_ERROR    =  3,     
00673     U_FILE_ACCESS_ERROR       =  4,     
00674     U_INTERNAL_PROGRAM_ERROR  =  5,     
00675     U_MESSAGE_PARSE_ERROR     =  6,     
00676     U_MEMORY_ALLOCATION_ERROR =  7,     
00677     U_INDEX_OUTOFBOUNDS_ERROR =  8,     
00678     U_PARSE_ERROR             =  9,     
00679     U_INVALID_CHAR_FOUND      = 10,     
00680     U_TRUNCATED_CHAR_FOUND    = 11,     
00681     U_ILLEGAL_CHAR_FOUND      = 12,     
00682     U_INVALID_TABLE_FORMAT    = 13,     
00683     U_INVALID_TABLE_FILE      = 14,     
00684     U_BUFFER_OVERFLOW_ERROR   = 15,     
00685     U_UNSUPPORTED_ERROR       = 16,     
00686     U_RESOURCE_TYPE_MISMATCH  = 17,     
00687     U_ILLEGAL_ESCAPE_SEQUENCE = 18,     
00688     U_UNSUPPORTED_ESCAPE_SEQUENCE = 19, 
00689     U_NO_SPACE_AVAILABLE      = 20,     
00690     U_CE_NOT_FOUND_ERROR      = 21,     
00691     U_PRIMARY_TOO_LONG_ERROR  = 22,     
00692     U_STATE_TOO_OLD_ERROR     = 23,     
00693     U_TOO_MANY_ALIASES_ERROR  = 24,     
00695     U_ENUM_OUT_OF_SYNC_ERROR  = 25,     
00696     U_INVARIANT_CONVERSION_ERROR = 26,  
00697     U_INVALID_STATE_ERROR     = 27,     
00698     U_COLLATOR_VERSION_MISMATCH = 28,   
00699     U_USELESS_COLLATOR_ERROR  = 29,     
00700     U_NO_WRITE_PERMISSION     = 30,     
00702     U_STANDARD_ERROR_LIMIT,             
00703     /*
00704      * the error code range 0x10000 0x10100 are reserved for Transliterator
00705      */
00706     U_BAD_VARIABLE_DEFINITION=0x10000,
00707     U_PARSE_ERROR_START = 0x10000,    
00708     U_MALFORMED_RULE,                 
00709     U_MALFORMED_SET,                  
00710     U_MALFORMED_SYMBOL_REFERENCE,     
00711     U_MALFORMED_UNICODE_ESCAPE,       
00712     U_MALFORMED_VARIABLE_DEFINITION,  
00713     U_MALFORMED_VARIABLE_REFERENCE,   
00714     U_MISMATCHED_SEGMENT_DELIMITERS,  
00715     U_MISPLACED_ANCHOR_START,         
00716     U_MISPLACED_CURSOR_OFFSET,        
00717     U_MISPLACED_QUANTIFIER,           
00718     U_MISSING_OPERATOR,               
00719     U_MISSING_SEGMENT_CLOSE,          
00720     U_MULTIPLE_ANTE_CONTEXTS,         
00721     U_MULTIPLE_CURSORS,               
00722     U_MULTIPLE_POST_CONTEXTS,         
00723     U_TRAILING_BACKSLASH,             
00724     U_UNDEFINED_SEGMENT_REFERENCE,    
00725     U_UNDEFINED_VARIABLE,             
00726     U_UNQUOTED_SPECIAL,               
00727     U_UNTERMINATED_QUOTE,             
00728     U_RULE_MASK_ERROR,                
00729     U_MISPLACED_COMPOUND_FILTER,      
00730     U_MULTIPLE_COMPOUND_FILTERS,      
00731     U_INVALID_RBT_SYNTAX,             
00732     U_INVALID_PROPERTY_PATTERN,       
00733     U_MALFORMED_PRAGMA,               
00734     U_UNCLOSED_SEGMENT,               
00735     U_ILLEGAL_CHAR_IN_SEGMENT,        
00736     U_VARIABLE_RANGE_EXHAUSTED,       
00737     U_VARIABLE_RANGE_OVERLAP,         
00738     U_ILLEGAL_CHARACTER,              
00739     U_INTERNAL_TRANSLITERATOR_ERROR,  
00740     U_INVALID_ID,                     
00741     U_INVALID_FUNCTION,               
00742     U_PARSE_ERROR_LIMIT,              
00744     /*
00745      * the error code range 0x10100 0x10200 are reserved for formatting API parsing error
00746      */
00747     U_UNEXPECTED_TOKEN=0x10100,       
00748     U_FMT_PARSE_ERROR_START=0x10100,  
00749     U_MULTIPLE_DECIMAL_SEPARATORS,    
00750     U_MULTIPLE_DECIMAL_SEPERATORS = U_MULTIPLE_DECIMAL_SEPARATORS, 
00751     U_MULTIPLE_EXPONENTIAL_SYMBOLS,   
00752     U_MALFORMED_EXPONENTIAL_PATTERN,  
00753     U_MULTIPLE_PERCENT_SYMBOLS,       
00754     U_MULTIPLE_PERMILL_SYMBOLS,       
00755     U_MULTIPLE_PAD_SPECIFIERS,        
00756     U_PATTERN_SYNTAX_ERROR,           
00757     U_ILLEGAL_PAD_POSITION,           
00758     U_UNMATCHED_BRACES,               
00759     U_UNSUPPORTED_PROPERTY,           
00760     U_UNSUPPORTED_ATTRIBUTE,          
00761     U_ARGUMENT_TYPE_MISMATCH,         
00762     U_DUPLICATE_KEYWORD,              
00763     U_UNDEFINED_KEYWORD,              
00764     U_DEFAULT_KEYWORD_MISSING,        
00765     U_DECIMAL_NUMBER_SYNTAX_ERROR,    
00766     U_FORMAT_INEXACT_ERROR,           
00767     U_FMT_PARSE_ERROR_LIMIT,          
00769     /*
00770      * the error code range 0x10200 0x102ff are reserved for Break Iterator related error
00771      */
00772     U_BRK_INTERNAL_ERROR=0x10200,          
00773     U_BRK_ERROR_START=0x10200,             
00774     U_BRK_HEX_DIGITS_EXPECTED,             
00775     U_BRK_SEMICOLON_EXPECTED,              
00776     U_BRK_RULE_SYNTAX,                     
00777     U_BRK_UNCLOSED_SET,                    
00778     U_BRK_ASSIGN_ERROR,                    
00779     U_BRK_VARIABLE_REDFINITION,            
00780     U_BRK_MISMATCHED_PAREN,                
00781     U_BRK_NEW_LINE_IN_QUOTED_STRING,       
00782     U_BRK_UNDEFINED_VARIABLE,              
00783     U_BRK_INIT_ERROR,                      
00784     U_BRK_RULE_EMPTY_SET,                  
00785     U_BRK_UNRECOGNIZED_OPTION,             
00786     U_BRK_MALFORMED_RULE_TAG,              
00787     U_BRK_ERROR_LIMIT,                     
00789     /*
00790      * The error codes in the range 0x10300-0x103ff are reserved for regular expression related errrs
00791      */
00792     U_REGEX_INTERNAL_ERROR=0x10300,       
00793     U_REGEX_ERROR_START=0x10300,          
00794     U_REGEX_RULE_SYNTAX,                  
00795     U_REGEX_INVALID_STATE,                
00796     U_REGEX_BAD_ESCAPE_SEQUENCE,          
00797     U_REGEX_PROPERTY_SYNTAX,              
00798     U_REGEX_UNIMPLEMENTED,                
00799     U_REGEX_MISMATCHED_PAREN,             
00800     U_REGEX_NUMBER_TOO_BIG,               
00801     U_REGEX_BAD_INTERVAL,                 
00802     U_REGEX_MAX_LT_MIN,                   
00803     U_REGEX_INVALID_BACK_REF,             
00804     U_REGEX_INVALID_FLAG,                 
00805     U_REGEX_LOOK_BEHIND_LIMIT,            
00806     U_REGEX_SET_CONTAINS_STRING,          
00807     U_REGEX_OCTAL_TOO_BIG,                
00808     U_REGEX_MISSING_CLOSE_BRACKET,        
00809     U_REGEX_INVALID_RANGE,                
00810     U_REGEX_STACK_OVERFLOW,               
00811     U_REGEX_TIME_OUT,                     
00812     U_REGEX_STOPPED_BY_CALLER,            
00813     U_REGEX_ERROR_LIMIT,                  
00815     /*
00816      * The error code in the range 0x10400-0x104ff are reserved for IDNA related error codes
00817      */
00818     U_IDNA_PROHIBITED_ERROR=0x10400,
00819     U_IDNA_ERROR_START=0x10400,
00820     U_IDNA_UNASSIGNED_ERROR,
00821     U_IDNA_CHECK_BIDI_ERROR,
00822     U_IDNA_STD3_ASCII_RULES_ERROR,
00823     U_IDNA_ACE_PREFIX_ERROR,
00824     U_IDNA_VERIFICATION_ERROR,
00825     U_IDNA_LABEL_TOO_LONG_ERROR,
00826     U_IDNA_ZERO_LENGTH_LABEL_ERROR,
00827     U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR,
00828     U_IDNA_ERROR_LIMIT,
00829     /*
00830      * Aliases for StringPrep
00831      */
00832     U_STRINGPREP_PROHIBITED_ERROR = U_IDNA_PROHIBITED_ERROR,
00833     U_STRINGPREP_UNASSIGNED_ERROR = U_IDNA_UNASSIGNED_ERROR,
00834     U_STRINGPREP_CHECK_BIDI_ERROR = U_IDNA_CHECK_BIDI_ERROR,
00835     
00836     /*
00837      * The error code in the range 0x10500-0x105ff are reserved for Plugin related error codes
00838      */
00839     U_PLUGIN_ERROR_START=0x10500,         
00840     U_PLUGIN_TOO_HIGH=0x10500,            
00841     U_PLUGIN_DIDNT_SET_LEVEL,             
00842     U_PLUGIN_ERROR_LIMIT,                 
00844     U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT      
00845 } UErrorCode;
00846 
00847 /* Use the following to determine if an UErrorCode represents */
00848 /* operational success or failure. */
00849 
00850 #ifdef XP_CPLUSPLUS
00851 
00855     static
00856     inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); }
00861     static
00862     inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); }
00863 #else
00864 
00868 #   define U_SUCCESS(x) ((x)<=U_ZERO_ERROR)
00869 
00873 #   define U_FAILURE(x) ((x)>U_ZERO_ERROR)
00874 #endif
00875 
00882 U_STABLE const char * U_EXPORT2
00883 u_errorName(UErrorCode code);
00884 
00885 
00886 #endif /* _UTYPES */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines