1878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*
2878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org**********************************************************************
3878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   Copyright (C) 1996-2010, International Business Machines
4878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   Corporation and others.  All Rights Reserved.
5878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org**********************************************************************
6878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*
7878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*  FILE NAME : UTYPES.H (formerly ptypes.h)
8878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*
9878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   Date        Name        Description
10878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   12/11/96    helena      Creation.
11878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   02/27/97    aliu        Added typedefs for UClassID, int8, int16, int32,
12878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*                           uint8, uint16, and uint32.
13878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   04/01/97    aliu        Added XP_CPLUSPLUS and modified to work under C as
14878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*                            well as C++.
15878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*                           Modified to use memcpy() for uprv_arrayCopy() fns.
16878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   04/14/97    aliu        Added TPlatformUtilities.
17878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   05/07/97    aliu        Added import/export specifiers (replacing the old
18878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*                           broken EXT_CLASS).  Added version number for our
19878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*                           code.  Cleaned up header.
20878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*    6/20/97    helena      Java class name change.
21878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   08/11/98    stephen     UErrorCode changed from typedef to enum
22878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   08/12/98    erm         Changed T_ANALYTIC_PACKAGE_VERSION to 3
23878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   08/14/98    stephen     Added uprv_arrayCopy() for int8_t, int16_t, int32_t
24878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   12/09/98    jfitz       Added BUFFER_OVERFLOW_ERROR (bug 1100066)
25878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   04/20/99    stephen     Cleaned up & reworked for autoconf.
26878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*                           Renamed to utypes.h.
27878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   05/05/99    stephen     Changed to use <inttypes.h>
28878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*   12/07/99    helena      Moved copyright notice string from ucnv_bld.h here.
29878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*******************************************************************************
30878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org*/
31878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
32878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifndef UTYPES_H
33878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define UTYPES_H
34878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
35878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
36878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/umachine.h"
37878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/utf.h"
38878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/uversion.h"
39878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/uconfig.h"
40878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
41878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*!
42878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \file
43878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \brief Basic definitions for ICU, for both C and C++ APIs
44878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
45878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * This file defines basic types, constants, and enumerations directly or
46878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * indirectly by including other header files, especially utf.h for the
47878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * basic character and string definitions and umachine.h for consistent
48878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * integer and other types.
49878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
50878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
51878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
52878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
53878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_SHOW_CPLUSPLUS_API
54878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @internal
55878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
56878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef XP_CPLUSPLUS
57878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   ifndef U_SHOW_CPLUSPLUS_API
58878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#       define U_SHOW_CPLUSPLUS_API 1
59878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   endif
60878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#else
61878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   undef U_SHOW_CPLUSPLUS_API
62878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   define U_SHOW_CPLUSPLUS_API 0
63878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
64878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
65878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/** @{ API visibility control */
66878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
67878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
68878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_HIDE_DRAFT_API
69878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Define this to 1 to request that draft API be "hidden"
70878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
71878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API)
72878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_HIDE_DRAFT_API 1
73878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
74878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API)
75878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_HIDE_INTERNAL_API 1
76878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
77878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
78878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef U_HIDE_DRAFT_API
79878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/udraft.h"
80878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
81878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
82878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef U_HIDE_DEPRECATED_API
83878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/udeprctd.h"
84878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
85878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
86878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef U_HIDE_DEPRECATED_API
87878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/uobslete.h"
88878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
89878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
90878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef U_HIDE_INTERNAL_API
91878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/uintrnal.h"
92878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
93878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
94878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef U_HIDE_SYSTEM_API
95878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#include "unicode/usystem.h"
96878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
97878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
98878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/** @} */
99878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
100878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
101878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
102878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* char Character set family                                                 */
103878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
104878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
105878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
106878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII based platform.
107878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
108878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
109878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_ASCII_FAMILY 0
110878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
111878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
112878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC based platform.
113878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
114878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
115878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_EBCDIC_FAMILY 1
116878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
117878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
118878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_CHARSET_FAMILY
119878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
120878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * <p>These definitions allow to specify the encoding of text
121878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * in the char data type as defined by the platform and the compiler.
122878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * It is enough to determine the code point values of "invariant characters",
123878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * which are the ones shared by all encodings that are in use
124878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * on a given platform.</p>
125878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
126878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * <p>Those "invariant characters" should be all the uppercase and lowercase
127878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * latin letters, the digits, the space, and "basic punctuation".
128878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Also, '\\n', '\\r', '\\t' should be available.</p>
129878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
130878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * <p>The list of "invariant characters" is:<br>
131878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \code
132878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    A-Z  a-z  0-9  SPACE  "  %  &amp;  '  (  )  *  +  ,  -  .  /  :  ;  <  =  >  ?  _
133878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \endcode
134878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * <br>
135878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * (52 letters + 10 numbers + 20 punc/sym/space = 82 total)</p>
136878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
137878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * <p>This matches the IBM Syntactic Character Set (CS 640).</p>
138878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
139878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * <p>In other words, all the graphic characters in 7-bit ASCII should
140878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * be safely accessible except the following:</p>
141878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
142878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \code
143878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '\' <backslash>
144878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '[' <left bracket>
145878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    ']' <right bracket>
146878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '{' <left brace>
147878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '}' <right brace>
148878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '^' <circumflex>
149878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '~' <tilde>
150878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '!' <exclamation mark>
151878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '#' <number sign>
152878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '|' <vertical line>
153878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '$' <dollar sign>
154878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '@' <commercial at>
155878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    '`' <grave accent>
156878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \endcode
157878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
158878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
159878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
160878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifndef U_CHARSET_FAMILY
161878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   define U_CHARSET_FAMILY 0
162878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
163878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
164878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
165878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_CHARSET_IS_UTF8
166878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
167878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Hardcode the default charset to UTF-8.
168878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
169878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * If this is set to 1, then
170878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - ICU will assume that all non-invariant char*, StringPiece, std::string etc.
171878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *   contain UTF-8 text, regardless of what the system API uses
172878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - some ICU code will use fast functions like u_strFromUTF8()
173878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *   rather than the more general and more heavy-weight conversion API (ucnv.h)
174878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - ucnv_getDefaultName() always returns "UTF-8"
175878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - ucnv_setDefaultName() is disabled and will not change the default charset
176878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - static builds of ICU are smaller
177878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - more functionality is available with the UCONFIG_NO_CONVERSION build-time
178878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *   configuration option (see unicode/uconfig.h)
179878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - the UCONFIG_NO_CONVERSION build option in uconfig.h is more usable
180878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
181878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 4.2
182878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @see UCONFIG_NO_CONVERSION
183878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
184878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifndef U_CHARSET_IS_UTF8
185878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   define U_CHARSET_IS_UTF8 0
186878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
187878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
188878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
189878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* ICUDATA naming scheme                                                     */
190878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
191878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
192878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
193878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_ICUDATA_TYPE_LETTER
194878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
195878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * This is a platform-dependent string containing one letter:
196878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - b for big-endian, ASCII-family platforms
197878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - l for little-endian, ASCII-family platforms
198878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * - e for big-endian, EBCDIC-family platforms
199878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * This letter is part of the common data file name.
200878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
201878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
202878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
203878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
204878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_ICUDATA_TYPE_LITLETTER
205878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * The non-string form of U_ICUDATA_TYPE_LETTER
206878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
207878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
208878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#if U_CHARSET_FAMILY
209878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   if U_IS_BIG_ENDIAN
210878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org   /* EBCDIC - should always be BE */
211878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     define U_ICUDATA_TYPE_LETTER "e"
212878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     define U_ICUDATA_TYPE_LITLETTER e
213878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   else
214878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     error "Don't know what to do with little endian EBCDIC!"
215878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     define U_ICUDATA_TYPE_LETTER "x"
216878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     define U_ICUDATA_TYPE_LITLETTER x
217878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   endif
218878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#else
219878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   if U_IS_BIG_ENDIAN
220878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org      /* Big-endian ASCII */
221878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     define U_ICUDATA_TYPE_LETTER "b"
222878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     define U_ICUDATA_TYPE_LITLETTER b
223878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   else
224878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org      /* Little-endian ASCII */
225878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     define U_ICUDATA_TYPE_LETTER "l"
226878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#     define U_ICUDATA_TYPE_LITLETTER l
227878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   endif
228878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
229878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
230878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
231878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * A single string literal containing the icudata stub name. i.e. 'icudt18e' for
232878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * ICU 1.8.x on EBCDIC, etc..
233878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
234878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
235878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER  /**< @internal */
236878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_USRDATA_NAME    "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER  /**< @internal */
237878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_USE_USRDATA     1  /**< @internal */
238878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
239878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
240878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *  U_ICU_ENTRY_POINT is the name of the DLL entry point to the ICU data library.
241878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    Defined as a literal, not a string.
242878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    Tricky Preprocessor use - ## operator replaces macro paramters with the literal string
243878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *                              from the corresponding macro invocation, _before_ other macro substitutions.
244878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *                              Need a nested \#defines to get the actual version numbers rather than
245878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *                              the literal text U_ICU_VERSION_MAJOR_NUM into the name.
246878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *                              The net result will be something of the form
247878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *                                  \#define U_ICU_ENTRY_POINT icudt19_dat
248878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.4
249878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
250878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM)
251878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
252878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
253878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Do not use.
254878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @internal
255878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
256878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DEF2_ICUDATA_ENTRY_POINT(major, minor) U_DEF_ICUDATA_ENTRY_POINT(major, minor)
257878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
258878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Do not use.
259878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @internal
260878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
261878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifndef U_DEF_ICUDATA_ENTRY_POINT
262878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* affected by symbol renaming. See platform.h */
263878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt##major##minor##_dat
264878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
265878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
266878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
267878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_CALLCONV
268878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary
269878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * in callback function typedefs to make sure that the calling convention
270878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * is compatible.
271878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
272878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * This is only used for non-ICU-API functions.
273878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * When a function is a public ICU API,
274878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * you must use the U_CAPI and U_EXPORT2 qualifiers.
275878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
276878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
277878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#if defined(OS390) && defined(XP_CPLUSPLUS)
278878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#    define U_CALLCONV __cdecl
279878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#else
280878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#    define U_CALLCONV U_EXPORT2
281878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
282878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
283878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
284878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def NULL
285878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.
286878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
287878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
288878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifndef NULL
289878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef XP_CPLUSPLUS
290878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define NULL    0
291878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#else
292878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define NULL    ((void *)0)
293878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
294878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
295878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
296878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
297878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* Calendar/TimeZone data types                                              */
298878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
299878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
300878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
301878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Date and Time data type.
302878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * This is a primitive data type that holds the date and time
303878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * as the number of milliseconds since 1970-jan-01, 00:00 UTC.
304878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * UTC leap seconds are ignored.
305878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
306878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
307878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgtypedef double UDate;
308878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
309878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/** The number of milliseconds per second @stable ICU 2.0 */
310878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_MILLIS_PER_SECOND        (1000)
311878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/** The number of milliseconds per minute @stable ICU 2.0 */
312878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_MILLIS_PER_MINUTE       (60000)
313878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/** The number of milliseconds per hour @stable ICU 2.0 */
314878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_MILLIS_PER_HOUR       (3600000)
315878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/** The number of milliseconds per day @stable ICU 2.0 */
316878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_MILLIS_PER_DAY       (86400000)
317878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
318878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
319878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
320878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* UClassID-based RTTI */
321878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
322878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
323878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
324878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * UClassID is used to identify classes without using RTTI, since RTTI
325878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * is not yet supported by all C++ compilers.  Each class hierarchy which needs
326878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * to implement polymorphic clone() or operator==() defines two methods,
327878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * described in detail below.  UClassID values can be compared using
328878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * operator==(). Nothing else should be done with them.
329878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
330878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \par
331878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * getDynamicClassID() is declared in the base class of the hierarchy as
332878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * a pure virtual.  Each concrete subclass implements it in the same way:
333878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
334878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \code
335878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      class Base {
336878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      public:
337878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *          virtual UClassID getDynamicClassID() const = 0;
338878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      }
339878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
340878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      class Derived {
341878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      public:
342878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *          virtual UClassID getDynamicClassID() const
343878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *            { return Derived::getStaticClassID(); }
344878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      }
345878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \endcode
346878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
347878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Each concrete class implements getStaticClassID() as well, which allows
348878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * clients to test for a specific type.
349878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
350878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \code
351878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      class Derived {
352878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      public:
353878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *          static UClassID U_EXPORT2 getStaticClassID();
354878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      private:
355878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *          static char fgClassID;
356878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      }
357878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
358878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      // In Derived.cpp:
359878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      UClassID Derived::getStaticClassID()
360878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *        { return (UClassID)&Derived::fgClassID; }
361878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *      char Derived::fgClassID = 0; // Value is irrelevant
362878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \endcode
363878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
364878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
365878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgtypedef void* UClassID;
366878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
367878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
368878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* Shared library/DLL import-export API control                              */
369878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
370878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
371878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*
372878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Control of symbol import/export.
373878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * ICU is separated into three libraries.
374878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
375878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
376878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*
377878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_COMBINED_IMPLEMENTATION
378878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Set to export library symbols from inside the ICU library
379878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * when all of ICU is in a single library.
380878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * This can be set as a compiler option while building ICU, and it
381878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * needs to be the first one tested to override U_COMMON_API, U_I18N_API, etc.
382878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
383878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
384878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
385878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
386878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_DATA_API
387878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Set to export library symbols from inside the stubdata library,
388878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * and to import them from outside.
389878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 3.0
390878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
391878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
392878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
393878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_COMMON_API
394878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Set to export library symbols from inside the common library,
395878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * and to import them from outside.
396878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
397878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
398878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
399878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
400878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_I18N_API
401878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Set to export library symbols from inside the i18n library,
402878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * and to import them from outside.
403878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
404878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
405878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
406878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
407878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_LAYOUT_API
408878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Set to export library symbols from inside the layout engine library,
409878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * and to import them from outside.
410878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
411878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
412878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
413878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
414878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_LAYOUTEX_API
415878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Set to export library symbols from inside the layout extensions library,
416878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * and to import them from outside.
417878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.6
418878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
419878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
420878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
421878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_IO_API
422878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Set to export library symbols from inside the ustdio library,
423878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * and to import them from outside.
424878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
425878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
426878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
427878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
428878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_TOOLUTIL_API
429878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Set to export library symbols from inside the toolutil library,
430878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * and to import them from outside.
431878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 3.4
432878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
433878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
434878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#if defined(U_COMBINED_IMPLEMENTATION)
435878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DATA_API     U_EXPORT
436878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API   U_EXPORT
437878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API     U_EXPORT
438878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API   U_EXPORT
439878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API U_EXPORT
440878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API       U_EXPORT
441878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API U_EXPORT
442878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#elif defined(U_STATIC_IMPLEMENTATION)
443878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DATA_API
444878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API
445878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API
446878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API
447878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API
448878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API
449878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API
450878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#elif defined(U_COMMON_IMPLEMENTATION)
451c9d4177436c2f319b86583f1f526f8dc1d1dd90fwfh@chromium.org#define U_DATA_API     U_EXPORT
452878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API   U_EXPORT
453878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API     U_IMPORT
454878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API   U_IMPORT
455878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API U_IMPORT
456878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API       U_IMPORT
457878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API U_IMPORT
458878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#elif defined(U_I18N_IMPLEMENTATION)
459878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DATA_API     U_IMPORT
460878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API   U_IMPORT
461878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API     U_EXPORT
462878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API   U_IMPORT
463878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API U_IMPORT
464878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API       U_IMPORT
465878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API U_IMPORT
466878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#elif defined(U_LAYOUT_IMPLEMENTATION)
467878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DATA_API     U_IMPORT
468878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API   U_IMPORT
469878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API     U_IMPORT
470878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API   U_EXPORT
471878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API U_IMPORT
472878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API       U_IMPORT
473878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API U_IMPORT
474878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#elif defined(U_LAYOUTEX_IMPLEMENTATION)
475878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DATA_API     U_IMPORT
476878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API   U_IMPORT
477878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API     U_IMPORT
478878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API   U_IMPORT
479878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API U_EXPORT
480878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API       U_IMPORT
481878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API U_IMPORT
482878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#elif defined(U_IO_IMPLEMENTATION)
483878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DATA_API     U_IMPORT
484878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API   U_IMPORT
485878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API     U_IMPORT
486878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API   U_IMPORT
487878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API U_IMPORT
488878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API       U_EXPORT
489878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API U_IMPORT
490878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#elif defined(U_TOOLUTIL_IMPLEMENTATION)
491878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DATA_API     U_IMPORT
492878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API   U_IMPORT
493878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API     U_IMPORT
494878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API   U_IMPORT
495878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API U_IMPORT
496878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API       U_IMPORT
497878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API U_EXPORT
498878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#else
499878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_DATA_API     U_IMPORT
500878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_COMMON_API   U_IMPORT
501878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_I18N_API     U_IMPORT
502878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUT_API   U_IMPORT
503878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_LAYOUTEX_API U_IMPORT
504878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_IO_API       U_IMPORT
505878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_TOOLUTIL_API U_IMPORT
506878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
507878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
508878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
509878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \def U_STANDARD_CPP_NAMESPACE
510878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Control of C++ Namespace
511878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
512878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
513878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef __cplusplus
514878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_STANDARD_CPP_NAMESPACE        ::
515878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#else
516878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#define U_STANDARD_CPP_NAMESPACE
517878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
518878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
519878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
520878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
521878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* Global delete operator                                                    */
522878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
523878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
524878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*
525878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * The ICU4C library must not use the global new and delete operators.
526878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * These operators here are defined to enable testing for this.
527878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * See Jitterbug 2581 for details of why this is necessary.
528878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
529878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Verification that ICU4C's memory usage is correct, i.e.,
530878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * that global new/delete are not used:
531878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
532878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * a) Check for imports of global new/delete (see uobject.cpp for details)
533878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * b) Verify that new is never imported.
534878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * c) Verify that delete is only imported from object code for interface/mixin classes.
535878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * d) Add global delete and delete[] only for the ICU4C library itself
536878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *    and define them in a way that crashes or otherwise easily shows a problem.
537878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
538878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * The following implements d).
539878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * The operator implementations crash; this is intentional and used for library debugging.
540878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
541878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Note: This is currently only done on Windows because
542878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * some Linux/Unix compilers have problems with defining global new/delete.
543878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * On Windows, U_WINDOWS is defined, and it is _MSC_VER>=1200 for MSVC 6.0 and higher.
544878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
545878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#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))
546878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
547878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifndef U_HIDE_INTERNAL_API
548878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
549878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Global operator new, defined only inside ICU4C, must not be used.
550878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Crashes intentionally.
551878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @internal
552878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
553878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orginline void *
554878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgoperator new(size_t /*size*/) {
555878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    char *q=NULL;
556878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    *q=5; /* break it */
557878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    return q;
558878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org}
559878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
560878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef _Ret_bytecap_
561878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* This is only needed to suppress a Visual C++ 2008 warning for operator new[]. */
562878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org_Ret_bytecap_(_Size)
563878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
564878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
565878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Global operator new[], defined only inside ICU4C, must not be used.
566878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Crashes intentionally.
567878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @internal
568878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
569878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orginline void *
570878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgoperator new[](size_t /*size*/) {
571878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    char *q=NULL;
572878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    *q=5; /* break it */
573878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    return q;
574878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org}
575878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
576878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
577878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Global operator delete, defined only inside ICU4C, must not be used.
578878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Crashes intentionally.
579878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @internal
580878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
581878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orginline void
582878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgoperator delete(void * /*p*/) {
583878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    char *q=NULL;
584878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    *q=5; /* break it */
585878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org}
586878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
587878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
588878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Global operator delete[], defined only inside ICU4C, must not be used.
589878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Crashes intentionally.
590878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @internal
591878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
592878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orginline void
593878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgoperator delete[](void * /*p*/) {
594878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    char *q=NULL;
595878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    *q=5; /* break it */
596878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org}
597878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
598878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif /* U_HIDE_INTERNAL_API */
599878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
600878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
601878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
602878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* UErrorCode */
603878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/*===========================================================================*/
604878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
605878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
606878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Error code to replace exception handling, so that the code is compatible with all C++ compilers,
607878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * and to use the same mechanism for C and C++.
608878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
609878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \par
610878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * ICU functions that take a reference (C++) or a pointer (C) to a UErrorCode
611878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * first test if(U_FAILURE(errorCode)) { return immediately; }
612878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * so that in a chain of such functions the first one that sets an error code
613878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * causes the following ones to not perform any operations.
614878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org *
615878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * \par
616878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Error codes should be tested using U_FAILURE() and U_SUCCESS().
617878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
618878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
619878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgtypedef enum UErrorCode {
620878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /* The ordering of U_ERROR_INFO_START Vs U_USING_FALLBACK_WARNING looks weird
621878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * and is that way because VC++ debugger displays first encountered constant,
622878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * which is not the what the code is used for
623878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
624878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
625878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_USING_FALLBACK_WARNING  = -128,   /**< A resource bundle lookup returned a fallback result (not an error) */
626878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
627878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ERROR_WARNING_START     = -128,   /**< Start of information results (semantically successful) */
628878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
629878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_USING_DEFAULT_WARNING   = -127,   /**< A resource bundle lookup returned a result from the root locale (not an error) */
630878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
631878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_SAFECLONE_ALLOCATED_WARNING = -126, /**< A SafeClone operation required allocating memory (informational only) */
632878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
633878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_STATE_OLD_WARNING       = -125,   /**< ICU has to use compatibility layer to construct the service. Expect performance/memory usage degradation. Consider upgrading */
634878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
635878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_STRING_NOT_TERMINATED_WARNING = -124,/**< An output string could not be NUL-terminated because output length==destCapacity. */
636878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
637878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_SORT_KEY_TOO_SHORT_WARNING = -123, /**< Number of levels requested in getBound is higher than the number of levels in the sort key */
638878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
639878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_AMBIGUOUS_ALIAS_WARNING = -122,   /**< This converter alias can go to different converter implementations */
640878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
641878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_DIFFERENT_UCA_VERSION = -121,     /**< ucol_open encountered a mismatch between UCA version and collator image version, so the collator was constructed from rules. No impact to further function */
642878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
643878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PLUGIN_CHANGED_LEVEL_WARNING = -120, /**< A plugin caused a level change. May not be an error, but later plugins may not load. */
644878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
645878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ERROR_WARNING_LIMIT,              /**< This must always be the last warning value to indicate the limit for UErrorCode warnings (last warning code +1) */
646878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
647878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
648878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ZERO_ERROR              =  0,     /**< No error, no warning. */
649878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
650878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ILLEGAL_ARGUMENT_ERROR  =  1,     /**< Start of codes indicating failure */
651878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MISSING_RESOURCE_ERROR  =  2,     /**< The requested resource cannot be found */
652878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_FORMAT_ERROR    =  3,     /**< Data format is not what is expected */
653878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_FILE_ACCESS_ERROR       =  4,     /**< The requested file cannot be found */
654878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INTERNAL_PROGRAM_ERROR  =  5,     /**< Indicates a bug in the library code */
655878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MESSAGE_PARSE_ERROR     =  6,     /**< Unable to parse a message (message format) */
656878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MEMORY_ALLOCATION_ERROR =  7,     /**< Memory allocation error */
657878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INDEX_OUTOFBOUNDS_ERROR =  8,     /**< Trying to access the index that is out of bounds */
658878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PARSE_ERROR             =  9,     /**< Equivalent to Java ParseException */
659878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_CHAR_FOUND      = 10,     /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character. */
660878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_TRUNCATED_CHAR_FOUND    = 11,     /**< Character conversion: Incomplete input sequence. */
661878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ILLEGAL_CHAR_FOUND      = 12,     /**< Character conversion: Illegal input sequence/combination of input units. */
662878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_TABLE_FORMAT    = 13,     /**< Conversion table file found, but corrupted */
663878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_TABLE_FILE      = 14,     /**< Conversion table file not found */
664878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BUFFER_OVERFLOW_ERROR   = 15,     /**< A result would not fit in the supplied buffer */
665878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNSUPPORTED_ERROR       = 16,     /**< Requested operation not supported in current context */
666878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_RESOURCE_TYPE_MISMATCH  = 17,     /**< an operation is requested over a resource that does not support it */
667878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ILLEGAL_ESCAPE_SEQUENCE = 18,     /**< ISO-2022 illlegal escape sequence */
668878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNSUPPORTED_ESCAPE_SEQUENCE = 19, /**< ISO-2022 unsupported escape sequence */
669878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_NO_SPACE_AVAILABLE      = 20,     /**< No space available for in-buffer expansion for Arabic shaping */
670878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_CE_NOT_FOUND_ERROR      = 21,     /**< Currently used only while setting variable top, but can be used generally */
671878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PRIMARY_TOO_LONG_ERROR  = 22,     /**< User tried to set variable top to a primary that is longer than two bytes */
672878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_STATE_TOO_OLD_ERROR     = 23,     /**< ICU cannot construct a service from this state, as it is no longer supported */
673878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_TOO_MANY_ALIASES_ERROR  = 24,     /**< There are too many aliases in the path to the requested resource.
674878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org                                             It is very possible that a circular alias definition has occured */
675878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ENUM_OUT_OF_SYNC_ERROR  = 25,     /**< UEnumeration out of sync with underlying collection */
676878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVARIANT_CONVERSION_ERROR = 26,  /**< Unable to convert a UChar* string to char* with the invariant converter. */
677878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_STATE_ERROR     = 27,     /**< Requested operation can not be completed with ICU in its current state */
678878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_COLLATOR_VERSION_MISMATCH = 28,   /**< Collator version is not compatible with the base version */
679878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_USELESS_COLLATOR_ERROR  = 29,     /**< Collator is options only and no base is specified */
680878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_NO_WRITE_PERMISSION     = 30,     /**< Attempt to modify read-only or constant data. */
681878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
682878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_STANDARD_ERROR_LIMIT,             /**< This must always be the last value to indicate the limit for standard errors */
683878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /*
684878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * the error code range 0x10000 0x10100 are reserved for Transliterator
685878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
686878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BAD_VARIABLE_DEFINITION=0x10000,/**< Missing '$' or duplicate variable name */
687878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PARSE_ERROR_START = 0x10000,    /**< Start of Transliterator errors */
688878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MALFORMED_RULE,                 /**< Elements of a rule are misplaced */
689878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MALFORMED_SET,                  /**< A UnicodeSet pattern is invalid*/
690878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MALFORMED_SYMBOL_REFERENCE,     /**< UNUSED as of ICU 2.4 */
691878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MALFORMED_UNICODE_ESCAPE,       /**< A Unicode escape pattern is invalid*/
692878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MALFORMED_VARIABLE_DEFINITION,  /**< A variable definition is invalid */
693878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MALFORMED_VARIABLE_REFERENCE,   /**< A variable reference is invalid */
694878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MISMATCHED_SEGMENT_DELIMITERS,  /**< UNUSED as of ICU 2.4 */
695878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MISPLACED_ANCHOR_START,         /**< A start anchor appears at an illegal position */
696878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MISPLACED_CURSOR_OFFSET,        /**< A cursor offset occurs at an illegal position */
697878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MISPLACED_QUANTIFIER,           /**< A quantifier appears after a segment close delimiter */
698878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MISSING_OPERATOR,               /**< A rule contains no operator */
699878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MISSING_SEGMENT_CLOSE,          /**< UNUSED as of ICU 2.4 */
700878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_ANTE_CONTEXTS,         /**< More than one ante context */
701878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_CURSORS,               /**< More than one cursor */
702878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_POST_CONTEXTS,         /**< More than one post context */
703878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_TRAILING_BACKSLASH,             /**< A dangling backslash */
704878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNDEFINED_SEGMENT_REFERENCE,    /**< A segment reference does not correspond to a defined segment */
705878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNDEFINED_VARIABLE,             /**< A variable reference does not correspond to a defined variable */
706878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNQUOTED_SPECIAL,               /**< A special character was not quoted or escaped */
707878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNTERMINATED_QUOTE,             /**< A closing single quote is missing */
708878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_RULE_MASK_ERROR,                /**< A rule is hidden by an earlier more general rule */
709878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MISPLACED_COMPOUND_FILTER,      /**< A compound filter is in an invalid location */
710878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_COMPOUND_FILTERS,      /**< More than one compound filter */
711878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_RBT_SYNTAX,             /**< A "::id" rule was passed to the RuleBasedTransliterator parser */
712878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_PROPERTY_PATTERN,       /**< UNUSED as of ICU 2.4 */
713878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MALFORMED_PRAGMA,               /**< A 'use' pragma is invlalid */
714878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNCLOSED_SEGMENT,               /**< A closing ')' is missing */
715878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ILLEGAL_CHAR_IN_SEGMENT,        /**< UNUSED as of ICU 2.4 */
716878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_VARIABLE_RANGE_EXHAUSTED,       /**< Too many stand-ins generated for the given variable range */
717878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_VARIABLE_RANGE_OVERLAP,         /**< The variable range overlaps characters used in rules */
718878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ILLEGAL_CHARACTER,              /**< A special character is outside its allowed context */
719878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INTERNAL_TRANSLITERATOR_ERROR,  /**< Internal transliterator system error */
720878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_ID,                     /**< A "::id" rule specifies an unknown transliterator */
721878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_INVALID_FUNCTION,               /**< A "&fn()" rule specifies an unknown transliterator */
722878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PARSE_ERROR_LIMIT,              /**< The limit for Transliterator errors */
723878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
724878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /*
725878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * the error code range 0x10100 0x10200 are reserved for formatting API parsing error
726878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
727878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNEXPECTED_TOKEN=0x10100,       /**< Syntax error in format pattern */
728878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_FMT_PARSE_ERROR_START=0x10100,  /**< Start of format library errors */
729878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_DECIMAL_SEPARATORS,    /**< More than one decimal separator in number pattern */
730878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_DECIMAL_SEPERATORS = U_MULTIPLE_DECIMAL_SEPARATORS, /**< Typo: kept for backward compatibility. Use U_MULTIPLE_DECIMAL_SEPARATORS */
731878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_EXPONENTIAL_SYMBOLS,   /**< More than one exponent symbol in number pattern */
732878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MALFORMED_EXPONENTIAL_PATTERN,  /**< Grouping symbol in exponent pattern */
733878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_PERCENT_SYMBOLS,       /**< More than one percent symbol in number pattern */
734878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_PERMILL_SYMBOLS,       /**< More than one permill symbol in number pattern */
735878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_MULTIPLE_PAD_SPECIFIERS,        /**< More than one pad symbol in number pattern */
736878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PATTERN_SYNTAX_ERROR,           /**< Syntax error in format pattern */
737878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ILLEGAL_PAD_POSITION,           /**< Pad symbol misplaced in number pattern */
738878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNMATCHED_BRACES,               /**< Braces do not match in message pattern */
739878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNSUPPORTED_PROPERTY,           /**< UNUSED as of ICU 2.4 */
740878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNSUPPORTED_ATTRIBUTE,          /**< UNUSED as of ICU 2.4 */
741878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ARGUMENT_TYPE_MISMATCH,         /**< Argument name and argument index mismatch in MessageFormat functions */
742878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_DUPLICATE_KEYWORD,              /**< Duplicate keyword in PluralFormat */
743878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_UNDEFINED_KEYWORD,              /**< Undefined Plural keyword */
744878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_DEFAULT_KEYWORD_MISSING,        /**< Missing DEFAULT rule in plural rules */
745878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_DECIMAL_NUMBER_SYNTAX_ERROR,    /**< Decimal number syntax error */
746878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_FMT_PARSE_ERROR_LIMIT,          /**< The limit for format library errors */
747878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
748878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /*
749878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * the error code range 0x10200 0x102ff are reserved for Break Iterator related error
750878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
751878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_INTERNAL_ERROR=0x10200,          /**< An internal error (bug) was detected.             */
752878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_ERROR_START=0x10200,             /**< Start of codes indicating Break Iterator failures */
753878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_HEX_DIGITS_EXPECTED,             /**< Hex digits expected as part of a escaped char in a rule. */
754878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_SEMICOLON_EXPECTED,              /**< Missing ';' at the end of a RBBI rule.            */
755878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_RULE_SYNTAX,                     /**< Syntax error in RBBI rule.                        */
756878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_UNCLOSED_SET,                    /**< UnicodeSet witing an RBBI rule missing a closing ']'.  */
757878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_ASSIGN_ERROR,                    /**< Syntax error in RBBI rule assignment statement.   */
758878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_VARIABLE_REDFINITION,            /**< RBBI rule $Variable redefined.                    */
759878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_MISMATCHED_PAREN,                /**< Mis-matched parentheses in an RBBI rule.          */
760878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_NEW_LINE_IN_QUOTED_STRING,       /**< Missing closing quote in an RBBI rule.            */
761878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_UNDEFINED_VARIABLE,              /**< Use of an undefined $Variable in an RBBI rule.    */
762878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_INIT_ERROR,                      /**< Initialization failure.  Probable missing ICU Data. */
763878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_RULE_EMPTY_SET,                  /**< Rule contains an empty Unicode Set.               */
764878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_UNRECOGNIZED_OPTION,             /**< !!option in RBBI rules not recognized.            */
765878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_MALFORMED_RULE_TAG,              /**< The {nnn} tag on a rule is mal formed             */
766878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_BRK_ERROR_LIMIT,                     /**< This must always be the last value to indicate the limit for Break Iterator failures */
767878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
768878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /*
769878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * The error codes in the range 0x10300-0x103ff are reserved for regular expression related errrs
770878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
771878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_INTERNAL_ERROR=0x10300,       /**< An internal error (bug) was detected.              */
772878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_ERROR_START=0x10300,          /**< Start of codes indicating Regexp failures          */
773878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_RULE_SYNTAX,                  /**< Syntax error in regexp pattern.                    */
774878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_INVALID_STATE,                /**< RegexMatcher in invalid state for requested operation */
775878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_BAD_ESCAPE_SEQUENCE,          /**< Unrecognized backslash escape sequence in pattern  */
776878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_PROPERTY_SYNTAX,              /**< Incorrect Unicode property                         */
777878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_UNIMPLEMENTED,                /**< Use of regexp feature that is not yet implemented. */
778878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_MISMATCHED_PAREN,             /**< Incorrectly nested parentheses in regexp pattern.  */
779878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_NUMBER_TOO_BIG,               /**< Decimal number is too large.                       */
780878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_BAD_INTERVAL,                 /**< Error in {min,max} interval                        */
781878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_MAX_LT_MIN,                   /**< In {min,max}, max is less than min.                */
782878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_INVALID_BACK_REF,             /**< Back-reference to a non-existent capture group.    */
783878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_INVALID_FLAG,                 /**< Invalid value for match mode flags.                */
784878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_LOOK_BEHIND_LIMIT,            /**< Look-Behind pattern matches must have a bounded maximum length.    */
785878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_SET_CONTAINS_STRING,          /**< Regexps cannot have UnicodeSets containing strings.*/
786878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_OCTAL_TOO_BIG,                /**< Octal character constants must be <= 0377.         */
787878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_MISSING_CLOSE_BRACKET,        /**< Missing closing bracket on a bracket expression.   */
788878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_INVALID_RANGE,                /**< In a character range [x-y], x is greater than y.   */
789878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_STACK_OVERFLOW,               /**< Regular expression backtrack stack overflow.       */
790878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_TIME_OUT,                     /**< Maximum allowed match time exceeded                */
791878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_STOPPED_BY_CALLER,            /**< Matching operation aborted by user callback fn.    */
792878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_REGEX_ERROR_LIMIT,                  /**< This must always be the last value to indicate the limit for regexp errors */
793878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
794878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /*
795878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * The error code in the range 0x10400-0x104ff are reserved for IDNA related error codes
796878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
797878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_PROHIBITED_ERROR=0x10400,
798878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_ERROR_START=0x10400,
799878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_UNASSIGNED_ERROR,
800878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_CHECK_BIDI_ERROR,
801878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_STD3_ASCII_RULES_ERROR,
802878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_ACE_PREFIX_ERROR,
803878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_VERIFICATION_ERROR,
804878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_LABEL_TOO_LONG_ERROR,
805878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_ZERO_LENGTH_LABEL_ERROR,
806878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR,
807878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_IDNA_ERROR_LIMIT,
808878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /*
809878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * Aliases for StringPrep
810878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
811878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_STRINGPREP_PROHIBITED_ERROR = U_IDNA_PROHIBITED_ERROR,
812878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_STRINGPREP_UNASSIGNED_ERROR = U_IDNA_UNASSIGNED_ERROR,
813878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_STRINGPREP_CHECK_BIDI_ERROR = U_IDNA_CHECK_BIDI_ERROR,
814878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
815878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /*
816878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * The error code in the range 0x10500-0x105ff are reserved for Plugin related error codes
817878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
818878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PLUGIN_ERROR_START=0x10500,         /**< Start of codes indicating plugin failures */
819878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PLUGIN_TOO_HIGH=0x10500,            /**< The plugin's level is too high to be loaded right now. */
820878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PLUGIN_DIDNT_SET_LEVEL,             /**< The plugin didn't call uplug_setPlugLevel in response to a QUERY */
821878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_PLUGIN_ERROR_LIMIT,                 /**< This must always be the last value to indicate the limit for plugin errors */
822878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
823878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT      /**< This must always be the last value to indicate the limit for UErrorCode (last error code +1) */
824878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org} UErrorCode;
825878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
826878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* Use the following to determine if an UErrorCode represents */
827878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/* operational success or failure. */
828878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
829878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#ifdef XP_CPLUSPLUS
830878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /**
831878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * Does the error code indicate success?
832878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * @stable ICU 2.0
833878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
834878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    static
835878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); }
836878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /**
837878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * Does the error code indicate a failure?
838878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * @stable ICU 2.0
839878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
840878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    static
841878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); }
842878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#else
843878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /**
844878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * Does the error code indicate success?
845878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * @stable ICU 2.0
846878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
847878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   define U_SUCCESS(x) ((x)<=U_ZERO_ERROR)
848878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org    /**
849878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * Does the error code indicate a failure?
850878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     * @stable ICU 2.0
851878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org     */
852878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#   define U_FAILURE(x) ((x)>U_ZERO_ERROR)
853878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif
854878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
855878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org/**
856878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * Return a string for a UErrorCode value.
857878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * The string will be the same as the name of the error code constant
858878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * in the UErrorCode enum above.
859878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org * @stable ICU 2.0
860878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org */
861878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgU_STABLE const char * U_EXPORT2
862878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.orgu_errorName(UErrorCode code);
863878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
864878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org
865878ab27c8e23bae140344313af953fe99cf89b3jshin@chromium.org#endif /* _UTYPES */
866