- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Search for |

- File List
- Globals

# utypes.h

Go to the documentation of this file.

    00001 /*
    00002 **********************************************************************
    00003 *   Copyright (C) 1996-2009, 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
    00045 #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API)
    00046 #define U_HIDE_DRAFT_API 1
    00047 #endif
    00048
    00049 #ifdef U_HIDE_DRAFT_API
    00050 #include "unicode/udraft.h"
    00051 #endif
    00052
    00053 #ifdef U_HIDE_DEPRECATED_API
    00054 #include "unicode/udeprctd.h"
    00055 #endif
    00056
    00057 #ifdef U_HIDE_DEPRECATED_API
    00058 #include "unicode/uobslete.h"
    00059 #endif
    00060
    00061 #ifdef U_HIDE_INTERNAL_API
    00062 #include "unicode/uintrnal.h"
    00063 #endif
    00064
    00065 #ifdef U_HIDE_SYSTEM_API
    00066 #include "unicode/usystem.h"
    00067 #endif
    00068
    00079 /*===========================================================================*/
    00080 /* char Character set family                                                 */
    00081 /*===========================================================================*/
    00082
    00087 #define U_ASCII_FAMILY 0
    00088
    00093 #define U_EBCDIC_FAMILY 1
    00094
    00138 #ifndef U_CHARSET_FAMILY
    00139 #   define U_CHARSET_FAMILY 0
    00140 #endif
    00141
    00162 #ifndef U_CHARSET_IS_UTF8
    00163 #   define U_CHARSET_IS_UTF8 0
    00164 #endif
    00165
    00166 /*===========================================================================*/
    00167 /* ICUDATA naming scheme                                                     */
    00168 /*===========================================================================*/
    00169
    00186 #if U_CHARSET_FAMILY
    00187 #   if U_IS_BIG_ENDIAN
    00188    /* EBCDIC - should always be BE */
    00189 #     define U_ICUDATA_TYPE_LETTER "e"
    00190 #     define U_ICUDATA_TYPE_LITLETTER e
    00191 #   else
    00192 #     error "Don't know what to do with little endian EBCDIC!"
    00193 #     define U_ICUDATA_TYPE_LETTER "x"
    00194 #     define U_ICUDATA_TYPE_LITLETTER x
    00195 #   endif
    00196 #else
    00197 #   if U_IS_BIG_ENDIAN
    00198       /* Big-endian ASCII */
    00199 #     define U_ICUDATA_TYPE_LETTER "b"
    00200 #     define U_ICUDATA_TYPE_LITLETTER b
    00201 #   else
    00202       /* Little-endian ASCII */
    00203 #     define U_ICUDATA_TYPE_LETTER "l"
    00204 #     define U_ICUDATA_TYPE_LITLETTER l
    00205 #   endif
    00206 #endif
    00207
    00213 #define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
    00214
    00215
    00227 #define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM)
    00228
    00233 #define U_DEF2_ICUDATA_ENTRY_POINT(major, minor) U_DEF_ICUDATA_ENTRY_POINT(major, minor)
    00234
    00238 #define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt##major##minor##_dat
    00239
    00251 #if defined(OS390) && (__COMPILER_VER__ < 0x41020000) && defined(XP_CPLUSPLUS)
    00252 #    define U_CALLCONV __cdecl
    00253 #else
    00254 #    define U_CALLCONV U_EXPORT2
    00255 #endif
    00256
    00262 #ifndef NULL
    00263 #ifdef XP_CPLUSPLUS
    00264 #define NULL    0
    00265 #else
    00266 #define NULL    ((void *)0)
    00267 #endif
    00268 #endif
    00269
    00270 /*===========================================================================*/
    00271 /* Calendar/TimeZone data types                                              */
    00272 /*===========================================================================*/
    00273
    00281 typedef double UDate;
    00282
    00284 #define U_MILLIS_PER_SECOND        (1000)
    00285
    00286 #define U_MILLIS_PER_MINUTE       (60000)
    00287
    00288 #define U_MILLIS_PER_HOUR       (3600000)
    00289
    00290 #define U_MILLIS_PER_DAY       (86400000)
    00291
    00292
    00293 /*===========================================================================*/
    00294 /* UClassID-based RTTI */
    00295 /*===========================================================================*/
    00296
    00339 typedef void* UClassID;
    00340
    00341 /*===========================================================================*/
    00342 /* Shared library/DLL import-export API control                              */
    00343 /*===========================================================================*/
    00344
    00345 /*
    00346  * Control of symbol import/export.
    00347  * ICU is separated into three libraries.
    00348  */
    00349
    00350 /*
    00351  * \def U_COMBINED_IMPLEMENTATION
    00352  * Set to export library symbols from inside the ICU library
    00353  * when all of ICU is in a single library.
    00354  * This can be set as a compiler option while building ICU, and it
    00355  * needs to be the first one tested to override U_COMMON_API, U_I18N_API, etc.
    00356  * @stable ICU 2.0
    00357  */
    00358
    00408 #if defined(U_COMBINED_IMPLEMENTATION)
    00409 #define U_DATA_API     U_EXPORT
    00410 #define U_COMMON_API   U_EXPORT
    00411 #define U_I18N_API     U_EXPORT
    00412 #define U_LAYOUT_API   U_EXPORT
    00413 #define U_LAYOUTEX_API U_EXPORT
    00414 #define U_IO_API       U_EXPORT
    00415 #define U_TOOLUTIL_API U_EXPORT
    00416 #elif defined(U_STATIC_IMPLEMENTATION)
    00417 #define U_DATA_API
    00418 #define U_COMMON_API
    00419 #define U_I18N_API
    00420 #define U_LAYOUT_API
    00421 #define U_LAYOUTEX_API
    00422 #define U_IO_API
    00423 #define U_TOOLUTIL_API
    00424 #elif defined(U_COMMON_IMPLEMENTATION)
    00425 #define U_DATA_API     U_IMPORT
    00426 #define U_COMMON_API   U_EXPORT
    00427 #define U_I18N_API     U_IMPORT
    00428 #define U_LAYOUT_API   U_IMPORT
    00429 #define U_LAYOUTEX_API U_IMPORT
    00430 #define U_IO_API       U_IMPORT
    00431 #define U_TOOLUTIL_API U_IMPORT
    00432 #elif defined(U_I18N_IMPLEMENTATION)
    00433 #define U_DATA_API     U_IMPORT
    00434 #define U_COMMON_API   U_IMPORT
    00435 #define U_I18N_API     U_EXPORT
    00436 #define U_LAYOUT_API   U_IMPORT
    00437 #define U_LAYOUTEX_API U_IMPORT
    00438 #define U_IO_API       U_IMPORT
    00439 #define U_TOOLUTIL_API U_IMPORT
    00440 #elif defined(U_LAYOUT_IMPLEMENTATION)
    00441 #define U_DATA_API     U_IMPORT
    00442 #define U_COMMON_API   U_IMPORT
    00443 #define U_I18N_API     U_IMPORT
    00444 #define U_LAYOUT_API   U_EXPORT
    00445 #define U_LAYOUTEX_API U_IMPORT
    00446 #define U_IO_API       U_IMPORT
    00447 #define U_TOOLUTIL_API U_IMPORT
    00448 #elif defined(U_LAYOUTEX_IMPLEMENTATION)
    00449 #define U_DATA_API     U_IMPORT
    00450 #define U_COMMON_API   U_IMPORT
    00451 #define U_I18N_API     U_IMPORT
    00452 #define U_LAYOUT_API   U_IMPORT
    00453 #define U_LAYOUTEX_API U_EXPORT
    00454 #define U_IO_API       U_IMPORT
    00455 #define U_TOOLUTIL_API U_IMPORT
    00456 #elif defined(U_IO_IMPLEMENTATION)
    00457 #define U_DATA_API     U_IMPORT
    00458 #define U_COMMON_API   U_IMPORT
    00459 #define U_I18N_API     U_IMPORT
    00460 #define U_LAYOUT_API   U_IMPORT
    00461 #define U_LAYOUTEX_API U_IMPORT
    00462 #define U_IO_API       U_EXPORT
    00463 #define U_TOOLUTIL_API U_IMPORT
    00464 #elif defined(U_TOOLUTIL_IMPLEMENTATION)
    00465 #define U_DATA_API     U_IMPORT
    00466 #define U_COMMON_API   U_IMPORT
    00467 #define U_I18N_API     U_IMPORT
    00468 #define U_LAYOUT_API   U_IMPORT
    00469 #define U_LAYOUTEX_API U_IMPORT
    00470 #define U_IO_API       U_IMPORT
    00471 #define U_TOOLUTIL_API U_EXPORT
    00472 #else
    00473 #define U_DATA_API     U_IMPORT
    00474 #define U_COMMON_API   U_IMPORT
    00475 #define U_I18N_API     U_IMPORT
    00476 #define U_LAYOUT_API   U_IMPORT
    00477 #define U_LAYOUTEX_API U_IMPORT
    00478 #define U_IO_API       U_IMPORT
    00479 #define U_TOOLUTIL_API U_IMPORT
    00480 #endif
    00481
    00487 #ifdef __cplusplus
    00488 #define U_STANDARD_CPP_NAMESPACE        ::
    00489 #else
    00490 #define U_STANDARD_CPP_NAMESPACE
    00491 #endif
    00492
    00493
    00494 /*===========================================================================*/
    00495 /* Global delete operator                                                    */
    00496 /*===========================================================================*/
    00497
    00498 /*
    00499  * The ICU4C library must not use the global new and delete operators.
    00500  * These operators here are defined to enable testing for this.
    00501  * See Jitterbug 2581 for details of why this is necessary.
    00502  *
    00503  * Verification that ICU4C's memory usage is correct, i.e.,
    00504  * that global new/delete are not used:
    00505  *
    00506  * a) Check for imports of global new/delete (see uobject.cpp for details)
    00507  * b) Verify that new is never imported.
    00508  * c) Verify that delete is only imported from object code for interface/mixin classes.
    00509  * d) Add global delete and delete[] only for the ICU4C library itself
    00510  *    and define them in a way that crashes or otherwise easily shows a problem.
    00511  *
    00512  * The following implements d).
    00513  * The operator implementations crash; this is intentional and used for library debugging.
    00514  *
    00515  * Note: This is currently only done on Windows because
    00516  * some Linux/Unix compilers have problems with defining global new/delete.
    00517  * On Windows, U_WINDOWS is defined, and it is _MSC_VER>=1200 for MSVC 6.0 and higher.
    00518  */
    00519 #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))
    00520
    00521 #ifndef U_HIDE_INTERNAL_API
    00522
    00527 inline void *
    00528 operator new(size_t /*size*/) {
    00529     char *q=NULL;
    00530     *q=5; /* break it */
    00531     return q;
    00532 }
    00533
    00534 #ifdef _Ret_bytecap_
    00535 /* This is only needed to suppress a Visual C++ 2008 warning for operator new[]. */
    00536 _Ret_bytecap_(_Size)
    00537 #endif
    00538
    00543 inline void *
    00544 operator new[](size_t /*size*/) {
    00545     char *q=NULL;
    00546     *q=5; /* break it */
    00547     return q;
    00548 }
    00549
    00555 inline void
    00556 operator delete(void * /*p*/) {
    00557     char *q=NULL;
    00558     *q=5; /* break it */
    00559 }
    00560
    00566 inline void
    00567 operator delete[](void * /*p*/) {
    00568     char *q=NULL;
    00569     *q=5; /* break it */
    00570 }
    00571
    00572 #endif /* U_HIDE_INTERNAL_API */
    00573 #endif
    00574
    00575 /*===========================================================================*/
    00576 /* UErrorCode */
    00577 /*===========================================================================*/
    00578
    00593 typedef enum UErrorCode {
    00594     /* The ordering of U_ERROR_INFO_START Vs U_USING_FALLBACK_WARNING looks weird
    00595      * and is that way because VC++ debugger displays first encountered constant,
    00596      * which is not the what the code is used for
    00597      */
    00598
    00599     U_USING_FALLBACK_WARNING  = -128,
    00601     U_ERROR_WARNING_START     = -128,
    00603     U_USING_DEFAULT_WARNING   = -127,
    00605     U_SAFECLONE_ALLOCATED_WARNING = -126,
    00607     U_STATE_OLD_WARNING       = -125,
    00609     U_STRING_NOT_TERMINATED_WARNING = -124,
    00611     U_SORT_KEY_TOO_SHORT_WARNING = -123,
    00613     U_AMBIGUOUS_ALIAS_WARNING = -122,
    00615     U_DIFFERENT_UCA_VERSION = -121,
    00617     U_ERROR_WARNING_LIMIT,
    00620     U_ZERO_ERROR              =  0,
    00622     U_ILLEGAL_ARGUMENT_ERROR  =  1,
    00623     U_MISSING_RESOURCE_ERROR  =  2,
    00624     U_INVALID_FORMAT_ERROR    =  3,
    00625     U_FILE_ACCESS_ERROR       =  4,
    00626     U_INTERNAL_PROGRAM_ERROR  =  5,
    00627     U_MESSAGE_PARSE_ERROR     =  6,
    00628     U_MEMORY_ALLOCATION_ERROR =  7,
    00629     U_INDEX_OUTOFBOUNDS_ERROR =  8,
    00630     U_PARSE_ERROR             =  9,
    00631     U_INVALID_CHAR_FOUND      = 10,
    00632     U_TRUNCATED_CHAR_FOUND    = 11,
    00633     U_ILLEGAL_CHAR_FOUND      = 12,
    00634     U_INVALID_TABLE_FORMAT    = 13,
    00635     U_INVALID_TABLE_FILE      = 14,
    00636     U_BUFFER_OVERFLOW_ERROR   = 15,
    00637     U_UNSUPPORTED_ERROR       = 16,
    00638     U_RESOURCE_TYPE_MISMATCH  = 17,
    00639     U_ILLEGAL_ESCAPE_SEQUENCE = 18,
    00640     U_UNSUPPORTED_ESCAPE_SEQUENCE = 19,
    00641     U_NO_SPACE_AVAILABLE      = 20,
    00642     U_CE_NOT_FOUND_ERROR      = 21,
    00643     U_PRIMARY_TOO_LONG_ERROR  = 22,
    00644     U_STATE_TOO_OLD_ERROR     = 23,
    00645     U_TOO_MANY_ALIASES_ERROR  = 24,
    00647     U_ENUM_OUT_OF_SYNC_ERROR  = 25,
    00648     U_INVARIANT_CONVERSION_ERROR = 26,
    00649     U_INVALID_STATE_ERROR     = 27,
    00650     U_COLLATOR_VERSION_MISMATCH = 28,
    00651     U_USELESS_COLLATOR_ERROR  = 29,
    00652     U_NO_WRITE_PERMISSION     = 30,
    00654     U_STANDARD_ERROR_LIMIT,
    00655     /*
    00656      * the error code range 0x10000 0x10100 are reserved for Transliterator
    00657      */
    00658     U_BAD_VARIABLE_DEFINITION=0x10000,
    00659     U_PARSE_ERROR_START = 0x10000,
    00660     U_MALFORMED_RULE,
    00661     U_MALFORMED_SET,
    00662     U_MALFORMED_SYMBOL_REFERENCE,
    00663     U_MALFORMED_UNICODE_ESCAPE,
    00664     U_MALFORMED_VARIABLE_DEFINITION,
    00665     U_MALFORMED_VARIABLE_REFERENCE,
    00666     U_MISMATCHED_SEGMENT_DELIMITERS,
    00667     U_MISPLACED_ANCHOR_START,
    00668     U_MISPLACED_CURSOR_OFFSET,
    00669     U_MISPLACED_QUANTIFIER,
    00670     U_MISSING_OPERATOR,
    00671     U_MISSING_SEGMENT_CLOSE,
    00672     U_MULTIPLE_ANTE_CONTEXTS,
    00673     U_MULTIPLE_CURSORS,
    00674     U_MULTIPLE_POST_CONTEXTS,
    00675     U_TRAILING_BACKSLASH,
    00676     U_UNDEFINED_SEGMENT_REFERENCE,
    00677     U_UNDEFINED_VARIABLE,
    00678     U_UNQUOTED_SPECIAL,
    00679     U_UNTERMINATED_QUOTE,
    00680     U_RULE_MASK_ERROR,
    00681     U_MISPLACED_COMPOUND_FILTER,
    00682     U_MULTIPLE_COMPOUND_FILTERS,
    00683     U_INVALID_RBT_SYNTAX,
    00684     U_INVALID_PROPERTY_PATTERN,
    00685     U_MALFORMED_PRAGMA,
    00686     U_UNCLOSED_SEGMENT,
    00687     U_ILLEGAL_CHAR_IN_SEGMENT,
    00688     U_VARIABLE_RANGE_EXHAUSTED,
    00689     U_VARIABLE_RANGE_OVERLAP,
    00690     U_ILLEGAL_CHARACTER,
    00691     U_INTERNAL_TRANSLITERATOR_ERROR,
    00692     U_INVALID_ID,
    00693     U_INVALID_FUNCTION,
    00694     U_PARSE_ERROR_LIMIT,
    00696     /*
    00697      * the error code range 0x10100 0x10200 are reserved for formatting API parsing error
    00698      */
    00699     U_UNEXPECTED_TOKEN=0x10100,
    00700     U_FMT_PARSE_ERROR_START=0x10100,
    00701     U_MULTIPLE_DECIMAL_SEPARATORS,
    00702     U_MULTIPLE_DECIMAL_SEPERATORS = U_MULTIPLE_DECIMAL_SEPARATORS,
    00703     U_MULTIPLE_EXPONENTIAL_SYMBOLS,
    00704     U_MALFORMED_EXPONENTIAL_PATTERN,
    00705     U_MULTIPLE_PERCENT_SYMBOLS,
    00706     U_MULTIPLE_PERMILL_SYMBOLS,
    00707     U_MULTIPLE_PAD_SPECIFIERS,
    00708     U_PATTERN_SYNTAX_ERROR,
    00709     U_ILLEGAL_PAD_POSITION,
    00710     U_UNMATCHED_BRACES,
    00711     U_UNSUPPORTED_PROPERTY,
    00712     U_UNSUPPORTED_ATTRIBUTE,
    00713     U_ARGUMENT_TYPE_MISMATCH,
    00714     U_DUPLICATE_KEYWORD,
    00715     U_UNDEFINED_KEYWORD,
    00716     U_DEFAULT_KEYWORD_MISSING,
    00717     U_FMT_PARSE_ERROR_LIMIT,
    00719     /*
    00720      * the error code range 0x10200 0x102ff are reserved for Break Iterator related error
    00721      */
    00722     U_BRK_INTERNAL_ERROR=0x10200,
    00723     U_BRK_ERROR_START=0x10200,
    00724     U_BRK_HEX_DIGITS_EXPECTED,
    00725     U_BRK_SEMICOLON_EXPECTED,
    00726     U_BRK_RULE_SYNTAX,
    00727     U_BRK_UNCLOSED_SET,
    00728     U_BRK_ASSIGN_ERROR,
    00729     U_BRK_VARIABLE_REDFINITION,
    00730     U_BRK_MISMATCHED_PAREN,
    00731     U_BRK_NEW_LINE_IN_QUOTED_STRING,
    00732     U_BRK_UNDEFINED_VARIABLE,
    00733     U_BRK_INIT_ERROR,
    00734     U_BRK_RULE_EMPTY_SET,
    00735     U_BRK_UNRECOGNIZED_OPTION,
    00736     U_BRK_MALFORMED_RULE_TAG,
    00737     U_BRK_ERROR_LIMIT,
    00739     /*
    00740      * The error codes in the range 0x10300-0x103ff are reserved for regular expression related errrs
    00741      */
    00742     U_REGEX_INTERNAL_ERROR=0x10300,
    00743     U_REGEX_ERROR_START=0x10300,
    00744     U_REGEX_RULE_SYNTAX,
    00745     U_REGEX_INVALID_STATE,
    00746     U_REGEX_BAD_ESCAPE_SEQUENCE,
    00747     U_REGEX_PROPERTY_SYNTAX,
    00748     U_REGEX_UNIMPLEMENTED,
    00749     U_REGEX_MISMATCHED_PAREN,
    00750     U_REGEX_NUMBER_TOO_BIG,
    00751     U_REGEX_BAD_INTERVAL,
    00752     U_REGEX_MAX_LT_MIN,
    00753     U_REGEX_INVALID_BACK_REF,
    00754     U_REGEX_INVALID_FLAG,
    00755     U_REGEX_LOOK_BEHIND_LIMIT,
    00756     U_REGEX_SET_CONTAINS_STRING,
    00757     U_REGEX_OCTAL_TOO_BIG,
    00758     U_REGEX_MISSING_CLOSE_BRACKET,
    00759     U_REGEX_INVALID_RANGE,
    00760     U_REGEX_STACK_OVERFLOW,
    00761     U_REGEX_TIME_OUT,
    00762     U_REGEX_STOPPED_BY_CALLER,
    00763     U_REGEX_ERROR_LIMIT,
    00765     /*
    00766      * The error code in the range 0x10400-0x104ff are reserved for IDNA related error codes
    00767      */
    00768     U_IDNA_PROHIBITED_ERROR=0x10400,
    00769     U_IDNA_ERROR_START=0x10400,
    00770     U_IDNA_UNASSIGNED_ERROR,
    00771     U_IDNA_CHECK_BIDI_ERROR,
    00772     U_IDNA_STD3_ASCII_RULES_ERROR,
    00773     U_IDNA_ACE_PREFIX_ERROR,
    00774     U_IDNA_VERIFICATION_ERROR,
    00775     U_IDNA_LABEL_TOO_LONG_ERROR,
    00776     U_IDNA_ZERO_LENGTH_LABEL_ERROR,
    00777     U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR,
    00778     U_IDNA_ERROR_LIMIT,
    00779     /*
    00780      * Aliases for StringPrep
    00781      */
    00782     U_STRINGPREP_PROHIBITED_ERROR = U_IDNA_PROHIBITED_ERROR,
    00783     U_STRINGPREP_UNASSIGNED_ERROR = U_IDNA_UNASSIGNED_ERROR,
    00784     U_STRINGPREP_CHECK_BIDI_ERROR = U_IDNA_CHECK_BIDI_ERROR,
    00785
    00786
    00787     U_ERROR_LIMIT=U_IDNA_ERROR_LIMIT
    00788 } UErrorCode;
    00789
    00790 /* Use the following to determine if an UErrorCode represents */
    00791 /* operational success or failure. */
    00792
    00793 #ifdef XP_CPLUSPLUS
    00794
    00798     static
    00799     inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); }
    00804     static
    00805     inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); }
    00806 #else
    00807
    00811 #   define U_SUCCESS(x) ((x)<=U_ZERO_ERROR)
    00812
    00816 #   define U_FAILURE(x) ((x)>U_ZERO_ERROR)
    00817 #endif
    00818
    00825 U_STABLE const char * U_EXPORT2
    00826 u_errorName(UErrorCode code);
    00827
    00828
    00829 #endif /* _UTYPES */