LEGlyphFilter.h   LEGlyphFilter.h 
/* /*
* *
* (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
* *
*/ */
#ifndef __LEGLYPHFILTER__H #ifndef __LEGLYPHFILTER__H
#define __LEGLYPHFILTER__H #define __LEGLYPHFILTER__H
#include "LETypes.h" #include "LETypes.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
#ifndef U_HIDE_INTERNAL_API
/** /**
* This is a helper class that is used to * This is a helper class that is used to
* recognize a set of glyph indices. * recognize a set of glyph indices.
* *
* @internal * @internal
*/ */
class LEGlyphFilter /* not : public UObject because this is an interface/mi xin class */ { class LEGlyphFilter /* not : public UObject because this is an interface/mi xin class */ {
public: public:
/** /**
* Destructor. * Destructor.
skipping to change at line 41 skipping to change at line 42
* recognized by the filter. * recognized by the filter.
* *
* @param glyph - the glyph index to be tested * @param glyph - the glyph index to be tested
* *
* @return TRUE if the glyph index is in the set. * @return TRUE if the glyph index is in the set.
* *
* @internal * @internal
*/ */
virtual le_bool accept(LEGlyphID glyph) const = 0; virtual le_bool accept(LEGlyphID glyph) const = 0;
}; };
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 LEInsertionList.h   LEInsertionList.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1998-2008, International Business Machines * Copyright (C) 1998-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
*/ */
#ifndef __LEINSERTIONLIST_H #ifndef __LEINSERTIONLIST_H
#define __LEINSERTIONLIST_H #define __LEINSERTIONLIST_H
#include "LETypes.h" #include "LETypes.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
struct InsertionRecord; struct InsertionRecord;
#ifndef U_HIDE_INTERNAL_API
/** /**
* This class encapsulates the callback used by <code>LEInsertionList</code > * This class encapsulates the callback used by <code>LEInsertionList</code >
* to apply an insertion from the insertion list. * to apply an insertion from the insertion list.
* *
* @internal * @internal
*/ */
class U_LAYOUT_API LEInsertionCallback class U_LAYOUT_API LEInsertionCallback
{ {
public: public:
/** /**
skipping to change at line 172 skipping to change at line 173
/** /**
* Set to <code>TRUE</code> if the glyphs are in right * Set to <code>TRUE</code> if the glyphs are in right
* to left order. Since we want the rightmost insertion * to left order. Since we want the rightmost insertion
* to be first on the list, we need to append the * to be first on the list, we need to append the
* insertions in this case. Otherwise they're prepended. * insertions in this case. Otherwise they're prepended.
* *
* @internal * @internal
*/ */
le_bool append; le_bool append;
}; };
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 LEScripts.h   LEScripts.h 
/* /*
* *
* (C) Copyright IBM Corp. 1998-2010. All Rights Reserved. * (C) Copyright IBM Corp. 1998-2012. All Rights Reserved.
* *
* WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
* YOU REALLY KNOW WHAT YOU'RE DOING. * YOU REALLY KNOW WHAT YOU'RE DOING.
* *
* Generated on: 10/26/2010 02:53:33 PM PDT * Generated on: 11/01/2011 04:08:09 PM PDT
*/ */
#ifndef __LESCRIPTS_H #ifndef __LESCRIPTS_H
#define __LESCRIPTS_H #define __LESCRIPTS_H
#include "LETypes.h" #include "LETypes.h"
/** /**
* \file * \file
* \brief C++ API: Constants for Unicode script values * \brief C++ API: Constants for Unicode script values
skipping to change at line 219 skipping to change at line 219
granScriptCode = 137, granScriptCode = 137,
kpelScriptCode = 138, kpelScriptCode = 138,
lomaScriptCode = 139, lomaScriptCode = 139,
mendScriptCode = 140, mendScriptCode = 140,
mercScriptCode = 141, mercScriptCode = 141,
narbScriptCode = 142, narbScriptCode = 142,
nbatScriptCode = 143, nbatScriptCode = 143,
palmScriptCode = 144, palmScriptCode = 144,
sindScriptCode = 145, sindScriptCode = 145,
waraScriptCode = 146, waraScriptCode = 146,
/**
* @stable ICU 4.8
*/
scriptCodeCount = 147 afakScriptCode = 147,
jurcScriptCode = 148,
mrooScriptCode = 149,
nshuScriptCode = 150,
shrdScriptCode = 151,
soraScriptCode = 152,
takrScriptCode = 153,
tangScriptCode = 154,
woleScriptCode = 155,
/**
* @stable ICU 49
*/
khojScriptCode = 156,
tirhScriptCode = 157,
scriptCodeCount = 158
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
 End of changes. 4 change blocks. 
3 lines changed or deleted 22 lines changed or added


 LETypes.h   LETypes.h 
/* /*
* *
* (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
* *
*/ */
#ifndef __LETYPES_H #ifndef __LETYPES_H
#define __LETYPES_H #define __LETYPES_H
#if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || define d(U_LAYOUTEX_IMPLEMENTATION) || defined(U_STATIC_IMPLEMENTATION) || defined (U_COMBINED_IMPLEMENTATION)) #if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || define d(U_LAYOUTEX_IMPLEMENTATION) || defined(U_STATIC_IMPLEMENTATION) || defined (U_COMBINED_IMPLEMENTATION))
#define LE_USE_CMEMORY #define LE_USE_CMEMORY
#endif #endif
#include "unicode/utypes.h" #include "unicode/utypes.h"
#ifdef XP_CPLUSPLUS #ifdef __cplusplus
#include "unicode/uobject.h" #include "unicode/uobject.h"
#endif #endif
#ifdef LE_USE_CMEMORY #ifdef LE_USE_CMEMORY
#include "cmemory.h" #include "cmemory.h"
#endif #endif
/*! /*!
* \file * \file
* \brief C API: Basic definitions for the ICU LayoutEngine * \brief C API: Basic definitions for the ICU LayoutEngine
skipping to change at line 226 skipping to change at line 226
*/ */
typedef UChar LEUnicode16; typedef UChar LEUnicode16;
/** /**
* Used to represent 32-bit Unicode code points. * Used to represent 32-bit Unicode code points.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
typedef UChar32 LEUnicode32; typedef UChar32 LEUnicode32;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Used to represent 16-bit Unicode code points. * Used to represent 16-bit Unicode code points.
* *
* @deprecated since ICU 2.4. Use LEUnicode16 instead * @deprecated since ICU 2.4. Use LEUnicode16 instead
*/ */
typedef UChar LEUnicode; typedef UChar LEUnicode;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Used to hold a pair of (x, y) values which represent a point. * Used to hold a pair of (x, y) values which represent a point.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
struct LEPoint struct LEPoint
{ {
/** /**
* The x coordinate of the point. * The x coordinate of the point.
skipping to change at line 255 skipping to change at line 257
float fX; float fX;
/** /**
* The y coordinate of the point. * The y coordinate of the point.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
float fY; float fY;
}; };
#ifndef XP_CPLUSPLUS #ifndef __cplusplus
/** /**
* Used to hold a pair of (x, y) values which represent a point. * Used to hold a pair of (x, y) values which represent a point.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
typedef struct LEPoint LEPoint; typedef struct LEPoint LEPoint;
#endif #endif
#ifndef U_HIDE_INTERNAL_API
/** /**
* A convenience macro to get the length of an array. * A convenience macro to get the length of an array.
* *
* @internal * @internal
*/ */
#define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0]) #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])
#ifdef LE_USE_CMEMORY #ifdef LE_USE_CMEMORY
/** /**
* A convenience macro for copying an array. * A convenience macro for copying an array.
skipping to change at line 303 skipping to change at line 306
#define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSi ze) * sizeof (array)[0]) #define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSi ze) * sizeof (array)[0])
/** /**
* Free an array of basic types. This is used to isolate the rest of * Free an array of basic types. This is used to isolate the rest of
* the LayoutEngine code from cmemory.h. * the LayoutEngine code from cmemory.h.
* *
* @internal * @internal
*/ */
#define LE_DELETE_ARRAY(array) uprv_free((void *) (array)) #define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
#endif #endif
#endif /* U_HIDE_INTERNAL_API */
/** /**
* A macro to construct the four-letter tags used to * A macro to construct the four-letter tags used to
* label TrueType tables, and for script, language and * label TrueType tables, and for script, language and
* feature tags in OpenType tables. * feature tags in OpenType tables.
* *
* WARNING: THIS MACRO WILL ONLY WORK CORRECTLY IF * WARNING: THIS MACRO WILL ONLY WORK CORRECTLY IF
* THE ARGUMENT CHARACTERS ARE ASCII. * THE ARGUMENT CHARACTERS ARE ASCII.
* *
* @stable ICU 3.2 * @stable ICU 3.2
skipping to change at line 538 skipping to change at line 542
/* failures */ /* failures */
LE_ILLEGAL_ARGUMENT_ERROR = U_ILLEGAL_ARGUMENT_ERROR, /**< An il legal argument was detected. */ LE_ILLEGAL_ARGUMENT_ERROR = U_ILLEGAL_ARGUMENT_ERROR, /**< An il legal argument was detected. */
LE_MEMORY_ALLOCATION_ERROR = U_MEMORY_ALLOCATION_ERROR, /**< Memor y allocation error. */ LE_MEMORY_ALLOCATION_ERROR = U_MEMORY_ALLOCATION_ERROR, /**< Memor y allocation error. */
LE_INDEX_OUT_OF_BOUNDS_ERROR = U_INDEX_OUTOFBOUNDS_ERROR, /**< Tryin g to access an index that is out of bounds. */ LE_INDEX_OUT_OF_BOUNDS_ERROR = U_INDEX_OUTOFBOUNDS_ERROR, /**< Tryin g to access an index that is out of bounds. */
LE_NO_LAYOUT_ERROR = U_UNSUPPORTED_ERROR, /**< You m ust call layoutChars() first. */ LE_NO_LAYOUT_ERROR = U_UNSUPPORTED_ERROR, /**< You m ust call layoutChars() first. */
LE_INTERNAL_ERROR = U_INTERNAL_PROGRAM_ERROR, /**< An in ternal error was encountered. */ LE_INTERNAL_ERROR = U_INTERNAL_PROGRAM_ERROR, /**< An in ternal error was encountered. */
LE_FONT_FILE_NOT_FOUND_ERROR = U_FILE_ACCESS_ERROR, /**< The r equested font file cannot be opened. */ LE_FONT_FILE_NOT_FOUND_ERROR = U_FILE_ACCESS_ERROR, /**< The r equested font file cannot be opened. */
LE_MISSING_FONT_TABLE_ERROR = U_MISSING_RESOURCE_ERROR /**< The r equested font table does not exist. */ LE_MISSING_FONT_TABLE_ERROR = U_MISSING_RESOURCE_ERROR /**< The r equested font table does not exist. */
}; };
#ifndef XP_CPLUSPLUS #ifndef __cplusplus
/** /**
* Error codes returned by the LayoutEngine. * Error codes returned by the LayoutEngine.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
typedef enum LEErrorCode LEErrorCode; typedef enum LEErrorCode LEErrorCode;
#endif #endif
/** /**
* A convenience macro to test for the success of a LayoutEngine call. * A convenience macro to test for the success of a LayoutEngine call.
 End of changes. 8 change blocks. 
4 lines changed or deleted 8 lines changed or added


 LayoutEngine.h   LayoutEngine.h 
skipping to change at line 66 skipping to change at line 66
* in this way is owned by the object which created it, and will be freed w hen it * in this way is owned by the object which created it, and will be freed w hen it
* is no longer needed, or when the object's destructor is invoked. * is no longer needed, or when the object's destructor is invoked.
* *
* @see LEFontInstance * @see LEFontInstance
* @see ScriptAndLanguageTags.h * @see ScriptAndLanguageTags.h
* *
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
class U_LAYOUT_API LayoutEngine : public UObject { class U_LAYOUT_API LayoutEngine : public UObject {
public: public:
#ifndef U_HIDE_INTERNAL_API
/** @internal Flag to request kerning. */ /** @internal Flag to request kerning. */
static const le_int32 kTypoFlagKern; static const le_int32 kTypoFlagKern;
/** @internal Flag to request ligatures. */ /** @internal Flag to request ligatures. */
static const le_int32 kTypoFlagLiga; static const le_int32 kTypoFlagLiga;
#endif /* U_HIDE_INTERNAL_API */
protected: protected:
/** /**
* The object which holds the glyph storage * The object which holds the glyph storage
* *
* @internal * @internal
*/ */
LEGlyphStorage *fGlyphStorage; LEGlyphStorage *fGlyphStorage;
/** /**
skipping to change at line 121 skipping to change at line 123
le_int32 fTypoFlags; le_int32 fTypoFlags;
/** /**
* <code>TRUE</code> if <code>mapCharsToGlyphs</code> should replace ZW J / ZWNJ with a glyph * <code>TRUE</code> if <code>mapCharsToGlyphs</code> should replace ZW J / ZWNJ with a glyph
* with no contours. * with no contours.
* *
* @internal * @internal
*/ */
le_bool fFilterZeroWidth; le_bool fFilterZeroWidth;
#ifndef U_HIDE_INTERNAL_API
/** /**
* This constructs an instance for a given font, script and language. S ubclass constructors * This constructs an instance for a given font, script and language. S ubclass constructors
* must call this constructor. * must call this constructor.
* *
* @param fontInstance - the font for the text * @param fontInstance - the font for the text
* @param scriptCode - the script for the text * @param scriptCode - the script for the text
* @param languageCode - the language for the text * @param languageCode - the language for the text
* @param typoFlags - the typographic control flags for the text (a bit field). Use kTypoFlagKern * @param typoFlags - the typographic control flags for the text (a bit field). Use kTypoFlagKern
* if kerning is desired, kTypoFlagLiga if ligature formation is desire d. Others are reserved. * if kerning is desired, kTypoFlagLiga if ligature formation is desire d. Others are reserved.
* @param success - set to an error code if the operation fails * @param success - set to an error code if the operation fails
skipping to change at line 142 skipping to change at line 145
* @see LEFontInstance * @see LEFontInstance
* @see ScriptAndLanguageTags.h * @see ScriptAndLanguageTags.h
* *
* @internal * @internal
*/ */
LayoutEngine(const LEFontInstance *fontInstance, LayoutEngine(const LEFontInstance *fontInstance,
le_int32 scriptCode, le_int32 scriptCode,
le_int32 languageCode, le_int32 languageCode,
le_int32 typoFlags, le_int32 typoFlags,
LEErrorCode &success); LEErrorCode &success);
#endif /* U_HIDE_INTERNAL_API */
// Do not enclose the protected default constructor with #ifndef U_HIDE
_INTERNAL_API
// or else the compiler will create a public default constructor.
/** /**
* This overrides the default no argument constructor to make it * This overrides the default no argument constructor to make it
* difficult for clients to call it. Clients are expected to call * difficult for clients to call it. Clients are expected to call
* layoutEngineFactory. * layoutEngineFactory.
* *
* @internal * @internal
*/ */
LayoutEngine(); LayoutEngine();
/** /**
skipping to change at line 283 skipping to change at line 289
* @param glyphStorage - the object which holds the per-glyph storage. The glyph and char * @param glyphStorage - the object which holds the per-glyph storage. The glyph and char
* indices arrays will be filled in. * indices arrays will be filled in.
* @param success - set to an error code if the operation fails * @param success - set to an error code if the operation fails
* *
* @see LEFontInstance * @see LEFontInstance
* *
* @internal * @internal
*/ */
virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphStorage &glyphStor age, LEErrorCode &success); virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphStorage &glyphStor age, LEErrorCode &success);
#ifndef U_HIDE_INTERNAL_API
/** /**
* This is a convenience method that forces the advance width of mark * This is a convenience method that forces the advance width of mark
* glyphs to be zero, which is required for proper selection and highli ghting. * glyphs to be zero, which is required for proper selection and highli ghting.
* *
* @param glyphStorage - the object containing the per-glyph storage. T he positions array will be modified. * @param glyphStorage - the object containing the per-glyph storage. T he positions array will be modified.
* @param markFilter - used to identify mark glyphs * @param markFilter - used to identify mark glyphs
* @param success - output parameter set to an error code if the operat ion fails * @param success - output parameter set to an error code if the operat ion fails
* *
* @see LEGlyphFilter * @see LEGlyphFilter
* *
skipping to change at line 316 skipping to change at line 323
* @param glyphStorage - the object containing the per-glyph storage. T he positions array will be modified. * @param glyphStorage - the object containing the per-glyph storage. T he positions array will be modified.
* @param reverse - <code>TRUE</code> if the glyph array has been reord ered * @param reverse - <code>TRUE</code> if the glyph array has been reord ered
* @param markFilter - used to identify mark glyphs * @param markFilter - used to identify mark glyphs
* @param success - output parameter set to an error code if the operat ion fails * @param success - output parameter set to an error code if the operat ion fails
* *
* @see LEGlyphFilter * @see LEGlyphFilter
* *
* @internal * @internal
*/ */
static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCoun t, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter , LEErrorCode &success); static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCoun t, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter , LEErrorCode &success);
#endif /* U_HIDE_INTERNAL_API */
public: public:
/** /**
* The destructor. It will free any storage allocated for the * The destructor. It will free any storage allocated for the
* glyph, character index and position arrays by calling the reset * glyph, character index and position arrays by calling the reset
* method. It is declared virtual so that it will be invoked by the * method. It is declared virtual so that it will be invoked by the
* subclass destructors. * subclass destructors.
* *
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
 End of changes. 7 change blocks. 
0 lines changed or deleted 9 lines changed or added


 ParagraphLayout.h   ParagraphLayout.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2002-2010, International Business Machines * Copyright (C) 2002-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
*/ */
#ifndef __PARAGRAPHLAYOUT_H #ifndef __PARAGRAPHLAYOUT_H
#define __PARAGRAPHLAYOUT_H #define __PARAGRAPHLAYOUT_H
/** /**
* \file * \file
skipping to change at line 501 skipping to change at line 501
*/ */
virtual le_int32 getLeading() const; virtual le_int32 getLeading() const;
/** /**
* Reset line breaking to start from the beginning of the paragraph. * Reset line breaking to start from the beginning of the paragraph.
* *
* *
* @stable ICU 3.2 * @stable ICU 3.2
*/ */
inline void reflow(); inline void reflow();
#ifndef U_HIDE_INTERNAL_API
/** /**
* *
* Convenience method for determining if paragraph layout processing is complete ( i.e. there * Convenience method for determining if paragraph layout processing is complete ( i.e. there
* are no more lines left to process. ) * are no more lines left to process. )
* *
* @return true if there are no more lines to be processed * @return true if there are no more lines to be processed
* *
* @internal * @internal
*/ */
inline le_bool isDone() const; inline le_bool isDone() const;
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Return a <code>ParagraphLayout::Line</code> object which represents next line * Return a <code>ParagraphLayout::Line</code> object which represents next line
* in the paragraph. The width of the line is specified each time so th at it can * in the paragraph. The width of the line is specified each time so th at it can
* be varied to support arbitrary paragraph shapes. * be varied to support arbitrary paragraph shapes.
* *
* @param width is the width of the line. If <code>width</code> is less than or equal * @param width is the width of the line. If <code>width</code> is less than or equal
* to zero, a <code>ParagraphLayout::Line</code> object re presenting the * to zero, a <code>ParagraphLayout::Line</code> object re presenting the
* rest of the paragraph will be returned. * rest of the paragraph will be returned.
* *
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added


 alphaindex.h   alphaindex.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2011 International Business Machines * Copyright (C) 2011-2012 International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef INDEXCHARS_H #ifndef INDEXCHARS_H
#define INDEXCHARS_H #define INDEXCHARS_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uobject.h" #include "unicode/uobject.h"
#include "unicode/locid.h" #include "unicode/locid.h"
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION
/** /**
* \file * \file
* \brief C++ API: Index Characters * \brief C++ API: Index Characters
*/ */
U_CDECL_BEGIN U_CDECL_BEGIN
/** /**
* Constants for Alphabetic Index Label Types. * Constants for Alphabetic Index Label Types.
* The form of these enum constants anticipates having a plain C API * The form of these enum constants anticipates having a plain C API
* for Alphabetic Indexes that will also use them. * for Alphabetic Indexes that will also use them.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
typedef enum UAlphabeticIndexLabelType { typedef enum UAlphabeticIndexLabelType {
/** /**
* Normal Label, typically the starting letter of the names * Normal Label, typically the starting letter of the names
* in the bucket with this label. * in the bucket with this label.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_ALPHAINDEX_NORMAL = 0, U_ALPHAINDEX_NORMAL = 0,
/** /**
* Undeflow Label. The bucket with this label contains names * Undeflow Label. The bucket with this label contains names
* in scripts that sort before any of the bucket labels in this in * in scripts that sort before any of the bucket labels in this index.
dex. * @stable ICU 4.8
* @draft ICU 4.8 */
*/ U_ALPHAINDEX_UNDERFLOW = 1,
U_ALPHAINDEX_UNDERFLOW = 1,
/** /**
* Inflow Label. The bucket with this label contains names * Inflow Label. The bucket with this label contains names
* in scripts that sort between two of the bucket labels in this i * in scripts that sort between two of the bucket labels in this index.
ndex. * Inflow labels are created when an index contains normal labels for
* Inflow labels are created when an index contains normal labels * multiple scripts, and skips other scripts that sort between some of
for the
* multiple scripts, and skips other scripts that sort between som * included scripts.
e of the * @stable ICU 4.8
* included scripts. */
* @draft ICU 4.8 U_ALPHAINDEX_INFLOW = 2,
*/
U_ALPHAINDEX_INFLOW = 2,
/** /**
* Overflow Label. Te bucket with this label contains names in scr * Overflow Label. Te bucket with this label contains names in scripts
ipts * that sort after all of the bucket labels in this index.
* that sort after all of the bucket labels in this index. * @stable ICU 4.8
* @draft ICU 4.8 */
*/ U_ALPHAINDEX_OVERFLOW = 3
U_ALPHAINDEX_OVERFLOW = 3 } UAlphabeticIndexLabelType;
} UAlphabeticIndexLabelType;
struct UHashtable; struct UHashtable;
U_CDECL_END U_CDECL_END
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
// Forward Declarations // Forward Declarations
class Collator; class Collator;
class RuleBasedCollator; class RuleBasedCollator;
skipping to change at line 155 skipping to change at line 157
* </pre> * </pre>
* *
* <p> * <p>
* <b>Notes:</b> * <b>Notes:</b>
* <ul> * <ul>
* <li>Additional collation parameters can be passed in as part of the loca le name. * <li>Additional collation parameters can be passed in as part of the loca le name.
* For example, German plus numeric * For example, German plus numeric
* sorting would be "de@kn-true". * sorting would be "de@kn-true".
* </ul> * </ul>
* *
* @draft ICU 4.8 This API might change or be removed in a future release. * @stable ICU 4.8
*/ */
class U_I18N_API AlphabeticIndex: public UObject { class U_I18N_API AlphabeticIndex: public UObject {
public: public:
/** /**
* Construct an AlphabeticIndex object for the specified locale. If th e locale's * Construct an AlphabeticIndex object for the specified locale. If th e locale's
* data does not include index characters, a set of them will be * data does not include index characters, a set of them will be
* synthesized based on the locale's exemplar characters. The locale * synthesized based on the locale's exemplar characters. The locale
* determines the sorting order for both the index characters and the * determines the sorting order for both the index characters and the
* user item names appearing under each Index character. * user item names appearing under each Index character.
* *
* @param locale the desired locale. * @param locale the desired locale.
* @param status Error code, will be set with the reason if the constru ction * @param status Error code, will be set with the reason if the constru ction
* of the AlphabeticIndex object fails. * of the AlphabeticIndex object fails.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
AlphabeticIndex(const Locale &locale, UErrorCode &status); AlphabeticIndex(const Locale &locale, UErrorCode &status);
/** /**
* Add Labels to this Index. The labels are additions to those * Add Labels to this Index. The labels are additions to those
* that are already in the index; they do not replace the existing * that are already in the index; they do not replace the existing
* ones. * ones.
* @param additions The additional characters to add to the index, such as A-Z. * @param additions The additional characters to add to the index, such as A-Z.
* @param status Error code, will be set with the reason if the * @param status Error code, will be set with the reason if the
* operation fails. * operation fails.
* @return this, for chaining * @return this, for chaining
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &addLabels(const UnicodeSet &additions, UError Code &status); virtual AlphabeticIndex &addLabels(const UnicodeSet &additions, UError Code &status);
/** /**
* Add the index characters from a Locale to the index. The labels * Add the index characters from a Locale to the index. The labels
* are added to those that are already in the index; they do not replac e the * are added to those that are already in the index; they do not replac e the
* existing index characters. The collation order for this index is no t * existing index characters. The collation order for this index is no t
* changed; it remains that of the locale that was originally specified * changed; it remains that of the locale that was originally specified
* when creating this Index. * when creating this Index.
* *
* @param locale The locale whose index characters are to be added. * @param locale The locale whose index characters are to be added.
* @param status Error code, will be set with the reason if the * @param status Error code, will be set with the reason if the
* operation fails. * operation fails.
* @return this, for chaining * @return this, for chaining
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &addLabels(const Locale &locale, UErrorCode &s tatus); virtual AlphabeticIndex &addLabels(const Locale &locale, UErrorCode &s tatus);
/** /**
* Destructor * Destructor
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual ~AlphabeticIndex(); virtual ~AlphabeticIndex();
/** /**
* Get the Collator that establishes the ordering of the items in this index. * Get the Collator that establishes the ordering of the items in this index.
* Ownership of the collator remains with the AlphabeticIndex instance. * Ownership of the collator remains with the AlphabeticIndex instance.
* *
* The returned collator is a reference to the internal collator used b y this * The returned collator is a reference to the internal collator used b y this
* index. It may be safely used to compare the names of items or to ge t * index. It may be safely used to compare the names of items or to ge t
* sort keys for names. However if any settings need to be changed, * sort keys for names. However if any settings need to be changed,
* or other non-const methods called, a cloned copy must be made first. * or other non-const methods called, a cloned copy must be made first.
* *
* @return The collator * @return The collator
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const RuleBasedCollator &getCollator() const; virtual const RuleBasedCollator &getCollator() const;
/** /**
* Get the default label used for abbreviated buckets <i>between</i> ot her index characters. * Get the default label used for abbreviated buckets <i>between</i> ot her index characters.
* For example, consider the labels when Latin and Greek are used: * For example, consider the labels when Latin and Greek are used:
* X Y Z ... &#x0391; &#x0392; &#x0393;. * X Y Z ... &#x0391; &#x0392; &#x0393;.
* *
* @return inflow label * @return inflow label
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const UnicodeString &getInflowLabel() const; virtual const UnicodeString &getInflowLabel() const;
/** /**
* Set the default label used for abbreviated buckets <i>between</i> ot her index characters. * Set the default label used for abbreviated buckets <i>between</i> ot her index characters.
* An inflow label will be automatically inserted if two otherwise-adja cent label characters * An inflow label will be automatically inserted if two otherwise-adja cent label characters
* are from different scripts, e.g. Latin and Cyrillic, and a third scr ipt, e.g. Greek, * are from different scripts, e.g. Latin and Cyrillic, and a third scr ipt, e.g. Greek,
* sorts between the two. The default inflow character is an ellipsis (...) * sorts between the two. The default inflow character is an ellipsis (...)
* *
* @param inflowLabel the new Inflow label. * @param inflowLabel the new Inflow label.
* @param status Error code, will be set with the reason if the operati on fails. * @param status Error code, will be set with the reason if the operati on fails.
* @return this * @return this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &setInflowLabel(const UnicodeString &inflowLabe l, UErrorCode &status); virtual AlphabeticIndex &setInflowLabel(const UnicodeString &inflowLabe l, UErrorCode &status);
/** /**
* Get the special label used for items that sort after the last normal label, * Get the special label used for items that sort after the last normal label,
* and that would not otherwise have an appropriate label. * and that would not otherwise have an appropriate label.
* *
* @return the overflow label * @return the overflow label
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const UnicodeString &getOverflowLabel() const; virtual const UnicodeString &getOverflowLabel() const;
/** /**
* Set the label used for items that sort after the last normal label, * Set the label used for items that sort after the last normal label,
* and that would not otherwise have an appropriate label. * and that would not otherwise have an appropriate label.
* *
* @param overflowLabel the new overflow label. * @param overflowLabel the new overflow label.
* @param status Error code, will be set with the reason if the operati on fails. * @param status Error code, will be set with the reason if the operati on fails.
* @return this * @return this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &setOverflowLabel(const UnicodeString &overflow Label, UErrorCode &status); virtual AlphabeticIndex &setOverflowLabel(const UnicodeString &overflow Label, UErrorCode &status);
/** /**
* Get the special label used for items that sort before the first norm al label, * Get the special label used for items that sort before the first norm al label,
* and that would not otherwise have an appropriate label. * and that would not otherwise have an appropriate label.
* *
* @return underflow label * @return underflow label
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const UnicodeString &getUnderflowLabel() const; virtual const UnicodeString &getUnderflowLabel() const;
/** /**
* Set the label used for items that sort before the first normal label , * Set the label used for items that sort before the first normal label ,
* and that would not otherwise have an appropriate label. * and that would not otherwise have an appropriate label.
* *
* @param underflowLabel the new underflow label. * @param underflowLabel the new underflow label.
* @param status Error code, will be set with the reason if the operati on fails. * @param status Error code, will be set with the reason if the operati on fails.
* @return this * @return this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &setUnderflowLabel(const UnicodeString &underfl owLabel, UErrorCode &status); virtual AlphabeticIndex &setUnderflowLabel(const UnicodeString &underfl owLabel, UErrorCode &status);
/** /**
* Get the limit on the number of labels permitted in the index. * Get the limit on the number of labels permitted in the index.
* The number does not include over, under and inflow labels. * The number does not include over, under and inflow labels.
* *
* @return maxLabelCount maximum number of labels. * @return maxLabelCount maximum number of labels.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual int32_t getMaxLabelCount() const; virtual int32_t getMaxLabelCount() const;
/** /**
* Set a limit on the number of labels permitted in the index. * Set a limit on the number of labels permitted in the index.
* The number does not include over, under and inflow labels. * The number does not include over, under and inflow labels.
* Currently, if the number is exceeded, then every * Currently, if the number is exceeded, then every
* nth item is removed to bring the count down. * nth item is removed to bring the count down.
* A more sophisticated mechanism may be available in the future. * A more sophisticated mechanism may be available in the future.
* *
* @param maxLabelCount the maximum number of labels. * @param maxLabelCount the maximum number of labels.
* @param status error code * @param status error code
* @return This, for chaining * @return This, for chaining
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &setMaxLabelCount(int32_t maxLabelCount, UError Code &status); virtual AlphabeticIndex &setMaxLabelCount(int32_t maxLabelCount, UError Code &status);
/** /**
* Get the Unicode character (or tailored string) that defines an overf low bucket; * Get the Unicode character (or tailored string) that defines an overf low bucket;
* that is anything greater than or equal to that string should go in t hat bucket, * that is anything greater than or equal to that string should go in t hat bucket,
* instead of with the last character. Normally that is the first chara cter of the script * instead of with the last character. Normally that is the first chara cter of the script
* after lowerLimit. Thus in X Y Z ... <i>Devanagari-ka</i>, the overfl ow character for Z * after lowerLimit. Thus in X Y Z ... <i>Devanagari-ka</i>, the overfl ow character for Z
* would be the <i>Greek-alpha</i>. * would be the <i>Greek-alpha</i>.
* *
skipping to change at line 338 skipping to change at line 340
* Records with duplicate names are permitted; they will be kept in th e order * Records with duplicate names are permitted; they will be kept in th e order
* that they were added. * that they were added.
* *
* @param name The display name for the Record. The Record will be pla ced in * @param name The display name for the Record. The Record will be pla ced in
* a bucket based on this name. * a bucket based on this name.
* @param data An optional pointer to user data associated with this * @param data An optional pointer to user data associated with this
* item. When iterating the contents of a bucket, both the * item. When iterating the contents of a bucket, both the
* data pointer the name will be available for each Record. * data pointer the name will be available for each Record.
* @param status Error code, will be set with the reason if the operat ion fails. * @param status Error code, will be set with the reason if the operat ion fails.
* @return This, for chaining. * @return This, for chaining.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &addRecord(const UnicodeString &name, const voi d *data, UErrorCode &status); virtual AlphabeticIndex &addRecord(const UnicodeString &name, const voi d *data, UErrorCode &status);
/** /**
* Remove all Records from the Index. The set of Buckets, which define the headings under * Remove all Records from the Index. The set of Buckets, which define the headings under
* which records are classified, is not altered. * which records are classified, is not altered.
* *
* @param status Error code, will be set with the reason if the operat ion fails. * @param status Error code, will be set with the reason if the operat ion fails.
* @return This, for chaining. * @return This, for chaining.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &clearRecords(UErrorCode &status); virtual AlphabeticIndex &clearRecords(UErrorCode &status);
/** Get the number of labels in this index. /** Get the number of labels in this index.
* Note: may trigger lazy index construction. * Note: may trigger lazy index construction.
* *
* @param status Error code, will be set with the reason if the operat ion fails. * @param status Error code, will be set with the reason if the operat ion fails.
* @return The number of labels in this index, including any und er, over or * @return The number of labels in this index, including any und er, over or
* in-flow labels. * in-flow labels.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual int32_t getBucketCount(UErrorCode &status); virtual int32_t getBucketCount(UErrorCode &status);
/** Get the total number of Records in this index, that is, the number /** Get the total number of Records in this index, that is, the number
* of <name, data> pairs added. * of <name, data> pairs added.
* *
* @param status Error code, will be set with the reason if the operat ion fails. * @param status Error code, will be set with the reason if the operat ion fails.
* @return The number of records in this index, that is, the tot al number * @return The number of records in this index, that is, the tot al number
* of (name, data) items added with addRecord(). * of (name, data) items added with addRecord().
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual int32_t getRecordCount(UErrorCode &status); virtual int32_t getRecordCount(UErrorCode &status);
/** /**
* Given the name of a record, return the zero-based index of the Buc ket * Given the name of a record, return the zero-based index of the Buc ket
* in which the item should appear. The name need not be in the inde x. * in which the item should appear. The name need not be in the inde x.
* A Record will not be added to the index by this function. * A Record will not be added to the index by this function.
* Bucket numbers are zero-based, in Bucket iteration order. * Bucket numbers are zero-based, in Bucket iteration order.
* *
* @param itemName The name whose bucket position in the index is to b e determined. * @param itemName The name whose bucket position in the index is to b e determined.
* @param status Error code, will be set with the reason if the operat ion fails. * @param status Error code, will be set with the reason if the operat ion fails.
* @return The bucket number for this name. * @return The bucket number for this name.
* @draft ICU 4.8 * @stable ICU 4.8
* *
*/ */
virtual int32_t getBucketIndex(const UnicodeString &itemName, UErrorCo de &status); virtual int32_t getBucketIndex(const UnicodeString &itemName, UErrorCo de &status);
/** /**
* Get the zero based index of the current Bucket from an iteration * Get the zero based index of the current Bucket from an iteration
* over the Buckets of this index. Return -1 if no iteration is in p rocess. * over the Buckets of this index. Return -1 if no iteration is in p rocess.
* @return the index of the current Bucket * @return the index of the current Bucket
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual int32_t getBucketIndex() const; virtual int32_t getBucketIndex() const;
/** /**
* Advance the iteration over the Buckets of this index. Return FALS E if * Advance the iteration over the Buckets of this index. Return FALS E if
* there are no more Buckets. * there are no more Buckets.
* *
* @param status Error code, will be set with the reason if the oper ation fails. * @param status Error code, will be set with the reason if the oper ation fails.
* U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified while * U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified while
* an enumeration of its contents are in process. * an enumeration of its contents are in process.
* *
* @return TRUE if success, FALSE if at end of iteration * @return TRUE if success, FALSE if at end of iteration
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool nextBucket(UErrorCode &status); virtual UBool nextBucket(UErrorCode &status);
/** /**
* Return the name of the Label of the current bucket from an iterati on over the buckets. * Return the name of the Label of the current bucket from an iterati on over the buckets.
* If the iteration is before the first Bucket (nextBucket() has not been called), * If the iteration is before the first Bucket (nextBucket() has not been called),
* or after the last, return an empty string. * or after the last, return an empty string.
* *
* @return the bucket label. * @return the bucket label.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const UnicodeString &getBucketLabel() const; virtual const UnicodeString &getBucketLabel() const;
/** /**
* Return the type of the label for the current Bucket (selected by th e * Return the type of the label for the current Bucket (selected by th e
* iteration over Buckets.) * iteration over Buckets.)
* *
* @return the label type. * @return the label type.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UAlphabeticIndexLabelType getBucketLabelType() const; virtual UAlphabeticIndexLabelType getBucketLabelType() const;
/** /**
* Get the number of <name, data> Records in the current Bucket. * Get the number of <name, data> Records in the current Bucket.
* If the current bucket iteration position is before the first label or after the * If the current bucket iteration position is before the first label or after the
* last, return 0. * last, return 0.
* *
* @return the number of Records. * @return the number of Records.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual int32_t getBucketRecordCount() const; virtual int32_t getBucketRecordCount() const;
/** /**
* Reset the Bucket iteration for this index. The next call to nextBu cket() * Reset the Bucket iteration for this index. The next call to nextBu cket()
* will restart the iteration at the first label. * will restart the iteration at the first label.
* *
* @param status Error code, will be set with the reason if the operat ion fails. * @param status Error code, will be set with the reason if the operat ion fails.
* @return this, for chaining. * @return this, for chaining.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &resetBucketIterator(UErrorCode &status); virtual AlphabeticIndex &resetBucketIterator(UErrorCode &status);
/** /**
* Advance to the next record in the current Bucket. * Advance to the next record in the current Bucket.
* When nextBucket() is called, Record iteration is reset to just befor e the * When nextBucket() is called, Record iteration is reset to just befor e the
* first Record in the new Bucket. * first Record in the new Bucket.
* *
* @param status Error code, will be set with the reason if the oper ation fails. * @param status Error code, will be set with the reason if the oper ation fails.
* U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified while * U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified while
* an enumeration of its contents are in process. * an enumeration of its contents are in process.
* @return TRUE if successful, FALSE when the iteration advances past the last item. * @return TRUE if successful, FALSE when the iteration advances past the last item.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool nextRecord(UErrorCode &status); virtual UBool nextRecord(UErrorCode &status);
/** /**
* Get the name of the current Record. * Get the name of the current Record.
* Return an empty string if the Record iteration position is before fi rst * Return an empty string if the Record iteration position is before fi rst
* or after the last. * or after the last.
* *
* @return The name of the current index item. * @return The name of the current index item.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const UnicodeString &getRecordName() const; virtual const UnicodeString &getRecordName() const;
/** /**
* Return the data pointer of the Record currently being iterated over. * Return the data pointer of the Record currently being iterated over.
* Return NULL if the current iteration position before the first item in this Bucket, * Return NULL if the current iteration position before the first item in this Bucket,
* or after the last. * or after the last.
* *
* @return The current Record's data pointer. * @return The current Record's data pointer.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const void *getRecordData() const; virtual const void *getRecordData() const;
/** /**
* Reset the Record iterator position to before the first Record in the current Bucket. * Reset the Record iterator position to before the first Record in the current Bucket.
* *
* @return This, for chaining. * @return This, for chaining.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &resetRecordIterator(); virtual AlphabeticIndex &resetRecordIterator();
private: private:
// No ICU "poor man's RTTI" for this class nor its subclasses. // No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
/** /**
* No Copy constructor. * No Copy constructor.
* @internal * @internal
skipping to change at line 525 skipping to change at line 527
void init(UErrorCode &status); void init(UErrorCode &status);
// Initialize & destruct static constants used by this class. // Initialize & destruct static constants used by this class.
static void staticInit(UErrorCode &status); static void staticInit(UErrorCode &status);
// Pinyin stuff. If the input name is Chinese, add the Pinyin prefix to the dest string. // Pinyin stuff. If the input name is Chinese, add the Pinyin prefix to the dest string.
void hackName(UnicodeString &dest, const UnicodeString &name, const Co llator *coll); void hackName(UnicodeString &dest, const UnicodeString &name, const Co llator *coll);
void initPinyinBounds(const Collator *coll, UErrorCode &status); void initPinyinBounds(const Collator *coll, UErrorCode &status);
public: public:
#ifndef U_HIDE_INTERNAL_API
/** /**
* Delete all shared (static) data associated with an AlphabeticInde x. * Delete all shared (static) data associated with an AlphabeticInde x.
* Internal function, not intended for direct use. * Internal function, not intended for direct use.
* @internal. * @internal.
*/ */
static void staticCleanup(); static void staticCleanup();
#endif /* U_HIDE_INTERNAL_API */
private: private:
// Add index characters from the specified locale to the dest set. // Add index characters from the specified locale to the dest set.
// Does not remove any previous contents from dest. // Does not remove any previous contents from dest.
static void getIndexExemplars(UnicodeSet &dest, const Locale &locale, UErrorCode &status); static void getIndexExemplars(UnicodeSet &dest, const Locale &locale, UErrorCode &status);
UVector *firstStringsInScript(UErrorCode &status); UVector *firstStringsInScript(UErrorCode &status);
static UnicodeString separated(const UnicodeString &item); static UnicodeString separated(const UnicodeString &item);
skipping to change at line 553 skipping to change at line 557
void buildIndex(UErrorCode &status); void buildIndex(UErrorCode &status);
void buildBucketList(UErrorCode &status); void buildBucketList(UErrorCode &status);
void bucketRecords(UErrorCode &status); void bucketRecords(UErrorCode &status);
public: public:
// The following internal items are declared public only to allow acce ss from // The following internal items are declared public only to allow acce ss from
// implementation code written in plain C. They are not intended for // implementation code written in plain C. They are not intended for
// public use. // public use.
#ifndef U_HIDE_INTERNAL_API
/** /**
* A record, or item, in the index. * A record, or item, in the index.
* @internal * @internal
*/ */
struct Record: public UMemory { struct Record: public UMemory {
AlphabeticIndex *alphaIndex_; AlphabeticIndex *alphaIndex_;
const UnicodeString name_; const UnicodeString name_;
UnicodeString sortingName_; // Usually the same as name_; different for Pinyin. UnicodeString sortingName_; // Usually the same as name_; different for Pinyin.
const void *data_; const void *data_;
int32_t serialNumber_; // Defines sorting order for names that compare equal. int32_t serialNumber_; // Defines sorting order for names that compare equal.
Record(AlphabeticIndex *alphaIndex, const UnicodeString &name, con st void *data); Record(AlphabeticIndex *alphaIndex, const UnicodeString &name, con st void *data);
~Record(); ~Record();
}; };
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Holds all user records before they are distributed into buckets. * Holds all user records before they are distributed into buckets.
* Type of contents is (Record *) * Type of contents is (Record *)
* @internal * @internal
*/ */
UVector *inputRecords_; UVector *inputRecords_;
/** /**
* A Bucket holds an index label and references to everything belongin g to that label. * A Bucket holds an index label and references to everything belongin g to that label.
skipping to change at line 595 skipping to change at line 601
Bucket(const UnicodeString &label, // Parameter strings are copi ed. Bucket(const UnicodeString &label, // Parameter strings are copi ed.
const UnicodeString &lowerBoundary, const UnicodeString &lowerBoundary,
UAlphabeticIndexLabelType type, UErrorCode &status); UAlphabeticIndexLabelType type, UErrorCode &status);
~Bucket(); ~Bucket();
}; };
public: public:
/** /**
* Language Types. For internal ICU use only. * Language Types. For internal ICU use only.
* @internal * @internal (but not hidden with U_HIDE_INTERNAL_API because it is us ed in public API)
*/ */
enum ELangType { enum ELangType {
/** @internal */ /** @internal */
kNormal, kNormal,
/** @internal */ /** @internal */
kSimplified, kSimplified,
/** @internal */ /** @internal */
kTraditional kTraditional
}; };
skipping to change at line 690 skipping to change at line 696
static UnicodeSet *ETHIOPIC; static UnicodeSet *ETHIOPIC;
static UnicodeSet *HANGUL; static UnicodeSet *HANGUL;
static UnicodeSet *IGNORE_SCRIPTS; static UnicodeSet *IGNORE_SCRIPTS;
static UnicodeSet *TO_TRY; static UnicodeSet *TO_TRY;
static UnicodeSet *UNIHAN; static UnicodeSet *UNIHAN;
static const UnicodeString *EMPTY_STRING; static const UnicodeString *EMPTY_STRING;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* UCONFIG_NO_COLLATION / UCONFIG_NO_NORMALIZATION */
#endif #endif
 End of changes. 42 change blocks. 
65 lines changed or deleted 69 lines changed or added


 appendable.h   appendable.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2011, International Business Machines * Copyright (C) 2011-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: appendable.h * file name: appendable.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010dec07 * created on: 2010dec07
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 47 skipping to change at line 47
* *
* Implementation classes must implement at least appendCodeUnit(UChar). * Implementation classes must implement at least appendCodeUnit(UChar).
* The base class provides default implementations for the other methods. * The base class provides default implementations for the other methods.
* *
* The methods do not take UErrorCode parameters. * The methods do not take UErrorCode parameters.
* If an error occurs (e.g., out-of-memory), * If an error occurs (e.g., out-of-memory),
* in addition to returning FALSE from failing operations, * in addition to returning FALSE from failing operations,
* the implementation must prevent unexpected behavior (e.g., crashes) * the implementation must prevent unexpected behavior (e.g., crashes)
* from further calls and should make the error condition available separat ely * from further calls and should make the error condition available separat ely
* (e.g., store a UErrorCode, make/keep a UnicodeString bogus). * (e.g., store a UErrorCode, make/keep a UnicodeString bogus).
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API Appendable : public UObject { class U_COMMON_API Appendable : public UObject {
public: public:
/** /**
* Destructor.
* @stable ICU 4.8
*/
~Appendable();
/**
* Appends a 16-bit code unit. * Appends a 16-bit code unit.
* @param c code unit * @param c code unit
* @return TRUE if the operation succeeded * @return TRUE if the operation succeeded
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool appendCodeUnit(UChar c) = 0; virtual UBool appendCodeUnit(UChar c) = 0;
/** /**
* Appends a code point. * Appends a code point.
* The default implementation calls appendCodeUnit(UChar) once or twice . * The default implementation calls appendCodeUnit(UChar) once or twice .
* @param c code point 0..0x10ffff * @param c code point 0..0x10ffff
* @return TRUE if the operation succeeded * @return TRUE if the operation succeeded
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool appendCodePoint(UChar32 c); virtual UBool appendCodePoint(UChar32 c);
/** /**
* Appends a string. * Appends a string.
* The default implementation calls appendCodeUnit(UChar) for each code unit. * The default implementation calls appendCodeUnit(UChar) for each code unit.
* @param s string, must not be NULL if length!=0 * @param s string, must not be NULL if length!=0
* @param length string length, or -1 if NUL-terminated * @param length string length, or -1 if NUL-terminated
* @return TRUE if the operation succeeded * @return TRUE if the operation succeeded
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool appendString(const UChar *s, int32_t length); virtual UBool appendString(const UChar *s, int32_t length);
/** /**
* Tells the object that the caller is going to append roughly * Tells the object that the caller is going to append roughly
* appendCapacity UChars. A subclass might use this to pre-allocate * appendCapacity UChars. A subclass might use this to pre-allocate
* a larger buffer if necessary. * a larger buffer if necessary.
* The default implementation does nothing. (It always returns TRUE.) * The default implementation does nothing. (It always returns TRUE.)
* @param appendCapacity estimated number of UChars that will be append ed * @param appendCapacity estimated number of UChars that will be append ed
* @return TRUE if the operation succeeded * @return TRUE if the operation succeeded
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool reserveAppendCapacity(int32_t appendCapacity); virtual UBool reserveAppendCapacity(int32_t appendCapacity);
/** /**
* Returns a writable buffer for appending and writes the buffer's capa city to * Returns a writable buffer for appending and writes the buffer's capa city to
* *resultCapacity. Guarantees *resultCapacity>=minCapacity. * *resultCapacity. Guarantees *resultCapacity>=minCapacity.
* May return a pointer to the caller-owned scratch buffer which must h ave * May return a pointer to the caller-owned scratch buffer which must h ave
* scratchCapacity>=minCapacity. * scratchCapacity>=minCapacity.
* The returned buffer is only valid until the next operation * The returned buffer is only valid until the next operation
* on this Appendable. * on this Appendable.
skipping to change at line 131 skipping to change at line 137
* *
* @param minCapacity required minimum capacity of the returned buffer; * @param minCapacity required minimum capacity of the returned buffer;
* must be non-negative * must be non-negative
* @param desiredCapacityHint desired capacity of the returned buffer; * @param desiredCapacityHint desired capacity of the returned buffer;
* must be non-negative * must be non-negative
* @param scratch default caller-owned buffer * @param scratch default caller-owned buffer
* @param scratchCapacity capacity of the scratch buffer * @param scratchCapacity capacity of the scratch buffer
* @param resultCapacity pointer to an integer which will be set to the * @param resultCapacity pointer to an integer which will be set to the
* capacity of the returned buffer * capacity of the returned buffer
* @return a buffer with *resultCapacity>=minCapacity * @return a buffer with *resultCapacity>=minCapacity
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UChar *getAppendBuffer(int32_t minCapacity, virtual UChar *getAppendBuffer(int32_t minCapacity,
int32_t desiredCapacityHint, int32_t desiredCapacityHint,
UChar *scratch, int32_t scratchCapacity, UChar *scratch, int32_t scratchCapacity,
int32_t *resultCapacity); int32_t *resultCapacity);
private: private:
// No ICU "poor man's RTTI" for this class nor its subclasses. // No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
}; };
/** /**
* An Appendable implementation which writes to a UnicodeString. * An Appendable implementation which writes to a UnicodeString.
* *
* This class is not intended for public subclassing. * This class is not intended for public subclassing.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API UnicodeStringAppendable : public Appendable { class U_COMMON_API UnicodeStringAppendable : public Appendable {
public: public:
/** /**
* Aliases the UnicodeString (keeps its reference) for writing. * Aliases the UnicodeString (keeps its reference) for writing.
* @param s The UnicodeString to which this Appendable will write. * @param s The UnicodeString to which this Appendable will write.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
explicit UnicodeStringAppendable(UnicodeString &s) : str(s) {} explicit UnicodeStringAppendable(UnicodeString &s) : str(s) {}
/** /**
* Destructor.
* @stable ICU 4.8
*/
~UnicodeStringAppendable();
/**
* Appends a 16-bit code unit to the string. * Appends a 16-bit code unit to the string.
* @param c code unit * @param c code unit
* @return TRUE if the operation succeeded * @return TRUE if the operation succeeded
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool appendCodeUnit(UChar c); virtual UBool appendCodeUnit(UChar c);
/** /**
* Appends a code point to the string. * Appends a code point to the string.
* @param c code point 0..0x10ffff * @param c code point 0..0x10ffff
* @return TRUE if the operation succeeded * @return TRUE if the operation succeeded
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool appendCodePoint(UChar32 c); virtual UBool appendCodePoint(UChar32 c);
/** /**
* Appends a string to the UnicodeString. * Appends a string to the UnicodeString.
* @param s string, must not be NULL if length!=0 * @param s string, must not be NULL if length!=0
* @param length string length, or -1 if NUL-terminated * @param length string length, or -1 if NUL-terminated
* @return TRUE if the operation succeeded * @return TRUE if the operation succeeded
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool appendString(const UChar *s, int32_t length); virtual UBool appendString(const UChar *s, int32_t length);
/** /**
* Tells the UnicodeString that the caller is going to append roughly * Tells the UnicodeString that the caller is going to append roughly
* appendCapacity UChars. * appendCapacity UChars.
* @param appendCapacity estimated number of UChars that will be append ed * @param appendCapacity estimated number of UChars that will be append ed
* @return TRUE if the operation succeeded * @return TRUE if the operation succeeded
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool reserveAppendCapacity(int32_t appendCapacity); virtual UBool reserveAppendCapacity(int32_t appendCapacity);
/** /**
* Returns a writable buffer for appending and writes the buffer's capa city to * Returns a writable buffer for appending and writes the buffer's capa city to
* *resultCapacity. Guarantees *resultCapacity>=minCapacity. * *resultCapacity. Guarantees *resultCapacity>=minCapacity.
* May return a pointer to the caller-owned scratch buffer which must h ave * May return a pointer to the caller-owned scratch buffer which must h ave
* scratchCapacity>=minCapacity. * scratchCapacity>=minCapacity.
* The returned buffer is only valid until the next write operation * The returned buffer is only valid until the next write operation
* on the UnicodeString. * on the UnicodeString.
skipping to change at line 211 skipping to change at line 223
* *
* @param minCapacity required minimum capacity of the returned buffer; * @param minCapacity required minimum capacity of the returned buffer;
* must be non-negative * must be non-negative
* @param desiredCapacityHint desired capacity of the returned buffer; * @param desiredCapacityHint desired capacity of the returned buffer;
* must be non-negative * must be non-negative
* @param scratch default caller-owned buffer * @param scratch default caller-owned buffer
* @param scratchCapacity capacity of the scratch buffer * @param scratchCapacity capacity of the scratch buffer
* @param resultCapacity pointer to an integer which will be set to the * @param resultCapacity pointer to an integer which will be set to the
* capacity of the returned buffer * capacity of the returned buffer
* @return a buffer with *resultCapacity>=minCapacity * @return a buffer with *resultCapacity>=minCapacity
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UChar *getAppendBuffer(int32_t minCapacity, virtual UChar *getAppendBuffer(int32_t minCapacity,
int32_t desiredCapacityHint, int32_t desiredCapacityHint,
UChar *scratch, int32_t scratchCapacity, UChar *scratch, int32_t scratchCapacity,
int32_t *resultCapacity); int32_t *resultCapacity);
private: private:
UnicodeString &str; UnicodeString &str;
}; };
 End of changes. 16 change blocks. 
14 lines changed or deleted 26 lines changed or added


 basictz.h   basictz.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2008, International Business Machines Corporation and * Copyright (C) 2007-2011, International Business Machines Corporation and
* * others. All Rights Reserved.
* others. All Rights Reserved.
*
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef BASICTZ_H #ifndef BASICTZ_H
#define BASICTZ_H #define BASICTZ_H
/** /**
* \file * \file
* \brief C++ API: ICU TimeZone base class * \brief C++ API: ICU TimeZone base class
*/ */
skipping to change at line 143 skipping to change at line 143
* specified date, NULL is set. * specified date, NULL is set.
* @param dst Receives the <code>AnnualTimeZoneRule</code> for da ylight saving time * @param dst Receives the <code>AnnualTimeZoneRule</code> for da ylight saving time
* transitions. When this time zone does not observer daylight saving times * transitions. When this time zone does not observer daylight saving times
* around the specified date, NULL is set. * around the specified date, NULL is set.
* @param status Receives error status code. * @param status Receives error status code.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initi al, virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initi al,
AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& sta tus) /*const*/; AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& sta tus) /*const*/;
#ifndef U_HIDE_INTERNAL_API
/** /**
* The time type option bit flags used by getOffsetFromLocal * The time type option bit flags used by getOffsetFromLocal
* @internal * @internal
*/ */
enum { enum {
kStandard = 0x01, kStandard = 0x01,
kDaylight = 0x03, kDaylight = 0x03,
kFormer = 0x04, kFormer = 0x04,
kLatter = 0x0C kLatter = 0x0C
}; };
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Get time zone offsets from local wall time. * Get time zone offsets from local wall time.
* @internal * @internal
*/ */
virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt, virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) /*const */; int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) /*const */;
protected: protected:
#ifndef U_HIDE_INTERNAL_API
/** /**
* The time type option bit masks used by getOffsetFromLocal * The time type option bit masks used by getOffsetFromLocal
* @internal * @internal
*/ */
enum { enum {
kStdDstMask = kDaylight, kStdDstMask = kDaylight,
kFormerLatterMask = kLatter kFormerLatterMask = kLatter
}; };
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Default constructor. * Default constructor.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
BasicTimeZone(); BasicTimeZone();
/** /**
* Construct a timezone with a given ID. * Construct a timezone with a given ID.
* @param id a system time zone ID * @param id a system time zone ID
 End of changes. 5 change blocks. 
4 lines changed or deleted 6 lines changed or added


 bms.h   bms.h 
/* /*
* Copyright (C) 1996-2010, International Business Machines Corporation and Others. * Copyright (C) 1996-2011, International Business Machines Corporation and Others.
* All rights reserved. * All rights reserved.
*/ */
/** /**
* \file * \file
* \brief C API: Boyer-Moore StringSearch prototype. * \brief C API: Boyer-Moore StringSearch prototype.
* \internal * \internal
*/ */
#ifndef _BMS_H #ifndef _BMS_H
#define _BMS_H #define _BMS_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
#include "unicode/ucol.h" #include "unicode/ucol.h"
#ifndef U_HIDE_INTERNAL_API
/** /**
* A <code>UCD</code> object holds the Collator-specific data needed to * A <code>UCD</code> object holds the Collator-specific data needed to
* compute the length of the shortest string that can * compute the length of the shortest string that can
* generate a partcular list of CEs. * generate a partcular list of CEs.
* *
* <code>UCD</code> objects are quite expensive to compute. Because * <code>UCD</code> objects are quite expensive to compute. Because
* of this, they are cached. When you call <code>ucd_open</code> it * of this, they are cached. When you call <code>ucd_open</code> it
* returns a reference counted cached object. When you call <code>ucd_close </code> * returns a reference counted cached object. When you call <code>ucd_close </code>
* the reference count on the object is decremented but the object is not d eleted. * the reference count on the object is decremented but the object is not d eleted.
* *
* If you do not need to reuse any unreferenced objects in the cache, you c an call * If you do not need to reuse any unreferenced objects in the cache, you c an call
* <code>ucd_flushCCache</code>. If you no longer need any <code>UCD</code> * <code>ucd_flushCCache</code>. If you no longer need any <code>UCD</code>
* objects, you can call <code>ucd_freeCache</code> * objects, you can call <code>ucd_freeCache</code>
*
* @internal ICU 4.0.1 technology preview
*/ */
typedef void UCD; typedef void UCD;
/** /**
* Open a <code>UCD</code> object. * Open a <code>UCD</code> object.
* *
* @param coll - the collator * @param coll - the collator
* @param status - will be set if any errors occur. * @param status - will be set if any errors occur.
* *
* @return the <code>UCD</code> object. You must call * @return the <code>UCD</code> object. You must call
skipping to change at line 272 skipping to change at line 276
* @param bms - the <code>BMS</code> object * @param bms - the <code>BMS</code> object
* @param target - the new target string * @param target - the new target string
* @param targetLength - the length of the new target string * @param targetLength - the length of the new target string
* @param status - will be set if any errors occur. * @param status - will be set if any errors occur.
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI void U_EXPORT2 U_CAPI void U_EXPORT2
bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UE rrorCode *status); bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UE rrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
#endif #endif
#endif /* _BMS_H */ #endif /* _BMS_H */
 End of changes. 4 change blocks. 
1 lines changed or deleted 7 lines changed or added


 bmsearch.h   bmsearch.h 
/* /*
************************************************************************** **** ************************************************************************** ****
* Copyright (C) 1996-2010, International Business Machines * * Copyright (C) 1996-2011, International Business Machines *
* Corporation and others. All Rights Reserved. * * Corporation and others. All Rights Reserved. *
************************************************************************** **** ************************************************************************** ****
*/ */
/** /**
* \file * \file
* \brief C++ API: Boyer-Moore StringSearch technology preview * \brief C++ API: Boyer-Moore StringSearch technology preview
* \internal ICU 4.0.1 technology preview * \internal ICU 4.0.1 technology preview
*/ */
skipping to change at line 32 skipping to change at line 32
#include "unicode/ucol.h" #include "unicode/ucol.h"
#include "unicode/colldata.h" #include "unicode/colldata.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class BadCharacterTable; class BadCharacterTable;
class GoodSuffixTable; class GoodSuffixTable;
class Target; class Target;
#ifndef U_HIDE_INTERNAL_API
/** /**
* BoyerMooreSearch * BoyerMooreSearch
* *
* This object holds the information needed to do a Collation sensitive Boy er-Moore search. It encapulates * This object holds the information needed to do a Collation sensitive Boy er-Moore search. It encapulates
* the pattern, the "bad character" and "good suffix" tables, the Collator- based data needed to compute them, * the pattern, the "bad character" and "good suffix" tables, the Collator- based data needed to compute them,
* and a reference to the text being searched. * and a reference to the text being searched.
* *
* To do a search, you fist need to get a <code>CollData</code> object by c alling <code>CollData::open</code>. * To do a search, you fist need to get a <code>CollData</code> object by c alling <code>CollData::open</code>.
* Then you construct a <code>BoyerMooreSearch</code> object from the <code >CollData</code> object, the pattern * Then you construct a <code>BoyerMooreSearch</code> object from the <code >CollData</code> object, the pattern
* string and the target string. Then you call the <code>search</code> meth od. Here's a code sample: * string and the target string. Then you call the <code>search</code> meth od. Here's a code sample:
skipping to change at line 222 skipping to change at line 223
static UClassID getStaticClassID(); static UClassID getStaticClassID();
private: private:
CollData *data; CollData *data;
CEList *patCEs; CEList *patCEs;
BadCharacterTable *badCharacterTable; BadCharacterTable *badCharacterTable;
GoodSuffixTable *goodSuffixTable; GoodSuffixTable *goodSuffixTable;
UnicodeString pattern; UnicodeString pattern;
Target *target; Target *target;
}; };
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END U_NAMESPACE_END
#endif // #if !UCONFIG_NO_COLLATION #endif // #if !UCONFIG_NO_COLLATION
#endif // #ifndef B_M_SEARCH_H #endif // #ifndef B_M_SEARCH_H
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 brkiter.h   brkiter.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File brkiter.h * File brkiter.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/18/97 aliu Added typedef for TextCount. Made DONE const. * 02/18/97 aliu Added typedef for TextCount. Made DONE const.
* 05/07/97 aliu Fixed DLL declaration. * 05/07/97 aliu Fixed DLL declaration.
skipping to change at line 508 skipping to change at line 508
static StringEnumeration* U_EXPORT2 getAvailableLocales(void); static StringEnumeration* U_EXPORT2 getAvailableLocales(void);
#endif #endif
/** /**
* Returns the locale for this break iterator. Two flavors are availabl e: valid and * Returns the locale for this break iterator. Two flavors are availabl e: valid and
* actual locale. * actual locale.
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
#ifndef U_HIDE_INTERNAL_API
/** Get the locale for this break iterator object. You can choose betwe en valid and actual locale. /** Get the locale for this break iterator object. You can choose betwe en valid and actual locale.
* @param type type of the locale we're looking for (valid or actual) * @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation * @param status error code for the operation
* @return the locale * @return the locale
* @internal * @internal
*/ */
const char *getLocaleID(ULocDataLocaleType type, UErrorCode& status) co nst; const char *getLocaleID(ULocDataLocaleType type, UErrorCode& status) co nst;
#endif /* U_HIDE_INTERNAL_API */
/**
* Set the subject text string upon which the break iterator is operat
ing
* without changing any other aspect of the matching state.
* The new and previous text strings must have the same content.
*
* This function is intended for use in environments where ICU is oper
ating on
* strings that may move around in memory. It provides a mechanism fo
r notifying
* ICU that the string has been relocated, and providing a new UText t
o access the
* string in its new position.
*
* Note that the break iterator implementation never copies the underl
ying text
* of a string being processed, but always operates directly on the or
iginal text
* provided by the user. Refreshing simply drops the references to the
old text
* and replaces them with references to the new.
*
* Caution: this function is normally used only by very specialized,
* system-level code. One example use case is with garbage collection
that moves
* the text in memory.
*
* @param input The new (moved) text string.
* @param status Receives errors detected by this function.
* @return *this
*
* @draft ICU 49
*/
virtual BreakIterator &refreshInputText(UText *input, UErrorCode &statu
s) = 0;
private: private:
static BreakIterator* buildInstance(const Locale& loc, const char *type , int32_t kind, UErrorCode& status); static BreakIterator* buildInstance(const Locale& loc, const char *type , int32_t kind, UErrorCode& status);
static BreakIterator* createInstance(const Locale& loc, int32_t kind, U ErrorCode& status); static BreakIterator* createInstance(const Locale& loc, int32_t kind, U ErrorCode& status);
static BreakIterator* makeInstance(const Locale& loc, int32_t kind, UEr rorCode& status); static BreakIterator* makeInstance(const Locale& loc, int32_t kind, UEr rorCode& status);
friend class ICUBreakIteratorFactory; friend class ICUBreakIteratorFactory;
friend class ICUBreakIteratorService; friend class ICUBreakIteratorService;
protected: protected:
// Do not enclose protected default/copy constructors with #ifndef U_HI
DE_INTERNAL_API
// or else the compiler will create a public ones.
/** @internal */ /** @internal */
BreakIterator(); BreakIterator();
/** @internal */ /** @internal */
UBool fBufferClone; UBool fBufferClone;
/** @internal */ /** @internal */
BreakIterator (const BreakIterator &other) : UObject(other), fBufferClo ne(FALSE) {} BreakIterator (const BreakIterator &other) : UObject(other), fBufferClo ne(FALSE) {}
private: private:
/** @internal */ /** @internal */
 End of changes. 4 change blocks. 
1 lines changed or deleted 42 lines changed or added


 bytestream.h   bytestream.h 
// Copyright (C) 2009-2010, International Business Machines // Copyright (C) 2009-2012, International Business Machines
// Corporation and others. All Rights Reserved. // Corporation and others. All Rights Reserved.
// //
// Copyright 2007 Google Inc. All Rights Reserved. // Copyright 2007 Google Inc. All Rights Reserved.
// Author: sanjay@google.com (Sanjay Ghemawat) // Author: sanjay@google.com (Sanjay Ghemawat)
// //
// Abstract interface that consumes a sequence of bytes (ByteSink). // Abstract interface that consumes a sequence of bytes (ByteSink).
// //
// Used so that we can write a single piece of code that can operate // Used so that we can write a single piece of code that can operate
// on a variety of output string types. // on a variety of output string types.
// //
skipping to change at line 59 skipping to change at line 59
public: public:
/** /**
* Default constructor. * Default constructor.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
ByteSink() { } ByteSink() { }
/** /**
* Virtual destructor. * Virtual destructor.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
virtual ~ByteSink() { } virtual ~ByteSink();
/** /**
* Append "bytes[0,n-1]" to this. * Append "bytes[0,n-1]" to this.
* @param bytes the pointer to the bytes * @param bytes the pointer to the bytes
* @param n the number of bytes; must be non-negative * @param n the number of bytes; must be non-negative
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
virtual void Append(const char* bytes, int32_t n) = 0; virtual void Append(const char* bytes, int32_t n) = 0;
/** /**
skipping to change at line 153 skipping to change at line 153
class U_COMMON_API CheckedArrayByteSink : public ByteSink { class U_COMMON_API CheckedArrayByteSink : public ByteSink {
public: public:
/** /**
* Constructs a ByteSink that will write to outbuf[0..capacity-1]. * Constructs a ByteSink that will write to outbuf[0..capacity-1].
* @param outbuf buffer to write to * @param outbuf buffer to write to
* @param capacity size of the buffer * @param capacity size of the buffer
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
CheckedArrayByteSink(char* outbuf, int32_t capacity); CheckedArrayByteSink(char* outbuf, int32_t capacity);
/** /**
* Destructor.
* @stable ICU 4.2
*/
virtual ~CheckedArrayByteSink();
/**
* Returns the sink to its original state, without modifying the buffer. * Returns the sink to its original state, without modifying the buffer.
* Useful for reusing both the buffer and the sink for multiple streams. * Useful for reusing both the buffer and the sink for multiple streams.
* Resets the state to NumberOfBytesWritten()=NumberOfBytesAppended()=0 * Resets the state to NumberOfBytesWritten()=NumberOfBytesAppended()=0
* and Overflowed()=FALSE. * and Overflowed()=FALSE.
* @return *this * @return *this
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual CheckedArrayByteSink& Reset(); virtual CheckedArrayByteSink& Reset();
/** /**
* Append "bytes[0,n-1]" to this. * Append "bytes[0,n-1]" to this.
* @param bytes the pointer to the bytes * @param bytes the pointer to the bytes
* @param n the number of bytes; must be non-negative * @param n the number of bytes; must be non-negative
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
virtual void Append(const char* bytes, int32_t n); virtual void Append(const char* bytes, int32_t n);
/** /**
skipping to change at line 204 skipping to change at line 209
* attempt to write more than 'capacity' bytes. * attempt to write more than 'capacity' bytes.
* @return TRUE if more than 'capacity' bytes were Append()ed * @return TRUE if more than 'capacity' bytes were Append()ed
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
UBool Overflowed() const { return overflowed_; } UBool Overflowed() const { return overflowed_; }
/** /**
* Returns the number of bytes appended to the sink. * Returns the number of bytes appended to the sink.
* If Overflowed() then NumberOfBytesAppended()>NumberOfBytesWritten() * If Overflowed() then NumberOfBytesAppended()>NumberOfBytesWritten()
* else they return the same number. * else they return the same number.
* @return number of bytes written to the buffer * @return number of bytes written to the buffer
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
int32_t NumberOfBytesAppended() const { return appended_; } int32_t NumberOfBytesAppended() const { return appended_; }
private: private:
char* outbuf_; char* outbuf_;
const int32_t capacity_; const int32_t capacity_;
int32_t size_; int32_t size_;
int32_t appended_; int32_t appended_;
UBool overflowed_; UBool overflowed_;
CheckedArrayByteSink(); ///< default constructor not implemented CheckedArrayByteSink(); ///< default constructor not implemented
CheckedArrayByteSink(const CheckedArrayByteSink &); ///< copy constructor not implemented CheckedArrayByteSink(const CheckedArrayByteSink &); ///< copy constructor not implemented
 End of changes. 5 change blocks. 
4 lines changed or deleted 9 lines changed or added


 bytestrie.h   bytestrie.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: bytestrie.h * file name: bytestrie.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010sep25 * created on: 2010sep25
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 46 skipping to change at line 46
* Light-weight, non-const reader class for a BytesTrie. * Light-weight, non-const reader class for a BytesTrie.
* Traverses a byte-serialized data structure with minimal state, * Traverses a byte-serialized data structure with minimal state,
* for mapping byte sequences to non-negative integer values. * for mapping byte sequences to non-negative integer values.
* *
* This class owns the serialized trie data only if it was constructed by * This class owns the serialized trie data only if it was constructed by
* the builder's build() method. * the builder's build() method.
* The public constructor and the copy constructor only alias the data (onl y copy the pointer). * The public constructor and the copy constructor only alias the data (onl y copy the pointer).
* There is no assignment operator. * There is no assignment operator.
* *
* This class is not intended for public subclassing. * This class is not intended for public subclassing.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API BytesTrie : public UMemory { class U_COMMON_API BytesTrie : public UMemory {
public: public:
/** /**
* Constructs a BytesTrie reader instance. * Constructs a BytesTrie reader instance.
* *
* The trieBytes must contain a copy of a byte sequence from the BytesT rieBuilder, * The trieBytes must contain a copy of a byte sequence from the BytesT rieBuilder,
* starting with the first byte of that sequence. * starting with the first byte of that sequence.
* The BytesTrie object will not read more bytes than * The BytesTrie object will not read more bytes than
* the BytesTrieBuilder generated in the corresponding build() call. * the BytesTrieBuilder generated in the corresponding build() call.
* *
* The array is not copied/cloned and must not be modified while * The array is not copied/cloned and must not be modified while
* the BytesTrie object is in use. * the BytesTrie object is in use.
* *
* @param trieBytes The byte array that contains the serialized trie. * @param trieBytes The byte array that contains the serialized trie.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrie(const void *trieBytes) BytesTrie(const void *trieBytes)
: ownedArray_(NULL), bytes_(reinterpret_cast<const uint8_t *>(t rieBytes)), : ownedArray_(NULL), bytes_(reinterpret_cast<const uint8_t *>(t rieBytes)),
pos_(bytes_), remainingMatchLength_(-1) {} pos_(bytes_), remainingMatchLength_(-1) {}
/** /**
* Destructor. * Destructor.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
~BytesTrie(); ~BytesTrie();
/** /**
* Copy constructor, copies the other trie reader object and its state, * Copy constructor, copies the other trie reader object and its state,
* but not the byte array which will be shared. (Shallow copy.) * but not the byte array which will be shared. (Shallow copy.)
* @param other Another BytesTrie object. * @param other Another BytesTrie object.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrie(const BytesTrie &other) BytesTrie(const BytesTrie &other)
: ownedArray_(NULL), bytes_(other.bytes_), : ownedArray_(NULL), bytes_(other.bytes_),
pos_(other.pos_), remainingMatchLength_(other.remainingMatchL ength_) {} pos_(other.pos_), remainingMatchLength_(other.remainingMatchL ength_) {}
/** /**
* Resets this trie to its initial state. * Resets this trie to its initial state.
* @return *this * @return *this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrie &reset() { BytesTrie &reset() {
pos_=bytes_; pos_=bytes_;
remainingMatchLength_=-1; remainingMatchLength_=-1;
return *this; return *this;
} }
/** /**
* BytesTrie state object, for saving a trie's current state * BytesTrie state object, for saving a trie's current state
* and resetting the trie back to this state later. * and resetting the trie back to this state later.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class State : public UMemory { class State : public UMemory {
public: public:
/** /**
* Constructs an empty State. * Constructs an empty State.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
State() { bytes=NULL; } State() { bytes=NULL; }
private: private:
friend class BytesTrie; friend class BytesTrie;
const uint8_t *bytes; const uint8_t *bytes;
const uint8_t *pos; const uint8_t *pos;
int32_t remainingMatchLength; int32_t remainingMatchLength;
}; };
/** /**
* Saves the state of this trie. * Saves the state of this trie.
* @param state The State object to hold the trie's state. * @param state The State object to hold the trie's state.
* @return *this * @return *this
* @see resetToState * @see resetToState
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
const BytesTrie &saveState(State &state) const { const BytesTrie &saveState(State &state) const {
state.bytes=bytes_; state.bytes=bytes_;
state.pos=pos_; state.pos=pos_;
state.remainingMatchLength=remainingMatchLength_; state.remainingMatchLength=remainingMatchLength_;
return *this; return *this;
} }
/** /**
* Resets this trie to the saved state. * Resets this trie to the saved state.
* If the state object contains no state, or the state of a different t rie, * If the state object contains no state, or the state of a different t rie,
* then this trie remains unchanged. * then this trie remains unchanged.
* @param state The State object which holds a saved trie state. * @param state The State object which holds a saved trie state.
* @return *this * @return *this
* @see saveState * @see saveState
* @see reset * @see reset
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrie &resetToState(const State &state) { BytesTrie &resetToState(const State &state) {
if(bytes_==state.bytes && bytes_!=NULL) { if(bytes_==state.bytes && bytes_!=NULL) {
pos_=state.pos; pos_=state.pos;
remainingMatchLength_=state.remainingMatchLength; remainingMatchLength_=state.remainingMatchLength;
} }
return *this; return *this;
} }
/** /**
* Determines whether the byte sequence so far matches, whether it has a value, * Determines whether the byte sequence so far matches, whether it has a value,
* and whether another input byte can continue a matching byte sequence . * and whether another input byte can continue a matching byte sequence .
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UStringTrieResult current() const; UStringTrieResult current() const;
/** /**
* Traverses the trie from the initial state for this input byte. * Traverses the trie from the initial state for this input byte.
* Equivalent to reset().next(inByte). * Equivalent to reset().next(inByte).
* @param inByte Input byte value. Values -0x100..-1 are treated like 0 ..0xff. * @param inByte Input byte value. Values -0x100..-1 are treated like 0 ..0xff.
* Values below -0x100 and above 0xff will never match. * Values below -0x100 and above 0xff will never match.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UStringTrieResult first(int32_t inByte) { inline UStringTrieResult first(int32_t inByte) {
remainingMatchLength_=-1; remainingMatchLength_=-1;
if(inByte<0) { if(inByte<0) {
inByte+=0x100; inByte+=0x100;
} }
return nextImpl(bytes_, inByte); return nextImpl(bytes_, inByte);
} }
/** /**
* Traverses the trie from the current state for this input byte. * Traverses the trie from the current state for this input byte.
* @param inByte Input byte value. Values -0x100..-1 are treated like 0 ..0xff. * @param inByte Input byte value. Values -0x100..-1 are treated like 0 ..0xff.
* Values below -0x100 and above 0xff will never match. * Values below -0x100 and above 0xff will never match.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UStringTrieResult next(int32_t inByte); UStringTrieResult next(int32_t inByte);
/** /**
* Traverses the trie from the current state for this byte sequence. * Traverses the trie from the current state for this byte sequence.
* Equivalent to * Equivalent to
* \code * \code
* Result result=current(); * Result result=current();
* for(each c in s) * for(each c in s)
* if(!USTRINGTRIE_HAS_NEXT(result)) return USTRINGTRIE_NO_MATCH; * if(!USTRINGTRIE_HAS_NEXT(result)) return USTRINGTRIE_NO_MATCH;
* result=next(c); * result=next(c);
* return result; * return result;
* \endcode * \endcode
* @param s A string or byte sequence. Can be NULL if length is 0. * @param s A string or byte sequence. Can be NULL if length is 0.
* @param length The length of the byte sequence. Can be -1 if NUL-term inated. * @param length The length of the byte sequence. Can be -1 if NUL-term inated.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UStringTrieResult next(const char *s, int32_t length); UStringTrieResult next(const char *s, int32_t length);
/** /**
* Returns a matching byte sequence's value if called immediately after * Returns a matching byte sequence's value if called immediately after
* current()/first()/next() returned USTRINGTRIE_INTERMEDIATE_VALUE or USTRINGTRIE_FINAL_VALUE. * current()/first()/next() returned USTRINGTRIE_INTERMEDIATE_VALUE or USTRINGTRIE_FINAL_VALUE.
* getValue() can be called multiple times. * getValue() can be called multiple times.
* *
* Do not call getValue() after USTRINGTRIE_NO_MATCH or USTRINGTRIE_NO_ VALUE! * Do not call getValue() after USTRINGTRIE_NO_MATCH or USTRINGTRIE_NO_ VALUE!
* @return The value for the byte sequence so far. * @return The value for the byte sequence so far.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline int32_t getValue() const { inline int32_t getValue() const {
const uint8_t *pos=pos_; const uint8_t *pos=pos_;
int32_t leadByte=*pos++; int32_t leadByte=*pos++;
// U_ASSERT(leadByte>=kMinValueLead); // U_ASSERT(leadByte>=kMinValueLead);
return readValue(pos, leadByte>>1); return readValue(pos, leadByte>>1);
} }
/** /**
* Determines whether all byte sequences reachable from the current sta te * Determines whether all byte sequences reachable from the current sta te
* map to the same value. * map to the same value.
* @param uniqueValue Receives the unique value, if this function retur ns TRUE. * @param uniqueValue Receives the unique value, if this function retur ns TRUE.
* (output-only) * (output-only)
* @return TRUE if all byte sequences reachable from the current state * @return TRUE if all byte sequences reachable from the current state
* map to the same value. * map to the same value.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UBool hasUniqueValue(int32_t &uniqueValue) const { inline UBool hasUniqueValue(int32_t &uniqueValue) const {
const uint8_t *pos=pos_; const uint8_t *pos=pos_;
// Skip the rest of a pending linear-match node. // Skip the rest of a pending linear-match node.
return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FA LSE, uniqueValue); return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FA LSE, uniqueValue);
} }
/** /**
* Finds each byte which continues the byte sequence from the current s tate. * Finds each byte which continues the byte sequence from the current s tate.
* That is, each byte b for which it would be next(b)!=USTRINGTRIE_NO_M ATCH now. * That is, each byte b for which it would be next(b)!=USTRINGTRIE_NO_M ATCH now.
* @param out Each next byte is appended to this object. * @param out Each next byte is appended to this object.
* (Only uses the out.Append(s, length) method.) * (Only uses the out.Append(s, length) method.)
* @return the number of bytes which continue the byte sequence from he re * @return the number of bytes which continue the byte sequence from he re
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getNextBytes(ByteSink &out) const; int32_t getNextBytes(ByteSink &out) const;
/** /**
* Iterator for all of the (byte sequence, value) pairs in a BytesTrie. * Iterator for all of the (byte sequence, value) pairs in a BytesTrie.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API Iterator : public UMemory { class U_COMMON_API Iterator : public UMemory {
public: public:
/** /**
* Iterates from the root of a byte-serialized BytesTrie. * Iterates from the root of a byte-serialized BytesTrie.
* @param trieBytes The trie bytes. * @param trieBytes The trie bytes.
* @param maxStringLength If 0, the iterator returns full strings/b yte sequences. * @param maxStringLength If 0, the iterator returns full strings/b yte sequences.
* Otherwise, the iterator returns strings w ith this maximum length. * Otherwise, the iterator returns strings w ith this maximum length.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details. ) * function chaining. (See User Guide for details. )
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
Iterator(const void *trieBytes, int32_t maxStringLength, UErrorCode &errorCode); Iterator(const void *trieBytes, int32_t maxStringLength, UErrorCode &errorCode);
/** /**
* Iterates from the current state of the specified BytesTrie. * Iterates from the current state of the specified BytesTrie.
* @param trie The trie whose state will be copied for iteration. * @param trie The trie whose state will be copied for iteration.
* @param maxStringLength If 0, the iterator returns full strings/b yte sequences. * @param maxStringLength If 0, the iterator returns full strings/b yte sequences.
* Otherwise, the iterator returns strings w ith this maximum length. * Otherwise, the iterator returns strings w ith this maximum length.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details. ) * function chaining. (See User Guide for details. )
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
Iterator(const BytesTrie &trie, int32_t maxStringLength, UErrorCode &errorCode); Iterator(const BytesTrie &trie, int32_t maxStringLength, UErrorCode &errorCode);
/** /**
* Destructor. * Destructor.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
~Iterator(); ~Iterator();
/** /**
* Resets this iterator to its initial state. * Resets this iterator to its initial state.
* @return *this * @return *this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
Iterator &reset(); Iterator &reset();
/** /**
* @return TRUE if there are more elements. * @return TRUE if there are more elements.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool hasNext() const; UBool hasNext() const;
/** /**
* Finds the next (byte sequence, value) pair if there is one. * Finds the next (byte sequence, value) pair if there is one.
* *
* If the byte sequence is truncated to the maximum length and does not * If the byte sequence is truncated to the maximum length and does not
* have a real value, then the value is set to -1. * have a real value, then the value is set to -1.
* In this case, this "not a real value" is indistinguishable from * In this case, this "not a real value" is indistinguishable from
* a real value of -1. * a real value of -1.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details. ) * function chaining. (See User Guide for details. )
* @return TRUE if there is another element. * @return TRUE if there is another element.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool next(UErrorCode &errorCode); UBool next(UErrorCode &errorCode);
/** /**
* @return The NUL-terminated byte sequence for the last successful next(). * @return The NUL-terminated byte sequence for the last successful next().
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
const StringPiece &getString() const { return sp_; } const StringPiece &getString() const { return sp_; }
/** /**
* @return The value for the last successful next(). * @return The value for the last successful next().
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getValue() const { return value_; } int32_t getValue() const { return value_; }
private: private:
UBool truncateAndStop(); UBool truncateAndStop();
const uint8_t *branchNext(const uint8_t *pos, int32_t length, UErro rCode &errorCode); const uint8_t *branchNext(const uint8_t *pos, int32_t length, UErro rCode &errorCode);
const uint8_t *bytes_; const uint8_t *bytes_;
const uint8_t *pos_; const uint8_t *pos_;
 End of changes. 26 change blocks. 
26 lines changed or deleted 26 lines changed or added


 bytestriebuilder.h   bytestriebuilder.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: bytestriebuilder.h * file name: bytestriebuilder.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010sep25 * created on: 2010sep25
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 32 skipping to change at line 32
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class BytesTrieElement; class BytesTrieElement;
class CharString; class CharString;
/** /**
* Builder class for BytesTrie. * Builder class for BytesTrie.
* *
* This class is not intended for public subclassing. * This class is not intended for public subclassing.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API BytesTrieBuilder : public StringTrieBuilder { class U_COMMON_API BytesTrieBuilder : public StringTrieBuilder {
public: public:
/** /**
* Constructs an empty builder. * Constructs an empty builder.
* @param errorCode Standard ICU error code. * @param errorCode Standard ICU error code.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrieBuilder(UErrorCode &errorCode); BytesTrieBuilder(UErrorCode &errorCode);
/** /**
* Destructor. * Destructor.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual ~BytesTrieBuilder(); virtual ~BytesTrieBuilder();
/** /**
* Adds a (byte sequence, value) pair. * Adds a (byte sequence, value) pair.
* The byte sequence must be unique. * The byte sequence must be unique.
* The bytes will be copied; the builder does not keep * The bytes will be copied; the builder does not keep
* a reference to the input StringPiece or its data(). * a reference to the input StringPiece or its data().
* @param s The input byte sequence. * @param s The input byte sequence.
* @param value The value associated with this byte sequence. * @param value The value associated with this byte sequence.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return *this * @return *this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrieBuilder &add(const StringPiece &s, int32_t value, UErrorCode & errorCode); BytesTrieBuilder &add(const StringPiece &s, int32_t value, UErrorCode & errorCode);
/** /**
* Builds a BytesTrie for the add()ed data. * Builds a BytesTrie for the add()ed data.
* Once built, no further data can be add()ed until clear() is called. * Once built, no further data can be add()ed until clear() is called.
* *
* This method passes ownership of the builder's internal result array to the new trie object. * This method passes ownership of the builder's internal result array to the new trie object.
* Another call to any build() variant will re-serialize the trie. * Another call to any build() variant will re-serialize the trie.
* After clear() has been called, a new array will be used as well. * After clear() has been called, a new array will be used as well.
* @param buildOption Build option, see UStringTrieBuildOption. * @param buildOption Build option, see UStringTrieBuildOption.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return A new BytesTrie for the add()ed data. * @return A new BytesTrie for the add()ed data.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrie *build(UStringTrieBuildOption buildOption, UErrorCode &errorC ode); BytesTrie *build(UStringTrieBuildOption buildOption, UErrorCode &errorC ode);
/** /**
* Builds a BytesTrie for the add()ed data and byte-serializes it. * Builds a BytesTrie for the add()ed data and byte-serializes it.
* Once built, no further data can be add()ed until clear() is called. * Once built, no further data can be add()ed until clear() is called.
* *
* Multiple calls to buildStringPiece() return StringPieces referring t o the * Multiple calls to buildStringPiece() return StringPieces referring t o the
* builder's same byte array, without rebuilding. * builder's same byte array, without rebuilding.
* If buildStringPiece() is called after build(), the trie will be * If buildStringPiece() is called after build(), the trie will be
* re-serialized into a new array. * re-serialized into a new array.
* If build() is called after buildStringPiece(), the trie object will become * If build() is called after buildStringPiece(), the trie object will become
* the owner of the previously returned array. * the owner of the previously returned array.
* After clear() has been called, a new array will be used as well. * After clear() has been called, a new array will be used as well.
* @param buildOption Build option, see UStringTrieBuildOption. * @param buildOption Build option, see UStringTrieBuildOption.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return A StringPiece which refers to the byte-serialized BytesTrie for the add()ed data. * @return A StringPiece which refers to the byte-serialized BytesTrie for the add()ed data.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
StringPiece buildStringPiece(UStringTrieBuildOption buildOption, UError Code &errorCode); StringPiece buildStringPiece(UStringTrieBuildOption buildOption, UError Code &errorCode);
/** /**
* Removes all (byte sequence, value) pairs. * Removes all (byte sequence, value) pairs.
* New data can then be add()ed and a new trie can be built. * New data can then be add()ed and a new trie can be built.
* @return *this * @return *this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrieBuilder &clear(); BytesTrieBuilder &clear();
private: private:
BytesTrieBuilder(const BytesTrieBuilder &other); // no copy constructo r BytesTrieBuilder(const BytesTrieBuilder &other); // no copy constructo r
BytesTrieBuilder &operator=(const BytesTrieBuilder &other); // no assi gnment operator BytesTrieBuilder &operator=(const BytesTrieBuilder &other); // no assi gnment operator
void buildBytes(UStringTrieBuildOption buildOption, UErrorCode &errorCo de); void buildBytes(UStringTrieBuildOption buildOption, UErrorCode &errorCo de);
virtual int32_t getElementStringLength(int32_t i) const; virtual int32_t getElementStringLength(int32_t i) const;
skipping to change at line 133 skipping to change at line 133
virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t byteIndex) const; virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t byteIndex) const;
virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t byteIndex, i nt32_t count) const; virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t byteIndex, i nt32_t count) const;
virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t byteIndex , UChar byte) const; virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t byteIndex , UChar byte) const;
virtual UBool matchNodesCanHaveValues() const { return FALSE; } virtual UBool matchNodesCanHaveValues() const { return FALSE; }
virtual int32_t getMaxBranchLinearSubNodeLength() const { return BytesT rie::kMaxBranchLinearSubNodeLength; } virtual int32_t getMaxBranchLinearSubNodeLength() const { return BytesT rie::kMaxBranchLinearSubNodeLength; }
virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinea rMatch; } virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinea rMatch; }
virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMa xLinearMatchLength; } virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMa xLinearMatchLength; }
#ifndef U_HIDE_INTERNAL_API
/** /**
* @internal * @internal
*/ */
class BTLinearMatchNode : public LinearMatchNode { class BTLinearMatchNode : public LinearMatchNode {
public: public:
BTLinearMatchNode(const char *units, int32_t len, Node *nextNode); BTLinearMatchNode(const char *units, int32_t len, Node *nextNode);
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
virtual void write(StringTrieBuilder &builder); virtual void write(StringTrieBuilder &builder);
private: private:
const char *s; const char *s;
}; };
#endif /* U_HIDE_INTERNAL_API */
virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32 _t length, virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32 _t length,
Node *nextNode) const; Node *nextNode) const;
UBool ensureCapacity(int32_t length); UBool ensureCapacity(int32_t length);
virtual int32_t write(int32_t byte); virtual int32_t write(int32_t byte);
int32_t write(const char *b, int32_t length); int32_t write(const char *b, int32_t length);
virtual int32_t writeElementUnits(int32_t i, int32_t byteIndex, int32_t length); virtual int32_t writeElementUnits(int32_t i, int32_t byteIndex, int32_t length);
virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal); virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal);
virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_ t node); virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_ t node);
 End of changes. 10 change blocks. 
8 lines changed or deleted 10 lines changed or added


 calendar.h   calendar.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File CALENDAR.H * File CALENDAR.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/22/97 aliu Expanded and corrected comments and other heade r * 04/22/97 aliu Expanded and corrected comments and other heade r
* contents. * contents.
skipping to change at line 51 skipping to change at line 51
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class ICUServiceFactory; class ICUServiceFactory;
/** /**
* @internal * @internal
*/ */
typedef int32_t UFieldResolutionTable[12][8]; typedef int32_t UFieldResolutionTable[12][8];
class BasicTimeZone;
/** /**
* <code>Calendar</code> is an abstract base class for converting between * <code>Calendar</code> is an abstract base class for converting between
* a <code>UDate</code> object and a set of integer fields such as * a <code>UDate</code> object and a set of integer fields such as
* <code>YEAR</code>, <code>MONTH</code>, <code>DAY</code>, <code>HOUR</cod e>, * <code>YEAR</code>, <code>MONTH</code>, <code>DAY</code>, <code>HOUR</cod e>,
* and so on. (A <code>UDate</code> object represents a specific instant in * and so on. (A <code>UDate</code> object represents a specific instant in
* time with millisecond precision. See UDate * time with millisecond precision. See UDate
* for information about the <code>UDate</code> class.) * for information about the <code>UDate</code> class.)
* *
* <p> * <p>
* Subclasses of <code>Calendar</code> interpret a <code>UDate</code> * Subclasses of <code>Calendar</code> interpret a <code>UDate</code>
skipping to change at line 211 skipping to change at line 212
EXTENDED_YEAR, EXTENDED_YEAR,
JULIAN_DAY, JULIAN_DAY,
MILLISECONDS_IN_DAY, MILLISECONDS_IN_DAY,
IS_LEAP_MONTH, IS_LEAP_MONTH,
FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields. FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields.
#endif /* U_HIDE_DEPRECATED_API */ #endif /* U_HIDE_DEPRECATED_API */
}; };
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Useful constant for days of week. Note: Calendar day-of-week is 1-ba sed. Clients * Useful constant for days of week. Note: Calendar day-of-week is 1-ba sed. Clients
* who create locale resources for the field of first-day-of-week shoul d be aware of * who create locale resources for the field of first-day-of-week shoul d be aware of
* this. For instance, in US locale, first-day-of-week is set to 1, i.e ., SUNDAY. * this. For instance, in US locale, first-day-of-week is set to 1, i.e ., SUNDAY.
* @deprecated ICU 2.6. Use C enum UCalendarDaysOfWeek defined in ucal. h * @deprecated ICU 2.6. Use C enum UCalendarDaysOfWeek defined in ucal. h
*/ */
enum EDaysOfWeek { enum EDaysOfWeek {
#ifndef U_HIDE_DEPRECATED_API
SUNDAY = 1, SUNDAY = 1,
MONDAY, MONDAY,
TUESDAY, TUESDAY,
WEDNESDAY, WEDNESDAY,
THURSDAY, THURSDAY,
FRIDAY, FRIDAY,
SATURDAY SATURDAY
#endif /* U_HIDE_DEPRECATED_API */
}; };
/** /**
* Useful constants for month. Note: Calendar month is 0-based. * Useful constants for month. Note: Calendar month is 0-based.
* @deprecated ICU 2.6. Use C enum UCalendarMonths defined in ucal.h * @deprecated ICU 2.6. Use C enum UCalendarMonths defined in ucal.h
*/ */
enum EMonths { enum EMonths {
#ifndef U_HIDE_DEPRECATED_API
JANUARY, JANUARY,
FEBRUARY, FEBRUARY,
MARCH, MARCH,
APRIL, APRIL,
MAY, MAY,
JUNE, JUNE,
JULY, JULY,
AUGUST, AUGUST,
SEPTEMBER, SEPTEMBER,
OCTOBER, OCTOBER,
NOVEMBER, NOVEMBER,
DECEMBER, DECEMBER,
UNDECIMBER UNDECIMBER
#endif /* U_HIDE_DEPRECATED_API */
}; };
/** /**
* Useful constants for hour in 12-hour clock. Used in GregorianCalenda r. * Useful constants for hour in 12-hour clock. Used in GregorianCalenda r.
* @deprecated ICU 2.6. Use C enum UCalendarAMPMs defined in ucal.h * @deprecated ICU 2.6. Use C enum UCalendarAMPMs defined in ucal.h
*/ */
enum EAmpm { enum EAmpm {
#ifndef U_HIDE_DEPRECATED_API
AM, AM,
PM PM
#endif /* U_HIDE_DEPRECATED_API */
}; };
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* destructor * destructor
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual ~Calendar(); virtual ~Calendar();
/** /**
* Create and return a polymorphic copy of this calendar. * Create and return a polymorphic copy of this calendar.
* *
skipping to change at line 542 skipping to change at line 539
* @param amount The amount of time to be added to the field, in the n atural unit * @param amount The amount of time to be added to the field, in the n atural unit
* for that field (e.g., days for the day fields, hours for the hour * for that field (e.g., days for the day fields, hours for the hour
* field.) * field.)
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid or restri cted by * previously set in the time field is invalid or restri cted by
* leniency, this will be set to an error status. * leniency, this will be set to an error status.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode& status); virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode& status);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Time Field Rolling function. Rolls (up/down) a single unit of time o n the given * Time Field Rolling function. Rolls (up/down) a single unit of time o n the given
* time field. For example, to roll the current date up by one day, cal l * time field. For example, to roll the current date up by one day, cal l
* roll(Calendar::DATE, true). When rolling on the year or Calendar::YE AR field, it * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE AR field, it
* will roll the year value in the range between getMinimum(Calendar::Y EAR) and the * will roll the year value in the range between getMinimum(Calendar::Y EAR) and the
* value returned by getMaximum(Calendar::YEAR). When rolling on the mo nth or * value returned by getMaximum(Calendar::YEAR). When rolling on the mo nth or
* Calendar::MONTH field, other fields like date might conflict and, ne ed to be * Calendar::MONTH field, other fields like date might conflict and, ne ed to be
* changed. For instance, rolling the month up on the date 01/31/96 wil l result in * changed. For instance, rolling the month up on the date 01/31/96 wil l result in
* 02/29/96. Rolling up always means rolling forward in time; e.g., rol ling the year * 02/29/96. Rolling up always means rolling forward in time; e.g., rol ling the year
* up on "100 BC" will result in "99 BC", for Gregorian calendar. When rolling on the * up on "100 BC" will result in "99 BC", for Gregorian calendar. When rolling on the
skipping to change at line 566 skipping to change at line 564
* *
* @param field The time field. * @param field The time field.
* @param up Indicates if the value of the specified time field is to be rolled * @param up Indicates if the value of the specified time field is to be rolled
* up or rolled down. Use true if rolling up, false othe rwise. * up or rolled down. Use true if rolling up, false othe rwise.
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid or restri cted by * previously set in the time field is invalid or restri cted by
* leniency, this will be set to an error status. * leniency, this will be set to an error status.
* @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, U ErrorCode& status) instead. * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, U ErrorCode& status) instead.
*/ */
inline void roll(EDateFields field, UBool up, UErrorCode& status); inline void roll(EDateFields field, UBool up, UErrorCode& status);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Time Field Rolling function. Rolls (up/down) a single unit of time o n the given * Time Field Rolling function. Rolls (up/down) a single unit of time o n the given
* time field. For example, to roll the current date up by one day, cal l * time field. For example, to roll the current date up by one day, cal l
* roll(Calendar::DATE, true). When rolling on the year or Calendar::YE AR field, it * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE AR field, it
* will roll the year value in the range between getMinimum(Calendar::Y EAR) and the * will roll the year value in the range between getMinimum(Calendar::Y EAR) and the
* value returned by getMaximum(Calendar::YEAR). When rolling on the mo nth or * value returned by getMaximum(Calendar::YEAR). When rolling on the mo nth or
* Calendar::MONTH field, other fields like date might conflict and, ne ed to be * Calendar::MONTH field, other fields like date might conflict and, ne ed to be
* changed. For instance, rolling the month up on the date 01/31/96 wil l result in * changed. For instance, rolling the month up on the date 01/31/96 wil l result in
* 02/29/96. Rolling up always means rolling forward in time; e.g., rol ling the year * 02/29/96. Rolling up always means rolling forward in time; e.g., rol ling the year
skipping to change at line 825 skipping to change at line 824
void setLenient(UBool lenient); void setLenient(UBool lenient);
/** /**
* Tells whether date/time interpretation is to be lenient. * Tells whether date/time interpretation is to be lenient.
* *
* @return True tells that date/time interpretation is to be lenient. * @return True tells that date/time interpretation is to be lenient.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UBool isLenient(void) const; UBool isLenient(void) const;
#ifndef U_HIDE_DRAFT_API
/**
* Sets the behavior for handling wall time repeating multiple times
* at negative time zone offset transitions. For example, 1:30 AM on
* November 6, 2011 in US Eastern time (Ameirca/New_York) occurs twice;
* 1:30 AM EDT, then 1:30 AM EST one hour later. When <code>UCAL_WALLTI
ME_FIRST</code>
* is used, the wall time 1:30AM in this example will be interpreted as
1:30 AM EDT
* (first occurrence). When <code>UCAL_WALLTIME_LAST</code> is used, it
will be
* interpreted as 1:30 AM EST (last occurrence). The default value is
* <code>UCAL_WALLTIME_LAST</code>.
* <p>
* <b>Note:</b>When <code>UCAL_WALLTIME_NEXT_VALID</code> is not a vali
d
* option for this. When the argument is neither <code>UCAL_WALLTIME_FI
RST</code>
* nor <code>UCAL_WALLTIME_LAST</code>, this method has no effect and w
ill keep
* the current setting.
*
* @param option the behavior for handling repeating wall time, either
* <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>.
* @see #getRepeatedWallTimeOption
* @draft ICU 49
*/
void setRepeatedWallTimeOption(UCalendarWallTimeOption option);
/**
* Gets the behavior for handling wall time repeating multiple times
* at negative time zone offset transitions.
*
* @return the behavior for handling repeating wall time, either
* <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>.
* @see #setRepeatedWallTimeOption
* @draft ICU 49
*/
UCalendarWallTimeOption getRepeatedWallTimeOption(void) const;
/**
* Sets the behavior for handling skipped wall time at positive time zo
ne offset
* transitions. For example, 2:30 AM on March 13, 2011 in US Eastern ti
me (America/New_York)
* does not exist because the wall time jump from 1:59 AM EST to 3:00 A
M EDT. When
* <code>UCAL_WALLTIME_FIRST</code> is used, 2:30 AM is interpreted as
30 minutes before 3:00 AM
* EDT, therefore, it will be resolved as 1:30 AM EST. When <code>UCAL_
WALLTIME_LAST</code>
* is used, 2:30 AM is interpreted as 31 minutes after 1:59 AM EST, the
refore, it will be
* resolved as 3:30 AM EDT. When <code>UCAL_WALLTIME_NEXT_VALID</code>
is used, 2:30 AM will
* be resolved as next valid wall time, that is 3:00 AM EDT. The defaul
t value is
* <code>UCAL_WALLTIME_LAST</code>.
* <p>
* <b>Note:</b>This option is effective only when this calendar is leni
ent.
* When the calendar is strict, such non-existing wall time will cause
an error.
*
* @param option the behavior for handling skipped wall time at positiv
e time zone
* offset transitions, one of <code>UCAL_WALLTIME_FIRST</code>, <code>U
CAL_WALLTIME_LAST</code> and
* <code>UCAL_WALLTIME_NEXT_VALID</code>.
* @see #getSkippedWallTimeOption
*
* @draft ICU 49
*/
void setSkippedWallTimeOption(UCalendarWallTimeOption option);
/**
* Gets the behavior for handling skipped wall time at positive time zo
ne offset
* transitions.
*
* @return the behavior for handling skipped wall time, one of
* <code>UCAL_WALLTIME_FIRST</code>, <code>UCAL_WALLTIME_LAST</code>
* and <code>UCAL_WALLTIME_NEXT_VALID</code>.
* @see #setSkippedWallTimeOption
* @draft ICU 49
*/
UCalendarWallTimeOption getSkippedWallTimeOption(void) const;
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Sets what the first day of the week is; e.g., Sunday in US, Monday i n France. * Sets what the first day of the week is; e.g., Sunday in US, Monday i n France.
* *
* @param value The given first day of the week. * @param value The given first day of the week.
* @deprecated ICU 2.6. Use setFirstDayOfWeek(UCalendarDaysOfWeek value ) instead. * @deprecated ICU 2.6. Use setFirstDayOfWeek(UCalendarDaysOfWeek value ) instead.
*/ */
void setFirstDayOfWeek(EDaysOfWeek value); void setFirstDayOfWeek(EDaysOfWeek value);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Sets what the first day of the week is; e.g., Sunday in US, Monday i n France. * Sets what the first day of the week is; e.g., Sunday in US, Monday i n France.
* *
* @param value The given first day of the week. * @param value The given first day of the week.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
void setFirstDayOfWeek(UCalendarDaysOfWeek value); void setFirstDayOfWeek(UCalendarDaysOfWeek value);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Gets what the first day of the week is; e.g., Sunday in US, Monday i n France. * Gets what the first day of the week is; e.g., Sunday in US, Monday i n France.
* *
* @return The first day of the week. * @return The first day of the week.
* @deprecated ICU 2.6 use the overload with error code * @deprecated ICU 2.6 use the overload with error code
*/ */
EDaysOfWeek getFirstDayOfWeek(void) const; EDaysOfWeek getFirstDayOfWeek(void) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Gets what the first day of the week is; e.g., Sunday in US, Monday i n France. * Gets what the first day of the week is; e.g., Sunday in US, Monday i n France.
* *
* @param status error code * @param status error code
* @return The first day of the week. * @return The first day of the week.
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
UCalendarDaysOfWeek getFirstDayOfWeek(UErrorCode &status) const; UCalendarDaysOfWeek getFirstDayOfWeek(UErrorCode &status) const;
skipping to change at line 960 skipping to change at line 1033
/** /**
* Gets the lowest maximum value for the given field if varies. Otherwi se same as * Gets the lowest maximum value for the given field if varies. Otherwi se same as
* getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28. * getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
* *
* @param field The given time field. * @param field The given time field.
* @return The lowest maximum value for the given time field. * @return The lowest maximum value for the given time field.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
virtual int32_t getLeastMaximum(UCalendarDateFields field) const; virtual int32_t getLeastMaximum(UCalendarDateFields field) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the minimum value that this field could have, given the curre nt date. * Return the minimum value that this field could have, given the curre nt date.
* For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum(). * For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum().
* *
* The version of this function on Calendar uses an iterative algorithm to determine the * The version of this function on Calendar uses an iterative algorithm to determine the
* actual minimum value for the field. There is almost always a more e fficient way to * actual minimum value for the field. There is almost always a more e fficient way to
* accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar * accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar
* overrides this function with a more efficient implementation. * overrides this function with a more efficient implementation.
* *
* @param field the field to determine the minimum of * @param field the field to determine the minimum of
* @param status Fill-in parameter which receives the status of this operation. * @param status Fill-in parameter which receives the status of this operation.
* @return the minimum of the given field for the current date of this Calendar * @return the minimum of the given field for the current date of this Calendar
* @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field, UErrorCode& status) instead. * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field, UErrorCode& status) instead.
*/ */
int32_t getActualMinimum(EDateFields field, UErrorCode& status) const; int32_t getActualMinimum(EDateFields field, UErrorCode& status) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Return the minimum value that this field could have, given the curre nt date. * Return the minimum value that this field could have, given the curre nt date.
* For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum(). * For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum().
* *
* The version of this function on Calendar uses an iterative algorithm to determine the * The version of this function on Calendar uses an iterative algorithm to determine the
* actual minimum value for the field. There is almost always a more e fficient way to * actual minimum value for the field. There is almost always a more e fficient way to
* accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar * accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar
* overrides this function with a more efficient implementation. * overrides this function with a more efficient implementation.
* *
* @param field the field to determine the minimum of * @param field the field to determine the minimum of
* @param status Fill-in parameter which receives the status of this operation. * @param status Fill-in parameter which receives the status of this operation.
* @return the minimum of the given field for the current date of this Calendar * @return the minimum of the given field for the current date of this Calendar
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode& status) const; virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode& status) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the maximum value that this field could have, given the curre nt date. * Return the maximum value that this field could have, given the curre nt date.
* For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
* maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb rew calendar, * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb rew calendar,
* for some years the actual maximum for MONTH is 12, and for others 13 . * for some years the actual maximum for MONTH is 12, and for others 13 .
* *
* The version of this function on Calendar uses an iterative algorithm to determine the * The version of this function on Calendar uses an iterative algorithm to determine the
* actual maximum value for the field. There is almost always a more e fficient way to * actual maximum value for the field. There is almost always a more e fficient way to
* accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar * accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar
* overrides this function with a more efficient implementation. * overrides this function with a more efficient implementation.
* *
* @param field the field to determine the maximum of * @param field the field to determine the maximum of
* @param status Fill-in parameter which receives the status of this operation. * @param status Fill-in parameter which receives the status of this operation.
* @return the maximum of the given field for the current date of this Calendar * @return the maximum of the given field for the current date of this Calendar
* @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field, UErrorCode& status) instead. * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field, UErrorCode& status) instead.
*/ */
int32_t getActualMaximum(EDateFields field, UErrorCode& status) const; int32_t getActualMaximum(EDateFields field, UErrorCode& status) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Return the maximum value that this field could have, given the curre nt date. * Return the maximum value that this field could have, given the curre nt date.
* For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
* maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb rew calendar, * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb rew calendar,
* for some years the actual maximum for MONTH is 12, and for others 13 . * for some years the actual maximum for MONTH is 12, and for others 13 .
* *
* The version of this function on Calendar uses an iterative algorithm to determine the * The version of this function on Calendar uses an iterative algorithm to determine the
* actual maximum value for the field. There is almost always a more e fficient way to * actual maximum value for the field. There is almost always a more e fficient way to
* accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar * accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar
* overrides this function with a more efficient implementation. * overrides this function with a more efficient implementation.
* *
* @param field the field to determine the maximum of * @param field the field to determine the maximum of
* @param status Fill-in parameter which receives the status of this operation. * @param status Fill-in parameter which receives the status of this operation.
* @return the maximum of the given field for the current date of this Calendar * @return the maximum of the given field for the current date of this Calendar
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const; virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Gets the value for a given time field. Recalculate the current time field values * Gets the value for a given time field. Recalculate the current time field values
* if the time value has been changed by a call to setTime(). Return ze ro for unset * if the time value has been changed by a call to setTime(). Return ze ro for unset
* fields if any fields have been explicitly set by a call to set(). To force a * fields if any fields have been explicitly set by a call to set(). To force a
* recomputation of all fields regardless of the previous state, call c omplete(). * recomputation of all fields regardless of the previous state, call c omplete().
* This method is semantically const, but may alter the object in memor y. * This method is semantically const, but may alter the object in memor y.
* *
* @param field The given time field. * @param field The given time field.
* @param status Fill-in parameter which receives the status of the ope ration. * @param status Fill-in parameter which receives the status of the ope ration.
* @return The value for the given time field, or zero if the fie ld is unset, * @return The value for the given time field, or zero if the fie ld is unset,
* and set() has been called for any other field. * and set() has been called for any other field.
* @deprecated ICU 2.6. Use get(UCalendarDateFields field, UErrorCode& status) instead. * @deprecated ICU 2.6. Use get(UCalendarDateFields field, UErrorCode& status) instead.
*/ */
int32_t get(EDateFields field, UErrorCode& status) const; int32_t get(EDateFields field, UErrorCode& status) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Gets the value for a given time field. Recalculate the current time field values * Gets the value for a given time field. Recalculate the current time field values
* if the time value has been changed by a call to setTime(). Return ze ro for unset * if the time value has been changed by a call to setTime(). Return ze ro for unset
* fields if any fields have been explicitly set by a call to set(). To force a * fields if any fields have been explicitly set by a call to set(). To force a
* recomputation of all fields regardless of the previous state, call c omplete(). * recomputation of all fields regardless of the previous state, call c omplete().
* This method is semantically const, but may alter the object in memor y. * This method is semantically const, but may alter the object in memor y.
* *
* @param field The given time field. * @param field The given time field.
* @param status Fill-in parameter which receives the status of the ope ration. * @param status Fill-in parameter which receives the status of the ope ration.
* @return The value for the given time field, or zero if the fie ld is unset, * @return The value for the given time field, or zero if the fie ld is unset,
* and set() has been called for any other field. * and set() has been called for any other field.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
int32_t get(UCalendarDateFields field, UErrorCode& status) const; int32_t get(UCalendarDateFields field, UErrorCode& status) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Determines if the given time field has a value set. This can affect in the * Determines if the given time field has a value set. This can affect in the
* resolving of time in Calendar. Unset fields have a value of zero, by definition. * resolving of time in Calendar. Unset fields have a value of zero, by definition.
* *
* @param field The given time field. * @param field The given time field.
* @return True if the given time field has a value set; false otherw ise. * @return True if the given time field has a value set; false otherw ise.
* @deprecated ICU 2.6. Use isSet(UCalendarDateFields field) instead. * @deprecated ICU 2.6. Use isSet(UCalendarDateFields field) instead.
*/ */
UBool isSet(EDateFields field) const; UBool isSet(EDateFields field) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Determines if the given time field has a value set. This can affect in the * Determines if the given time field has a value set. This can affect in the
* resolving of time in Calendar. Unset fields have a value of zero, by definition. * resolving of time in Calendar. Unset fields have a value of zero, by definition.
* *
* @param field The given time field. * @param field The given time field.
* @return True if the given time field has a value set; false otherw ise. * @return True if the given time field has a value set; false otherw ise.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
UBool isSet(UCalendarDateFields field) const; UBool isSet(UCalendarDateFields field) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Sets the given time field with the given value. * Sets the given time field with the given value.
* *
* @param field The given time field. * @param field The given time field.
* @param value The value to be set for the given time field. * @param value The value to be set for the given time field.
* @deprecated ICU 2.6. Use set(UCalendarDateFields field, int32_t valu e) instead. * @deprecated ICU 2.6. Use set(UCalendarDateFields field, int32_t valu e) instead.
*/ */
void set(EDateFields field, int32_t value); void set(EDateFields field, int32_t value);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Sets the given time field with the given value. * Sets the given time field with the given value.
* *
* @param field The given time field. * @param field The given time field.
* @param value The value to be set for the given time field. * @param value The value to be set for the given time field.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
void set(UCalendarDateFields field, int32_t value); void set(UCalendarDateFields field, int32_t value);
skipping to change at line 1145 skipping to change at line 1228
void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32 _t minute, int32_t second); void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32 _t minute, int32_t second);
/** /**
* Clears the values of all the time fields, making them both unset and assigning * Clears the values of all the time fields, making them both unset and assigning
* them a value of zero. The field values will be determined during the next * them a value of zero. The field values will be determined during the next
* resolving of time into time fields. * resolving of time into time fields.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
void clear(void); void clear(void);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Clears the value in the given time field, both making it unset and a ssigning it a * Clears the value in the given time field, both making it unset and a ssigning it a
* value of zero. This field value will be determined during the next r esolving of * value of zero. This field value will be determined during the next r esolving of
* time into time fields. * time into time fields.
* *
* @param field The time field to be cleared. * @param field The time field to be cleared.
* @deprecated ICU 2.6. Use clear(UCalendarDateFields field) instead. * @deprecated ICU 2.6. Use clear(UCalendarDateFields field) instead.
*/ */
void clear(EDateFields field); void clear(EDateFields field);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Clears the value in the given time field, both making it unset and a ssigning it a * Clears the value in the given time field, both making it unset and a ssigning it a
* value of zero. This field value will be determined during the next r esolving of * value of zero. This field value will be determined during the next r esolving of
* time into time fields. * time into time fields.
* *
* @param field The time field to be cleared. * @param field The time field to be cleared.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
void clear(UCalendarDateFields field); void clear(UCalendarDateFields field);
skipping to change at line 1183 skipping to change at line 1268
* static UClassID getStaticClassID() { return (UClassID)&amp;fgCl assID; } * static UClassID getStaticClassID() { return (UClassID)&amp;fgCl assID; }
* static char fgClassID; * static char fgClassID;
* *
* @return The class ID for this object. All objects of a given class have the * @return The class ID for this object. All objects of a given class have the
* same class ID. Objects of other classes have different cla ss IDs. * same class ID. Objects of other classes have different cla ss IDs.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UClassID getDynamicClassID(void) const = 0; virtual UClassID getDynamicClassID(void) const = 0;
/** /**
* Returns the resource key string used for this calendar type. * Returns the calendar type name string for this Calendar object.
* For example, prepending "Eras_" to this string could return "Eras_ja * The returned string is the legacy ICU calendar attribute value,
panese" * for example, "gregorian" or "japanese".
* or "Eras_gregorian".
* *
* @returns static string, for example, "gregorian" or "japanese" * See type="old type name" for the calendar attribute of locale IDs
* @internal * at http://www.unicode.org/reports/tr35/#Key_Type_Definitions
*
* Sample code for getting the LDML/BCP 47 calendar key value:
* \code
* const char *calType = cal->getType();
* if (0 == strcmp(calType, "unknown")) {
* // deal with unknown calendar type
* } else {
* string localeID("root@calendar=");
* localeID.append(calType);
* char langTag[100];
* UErrorCode errorCode = U_ZERO_ERROR;
* int32_t length = uloc_toLanguageTag(localeID.c_str(), langTag, (
int32_t)sizeof(langTag), TRUE, &errorCode);
* if (U_FAILURE(errorCode)) {
* // deal with errors & overflow
* }
* string lang(langTag, length);
* size_t caPos = lang.find("-ca-");
* lang.erase(0, caPos + 4);
* // lang now contains the LDML calendar type
* }
* \endcode
*
* @return legacy calendar type name string
* @draft ICU 49
*/ */
virtual const char * getType() const = 0; virtual const char * getType() const = 0;
/** /**
* Returns whether the given day of the week is a weekday, a * Returns whether the given day of the week is a weekday, a
* weekend day, or a day that transitions from one to the other, * weekend day, or a day that transitions from one to the other,
* in this calendar system. If a transition occurs at midnight, * in this calendar system. If a transition occurs at midnight,
* then the days before and after the transition will have the * then the days before and after the transition will have the
* type UCAL_WEEKDAY or UCAL_WEEKEND. If a transition occurs at a time * type UCAL_WEEKDAY or UCAL_WEEKEND. If a transition occurs at a time
* other than midnight, then the day of the transition will have * other than midnight, then the day of the transition will have
skipping to change at line 1351 skipping to change at line 1460
* Recomputes the current time from currently set fields, and then fill s in any * Recomputes the current time from currently set fields, and then fill s in any
* unset fields in the time field list. * unset fields in the time field list.
* *
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid or restri cted by * previously set in the time field is invalid or restri cted by
* leniency, this will be set to an error status. * leniency, this will be set to an error status.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
void complete(UErrorCode& status); void complete(UErrorCode& status);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Gets the value for a given time field. Subclasses can use this funct ion to get * Gets the value for a given time field. Subclasses can use this funct ion to get
* field values without forcing recomputation of time. * field values without forcing recomputation of time.
* *
* @param field The given time field. * @param field The given time field.
* @return The value for the given time field. * @return The value for the given time field.
* @deprecated ICU 2.6. Use internalGet(UCalendarDateFields field) inst ead. * @deprecated ICU 2.6. Use internalGet(UCalendarDateFields field) inst ead.
*/ */
inline int32_t internalGet(EDateFields field) const {return fFields[fie ld];} inline int32_t internalGet(EDateFields field) const {return fFields[fie ld];}
#endif /* U_HIDE_DEPRECATED_API */
#ifndef U_HIDE_INTERNAL_API
/** /**
* Gets the value for a given time field. Subclasses can use this funct ion to get * Gets the value for a given time field. Subclasses can use this funct ion to get
* field values without forcing recomputation of time. If the field's s tamp is UNSET, * field values without forcing recomputation of time. If the field's s tamp is UNSET,
* the defaultValue is used. * the defaultValue is used.
* *
* @param field The given time field. * @param field The given time field.
* @param defaultValue a default value used if the field is unset. * @param defaultValue a default value used if the field is unset.
* @return The value for the given time field. * @return The value for the given time field.
* @internal * @internal
*/ */
skipping to change at line 1382 skipping to change at line 1494
/** /**
* Gets the value for a given time field. Subclasses can use this funct ion to get * Gets the value for a given time field. Subclasses can use this funct ion to get
* field values without forcing recomputation of time. * field values without forcing recomputation of time.
* *
* @param field The given time field. * @param field The given time field.
* @return The value for the given time field. * @return The value for the given time field.
* @internal * @internal
*/ */
inline int32_t internalGet(UCalendarDateFields field) const {return fFi elds[field];} inline int32_t internalGet(UCalendarDateFields field) const {return fFi elds[field];}
#endif /* U_HIDE_INTERNAL_API */
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Sets the value for a given time field. This is a fast internal meth od for * Sets the value for a given time field. This is a fast internal meth od for
* subclasses. It does not affect the areFieldsInSync, isTimeSet, or a reAllFieldsSet * subclasses. It does not affect the areFieldsInSync, isTimeSet, or a reAllFieldsSet
* flags. * flags.
* *
* @param field The given time field. * @param field The given time field.
* @param value The value for the given time field. * @param value The value for the given time field.
* @deprecated ICU 2.6. Use internalSet(UCalendarDateFields field, int3 2_t value) instead. * @deprecated ICU 2.6. Use internalSet(UCalendarDateFields field, int3 2_t value) instead.
*/ */
void internalSet(EDateFields field, int32_t value); void internalSet(EDateFields field, int32_t value);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Sets the value for a given time field. This is a fast internal meth od for * Sets the value for a given time field. This is a fast internal meth od for
* subclasses. It does not affect the areFieldsInSync, isTimeSet, or a reAllFieldsSet * subclasses. It does not affect the areFieldsInSync, isTimeSet, or a reAllFieldsSet
* flags. * flags.
* *
* @param field The given time field. * @param field The given time field.
* @param value The value for the given time field. * @param value The value for the given time field.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
skipping to change at line 1521 skipping to change at line 1636
/** /**
* Subclasses must override this to convert from week fields * Subclasses must override this to convert from week fields
* (YEAR_WOY and WEEK_OF_YEAR) to an extended year in the case * (YEAR_WOY and WEEK_OF_YEAR) to an extended year in the case
* where YEAR, EXTENDED_YEAR are not set. * where YEAR, EXTENDED_YEAR are not set.
* The Calendar implementation assumes yearWoy is in extended gregorian form * The Calendar implementation assumes yearWoy is in extended gregorian form
* @internal * @internal
* @return the extended year, UCAL_EXTENDED_YEAR * @return the extended year, UCAL_EXTENDED_YEAR
*/ */
virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, in t32_t woy); virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, in t32_t woy);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Compute the Julian day from fields. Will determine whether to use * Compute the Julian day from fields. Will determine whether to use
* the JULIAN_DAY field directly, or other fields. * the JULIAN_DAY field directly, or other fields.
* @return the julian day * @return the julian day
* @internal * @internal
*/ */
int32_t computeJulianDay(); int32_t computeJulianDay();
/** /**
* Compute the milliseconds in the day from the fields. This is a * Compute the milliseconds in the day from the fields. This is a
skipping to change at line 1620 skipping to change at line 1736
* field value. This field will NOT be examined; it only determines * field value. This field will NOT be examined; it only determines
* the return value if the other fields in the line are the newest. * the return value if the other fields in the line are the newest.
* *
* <p>If all lines of a group contain at least one unset field, then no * <p>If all lines of a group contain at least one unset field, then no
* line will match, and the group as a whole will fail to match. In * line will match, and the group as a whole will fail to match. In
* that case, the next group will be processed. If all groups fail to * that case, the next group will be processed. If all groups fail to
* match, then UCAL_FIELD_COUNT is returned. * match, then UCAL_FIELD_COUNT is returned.
* @internal * @internal
*/ */
UCalendarDateFields resolveFields(const UFieldResolutionTable *preceden ceTable); UCalendarDateFields resolveFields(const UFieldResolutionTable *preceden ceTable);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* @internal * @internal
*/ */
virtual const UFieldResolutionTable* getFieldResolutionTable() const; virtual const UFieldResolutionTable* getFieldResolutionTable() const;
#ifndef U_HIDE_INTERNAL_API
/** /**
* Return the field that is newer, either defaultField, or * Return the field that is newer, either defaultField, or
* alternateField. If neither is newer or neither is set, return defau ltField. * alternateField. If neither is newer or neither is set, return defau ltField.
* @internal * @internal
*/ */
UCalendarDateFields newerField(UCalendarDateFields defaultField, UCalen darDateFields alternateField) const; UCalendarDateFields newerField(UCalendarDateFields defaultField, UCalen darDateFields alternateField) const;
#endif /* U_HIDE_INTERNAL_API */
private: private:
/** /**
* Helper function for calculating limits by trial and error * Helper function for calculating limits by trial and error
* @param field The field being investigated * @param field The field being investigated
* @param startValue starting (least max) value of field * @param startValue starting (least max) value of field
* @param endValue ending (greatest max) value of field * @param endValue ending (greatest max) value of field
* @param status return type * @param status return type
* @internal * @internal
*/ */
skipping to change at line 1751 skipping to change at line 1870
* <p>In addition, subclasses should compute any subclass-specific * <p>In addition, subclasses should compute any subclass-specific
* fields, that is, fields from BASE_FIELD_COUNT to * fields, that is, fields from BASE_FIELD_COUNT to
* getFieldCount() - 1. * getFieldCount() - 1.
* *
* <p>The default implementation in <code>Calendar</code> implements * <p>The default implementation in <code>Calendar</code> implements
* a pure proleptic Gregorian calendar. * a pure proleptic Gregorian calendar.
* @internal * @internal
*/ */
virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) ; virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) ;
#ifndef U_HIDE_INTERNAL_API
/** /**
* Return the extended year on the Gregorian calendar as computed by * Return the extended year on the Gregorian calendar as computed by
* <code>computeGregorianFields()</code>. * <code>computeGregorianFields()</code>.
* @internal * @internal
*/ */
int32_t getGregorianYear() const { int32_t getGregorianYear() const {
return fGregorianYear; return fGregorianYear;
} }
/** /**
skipping to change at line 1786 skipping to change at line 1906
} }
/** /**
* Return the day of month (1-based) on the Gregorian calendar as * Return the day of month (1-based) on the Gregorian calendar as
* computed by <code>computeGregorianFields()</code>. * computed by <code>computeGregorianFields()</code>.
* @internal * @internal
*/ */
int32_t getGregorianDayOfMonth() const { int32_t getGregorianDayOfMonth() const {
return fGregorianDayOfMonth; return fGregorianDayOfMonth;
} }
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Called by computeJulianDay. Returns the default month (0-based) for the year, * Called by computeJulianDay. Returns the default month (0-based) for the year,
* taking year and era into account. Defaults to 0 for Gregorian, whic h doesn't care. * taking year and era into account. Defaults to 0 for Gregorian, whic h doesn't care.
* @param eyear The extended year * @param eyear The extended year
* @internal * @internal
*/ */
virtual int32_t getDefaultMonthInYear(int32_t eyear) ; virtual int32_t getDefaultMonthInYear(int32_t eyear) ;
/** /**
skipping to change at line 1885 skipping to change at line 2006
* *
* @return The week number (one-based), or zero if the day falls b efore * @return The week number (one-based), or zero if the day falls b efore
* the first week because * the first week because
* {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirst Week} * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirst Week}
* is more than one. * is more than one.
* *
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t day OfWeek); int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t day OfWeek);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Return the week number of a day, within a period. This may be the we ek number in * Return the week number of a day, within a period. This may be the we ek number in
* a year, or the week number in a month. Usually this will be a value >= 1, but if * a year, or the week number in a month. Usually this will be a value >= 1, but if
* some initial days of the period are excluded from week 1, because * some initial days of the period are excluded from week 1, because
* {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is > 1, * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is > 1,
* then the week number will be zero for those * then the week number will be zero for those
* initial days. This method requires the day of week for the given dat e in order to * initial days. This method requires the day of week for the given dat e in order to
* determine the result. * determine the result.
* <p> * <p>
* <b>Subclassing:</b> * <b>Subclassing:</b>
skipping to change at line 1922 skipping to change at line 2044
* is more than one. * is more than one.
* @internal * @internal
*/ */
inline int32_t weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek); inline int32_t weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek);
/** /**
* returns the local DOW, valid range 0..6 * returns the local DOW, valid range 0..6
* @internal * @internal
*/ */
int32_t getLocalDOW(); int32_t getLocalDOW();
#endif /* U_HIDE_INTERNAL_API */
private: private:
/** /**
* The next available value for fStamp[] * The next available value for fStamp[]
*/ */
int32_t fNextStamp;// = MINIMUM_USER_STAMP; int32_t fNextStamp;// = MINIMUM_USER_STAMP;
/** /**
* Recalculates the time stamp array (fStamp). * Recalculates the time stamp array (fStamp).
skipping to change at line 1953 skipping to change at line 2076
*/ */
UBool fLenient; UBool fLenient;
/** /**
* Time zone affects the time calculation done by Calendar. Calendar su bclasses use * Time zone affects the time calculation done by Calendar. Calendar su bclasses use
* the time zone data to produce the local time. * the time zone data to produce the local time.
*/ */
TimeZone* fZone; TimeZone* fZone;
/** /**
* Option for rpeated wall time
* @see #setRepeatedWallTimeOption
*/
UCalendarWallTimeOption fRepeatedWallTime;
/**
* Option for skipped wall time
* @see #setSkippedWallTimeOption
*/
UCalendarWallTimeOption fSkippedWallTime;
/**
* Both firstDayOfWeek and minimalDaysInFirstWeek are locale-dependent. They are * Both firstDayOfWeek and minimalDaysInFirstWeek are locale-dependent. They are
* used to figure out the week count for a specific date for a given lo cale. These * used to figure out the week count for a specific date for a given lo cale. These
* must be set when a Calendar is constructed. For example, in US local e, * must be set when a Calendar is constructed. For example, in US local e,
* firstDayOfWeek is SUNDAY; minimalDaysInFirstWeek is 1. They are used to figure * firstDayOfWeek is SUNDAY; minimalDaysInFirstWeek is 1. They are used to figure
* out the week count for a specific date for a given locale. These mus t be set when * out the week count for a specific date for a given locale. These mus t be set when
* a Calendar is constructed. * a Calendar is constructed.
*/ */
UCalendarDaysOfWeek fFirstDayOfWeek; UCalendarDaysOfWeek fFirstDayOfWeek;
uint8_t fMinimalDaysInFirstWeek; uint8_t fMinimalDaysInFirstWeek;
UCalendarDaysOfWeek fWeekendOnset; UCalendarDaysOfWeek fWeekendOnset;
skipping to change at line 2094 skipping to change at line 2229
* Validate a single field of this calendar given its minimum and * Validate a single field of this calendar given its minimum and
* maximum allowed value. If the field is out of range, * maximum allowed value. If the field is out of range,
* <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may * <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may
* use this method in their implementation of {@link * use this method in their implementation of {@link
* #validateField(int, int&)}. * #validateField(int, int&)}.
* @internal * @internal
*/ */
void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status); void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status);
protected: protected:
#ifndef U_HIDE_INTERNAL_API
/** /**
* Convert a quasi Julian date to the day of the week. The Julian date used here is * Convert a quasi Julian date to the day of the week. The Julian date used here is
* not a true Julian date, since it is measured from midnight, not noon . Return * not a true Julian date, since it is measured from midnight, not noon . Return
* value is one-based. * value is one-based.
* *
* @param julian The given Julian date number. * @param julian The given Julian date number.
* @return Day number from 1..7 (SUN..SAT). * @return Day number from 1..7 (SUN..SAT).
* @internal * @internal
*/ */
static uint8_t julianDayToDayOfWeek(double julian); static uint8_t julianDayToDayOfWeek(double julian);
#endif /* U_HIDE_INTERNAL_API */
private: private:
char validLocale[ULOC_FULLNAME_CAPACITY]; char validLocale[ULOC_FULLNAME_CAPACITY];
char actualLocale[ULOC_FULLNAME_CAPACITY]; char actualLocale[ULOC_FULLNAME_CAPACITY];
public: public:
#if !UCONFIG_NO_SERVICE #if !UCONFIG_NO_SERVICE
/** /**
* INTERNAL FOR 2.6 -- Registration. * INTERNAL FOR 2.6 -- Registration.
*/ */
#ifndef U_HIDE_INTERNAL_API
/** /**
* Return a StringEnumeration over the locales available at the time of the call, * Return a StringEnumeration over the locales available at the time of the call,
* including registered locales. * including registered locales.
* @return a StringEnumeration over the locales available at the time o f the call * @return a StringEnumeration over the locales available at the time o f the call
* @internal * @internal
*/ */
static StringEnumeration* getAvailableLocales(void); static StringEnumeration* getAvailableLocales(void);
/** /**
* Register a new Calendar factory. The factory will be adopted. * Register a new Calendar factory. The factory will be adopted.
skipping to change at line 2144 skipping to change at line 2282
* Unregister a previously-registered CalendarFactory using the key ret urned from the * Unregister a previously-registered CalendarFactory using the key ret urned from the
* register call. Key becomes invalid after a successful call and shou ld not be used again. * register call. Key becomes invalid after a successful call and shou ld not be used again.
* The CalendarFactory corresponding to the key will be deleted. * The CalendarFactory corresponding to the key will be deleted.
* INTERNAL in 2.6 * INTERNAL in 2.6
* @param key the registry key returned by a previous call to registerF actory * @param key the registry key returned by a previous call to registerF actory
* @param status the in/out status code, no special meanings are assign ed * @param status the in/out status code, no special meanings are assign ed
* @return TRUE if the factory for the key was successfully unregistere d * @return TRUE if the factory for the key was successfully unregistere d
* @internal * @internal
*/ */
static UBool unregister(URegistryKey key, UErrorCode& status); static UBool unregister(URegistryKey key, UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Multiple Calendar Implementation * Multiple Calendar Implementation
* @internal * @internal
*/ */
friend class CalendarFactory; friend class CalendarFactory;
/** /**
* Multiple Calendar Implementation * Multiple Calendar Implementation
* @internal * @internal
skipping to change at line 2189 skipping to change at line 2328
virtual int32_t defaultCenturyStartYear() const = 0; virtual int32_t defaultCenturyStartYear() const = 0;
/** Get the locale for this calendar object. You can choose between val id and actual locale. /** Get the locale for this calendar object. You can choose between val id and actual locale.
* @param type type of the locale we're looking for (valid or actual) * @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation * @param status error code for the operation
* @return the locale * @return the locale
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const; Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const;
#ifndef U_HIDE_INTERNAL_API
/** Get the locale for this calendar object. You can choose between val id and actual locale. /** Get the locale for this calendar object. You can choose between val id and actual locale.
* @param type type of the locale we're looking for (valid or actual) * @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation * @param status error code for the operation
* @return the locale * @return the locale
* @internal * @internal
*/ */
const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) co nst; const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) co nst;
#endif /* U_HIDE_INTERNAL_API */
private:
/**
* Cast TimeZone used by this object to BasicTimeZone, or NULL if the T
imeZone
* is not an instance of BasicTimeZone.
*/
BasicTimeZone* getBasicTimeZone() const;
}; };
// ------------------------------------- // -------------------------------------
inline Calendar* inline Calendar*
Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode) Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode)
{ {
// since the Locale isn't specified, use the default locale // since the Locale isn't specified, use the default locale
return createInstance(zone, Locale::getDefault(), errorCode); return createInstance(zone, Locale::getDefault(), errorCode);
} }
// ------------------------------------- // -------------------------------------
inline void inline void
Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status) Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status)
{ {
roll(field, (int32_t)(up ? +1 : -1), status); roll(field, (int32_t)(up ? +1 : -1), status);
} }
#ifndef U_HIDE_DEPRECATED_API
inline void inline void
Calendar::roll(EDateFields field, UBool up, UErrorCode& status) Calendar::roll(EDateFields field, UBool up, UErrorCode& status)
{ {
roll((UCalendarDateFields) field, up, status); roll((UCalendarDateFields) field, up, status);
} }
#endif
// ------------------------------------- // -------------------------------------
/** /**
* Fast method for subclasses. The caller must maintain fUserSetDSTOffset and * Fast method for subclasses. The caller must maintain fUserSetDSTOffset and
* fUserSetZoneOffset, as well as the isSet[] array. * fUserSetZoneOffset, as well as the isSet[] array.
*/ */
inline void inline void
Calendar::internalSet(UCalendarDateFields field, int32_t value) Calendar::internalSet(UCalendarDateFields field, int32_t value)
{ {
fFields[field] = value; fFields[field] = value;
fStamp[field] = kInternallySet; fStamp[field] = kInternallySet;
fIsSet[field] = TRUE; // Remove later fIsSet[field] = TRUE; // Remove later
} }
#ifndef U_HIDE_INTERNAL_API
inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek ) inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek )
{ {
return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek); return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek);
} }
#endif
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _CALENDAR #endif // _CALENDAR
 End of changes. 56 change blocks. 
13 lines changed or deleted 184 lines changed or added


 caniter.h   caniter.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 1996-2010, International Business Machines Corporation and * Copyright (C) 1996-2011, International Business Machines Corporation and
* * others. All Rights Reserved.
* others. All Rights Reserved.
*
************************************************************************** ***** ************************************************************************** *****
*/ */
#ifndef CANITER_H #ifndef CANITER_H
#define CANITER_H #define CANITER_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_NORMALIZATION #if !UCONFIG_NO_NORMALIZATION
skipping to change at line 119 skipping to change at line 119
/** /**
* Set a new source for this iterator. Allows object reuse. * Set a new source for this iterator. Allows object reuse.
* @param newSource the source string to iterate against. This allo ws the same iterator to be used * @param newSource the source string to iterate against. This allo ws the same iterator to be used
* while changing the source string, saving object creation. * while changing the source string, saving object creation.
* @param status Fill-in parameter which receives the status of this operation. * @param status Fill-in parameter which receives the status of this operation.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
void setSource(const UnicodeString &newSource, UErrorCode &status); void setSource(const UnicodeString &newSource, UErrorCode &status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Dumb recursive implementation of permutation. * Dumb recursive implementation of permutation.
* TODO: optimize * TODO: optimize
* @param source the string to find permutations for * @param source the string to find permutations for
* @param skipZeros determine if skip zeros * @param skipZeros determine if skip zeros
* @param result the results in a set. * @param result the results in a set.
* @param status Fill-in parameter which receives the status of t his operation. * @param status Fill-in parameter which receives the status of t his operation.
* @internal * @internal
*/ */
static void U_EXPORT2 permute(UnicodeString &source, UBool skipZeros, H ashtable *result, UErrorCode &status); static void U_EXPORT2 permute(UnicodeString &source, UBool skipZeros, H ashtable *result, UErrorCode &status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* ICU "poor man's RTTI", returns a UClassID for this class. * ICU "poor man's RTTI", returns a UClassID for this class.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
static UClassID U_EXPORT2 getStaticClassID(); static UClassID U_EXPORT2 getStaticClassID();
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added


 chariter.h   chariter.h 
/* /*
******************************************************************** ********************************************************************
* *
* Copyright (C) 1997-2005, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
******************************************************************** ********************************************************************
*/ */
#ifndef CHARITER_H #ifndef CHARITER_H
#define CHARITER_H #define CHARITER_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uobject.h" #include "unicode/uobject.h"
skipping to change at line 365 skipping to change at line 365
*/ */
class U_COMMON_API CharacterIterator : public ForwardCharacterIterator { class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
public: public:
/** /**
* Origin enumeration for the move() and move32() functions. * Origin enumeration for the move() and move32() functions.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
enum EOrigin { kStart, kCurrent, kEnd }; enum EOrigin { kStart, kCurrent, kEnd };
/** /**
* Destructor.
* @stable ICU 2.0
*/
virtual ~CharacterIterator();
/**
* Returns a pointer to a new CharacterIterator of the same * Returns a pointer to a new CharacterIterator of the same
* concrete class as this one, and referring to the same * concrete class as this one, and referring to the same
* character in the same text-storage object as this one. The * character in the same text-storage object as this one. The
* caller is responsible for deleting the new clone. * caller is responsible for deleting the new clone.
* @return a pointer to a new CharacterIterator * @return a pointer to a new CharacterIterator
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual CharacterIterator* clone(void) const = 0; virtual CharacterIterator* clone(void) const = 0;
/** /**
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added


 choicfmt.h   choicfmt.h 
skipping to change at line 33 skipping to change at line 33
#define CHOICFMT_H #define CHOICFMT_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: Choice Format. * \brief C++ API: Choice Format.
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DEPRECATED_API
#include "unicode/fieldpos.h" #include "unicode/fieldpos.h"
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/messagepattern.h" #include "unicode/messagepattern.h"
#include "unicode/numfmt.h" #include "unicode/numfmt.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class MessageFormat; class MessageFormat;
skipping to change at line 167 skipping to change at line 168
* << buf << endl; * << buf << endl;
* } * }
* cout << endl; * cout << endl;
* return 0; * return 0;
* } * }
* \endcode * \endcode
* *
* <p><em>User subclasses are not supported.</em> While clients may write * <p><em>User subclasses are not supported.</em> While clients may write
* subclasses, such code will not necessarily work and will not be * subclasses, such code will not necessarily work and will not be
* guaranteed to work stably from release to release. * guaranteed to work stably from release to release.
*
* @deprecated ICU 49 Use MessageFormat instead, with plural and select arg
uments.
*/ */
class U_I18N_API ChoiceFormat: public NumberFormat { class U_I18N_API ChoiceFormat: public NumberFormat {
public: public:
/** /**
* Constructs a new ChoiceFormat from the pattern string. * Constructs a new ChoiceFormat from the pattern string.
* *
* @param pattern Pattern used to construct object. * @param pattern Pattern used to construct object.
* @param status Output param to receive success code. If the * @param status Output param to receive success code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
ChoiceFormat(const UnicodeString& pattern, ChoiceFormat(const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
/** /**
* Constructs a new ChoiceFormat with the given limits and message stri ngs. * Constructs a new ChoiceFormat with the given limits and message stri ngs.
* All closure flags default to <code>FALSE</code>, * All closure flags default to <code>FALSE</code>,
* equivalent to <code>less_than_or_equal</code> separators. * equivalent to <code>less_than_or_equal</code> separators.
* *
* Copies the limits and formats instead of adopting them. * Copies the limits and formats instead of adopting them.
* *
* @param limits Array of limit values. * @param limits Array of limit values.
* @param formats Array of formats. * @param formats Array of formats.
* @param count Size of 'limits' and 'formats' arrays. * @param count Size of 'limits' and 'formats' arrays.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
ChoiceFormat(const double* limits, ChoiceFormat(const double* limits,
const UnicodeString* formats, const UnicodeString* formats,
int32_t count ); int32_t count );
/** /**
* Constructs a new ChoiceFormat with the given limits, closure flags a nd message strings. * Constructs a new ChoiceFormat with the given limits, closure flags a nd message strings.
* *
* Copies the limits and formats instead of adopting them. * Copies the limits and formats instead of adopting them.
* *
* @param limits Array of limit values * @param limits Array of limit values
* @param closures Array of booleans specifying whether each * @param closures Array of booleans specifying whether each
* element of 'limits' is open or closed. If FALSE, then the * element of 'limits' is open or closed. If FALSE, then the
* corresponding limit number is a member of its range. * corresponding limit number is a member of its range.
* If TRUE, then the limit number belongs to the previous range it. * If TRUE, then the limit number belongs to the previous range it.
* @param formats Array of formats * @param formats Array of formats
* @param count Size of 'limits', 'closures', and 'formats' arrays * @param count Size of 'limits', 'closures', and 'formats' arrays
* @stable ICU 2.4 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
ChoiceFormat(const double* limits, ChoiceFormat(const double* limits,
const UBool* closures, const UBool* closures,
const UnicodeString* formats, const UnicodeString* formats,
int32_t count); int32_t count);
/** /**
* Copy constructor. * Copy constructor.
* *
* @param that ChoiceFormat object to be copied from * @param that ChoiceFormat object to be copied from
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
ChoiceFormat(const ChoiceFormat& that); ChoiceFormat(const ChoiceFormat& that);
/** /**
* Assignment operator. * Assignment operator.
* *
* @param that ChoiceFormat object to be copied * @param that ChoiceFormat object to be copied
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
const ChoiceFormat& operator=(const ChoiceFormat& that); const ChoiceFormat& operator=(const ChoiceFormat& that);
/** /**
* Destructor. * Destructor.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual ~ChoiceFormat(); virtual ~ChoiceFormat();
/** /**
* Clones this Format object. The caller owns the * Clones this Format object. The caller owns the
* result and must delete it when done. * result and must delete it when done.
* *
* @return a copy of this object * @return a copy of this object
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual Format* clone(void) const; virtual Format* clone(void) const;
/** /**
* Returns true if the given Format objects are semantically equal. * Returns true if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal. * Objects of different subclasses are considered unequal.
* *
* @param other ChoiceFormat object to be compared * @param other ChoiceFormat object to be compared
* @return true if other is the same as this. * @return true if other is the same as this.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual UBool operator==(const Format& other) const; virtual UBool operator==(const Format& other) const;
/** /**
* Sets the pattern. * Sets the pattern.
* @param pattern The pattern to be applied. * @param pattern The pattern to be applied.
* @param status Output param set to success/failure code on * @param status Output param set to success/failure code on
* exit. If the pattern is invalid, this will be * exit. If the pattern is invalid, this will be
* set to a failure result. * set to a failure result.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual void applyPattern(const UnicodeString& pattern, virtual void applyPattern(const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
/** /**
* Sets the pattern. * Sets the pattern.
* @param pattern The pattern to be applied. * @param pattern The pattern to be applied.
* @param parseError Struct to receive information on position * @param parseError Struct to receive information on position
* of error if an error is encountered * of error if an error is encountered
* @param status Output param set to success/failure code on * @param status Output param set to success/failure code on
* exit. If the pattern is invalid, this will be * exit. If the pattern is invalid, this will be
* set to a failure result. * set to a failure result.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual void applyPattern(const UnicodeString& pattern, virtual void applyPattern(const UnicodeString& pattern,
UParseError& parseError, UParseError& parseError,
UErrorCode& status); UErrorCode& status);
/** /**
* Gets the pattern. * Gets the pattern.
* *
* @param pattern Output param which will receive the pattern * @param pattern Output param which will receive the pattern
* Previous contents are deleted. * Previous contents are deleted.
* @return A reference to 'pattern' * @return A reference to 'pattern'
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual UnicodeString& toPattern(UnicodeString &pattern) const; virtual UnicodeString& toPattern(UnicodeString &pattern) const;
/** /**
* Sets the choices to be used in formatting. * Sets the choices to be used in formatting.
* For details see the constructor with the same parameter list. * For details see the constructor with the same parameter list.
* *
* @param limitsToCopy Contains the top value that you want * @param limitsToCopy Contains the top value that you want
* parsed with that format,and should be in * parsed with that format,and should be in
* ascending sorted order. When formatting X, * ascending sorted order. When formatting X,
* the choice will be the i, where limit[i] * the choice will be the i, where limit[i]
* &lt;= X &lt; limit[i+1]. * &lt;= X &lt; limit[i+1].
* @param formatsToCopy The format strings you want to use for each limit. * @param formatsToCopy The format strings you want to use for each limit.
* @param count The size of the above arrays. * @param count The size of the above arrays.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual void setChoices(const double* limitsToCopy, virtual void setChoices(const double* limitsToCopy,
const UnicodeString* formatsToCopy, const UnicodeString* formatsToCopy,
int32_t count ); int32_t count );
/** /**
* Sets the choices to be used in formatting. * Sets the choices to be used in formatting.
* For details see the constructor with the same parameter list. * For details see the constructor with the same parameter list.
* *
* @param limits Array of limits * @param limits Array of limits
* @param closures Array of limit booleans * @param closures Array of limit booleans
* @param formats Array of format string * @param formats Array of format string
* @param count The size of the above arrays * @param count The size of the above arrays
* @stable ICU 2.4 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual void setChoices(const double* limits, virtual void setChoices(const double* limits,
const UBool* closures, const UBool* closures,
const UnicodeString* formats, const UnicodeString* formats,
int32_t count); int32_t count);
/** /**
* Returns NULL and 0. * Returns NULL and 0.
* Before ICU 4.8, this used to return the choice limits array. * Before ICU 4.8, this used to return the choice limits array.
* *
skipping to change at line 364 skipping to change at line 367
/** /**
* Formats a double number using this object's choices. * Formats a double number using this object's choices.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual UnicodeString& format(double number, virtual UnicodeString& format(double number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Formats an int32_t number using this object's choices. * Formats an int32_t number using this object's choices.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual UnicodeString& format(int32_t number, virtual UnicodeString& format(int32_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Formats an int64_t number using this object's choices. * Formats an int64_t number using this object's choices.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.8 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual UnicodeString& format(int64_t number, virtual UnicodeString& format(int64_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Formats an array of objects using this object's choices. * Formats an array of objects using this object's choices.
* *
* @param objs The array of objects to be formatted. * @param objs The array of objects to be formatted.
* @param cnt The size of objs. * @param cnt The size of objs.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @param success Output param set to success/failure code on * @param success Output param set to success/failure code on
* exit. * exit.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual UnicodeString& format(const Formattable* objs, virtual UnicodeString& format(const Formattable* objs,
int32_t cnt, int32_t cnt,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos, FieldPosition& pos,
UErrorCode& success) const; UErrorCode& success) const;
/** /**
* Formats an object using this object's choices. * Formats an object using this object's choices.
* *
* *
* @param obj The object to be formatted. * @param obj The object to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @param status Output param set to success/failure code on * @param status Output param set to success/failure code on
* exit. * exit.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual UnicodeString& format(const Formattable& obj, virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos, FieldPosition& pos,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Redeclared NumberFormat method. * Redeclared NumberFormat method.
* *
* @param obj The object to be formatted. * @param obj The object to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param status Output param set to success/failure code on * @param status Output param set to success/failure code on
* exit. * exit.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
UnicodeString& format(const Formattable& obj, UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Redeclared NumberFormat method. * Redeclared NumberFormat method.
* Formats a double number. These methods call the NumberFormat * Formats a double number. These methods call the NumberFormat
* pure virtual format() methods with the default FieldPosition. * pure virtual format() methods with the default FieldPosition.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
UnicodeString& format( double number, UnicodeString& format( double number,
UnicodeString& appendTo) const; UnicodeString& appendTo) const;
/** /**
* Redeclared NumberFormat method. * Redeclared NumberFormat method.
* Formats an int32_t number. These methods call the NumberFormat * Formats an int32_t number. These methods call the NumberFormat
* pure virtual format() methods with the default FieldPosition. * pure virtual format() methods with the default FieldPosition.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
UnicodeString& format( int32_t number, UnicodeString& format( int32_t number,
UnicodeString& appendTo) const; UnicodeString& appendTo) const;
/** /**
* Looks for the longest match of any message string on the input text a nd, * Looks for the longest match of any message string on the input text a nd,
* if there is a match, sets the result object to the corresponding rang e's number. * if there is a match, sets the result object to the corresponding rang e's number.
* *
* If no string matches, then the parsePosition is unchanged. * If no string matches, then the parsePosition is unchanged.
* *
* @param text The text to be parsed. * @param text The text to be parsed.
* @param result Formattable to be set to the parse result. * @param result Formattable to be set to the parse result.
* If parse fails, return contents are undefined. * If parse fails, return contents are undefined.
* @param parsePosition The position to start parsing at on input. * @param parsePosition The position to start parsing at on input.
* On output, moved to after the last successfully * On output, moved to after the last successfully
* parse character. On parse failure, does not cha nge. * parse character. On parse failure, does not cha nge.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual void parse(const UnicodeString& text, virtual void parse(const UnicodeString& text,
Formattable& result, Formattable& result,
ParsePosition& parsePosition) const; ParsePosition& parsePosition) const;
/** /**
* Looks for the longest match of any message string on the input text and, * Looks for the longest match of any message string on the input text and,
* if there is a match, sets the result object to the corresponding ran ge's number. * if there is a match, sets the result object to the corresponding ran ge's number.
* *
* If no string matches, then the UErrorCode is set to U_INVALID_FORMAT _ERROR. * If no string matches, then the UErrorCode is set to U_INVALID_FORMAT _ERROR.
* *
* @param text The text to be parsed. * @param text The text to be parsed.
* @param result Formattable to be set to the parse result. * @param result Formattable to be set to the parse result.
* If parse fails, return contents are undefined. * If parse fails, return contents are undefined.
* @param status Output param with the formatted string. * @param status Output param with the formatted string.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual void parse(const UnicodeString& text, virtual void parse(const UnicodeString& text,
Formattable& result, Formattable& result,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's RTTI". * Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's RTTI".
* *
* @return The class ID for this object. All objects of a * @return The class ID for this object. All objects of a
* given class have the same class ID. Objects of * given class have the same class ID. Objects of
* other classes have different class IDs. * other classes have different class IDs.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
virtual UClassID getDynamicClassID(void) const; virtual UClassID getDynamicClassID(void) const;
/** /**
* Returns the class ID for this class. This is useful only for * Returns the class ID for this class. This is useful only for
* comparing to a return value from getDynamicClassID(). For example: * comparing to a return value from getDynamicClassID(). For example:
* <pre> * <pre>
* . Base* polymorphic_pointer = createPolymorphicObject(); * . Base* polymorphic_pointer = createPolymorphicObject();
* . if (polymorphic_pointer->getDynamicClassID() == * . if (polymorphic_pointer->getDynamicClassID() ==
* . Derived::getStaticClassID()) ... * . Derived::getStaticClassID()) ...
* </pre> * </pre>
* @return The class ID for all objects of this class. * @return The class ID for all objects of this class.
* @stable ICU 2.0 * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
private: private:
/** /**
* Converts a double value to a string. * Converts a double value to a string.
* @param value the double number to be converted. * @param value the double number to be converted.
* @param string the result string. * @param string the result string.
* @return the converted string. * @return the converted string.
*/ */
skipping to change at line 557 skipping to change at line 560
/** /**
* Construct a new ChoiceFormat with the limits and the corresponding f ormats * Construct a new ChoiceFormat with the limits and the corresponding f ormats
* based on the pattern. * based on the pattern.
* *
* @param newPattern Pattern used to construct object. * @param newPattern Pattern used to construct object.
* @param parseError Struct to receive information on position * @param parseError Struct to receive information on position
* of error if an error is encountered. * of error if an error is encountered.
* @param status Output param to receive success code. If the * @param status Output param to receive success code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0
*/ */
ChoiceFormat(const UnicodeString& newPattern, ChoiceFormat(const UnicodeString& newPattern,
UParseError& parseError, UParseError& parseError,
UErrorCode& status); UErrorCode& status);
friend class MessageFormat; friend class MessageFormat;
virtual void setChoices(const double* limits, virtual void setChoices(const double* limits,
const UBool* closures, const UBool* closures,
const UnicodeString* formats, const UnicodeString* formats,
skipping to change at line 680 skipping to change at line 682
return NumberFormat::format(number, appendTo); return NumberFormat::format(number, appendTo);
} }
inline UnicodeString& inline UnicodeString&
ChoiceFormat::format(int32_t number, ChoiceFormat::format(int32_t number,
UnicodeString& appendTo) const { UnicodeString& appendTo) const {
return NumberFormat::format(number, appendTo); return NumberFormat::format(number, appendTo);
} }
U_NAMESPACE_END U_NAMESPACE_END
#endif // U_HIDE_DEPRECATED_API
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _CHOICFMT #endif // CHOICFMT_H
//eof //eof
 End of changes. 30 change blocks. 
27 lines changed or deleted 31 lines changed or added


 coll.h   coll.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 1996-2011, International Business Machines * * Copyright (C) 1996-2012, International Business Machines *
* Corporation and others. All Rights Reserved. * * Corporation and others. All Rights Reserved. *
*************************************************************************** *** *************************************************************************** ***
*/ */
/** /**
* \file * \file
* \brief C++ API: Collation Service. * \brief C++ API: Collation Service.
*/ */
/** /**
skipping to change at line 611 skipping to change at line 611
* Retrieves the reordering codes for this collator. * Retrieves the reordering codes for this collator.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
* will only return the length of the result without writing any of th e result string (pre-flighting). * will only return the length of the result without writing any of th e result string (pre-flighting).
* @param status A reference to an error code value, which must not ind icate * @param status A reference to an error code value, which must not ind icate
* a failure before the function call. * a failure before the function call.
* @return The length of the script ordering array. * @return The length of the script ordering array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see Collator#getEquivalentReorderCodes * @see Collator#getEquivalentReorderCodes
* @see Collator#setReorderCodes * @see Collator#setReorderCodes
* @draft ICU 4.8 * @see UScriptCode
* @see UColReorderCode
* @stable ICU 4.8
*/ */
virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest, virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Sets the ordering of scripts for this collator. * Sets the ordering of scripts for this collator.
*
* <p>The reordering codes are a combination of script codes and reorde
r codes.
* @param reorderCodes An array of script codes in the new order. This can be NULL if the * @param reorderCodes An array of script codes in the new order. This can be NULL if the
* length is also set to 0. An empty array will clear any reordering co des on the collator. * length is also set to 0. An empty array will clear any reordering co des on the collator.
* @param reorderCodesLength The length of reorderCodes. * @param reorderCodesLength The length of reorderCodes.
* @param status error code
* @see Collator#getReorderCodes * @see Collator#getReorderCodes
* @see Collator#getEquivalentReorderCodes * @see Collator#getEquivalentReorderCodes
* @param status error code * @see UScriptCode
* @draft ICU 4.8 * @see UColReorderCode
* @stable ICU 4.8
*/ */
virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes, virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength, int32_t reorderCodesLength,
UErrorCode& status) ; UErrorCode& status) ;
/** /**
* Retrieves the reorder codes that are grouped with the given reorder code. Some reorder * Retrieves the reorder codes that are grouped with the given reorder code. Some reorder
* codes will be grouped and must reorder together. * codes will be grouped and must reorder together.
* @param reorderCode The reorder code to determine equivalence for. * @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script equivalene reordering codes. * @param dest The array to fill with the script equivalene reordering codes.
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the
* function will only return the length of the result without writing a ny of the result * function will only return the length of the result without writing a ny of the result
* string (pre-flighting). * string (pre-flighting).
* @param status A reference to an error code value, which must not ind icate * @param status A reference to an error code value, which must not ind icate
* a failure before the function call. * a failure before the function call.
* @return The length of the of the reordering code equivalence array. * @return The length of the of the reordering code equivalence array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see Collator#getReorderCodes * @see Collator#getReorderCodes
* @see Collator#setReorderCodes * @see Collator#setReorderCodes
* @draft ICU 4.8 * @see UScriptCode
* @see UColReorderCode
* @stable ICU 4.8
*/ */
static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode, static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
int32_t* dest, int32_t* dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode& status); UErrorCode& status);
/** /**
* Get name of the object for the desired Locale, in the desired langau ge * Get name of the object for the desired Locale, in the desired langau ge
* @param objectLocale must be from getAvailableLocales * @param objectLocale must be from getAvailableLocales
* @param displayLocale specifies the desired locale for output * @param displayLocale specifies the desired locale for output
skipping to change at line 996 skipping to change at line 1004
/** /**
* Default constructor. * Default constructor.
* Constructor is different from the old default Collator constructor. * Constructor is different from the old default Collator constructor.
* The task for determing the default collation strength and normalizati on * The task for determing the default collation strength and normalizati on
* mode is left to the child class. * mode is left to the child class.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
Collator(); Collator();
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Constructor. * Constructor.
* Empty constructor, does not handle the arguments. * Empty constructor, does not handle the arguments.
* This constructor is done for backward compatibility with 1.7 and 1.8. * This constructor is done for backward compatibility with 1.7 and 1.8.
* The task for handling the argument collation strength and normalizati on * The task for handling the argument collation strength and normalizati on
* mode is left to the child class. * mode is left to the child class.
* @param collationStrength collation strength * @param collationStrength collation strength
* @param decompositionMode * @param decompositionMode
* @deprecated ICU 2.4. Subclasses should use the default constructor * @deprecated ICU 2.4. Subclasses should use the default constructor
* instead and handle the strength and normalization mode themselves. * instead and handle the strength and normalization mode themselves.
*/ */
Collator(UCollationStrength collationStrength, Collator(UCollationStrength collationStrength,
UNormalizationMode decompositionMode); UNormalizationMode decompositionMode);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Copy constructor. * Copy constructor.
* @param other Collator object to be copied from * @param other Collator object to be copied from
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
Collator(const Collator& other); Collator(const Collator& other);
// Collator protected methods ----------------------------------------- // Collator protected methods -----------------------------------------
skipping to change at line 1030 skipping to change at line 1040
* Used internally by registraton to define the requested and valid loca les. * Used internally by registraton to define the requested and valid loca les.
* @param requestedLocale the requested locale * @param requestedLocale the requested locale
* @param validLocale the valid locale * @param validLocale the valid locale
* @param actualLocale the actual locale * @param actualLocale the actual locale
* @internal * @internal
*/ */
virtual void setLocales(const Locale& requestedLocale, const Locale& va lidLocale, const Locale& actualLocale); virtual void setLocales(const Locale& requestedLocale, const Locale& va lidLocale, const Locale& actualLocale);
public: public:
#if !UCONFIG_NO_SERVICE #if !UCONFIG_NO_SERVICE
#ifndef U_HIDE_INTERNAL_API
/** /**
* used only by ucol_open, not for public use * used only by ucol_open, not for public use
* @internal * @internal
*/ */
static UCollator* createUCollator(const char* loc, UErrorCode* status); static UCollator* createUCollator(const char* loc, UErrorCode* status);
#endif /* U_HIDE_INTERNAL_API */
#endif #endif
/** Get the short definition string for a collator. This internal API h
arvests the collator's
* locale and the attribute set and produces a string that can be used
for opening
* a collator with the same properties using the ucol_openFromShortStr
ing API.
* This string will be normalized.
* The structure and the syntax of the string is defined in the "Namin
g collators"
* section of the users guide:
* http://icu-project.org/userguide/Collate_Concepts.html#Naming_Colla
tors
* This function supports preflighting.
*
* This is internal, and intended to be used with delegate converters.
*
* @param locale a locale that will appear as a collators locale in th
e resulting
* short string definition. If NULL, the locale will be
harvested
* from the collator.
* @param buffer space to hold the resulting string
* @param capacity capacity of the buffer
* @param status for returning errors. All the preflighting errors are
featured
* @return length of the resulting string
* @see ucol_openFromShortString
* @see ucol_normalizeShortDefinitionString
* @see ucol_getShortDefinitionString
* @internal
*/
virtual int32_t internalGetShortDefinitionString(const char *locale,
char *buffer,
int32_t capacity,
UErrorCode &status) co
nst;
private: private:
/** /**
* Assignment operator. Private for now. * Assignment operator. Private for now.
* @internal * @internal
*/ */
Collator& operator=(const Collator& other); Collator& operator=(const Collator& other);
friend class CFactory; friend class CFactory;
friend class SimpleCFactory; friend class SimpleCFactory;
friend class ICUCollatorFactory; friend class ICUCollatorFactory;
 End of changes. 11 change blocks. 
5 lines changed or deleted 55 lines changed or added


 colldata.h   colldata.h 
/* /*
************************************************************************** **** ************************************************************************** ****
* Copyright (C) 1996-2010, International Business Machines * * Copyright (C) 1996-2011, International Business Machines *
* Corporation and others. All Rights Reserved. * * Corporation and others. All Rights Reserved. *
************************************************************************** **** ************************************************************************** ****
*/ */
/** /**
* \file * \file
* \brief C++ API: Collation data used to compute minLengthInChars. * \brief C++ API: Collation data used to compute minLengthInChars.
* \internal * \internal
*/ */
skipping to change at line 26 skipping to change at line 26
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_COLLATION #if !UCONFIG_NO_COLLATION
#include "unicode/uobject.h" #include "unicode/uobject.h"
#include "unicode/ucol.h" #include "unicode/ucol.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
#ifndef U_HIDE_INTERNAL_API
/** /**
* The size of the internal buffer for the Collator's short description str ing. * The size of the internal buffer for the Collator's short description str ing.
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
#define KEY_BUFFER_SIZE 64 #define KEY_BUFFER_SIZE 64
/** /**
* The size of the internal CE buffer in a <code>CEList</code> object * The size of the internal CE buffer in a <code>CEList</code> object
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
skipping to change at line 253 skipping to change at line 254
UnicodeString *strings; UnicodeString *strings;
int32_t listMax; int32_t listMax;
int32_t listSize; int32_t listSize;
#ifdef INSTRUMENT_STRING_LIST #ifdef INSTRUMENT_STRING_LIST
static int32_t _lists; static int32_t _lists;
static int32_t _strings; static int32_t _strings;
static int32_t _histogram[101]; static int32_t _histogram[101];
#endif #endif
}; };
#endif /* U_HIDE_INTERNAL_API */
/* /*
* Forward references to internal classes. * Forward references to internal classes.
*/ */
class StringToCEsMap; class StringToCEsMap;
class CEToStringsMap; class CEToStringsMap;
class CollDataCache; class CollDataCache;
#ifndef U_HIDE_INTERNAL_API
/** /**
* CollData * CollData
* *
* This class holds the Collator-specific data needed to * This class holds the Collator-specific data needed to
* compute the length of the shortest string that can * compute the length of the shortest string that can
* generate a partcular list of CEs. * generate a partcular list of CEs.
* *
* <code>CollData</code> objects are quite expensive to compute. Because * <code>CollData</code> objects are quite expensive to compute. Because
* of this, they are cached. When you call <code>CollData::open</code> it * of this, they are cached. When you call <code>CollData::open</code> it
* returns a reference counted cached object. When you call <code>CollData: :close</code> * returns a reference counted cached object. When you call <code>CollData: :close</code>
skipping to change at line 447 skipping to change at line 450
char keyBuffer[KEY_BUFFER_SIZE]; char keyBuffer[KEY_BUFFER_SIZE];
char *key; char *key;
static CollDataCache *collDataCache; static CollDataCache *collDataCache;
uint32_t minHan; uint32_t minHan;
uint32_t maxHan; uint32_t maxHan;
uint32_t jamoLimits[4]; uint32_t jamoLimits[4];
}; };
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END U_NAMESPACE_END
#endif // #if !UCONFIG_NO_COLLATION #endif // #if !UCONFIG_NO_COLLATION
#endif // #ifndef COLL_DATA_H #endif // #ifndef COLL_DATA_H
 End of changes. 5 change blocks. 
1 lines changed or deleted 5 lines changed or added


 currpinf.h   currpinf.h 
skipping to change at line 21 skipping to change at line 21
/** /**
* \file * \file
* \brief C++ API: Currency Plural Information used by Decimal Format * \brief C++ API: Currency Plural Information used by Decimal Format
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/unistr.h" #include "unicode/unistr.h"
union UHashTok;
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class Locale; class Locale;
class PluralRules; class PluralRules;
class Hashtable; class Hashtable;
/** /**
* This class represents the information needed by * This class represents the information needed by
* DecimalFormat to format currency plural, * DecimalFormat to format currency plural,
* such as "3.00 US dollars" or "1.00 US dollar". * such as "3.00 US dollars" or "1.00 US dollar".
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 datefmt.h   datefmt.h 
/* /*
************************************************************************** ****** ************************************************************************** ******
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
************************************************************************** ****** ************************************************************************** ******
* *
* File DATEFMT.H * File DATEFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 04/01/97 aliu Added support for centuries. * 04/01/97 aliu Added support for centuries.
skipping to change at line 386 skipping to change at line 386
* Result is appended to existing contents. * Result is appended to existing contents.
* @param status Output param filled with success/failure status. * @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString& format(const Formattable& obj, UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Parse a date/time string. * Parse a date/time string. For example, a time text "07/10/96 4:5 PM,
PDT"
* will be parsed into a UDate that is equivalent to Date(837039928046)
.
* Parsing begins at the beginning of the string and proceeds as far as
* possible. Assuming no parse errors were encountered, this function
* doesn't return any information about how much of the string was cons
umed
* by the parsing. If you need that information, use the version of
* parse() that takes a ParsePosition.
* <P>
* By default, parsing is lenient: If the input is not in the form used
by
* this object's format method but can still be parsed as a date, then
the
* parse succeeds. Clients may insist on strict adherence to the format
by
* calling setLenient(false).
* @see DateFormat::setLenient(boolean)
* <P>
* Note that the normal date formats associated with some calendars - s
uch
* as the Chinese lunar calendar - do not specify enough fields to enab
le
* dates to be parsed unambiguously. In the case of the Chinese lunar
* calendar, while the year within the current 60-year cycle is specifi
ed,
* the number of such cycles since the start date of the calendar (in t
he
* ERA field of the Calendar object) is not normally part of the format
,
* and parsing may assume the wrong era. For cases such as this it is
* recommended that clients parse using the method
* parse(const UnicodeString&, Calendar& cal, ParsePosition&)
* with the Calendar passed in set to the current date, or to a date
* within the era/cycle that should be assumed if absent in the format.
* *
* @param text The string to be parsed into a UDate value. * @param text The date/time string to be parsed into a UDate valu e.
* @param status Output param to be set to success/failure code. If * @param status Output param to be set to success/failure code. If
* 'text' cannot be parsed, it will be set to a failur e * 'text' cannot be parsed, it will be set to a failur e
* code. * code.
* @result The parsed UDate value, if successful. * @return The parsed UDate value, if successful.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UDate parse( const UnicodeString& text, virtual UDate parse( const UnicodeString& text,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Parse a date/time string beginning at the given parse position. For * Parse a date/time string beginning at the given parse position. For
* example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te
* that is equivalent to Date(837039928046). * that is equivalent to Date(837039928046).
* <P> * <P>
* By default, parsing is lenient: If the input is not in the form used by * By default, parsing is lenient: If the input is not in the form used by
* this object's format method but can still be parsed as a date, then the * this object's format method but can still be parsed as a date, then the
* parse succeeds. Clients may insist on strict adherence to the format by * parse succeeds. Clients may insist on strict adherence to the format by
* calling setLenient(false). * calling setLenient(false).
*
* @see DateFormat::setLenient(boolean) * @see DateFormat::setLenient(boolean)
* *
* @param text The date/time string to be parsed * @param text The date/time string to be parsed.
* @param cal a Calendar set to the date and time to be formatted * @param cal A Calendar set on input to the date and time to be used
* into a date/time string. When the calendar type for
* is different from the internal calendar held by this * missing values in the date/time string being parsed, an
* DateFormat instance, calendar field values will be d set
* parsed based on the internal calendar, then the result * on output to the parsed date/time. When the calendar ty
* (time in milliseconds and time zone) will be set in pe is
* this calendar. * different from the internal calendar held by this DateF
ormat
* instance, the internal calendar will be cloned to a wor
k
* calendar set to the same milliseconds and time zone as
the
* cal parameter, field values will be parsed based on the
work
* calendar, then the result (milliseconds and time zone)
will
* be set in this calendar.
* @param pos On input, the position at which to start parsing; on * @param pos On input, the position at which to start parsing; on
* output, the position at which parsing terminated, or th e * output, the position at which parsing terminated, or th e
* start position if the parse failed. * start position if the parse failed.
* @return A valid UDate if the input could be parsed.
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
virtual void parse( const UnicodeString& text, virtual void parse( const UnicodeString& text,
Calendar& cal, Calendar& cal,
ParsePosition& pos) const = 0; ParsePosition& pos) const = 0;
/** /**
* Parse a date/time string beginning at the given parse position. For * Parse a date/time string beginning at the given parse position. For
* example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te
* that is equivalent to Date(837039928046). * that is equivalent to Date(837039928046).
* <P> * <P>
* By default, parsing is lenient: If the input is not in the form used by * By default, parsing is lenient: If the input is not in the form used by
* this object's format method but can still be parsed as a date, then the * this object's format method but can still be parsed as a date, then the
* parse succeeds. Clients may insist on strict adherence to the format by * parse succeeds. Clients may insist on strict adherence to the format by
* calling setLenient(false). * calling setLenient(false).
*
* @see DateFormat::setLenient(boolean) * @see DateFormat::setLenient(boolean)
* <P>
* Note that the normal date formats associated with some calendars - s
uch
* as the Chinese lunar calendar - do not specify enough fields to enab
le
* dates to be parsed unambiguously. In the case of the Chinese lunar
* calendar, while the year within the current 60-year cycle is specifi
ed,
* the number of such cycles since the start date of the calendar (in t
he
* ERA field of the Calendar object) is not normally part of the format
,
* and parsing may assume the wrong era. For cases such as this it is
* recommended that clients parse using the method
* parse(const UnicodeString&, Calendar& cal, ParsePosition&)
* with the Calendar passed in set to the current date, or to a date
* within the era/cycle that should be assumed if absent in the format.
* *
* @param text The date/time string to be parsed * @param text The date/time string to be parsed into a UDate value.
* @param pos On input, the position at which to start parsing; on * @param pos On input, the position at which to start parsing; on
* output, the position at which parsing terminated, or th e * output, the position at which parsing terminated, or th e
* start position if the parse failed. * start position if the parse failed.
* @return A valid UDate if the input could be parsed. * @return A valid UDate if the input could be parsed.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UDate parse( const UnicodeString& text, UDate parse( const UnicodeString& text,
ParsePosition& pos) const; ParsePosition& pos) const;
/** /**
skipping to change at line 507 skipping to change at line 542
* @return A time formatter which the caller owns. * @return A time formatter which the caller owns.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static DateFormat* U_EXPORT2 createTimeInstance(EStyle style = kDefault , static DateFormat* U_EXPORT2 createTimeInstance(EStyle style = kDefault ,
const Locale& aLocale = Locale::g etDefault()); const Locale& aLocale = Locale::g etDefault());
/** /**
* Creates a date formatter with the given formatting style for the giv en * Creates a date formatter with the given formatting style for the giv en
* const locale. * const locale.
* *
* @param style The given formatting style. For example, * @param style The given formatting style. For example, SHORT for
* SHORT for "M/d/yy" in the US locale. "M/d/yy" in the
* US locale. As currently implemented, relative date
formatting only
* affects a limited range of calendar days before or
after the
* current date, based on the CLDR &lt;field type="day
"&gt;/&lt;relative&gt; data:
* For example, in English, "Yesterday", "Today", and
"Tomorrow".
* Outside of this range, dates are formatted using th
e corresponding
* non-relative style.
* @param aLocale The given locale. * @param aLocale The given locale.
* @return A date formatter which the caller owns. * @return A date formatter which the caller owns.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static DateFormat* U_EXPORT2 createDateInstance(EStyle style = kDefault , static DateFormat* U_EXPORT2 createDateInstance(EStyle style = kDefault ,
const Locale& aLocale = Locale::g etDefault()); const Locale& aLocale = Locale::g etDefault());
/** /**
* Creates a date/time formatter with the given formatting styles for t he * Creates a date/time formatter with the given formatting styles for t he
* given locale. * given locale.
* *
* @param dateStyle The given formatting style for the date portion of the result. * @param dateStyle The given formatting style for the date portion of the result.
* For example, SHORT for "M/d/yy" in the US locale. * For example, SHORT for "M/d/yy" in the US locale. A
s currently
* implemented, relative date formatting only affects
a limited range
* of calendar days before or after the current date,
based on the
* CLDR &lt;field type="day"&gt;/&lt;relative&gt; data
: For example, in English,
* "Yesterday", "Today", and "Tomorrow". Outside of th
is range, dates
* are formatted using the corresponding non-relative
style.
* @param timeStyle The given formatting style for the time portion of the result. * @param timeStyle The given formatting style for the time portion of the result.
* For example, SHORT for "h:mm a" in the US locale. R elative * For example, SHORT for "h:mm a" in the US locale. R elative
* time styles are not currently supported. * time styles are not currently supported.
* @param aLocale The given locale. * @param aLocale The given locale.
* @return A date/time formatter which the caller owns. * @return A date/time formatter which the caller owns.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static DateFormat* U_EXPORT2 createDateTimeInstance(EStyle dateStyle = kDefault, static DateFormat* U_EXPORT2 createDateTimeInstance(EStyle dateStyle = kDefault,
EStyle timeStyle = kDefault, EStyle timeStyle = kDefault,
const Locale& aLocale = Local e::getDefault()); const Locale& aLocale = Local e::getDefault());
skipping to change at line 681 skipping to change at line 726
* Gets the date/time formatter with the given formatting styles for th e * Gets the date/time formatter with the given formatting styles for th e
* given locale. * given locale.
* @param dateStyle the given date formatting style. * @param dateStyle the given date formatting style.
* @param timeStyle the given time formatting style. * @param timeStyle the given time formatting style.
* @param inLocale the given locale. * @param inLocale the given locale.
* @return a date/time formatter, or 0 on failure. * @return a date/time formatter, or 0 on failure.
*/ */
static DateFormat* U_EXPORT2 create(EStyle timeStyle, EStyle dateStyle, const Locale& inLocale); static DateFormat* U_EXPORT2 create(EStyle timeStyle, EStyle dateStyle, const Locale& inLocale);
public: public:
#ifndef U_HIDE_OBSOLETE_API
/** /**
* Field selector for FieldPosition for DateFormat fields. * Field selector for FieldPosition for DateFormat fields.
* @obsolete ICU 3.4 use UDateFormatField instead, since this API will be * @obsolete ICU 3.4 use UDateFormatField instead, since this API will be
* removed in that release * removed in that release
*/ */
enum EField enum EField
{ {
// Obsolete; use UDateFormatField instead // Obsolete; use UDateFormatField instead
kEraField = UDAT_ERA_FIELD, kEraField = UDAT_ERA_FIELD,
kYearField = UDAT_YEAR_FIELD, kYearField = UDAT_YEAR_FIELD,
skipping to change at line 733 skipping to change at line 779
DAY_OF_WEEK_FIELD = UDAT_DAY_OF_WEEK_FIELD, DAY_OF_WEEK_FIELD = UDAT_DAY_OF_WEEK_FIELD,
DAY_OF_YEAR_FIELD = UDAT_DAY_OF_YEAR_FIELD, DAY_OF_YEAR_FIELD = UDAT_DAY_OF_YEAR_FIELD,
DAY_OF_WEEK_IN_MONTH_FIELD = UDAT_DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD = UDAT_DAY_OF_WEEK_IN_MONTH_FIELD,
WEEK_OF_YEAR_FIELD = UDAT_WEEK_OF_YEAR_FIELD, WEEK_OF_YEAR_FIELD = UDAT_WEEK_OF_YEAR_FIELD,
WEEK_OF_MONTH_FIELD = UDAT_WEEK_OF_MONTH_FIELD, WEEK_OF_MONTH_FIELD = UDAT_WEEK_OF_MONTH_FIELD,
AM_PM_FIELD = UDAT_AM_PM_FIELD, AM_PM_FIELD = UDAT_AM_PM_FIELD,
HOUR1_FIELD = UDAT_HOUR1_FIELD, HOUR1_FIELD = UDAT_HOUR1_FIELD,
HOUR0_FIELD = UDAT_HOUR0_FIELD, HOUR0_FIELD = UDAT_HOUR0_FIELD,
TIMEZONE_FIELD = UDAT_TIMEZONE_FIELD TIMEZONE_FIELD = UDAT_TIMEZONE_FIELD
}; };
#endif /* U_HIDE_OBSOLETE_API */
}; };
inline UnicodeString& inline UnicodeString&
DateFormat::format(const Formattable& obj, DateFormat::format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
UErrorCode& status) const { UErrorCode& status) const {
return Format::format(obj, appendTo, status); return Format::format(obj, appendTo, status);
} }
U_NAMESPACE_END U_NAMESPACE_END
 End of changes. 14 change blocks. 
19 lines changed or deleted 102 lines changed or added


 dcfmtsym.h   dcfmtsym.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File DCFMTSYM.H * File DCFMTSYM.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 03/18/97 clhuang Updated per C++ implementation. * 03/18/97 clhuang Updated per C++ implementation.
skipping to change at line 130 skipping to change at line 130
/** Nan symbol */ /** Nan symbol */
kNaNSymbol, kNaNSymbol,
/** Significant digit symbol /** Significant digit symbol
* @stable ICU 3.0 */ * @stable ICU 3.0 */
kSignificantDigitSymbol, kSignificantDigitSymbol,
/** The monetary grouping separator /** The monetary grouping separator
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
kMonetaryGroupingSeparatorSymbol, kMonetaryGroupingSeparatorSymbol,
/** One /** One
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kOneDigitSymbol, kOneDigitSymbol,
/** Two /** Two
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kTwoDigitSymbol, kTwoDigitSymbol,
/** Three /** Three
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kThreeDigitSymbol, kThreeDigitSymbol,
/** Four /** Four
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kFourDigitSymbol, kFourDigitSymbol,
/** Five /** Five
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kFiveDigitSymbol, kFiveDigitSymbol,
/** Six /** Six
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kSixDigitSymbol, kSixDigitSymbol,
/** Seven /** Seven
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kSevenDigitSymbol, kSevenDigitSymbol,
/** Eight /** Eight
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kEightDigitSymbol, kEightDigitSymbol,
/** Nine /** Nine
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
kNineDigitSymbol, kNineDigitSymbol,
/** count symbol constants */ /** count symbol constants */
kFormatSymbolCount kFormatSymbolCount
}; };
/** /**
* Create a DecimalFormatSymbols object for the given locale. * Create a DecimalFormatSymbols object for the given locale.
* *
* @param locale The locale to get symbols for. * @param locale The locale to get symbols for.
skipping to change at line 279 skipping to change at line 279
* be empty if there is no data from current locale and its parent loc ales. * be empty if there is no data from current locale and its parent loc ales.
* *
* @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT. * @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT.
* @param beforeCurrency : true if the pattern is for before currency symbol. * @param beforeCurrency : true if the pattern is for before currency symbol.
* false if the pattern is for after currency symbol. * false if the pattern is for after currency symbol.
* @param status: Input/output parameter, set to success or * @param status: Input/output parameter, set to success or
* failure code upon return. * failure code upon return.
* @return pattern string for currencyMatch, surroundingMatch or space Insert. * @return pattern string for currencyMatch, surroundingMatch or space Insert.
* Return empty string if there is no data for this locale and its parent * Return empty string if there is no data for this locale and its parent
* locales. * locales.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
const UnicodeString& getPatternForCurrencySpacing(UCurrencySpacing typ e, const UnicodeString& getPatternForCurrencySpacing(UCurrencySpacing typ e,
UBool beforeCurrency, UBool beforeCurrency,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Set pattern string for 'CurrencySpacing' that can be applied to * Set pattern string for 'CurrencySpacing' that can be applied to
* currency format. * currency format.
* *
* @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT. * @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT.
* @param beforeCurrency : true if the pattern is for before currency symbol. * @param beforeCurrency : true if the pattern is for before currency symbol.
* false if the pattern is for after currency symbol. * false if the pattern is for after currency symbol.
* @param pattern : pattern string to override current setting. * @param pattern : pattern string to override current setting.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
void setPatternForCurrencySpacing(UCurrencySpacing type, void setPatternForCurrencySpacing(UCurrencySpacing type,
UBool beforeCurrency, UBool beforeCurrency,
const UnicodeString& pattern); const UnicodeString& pattern);
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
skipping to change at line 335 skipping to change at line 335
void initialize(const Locale& locale, UErrorCode& success, UBool useLas tResortData = FALSE); void initialize(const Locale& locale, UErrorCode& success, UBool useLas tResortData = FALSE);
/** /**
* Initialize the symbols with default values. * Initialize the symbols with default values.
*/ */
void initialize(); void initialize();
void setCurrencyForSymbols(); void setCurrencyForSymbols();
public: public:
#ifndef U_HIDE_INTERNAL_API
/** /**
* _Internal_ function - more efficient version of getSymbol, * _Internal_ function - more efficient version of getSymbol,
* returning a const reference to one of the symbol strings. * returning a const reference to one of the symbol strings.
* The returned reference becomes invalid when the symbol is changed * The returned reference becomes invalid when the symbol is changed
* or when the DecimalFormatSymbols are destroyed. * or when the DecimalFormatSymbols are destroyed.
* ### TODO markus 2002oct11: Consider proposing getConstSymbol() to be really public. * ### TODO markus 2002oct11: Consider proposing getConstSymbol() to be really public.
* *
* @param symbol Constant to indicate a number format symbol. * @param symbol Constant to indicate a number format symbol.
* @return the format symbol by the param 'symbol' * @return the format symbol by the param 'symbol'
* @internal * @internal
*/ */
inline const UnicodeString &getConstSymbol(ENumberFormatSymbol symbol) const; inline const UnicodeString &getConstSymbol(ENumberFormatSymbol symbol) const;
/** /**
* Returns that pattern stored in currecy info. Internal API for use by NumberFormat API. * Returns that pattern stored in currecy info. Internal API for use by NumberFormat API.
* @internal * @internal
*/ */
inline const UChar* getCurrencyPattern(void) const; inline const UChar* getCurrencyPattern(void) const;
#endif /* U_HIDE_INTERNAL_API */
private: private:
/** /**
* Private symbol strings. * Private symbol strings.
* They are either loaded from a resource bundle or otherwise owned. * They are either loaded from a resource bundle or otherwise owned.
* setSymbol() clones the symbol string. * setSymbol() clones the symbol string.
* Readonly aliases can only come from a resource bundle, so that we ca n always * Readonly aliases can only come from a resource bundle, so that we ca n always
* use fastCopyFrom() with them. * use fastCopyFrom() with them.
* *
* If DecimalFormatSymbols becomes subclassable and the status of fSymb ols changes * If DecimalFormatSymbols becomes subclassable and the status of fSymb ols changes
skipping to change at line 401 skipping to change at line 403
DecimalFormatSymbols::getSymbol(ENumberFormatSymbol symbol) const { DecimalFormatSymbols::getSymbol(ENumberFormatSymbol symbol) const {
const UnicodeString *strPtr; const UnicodeString *strPtr;
if(symbol < kFormatSymbolCount) { if(symbol < kFormatSymbolCount) {
strPtr = &fSymbols[symbol]; strPtr = &fSymbols[symbol];
} else { } else {
strPtr = &fNoSymbol; strPtr = &fNoSymbol;
} }
return *strPtr; return *strPtr;
} }
#ifndef U_HIDE_INTERNAL_API
inline const UnicodeString & inline const UnicodeString &
DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const { DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const {
const UnicodeString *strPtr; const UnicodeString *strPtr;
if(symbol < kFormatSymbolCount) { if(symbol < kFormatSymbolCount) {
strPtr = &fSymbols[symbol]; strPtr = &fSymbols[symbol];
} else { } else {
strPtr = &fNoSymbol; strPtr = &fNoSymbol;
} }
return *strPtr; return *strPtr;
} }
#endif
// ------------------------------------- // -------------------------------------
inline void inline void
DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeSt ring &value, const UBool propogateDigits = TRUE) { DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeSt ring &value, const UBool propogateDigits = TRUE) {
if(symbol<kFormatSymbolCount) { if(symbol<kFormatSymbolCount) {
fSymbols[symbol]=value; fSymbols[symbol]=value;
} }
// If the zero digit is being set to a known zero digit according to Un icode, // If the zero digit is being set to a known zero digit according to Un icode,
skipping to change at line 440 skipping to change at line 444
} }
} }
// ------------------------------------- // -------------------------------------
inline Locale inline Locale
DecimalFormatSymbols::getLocale() const { DecimalFormatSymbols::getLocale() const {
return locale; return locale;
} }
#ifndef U_HIDE_INTERNAL_API
inline const UChar* inline const UChar*
DecimalFormatSymbols::getCurrencyPattern() const { DecimalFormatSymbols::getCurrencyPattern() const {
return currPattern; return currPattern;
} }
#endif
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _DCFMTSYM #endif // _DCFMTSYM
//eof //eof
 End of changes. 18 change blocks. 
12 lines changed or deleted 19 lines changed or added


 decimfmt.h   decimfmt.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File DECIMFMT.H * File DECIMFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 03/20/97 clhuang Updated per C++ implementation. * 03/20/97 clhuang Updated per C++ implementation.
skipping to change at line 40 skipping to change at line 40
* \brief C++ API: Formats decimal numbers. * \brief C++ API: Formats decimal numbers.
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/dcfmtsym.h" #include "unicode/dcfmtsym.h"
#include "unicode/numfmt.h" #include "unicode/numfmt.h"
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/fpositer.h" #include "unicode/fpositer.h"
#include "unicode/stringpiece.h" #include "unicode/stringpiece.h"
#include "unicode/curramt.h"
union UHashTok;
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class DigitList; class DigitList;
class ChoiceFormat; class ChoiceFormat;
class CurrencyPluralInfo; class CurrencyPluralInfo;
class Hashtable; class Hashtable;
class UnicodeSet; class UnicodeSet;
class FieldPositionHandler; class FieldPositionHandler;
skipping to change at line 664 skipping to change at line 663
kRoundDown, /**< Round towards zero */ kRoundDown, /**< Round towards zero */
kRoundUp, /**< Round away from zero */ kRoundUp, /**< Round away from zero */
kRoundHalfEven, /**< Round towards the nearest integer, or kRoundHalfEven, /**< Round towards the nearest integer, or
towards the nearest even integer if equidistan t */ towards the nearest even integer if equidistan t */
kRoundHalfDown, /**< Round towards the nearest integer, or kRoundHalfDown, /**< Round towards the nearest integer, or
towards zero if equidistant */ towards zero if equidistant */
kRoundHalfUp, /**< Round towards the nearest integer, or kRoundHalfUp, /**< Round towards the nearest integer, or
away from zero if equidistant */ away from zero if equidistant */
/** /**
* Return U_FORMAT_INEXACT_ERROR if number does not format exactl y. * Return U_FORMAT_INEXACT_ERROR if number does not format exactl y.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
kRoundUnnecessary kRoundUnnecessary
}; };
/** /**
* Pad position. * Pad position.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
enum EPadPosition { enum EPadPosition {
kPadBeforePrefix, kPadBeforePrefix,
skipping to change at line 734 skipping to change at line 733
* @param symbolsToAdopt the set of symbols to be used. The caller should not * @param symbolsToAdopt the set of symbols to be used. The caller should not
* delete this object after making this call. * delete this object after making this call.
* @param status Output param set to success/failure code. I f the * @param status Output param set to success/failure code. I f the
* pattern is invalid this will be set to a fa ilure code. * pattern is invalid this will be set to a fa ilure code.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
DecimalFormat( const UnicodeString& pattern, DecimalFormat( const UnicodeString& pattern,
DecimalFormatSymbols* symbolsToAdopt, DecimalFormatSymbols* symbolsToAdopt,
UErrorCode& status); UErrorCode& status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* This API is for ICU use only. * This API is for ICU use only.
* Create a DecimalFormat from the given pattern, symbols, and style. * Create a DecimalFormat from the given pattern, symbols, and style.
* *
* @param pattern a non-localized pattern string * @param pattern a non-localized pattern string
* @param symbolsToAdopt the set of symbols to be used. The caller should not * @param symbolsToAdopt the set of symbols to be used. The caller should not
* delete this object after making this call. * delete this object after making this call.
* @param style style of decimal format * @param style style of decimal format
* @param status Output param set to success/failure code. I f the * @param status Output param set to success/failure code. I f the
* pattern is invalid this will be set to a fa ilure code. * pattern is invalid this will be set to a fa ilure code.
* @internal ICU 4.2 * @internal ICU 4.2
*/ */
DecimalFormat( const UnicodeString& pattern, DecimalFormat( const UnicodeString& pattern,
DecimalFormatSymbols* symbolsToAdopt, DecimalFormatSymbols* symbolsToAdopt,
UNumberFormatStyle style, UNumberFormatStyle style,
UErrorCode& status); UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Create a DecimalFormat from the given pattern and symbols. * Create a DecimalFormat from the given pattern and symbols.
* Use this constructor when you need to completely customize the * Use this constructor when you need to completely customize the
* behavior of the format. * behavior of the format.
* <P> * <P>
* To obtain standard formats for a given * To obtain standard formats for a given
* locale, use the factory methods on NumberFormat such as * locale, use the factory methods on NumberFormat such as
* createInstance or createCurrencyInstance. If you need only minor adj ustments * createInstance or createCurrencyInstance. If you need only minor adj ustments
* to a standard format, you can modify the format returned by * to a standard format, you can modify the format returned by
skipping to change at line 1106 skipping to change at line 1107
* *
* @param text The text to be parsed. * @param text The text to be parsed.
* @param result Formattable to be set to the parse result. * @param result Formattable to be set to the parse result.
* @param status Output parameter filled in with success or failure status. * @param status Output parameter filled in with success or failure status.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void parse(const UnicodeString& text, virtual void parse(const UnicodeString& text,
Formattable& result, Formattable& result,
UErrorCode& status) const; UErrorCode& status) const;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/** /**
* Parses text from the given string as a currency amount. Unlike * Parses text from the given string as a currency amount. Unlike
* the parse() method, this method will attempt to parse a generic * the parse() method, this method will attempt to parse a generic
* currency name, searching for a match of this object's locale's * currency name, searching for a match of this object's locale's
* currency display names, or for a 3-letter ISO currency code. * currency display names, or for a 3-letter ISO currency code.
* This method will fail if this format is not a currency format, * This method will fail if this format is not a currency format,
* that is, if it does not contain the currency pattern symbol * that is, if it does not contain the currency pattern symbol
* (U+00A4) in its prefix or suffix. * (U+00A4) in its prefix or suffix.
* *
* @param text the string to parse * @param text the string to parse
* @param result output parameter to receive result. This will have * @param pos input-output position; on input, the position within tex
* its currency set to the parsed ISO currency code. t
* @param pos input-output position; on input, the position within * to match; must have 0 <= pos.getIndex() < text.length();
* text to match; must have 0 <= pos.getIndex() < text.length(); * on output, the position after the last matched character
* on output, the position after the last matched character. If .
* the parse fails, the position in unchanged upon output. * If the parse fails, the position in unchanged upon outpu
* @return a reference to result t.
* @internal * @return if parse succeeds, a pointer to a newly-created Currency
Amount
* object (owned by the caller) containing information abou
t
* the parsed currency; if parse fails, this is NULL.
* @draft ICU 49
*/ */
virtual Formattable& parseCurrency(const UnicodeString& text, virtual CurrencyAmount* parseCurrency(const UnicodeString& text,
Formattable& result, ParsePosition& pos) const;
ParsePosition& pos) const;
/** /**
* Returns the decimal format symbols, which is generally not changed * Returns the decimal format symbols, which is generally not changed
* by the programmer or user. * by the programmer or user.
* @return desired DecimalFormatSymbols * @return desired DecimalFormatSymbols
* @see DecimalFormatSymbols * @see DecimalFormatSymbols
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual const DecimalFormatSymbols* getDecimalFormatSymbols(void) const ; virtual const DecimalFormatSymbols* getDecimalFormatSymbols(void) const ;
skipping to change at line 1936 skipping to change at line 1937
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
*/ */
UnicodeString& subformat(UnicodeString& appendTo, UnicodeString& subformat(UnicodeString& appendTo,
FieldPositionHandler& handler, FieldPositionHandler& handler,
DigitList& digits, DigitList& digits,
UBool isInteger) const; UBool isInteger) const;
void parse(const UnicodeString& text, void parse(const UnicodeString& text,
Formattable& result, Formattable& result,
ParsePosition& pos, ParsePosition& pos,
UBool parseCurrency) const; UChar* currency) const;
enum { enum {
fgStatusInfinite, fgStatusInfinite,
fgStatusLength // Leave last in list. fgStatusLength // Leave last in list.
} StatusFlags; } StatusFlags;
UBool subparse(const UnicodeString& text, UBool subparse(const UnicodeString& text,
const UnicodeString* negPrefix, const UnicodeString* negPrefix,
const UnicodeString* negSuffix, const UnicodeString* negSuffix,
const UnicodeString* posPrefix, const UnicodeString* posPrefix,
skipping to change at line 2170 skipping to change at line 2171
*/ */
int fCurrencySignCount; int fCurrencySignCount;
/* For currency parsing purose, /* For currency parsing purose,
* Need to remember all prefix patterns and suffix patterns of * Need to remember all prefix patterns and suffix patterns of
* every currency format pattern, * every currency format pattern,
* including the pattern of default currecny style * including the pattern of default currecny style
* and plural currency style. And the patterns are set through applyPat tern. * and plural currency style. And the patterns are set through applyPat tern.
*/ */
// TODO: innerclass? // TODO: innerclass?
/* This is not needed in the class declaration, so it is moved into decimfmp.cpp /* This is not needed in the class declaration, so it is moved into dec imfmp.cpp
struct AffixPatternsForCurrency : public UMemory { struct AffixPatternsForCurrency : public UMemory {
// negative prefix pattern // negative prefix pattern
UnicodeString negPrefixPatternForCurrency; UnicodeString negPrefixPatternForCurrency;
// negative suffix pattern // negative suffix pattern
UnicodeString negSuffixPatternForCurrency; UnicodeString negSuffixPatternForCurrency;
// positive prefix pattern // positive prefix pattern
UnicodeString posPrefixPatternForCurrency; UnicodeString posPrefixPatternForCurrency;
// positive suffix pattern // positive suffix pattern
UnicodeString posSuffixPatternForCurrency; UnicodeString posSuffixPatternForCurrency;
int8_t patternType; int8_t patternType;
skipping to change at line 2200 skipping to change at line 2201
posSuffixPatternForCurrency = posSuffix; posSuffixPatternForCurrency = posSuffix;
patternType = type; patternType = type;
} }
}; };
*/ */
/* affix for currency formatting when the currency sign in the pattern /* affix for currency formatting when the currency sign in the pattern
* equals to 3, such as the pattern contains 3 currency sign or * equals to 3, such as the pattern contains 3 currency sign or
* the formatter style is currency plural format style. * the formatter style is currency plural format style.
*/ */
/* This is not needed in the class declaration, so it is moved into decimfmp.cpp /* This is not needed in the class declaration, so it is moved into dec imfmp.cpp
struct AffixesForCurrency : public UMemory { struct AffixesForCurrency : public UMemory {
// negative prefix // negative prefix
UnicodeString negPrefixForCurrency; UnicodeString negPrefixForCurrency;
// negative suffix // negative suffix
UnicodeString negSuffixForCurrency; UnicodeString negSuffixForCurrency;
// positive prefix // positive prefix
UnicodeString posPrefixForCurrency; UnicodeString posPrefixForCurrency;
// positive suffix // positive suffix
UnicodeString posSuffixForCurrency; UnicodeString posSuffixForCurrency;
skipping to change at line 2310 skipping to change at line 2311
return format(number, appendTo, pos); return format(number, appendTo, pos);
} }
inline UnicodeString& inline UnicodeString&
DecimalFormat::format(int32_t number, DecimalFormat::format(int32_t number,
UnicodeString& appendTo) const { UnicodeString& appendTo) const {
FieldPosition pos(0); FieldPosition pos(0);
return format((int64_t)number, appendTo, pos); return format((int64_t)number, appendTo, pos);
} }
#ifndef U_HIDE_INTERNAL_API
inline const UnicodeString & inline const UnicodeString &
DecimalFormat::getConstSymbol(DecimalFormatSymbols::ENumberFormatSymbol sym bol) const { DecimalFormat::getConstSymbol(DecimalFormatSymbols::ENumberFormatSymbol sym bol) const {
return fSymbols->getConstSymbol(symbol); return fSymbols->getConstSymbol(symbol);
} }
#endif
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _DECIMFMT #endif // _DECIMFMT
//eof //eof
 End of changes. 13 change blocks. 
18 lines changed or deleted 26 lines changed or added


 dtfmtsym.h   dtfmtsym.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File DTFMTSYM.H * File DTFMTSYM.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 07/21/98 stephen Added getZoneIndex() * 07/21/98 stephen Added getZoneIndex()
skipping to change at line 108 skipping to change at line 108
* *
* @param locale Locale to load format data from. * @param locale Locale to load format data from.
* @param status Status code. Failure * @param status Status code. Failure
* results if the resources for the locale cannot be * results if the resources for the locale cannot be
* found or cannot be loaded * found or cannot be loaded
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
DateFormatSymbols(const Locale& locale, DateFormatSymbols(const Locale& locale,
UErrorCode& status); UErrorCode& status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Construct a DateFormatSymbols object by loading format data from * Construct a DateFormatSymbols object by loading format data from
* resources for the default locale, in the default calendar (Gregorian ). * resources for the default locale, in the default calendar (Gregorian ).
* <P> * <P>
* NOTE: This constructor will never fail; if it cannot get resource * NOTE: This constructor will never fail; if it cannot get resource
* data for the default locale, it will return a last-resort object * data for the default locale, it will return a last-resort object
* based on hard-coded strings. * based on hard-coded strings.
* *
* @param type Type of calendar (as returned by Calendar::getType) . * @param type Type of calendar (as returned by Calendar::getType) .
* Will be used to access the correct set of strings. * Will be used to access the correct set of strings.
skipping to change at line 142 skipping to change at line 143
* Will be used to access the correct set of strings. * Will be used to access the correct set of strings.
* (NULL or empty string defaults to "gregorian".) * (NULL or empty string defaults to "gregorian".)
* @param status Status code. Failure * @param status Status code. Failure
* results if the resources for the locale cannot be * results if the resources for the locale cannot be
* found or cannot be loaded * found or cannot be loaded
* @internal * @internal
*/ */
DateFormatSymbols(const Locale& locale, DateFormatSymbols(const Locale& locale,
const char *type, const char *type,
UErrorCode& status); UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Copy constructor. * Copy constructor.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
DateFormatSymbols(const DateFormatSymbols&); DateFormatSymbols(const DateFormatSymbols&);
/** /**
* Assignment operator. * Assignment operator.
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 398 skipping to change at line 400
const UnicodeString* getAmPmStrings(int32_t& count) const; const UnicodeString* getAmPmStrings(int32_t& count) const;
/** /**
* Sets ampm strings. For example: "AM" and "PM". * Sets ampm strings. For example: "AM" and "PM".
* @param ampms the new ampm strings. (not adopted; caller retai ns ownership) * @param ampms the new ampm strings. (not adopted; caller retai ns ownership)
* @param count Filled in with length of the array. * @param count Filled in with length of the array.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
void setAmPmStrings(const UnicodeString* ampms, int32_t count); void setAmPmStrings(const UnicodeString* ampms, int32_t count);
#ifndef U_HIDE_INTERNAL_API
/**
* Somewhat temporary constants for leap month pattern types, adequate
for supporting
* just leap month patterns as needed for Chinese lunar calendar.
* Eventually we will add full support for different month pattern type
s (needed for
* other calendars such as Hindu) at which point this approach will be
replaced by a
* more complete approach.
* @internal
*/
enum EMonthPatternType
{
kLeapMonthPatternFormatWide,
kLeapMonthPatternFormatAbbrev,
kLeapMonthPatternFormatNarrow,
kLeapMonthPatternStandaloneWide,
kLeapMonthPatternStandaloneAbbrev,
kLeapMonthPatternStandaloneNarrow,
kLeapMonthPatternNumeric,
kMonthPatternsCount
};
/**
* Somewhat temporary function for getting complete set of leap month p
atterns for all
* contexts & widths, indexed by EMonthPatternType values. Returns NULL
if calendar
* does not have leap month patterns. Note, there is currently no sette
r for this.
* Eventually we will add full support for different month pattern type
s (needed for
* other calendars such as Hindu) at which point this approach will be
replaced by a
* more complete approach.
* @param count Filled in with length of the array (may be 0).
* @return The leap month patterns (DateFormatSymbols retai
ns ownership).
* May be NULL if there are no leap month patterns
for this calendar.
* @internal
*/
const UnicodeString* getLeapMonthPatterns(int32_t& count) const;
#endif /* U_HIDE_INTERNAL_API */
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Gets timezone strings. These strings are stored in a 2-dimensional a rray. * Gets timezone strings. These strings are stored in a 2-dimensional a rray.
* @param rowCount Output param to receive number of rows. * @param rowCount Output param to receive number of rows.
* @param columnCount Output param to receive number of columns. * @param columnCount Output param to receive number of columns.
* @return The timezone strings as a 2-d array. (DateForma tSymbols retains ownership.) * @return The timezone strings as a 2-d array. (DateForma tSymbols retains ownership.)
* @deprecated ICU 3.6 * @deprecated ICU 3.6
*/ */
const UnicodeString** getZoneStrings(int32_t& rowCount, int32_t& column Count) const; const UnicodeString** getZoneStrings(int32_t& rowCount, int32_t& column Count) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Sets timezone strings. These strings are stored in a 2-dimensional a rray. * Sets timezone strings. These strings are stored in a 2-dimensional a rray.
* <p><b>Note:</b> SimpleDateFormat no longer use the zone strings stor ed in * <p><b>Note:</b> SimpleDateFormat no longer use the zone strings stor ed in
* a DateFormatSymbols. Therefore, the time zone strings set by this mt hod * a DateFormatSymbols. Therefore, the time zone strings set by this mt hod
* have no effects in an instance of SimpleDateFormat for formatting ti me * have no effects in an instance of SimpleDateFormat for formatting ti me
* zones. * zones.
* @param strings The timezone strings as a 2-d array to be copie d. (not adopted; caller retains ownership) * @param strings The timezone strings as a 2-d array to be copie d. (not adopted; caller retains ownership)
* @param rowCount The number of rows (count of first index). * @param rowCount The number of rows (count of first index).
* @param columnCount The number of columns (count of second index). * @param columnCount The number of columns (count of second index).
skipping to change at line 454 skipping to change at line 495
*/ */
void setLocalPatternChars(const UnicodeString& newLocalPatternChars); void setLocalPatternChars(const UnicodeString& newLocalPatternChars);
/** /**
* Returns the locale for this object. Two flavors are available: * Returns the locale for this object. Two flavors are available:
* valid and actual locale. * valid and actual locale.
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
#ifndef U_HIDE_INTERNAL_API
/**
* Constants for capitalization context usage types.
* @internal
*/
enum ECapitalizationContextUsageType
{
kCapContextUsageOther,
kCapContextUsageMonthFormat, /* except narrow */
kCapContextUsageMonthStandalone, /* except narrow */
kCapContextUsageMonthNarrow,
kCapContextUsageDayFormat, /* except narrow */
kCapContextUsageDayStandalone, /* except narrow */
kCapContextUsageDayNarrow,
kCapContextUsageEraWide,
kCapContextUsageEraAbbrev,
kCapContextUsageEraNarrow,
kCapContextUsageZoneLong,
kCapContextUsageZoneShort,
kCapContextUsageMetazoneLong,
kCapContextUsageMetazoneShort,
kCapContextUsageTypeCount
};
#endif /* U_HIDE_INTERNAL_API */
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
/** /**
* ICU "poor man's RTTI", returns a UClassID for this class. * ICU "poor man's RTTI", returns a UClassID for this class.
* *
skipping to change at line 594 skipping to change at line 660
UnicodeString *fStandaloneQuarters; UnicodeString *fStandaloneQuarters;
int32_t fStandaloneQuartersCount; int32_t fStandaloneQuartersCount;
/** /**
* Standalone short quarter strings. For example: "Q1", "Q2", etc. * Standalone short quarter strings. For example: "Q1", "Q2", etc.
*/ */
UnicodeString *fStandaloneShortQuarters; UnicodeString *fStandaloneShortQuarters;
int32_t fStandaloneShortQuartersCount; int32_t fStandaloneShortQuartersCount;
/** /**
* All leap month patterns, for example "{0}bis".
*/
UnicodeString *fLeapMonthPatterns;
int32_t fLeapMonthPatternsCount;
/**
* (Format) Short cyclic year names, for example: "jia-zi", "yi-chou",
... "gui-hai"
*/
UnicodeString* fShortYearNames;
int32_t fShortYearNamesCount;
/**
* Localized names of time zones in this locale. This is a * Localized names of time zones in this locale. This is a
* two-dimensional array of strings of size n by m, * two-dimensional array of strings of size n by m,
* where m is at least 5 and up to 7. Each of the n rows is an * where m is at least 5 and up to 7. Each of the n rows is an
* entry containing the localized names for a single TimeZone. * entry containing the localized names for a single TimeZone.
* *
* Each such row contains (with i ranging from 0..n-1): * Each such row contains (with i ranging from 0..n-1):
* *
* zoneStrings[i][0] - time zone ID * zoneStrings[i][0] - time zone ID
* example: America/Los_Angeles * example: America/Los_Angeles
* zoneStrings[i][1] - long name of zone in standard time * zoneStrings[i][1] - long name of zone in standard time
skipping to change at line 638 skipping to change at line 716
* localized zone names, so we keep this field for the purpose. * localized zone names, so we keep this field for the purpose.
*/ */
UnicodeString **fZoneStrings; // Zone string array set by set ZoneStrings UnicodeString **fZoneStrings; // Zone string array set by set ZoneStrings
UnicodeString **fLocaleZoneStrings; // Zone string array created by the locale UnicodeString **fLocaleZoneStrings; // Zone string array created by the locale
int32_t fZoneStringsRowCount; int32_t fZoneStringsRowCount;
int32_t fZoneStringsColCount; int32_t fZoneStringsColCount;
Locale fZSFLocale; // Locale used for getting ZoneStringFormat Locale fZSFLocale; // Locale used for getting ZoneStringFormat
/** /**
* String used for localized GMT. For example, "GMT" * Localized date-time pattern characters. For example: use 'u' as 'y'.
*/
UnicodeString fGmtZero;
/**
* Pattern string used for localized time zone GMT format. For example
, "GMT{0}"
*/
UnicodeString fGmtFormat;
/**
* Pattern strings used for formatting zone offset in a localized time
zone GMT string.
*/ */
UnicodeString *fGmtHourFormats; UnicodeString fLocalPatternChars;
int32_t fGmtHourFormatsCount;
enum GMTHourType {
GMT_NEGATIVE_HMS = 0,
GMT_NEGATIVE_HM,
GMT_POSITIVE_HMS,
GMT_POSITIVE_HM,
GMT_HOUR_COUNT
};
#ifndef U_HIDE_INTERNAL_API
/** /**
* Localized date-time pattern characters. For example: use 'u' as 'y'. * Capitalization transforms. For each usage type, the first array elem
ent indicates
* whether to titlecase for uiListOrMenu context, the second indicates
whether to
* titlecase for stand-alone context.
*/ */
UnicodeString fLocalPatternChars; UBool fCapitalization[kCapContextUsageTypeCount][2];
#endif
private: private:
/** valid/actual locale information /** valid/actual locale information
* these are always ICU locales, so the length should not be a problem * these are always ICU locales, so the length should not be a problem
*/ */
char validLocale[ULOC_FULLNAME_CAPACITY]; char validLocale[ULOC_FULLNAME_CAPACITY];
char actualLocale[ULOC_FULLNAME_CAPACITY]; char actualLocale[ULOC_FULLNAME_CAPACITY];
DateFormatSymbols(); // default constructor not implemented DateFormatSymbols(); // default constructor not implemented
 End of changes. 12 change blocks. 
26 lines changed or deleted 100 lines changed or added


 dtitvfmt.h   dtitvfmt.h 
/************************************************************************** ****** /************************************************************************** ******
* Copyright (C) 2008-2011, International Business Machines Corporation and * Copyright (C) 2008-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* File DTITVFMT.H * File DTITVFMT.H
* *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef __DTITVFMT_H__ #ifndef __DTITVFMT_H__
#define __DTITVFMT_H__ #define __DTITVFMT_H__
skipping to change at line 485 skipping to change at line 485
/** /**
* Gets the date formatter * Gets the date formatter
* @return the date formatter associated with this date interval format ter. * @return the date formatter associated with this date interval format ter.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
const DateFormat* getDateFormat(void) const; const DateFormat* getDateFormat(void) const;
/** /**
* Returns a reference to the TimeZone used by this DateIntervalFormat' s calendar. * Returns a reference to the TimeZone used by this DateIntervalFormat' s calendar.
* @return the time zone associated with the calendar of DateIntervalFo rmat. * @return the time zone associated with the calendar of DateIntervalFo rmat.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const TimeZone& getTimeZone(void) const; virtual const TimeZone& getTimeZone(void) const;
/** /**
* Sets the time zone for the calendar used by this DateIntervalFormat object. The * Sets the time zone for the calendar used by this DateIntervalFormat object. The
* caller no longer owns the TimeZone object and should not delete it a fter this call. * caller no longer owns the TimeZone object and should not delete it a fter this call.
* @param zoneToAdopt the TimeZone to be adopted. * @param zoneToAdopt the TimeZone to be adopted.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual void adoptTimeZone(TimeZone* zoneToAdopt); virtual void adoptTimeZone(TimeZone* zoneToAdopt);
/** /**
* Sets the time zone for the calendar used by this DateIntervalFormat object. * Sets the time zone for the calendar used by this DateIntervalFormat object.
* @param zone the new time zone. * @param zone the new time zone.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual void setTimeZone(const TimeZone& zone); virtual void setTimeZone(const TimeZone& zone);
/** /**
* Return the class ID for this class. This is useful only for comparin g to * Return the class ID for this class. This is useful only for comparin g to
* a return value from getDynamicClassID(). For example: * a return value from getDynamicClassID(). For example:
* <pre> * <pre>
* . Base* polymorphic_pointer = createPolymorphicObject(); * . Base* polymorphic_pointer = createPolymorphicObject();
* . if (polymorphic_pointer->getDynamicClassID() == * . if (polymorphic_pointer->getDynamicClassID() ==
* . erived::getStaticClassID()) ... * . erived::getStaticClassID()) ...
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 dtitvinf.h   dtitvinf.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 2008-2010, International Business Machines Corporation and * Copyright (C) 2008-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
************************************************************************** ***** ************************************************************************** *****
* *
* File DTITVINF.H * File DTITVINF.H
* *
************************************************************************** ***** ************************************************************************** *****
*/ */
#ifndef __DTITVINF_H__ #ifndef __DTITVINF_H__
#define __DTITVINF_H__ #define __DTITVINF_H__
skipping to change at line 28 skipping to change at line 28
* \file * \file
* \brief C++ API: Date/Time interval patterns for formatting date/time int erval * \brief C++ API: Date/Time interval patterns for formatting date/time int erval
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/udat.h" #include "unicode/udat.h"
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/ucal.h" #include "unicode/ucal.h"
#include "unicode/dtptngen.h" #include "unicode/dtptngen.h"
//#include "dtitv_impl.h"
/**
* @internal ICU 4.0
*/
union UHashTok;
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* DateIntervalInfo is a public class for encapsulating localizable * DateIntervalInfo is a public class for encapsulating localizable
* date time interval patterns. It is used by DateIntervalFormat. * date time interval patterns. It is used by DateIntervalFormat.
* *
* <P> * <P>
* For most users, ordinary use of DateIntervalFormat does not need to crea te * For most users, ordinary use of DateIntervalFormat does not need to crea te
* DateIntervalInfo object directly. * DateIntervalInfo object directly.
skipping to change at line 160 skipping to change at line 153
* <P> * <P>
* DateIntervalInfo are not expected to be subclassed. * DateIntervalInfo are not expected to be subclassed.
* Data for a calendar is loaded out of resource bundles. * Data for a calendar is loaded out of resource bundles.
* Through ICU 4.4, date interval patterns are only supported in the Gregor ian * Through ICU 4.4, date interval patterns are only supported in the Gregor ian
* calendar; non-Gregorian calendars are supported from ICU 4.4.1. * calendar; non-Gregorian calendars are supported from ICU 4.4.1.
* @stable ICU 4.0 * @stable ICU 4.0
**/ **/
class U_I18N_API DateIntervalInfo : public UObject { class U_I18N_API DateIntervalInfo : public UObject {
public: public:
#ifndef U_HIDE_INTERNAL_API
/** /**
* Default constructor. * Default constructor.
* It does not initialize any interval patterns except * It does not initialize any interval patterns except
* that it initialize default fall-back pattern as "{0} - {1}", * that it initialize default fall-back pattern as "{0} - {1}",
* which can be reset by setFallbackIntervalPattern(). * which can be reset by setFallbackIntervalPattern().
* It should be followed by setFallbackIntervalPattern() and * It should be followed by setFallbackIntervalPattern() and
* setIntervalPattern(), * setIntervalPattern(),
* and is recommended to be used only for power users who * and is recommended to be used only for power users who
* wants to create their own interval patterns and use them to create * wants to create their own interval patterns and use them to create
* date interval formatter. * date interval formatter.
* @param status output param set to success/failure code on exit * @param status output param set to success/failure code on exit
* @internal ICU 4.0 * @internal ICU 4.0
*/ */
DateIntervalInfo(UErrorCode& status); DateIntervalInfo(UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Construct DateIntervalInfo for the given locale, * Construct DateIntervalInfo for the given locale,
* @param locale the interval patterns are loaded from the appropriate calendar * @param locale the interval patterns are loaded from the appropriate calendar
* data (specified calendar or default calendar) in this locale. * data (specified calendar or default calendar) in this locale.
* @param status output param set to success/failure code on exit * @param status output param set to success/failure code on exit
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
DateIntervalInfo(const Locale& locale, UErrorCode& status); DateIntervalInfo(const Locale& locale, UErrorCode& status);
skipping to change at line 355 skipping to change at line 350
kIPI_ERA, kIPI_ERA,
kIPI_YEAR, kIPI_YEAR,
kIPI_MONTH, kIPI_MONTH,
kIPI_DATE, kIPI_DATE,
kIPI_AM_PM, kIPI_AM_PM,
kIPI_HOUR, kIPI_HOUR,
kIPI_MINUTE, kIPI_MINUTE,
kIPI_MAX_INDEX kIPI_MAX_INDEX
}; };
public: public:
#ifndef U_HIDE_INTERNAL_API
/** /**
* Max index for stored interval patterns * Max index for stored interval patterns
* @internal ICU 4.4 * @internal ICU 4.4
*/ */
enum { enum {
kMaxIntervalPatternIndex = kIPI_MAX_INDEX kMaxIntervalPatternIndex = kIPI_MAX_INDEX
}; };
#endif /* U_HIDE_INTERNAL_API */
private: private:
/** /**
* Initialize the DateIntervalInfo from locale * Initialize the DateIntervalInfo from locale
* @param locale the given locale. * @param locale the given locale.
* @param status output param set to success/failure code on exit * @param status output param set to success/failure code on exit
* @internal ICU 4.0 * @internal ICU 4.0
*/ */
void initializeData(const Locale& locale, UErrorCode& status); void initializeData(const Locale& locale, UErrorCode& status);
 End of changes. 7 change blocks. 
9 lines changed or deleted 6 lines changed or added


 dtptngen.h   dtptngen.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2010, International Business Machines Corporation and * Copyright (C) 2007-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* File DTPTNGEN.H * File DTPTNGEN.H
* *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef __DTPTNGEN_H__ #ifndef __DTPTNGEN_H__
#define __DTPTNGEN_H__ #define __DTPTNGEN_H__
skipping to change at line 356 skipping to change at line 356
* Return a list of all the base skeletons (in canonical form) from thi s class. * Return a list of all the base skeletons (in canonical form) from thi s class.
* *
* @param status Output param set to success/failure code on exit, * @param status Output param set to success/failure code on exit,
* which must not indicate a failure before the function call. * which must not indicate a failure before the function call.
* @return a StringEnumeration with the base skeletons. * @return a StringEnumeration with the base skeletons.
* The caller must delete the object. * The caller must delete the object.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
StringEnumeration* getBaseSkeletons(UErrorCode& status) const; StringEnumeration* getBaseSkeletons(UErrorCode& status) const;
#ifndef U_HIDE_INTERNAL_API
/** /**
* Return a list of redundant patterns are those which if removed, mak e no * Return a list of redundant patterns are those which if removed, mak e no
* difference in the resulting getBestPattern values. This method retu rns a * difference in the resulting getBestPattern values. This method retu rns a
* list of them, to help check the consistency of the patterns used to build * list of them, to help check the consistency of the patterns used to build
* this generator. * this generator.
* *
* @param status Output param set to success/failure code on exit, * @param status Output param set to success/failure code on exit,
* which must not indicate a failure before the function call. * which must not indicate a failure before the function call.
* @return a StringEnumeration with the redundant pattern. * @return a StringEnumeration with the redundant pattern.
* The caller must delete the object. * The caller must delete the object.
* @internal ICU 3.8 * @internal ICU 3.8
*/ */
StringEnumeration* getRedundants(UErrorCode& status); StringEnumeration* getRedundants(UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* The decimal value is used in formatting fractions of seconds. If the * The decimal value is used in formatting fractions of seconds. If the
* skeleton contains fractional seconds, then this is used with the * skeleton contains fractional seconds, then this is used with the
* fractional seconds. For example, suppose that the input pattern is * fractional seconds. For example, suppose that the input pattern is
* "hhmmssSSSS", and the best matching pattern internally is "H:mm:ss", and * "hhmmssSSSS", and the best matching pattern internally is "H:mm:ss", and
* the decimal string is ",". Then the resulting pattern is modified to be * the decimal string is ",". Then the resulting pattern is modified to be
* "H:mm:ss,SSSS" * "H:mm:ss,SSSS"
* *
* @param decimal * @param decimal
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 errorcode.h   errorcode.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2009-2010, International Business Machines * Copyright (C) 2009-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: errorcode.h * file name: errorcode.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2009mar10 * created on: 2009mar10
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 60 skipping to change at line 60
* The ErrorCode base class destructor does nothing. * The ErrorCode base class destructor does nothing.
* *
* Note also: While it is possible for a destructor to throw an exception, * Note also: While it is possible for a destructor to throw an exception,
* it is generally unsafe to do so. This means that in a subclass the destr uctor * it is generally unsafe to do so. This means that in a subclass the destr uctor
* and the handleFailure() function may need to take different actions. * and the handleFailure() function may need to take different actions.
* *
* Sample code: * Sample code:
* \code * \code
* class IcuErrorCode: public icu::ErrorCode { * class IcuErrorCode: public icu::ErrorCode {
* public: * public:
* virtual ~IcuErrorCode() { * virtual ~IcuErrorCode() { // should be defined in .cpp as "key func tion"
* // Safe because our handleFailure() does not throw exceptions. * // Safe because our handleFailure() does not throw exceptions.
* if(isFailure()) { handleFailure(); } * if(isFailure()) { handleFailure(); }
* } * }
* protected: * protected:
* virtual void handleFailure() const { * virtual void handleFailure() const {
* log_failure(u_errorName(errorCode)); * log_failure(u_errorName(errorCode));
* exit(errorCode); * exit(errorCode);
* } * }
* }; * };
* IcuErrorCode error_code; * IcuErrorCode error_code;
skipping to change at line 87 skipping to change at line 87
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
class U_COMMON_API ErrorCode: public UMemory { class U_COMMON_API ErrorCode: public UMemory {
public: public:
/** /**
* Default constructor. Initializes its UErrorCode to U_ZERO_ERROR. * Default constructor. Initializes its UErrorCode to U_ZERO_ERROR.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
ErrorCode() : errorCode(U_ZERO_ERROR) {} ErrorCode() : errorCode(U_ZERO_ERROR) {}
/** Destructor, does nothing. See class documentation for details. @sta ble ICU 4.2 */ /** Destructor, does nothing. See class documentation for details. @sta ble ICU 4.2 */
virtual ~ErrorCode() {} virtual ~ErrorCode();
/** Conversion operator, returns a reference. @stable ICU 4.2 */ /** Conversion operator, returns a reference. @stable ICU 4.2 */
operator UErrorCode & () { return errorCode; } operator UErrorCode & () { return errorCode; }
/** Conversion operator, returns a pointer. @stable ICU 4.2 */ /** Conversion operator, returns a pointer. @stable ICU 4.2 */
operator UErrorCode * () { return &errorCode; } operator UErrorCode * () { return &errorCode; }
/** Tests for U_SUCCESS(). @stable ICU 4.2 */ /** Tests for U_SUCCESS(). @stable ICU 4.2 */
UBool isSuccess() const { return U_SUCCESS(errorCode); } UBool isSuccess() const { return U_SUCCESS(errorCode); }
/** Tests for U_FAILURE(). @stable ICU 4.2 */ /** Tests for U_FAILURE(). @stable ICU 4.2 */
UBool isFailure() const { return U_FAILURE(errorCode); } UBool isFailure() const { return U_FAILURE(errorCode); }
/** Returns the UErrorCode value. @stable ICU 4.2 */ /** Returns the UErrorCode value. @stable ICU 4.2 */
UErrorCode get() const { return errorCode; } UErrorCode get() const { return errorCode; }
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 fmtable.h   fmtable.h 
skipping to change at line 587 skipping to change at line 587
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
/** /**
* ICU "poor man's RTTI", returns a UClassID for this class. * ICU "poor man's RTTI", returns a UClassID for this class.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
static UClassID U_EXPORT2 getStaticClassID(); static UClassID U_EXPORT2 getStaticClassID();
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Deprecated variant of getLong(UErrorCode&). * Deprecated variant of getLong(UErrorCode&).
* @param status the error code * @param status the error code
* @return the long value of this object. * @return the long value of this object.
* @deprecated ICU 3.0 use getLong(UErrorCode&) instead * @deprecated ICU 3.0 use getLong(UErrorCode&) instead
*/ */
inline int32_t getLong(UErrorCode* status) const; inline int32_t getLong(UErrorCode* status) const;
#endif /* U_HIDE_DEPRECATED_API */
#ifndef U_HIDE_INTERNAL_API
/** /**
* Internal function, do not use. * Internal function, do not use.
* TODO: figure out how to make this be non-public. * TODO: figure out how to make this be non-public.
* NumberFormat::format(Formattable, ... * NumberFormat::format(Formattable, ...
* needs to get at the DigitList, if it exists, for * needs to get at the DigitList, if it exists, for
* big decimal formatting. * big decimal formatting.
* @internal * @internal
*/ */
DigitList *getDigitList() const { return fDecimalNum;} DigitList *getDigitList() const { return fDecimalNum;}
/** /**
* Adopt, and set value from, a DigitList * Adopt, and set value from, a DigitList
* Internal Function, do not use. * Internal Function, do not use.
* @param dl the Digit List to be adopted * @param dl the Digit List to be adopted
* @internal * @internal
*/ */
void adoptDigitList(DigitList *dl); void adoptDigitList(DigitList *dl);
#endif /* U_HIDE_INTERNAL_API */
private: private:
/** /**
* Cleans up the memory for unwanted values. For example, the adopted * Cleans up the memory for unwanted values. For example, the adopted
* string or array objects. * string or array objects.
*/ */
void dispose(void); void dispose(void);
/** /**
* Common initialization, for use by constructors. * Common initialization, for use by constructors.
skipping to change at line 664 skipping to change at line 668
} }
inline const UnicodeString& Formattable::getString(void) const { inline const UnicodeString& Formattable::getString(void) const {
return *fValue.fString; return *fValue.fString;
} }
inline UnicodeString& Formattable::getString(void) { inline UnicodeString& Formattable::getString(void) {
return *fValue.fString; return *fValue.fString;
} }
#ifndef U_HIDE_DEPRECATED_API
inline int32_t Formattable::getLong(UErrorCode* status) const { inline int32_t Formattable::getLong(UErrorCode* status) const {
return getLong(*status); return getLong(*status);
} }
#endif
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif //_FMTABLE #endif //_FMTABLE
//eof //eof
 End of changes. 6 change blocks. 
0 lines changed or deleted 6 lines changed or added


 format.h   format.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2010, International Business Machines Corporation and others. * Copyright (C) 1997-2011, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File FORMAT.H * File FORMAT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 03/17/97 clhuang Updated per C++ implementation. * 03/17/97 clhuang Updated per C++ implementation.
skipping to change at line 250 skipping to change at line 250
UErrorCode& status) const; UErrorCode& status) const;
/** Get the locale for this format object. You can choose between valid and actual locale. /** Get the locale for this format object. You can choose between valid and actual locale.
* @param type type of the locale we're looking for (valid or actual) * @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation * @param status error code for the operation
* @return the locale * @return the locale
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
#ifndef U_HIDE_INTERNAL_API
/** Get the locale for this format object. You can choose between valid and actual locale. /** Get the locale for this format object. You can choose between valid and actual locale.
* @param type type of the locale we're looking for (valid or actual) * @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation * @param status error code for the operation
* @return the locale * @return the locale
* @internal * @internal
*/ */
const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) co nst; const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) co nst;
#endif /* U_HIDE_INTERNAL_API */
protected: protected:
/** @stable ICU 2.8 */ /** @stable ICU 2.8 */
void setLocaleIDs(const char* valid, const char* actual); void setLocaleIDs(const char* valid, const char* actual);
protected: protected:
/** /**
* Default constructor for subclass use only. Does nothing. * Default constructor for subclass use only. Does nothing.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 gregocal.h   gregocal.h 
/* /*
* Copyright (C) 1997-2011, International Business Machines Corporation and others. * Copyright (C) 1997-2012, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File GREGOCAL.H * File GREGOCAL.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/22/97 aliu Overhauled header. * 04/22/97 aliu Overhauled header.
* 07/28/98 stephen Sync with JDK 1.2 * 07/28/98 stephen Sync with JDK 1.2
skipping to change at line 377 skipping to change at line 377
* *
* @param field The time field. * @param field The time field.
* @param amount Indicates amount to roll. * @param amount Indicates amount to roll.
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid, this wil l be set to * previously set in the time field is invalid, this wil l be set to
* an error status. * an error status.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode & status); virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode & status);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the minimum value that this field could have, given the curre nt date. * Return the minimum value that this field could have, given the curre nt date.
* For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum(). * For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum().
* @param field the time field. * @param field the time field.
* @return the minimum value that this field could have, given the current date. * @return the minimum value that this field could have, given the current date.
* @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field) instead. * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field) instead.
*/ */
int32_t getActualMinimum(EDateFields field) const; int32_t getActualMinimum(EDateFields field) const;
/** /**
* Return the minimum value that this field could have, given the curre nt date. * Return the minimum value that this field could have, given the curre nt date.
* For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum(). * For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum().
* @param field the time field. * @param field the time field.
* @param status * @param status
* @return the minimum value that this field could have, given the current date. * @return the minimum value that this field could have, given the current date.
* @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field) instead. (Added to ICU 3.0 for signature consistency) * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field) instead. (Added to ICU 3.0 for signature consistency)
*/ */
int32_t getActualMinimum(EDateFields field, UErrorCode& status) const; int32_t getActualMinimum(EDateFields field, UErrorCode& status) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Return the minimum value that this field could have, given the curre nt date. * Return the minimum value that this field could have, given the curre nt date.
* For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum(). * For the Gregorian calendar, this is the same as getMinimum() and get GreatestMinimum().
* @param field the time field. * @param field the time field.
* @param status error result. * @param status error result.
* @return the minimum value that this field could have, given the current date. * @return the minimum value that this field could have, given the current date.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
int32_t getActualMinimum(UCalendarDateFields field, UErrorCode &status) const; int32_t getActualMinimum(UCalendarDateFields field, UErrorCode &status) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the maximum value that this field could have, given the curre nt date. * Return the maximum value that this field could have, given the curre nt date.
* For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
* maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb rew calendar, * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb rew calendar,
* for some years the actual maximum for MONTH is 12, and for others 13 . * for some years the actual maximum for MONTH is 12, and for others 13 .
* @param field the time field. * @param field the time field.
* @return the maximum value that this field could have, given the current date. * @return the maximum value that this field could have, given the current date.
* @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field) instead. * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field) instead.
*/ */
int32_t getActualMaximum(EDateFields field) const; int32_t getActualMaximum(EDateFields field) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Return the maximum value that this field could have, given the curre nt date. * Return the maximum value that this field could have, given the curre nt date.
* For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
* maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb rew calendar, * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb rew calendar,
* for some years the actual maximum for MONTH is 12, and for others 13 . * for some years the actual maximum for MONTH is 12, and for others 13 .
* @param field the time field. * @param field the time field.
* @param status returns any errors that may result from this functio n call. * @param status returns any errors that may result from this functio n call.
* @return the maximum value that this field could have, given the current date. * @return the maximum value that this field could have, given the current date.
* @stable ICU 2.6 * @stable ICU 2.6
skipping to change at line 467 skipping to change at line 471
* *
* Base* polymorphic_pointer = createPolymorphicObject(); * Base* polymorphic_pointer = createPolymorphicObject();
* if (polymorphic_pointer->getDynamicClassID() == * if (polymorphic_pointer->getDynamicClassID() ==
* Derived::getStaticClassID()) ... * Derived::getStaticClassID()) ...
* *
* @return The class ID for all objects of this class. * @return The class ID for all objects of this class.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/** /**
* Get the calendar type, "gregorian", for use in DateFormatSymbols. * Returns the calendar type name string for this Calendar object.
* The returned string is the legacy ICU calendar attribute value,
* for example, "gregorian" or "japanese".
* *
* @return calendar type * For more details see the Calendar::getType() documentation.
* @internal *
* @return legacy calendar type name string
* @draft ICU 49
*/ */
virtual const char * getType() const; virtual const char * getType() const;
private: private:
GregorianCalendar(); // default constructor not implemented GregorianCalendar(); // default constructor not implemented
protected: protected:
/** /**
* Return the ERA. We need a special method for this because the * Return the ERA. We need a special method for this because the
* default ERA is AD, but a zero (unset) ERA is BC. * default ERA is AD, but a zero (unset) ERA is BC.
skipping to change at line 548 skipping to change at line 557
/** /**
* return the length of the month according to the given year. * return the length of the month according to the given year.
* @param month the given month. * @param month the given month.
* @param year the given year. * @param year the given year.
* @return the length of the month * @return the length of the month
* @internal * @internal
*/ */
virtual int32_t monthLength(int32_t month, int32_t year) const; virtual int32_t monthLength(int32_t month, int32_t year) const;
#ifndef U_HIDE_INTERNAL_API
/** /**
* return the length of the given year. * return the length of the given year.
* @param year the given year. * @param year the given year.
* @return the length of the given year. * @return the length of the given year.
* @internal * @internal
*/ */
int32_t yearLength(int32_t year) const; int32_t yearLength(int32_t year) const;
/** /**
* return the length of the year field. * return the length of the year field.
skipping to change at line 571 skipping to change at line 581
int32_t yearLength(void) const; int32_t yearLength(void) const;
/** /**
* After adjustments such as add(MONTH), add(YEAR), we don't want the * After adjustments such as add(MONTH), add(YEAR), we don't want the
* month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar * month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar
* 3, we want it to go to Feb 28. Adjustments which might run into thi s * 3, we want it to go to Feb 28. Adjustments which might run into thi s
* problem call this method to retain the proper month. * problem call this method to retain the proper month.
* @internal * @internal
*/ */
void pinDayOfMonth(void); void pinDayOfMonth(void);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Return the day number with respect to the epoch. January 1, 1970 (G regorian) * Return the day number with respect to the epoch. January 1, 1970 (G regorian)
* is day zero. * is day zero.
* @param status Fill-in parameter which receives the status of this op eration. * @param status Fill-in parameter which receives the status of this op eration.
* @return the day number with respect to the epoch. * @return the day number with respect to the epoch.
* @internal * @internal
*/ */
virtual UDate getEpochDay(UErrorCode& status); virtual UDate getEpochDay(UErrorCode& status);
 End of changes. 10 change blocks. 
4 lines changed or deleted 15 lines changed or added


 icudataver.h   icudataver.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 2009-2010, International Business Machines * Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef __ICU_DATA_VER_H__ #ifndef __ICU_DATA_VER_H__
#define __ICU_DATA_VER_H__ #define __ICU_DATA_VER_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
#ifndef U_HIDE_DRAFT_API
/** /**
* @internal ICU 4.4 * @draft ICU 49
*/ */
#define U_ICU_VERSION_BUNDLE "icuver" #define U_ICU_VERSION_BUNDLE "icuver"
/** /**
* @internal ICU 4.4 * @draft ICU 49
*/
#define U_ICU_STD_BUNDLE "icustd"
/**
* @internal ICU 4.4
*/ */
#define U_ICU_DATA_KEY "DataVersion" #define U_ICU_DATA_KEY "DataVersion"
/** /**
* This function loads up icuver and compares the data version to the wired
-in U_ICU_DATA_VERSION.
* If icuver shows something less than U_ICU_DATA_VERSION it returns TRUE,
else FALSE. The version
* found will be returned in the first fillin parameter (if non-null), and
*isModified will be set
* to TRUE if "icustd" is NOT found. Thus, if the data has been repackaged
or modified, "icustd"
* (standard ICU) will be missing, and the function will alert the caller t
hat the data is not standard.
*
* @param dataVersionFillin icuver data version information to be filled in
if not-null
* @param isModifiedFillin if the data is not standard if not-null
* @param status stores the error code from the calls to resource bundle
*
* @return TRUE if U_ICU_DATA_VERSION is newer than icuver, else FALSE
*
* @internal ICU 4.4
*/
U_INTERNAL UBool U_EXPORT2 u_isDataOlder(UVersionInfo dataVersionFillin, UB
ool *isModifiedFillin, UErrorCode *status);
/**
* Retrieves the data version from icuver and stores it in dataVersionFilli n. * Retrieves the data version from icuver and stores it in dataVersionFilli n.
* *
* @param dataVersionFillin icuver data version information to be filled in if not-null * @param dataVersionFillin icuver data version information to be filled in if not-null
* @param status stores the error code from the calls to resource bundle * @param status stores the error code from the calls to resource bundle
* *
* @internal ICU 4.4 * @draft ICU 49
*/ */
U_INTERNAL void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, U_DRAFT void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UEr
UErrorCode *status); rorCode *status);
#endif /* U_HIDE_DRAFT_API */
#endif #endif
 End of changes. 7 change blocks. 
35 lines changed or deleted 8 lines changed or added


 icuplug.h   icuplug.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 2009-2010, International Business Machines * Copyright (C) 2009-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* FILE NAME : icuplug.h * FILE NAME : icuplug.h
* *
* Date Name Description * Date Name Description
* 10/29/2009 sl New. * 10/29/2009 sl New.
*************************************************************************** *** *************************************************************************** ***
*/ */
skipping to change at line 111 skipping to change at line 111
* \internal ICU 4.4 Technology Preview * \internal ICU 4.4 Technology Preview
*/ */
#ifndef ICUPLUG_H #ifndef ICUPLUG_H
#define ICUPLUG_H #define ICUPLUG_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/* === Basic types === */ /* === Basic types === */
#ifndef U_HIDE_INTERNAL_API
/** /**
* @{ * @{
* Opaque structure passed to/from a plugin. * Opaque structure passed to/from a plugin.
* use the APIs to access it. * use the APIs to access it.
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
struct UPlugData; struct UPlugData;
typedef struct UPlugData UPlugData; typedef struct UPlugData UPlugData;
skipping to change at line 361 skipping to change at line 362
/** /**
* Remove a plugin. * Remove a plugin.
* Will request the plugin to be unloaded, and close the library if needed * Will request the plugin to be unloaded, and close the library if needed
* @param plug plugin handle to close * @param plug plugin handle to close
* @param status error result * @param status error result
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI void U_EXPORT2 U_CAPI void U_EXPORT2
uplug_removePlug(UPlugData *plug, UErrorCode *status); uplug_removePlug(UPlugData *plug, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 idna.h   idna.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: idna.h * file name: idna.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010mar05 * created on: 2010mar05
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 46 skipping to change at line 46
/** /**
* Abstract base class for IDNA processing. * Abstract base class for IDNA processing.
* See http://www.unicode.org/reports/tr46/ * See http://www.unicode.org/reports/tr46/
* and http://www.ietf.org/rfc/rfc3490.txt * and http://www.ietf.org/rfc/rfc3490.txt
* *
* The IDNA class is not intended for public subclassing. * The IDNA class is not intended for public subclassing.
* *
* This C++ API currently only implements UTS #46. * This C++ API currently only implements UTS #46.
* The uidna.h C API implements both UTS #46 (functions using UIDNA service object) * The uidna.h C API implements both UTS #46 (functions using UIDNA service object)
* and IDNA2003 (functions that do not use a service object). * and IDNA2003 (functions that do not use a service object).
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
class U_COMMON_API IDNA : public UObject { class U_COMMON_API IDNA : public UObject {
public: public:
/** /**
* Destructor.
* @stable ICU 4.6
*/
~IDNA();
/**
* Returns an IDNA instance which implements UTS #46. * Returns an IDNA instance which implements UTS #46.
* Returns an unmodifiable instance, owned by the caller. * Returns an unmodifiable instance, owned by the caller.
* Cache it for multiple operations, and delete it when done. * Cache it for multiple operations, and delete it when done.
* The instance is thread-safe, that is, it can be used concurrently. * The instance is thread-safe, that is, it can be used concurrently.
* *
* UTS #46 defines Unicode IDNA Compatibility Processing, * UTS #46 defines Unicode IDNA Compatibility Processing,
* updated to the latest version of Unicode and compatible with both * updated to the latest version of Unicode and compatible with both
* IDNA2003 and IDNA2008. * IDNA2003 and IDNA2008.
* *
* The worker functions use transitional processing, including deviatio n mappings, * The worker functions use transitional processing, including deviatio n mappings,
skipping to change at line 81 skipping to change at line 87
* When the UIDNA_USE_STD3_RULES option is used, ASCII characters other than * When the UIDNA_USE_STD3_RULES option is used, ASCII characters other than
* letters, digits, hyphen (LDH) and dot/full stop are disallowed and m apped to U+FFFD. * letters, digits, hyphen (LDH) and dot/full stop are disallowed and m apped to U+FFFD.
* *
* @param options Bit set to modify the processing and error checking. * @param options Bit set to modify the processing and error checking.
* See option bit set values in uidna.h. * See option bit set values in uidna.h.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the UTS #46 IDNA instance, if successful * @return the UTS #46 IDNA instance, if successful
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
static IDNA * static IDNA *
createUTS46Instance(uint32_t options, UErrorCode &errorCode); createUTS46Instance(uint32_t options, UErrorCode &errorCode);
/** /**
* Converts a single domain name label into its ASCII form for DNS look up. * Converts a single domain name label into its ASCII form for DNS look up.
* If any processing step fails, then info.hasErrors() will be TRUE and * If any processing step fails, then info.hasErrors() will be TRUE and
* the result might not be an ASCII string. * the result might not be an ASCII string.
* The label might be modified according to the types of errors. * The label might be modified according to the types of errors.
* Labels with severe errors will be left in (or turned into) their Uni code form. * Labels with severe errors will be left in (or turned into) their Uni code form.
skipping to change at line 104 skipping to change at line 110
* such as a U_MEMORY_ALLOCATION_ERROR. * such as a U_MEMORY_ALLOCATION_ERROR.
* *
* @param label Input domain name label * @param label Input domain name label
* @param dest Destination string object * @param dest Destination string object
* @param info Output container of IDNA processing details. * @param info Output container of IDNA processing details.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UnicodeString & virtual UnicodeString &
labelToASCII(const UnicodeString &label, UnicodeString &dest, labelToASCII(const UnicodeString &label, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const = 0; IDNAInfo &info, UErrorCode &errorCode) const = 0;
/** /**
* Converts a single domain name label into its Unicode form for human- readable display. * Converts a single domain name label into its Unicode form for human- readable display.
* If any processing step fails, then info.hasErrors() will be TRUE. * If any processing step fails, then info.hasErrors() will be TRUE.
* The label might be modified according to the types of errors. * The label might be modified according to the types of errors.
* *
skipping to change at line 126 skipping to change at line 132
* such as a U_MEMORY_ALLOCATION_ERROR. * such as a U_MEMORY_ALLOCATION_ERROR.
* *
* @param label Input domain name label * @param label Input domain name label
* @param dest Destination string object * @param dest Destination string object
* @param info Output container of IDNA processing details. * @param info Output container of IDNA processing details.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UnicodeString & virtual UnicodeString &
labelToUnicode(const UnicodeString &label, UnicodeString &dest, labelToUnicode(const UnicodeString &label, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const = 0; IDNAInfo &info, UErrorCode &errorCode) const = 0;
/** /**
* Converts a whole domain name into its ASCII form for DNS lookup. * Converts a whole domain name into its ASCII form for DNS lookup.
* If any processing step fails, then info.hasErrors() will be TRUE and * If any processing step fails, then info.hasErrors() will be TRUE and
* the result might not be an ASCII string. * the result might not be an ASCII string.
* The domain name might be modified according to the types of errors. * The domain name might be modified according to the types of errors.
skipping to change at line 150 skipping to change at line 156
* such as a U_MEMORY_ALLOCATION_ERROR. * such as a U_MEMORY_ALLOCATION_ERROR.
* *
* @param name Input domain name * @param name Input domain name
* @param dest Destination string object * @param dest Destination string object
* @param info Output container of IDNA processing details. * @param info Output container of IDNA processing details.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UnicodeString & virtual UnicodeString &
nameToASCII(const UnicodeString &name, UnicodeString &dest, nameToASCII(const UnicodeString &name, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const = 0; IDNAInfo &info, UErrorCode &errorCode) const = 0;
/** /**
* Converts a whole domain name into its Unicode form for human-readabl e display. * Converts a whole domain name into its Unicode form for human-readabl e display.
* If any processing step fails, then info.hasErrors() will be TRUE. * If any processing step fails, then info.hasErrors() will be TRUE.
* The domain name might be modified according to the types of errors. * The domain name might be modified according to the types of errors.
* *
skipping to change at line 172 skipping to change at line 178
* such as a U_MEMORY_ALLOCATION_ERROR. * such as a U_MEMORY_ALLOCATION_ERROR.
* *
* @param name Input domain name * @param name Input domain name
* @param dest Destination string object * @param dest Destination string object
* @param info Output container of IDNA processing details. * @param info Output container of IDNA processing details.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UnicodeString & virtual UnicodeString &
nameToUnicode(const UnicodeString &name, UnicodeString &dest, nameToUnicode(const UnicodeString &name, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const = 0; IDNAInfo &info, UErrorCode &errorCode) const = 0;
// UTF-8 versions of the processing methods --------------------------- - *** // UTF-8 versions of the processing methods --------------------------- - ***
/** /**
* Converts a single domain name label into its ASCII form for DNS look up. * Converts a single domain name label into its ASCII form for DNS look up.
* UTF-8 version of labelToASCII(), same behavior. * UTF-8 version of labelToASCII(), same behavior.
* *
* @param label Input domain name label * @param label Input domain name label
* @param dest Destination byte sink; Flush()ed if successful * @param dest Destination byte sink; Flush()ed if successful
* @param info Output container of IDNA processing details. * @param info Output container of IDNA processing details.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual void virtual void
labelToASCII_UTF8(const StringPiece &label, ByteSink &dest, labelToASCII_UTF8(const StringPiece &label, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const; IDNAInfo &info, UErrorCode &errorCode) const;
/** /**
* Converts a single domain name label into its Unicode form for human- readable display. * Converts a single domain name label into its Unicode form for human- readable display.
* UTF-8 version of labelToUnicode(), same behavior. * UTF-8 version of labelToUnicode(), same behavior.
* *
* @param label Input domain name label * @param label Input domain name label
* @param dest Destination byte sink; Flush()ed if successful * @param dest Destination byte sink; Flush()ed if successful
* @param info Output container of IDNA processing details. * @param info Output container of IDNA processing details.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual void virtual void
labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest, labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const; IDNAInfo &info, UErrorCode &errorCode) const;
/** /**
* Converts a whole domain name into its ASCII form for DNS lookup. * Converts a whole domain name into its ASCII form for DNS lookup.
* UTF-8 version of nameToASCII(), same behavior. * UTF-8 version of nameToASCII(), same behavior.
* *
* @param name Input domain name * @param name Input domain name
* @param dest Destination byte sink; Flush()ed if successful * @param dest Destination byte sink; Flush()ed if successful
* @param info Output container of IDNA processing details. * @param info Output container of IDNA processing details.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual void virtual void
nameToASCII_UTF8(const StringPiece &name, ByteSink &dest, nameToASCII_UTF8(const StringPiece &name, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const; IDNAInfo &info, UErrorCode &errorCode) const;
/** /**
* Converts a whole domain name into its Unicode form for human-readabl e display. * Converts a whole domain name into its Unicode form for human-readabl e display.
* UTF-8 version of nameToUnicode(), same behavior. * UTF-8 version of nameToUnicode(), same behavior.
* *
* @param name Input domain name * @param name Input domain name
* @param dest Destination byte sink; Flush()ed if successful * @param dest Destination byte sink; Flush()ed if successful
* @param info Output container of IDNA processing details. * @param info Output container of IDNA processing details.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual void virtual void
nameToUnicodeUTF8(const StringPiece &name, ByteSink &dest, nameToUnicodeUTF8(const StringPiece &name, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const; IDNAInfo &info, UErrorCode &errorCode) const;
private: private:
// No ICU "poor man's RTTI" for this class nor its subclasses. // No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
}; };
class UTS46; class UTS46;
/** /**
* Output container for IDNA processing errors. * Output container for IDNA processing errors.
* The IDNAInfo class is not suitable for subclassing. * The IDNAInfo class is not suitable for subclassing.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
class U_COMMON_API IDNAInfo : public UMemory { class U_COMMON_API IDNAInfo : public UMemory {
public: public:
/** /**
* Constructor for stack allocation. * Constructor for stack allocation.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
IDNAInfo() : errors(0), labelErrors(0), isTransDiff(FALSE), isBiDi(FALS E), isOkBiDi(TRUE) {} IDNAInfo() : errors(0), labelErrors(0), isTransDiff(FALSE), isBiDi(FALS E), isOkBiDi(TRUE) {}
/** /**
* Were there IDNA processing errors? * Were there IDNA processing errors?
* @return TRUE if there were processing errors * @return TRUE if there were processing errors
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UBool hasErrors() const { return errors!=0; } UBool hasErrors() const { return errors!=0; }
/** /**
* Returns a bit set indicating IDNA processing errors. * Returns a bit set indicating IDNA processing errors.
* See UIDNA_ERROR_... constants in uidna.h. * See UIDNA_ERROR_... constants in uidna.h.
* @return bit set of processing errors * @return bit set of processing errors
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
uint32_t getErrors() const { return errors; } uint32_t getErrors() const { return errors; }
/** /**
* Returns TRUE if transitional and nontransitional processing produce different results. * Returns TRUE if transitional and nontransitional processing produce different results.
* This is the case when the input label or domain name contains * This is the case when the input label or domain name contains
* one or more deviation characters outside a Punycode label (see UTS # 46). * one or more deviation characters outside a Punycode label (see UTS # 46).
* <ul> * <ul>
* <li>With nontransitional processing, such characters are * <li>With nontransitional processing, such characters are
* copied to the destination string. * copied to the destination string.
* <li>With transitional processing, such characters are * <li>With transitional processing, such characters are
* mapped (sharp s/sigma) or removed (joiner/nonjoiner). * mapped (sharp s/sigma) or removed (joiner/nonjoiner).
* </ul> * </ul>
* @return TRUE if transitional and nontransitional processing produce different results * @return TRUE if transitional and nontransitional processing produce different results
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UBool isTransitionalDifferent() const { return isTransDiff; } UBool isTransitionalDifferent() const { return isTransDiff; }
private: private:
friend class UTS46; friend class UTS46;
IDNAInfo(const IDNAInfo &other); // no copying IDNAInfo(const IDNAInfo &other); // no copying
IDNAInfo &operator=(const IDNAInfo &other); // no copying IDNAInfo &operator=(const IDNAInfo &other); // no copying
void reset() { void reset() {
 End of changes. 17 change blocks. 
16 lines changed or deleted 22 lines changed or added


 locdspnm.h   locdspnm.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 2010-2011, International Business Machines Corporation and * Copyright (C) 2010-2011, International Business Machines Corporation and
* * others. All Rights Reserved.
* others. All Rights Reserved.
*
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef LOCDSPNM_H #ifndef LOCDSPNM_H
#define LOCDSPNM_H #define LOCDSPNM_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
skipping to change at line 177 skipping to change at line 177
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& keyValueDisplayName(const char* key, const char* value, virtual UnicodeString& keyValueDisplayName(const char* key, const char* value,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
private: private:
// No ICU "poor man's RTTI" for this class nor its subclasses. // No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
}; };
inline LocaleDisplayNames::~LocaleDisplayNames() {
}
inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& locale) { inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& locale) {
return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES); return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES);
} }
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
#endif #endif
 End of changes. 2 change blocks. 
7 lines changed or deleted 2 lines changed or added


 locid.h   locid.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1996-2011, International Business Machines * Copyright (C) 1996-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* File locid.h * File locid.h
* *
* Created by: Helena Shih * Created by: Helena Shih
* *
* Modification History: * Modification History:
* *
skipping to change at line 322 skipping to change at line 322
* If an error occurs, then NULL is returned. * If an error occurs, then NULL is returned.
* The caller must delete the clone. * The caller must delete the clone.
* *
* @return a clone of this object * @return a clone of this object
* *
* @see getDynamicClassID * @see getDynamicClassID
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
Locale *clone() const; Locale *clone() const;
#ifndef U_HIDE_SYSTEM_API
/** /**
* Common methods of getting the current default Locale. Used for the * Common methods of getting the current default Locale. Used for the
* presentation: menus, dialogs, etc. Generally set once when your appl et or * presentation: menus, dialogs, etc. Generally set once when your appl et or
* application is initialized, then never reset. (If you do reset the * application is initialized, then never reset. (If you do reset the
* default locale, you probably want to reload your GUI, so that the ch ange * default locale, you probably want to reload your GUI, so that the ch ange
* is reflected in your interface.) * is reflected in your interface.)
* *
* More advanced programs will allow users to use different locales for * More advanced programs will allow users to use different locales for
* different fields, e.g. in a spreadsheet. * different fields, e.g. in a spreadsheet.
* *
skipping to change at line 353 skipping to change at line 354
* the default locale ID of the runtime environment. * the default locale ID of the runtime environment.
* *
* @param newLocale Locale to set to. If NULL, set to the value obtain ed * @param newLocale Locale to set to. If NULL, set to the value obtain ed
* from the runtime environement. * from the runtime environement.
* @param success The error code. * @param success The error code.
* @system * @system
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static void U_EXPORT2 setDefault(const Locale& newLocale, static void U_EXPORT2 setDefault(const Locale& newLocale,
UErrorCode& success); UErrorCode& success);
#endif /* U_HIDE_SYSTEM_API */
/** /**
* Creates a locale which has had minimal canonicalization * Creates a locale which has had minimal canonicalization
* as per uloc_getName(). * as per uloc_getName().
* @param name The name to create from. If name is null, * @param name The name to create from. If name is null,
* the default Locale is used. * the default Locale is used.
* @return new locale object * @return new locale object
* @stable ICU 2.0 * @stable ICU 2.0
* @see uloc_getName * @see uloc_getName
*/ */
skipping to change at line 435 skipping to change at line 437
* Gets the list of keywords for the specified locale. * Gets the list of keywords for the specified locale.
* *
* @param status the status code * @param status the status code
* @return pointer to StringEnumeration class, or NULL if there are no keywords. * @return pointer to StringEnumeration class, or NULL if there are no keywords.
* Client must dispose of it by calling delete. * Client must dispose of it by calling delete.
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
StringEnumeration * createKeywords(UErrorCode &status) const; StringEnumeration * createKeywords(UErrorCode &status) const;
/** /**
* Get the value for a keyword. * Gets the value for a keyword.
* *
* @param keywordName name of the keyword for which we want the value. Case insensitive. * @param keywordName name of the keyword for which we want the value. Case insensitive.
* @param buffer The buffer to receive the keyword value. * @param buffer The buffer to receive the keyword value.
* @param bufferCapacity The capacity of receiving buffer * @param bufferCapacity The capacity of receiving buffer
* @param status Returns any error information while performing this op eration. * @param status Returns any error information while performing this op eration.
* @return the length of the keyword value * @return the length of the keyword value
* *
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
int32_t getKeywordValue(const char* keywordName, char *buffer, int32_t bufferCapacity, UErrorCode &status) const; int32_t getKeywordValue(const char* keywordName, char *buffer, int32_t bufferCapacity, UErrorCode &status) const;
#ifndef U_HIDE_DRAFT_API
/** /**
* Set the value for a keyword. * Sets the value for a keyword.
* *
* @param keywordName name of the keyword to be set. Case insensitive. * @param keywordName name of the keyword to be set. Case insensitive.
* @param keywordValue value of the keyword to be set. If 0-length or * @param keywordValue value of the keyword to be set. If 0-length or
* NULL, will result in the keyword being removed. No error is given i f * NULL, will result in the keyword being removed. No error is given i f
* that keyword does not exist. * that keyword does not exist.
* @param status Returns any error information while performing this op eration. * @param status Returns any error information while performing this op eration.
* *
* @internal * @draft ICU 49
*/ */
void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status); void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* returns the locale's three-letter language code, as specified * returns the locale's three-letter language code, as specified
* in ISO draft standard ISO-639-2. * in ISO draft standard ISO-639-2.
* @return An alias to the code, or an empty string * @return An alias to the code, or an empty string
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
const char * getISO3Language() const; const char * getISO3Language() const;
/** /**
skipping to change at line 683 skipping to change at line 687
static UClassID U_EXPORT2 getStaticClassID(); static UClassID U_EXPORT2 getStaticClassID();
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
protected: /* only protected for testing purposes. DO NOT USE. */ protected: /* only protected for testing purposes. DO NOT USE. */
#ifndef U_HIDE_INTERNAL_API
/** /**
* Set this from a single POSIX style locale string. * Set this from a single POSIX style locale string.
* @internal * @internal
*/ */
void setFromPOSIXID(const char *posixID); void setFromPOSIXID(const char *posixID);
#endif /* U_HIDE_INTERNAL_API */
private: private:
/** /**
* Initialize the locale object with a new name. * Initialize the locale object with a new name.
* Was deprecated - used in implementation - moved internal * Was deprecated - used in implementation - moved internal
* *
* @param cLocaleID The new locale name. * @param cLocaleID The new locale name.
* @param canonicalize whether to call uloc_canonicalize on cLocaleID * @param canonicalize whether to call uloc_canonicalize on cLocaleID
*/ */
Locale& init(const char* cLocaleID, UBool canonicalize); Locale& init(const char* cLocaleID, UBool canonicalize);
 End of changes. 10 change blocks. 
4 lines changed or deleted 10 lines changed or added


 loengine.h   loengine.h 
/* /*
* *
* (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
* *
*/ */
#ifndef __LOENGINE_H #ifndef __LOENGINE_H
#define __LOENGINE_H #define __LOENGINE_H
#include "LETypes.h" #include "LETypes.h"
#ifndef U_HIDE_INTERNAL_API
/** /**
* \file * \file
* \brief C API for complex text layout. * \brief C API for complex text layout.
* \internal * \internal
* *
* This is a technology preview. The API may * This is a technology preview. The API may
* change significantly. * change significantly.
* *
*/ */
skipping to change at line 222 skipping to change at line 223
* characer array. (This function is also called by le_close) * characer array. (This function is also called by le_close)
* *
* @param engine - the LayoutEngine * @param engine - the LayoutEngine
* @param success - set to an error code if the operation fails * @param success - set to an error code if the operation fails
* *
* @internal * @internal
*/ */
U_INTERNAL void U_EXPORT2 U_INTERNAL void U_EXPORT2
le_reset(le_engine *engine, le_reset(le_engine *engine,
LEErrorCode *success); LEErrorCode *success);
#endif /* U_HIDE_INTERNAL_API */
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 measfmt.h   measfmt.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (c) 2004-2006, International Business Machines * Copyright (c) 2004-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* Author: Alan Liu * Author: Alan Liu
* Created: April 20, 2004 * Created: April 20, 2004
* Since: ICU 3.0 * Since: ICU 3.0
********************************************************************** **********************************************************************
*/ */
#ifndef MEASUREFORMAT_H #ifndef MEASUREFORMAT_H
#define MEASUREFORMAT_H #define MEASUREFORMAT_H
skipping to change at line 42 skipping to change at line 42
* object using a MeasureFormat factory method. Then use that * object using a MeasureFormat factory method. Then use that
* object's format and parse methods. * object's format and parse methods.
* *
* <p>This is an abstract class. * <p>This is an abstract class.
* *
* @see Format * @see Format
* @author Alan Liu * @author Alan Liu
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
class U_I18N_API MeasureFormat : public Format { class U_I18N_API MeasureFormat : public Format {
public: public:
/**
* Destructor.
* @stable ICU 3.0
*/
virtual ~MeasureFormat();
/** /**
* Return a formatter for CurrencyAmount objects in the given * Return a formatter for CurrencyAmount objects in the given
* locale. * locale.
* @param locale desired locale * @param locale desired locale
* @param ec input-output error code * @param ec input-output error code
* @return a formatter object, or NULL upon error * @return a formatter object, or NULL upon error
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
static MeasureFormat* U_EXPORT2 createCurrencyFormat(const Locale& loca le, static MeasureFormat* U_EXPORT2 createCurrencyFormat(const Locale& loca le,
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added


 messagepattern.h   messagepattern.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2011, International Business Machines * Copyright (C) 2011-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: messagepattern.h * file name: messagepattern.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2011mar14 * created on: 2011mar14
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 63 skipping to change at line 63
* <td>I said {'Wow!'}</td> * <td>I said {'Wow!'}</td>
* <td>I said '{''Wow!''}'</td> * <td>I said '{''Wow!''}'</td>
* <td>(same)</td> * <td>(same)</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>I don't know</td> * <td>I don't know</td>
* <td>I don't know OR<br> I don''t know</td> * <td>I don't know OR<br> I don''t know</td>
* <td>I don''t know</td> * <td>I don''t know</td>
* </tr> * </tr>
* </table> * </table>
* @draft ICU 4.8 * @stable ICU 4.8
* @see UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE * @see UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
*/ */
enum UMessagePatternApostropheMode { enum UMessagePatternApostropheMode {
/** /**
* A literal apostrophe is represented by * A literal apostrophe is represented by
* either a single or a double apostrophe pattern character. * either a single or a double apostrophe pattern character.
* Within a MessageFormat pattern, a single apostrophe only starts quot ed literal text * Within a MessageFormat pattern, a single apostrophe only starts quot ed literal text
* if it immediately precedes a curly brace {}, * if it immediately precedes a curly brace {},
* or a pipe symbol | if inside a choice format, * or a pipe symbol | if inside a choice format,
* or a pound symbol # if inside a plural format. * or a pound symbol # if inside a plural format.
* <p> * <p>
* This is the default behavior starting with ICU 4.8. * This is the default behavior starting with ICU 4.8.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_APOS_DOUBLE_OPTIONAL, UMSGPAT_APOS_DOUBLE_OPTIONAL,
/** /**
* A literal apostrophe must be represented by * A literal apostrophe must be represented by
* a double apostrophe pattern character. * a double apostrophe pattern character.
* A single apostrophe always starts quoted literal text. * A single apostrophe always starts quoted literal text.
* <p> * <p>
* This is the behavior of ICU 4.6 and earlier, and of the JDK. * This is the behavior of ICU 4.6 and earlier, and of the JDK.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_APOS_DOUBLE_REQUIRED UMSGPAT_APOS_DOUBLE_REQUIRED
}; };
/** /**
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
typedef enum UMessagePatternApostropheMode UMessagePatternApostropheMode; typedef enum UMessagePatternApostropheMode UMessagePatternApostropheMode;
/** /**
* MessagePattern::Part type constants. * MessagePattern::Part type constants.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
enum UMessagePatternPartType { enum UMessagePatternPartType {
/** /**
* Start of a message pattern (main or nested). * Start of a message pattern (main or nested).
* The length is 0 for the top-level message * The length is 0 for the top-level message
* and for a choice argument sub-message, otherwise 1 for the '{'. * and for a choice argument sub-message, otherwise 1 for the '{'.
* The value indicates the nesting level, starting with 0 for the main message. * The value indicates the nesting level, starting with 0 for the main message.
* <p> * <p>
* There is always a later MSG_LIMIT part. * There is always a later MSG_LIMIT part.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_MSG_START, UMSGPAT_PART_TYPE_MSG_START,
/** /**
* End of a message pattern (main or nested). * End of a message pattern (main or nested).
* The length is 0 for the top-level message and * The length is 0 for the top-level message and
* the last sub-message of a choice argument, * the last sub-message of a choice argument,
* otherwise 1 for the '}' or (in a choice argument style) the '|'. * otherwise 1 for the '}' or (in a choice argument style) the '|'.
* The value indicates the nesting level, starting with 0 for the main message. * The value indicates the nesting level, starting with 0 for the main message.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_MSG_LIMIT, UMSGPAT_PART_TYPE_MSG_LIMIT,
/** /**
* Indicates a substring of the pattern string which is to be skipped w hen formatting. * Indicates a substring of the pattern string which is to be skipped w hen formatting.
* For example, an apostrophe that begins or ends quoted text * For example, an apostrophe that begins or ends quoted text
* would be indicated with such a part. * would be indicated with such a part.
* The value is undefined and currently always 0. * The value is undefined and currently always 0.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_SKIP_SYNTAX, UMSGPAT_PART_TYPE_SKIP_SYNTAX,
/** /**
* Indicates that a syntax character needs to be inserted for auto-quot ing. * Indicates that a syntax character needs to be inserted for auto-quot ing.
* The length is 0. * The length is 0.
* The value is the character code of the insertion character. (U+0027= APOSTROPHE) * The value is the character code of the insertion character. (U+0027= APOSTROPHE)
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_INSERT_CHAR, UMSGPAT_PART_TYPE_INSERT_CHAR,
/** /**
* Indicates a syntactic (non-escaped) # symbol in a plural variant. * Indicates a syntactic (non-escaped) # symbol in a plural variant.
* When formatting, replace this part's substring with the * When formatting, replace this part's substring with the
* (value-offset) for the plural argument value. * (value-offset) for the plural argument value.
* The value is undefined and currently always 0. * The value is undefined and currently always 0.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_REPLACE_NUMBER, UMSGPAT_PART_TYPE_REPLACE_NUMBER,
/** /**
* Start of an argument. * Start of an argument.
* The length is 1 for the '{'. * The length is 1 for the '{'.
* The value is the ordinal value of the ArgType. Use getArgType(). * The value is the ordinal value of the ArgType. Use getArgType().
* @draft ICU 4.8 * <p>
* This part is followed by either an ARG_NUMBER or ARG_NAME,
* followed by optional argument sub-parts (see UMessagePatternArgType
constants)
* and finally an ARG_LIMIT part.
* @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_START, UMSGPAT_PART_TYPE_ARG_START,
/** /**
* End of an argument. * End of an argument.
* The length is 1 for the '}'. * The length is 1 for the '}'.
* The value is the ordinal value of the ArgType. Use getArgType(). * The value is the ordinal value of the ArgType. Use getArgType().
* <p> * @stable ICU 4.8
* This part is followed by either an ARG_NUMBER or ARG_NAME,
* followed by optional argument sub-parts (see UMessagePatternArgType
constants)
* and finally an ARG_LIMIT part.
* @draft ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_LIMIT, UMSGPAT_PART_TYPE_ARG_LIMIT,
/** /**
* The argument number, provided by the value. * The argument number, provided by the value.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_NUMBER, UMSGPAT_PART_TYPE_ARG_NUMBER,
/** /**
* The argument name. * The argument name.
* The value is undefined and currently always 0. * The value is undefined and currently always 0.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_NAME, UMSGPAT_PART_TYPE_ARG_NAME,
/** /**
* The argument type. * The argument type.
* The value is undefined and currently always 0. * The value is undefined and currently always 0.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_TYPE, UMSGPAT_PART_TYPE_ARG_TYPE,
/** /**
* The argument style text. * The argument style text.
* The value is undefined and currently always 0. * The value is undefined and currently always 0.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_STYLE, UMSGPAT_PART_TYPE_ARG_STYLE,
/** /**
* A selector substring in a "complex" argument style. * A selector substring in a "complex" argument style.
* The value is undefined and currently always 0. * The value is undefined and currently always 0.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_SELECTOR, UMSGPAT_PART_TYPE_ARG_SELECTOR,
/** /**
* An integer value, for example the offset or an explicit selector val ue * An integer value, for example the offset or an explicit selector val ue
* in a PluralFormat style. * in a PluralFormat style.
* The part value is the integer value. * The part value is the integer value.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_INT, UMSGPAT_PART_TYPE_ARG_INT,
/** /**
* A numeric value, for example the offset or an explicit selector valu e * A numeric value, for example the offset or an explicit selector valu e
* in a PluralFormat style. * in a PluralFormat style.
* The part value is an index into an internal array of numeric values; * The part value is an index into an internal array of numeric values;
* use getNumericValue(). * use getNumericValue().
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_PART_TYPE_ARG_DOUBLE UMSGPAT_PART_TYPE_ARG_DOUBLE
}; };
/** /**
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
typedef enum UMessagePatternPartType UMessagePatternPartType; typedef enum UMessagePatternPartType UMessagePatternPartType;
/** /**
* Argument type constants. * Argument type constants.
* Returned by Part.getArgType() for ARG_START and ARG_LIMIT parts. * Returned by Part.getArgType() for ARG_START and ARG_LIMIT parts.
* *
* Messages nested inside an argument are each delimited by MSG_START and M SG_LIMIT, * Messages nested inside an argument are each delimited by MSG_START and M SG_LIMIT,
* with a nesting level one greater than the surrounding message. * with a nesting level one greater than the surrounding message.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
enum UMessagePatternArgType { enum UMessagePatternArgType {
/** /**
* The argument has no specified type. * The argument has no specified type.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_NONE, UMSGPAT_ARG_TYPE_NONE,
/** /**
* The argument has a "simple" type which is provided by the ARG_TYPE p art. * The argument has a "simple" type which is provided by the ARG_TYPE p art.
* An ARG_STYLE part might follow that. * An ARG_STYLE part might follow that.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_SIMPLE, UMSGPAT_ARG_TYPE_SIMPLE,
/** /**
* The argument is a ChoiceFormat with one or more * The argument is a ChoiceFormat with one or more
* ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples. * ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_CHOICE, UMSGPAT_ARG_TYPE_CHOICE,
/** /**
* The argument is a PluralFormat with an optional ARG_INT or ARG_DOUBL E offset * The argument is a PluralFormat with an optional ARG_INT or ARG_DOUBL E offset
* (e.g., offset:1) * (e.g., offset:1)
* and one or more (ARG_SELECTOR [explicit-value] message) tuples. * and one or more (ARG_SELECTOR [explicit-value] message) tuples.
* If the selector has an explicit value (e.g., =2), then * If the selector has an explicit value (e.g., =2), then
* that value is provided by the ARG_INT or ARG_DOUBLE part preceding t he message. * that value is provided by the ARG_INT or ARG_DOUBLE part preceding t he message.
* Otherwise the message immediately follows the ARG_SELECTOR. * Otherwise the message immediately follows the ARG_SELECTOR.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_PLURAL, UMSGPAT_ARG_TYPE_PLURAL,
/** /**
* The argument is a SelectFormat with one or more (ARG_SELECTOR, messa ge) pairs. * The argument is a SelectFormat with one or more (ARG_SELECTOR, messa ge) pairs.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_SELECT UMSGPAT_ARG_TYPE_SELECT
}; };
/** /**
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
typedef enum UMessagePatternArgType UMessagePatternArgType; typedef enum UMessagePatternArgType UMessagePatternArgType;
/**
* @draft ICU 4.8
*/
enum { enum {
/** /**
* Return value from MessagePattern.validateArgumentName() for when * Return value from MessagePattern.validateArgumentName() for when
* the string is a valid "pattern identifier" but not a number. * the string is a valid "pattern identifier" but not a number.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_NAME_NOT_NUMBER=-1, UMSGPAT_ARG_NAME_NOT_NUMBER=-1,
/** /**
* Return value from MessagePattern.validateArgumentName() for when * Return value from MessagePattern.validateArgumentName() for when
* the string is invalid. * the string is invalid.
* It might not be a valid "pattern identifier", * It might not be a valid "pattern identifier",
* or it have only ASCII digits but there is a leading zero or the numb er is too large. * or it have only ASCII digits but there is a leading zero or the numb er is too large.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_NAME_NOT_VALID=-2 UMSGPAT_ARG_NAME_NOT_VALID=-2
}; };
/** /**
* Special value that is returned by getNumericValue(Part) when no * Special value that is returned by getNumericValue(Part) when no
* numeric value is defined for a part. * numeric value is defined for a part.
* @see MessagePattern.getNumericValue() * @see MessagePattern.getNumericValue()
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define UMSGPAT_NO_NUMERIC_VALUE ((double)(-123456789)) #define UMSGPAT_NO_NUMERIC_VALUE ((double)(-123456789))
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class MessagePatternDoubleList; class MessagePatternDoubleList;
class MessagePatternPartsList; class MessagePatternPartsList;
/** /**
* Parses and represents ICU MessageFormat patterns. * Parses and represents ICU MessageFormat patterns.
skipping to change at line 344 skipping to change at line 341
* the less-than-or-equal-to sign (U+2264). * the less-than-or-equal-to sign (U+2264).
* <li>In the pluralStyle, the first, optional numeric Part has the "offs et:" value. * <li>In the pluralStyle, the first, optional numeric Part has the "offs et:" value.
* The optional numeric Part between each (ARG_SELECTOR, message) pai r * The optional numeric Part between each (ARG_SELECTOR, message) pai r
* is the value of an explicit-number selector like "=2", * is the value of an explicit-number selector like "=2",
* otherwise the selector is a non-numeric identifier. * otherwise the selector is a non-numeric identifier.
* <li>The REPLACE_NUMBER Part can occur only in an immediate sub-message of the pluralStyle. * <li>The REPLACE_NUMBER Part can occur only in an immediate sub-message of the pluralStyle.
* </ul> * </ul>
* <p> * <p>
* This class is not intended for public subclassing. * This class is not intended for public subclassing.
* *
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API MessagePattern : public UObject { class U_COMMON_API MessagePattern : public UObject {
public: public:
/** /**
* Constructs an empty MessagePattern with default UMessagePatternApost ropheMode. * Constructs an empty MessagePattern with default UMessagePatternApost ropheMode.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern(UErrorCode &errorCode); MessagePattern(UErrorCode &errorCode);
/** /**
* Constructs an empty MessagePattern. * Constructs an empty MessagePattern.
* @param mode Explicit UMessagePatternApostropheMode. * @param mode Explicit UMessagePatternApostropheMode.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCod e); MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCod e);
/** /**
* Constructs a MessagePattern with default UMessagePatternApostropheMo de and * Constructs a MessagePattern with default UMessagePatternApostropheMo de and
* parses the MessageFormat pattern string. * parses the MessageFormat pattern string.
* @param pattern a MessageFormat pattern string * @param pattern a MessageFormat pattern string
* @param parseError Struct to receive information on the position * @param parseError Struct to receive information on the position
* of an error within the pattern. * of an error within the pattern.
* Can be NULL. * Can be NULL.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* TODO: turn @throws into UErrorCode specifics? * TODO: turn @throws into UErrorCode specifics?
* @throws IllegalArgumentException for syntax errors in the pattern st ring * @throws IllegalArgumentException for syntax errors in the pattern st ring
* @throws IndexOutOfBoundsException if certain limits are exceeded * @throws IndexOutOfBoundsException if certain limits are exceeded
* (e.g., argument number too high, argument name too long, etc .) * (e.g., argument number too high, argument name too long, etc .)
* @throws NumberFormatException if a number could not be parsed * @throws NumberFormatException if a number could not be parsed
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern(const UnicodeString &pattern, UParseError *parseError, U ErrorCode &errorCode); MessagePattern(const UnicodeString &pattern, UParseError *parseError, U ErrorCode &errorCode);
/** /**
* Copy constructor. * Copy constructor.
* @param other Object to copy. * @param other Object to copy.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern(const MessagePattern &other); MessagePattern(const MessagePattern &other);
/** /**
* Assignment operator. * Assignment operator.
* @param other Object to copy. * @param other Object to copy.
* @return *this=other * @return *this=other
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern &operator=(const MessagePattern &other); MessagePattern &operator=(const MessagePattern &other);
/** /**
* Destructor. * Destructor.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual ~MessagePattern(); virtual ~MessagePattern();
/** /**
* Parses a MessageFormat pattern string. * Parses a MessageFormat pattern string.
* @param pattern a MessageFormat pattern string * @param pattern a MessageFormat pattern string
* @param parseError Struct to receive information on the position * @param parseError Struct to receive information on the position
* of an error within the pattern. * of an error within the pattern.
* Can be NULL. * Can be NULL.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return *this * @return *this
* @throws IllegalArgumentException for syntax errors in the pattern st ring * @throws IllegalArgumentException for syntax errors in the pattern st ring
* @throws IndexOutOfBoundsException if certain limits are exceeded * @throws IndexOutOfBoundsException if certain limits are exceeded
* (e.g., argument number too high, argument name too long, etc .) * (e.g., argument number too high, argument name too long, etc .)
* @throws NumberFormatException if a number could not be parsed * @throws NumberFormatException if a number could not be parsed
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern &parse(const UnicodeString &pattern, MessagePattern &parse(const UnicodeString &pattern,
UParseError *parseError, UErrorCode &errorCode); UParseError *parseError, UErrorCode &errorCode);
/** /**
* Parses a ChoiceFormat pattern string. * Parses a ChoiceFormat pattern string.
* @param pattern a ChoiceFormat pattern string * @param pattern a ChoiceFormat pattern string
* @param parseError Struct to receive information on the position * @param parseError Struct to receive information on the position
* of an error within the pattern. * of an error within the pattern.
* Can be NULL. * Can be NULL.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return *this * @return *this
* @throws IllegalArgumentException for syntax errors in the pattern st ring * @throws IllegalArgumentException for syntax errors in the pattern st ring
* @throws IndexOutOfBoundsException if certain limits are exceeded * @throws IndexOutOfBoundsException if certain limits are exceeded
* (e.g., argument number too high, argument name too long, etc .) * (e.g., argument number too high, argument name too long, etc .)
* @throws NumberFormatException if a number could not be parsed * @throws NumberFormatException if a number could not be parsed
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern &parseChoiceStyle(const UnicodeString &pattern, MessagePattern &parseChoiceStyle(const UnicodeString &pattern,
UParseError *parseError, UErrorCode &e rrorCode); UParseError *parseError, UErrorCode &e rrorCode);
/** /**
* Parses a PluralFormat pattern string. * Parses a PluralFormat pattern string.
* @param pattern a PluralFormat pattern string * @param pattern a PluralFormat pattern string
* @param parseError Struct to receive information on the position * @param parseError Struct to receive information on the position
* of an error within the pattern. * of an error within the pattern.
* Can be NULL. * Can be NULL.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return *this * @return *this
* @throws IllegalArgumentException for syntax errors in the pattern st ring * @throws IllegalArgumentException for syntax errors in the pattern st ring
* @throws IndexOutOfBoundsException if certain limits are exceeded * @throws IndexOutOfBoundsException if certain limits are exceeded
* (e.g., argument number too high, argument name too long, etc .) * (e.g., argument number too high, argument name too long, etc .)
* @throws NumberFormatException if a number could not be parsed * @throws NumberFormatException if a number could not be parsed
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern &parsePluralStyle(const UnicodeString &pattern, MessagePattern &parsePluralStyle(const UnicodeString &pattern,
UParseError *parseError, UErrorCode &e rrorCode); UParseError *parseError, UErrorCode &e rrorCode);
/** /**
* Parses a SelectFormat pattern string. * Parses a SelectFormat pattern string.
* @param pattern a SelectFormat pattern string * @param pattern a SelectFormat pattern string
* @param parseError Struct to receive information on the position * @param parseError Struct to receive information on the position
* of an error within the pattern. * of an error within the pattern.
* Can be NULL. * Can be NULL.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return *this * @return *this
* @throws IllegalArgumentException for syntax errors in the pattern st ring * @throws IllegalArgumentException for syntax errors in the pattern st ring
* @throws IndexOutOfBoundsException if certain limits are exceeded * @throws IndexOutOfBoundsException if certain limits are exceeded
* (e.g., argument number too high, argument name too long, etc .) * (e.g., argument number too high, argument name too long, etc .)
* @throws NumberFormatException if a number could not be parsed * @throws NumberFormatException if a number could not be parsed
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
MessagePattern &parseSelectStyle(const UnicodeString &pattern, MessagePattern &parseSelectStyle(const UnicodeString &pattern,
UParseError *parseError, UErrorCode &e rrorCode); UParseError *parseError, UErrorCode &e rrorCode);
/** /**
* Clears this MessagePattern. * Clears this MessagePattern.
* countParts() will return 0. * countParts() will return 0.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
void clear(); void clear();
/** /**
* Clears this MessagePattern and sets the UMessagePatternApostropheMod e. * Clears this MessagePattern and sets the UMessagePatternApostropheMod e.
* countParts() will return 0. * countParts() will return 0.
* @param mode The new UMessagePatternApostropheMode. * @param mode The new UMessagePatternApostropheMode.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
void clearPatternAndSetApostropheMode(UMessagePatternApostropheMode mod e) { void clearPatternAndSetApostropheMode(UMessagePatternApostropheMode mod e) {
clear(); clear();
aposMode=mode; aposMode=mode;
} }
/** /**
* @param other another object to compare with. * @param other another object to compare with.
* @return TRUE if this object is equivalent to the other one. * @return TRUE if this object is equivalent to the other one.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool operator==(const MessagePattern &other) const; UBool operator==(const MessagePattern &other) const;
/** /**
* @param other another object to compare with. * @param other another object to compare with.
* @return FALSE if this object is equivalent to the other one. * @return FALSE if this object is equivalent to the other one.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UBool operator!=(const MessagePattern &other) const { inline UBool operator!=(const MessagePattern &other) const {
return !operator==(other); return !operator==(other);
} }
/** /**
* @return A hash code for this object. * @return A hash code for this object.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t hashCode() const; int32_t hashCode() const;
/** /**
* @return this instance's UMessagePatternApostropheMode. * @return this instance's UMessagePatternApostropheMode.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMessagePatternApostropheMode getApostropheMode() const { UMessagePatternApostropheMode getApostropheMode() const {
return aposMode; return aposMode;
} }
// Java has package-private jdkAposMode() here. // Java has package-private jdkAposMode() here.
// In C++, this is declared in the MessageImpl class. // In C++, this is declared in the MessageImpl class.
/** /**
* @return the parsed pattern string (null if none was parsed). * @return the parsed pattern string (null if none was parsed).
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
const UnicodeString &getPatternString() const { const UnicodeString &getPatternString() const {
return msg; return msg;
} }
/** /**
* Does the parsed pattern have named arguments like {first_name}? * Does the parsed pattern have named arguments like {first_name}?
* @return TRUE if the parsed pattern has at least one named argument. * @return TRUE if the parsed pattern has at least one named argument.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool hasNamedArguments() const { UBool hasNamedArguments() const {
return hasArgNames; return hasArgNames;
} }
/** /**
* Does the parsed pattern have numbered arguments like {2}? * Does the parsed pattern have numbered arguments like {2}?
* @return TRUE if the parsed pattern has at least one numbered argumen t. * @return TRUE if the parsed pattern has at least one numbered argumen t.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool hasNumberedArguments() const { UBool hasNumberedArguments() const {
return hasArgNumbers; return hasArgNumbers;
} }
/** /**
* Validates and parses an argument name or argument number string. * Validates and parses an argument name or argument number string.
* An argument name must be a "pattern identifier", that is, it must co ntain * An argument name must be a "pattern identifier", that is, it must co ntain
* no Unicode Pattern_Syntax or Pattern_White_Space characters. * no Unicode Pattern_Syntax or Pattern_White_Space characters.
* If it only contains ASCII digits, then it must be a small integer wi th no leading zero. * If it only contains ASCII digits, then it must be a small integer wi th no leading zero.
* @param name Input string. * @param name Input string.
* @return &gt;=0 if the name is a valid number, * @return &gt;=0 if the name is a valid number,
* ARG_NAME_NOT_NUMBER (-1) if it is a "pattern identifier" but not all ASCII digits, * ARG_NAME_NOT_NUMBER (-1) if it is a "pattern identifier" but not all ASCII digits,
* ARG_NAME_NOT_VALID (-2) if it is neither. * ARG_NAME_NOT_VALID (-2) if it is neither.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
static int32_t validateArgumentName(const UnicodeString &name); static int32_t validateArgumentName(const UnicodeString &name);
/** /**
* Returns a version of the parsed pattern string where each ASCII apos trophe * Returns a version of the parsed pattern string where each ASCII apos trophe
* is doubled (escaped) if it is not already, and if it is not interpre ted as quoting syntax. * is doubled (escaped) if it is not already, and if it is not interpre ted as quoting syntax.
* <p> * <p>
* For example, this turns "I don't '{know}' {gender,select,female{h''e r}other{h'im}}." * For example, this turns "I don't '{know}' {gender,select,female{h''e r}other{h'im}}."
* into "I don''t '{know}' {gender,select,female{h''er}other{h''im}}." * into "I don''t '{know}' {gender,select,female{h''er}other{h''im}}."
* @return the deep-auto-quoted version of the parsed pattern string. * @return the deep-auto-quoted version of the parsed pattern string.
* @see MessageFormat.autoQuoteApostrophe() * @see MessageFormat.autoQuoteApostrophe()
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UnicodeString autoQuoteApostropheDeep() const; UnicodeString autoQuoteApostropheDeep() const;
class Part; class Part;
/** /**
* Returns the number of "parts" created by parsing the pattern string. * Returns the number of "parts" created by parsing the pattern string.
* Returns 0 if no pattern has been parsed or clear() was called. * Returns 0 if no pattern has been parsed or clear() was called.
* @return the number of pattern parts. * @return the number of pattern parts.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t countParts() const { int32_t countParts() const {
return partsLength; return partsLength;
} }
/** /**
* Gets the i-th pattern "part". * Gets the i-th pattern "part".
* @param i The index of the Part data. (0..countParts()-1) * @param i The index of the Part data. (0..countParts()-1)
* @return the i-th pattern "part". * @return the i-th pattern "part".
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
const Part &getPart(int32_t i) const { const Part &getPart(int32_t i) const {
return parts[i]; return parts[i];
} }
/** /**
* Returns the UMessagePatternPartType of the i-th pattern "part". * Returns the UMessagePatternPartType of the i-th pattern "part".
* Convenience method for getPart(i).getType(). * Convenience method for getPart(i).getType().
* @param i The index of the Part data. (0..countParts()-1) * @param i The index of the Part data. (0..countParts()-1)
* @return The UMessagePatternPartType of the i-th Part. * @return The UMessagePatternPartType of the i-th Part.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMessagePatternPartType getPartType(int32_t i) const { UMessagePatternPartType getPartType(int32_t i) const {
return getPart(i).type; return getPart(i).type;
} }
/** /**
* Returns the pattern index of the specified pattern "part". * Returns the pattern index of the specified pattern "part".
* Convenience method for getPart(partIndex).getIndex(). * Convenience method for getPart(partIndex).getIndex().
* @param partIndex The index of the Part data. (0..countParts()-1) * @param partIndex The index of the Part data. (0..countParts()-1)
* @return The pattern index of this Part. * @return The pattern index of this Part.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getPatternIndex(int32_t partIndex) const { int32_t getPatternIndex(int32_t partIndex) const {
return getPart(partIndex).index; return getPart(partIndex).index;
} }
/** /**
* Returns the substring of the pattern string indicated by the Part. * Returns the substring of the pattern string indicated by the Part.
* Convenience method for getPatternString().substring(part.getIndex(), part.getLimit()). * Convenience method for getPatternString().substring(part.getIndex(), part.getLimit()).
* @param part a part of this MessagePattern. * @param part a part of this MessagePattern.
* @return the substring associated with part. * @return the substring associated with part.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UnicodeString getSubstring(const Part &part) const { UnicodeString getSubstring(const Part &part) const {
return msg.tempSubString(part.index, part.length); return msg.tempSubString(part.index, part.length);
} }
/** /**
* Compares the part's substring with the input string s. * Compares the part's substring with the input string s.
* @param part a part of this MessagePattern. * @param part a part of this MessagePattern.
* @param s a string. * @param s a string.
* @return TRUE if getSubstring(part).equals(s). * @return TRUE if getSubstring(part).equals(s).
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool partSubstringMatches(const Part &part, const UnicodeString &s) co nst { UBool partSubstringMatches(const Part &part, const UnicodeString &s) co nst {
return 0==msg.compare(part.index, part.length, s); return 0==msg.compare(part.index, part.length, s);
} }
/** /**
* Returns the numeric value associated with an ARG_INT or ARG_DOUBLE. * Returns the numeric value associated with an ARG_INT or ARG_DOUBLE.
* @param part a part of this MessagePattern. * @param part a part of this MessagePattern.
* @return the part's numeric value, or UMSGPAT_NO_NUMERIC_VALUE if thi s is not a numeric part. * @return the part's numeric value, or UMSGPAT_NO_NUMERIC_VALUE if thi s is not a numeric part.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
double getNumericValue(const Part &part) const; double getNumericValue(const Part &part) const;
/** /**
* Returns the "offset:" value of a PluralFormat argument, or 0 if none is specified. * Returns the "offset:" value of a PluralFormat argument, or 0 if none is specified.
* @param pluralStart the index of the first PluralFormat argument styl e part. (0..countParts()-1) * @param pluralStart the index of the first PluralFormat argument styl e part. (0..countParts()-1)
* @return the "offset:" value. * @return the "offset:" value.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
double getPluralOffset(int32_t pluralStart) const; double getPluralOffset(int32_t pluralStart) const;
/** /**
* Returns the index of the ARG|MSG_LIMIT part corresponding to the ARG |MSG_START at start. * Returns the index of the ARG|MSG_LIMIT part corresponding to the ARG |MSG_START at start.
* @param start The index of some Part data (0..countParts()-1); * @param start The index of some Part data (0..countParts()-1);
* this Part should be of Type ARG_START or MSG_START. * this Part should be of Type ARG_START or MSG_START.
* @return The first i>start where getPart(i).getType()==ARG|MSG_LIMIT at the same nesting level, * @return The first i>start where getPart(i).getType()==ARG|MSG_LIMIT at the same nesting level,
* or start itself if getPartType(msgStart)!=ARG|MSG_START. * or start itself if getPartType(msgStart)!=ARG|MSG_START.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getLimitPartIndex(int32_t start) const { int32_t getLimitPartIndex(int32_t start) const {
int32_t limit=getPart(start).limitPartIndex; int32_t limit=getPart(start).limitPartIndex;
if(limit<start) { if(limit<start) {
return start; return start;
} }
return limit; return limit;
} }
/** /**
* A message pattern "part", representing a pattern parsing event. * A message pattern "part", representing a pattern parsing event.
* There is a part for the start and end of a message or argument, * There is a part for the start and end of a message or argument,
* for quoting and escaping of and with ASCII apostrophes, * for quoting and escaping of and with ASCII apostrophes,
* and for syntax elements of "complex" arguments. * and for syntax elements of "complex" arguments.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class Part : public UMemory { class Part : public UMemory {
public: public:
/** /**
* Default constructor, do not use. * Default constructor, do not use.
* @internal * @internal
*/ */
Part() {} Part() {}
/** /**
* Returns the type of this part. * Returns the type of this part.
* @return the part type. * @return the part type.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMessagePatternPartType getType() const { UMessagePatternPartType getType() const {
return type; return type;
} }
/** /**
* Returns the pattern string index associated with this Part. * Returns the pattern string index associated with this Part.
* @return this part's pattern string index. * @return this part's pattern string index.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getIndex() const { int32_t getIndex() const {
return index; return index;
} }
/** /**
* Returns the length of the pattern substring associated with this Part. * Returns the length of the pattern substring associated with this Part.
* This is 0 for some parts. * This is 0 for some parts.
* @return this part's pattern string index. * @return this part's pattern substring length.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getLength() const { int32_t getLength() const {
return length; return length;
} }
/** /**
* Returns the pattern string limit (exclusive-end) index associate d with this Part. * Returns the pattern string limit (exclusive-end) index associate d with this Part.
* Convenience method for getIndex()+getLength(). * Convenience method for getIndex()+getLength().
* @return this part's pattern string limit index, same as getIndex ()+getLength(). * @return this part's pattern string limit index, same as getIndex ()+getLength().
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getLimit() const { int32_t getLimit() const {
return index+length; return index+length;
} }
/** /**
* Returns a value associated with this part. * Returns a value associated with this part.
* See the documentation of each part type for details. * See the documentation of each part type for details.
* @return the part value. * @return the part value.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getValue() const { int32_t getValue() const {
return value; return value;
} }
/** /**
* Returns the argument type if this part is of type ARG_START or A RG_LIMIT, * Returns the argument type if this part is of type ARG_START or A RG_LIMIT,
* otherwise UMSGPAT_ARG_TYPE_NONE. * otherwise UMSGPAT_ARG_TYPE_NONE.
* @return the argument type for this part. * @return the argument type for this part.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMessagePatternArgType getArgType() const { UMessagePatternArgType getArgType() const {
UMessagePatternPartType type=getType(); UMessagePatternPartType type=getType();
if(type==UMSGPAT_PART_TYPE_ARG_START || type==UMSGPAT_PART_TYPE _ARG_LIMIT) { if(type==UMSGPAT_PART_TYPE_ARG_START || type==UMSGPAT_PART_TYPE _ARG_LIMIT) {
return (UMessagePatternArgType)value; return (UMessagePatternArgType)value;
} else { } else {
return UMSGPAT_ARG_TYPE_NONE; return UMSGPAT_ARG_TYPE_NONE;
} }
} }
/** /**
* Indicates whether the Part type has a numeric value. * Indicates whether the Part type has a numeric value.
* If so, then that numeric value can be retrieved via MessagePatte rn.getNumericValue(). * If so, then that numeric value can be retrieved via MessagePatte rn.getNumericValue().
* @param type The Part type to be tested. * @param type The Part type to be tested.
* @return TRUE if the Part type has a numeric value. * @return TRUE if the Part type has a numeric value.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
static UBool hasNumericValue(UMessagePatternPartType type) { static UBool hasNumericValue(UMessagePatternPartType type) {
return type==UMSGPAT_PART_TYPE_ARG_INT || type==UMSGPAT_PART_TY PE_ARG_DOUBLE; return type==UMSGPAT_PART_TYPE_ARG_INT || type==UMSGPAT_PART_TY PE_ARG_DOUBLE;
} }
/** /**
* @param other another object to compare with. * @param other another object to compare with.
* @return TRUE if this object is equivalent to the other one. * @return TRUE if this object is equivalent to the other one.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool operator==(const Part &other) const; UBool operator==(const Part &other) const;
/** /**
* @param other another object to compare with. * @param other another object to compare with.
* @return FALSE if this object is equivalent to the other one. * @return FALSE if this object is equivalent to the other one.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UBool operator!=(const Part &other) const { inline UBool operator!=(const Part &other) const {
return !operator==(other); return !operator==(other);
} }
/** /**
* @return A hash code for this object. * @return A hash code for this object.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t hashCode() const { int32_t hashCode() const {
return ((type*37+index)*37+length)*37+value; return ((type*37+index)*37+length)*37+value;
} }
private: private:
friend class MessagePattern; friend class MessagePattern;
static const int32_t MAX_LENGTH=0xffff; static const int32_t MAX_LENGTH=0xffff;
static const int32_t MAX_VALUE=0x7fff; static const int32_t MAX_VALUE=0x7fff;
 End of changes. 74 change blocks. 
82 lines changed or deleted 79 lines changed or added


 msgfmt.h   msgfmt.h 
/* /*
* Copyright (C) 2007-2011, International Business Machines Corporation and * Copyright (C) 2007-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File MSGFMT.H * File MSGFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 03/20/97 helena Finished first cut of implementation. * 03/20/97 helena Finished first cut of implementation.
skipping to change at line 147 skipping to change at line 147
* <li>In argStyleText, every single ASCII apostrophe begins and ends quo ted literal text, * <li>In argStyleText, every single ASCII apostrophe begins and ends quo ted literal text,
* and unquoted {curly braces} must occur in matched pairs. * and unquoted {curly braces} must occur in matched pairs.
* </ul> * </ul>
* *
* <p>Recommendation: Use the real apostrophe (single quote) character * <p>Recommendation: Use the real apostrophe (single quote) character
* \htmlonly&#x2019;\endhtmlonly (U+2019) for * \htmlonly&#x2019;\endhtmlonly (U+2019) for
* human-readable text, and use the ASCII apostrophe ' (U+0027) * human-readable text, and use the ASCII apostrophe ' (U+0027)
* only in program syntax, like quoting in MessageFormat. * only in program syntax, like quoting in MessageFormat.
* See the annotations for U+0027 Apostrophe in The Unicode Standard. * See the annotations for U+0027 Apostrophe in The Unicode Standard.
* *
* <p>The <code>choice</code> argument type is deprecated.
* Use <code>plural</code> arguments for proper plural selection,
* and <code>select</code> arguments for simple selection among a fixed set
of choices.
*
* <p>The <code>argType</code> and <code>argStyle</code> values are used to create * <p>The <code>argType</code> and <code>argStyle</code> values are used to create
* a <code>Format</code> instance for the format element. The following * a <code>Format</code> instance for the format element. The following
* table shows how the values map to Format instances. Combinations not * table shows how the values map to Format instances. Combinations not
* shown in the table are illegal. Any <code>argStyleText</code> must * shown in the table are illegal. Any <code>argStyleText</code> must
* be a valid pattern string for the Format subclass used. * be a valid pattern string for the Format subclass used.
* *
* <p><table border=1> * <p><table border=1>
* <tr> * <tr>
* <th>argType * <th>argType
* <th>argStyle * <th>argStyle
skipping to change at line 320 skipping to change at line 324
* *
* <p>MessageFormats are not synchronized. * <p>MessageFormats are not synchronized.
* It is recommended to create separate format instances for each thread. * It is recommended to create separate format instances for each thread.
* If multiple threads access a format concurrently, it must be synchronize d * If multiple threads access a format concurrently, it must be synchronize d
* externally. * externally.
* *
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
class U_I18N_API MessageFormat : public Format { class U_I18N_API MessageFormat : public Format {
public: public:
#ifndef U_HIDE_OBSOLETE_API
/** /**
* Enum type for kMaxFormat. * Enum type for kMaxFormat.
* @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6, * @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6,
* rendering this enum type obsolete. * rendering this enum type obsolete.
*/ */
enum EFormatNumber { enum EFormatNumber {
/** /**
* The maximum number of arguments. * The maximum number of arguments.
* @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6, * @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6,
* rendering this constant obsolete. * rendering this constant obsolete.
*/ */
kMaxFormat = 10 kMaxFormat = 10
}; };
#endif /* U_HIDE_OBSOLETE_API */
/** /**
* Constructs a new MessageFormat using the given pattern and the * Constructs a new MessageFormat using the given pattern and the
* default locale. * default locale.
* *
* @param pattern Pattern used to construct object. * @param pattern Pattern used to construct object.
* @param status Input/output error code. If the * @param status Input/output error code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 460 skipping to change at line 466
* This method is best used only once on a given object to avoid confus ion about the mode, * This method is best used only once on a given object to avoid confus ion about the mode,
* and after constructing the object with an empty pattern string to mi nimize overhead. * and after constructing the object with an empty pattern string to mi nimize overhead.
* *
* @param pattern The pattern to be applied. * @param pattern The pattern to be applied.
* @param aposMode The new apostrophe mode. * @param aposMode The new apostrophe mode.
* @param parseError Struct to receive information on the position * @param parseError Struct to receive information on the position
* of an error within the pattern. * of an error within the pattern.
* Can be NULL. * Can be NULL.
* @param status Input/output error code. If the * @param status Input/output error code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual void applyPattern(const UnicodeString& pattern, virtual void applyPattern(const UnicodeString& pattern,
UMessagePatternApostropheMode aposMode, UMessagePatternApostropheMode aposMode,
UParseError* parseError, UParseError* parseError,
UErrorCode& status); UErrorCode& status);
/** /**
* @return this instance's UMessagePatternApostropheMode. * @return this instance's UMessagePatternApostropheMode.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UMessagePatternApostropheMode getApostropheMode() const { UMessagePatternApostropheMode getApostropheMode() const {
return msgPattern.getApostropheMode(); return msgPattern.getApostropheMode();
} }
/** /**
* Returns a pattern that can be used to recreate this object. * Returns a pattern that can be used to recreate this object.
* *
* @param appendTo Output parameter to receive the pattern. * @param appendTo Output parameter to receive the pattern.
* Result is appended to existing contents. * Result is appended to existing contents.
skipping to change at line 813 skipping to change at line 819
/** /**
* Returns true if this MessageFormat uses named arguments, * Returns true if this MessageFormat uses named arguments,
* and false otherwise. See class description. * and false otherwise. See class description.
* *
* @return true if named arguments are used. * @return true if named arguments are used.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UBool usesNamedArguments() const; UBool usesNamedArguments() const;
#ifndef U_HIDE_INTERNAL_API
/** /**
* This API is for ICU internal use only. * This API is for ICU internal use only.
* Please do not use it. * Please do not use it.
* *
* Returns argument types count in the parsed pattern. * Returns argument types count in the parsed pattern.
* Used to distinguish pattern "{0} d" and "d". * Used to distinguish pattern "{0} d" and "d".
* *
* @return The number of formattable types in the pattern * @return The number of formattable types in the pattern
* @internal * @internal
*/ */
int32_t getArgTypeCount() const; int32_t getArgTypeCount() const;
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. * Returns a unique class ID POLYMORPHICALLY. Pure virtual override.
* This method is to implement a simple version of RTTI, since not all * This method is to implement a simple version of RTTI, since not all
* C++ compilers support genuine RTTI. Polymorphic operator==() and * C++ compilers support genuine RTTI. Polymorphic operator==() and
* clone() methods call this method. * clone() methods call this method.
* *
* @return The class ID for this object. All objects of a * @return The class ID for this object. All objects of a
* given class have the same class ID. Objects of * given class have the same class ID. Objects of
* other classes have different class IDs. * other classes have different class IDs.
skipping to change at line 851 skipping to change at line 859
* <pre> * <pre>
* . Base* polymorphic_pointer = createPolymorphicObject(); * . Base* polymorphic_pointer = createPolymorphicObject();
* . if (polymorphic_pointer->getDynamicClassID() == * . if (polymorphic_pointer->getDynamicClassID() ==
* . Derived::getStaticClassID()) ... * . Derived::getStaticClassID()) ...
* </pre> * </pre>
* @return The class ID for all objects of this class. * @return The class ID for all objects of this class.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Compares two Format objects. This is used for constructing the hash * Compares two Format objects. This is used for constructing the hash
* tables. * tables.
* *
* @param left pointer to a Format object. Must not be NULL. * @param left pointer to a Format object. Must not be NULL.
* @param right pointer to a Format object. Must not be NULL. * @param right pointer to a Format object. Must not be NULL.
* *
* @return whether the two objects are the same * @return whether the two objects are the same
* @internal * @internal
*/ */
static UBool equalFormats(const void* left, const void* right); static UBool equalFormats(const void* left, const void* right);
#endif /* U_HIDE_INTERNAL_API */
private: private:
Locale fLocale; Locale fLocale;
MessagePattern msgPattern; MessagePattern msgPattern;
Format** formatAliases; // see getFormats Format** formatAliases; // see getFormats
int32_t formatAliasesCapacity; int32_t formatAliasesCapacity;
MessageFormat(); // default constructor not implemented MessageFormat(); // default constructor not implemented
 End of changes. 10 change blocks. 
3 lines changed or deleted 14 lines changed or added


 normalizer2.h   normalizer2.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2009-2011, International Business Machines * Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: normalizer2.h * file name: normalizer2.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2009nov22 * created on: 2009nov22
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 81 skipping to change at line 81
* (to process only the substring for which sort key bytes are computed). * (to process only the substring for which sort key bytes are computed).
* *
* The set of normalization boundaries returned by these functions may not be * The set of normalization boundaries returned by these functions may not be
* complete: There may be more boundaries that could be returned. * complete: There may be more boundaries that could be returned.
* Different functions may return different boundaries. * Different functions may return different boundaries.
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
class U_COMMON_API Normalizer2 : public UObject { class U_COMMON_API Normalizer2 : public UObject {
public: public:
/** /**
* Destructor.
* @stable ICU 4.4
*/
~Normalizer2();
#ifndef U_HIDE_DRAFT_API
/**
* Returns a Normalizer2 instance for Unicode NFC normalization.
* Same as getInstance(NULL, "nfc", UNORM2_COMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret
urns
* immediately. Check for U_FAILURE() on output or use
with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
static const Normalizer2 *
getNFCInstance(UErrorCode &errorCode);
/**
* Returns a Normalizer2 instance for Unicode NFD normalization.
* Same as getInstance(NULL, "nfc", UNORM2_DECOMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret
urns
* immediately. Check for U_FAILURE() on output or use
with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
static const Normalizer2 *
getNFDInstance(UErrorCode &errorCode);
/**
* Returns a Normalizer2 instance for Unicode NFKC normalization.
* Same as getInstance(NULL, "nfkc", UNORM2_COMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret
urns
* immediately. Check for U_FAILURE() on output or use
with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
static const Normalizer2 *
getNFKCInstance(UErrorCode &errorCode);
/**
* Returns a Normalizer2 instance for Unicode NFKD normalization.
* Same as getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret
urns
* immediately. Check for U_FAILURE() on output or use
with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
static const Normalizer2 *
getNFKDInstance(UErrorCode &errorCode);
/**
* Returns a Normalizer2 instance for Unicode NFKC_Casefold normalizati
on.
* Same as getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret
urns
* immediately. Check for U_FAILURE() on output or use
with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
static const Normalizer2 *
getNFKCCasefoldInstance(UErrorCode &errorCode);
#endif /* U_HIDE_DRAFT_API */
/**
* Returns a Normalizer2 instance which uses the specified data file * Returns a Normalizer2 instance which uses the specified data file
* (packageName/name similar to ucnv_openPackage() and ures_open()/Reso urceBundle) * (packageName/name similar to ucnv_openPackage() and ures_open()/Reso urceBundle)
* and which composes or decomposes text according to the specified mod e. * and which composes or decomposes text according to the specified mod e.
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* *
* Use packageName=NULL for data files that are part of ICU's own data. * Use packageName=NULL for data files that are part of ICU's own data.
* Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode stand ard NFC/NFD. * Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode stand ard NFC/NFD.
* Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode stan dard NFKC/NFKD. * Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode stan dard NFKC/NFKD.
* Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=N FKC_Casefold. * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=N FKC_Casefold.
* *
skipping to change at line 188 skipping to change at line 266
* Gets the decomposition mapping of c. * Gets the decomposition mapping of c.
* Roughly equivalent to normalizing the String form of c * Roughly equivalent to normalizing the String form of c
* on a UNORM2_DECOMPOSE Normalizer2 instance, but much faster, and exc ept that this function * on a UNORM2_DECOMPOSE Normalizer2 instance, but much faster, and exc ept that this function
* returns FALSE and does not write a string * returns FALSE and does not write a string
* if c does not have a decomposition mapping in this instance's data. * if c does not have a decomposition mapping in this instance's data.
* This function is independent of the mode of the Normalizer2. * This function is independent of the mode of the Normalizer2.
* @param c code point * @param c code point
* @param decomposition String object which will be set to c's * @param decomposition String object which will be set to c's
* decomposition mapping, if there is one. * decomposition mapping, if there is one.
* @return TRUE if c has a decomposition, otherwise FALSE * @return TRUE if c has a decomposition, otherwise FALSE
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UBool virtual UBool
getDecomposition(UChar32 c, UnicodeString &decomposition) const = 0; getDecomposition(UChar32 c, UnicodeString &decomposition) const = 0;
/** /**
* Gets the raw decomposition mapping of c.
*
* This is similar to the getDecomposition() method but returns the
* raw decomposition mapping as specified in UnicodeData.txt or
* (for custom data) in the mapping files processed by the gennorm2 too
l.
* By contrast, getDecomposition() returns the processed,
* recursively-decomposed version of this mapping.
*
* When used on a standard NFKC Normalizer2 instance,
* getRawDecomposition() returns the Unicode Decomposition_Mapping (dm)
property.
*
* When used on a standard NFC Normalizer2 instance,
* it returns the Decomposition_Mapping only if the Decomposition_Type
(dt) is Canonical (Can);
* in this case, the result contains either one or two code points (=1.
.4 UChars).
*
* This function is independent of the mode of the Normalizer2.
* The default implementation returns FALSE.
* @param c code point
* @param decomposition String object which will be set to c's
* raw decomposition mapping, if there is one.
* @return TRUE if c has a decomposition, otherwise FALSE
* @draft ICU 49
*/
virtual UBool
getRawDecomposition(UChar32 c, UnicodeString &decomposition) const;
/**
* Performs pairwise composition of a & b and returns the composite if
there is one.
*
* Returns a composite code point c only if c has a two-way mapping to
a+b.
* In standard Unicode normalization, this means that
* c has a canonical decomposition to a+b
* and c does not have the Full_Composition_Exclusion property.
*
* This function is independent of the mode of the Normalizer2.
* The default implementation returns a negative value.
* @param a A (normalization starter) code point.
* @param b Another code point.
* @return The non-negative composite code point if there is one; other
wise a negative value.
* @draft ICU 49
*/
virtual UChar32
composePair(UChar32 a, UChar32 b) const;
/**
* Gets the combining class of c.
* The default implementation returns 0
* but all standard implementations return the Unicode Canonical_Combin
ing_Class value.
* @param c code point
* @return c's combining class
* @draft ICU 49
*/
virtual uint8_t
getCombiningClass(UChar32 c) const;
/**
* Tests if the string is normalized. * Tests if the string is normalized.
* Internally, in cases where the quickCheck() method would return "may be" * Internally, in cases where the quickCheck() method would return "may be"
* (which is only possible for the two COMPOSE modes) this method * (which is only possible for the two COMPOSE modes) this method
* resolves to "yes" or "no" to provide a definitive result, * resolves to "yes" or "no" to provide a definitive result,
* at the cost of doing more work in those cases. * at the cost of doing more work in those cases.
* @param s input string * @param s input string
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
skipping to change at line 331 skipping to change at line 465
* is used. * is used.
* The filter set should be frozen; otherwise the performance will suff er greatly. * The filter set should be frozen; otherwise the performance will suff er greatly.
* @param n2 wrapped Normalizer2 instance * @param n2 wrapped Normalizer2 instance
* @param filterSet UnicodeSet which determines the characters to be no rmalized * @param filterSet UnicodeSet which determines the characters to be no rmalized
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
FilteredNormalizer2(const Normalizer2 &n2, const UnicodeSet &filterSet) : FilteredNormalizer2(const Normalizer2 &n2, const UnicodeSet &filterSet) :
norm2(n2), set(filterSet) {} norm2(n2), set(filterSet) {}
/** /**
* Destructor.
* @stable ICU 4.4
*/
~FilteredNormalizer2();
/**
* Writes the normalized form of the source string to the destination s tring * Writes the normalized form of the source string to the destination s tring
* (replacing its contents) and returns the destination string. * (replacing its contents) and returns the destination string.
* The source and destination strings must be different objects. * The source and destination strings must be different objects.
* @param src source string * @param src source string
* @param dest destination string; its contents is replaced with normal ized src * @param dest destination string; its contents is replaced with normal ized src
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return dest * @return dest
skipping to change at line 385 skipping to change at line 525
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return first * @return first
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString & virtual UnicodeString &
append(UnicodeString &first, append(UnicodeString &first,
const UnicodeString &second, const UnicodeString &second,
UErrorCode &errorCode) const; UErrorCode &errorCode) const;
/** /**
* Gets the decomposition mapping of c. Equivalent to normalize(Unicode * Gets the decomposition mapping of c.
String(c)) * For details see the base class documentation.
* on a UNORM2_DECOMPOSE Normalizer2 instance, but much faster. *
* This function is independent of the mode of the Normalizer2. * This function is independent of the mode of the Normalizer2.
* @param c code point * @param c code point
* @param decomposition String object which will be set to c's * @param decomposition String object which will be set to c's
* decomposition mapping, if there is one. * decomposition mapping, if there is one.
* @return TRUE if c has a decomposition, otherwise FALSE * @return TRUE if c has a decomposition, otherwise FALSE
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UBool virtual UBool
getDecomposition(UChar32 c, UnicodeString &decomposition) const; getDecomposition(UChar32 c, UnicodeString &decomposition) const;
/** /**
* Gets the raw decomposition mapping of c.
* For details see the base class documentation.
*
* This function is independent of the mode of the Normalizer2.
* @param c code point
* @param decomposition String object which will be set to c's
* raw decomposition mapping, if there is one.
* @return TRUE if c has a decomposition, otherwise FALSE
* @draft ICU 49
*/
virtual UBool
getRawDecomposition(UChar32 c, UnicodeString &decomposition) const;
/**
* Performs pairwise composition of a & b and returns the composite if
there is one.
* For details see the base class documentation.
*
* This function is independent of the mode of the Normalizer2.
* @param a A (normalization starter) code point.
* @param b Another code point.
* @return The non-negative composite code point if there is one; other
wise a negative value.
* @draft ICU 49
*/
virtual UChar32
composePair(UChar32 a, UChar32 b) const;
/**
* Gets the combining class of c.
* The default implementation returns 0
* but all standard implementations return the Unicode Canonical_Combin
ing_Class value.
* @param c code point
* @return c's combining class
* @draft ICU 49
*/
virtual uint8_t
getCombiningClass(UChar32 c) const;
/**
* Tests if the string is normalized. * Tests if the string is normalized.
* For details see the Normalizer2 base class documentation. * For details see the Normalizer2 base class documentation.
* @param s input string * @param s input string
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return TRUE if s is normalized * @return TRUE if s is normalized
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
 End of changes. 8 change blocks. 
6 lines changed or deleted 206 lines changed or added


 numfmt.h   numfmt.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2011, International Business Machines Corporation and others. * Copyright (C) 1997-2012, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File NUMFMT.H * File NUMFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 03/18/97 clhuang Updated per C++ implementation. * 03/18/97 clhuang Updated per C++ implementation.
skipping to change at line 38 skipping to change at line 38
* \brief C++ API: Abstract base class for all number formats. * \brief C++ API: Abstract base class for all number formats.
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/unistr.h" #include "unicode/unistr.h"
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/unum.h" // UNumberFormatStyle #include "unicode/unum.h" // UNumberFormatStyle
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/stringpiece.h" #include "unicode/stringpiece.h"
#include "unicode/curramt.h"
class NumberFormatTest; class NumberFormatTest;
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
#if !UCONFIG_NO_SERVICE #if !UCONFIG_NO_SERVICE
class NumberFormatFactory; class NumberFormatFactory;
class StringEnumeration; class StringEnumeration;
#endif #endif
skipping to change at line 175 skipping to change at line 176
public: public:
/** /**
* Alignment Field constants used to construct a FieldPosition object. * Alignment Field constants used to construct a FieldPosition object.
* Signifies that the position of the integer part or fraction part of * Signifies that the position of the integer part or fraction part of
* a formatted number should be returned. * a formatted number should be returned.
* *
* Note: as of ICU 4.4, the values in this enum have been extended to * Note: as of ICU 4.4, the values in this enum have been extended to
* support identification of all number format fields, not just those * support identification of all number format fields, not just those
* pertaining to alignment. * pertaining to alignment.
* *
* These constants are provided for backwards compatibility only.
* Please use the C style constants defined in the header file unum.h.
*
* @see FieldPosition * @see FieldPosition
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
enum EAlignmentFields { enum EAlignmentFields {
kIntegerField, /** @stable ICU 2.0 */
kFractionField, kIntegerField = UNUM_INTEGER_FIELD,
kDecimalSeparatorField, /** @stable ICU 2.0 */
kExponentSymbolField, kFractionField = UNUM_FRACTION_FIELD,
kExponentSignField, /** @stable ICU 2.0 */
kExponentField, kDecimalSeparatorField = UNUM_DECIMAL_SEPARATOR_FIELD,
kGroupingSeparatorField, /** @stable ICU 2.0 */
kCurrencyField, kExponentSymbolField = UNUM_EXPONENT_SYMBOL_FIELD,
kPercentField, /** @stable ICU 2.0 */
kPermillField, kExponentSignField = UNUM_EXPONENT_SIGN_FIELD,
kSignField, /** @stable ICU 2.0 */
kExponentField = UNUM_EXPONENT_FIELD,
/** @stable ICU 2.0 */
kGroupingSeparatorField = UNUM_GROUPING_SEPARATOR_FIELD,
/** @stable ICU 2.0 */
kCurrencyField = UNUM_CURRENCY_FIELD,
/** @stable ICU 2.0 */
kPercentField = UNUM_PERCENT_FIELD,
/** @stable ICU 2.0 */
kPermillField = UNUM_PERMILL_FIELD,
/** @stable ICU 2.0 */
kSignField = UNUM_SIGN_FIELD,
/** /**
* These constants are provided for backwards compatibility only. * These constants are provided for backwards compatibility only.
* Please use the C++ style constants defined above. * Please use the constants defined in the header file unum.h.
* @stable ICU 2.0
*/ */
INTEGER_FIELD = kIntegerField, /** @stable ICU 2.0 */
FRACTION_FIELD = kFractionField INTEGER_FIELD = UNUM_INTEGER_FIELD,
/** @stable ICU 2.0 */
FRACTION_FIELD = UNUM_FRACTION_FIELD
}; };
/** /**
* Destructor. * Destructor.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual ~NumberFormat(); virtual ~NumberFormat();
/** /**
* Return true if the given Format objects are semantically equal. * Return true if the given Format objects are semantically equal.
skipping to change at line 555 skipping to change at line 571
* when a failure occurs. * when a failure occurs.
* @return A Formattable object of numeric type. The call er * @return A Formattable object of numeric type. The call er
* owns this an must delete it. NULL on failure. * owns this an must delete it. NULL on failure.
* @see NumberFormat::isParseIntegerOnly * @see NumberFormat::isParseIntegerOnly
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void parse( const UnicodeString& text, virtual void parse( const UnicodeString& text,
Formattable& result, Formattable& result,
UErrorCode& status) const; UErrorCode& status) const;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/** /**
* Parses text from the given string as a currency amount. Unlike * Parses text from the given string as a currency amount. Unlike
* the parse() method, this method will attempt to parse a generic * the parse() method, this method will attempt to parse a generic
* currency name, searching for a match of this object's locale's * currency name, searching for a match of this object's locale's
* currency display names, or for a 3-letter ISO currency code. * currency display names, or for a 3-letter ISO currency code.
* This method will fail if this format is not a currency format, * This method will fail if this format is not a currency format,
* that is, if it does not contain the currency pattern symbol * that is, if it does not contain the currency pattern symbol
* (U+00A4) in its prefix or suffix. * (U+00A4) in its prefix or suffix.
* *
* @param text the string to parse * @param text the string to parse
* @param result output parameter to receive result. This will have * @param pos input-output position; on input, the position within tex
* its currency set to the parsed ISO currency code. t
* @param pos input-output position; on input, the position within * to match; must have 0 <= pos.getIndex() < text.length();
* text to match; must have 0 <= pos.getIndex() < text.length(); * on output, the position after the last matched character
* on output, the position after the last matched character. If .
* the parse fails, the position in unchanged upon output. * If the parse fails, the position in unchanged upon outpu
* @return a reference to result t.
* @internal * @return if parse succeeds, a pointer to a newly-created Currency
Amount
* object (owned by the caller) containing information abou
t
* the parsed currency; if parse fails, this is NULL.
* @draft ICU 49
*/ */
virtual Formattable& parseCurrency(const UnicodeString& text, virtual CurrencyAmount* parseCurrency(const UnicodeString& text,
Formattable& result, ParsePosition& pos) const;
ParsePosition& pos) const;
/** /**
* Return true if this format will parse numbers as integers * Return true if this format will parse numbers as integers
* only. For example in the English locale, with ParseIntegerOnly * only. For example in the English locale, with ParseIntegerOnly
* true, the string "1234." would be parsed as the integer value * true, the string "1234." would be parsed as the integer value
* 1234 and parsing would stop at the "." character. Of course, * 1234 and parsing would stop at the "." character. Of course,
* the exact format accepted by the parse operation is locale * the exact format accepted by the parse operation is locale
* dependant and determined by sub-classes of NumberFormat. * dependant and determined by sub-classes of NumberFormat.
* @return true if this format will parse numbers as integers * @return true if this format will parse numbers as integers
* only. * only.
skipping to change at line 605 skipping to change at line 621
* @see isParseIntegerOnly * @see isParseIntegerOnly
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void setParseIntegerOnly(UBool value); virtual void setParseIntegerOnly(UBool value);
/** /**
* Sets whether lenient parsing should be enabled (it is off by default ). * Sets whether lenient parsing should be enabled (it is off by default ).
* *
* @param enable <code>TRUE</code> if lenient parsing should be used, * @param enable <code>TRUE</code> if lenient parsing should be used,
* <code>FALSE</code> otherwise. * <code>FALSE</code> otherwise.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual void setLenient(UBool enable); virtual void setLenient(UBool enable);
/** /**
* Returns whether lenient parsing is enabled (it is off by default). * Returns whether lenient parsing is enabled (it is off by default).
* *
* @return <code>TRUE</code> if lenient parsing is enabled, * @return <code>TRUE</code> if lenient parsing is enabled,
* <code>FALSE</code> otherwise. * <code>FALSE</code> otherwise.
* @see #setLenient * @see #setLenient
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual UBool isLenient(void) const; virtual UBool isLenient(void) const;
/** /**
* Returns the default number format for the current default * Returns the default number format for the current default
* locale. The default format is one of the styles provided by * locale. The default format is one of the styles provided by
* the other factory methods: getNumberInstance, * the other factory methods: getNumberInstance,
* getCurrencyInstance or getPercentInstance. Exactly which one * getCurrencyInstance or getPercentInstance. Exactly which one
* is locale dependant. * is locale dependant.
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 646 skipping to change at line 662
*/ */
static NumberFormat* U_EXPORT2 createInstance(const Locale& inLocale, static NumberFormat* U_EXPORT2 createInstance(const Locale& inLocale,
UErrorCode&); UErrorCode&);
/** /**
* Creates the specified decimal format style of the desired locale. * Creates the specified decimal format style of the desired locale.
* @param desiredLocale the given locale. * @param desiredLocale the given locale.
* @param style the given style. * @param style the given style.
* @param errorCode Output param filled with success/failure sta tus. * @param errorCode Output param filled with success/failure sta tus.
* @return A new NumberFormat instance. * @return A new NumberFormat instance.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
static NumberFormat* U_EXPORT2 createInstance(const Locale& desiredLoca le, static NumberFormat* U_EXPORT2 createInstance(const Locale& desiredLoca le,
UNumberFormatStyle style, UNumberFormatStyle style,
UErrorCode& errorCode); UErrorCode& errorCode);
/** /**
* Returns a currency format for the current default locale. * Returns a currency format for the current default locale.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static NumberFormat* U_EXPORT2 createCurrencyInstance(UErrorCode&); static NumberFormat* U_EXPORT2 createCurrencyInstance(UErrorCode&);
skipping to change at line 1044 skipping to change at line 1060
inline UBool inline UBool
NumberFormat::isParseIntegerOnly() const NumberFormat::isParseIntegerOnly() const
{ {
return fParseIntegerOnly; return fParseIntegerOnly;
} }
inline UBool inline UBool
NumberFormat::isLenient() const NumberFormat::isLenient() const
{ {
return fLenient; return fLenient;
} }
inline UnicodeString& inline UnicodeString&
NumberFormat::format(const Formattable& obj, NumberFormat::format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
UErrorCode& status) const { UErrorCode& status) const {
return Format::format(obj, appendTo, status); return Format::format(obj, appendTo, status);
} }
U_NAMESPACE_END U_NAMESPACE_END
 End of changes. 13 change blocks. 
31 lines changed or deleted 52 lines changed or added


 numsys.h   numsys.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010, International Business Machines Corporation and * Copyright (C) 2010-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* *
* File NUMSYS.H * File NUMSYS.H
* *
* Modification History:* * Modification History:*
* Date Name Description * Date Name Description
* *
*************************************************************************** ***** *************************************************************************** *****
skipping to change at line 123 skipping to change at line 123
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
static NumberingSystem* U_EXPORT2 createInstanceByName(const char* name , UErrorCode& status); static NumberingSystem* U_EXPORT2 createInstanceByName(const char* name , UErrorCode& status);
/** /**
* Returns the radix of this numbering system. * Returns the radix of this numbering system.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
int32_t getRadix(); int32_t getRadix();
#ifndef U_HIDE_DRAFT_API
/** /**
* Returns the name of this numbering system if it was created using on e of the predefined names * Returns the name of this numbering system if it was created using on e of the predefined names
* known to ICU. Otherwise, returns NULL. * known to ICU. Otherwise, returns NULL.
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
const char * getName(); const char * getName();
#endif /* U_HIDE_DRAFT_API */
/** /**
* Returns the description string of this numbering system, which is ei ther * Returns the description string of this numbering system, which is ei ther
* the string of digits in the case of simple systems, or the ruleset n ame * the string of digits in the case of simple systems, or the ruleset n ame
* in the case of algorithmic systems. * in the case of algorithmic systems.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
virtual UnicodeString getDescription(); virtual UnicodeString getDescription();
/** /**
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 platform.h   platform.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* Note: autoconf creates platform.h from platform.h.in at configure time.
*
***************************************************************************
***
*
* FILE NAME : platform.h * FILE NAME : platform.h
* *
* Date Name Description * Date Name Description
* 05/13/98 nos Creation (content moved here from ptypes.h). * 05/13/98 nos Creation (content moved here from ptypes.h).
* 03/02/99 stephen Added AS400 support. * 03/02/99 stephen Added AS400 support.
* 03/30/99 stephen Added Linux support. * 03/30/99 stephen Added Linux support.
* 04/13/99 stephen Reworked for autoconf. * 04/13/99 stephen Reworked for autoconf.
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef _PLATFORM_H #ifndef _PLATFORM_H
#define _PLATFORM_H #define _PLATFORM_H
#include "unicode/uconfig.h"
#include "unicode/uvernum.h"
/** /**
* \file * \file
* \brief Basic types for the platform * \brief Basic types for the platform.
*
* This file used to be generated by autoconf/configure.
* Starting with ICU 49, platform.h is a normal source file,
* to simplify cross-compiling and working with non-autoconf/make build sys
tems.
*
* When a value in this file does not work on a platform, then please
* try to derive it from the U_PLATFORM value
* (for which we might need a new value constant in rare cases)
* and/or from other macros that are predefined by the compiler
* or defined in standard (POSIX or platform or compiler) headers.
*
* As a temporary workaround, you can add an explicit #define for some macr
os
* before it is first tested, or add an equivalent -D macro definition
* to the compiler's command line.
*
* Note: Some compilers provide ways to show the predefined macros.
* For example, with gcc you can compile an empty .c file and have the comp
iler
* print the predefined macros with
* \code
* gcc -E -dM -x c /dev/null | sort
* \endcode
* (You can provide an actual empty .c file rather than /dev/null.
* <code>-x c++</code> is for C++.)
*/ */
/* This file should be included before uvernum.h. */ /**
#if defined(UVERNUM_H) * \def U_PLATFORM
# error Do not include unicode/uvernum.h before #including unicode/platform * The U_PLATFORM macro defines the platform we're on.
.h. Instead of unicode/uvernum.h, #include unicode/uversion.h *
* We used to define one different, value-less macro per platform.
* That made it hard to know the set of relevant platforms and macros,
* and hard to deal with variants of platforms.
*
* Starting with ICU 49, we define platforms as numeric macros,
* with ranges of values for related platforms and their variants.
* The U_PLATFORM macro is set to one of these values.
*
* Historical note from the Solaris Wikipedia article:
* AT&T and Sun collaborated on a project to merge the most popular Unix va
riants
* on the market at that time: BSD, System V, and Xenix.
* This became Unix System V Release 4 (SVR4).
*
* @internal
*/
/** Unknown platform. @internal */
#define U_PF_UNKNOWN 0
/** Windows @internal */
#define U_PF_WINDOWS 1000
/** MinGW. Windows, calls to Win32 API, but using GNU gcc and binutils. @in
ternal */
#define U_PF_MINGW 1800
/**
* Cygwin. Windows, calls to cygwin1.dll for Posix functions,
* using MSVC or GNU gcc and binutils.
* @internal
*/
#define U_PF_CYGWIN 1900
/* Reserve 2000 for U_PF_UNIX? */
/** HP-UX is based on UNIX System V. @internal */
#define U_PF_HPUX 2100
/** Solaris is a Unix operating system based on SVR4. @internal */
#define U_PF_SOLARIS 2600
/** BSD is a UNIX operating system derivative. @internal */
#define U_PF_BSD 3000
/** AIX is based on UNIX System V Releases and 4.3 BSD. @internal */
#define U_PF_AIX 3100
/** IRIX is based on UNIX System V with BSD extensions. @internal */
#define U_PF_IRIX 3200
/**
* Darwin is a POSIX-compliant operating system, composed of code developed
by Apple,
* as well as code derived from NeXTSTEP, BSD, and other projects,
* built around the Mach kernel.
* Darwin forms the core set of components upon which Mac OS X, Apple TV, a
nd iOS are based.
* (Original description modified from WikiPedia.)
* @internal
*/
#define U_PF_DARWIN 3500
/** iPhone OS (iOS) is a derivative of Mac OS X. @internal */
#define U_PF_IPHONE 3550
/** QNX is a commercial Unix-like real-time operating system related to BSD
. @internal */
#define U_PF_QNX 3700
/** Linux is a Unix-like operating system. @internal */
#define U_PF_LINUX 4000
/** Android is based on Linux. @internal */
#define U_PF_ANDROID 4050
/** "Classic" Mac OS (1984-2001) @internal */
#define U_PF_CLASSIC_MACOS 8000
/** z/OS is the successor to OS/390 which was the successor to MVS. @intern
al */
#define U_PF_OS390 9000
/** "IBM i" is the current name of what used to be i5/OS and earlier OS/400
. @internal */
#define U_PF_OS400 9400
#ifdef U_PLATFORM
/* Use the predefined value. */
#elif defined(__MINGW32__)
# define U_PLATFORM U_PF_MINGW
#elif defined(__CYGWIN__)
# define U_PLATFORM U_PF_CYGWIN
#elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64
)
# define U_PLATFORM U_PF_WINDOWS
#elif defined(__ANDROID__)
# define U_PLATFORM U_PF_ANDROID
/* Android wchar_t support depends on the API level. */
# include <android/api-level.h>
#elif defined(linux) || defined(__linux__) || defined(__linux)
# define U_PLATFORM U_PF_LINUX
#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# define U_PLATFORM U_PF_BSD
#elif defined(sun) || defined(__sun)
/* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris fr
om SunOS? */
# define U_PLATFORM U_PF_SOLARIS
# if defined(__GNUC__)
/* Solaris/GCC needs this header file to get the proper endianness.
Normally, this
* header file is included with stddef.h but on Solairs/GCC, the GC
C version of stddef.h
* is included which does not include this header file.
*/
# include <sys/isa_defs.h>
# endif
#elif defined(_AIX) || defined(__TOS_AIX__)
# define U_PLATFORM U_PF_AIX
#elif defined(_hpux) || defined(hpux) || defined(__hpux)
# define U_PLATFORM U_PF_HPUX
#elif defined(sgi) || defined(__sgi)
# define U_PLATFORM U_PF_IRIX
#elif defined(__APPLE__) && defined(__MACH__)
# include <TargetConditionals.h>
# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_
OS_MAC */
# define U_PLATFORM U_PF_IPHONE
# else
# define U_PLATFORM U_PF_DARWIN
# endif
#elif defined(macintosh)
# define U_PLATFORM U_PF_CLASSIC_MACOS
#elif defined(__QNX__) || defined(__QNXNTO__)
# define U_PLATFORM U_PF_QNX
#elif defined(__TOS_MVS__)
# define U_PLATFORM U_PF_OS390
#elif defined(__OS400__) || defined(__TOS_OS400__)
# define U_PLATFORM U_PF_OS400
#else
# define U_PLATFORM U_PF_UNKNOWN
#endif #endif
/** /**
* Determine wheter to enable auto cleanup of libraries. * \def CYGWINMSVC
* Defined if this is Windows with Cygwin, but using MSVC rather than gcc.
* Otherwise undefined.
* @internal * @internal
*/ */
#ifndef UCLN_NO_AUTO_CLEANUP /* Commented out because this is already set in mh-cygwin-msvc
#define UCLN_NO_AUTO_CLEANUP 1 #if U_PLATFORM == U_PF_CYGWIN && defined(_MSC_VER)
# define CYGWINMSVC
#endif #endif
*/
#if 0 /**
#define CYGWINMSVC * \def U_PLATFORM_USES_ONLY_WIN32_API
* Defines whether the platform uses only the Win32 API.
* Set to 1 for Windows/MSVC and MinGW but not Cygwin.
* @internal
*/
#ifdef U_PLATFORM_USES_ONLY_WIN32_API
/* Use the predefined value. */
#elif (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_MINGW) || defined(C
YGWINMSVC)
# define U_PLATFORM_USES_ONLY_WIN32_API 1
#else
/* Cygwin implements POSIX. */
# define U_PLATFORM_USES_ONLY_WIN32_API 0
#endif #endif
/* Need platform.h when using CYGWINMSVC to get definitions above. Ignore e /**
verything else. */ * \def U_PLATFORM_HAS_WIN32_API
#ifndef CYGWINMSVC * Defines whether the Win32 API is available on the platform.
* Set to 1 for Windows/MSVC, MinGW and Cygwin.
* @internal
*/
#ifdef U_PLATFORM_HAS_WIN32_API
/* Use the predefined value. */
#elif U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
# define U_PLATFORM_HAS_WIN32_API 1
#else
# define U_PLATFORM_HAS_WIN32_API 0
#endif
/** Define the platform we're on. */ /**
#ifndef U_LINUX * \def U_PLATFORM_IMPLEMENTS_POSIX
#define U_LINUX * Defines whether the platform implements (most of) the POSIX API.
* Set to 1 for Cygwin and most other platforms.
* @internal
*/
#ifdef U_PLATFORM_IMPLEMENTS_POSIX
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CLASSIC_MACOS
# define U_PLATFORM_IMPLEMENTS_POSIX 0
#else
# define U_PLATFORM_IMPLEMENTS_POSIX 1
#endif #endif
/** /**
* \def U_HAVE_DIRENT_H * \def U_PLATFORM_IS_LINUX_BASED
* Define whether dirent.h is available * Defines whether the platform is Linux or one of its derivatives.
* @internal * @internal
*/ */
#ifndef U_HAVE_DIRENT_H #ifdef U_PLATFORM_IS_LINUX_BASED
#define U_HAVE_DIRENT_H 1 /* Use the predefined value. */
#elif U_PF_LINUX <= U_PLATFORM && U_PLATFORM <= U_PF_ANDROID
# define U_PLATFORM_IS_LINUX_BASED 1
#else
# define U_PLATFORM_IS_LINUX_BASED 0
#endif #endif
/** Define whether inttypes.h is available */ /**
#ifndef U_HAVE_INTTYPES_H * \def U_PLATFORM_IS_DARWIN_BASED
#define U_HAVE_INTTYPES_H 1 * Defines whether the platform is Darwin or one of its derivatives.
* @internal
*/
#ifdef U_PLATFORM_IS_DARWIN_BASED
/* Use the predefined value. */
#elif U_PF_DARWIN <= U_PLATFORM && U_PLATFORM <= U_PF_IPHONE
# define U_PLATFORM_IS_DARWIN_BASED 1
#else
# define U_PLATFORM_IS_DARWIN_BASED 0
#endif #endif
/** /**
* Define what support for C++ streams is available. * \def U_HAVE_STDINT_H
* If U_IOSTREAM_SOURCE is set to 199711, then &lt;iostream&gt; is avai * Defines whether stdint.h is available. It is a C99 standard header.
lable * We used to include inttypes.h which includes stdint.h but we usually do
* (1997711 is the date the ISO/IEC C++ FDIS was published), and then not need
* the additional definitions from inttypes.h.
* @internal
*/
#ifdef U_HAVE_STDINT_H
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
# if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER>=1600)
/* Windows Visual Studio 9 and below do not have stdint.h & inttype
s.h, but VS 2010 adds them. */
# define U_HAVE_STDINT_H 1
# else
# define U_HAVE_STDINT_H 0
# endif
#elif U_PLATFORM == U_PF_SOLARIS
/* Solaris has inttypes.h but not stdint.h. */
# define U_HAVE_STDINT_H 0
#else
# define U_HAVE_STDINT_H 1
#endif
/**
* \def U_HAVE_INTTYPES_H
* Defines whether inttypes.h is available. It is a C99 standard header.
* We include inttypes.h where it is available but stdint.h is not.
* @internal
*/
#ifdef U_HAVE_INTTYPES_H
/* Use the predefined value. */
#elif U_PLATFORM == U_PF_SOLARIS
/* Solaris has inttypes.h but not stdint.h. */
# define U_HAVE_INTTYPES_H 1
#else
/* Most platforms have both inttypes.h and stdint.h, or neither. */
# define U_HAVE_INTTYPES_H U_HAVE_STDINT_H
#endif
/**
* \def U_IOSTREAM_SOURCE
* Defines what support for C++ streams is available.
*
* If U_IOSTREAM_SOURCE is set to 199711, then &lt;iostream&gt; is availabl
e
* (the ISO/IEC C++ FDIS was published in November 1997), and then
* one should qualify streams using the std namespace in ICU header * one should qualify streams using the std namespace in ICU header
* files. * files.
* If U_IOSTREAM_SOURCE is set to 198506, then &lt;iostream.h&gt; is * Starting with ICU 49, this is the only supported version.
* available instead (198506 is the date when Stroustrup published *
* If U_IOSTREAM_SOURCE is set to 198506, then &lt;iostream.h&gt; is
* available instead (in June 1985 Stroustrup published
* "An Extensible I/O Facility for C++" at the summer USENIX conference). * "An Extensible I/O Facility for C++" at the summer USENIX conference).
* If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and * Starting with ICU 49, this version is not supported any more.
*
* If U_IOSTREAM_SOURCE is 0 (or any value less than 199711),
* then C++ streams are not available and
* support for them will be silently suppressed in ICU. * support for them will be silently suppressed in ICU.
* *
* @internal
*/ */
#ifndef U_IOSTREAM_SOURCE #ifndef U_IOSTREAM_SOURCE
#define U_IOSTREAM_SOURCE 199711 #define U_IOSTREAM_SOURCE 199711
#endif #endif
/** /**
* \def U_HAVE_STD_STRING * \def U_HAVE_STD_STRING
* Define whether the standard C++ (STL) &lt;string&gt; header is available * Defines whether the standard C++ (STL) &lt;string&gt; header is availabl
. e.
* For platforms that do not use platform.h and do not define this constant
* in their platform-specific headers, std_string.h defaults
* U_HAVE_STD_STRING to 1.
* @internal * @internal
*/ */
#ifndef U_HAVE_STD_STRING #ifdef U_HAVE_STD_STRING
#define U_HAVE_STD_STRING 1 /* Use the predefined value. */
#endif #elif U_PLATFORM == U_PF_ANDROID
# define U_HAVE_STD_STRING 0
/** @{ Determines whether specific types are available */ #else
#ifndef U_HAVE_INT8_T # define U_HAVE_STD_STRING 1
#define U_HAVE_INT8_T 1
#endif
#ifndef U_HAVE_UINT8_T
#define U_HAVE_UINT8_T 1
#endif
#ifndef U_HAVE_INT16_T
#define U_HAVE_INT16_T 1
#endif
#ifndef U_HAVE_UINT16_T
#define U_HAVE_UINT16_T 1
#endif
#ifndef U_HAVE_INT32_T
#define U_HAVE_INT32_T 1
#endif
#ifndef U_HAVE_UINT32_T
#define U_HAVE_UINT32_T 1
#endif
#ifndef U_HAVE_INT64_T
#define U_HAVE_INT64_T 1
#endif
#ifndef U_HAVE_UINT64_T
#define U_HAVE_UINT64_T 1
#endif #endif
/** @} */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** @{ Compiler and environment features */ /** @{ Compiler and environment features */
/*========================================================================= ==*/ /*========================================================================= ==*/
/* Define whether namespace is supported */ /**
#ifndef U_HAVE_NAMESPACE * \def U_IS_BIG_ENDIAN
#define U_HAVE_NAMESPACE 1 * Determines the endianness of the platform.
#endif * @internal
*/
/* Determines the endianness of the platform #ifdef U_IS_BIG_ENDIAN
It's done this way in case multiple architectures are being built at onc /* Use the predefined value. */
e. #elif defined(BYTE_ORDER) && defined(BIG_ENDIAN)
For example, Darwin supports fat binaries, which can be both PPC and x86 # define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN)
based. */ #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) /* gcc */
#define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) # define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN)
# define U_IS_BIG_ENDIAN 1
#elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN)
# define U_IS_BIG_ENDIAN 0
#elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400
/* These platforms do not appear to predefine any endianness macros. */
# define U_IS_BIG_ENDIAN 1
#else #else
#define U_IS_BIG_ENDIAN 0 # define U_IS_BIG_ENDIAN 0
#endif
/* 1 or 0 to enable or disable threads. If undefined, default is: enable t
hreads. */
#ifndef ICU_USE_THREADS
#define ICU_USE_THREADS 1
#endif
#ifndef U_DEBUG
#define U_DEBUG 0
#endif #endif
#ifndef U_RELEASE /**
#define U_RELEASE 1 * \def U_HAVE_PLACEMENT_NEW
* Determines whether to override placement new and delete for STL.
* @stable ICU 2.6
*/
#ifdef U_HAVE_PLACEMENT_NEW
/* Use the predefined value. */
#elif defined(__BORLANDC__)
# define U_HAVE_PLACEMENT_NEW 0
#else
# define U_HAVE_PLACEMENT_NEW 1
#endif #endif
/* Determine whether to disable renaming or not. This overrides the /**
setting in umachine.h which is for all platforms. */ * \def U_HAVE_DEBUG_LOCATION_NEW
#ifndef U_DISABLE_RENAMING * Define this to define the MFC debug version of the operator new.
#define U_DISABLE_RENAMING 0 *
* @stable ICU 3.4
*/
#ifdef U_HAVE_DEBUG_LOCATION_NEW
/* Use the predefined value. */
#elif defined(_MSC_VER)
# define U_HAVE_DEBUG_LOCATION_NEW 1
#else
# define U_HAVE_DEBUG_LOCATION_NEW 0
#endif #endif
/* Determine whether to override new and delete. */ /** @} */
#ifndef U_OVERRIDE_CXX_ALLOCATION
#define U_OVERRIDE_CXX_ALLOCATION 1
#endif
/* Determine whether to override placement new and delete for STL. */
#ifndef U_HAVE_PLACEMENT_NEW
#define U_HAVE_PLACEMENT_NEW 1
#endif
/* Determine whether to enable tracing. */ /*=========================================================================
#ifndef U_ENABLE_TRACING ==*/
#define U_ENABLE_TRACING 0 /** @{ Character data types
#endif */
/*=========================================================================
==*/
/** /**
* Whether to enable Dynamic loading in ICU * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII ba
* @internal sed platform.
* @stable ICU 2.0
*/ */
#ifndef U_ENABLE_DYLOAD #define U_ASCII_FAMILY 0
#define U_ENABLE_DYLOAD 1
#endif
/** /**
* Whether to test Dynamic loading as an OS capabilty * U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC b
* @internal ased platform.
* @stable ICU 2.0
*/ */
#ifndef U_CHECK_DYLOAD #define U_EBCDIC_FAMILY 1
#define U_CHECK_DYLOAD 1
#endif
/** Do we allow ICU users to use the draft APIs by default? */ /**
#ifndef U_DEFAULT_SHOW_DRAFT * \def U_CHARSET_FAMILY
#define U_DEFAULT_SHOW_DRAFT 1 *
* <p>These definitions allow to specify the encoding of text
* in the char data type as defined by the platform and the compiler.
* It is enough to determine the code point values of "invariant characters
",
* which are the ones shared by all encodings that are in use
* on a given platform.</p>
*
* <p>Those "invariant characters" should be all the uppercase and lowercas
e
* latin letters, the digits, the space, and "basic punctuation".
* Also, '\\n', '\\r', '\\t' should be available.</p>
*
* <p>The list of "invariant characters" is:<br>
* \code
* A-Z a-z 0-9 SPACE " % &amp; ' ( ) * + , - . / : ; <
= > ? _
* \endcode
* <br>
* (52 letters + 10 numbers + 20 punc/sym/space = 82 total)</p>
*
* <p>This matches the IBM Syntactic Character Set (CS 640).</p>
*
* <p>In other words, all the graphic characters in 7-bit ASCII should
* be safely accessible except the following:</p>
*
* \code
* '\' <backslash>
* '[' <left bracket>
* ']' <right bracket>
* '{' <left brace>
* '}' <right brace>
* '^' <circumflex>
* '~' <tilde>
* '!' <exclamation mark>
* '#' <number sign>
* '|' <vertical line>
* '$' <dollar sign>
* '@' <commercial at>
* '`' <grave accent>
* \endcode
* @stable ICU 2.0
*/
#ifdef U_CHARSET_FAMILY
/* Use the predefined value. */
#elif U_PLATFORM == U_PF_OS390 && (!defined(__CHARSET_LIB) || !__CHARSET_LI
B)
# define U_CHARSET_FAMILY U_EBCDIC_FAMILY
#elif U_PLATFORM == U_PF_OS400 && !defined(__UTF32__)
# define U_CHARSET_FAMILY U_EBCDIC_FAMILY
#else
# define U_CHARSET_FAMILY U_ASCII_FAMILY
#endif #endif
/** @} */ /**
* \def U_CHARSET_IS_UTF8
/*========================================================================= *
==*/ * Hardcode the default charset to UTF-8.
/** @{ Character data types *
*/ * If this is set to 1, then
/*========================================================================= * - ICU will assume that all non-invariant char*, StringPiece, std::string
==*/ etc.
* contain UTF-8 text, regardless of what the system API uses
#if ((defined(OS390) && (!defined(__CHARSET_LIB) || !__CHARSET_LIB))) || de * - some ICU code will use fast functions like u_strFromUTF8()
fined(OS400) * rather than the more general and more heavy-weight conversion API (ucn
# define U_CHARSET_FAMILY 1 v.h)
* - ucnv_getDefaultName() always returns "UTF-8"
* - ucnv_setDefaultName() is disabled and will not change the default char
set
* - static builds of ICU are smaller
* - more functionality is available with the UCONFIG_NO_CONVERSION build-t
ime
* configuration option (see unicode/uconfig.h)
* - the UCONFIG_NO_CONVERSION build option in uconfig.h is more usable
*
* @stable ICU 4.2
* @see UCONFIG_NO_CONVERSION
*/
#ifdef U_CHARSET_IS_UTF8
/* Use the predefined value. */
#elif U_PLATFORM == U_PF_ANDROID || U_PLATFORM_IS_DARWIN_BASED
# define U_CHARSET_IS_UTF8 1
#else
# define U_CHARSET_IS_UTF8 0
#endif #endif
/** @} */ /** @} */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** @{ Information about wchar support */ /** @{ Information about wchar support */
/*========================================================================= ==*/ /*========================================================================= ==*/
#ifndef U_HAVE_WCHAR_H /**
#define U_HAVE_WCHAR_H 1 * \def U_HAVE_WCHAR_H
* Indicates whether <wchar.h> is available (1) or not (0). Set to 1 by def
ault.
*
* @stable ICU 2.0
*/
#ifdef U_HAVE_WCHAR_H
/* Use the predefined value. */
#elif U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9
/*
* Android before Gingerbread (Android 2.3, API level 9) did not suppor
t wchar_t.
* The type and header existed, but the library functions did not work
as expected.
* The size of wchar_t was 1 but L"xyz" string literals had 32-bit unit
s anyway.
*/
# define U_HAVE_WCHAR_H 0
#else
# define U_HAVE_WCHAR_H 1
#endif #endif
#ifndef U_SIZEOF_WCHAR_T /**
#define U_SIZEOF_WCHAR_T 4 * \def U_SIZEOF_WCHAR_T
* U_SIZEOF_WCHAR_T==sizeof(wchar_t)
*
* @stable ICU 2.0
*/
#ifdef U_SIZEOF_WCHAR_T
/* Use the predefined value. */
#elif (U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9) || U_PLATFORM ==
U_PF_CLASSIC_MACOS
/*
* Classic Mac OS and Mac OS X before 10.3 (Panther) did not support wc
har_t or wstring.
* Newer Mac OS X has size 4.
*/
# define U_SIZEOF_WCHAR_T 1
#elif U_PLATFORM_HAS_WIN32_API || U_PLATFORM == U_PF_CYGWIN
# define U_SIZEOF_WCHAR_T 2
#elif U_PLATFORM == U_PF_AIX
/*
* AIX 6.1 information, section "Wide character data representation":
* "... the wchar_t datatype is 32-bit in the 64-bit environment and
* 16-bit in the 32-bit environment."
* and
* "All locales use Unicode for their wide character code values (proce
ss code),
* except the IBM-eucTW codeset."
*/
# ifdef __64BIT__
# define U_SIZEOF_WCHAR_T 4
# else
# define U_SIZEOF_WCHAR_T 2
# endif
#elif U_PLATFORM == U_PF_OS390
/*
* z/OS V1R11 information center, section "LP64 | ILP32":
* "In 31-bit mode, the size of long and pointers is 4 bytes and the si
ze of wchar_t is 2 bytes.
* Under LP64, the size of long and pointer is 8 bytes and the size of
wchar_t is 4 bytes."
*/
# ifdef _LP64
# define U_SIZEOF_WCHAR_T 4
# else
# define U_SIZEOF_WCHAR_T 2
# endif
#elif U_PLATFORM == U_PF_OS400
# if defined(__UTF32__)
/*
* LOCALETYPE(*LOCALEUTF) is specified.
* Wide-character strings are in UTF-32,
* narrow-character strings are in UTF-8.
*/
# define U_SIZEOF_WCHAR_T 4
# elif defined(__UCS2__)
/*
* LOCALETYPE(*LOCALEUCS2) is specified.
* Wide-character strings are in UCS-2,
* narrow-character strings are in EBCDIC.
*/
# define U_SIZEOF_WCHAR_T 2
#else
/*
* LOCALETYPE(*CLD) or LOCALETYPE(*LOCALE) is specified.
* Wide-character strings are in 16-bit EBCDIC,
* narrow-character strings are in EBCDIC.
*/
# define U_SIZEOF_WCHAR_T 2
# endif
#else
# define U_SIZEOF_WCHAR_T 4
#endif #endif
#ifndef U_HAVE_WCSCPY #ifndef U_HAVE_WCSCPY
#define U_HAVE_WCSCPY 1 #define U_HAVE_WCSCPY U_HAVE_WCHAR_H
#endif #endif
/** @} */ /** @} */
/** /**
* \def U_HAVE_CHAR16_T
* Defines whether the char16_t type is available for UTF-16
* and u"abc" UTF-16 string literals are supported.
* This is a new standard type and standard string literal syntax in C++0x
* but has been available in some compilers before.
* @internal
*/
#ifdef U_HAVE_CHAR16_T
/* Use the predefined value. */
#else
/*
* Notes:
* Visual Studio 10 (_MSC_VER>=1600) defines char16_t but
* does not support u"abc" string literals.
* gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but
* does not support u"abc" string literals.
*/
# define U_HAVE_CHAR16_T 0
#endif
/**
* @{ * @{
* \def U_DECLARE_UTF16 * \def U_DECLARE_UTF16
* Do not use this macro. Use the UNICODE_STRING or U_STRING_DECL macros * Do not use this macro because it is not defined on all platforms.
* instead. * Use the UNICODE_STRING or U_STRING_DECL macros instead.
* @internal
*
* \def U_GNUC_UTF16_STRING
* @internal * @internal
*/ */
#ifndef U_GNUC_UTF16_STRING #ifdef U_DECLARE_UTF16
#define U_GNUC_UTF16_STRING 0 /* Use the predefined value. */
#endif #elif (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T !
#if 1 || defined(U_CHECK_UTF16_STRING) = 2) \
#if (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T !=
2) \
|| (defined(__HP_aCC) && __HP_aCC >= 035000) \ || (defined(__HP_aCC) && __HP_aCC >= 035000) \
|| (defined(__HP_cc) && __HP_cc >= 111106) \ || (defined(__HP_cc) && __HP_cc >= 111106) \
|| U_GNUC_UTF16_STRING || U_HAVE_CHAR16_T
#define U_DECLARE_UTF16(string) u ## string # define U_DECLARE_UTF16(string) u ## string
#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550)
/* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */ /* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */
/* Sun's C compiler has issues with this notation, and it's unreliable. */ /* Sun's C compiler has issues with this notation, and it's unreliable. */
#define U_DECLARE_UTF16(string) U ## string # define U_DECLARE_UTF16(string) U ## string
#elif U_SIZEOF_WCHAR_T == 2 \ #elif U_SIZEOF_WCHAR_T == 2 \
&& (U_CHARSET_FAMILY == 0 || ((defined(OS390) || defined(OS400)) && def && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <=
ined(__UCS2__))) U_PF_OS400 && defined(__UCS2__)))
#define U_DECLARE_UTF16(string) L ## string # define U_DECLARE_UTF16(string) L ## string
#endif #else
#endif /* Leave U_DECLARE_UTF16 undefined. See unistr.h. */
/** @} */
/*=========================================================================
==*/
/** @{ Information about POSIX support
*/
/*=========================================================================
==*/
#ifndef U_HAVE_NL_LANGINFO_CODESET
#define U_HAVE_NL_LANGINFO_CODESET 1
#endif
#ifndef U_NL_LANGINFO_CODESET
#define U_NL_LANGINFO_CODESET CODESET
#endif
#if 1
#define U_TZSET tzset
#endif
#if 1
#define U_TIMEZONE __timezone
#endif
#if 1
#define U_TZNAME tzname
#endif #endif
#define U_HAVE_MMAP 1
#define U_HAVE_POPEN 1
/** @} */ /** @} */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** @{ Symbol import-export control */ /** @{ Symbol import-export control */
/*========================================================================= ==*/ /*========================================================================= ==*/
#ifdef U_STATIC_IMPLEMENTATION #ifdef U_EXPORT
#define U_EXPORT /* Use the predefined value. */
#elif 1 #elif defined(U_STATIC_IMPLEMENTATION)
#define U_EXPORT __attribute__((visibility("default"))) # define U_EXPORT
#elif defined(__GNUC__)
# define U_EXPORT __attribute__((visibility("default")))
#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \
|| (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550)
#define U_EXPORT __global # define U_EXPORT __global
/*#elif defined(__HP_aCC) || defined(__HP_cc) /*#elif defined(__HP_aCC) || defined(__HP_cc)
#define U_EXPORT __declspec(dllexport)*/ # define U_EXPORT __declspec(dllexport)*/
#elif defined(_MSC_VER)
# define U_EXPORT __declspec(dllexport)
#else #else
#define U_EXPORT # define U_EXPORT
#endif #endif
/* U_CALLCONV is releated to U_EXPORT2 */ /* U_CALLCONV is releated to U_EXPORT2 */
#define U_EXPORT2 #ifdef U_EXPORT2
/* Use the predefined value. */
/* cygwin needs to export/import data */ #elif defined(_MSC_VER)
#if defined(U_CYGWIN) && !defined(__GNUC__) # define U_EXPORT2 __cdecl
#define U_IMPORT __declspec(dllimport)
#else #else
#define U_IMPORT # define U_EXPORT2
#endif
/* @} */
/*=========================================================================
==*/
/** @{ Code alignment and C function inlining
*/
/*=========================================================================
==*/
#ifndef U_INLINE
# ifdef __cplusplus
# define U_INLINE inline
# else
# define U_INLINE __inline__
# endif
#endif
#ifndef U_ALIGN_CODE
#define U_ALIGN_CODE(n)
#endif #endif
/** @} */ #ifdef U_IMPORT
/* Use the predefined value. */
/*========================================================================= #elif defined(_MSC_VER)
==*/ /* Windows needs to export/import data. */
/** @{ GCC built in functions for atomic memory operations # define U_IMPORT __declspec(dllimport)
*/ #else
/*========================================================================= # define U_IMPORT
==*/
/**
* \def U_HAVE_GCC_ATOMICS
* @internal
*/
#ifndef U_HAVE_GCC_ATOMICS
#define U_HAVE_GCC_ATOMICS 1
#endif #endif
/** @} */
/*=========================================================================
==*/
/** @{ Programs used by ICU code
*/
/*=========================================================================
==*/
/** /**
* \def U_MAKE * \def U_CALLCONV
* What program to execute to run 'make' * Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary
* in callback function typedefs to make sure that the calling convention
* is compatible.
*
* This is only used for non-ICU-API functions.
* When a function is a public ICU API,
* you must use the U_CAPI and U_EXPORT2 qualifiers.
* @stable ICU 2.0
*/ */
#ifndef U_MAKE #if U_PLATFORM == U_PF_OS390 && defined(__cplusplus)
#define U_MAKE "/usr/bin/gmake" # define U_CALLCONV __cdecl
#else
# define U_CALLCONV U_EXPORT2
#endif #endif
/** @} */ /* @} */
#endif /* CYGWINMSVC */
/*=========================================================================
==*/
/* Custom icu entry point renaming
*/
/*=========================================================================
==*/
/**
* Define the library suffix with C syntax.
* @internal
*/
# define U_LIB_SUFFIX_C_NAME
/**
* Define the library suffix as a string with C syntax
* @internal
*/
# define U_LIB_SUFFIX_C_NAME_STRING ""
/**
* 1 if a custom library suffix is set
* @internal
*/
# define U_HAVE_LIB_SUFFIX 0
#if U_HAVE_LIB_SUFFIX
# ifndef U_ICU_ENTRY_POINT_RENAME
/* Renaming pattern: u_strcpy_41_suffix */
# define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## 48 ##
# define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt####major##minor##_d
at
# endif
#endif
#endif #endif
 End of changes. 57 change blocks. 
298 lines changed or deleted 597 lines changed or added


 playout.h   playout.h 
/* /*
* *
* (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
* *
*/ */
#ifndef __PLAYOUT_H #ifndef __PLAYOUT_H
#define __PLAYOUT_H #define __PLAYOUT_H
/* /*
* ParagraphLayout doesn't make much sense without * ParagraphLayout doesn't make much sense without
* BreakIterator... * BreakIterator...
*/ */
#include "unicode/ubidi.h" #include "unicode/ubidi.h"
#if ! UCONFIG_NO_BREAK_ITERATION #if ! UCONFIG_NO_BREAK_ITERATION
#ifndef U_HIDE_INTERNAL_API
#include "layout/LETypes.h" #include "layout/LETypes.h"
#include "plruns.h" #include "plruns.h"
/** /**
* \file * \file
* \brief C API for paragraph layout. * \brief C API for paragraph layout.
* *
* This is a technology preview. The API may * This is a technology preview. The API may
* change significantly. * change significantly.
skipping to change at line 463 skipping to change at line 464
* *
* @param run the <code>pl_visualRun</code> object. * @param run the <code>pl_visualRun</code> object.
* *
* @return the leading value of this run's font. * @return the leading value of this run's font.
* *
* @internal * @internal
*/ */
U_INTERNAL le_int32 U_EXPORT2 U_INTERNAL le_int32 U_EXPORT2
pl_getVisualRunLeading(const pl_visualRun *run); pl_getVisualRunLeading(const pl_visualRun *run);
#endif /* U_HIDE_INTERNAL_API */
#endif #endif
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 plruns.h   plruns.h 
/* /*
* *
* (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
* *
*/ */
#ifndef __PLRUNS_H #ifndef __PLRUNS_H
#define __PLRUNS_H #define __PLRUNS_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#ifndef U_HIDE_INTERNAL_API
#include "unicode/ubidi.h" #include "unicode/ubidi.h"
#include "layout/LETypes.h" #include "layout/LETypes.h"
#include "layout/loengine.h" #include "layout/loengine.h"
/** /**
* Opaque datatype representing an array of font runs * Opaque datatype representing an array of font runs
*/ */
typedef void pl_fontRuns; typedef void pl_fontRuns;
/** /**
skipping to change at line 434 skipping to change at line 437
* @return the run index where the font and limit index were stored, or -1 if * @return the run index where the font and limit index were stored, or -1 if
* the run cannot be added. * the run cannot be added.
* *
* @internal * @internal
*/ */
U_INTERNAL le_int32 U_EXPORT2 U_INTERNAL le_int32 U_EXPORT2
pl_addLocaleRun(pl_localeRuns *localeRuns, pl_addLocaleRun(pl_localeRuns *localeRuns,
const char *locale, const char *locale,
le_int32 limit); le_int32 limit);
#endif /* U_HIDE_INTERNAL_API */
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 lines changed or added


 plurfmt.h   plurfmt.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2011, International Business Machines Corporation and * Copyright (C) 2007-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* File PLURFMT.H * File PLURFMT.H
* *
* Modification History:* * Modification History:*
* Date Name Description * Date Name Description
* *
*************************************************************************** ***** *************************************************************************** *****
skipping to change at line 481 skipping to change at line 481
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
private: #if defined(__xlC__) || (U_PLATFORM == U_PF_OS390) || (U_PLATFORM ==U_PF_OS
400)
// Work around a compiler bug on xlC 11.1 on AIX 7.1 that would
// prevent PluralSelectorAdapter from implementing private PluralSelector.
// xlC error message:
// 1540-0300 (S) The "private" member "class icu_49::PluralFormat::PluralSe
lector" cannot be accessed.
public:
#else
private:
#endif
/** /**
* @internal * @internal
*/ */
class U_I18N_API PluralSelector : public UMemory { class U_I18N_API PluralSelector : public UMemory {
public: public:
virtual ~PluralSelector();
/** /**
* Given a number, returns the appropriate PluralFormat keyword. * Given a number, returns the appropriate PluralFormat keyword.
* *
* @param number The number to be plural-formatted. * @param number The number to be plural-formatted.
* @param ec Error code. * @param ec Error code.
* @return The selected PluralFormat keyword. * @return The selected PluralFormat keyword.
*/ */
virtual UnicodeString select(double number, UErrorCode& ec) const = 0; virtual UnicodeString select(double number, UErrorCode& ec) const = 0;
}; };
skipping to change at line 515 skipping to change at line 523
virtual ~PluralSelectorAdapter(); virtual ~PluralSelectorAdapter();
virtual UnicodeString select(double number, UErrorCode& /*ec*/) con st; virtual UnicodeString select(double number, UErrorCode& /*ec*/) con st;
void reset(); void reset();
PluralRules* pluralRules; PluralRules* pluralRules;
}; };
#if defined(__xlC__)
// End of xlC bug workaround, keep remaining definitions private.
private:
#endif
Locale locale; Locale locale;
MessagePattern msgPattern; MessagePattern msgPattern;
NumberFormat* numberFormat; NumberFormat* numberFormat;
double offset; double offset;
PluralSelectorAdapter pluralRulesWrapper; PluralSelectorAdapter pluralRulesWrapper;
PluralFormat(); // default constructor not implemented PluralFormat(); // default constructor not implemented
void init(const PluralRules* rules, UErrorCode& status); void init(const PluralRules* rules, UErrorCode& status);
/** /**
* Copies dynamically allocated values (pointer fields). * Copies dynamically allocated values (pointer fields).
 End of changes. 4 change blocks. 
3 lines changed or deleted 17 lines changed or added


 plurrule.h   plurrule.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2008-2011, International Business Machines Corporation and * Copyright (C) 2008-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* *
* File PLURRULE.H * File PLURRULE.H
* *
* Modification History:* * Modification History:*
* Date Name Description * Date Name Description
* *
*************************************************************************** ***** *************************************************************************** *****
skipping to change at line 33 skipping to change at line 33
* \brief C++ API: PluralRules object * \brief C++ API: PluralRules object
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/format.h" #include "unicode/format.h"
/** /**
* Value returned by PluralRules::getUniqueKeywordValue() when there is no * Value returned by PluralRules::getUniqueKeywordValue() when there is no
* unique value to return. * unique value to return.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define UPLRULES_NO_UNIQUE_VALUE ((double)-0.00123456777) #define UPLRULES_NO_UNIQUE_VALUE ((double)-0.00123456777)
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class Hashtable; class Hashtable;
class RuleChain; class RuleChain;
class RuleParser; class RuleParser;
class PluralKeywordEnumeration; class PluralKeywordEnumeration;
skipping to change at line 244 skipping to change at line 244
StringEnumeration* getKeywords(UErrorCode& status) const; StringEnumeration* getKeywords(UErrorCode& status) const;
/** /**
* Returns a unique value for this keyword if it exists, else the const ant * Returns a unique value for this keyword if it exists, else the const ant
* UPLRULES_NO_UNIQUE_VALUE. * UPLRULES_NO_UNIQUE_VALUE.
* *
* @param keyword The keyword. * @param keyword The keyword.
* @return The unique value that generates the keyword, or * @return The unique value that generates the keyword, or
* UPLRULES_NO_UNIQUE_VALUE if the keyword is undefined or there is no * UPLRULES_NO_UNIQUE_VALUE if the keyword is undefined or there is no
* unique value that generates this keyword. * unique value that generates this keyword.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
double getUniqueKeywordValue(const UnicodeString& keyword); double getUniqueKeywordValue(const UnicodeString& keyword);
/** /**
* Returns all the values for which select() would return the keyword. If * Returns all the values for which select() would return the keyword. If
* the keyword is unknown, returns no values, but this is not an error. If * the keyword is unknown, returns no values, but this is not an error. If
* the number of values is unlimited, returns no values and -1 as the * the number of values is unlimited, returns no values and -1 as the
* count. * count.
* *
* The number of returned values is typically small. * The number of returned values is typically small.
* *
* @param keyword The keyword. * @param keyword The keyword.
* @param dest Array into which to put the returned values. Ma y * @param dest Array into which to put the returned values. Ma y
* be NULL if destCapacity is 0. * be NULL if destCapacity is 0.
* @param destCapacity The capacity of the array, must be at least 0. * @param destCapacity The capacity of the array, must be at least 0.
* @param status The error code. * @param status The error code.
* @return The count of values available, or -1. This coun t * @return The count of values available, or -1. This coun t
* can be larger than destCapacity, but no more tha n * can be larger than destCapacity, but no more tha n
* destCapacity values will be written. * destCapacity values will be written.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getAllKeywordValues(const UnicodeString &keyword, int32_t getAllKeywordValues(const UnicodeString &keyword,
double *dest, int32_t destCapacity, double *dest, int32_t destCapacity,
UErrorCode& status); UErrorCode& status);
/** /**
* Returns sample values for which select() would return the keyword. If * Returns sample values for which select() would return the keyword. If
* the keyword is unknown, returns no values, but this is not an error. * the keyword is unknown, returns no values, but this is not an error.
* *
* The number of returned values is typically small. * The number of returned values is typically small.
skipping to change at line 286 skipping to change at line 286
* @param keyword The keyword. * @param keyword The keyword.
* @param dest Array into which to put the returned values. Ma y * @param dest Array into which to put the returned values. Ma y
* be NULL if destCapacity is 0. * be NULL if destCapacity is 0.
* @param destCapacity The capacity of the array, must be at least 0. * @param destCapacity The capacity of the array, must be at least 0.
* @param status The error code. * @param status The error code.
* @return The count of values written. * @return The count of values written.
* If more than destCapacity samples are available, then * If more than destCapacity samples are available, then
* only destCapacity are written, and destCapacity is returned as the count, * only destCapacity are written, and destCapacity is returned as the count,
* rather than setting a U_BUFFER_OVERFLOW_ERROR. * rather than setting a U_BUFFER_OVERFLOW_ERROR.
* (The actual number of keyword values could be un limited.) * (The actual number of keyword values could be un limited.)
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getSamples(const UnicodeString &keyword, int32_t getSamples(const UnicodeString &keyword,
double *dest, int32_t destCapacity, double *dest, int32_t destCapacity,
UErrorCode& status); UErrorCode& status);
/** /**
* Returns TRUE if the given keyword is defined in this * Returns TRUE if the given keyword is defined in this
* <code>PluralRules</code> object. * <code>PluralRules</code> object.
* *
* @param keyword the input keyword. * @param keyword the input keyword.
* @return TRUE if the input keyword is defined. * @return TRUE if the input keyword is defined.
* Otherwise, return FALSE. * Otherwise, return FALSE.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UBool isKeyword(const UnicodeString& keyword) const; UBool isKeyword(const UnicodeString& keyword) const;
/** /**
* Returns keyword for default plural form. * Returns keyword for default plural form.
* *
* @return keyword for default plural form. * @return keyword for default plural form.
* @internal 4.0
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UnicodeString getKeywordOther() const; UnicodeString getKeywordOther() const;
/** /**
* Compares the equality of two PluralRules objects. * Compares the equality of two PluralRules objects.
* *
* @param other The other PluralRules object to be compared with. * @param other The other PluralRules object to be compared with.
* @return True if the given PluralRules is the same as this * @return True if the given PluralRules is the same as this
* PluralRules; false otherwise. * PluralRules; false otherwise.
 End of changes. 6 change blocks. 
6 lines changed or deleted 5 lines changed or added


 ptypes.h   ptypes.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* FILE NAME : ptypes.h * FILE NAME : ptypes.h
* *
* Date Name Description * Date Name Description
* 05/13/98 nos Creation (content moved here from ptypes.h). * 05/13/98 nos Creation (content moved here from ptypes.h).
* 03/02/99 stephen Added AS400 support. * 03/02/99 stephen Added AS400 support.
* 03/30/99 stephen Added Linux support. * 03/30/99 stephen Added Linux support.
* 04/13/99 stephen Reworked for autoconf. * 04/13/99 stephen Reworked for autoconf.
* 09/18/08 srl Moved basic types back to ptypes.h from platfor m.h * 09/18/08 srl Moved basic types back to ptypes.h from platfor m.h
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef _PTYPES_H #ifndef _PTYPES_H
#define _PTYPES_H #define _PTYPES_H
#include <sys/types.h> /**
* \def __STDC_LIMIT_MACROS
* According to the Linux stdint.h, the ISO C99 standard specifies that in
C++ implementations
* macros like INT32_MIN and UINTPTR_MAX should only be defined if explicit
ly requested.
* We need to define __STDC_LIMIT_MACROS before including stdint.h in C++ c
ode
* that uses such limit macros.
* @internal
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
/* NULL, size_t, wchar_t */
#include <stddef.h>
/*
* If all compilers provided all of the C99 headers and types,
* we would just unconditionally #include <stdint.h> here
* and not need any of the stuff after including platform.h.
*/
/* Find out if we have stdint.h etc. */
#include "unicode/platform.h" #include "unicode/platform.h"
/*========================================================================= ==*/ /*========================================================================= ==*/
/* Generic data types */ /* Generic data types */
/*========================================================================= ==*/ /*========================================================================= ==*/
/* If your platform does not have the <inttypes.h> header, you may /* If your platform does not have the <stdint.h> header, you may
need to edit the typedefs below. */ need to edit the typedefs in the #else section below.
#if U_HAVE_INTTYPES_H Use #if...#else...#endif with predefined compiler macros if possible. */
#if U_HAVE_STDINT_H
/* autoconf 2.13 sometimes can't properly find the data types in <inttypes. /*
h> */ * We mostly need <stdint.h> (which defines the standard integer types) but
/* os/390 needs <inttypes.h>, but it doesn't have int8_t, and it sometimes not <inttypes.h>.
*/ * <inttypes.h> includes <stdint.h> and adds the printf/scanf helpers PRId3
/* doesn't have uint8_t depending on the OS version. */ 2, SCNx16 etc.
/* So we have this work around. */ * which we almost never use, plus stuff like imaxabs() which we never use.
#ifdef OS390 */
#include <stdint.h>
#if U_PLATFORM == U_PF_OS390
/* The features header is needed to get (u)int64_t sometimes. */ /* The features header is needed to get (u)int64_t sometimes. */
#include <features.h> #include <features.h>
#if ! U_HAVE_INT8_T /* z/OS has <stdint.h>, but some versions are missing uint8_t (APAR PK62248
typedef signed char int8_t; ). */
#endif
#if !defined(__uint8_t) #if !defined(__uint8_t)
#define __uint8_t 1 #define __uint8_t 1
typedef unsigned char uint8_t; typedef unsigned char uint8_t;
#endif #endif
#endif /* OS390 */ #endif /* U_PLATFORM == U_PF_OS390 */
#include <inttypes.h> #elif U_HAVE_INTTYPES_H
#else /* U_HAVE_INTTYPES_H */ # include <inttypes.h>
#else /* neither U_HAVE_STDINT_H nor U_HAVE_INTTYPES_H */
#if ! U_HAVE_INT8_T #if ! U_HAVE_INT8_T
typedef signed char int8_t; typedef signed char int8_t;
#endif #endif
#if ! U_HAVE_UINT8_T #if ! U_HAVE_UINT8_T
typedef unsigned char uint8_t; typedef unsigned char uint8_t;
#endif #endif
#if ! U_HAVE_INT16_T #if ! U_HAVE_INT16_T
skipping to change at line 80 skipping to change at line 104
#if ! U_HAVE_INT32_T #if ! U_HAVE_INT32_T
typedef signed int int32_t; typedef signed int int32_t;
#endif #endif
#if ! U_HAVE_UINT32_T #if ! U_HAVE_UINT32_T
typedef unsigned int uint32_t; typedef unsigned int uint32_t;
#endif #endif
#if ! U_HAVE_INT64_T #if ! U_HAVE_INT64_T
#ifdef _MSC_VER
typedef signed __int64 int64_t;
#else
typedef signed long long int64_t; typedef signed long long int64_t;
/* else we may not have a 64-bit type */ #endif
#endif #endif
#if ! U_HAVE_UINT64_T #if ! U_HAVE_UINT64_T
#ifdef _MSC_VER
typedef unsigned __int64 uint64_t;
#else
typedef unsigned long long uint64_t; typedef unsigned long long uint64_t;
/* else we may not have a 64-bit type */ #endif
#endif #endif
#endif /* U_HAVE_INTTYPES_H */ #endif /* U_HAVE_STDINT_H / U_HAVE_INTTYPES_H */
#endif /* _PTYPES_H */ #endif /* _PTYPES_H */
 End of changes. 14 change blocks. 
21 lines changed or deleted 55 lines changed or added


 putil.h   putil.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1997-2009, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* FILE NAME : putil.h * FILE NAME : putil.h
* *
* Date Name Description * Date Name Description
* 05/14/98 nos Creation (content moved here from utypes.h). * 05/14/98 nos Creation (content moved here from utypes.h).
* 06/17/99 erm Added IEEE_754 * 06/17/99 erm Added IEEE_754
* 07/22/98 stephen Added IEEEremainder, max, min, trunc * 07/22/98 stephen Added IEEEremainder, max, min, trunc
skipping to change at line 33 skipping to change at line 33
#ifndef PUTIL_H #ifndef PUTIL_H
#define PUTIL_H #define PUTIL_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C API: Platform Utilities * \brief C API: Platform Utilities
*/ */
/** Define this to 1 if your platform supports IEEE 754 floating point,
to 0 if it does not. */
#ifndef IEEE_754
# define IEEE_754 1
#endif
/*========================================================================= =*/ /*========================================================================= =*/
/* Platform utilities */ /* Platform utilities */
/*========================================================================= =*/ /*========================================================================= =*/
/** /**
* Platform utilities isolates the platform dependencies of the * Platform utilities isolates the platform dependencies of the
* libarary. For each platform which this code is ported to, these * libarary. For each platform which this code is ported to, these
* functions may have to be re-implemented. * functions may have to be re-implemented.
*/ */
skipping to change at line 96 skipping to change at line 90
* This function is not thread-safe. Use it before calling ICU APIs from * This function is not thread-safe. Use it before calling ICU APIs from
* multiple threads. * multiple threads.
* *
* @param directory The directory to be set. * @param directory The directory to be set.
* *
* @see u_init * @see u_init
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 u_setDataDirectory(const char *directory); U_STABLE void U_EXPORT2 u_setDataDirectory(const char *directory);
#if !U_CHARSET_IS_UTF8
/**
* Please use ucnv_getDefaultName() instead.
* Return the default codepage for this platform and locale.
* This function can call setlocale() on Unix platforms. Please read the
* platform documentation on setlocale() before calling this function.
* @return the default codepage for this platform
* @internal
*/
U_INTERNAL const char* U_EXPORT2 uprv_getDefaultCodepage(void);
#endif
/**
* Please use uloc_getDefault() instead.
* Return the default locale ID string by querying ths system, or
* zero if one cannot be found.
* This function can call setlocale() on Unix platforms. Please read the
* platform documentation on setlocale() before calling this function.
* @return the default locale ID string
* @internal
*/
U_INTERNAL const char* U_EXPORT2 uprv_getDefaultLocaleID(void);
/** /**
* @{ * @{
* Filesystem file and path separator characters. * Filesystem file and path separator characters.
* Example: '/' and ':' on Unix, '\\' and ';' on Windows. * Example: '/' and ':' on Unix, '\\' and ';' on Windows.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#ifdef XP_MAC #if U_PLATFORM == U_PF_CLASSIC_MACOS
# define U_FILE_SEP_CHAR ':' # define U_FILE_SEP_CHAR ':'
# define U_FILE_ALT_SEP_CHAR ':' # define U_FILE_ALT_SEP_CHAR ':'
# define U_PATH_SEP_CHAR ';' # define U_PATH_SEP_CHAR ';'
# define U_FILE_SEP_STRING ":" # define U_FILE_SEP_STRING ":"
# define U_FILE_ALT_SEP_STRING ":" # define U_FILE_ALT_SEP_STRING ":"
# define U_PATH_SEP_STRING ";" # define U_PATH_SEP_STRING ";"
#elif defined(U_WINDOWS) #elif U_PLATFORM_USES_ONLY_WIN32_API
# define U_FILE_SEP_CHAR '\\' # define U_FILE_SEP_CHAR '\\'
# define U_FILE_ALT_SEP_CHAR '/' # define U_FILE_ALT_SEP_CHAR '/'
# define U_PATH_SEP_CHAR ';' # define U_PATH_SEP_CHAR ';'
# define U_FILE_SEP_STRING "\\" # define U_FILE_SEP_STRING "\\"
# define U_FILE_ALT_SEP_STRING "/" # define U_FILE_ALT_SEP_STRING "/"
# define U_PATH_SEP_STRING ";" # define U_PATH_SEP_STRING ";"
#else #else
# define U_FILE_SEP_CHAR '/' # define U_FILE_SEP_CHAR '/'
# define U_FILE_ALT_SEP_CHAR '/' # define U_FILE_ALT_SEP_CHAR '/'
# define U_PATH_SEP_CHAR ':' # define U_PATH_SEP_CHAR ':'
 End of changes. 5 change blocks. 
32 lines changed or deleted 3 lines changed or added


 rbbi.h   rbbi.h 
/* /*
*************************************************************************** ***************************************************************************
* Copyright (C) 1999-2011 International Business Machines Corporation * * Copyright (C) 1999-2012 International Business Machines Corporation *
* and others. All rights reserved. * * and others. All rights reserved. *
*************************************************************************** ***************************************************************************
********************************************************************** **********************************************************************
* Date Name Description * Date Name Description
* 10/22/99 alan Creation. * 10/22/99 alan Creation.
* 11/11/99 rgillam Complete port from Java. * 11/11/99 rgillam Complete port from Java.
********************************************************************** **********************************************************************
*/ */
skipping to change at line 169 skipping to change at line 169
* The type of the break iterator, or -1 if it has not been set. * The type of the break iterator, or -1 if it has not been set.
* @internal * @internal
*/ */
int32_t fBreakType; int32_t fBreakType;
protected: protected:
//===================================================================== == //===================================================================== ==
// constructors // constructors
//===================================================================== == //===================================================================== ==
#ifndef U_HIDE_INTERNAL_API
/** /**
* Constant to be used in the constructor * Constant to be used in the constructor
* RuleBasedBreakIterator(RBBIDataHeader*, EDontAdopt, UErrorCode &); * RuleBasedBreakIterator(RBBIDataHeader*, EDontAdopt, UErrorCode &);
* which does not adopt the memory indicated by the RBBIDataHeader* * which does not adopt the memory indicated by the RBBIDataHeader*
* parameter. * parameter.
* *
* @internal * @internal
*/ */
enum EDontAdopt { enum EDontAdopt {
kDontAdopt kDontAdopt
skipping to change at line 202 skipping to change at line 203
/** /**
* Constructor from a flattened set of RBBI data in memory which need n ot * Constructor from a flattened set of RBBI data in memory which need n ot
* be malloced (e.g. it may be a memory-mapped file, etc.). * be malloced (e.g. it may be a memory-mapped file, etc.).
* *
* This version does not adopt the memory, and does not * This version does not adopt the memory, and does not
* free it when done. * free it when done.
* @internal * @internal
*/ */
RuleBasedBreakIterator(const RBBIDataHeader* data, enum EDontAdopt dont Adopt, UErrorCode &status); RuleBasedBreakIterator(const RBBIDataHeader* data, enum EDontAdopt dont Adopt, UErrorCode &status);
#endif /* U_HIDE_INTERNAL_API */
friend class RBBIRuleBuilder; friend class RBBIRuleBuilder;
/** @internal */ /** @internal */
friend class BreakIterator; friend class BreakIterator;
public: public:
/** Default constructor. Creates an empty shell of an iterator, with n o /** Default constructor. Creates an empty shell of an iterator, with n o
* rules or text to iterate over. Object can subsequently be assigne d to. * rules or text to iterate over. Object can subsequently be assigne d to.
* @stable ICU 2.2 * @stable ICU 2.2
skipping to change at line 256 skipping to change at line 258
* The compiled rules are comaptible only between machines with the sam e * The compiled rules are comaptible only between machines with the sam e
* byte ordering (little or big endian) and the same base character set family * byte ordering (little or big endian) and the same base character set family
* (ASCII or EBCDIC). * (ASCII or EBCDIC).
* *
* @see #getBinaryRules * @see #getBinaryRules
* @param compiledRules A pointer to the compiled break rules to be use d. * @param compiledRules A pointer to the compiled break rules to be use d.
* @param ruleLength The length of the compiled break rules, in bytes. This * @param ruleLength The length of the compiled break rules, in bytes. This
* corresponds to the length value produced by getBinaryRules(). * corresponds to the length value produced by getBinaryRules().
* @param status Information on any errors encountered, including inval id * @param status Information on any errors encountered, including inval id
* binary rules. * binary rules.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
RuleBasedBreakIterator(const uint8_t *compiledRules, RuleBasedBreakIterator(const uint8_t *compiledRules,
uint32_t ruleLength, uint32_t ruleLength,
UErrorCode &status); UErrorCode &status);
/** /**
* This constructor uses the udata interface to create a BreakIterator * This constructor uses the udata interface to create a BreakIterator
* whose internal tables live in a memory-mapped file. "image" is an * whose internal tables live in a memory-mapped file. "image" is an
* ICU UDataMemory handle for the pre-compiled break iterator tables. * ICU UDataMemory handle for the pre-compiled break iterator tables.
* @param image handle to the memory image for the break iterator data. * @param image handle to the memory image for the break iterator data.
skipping to change at line 618 skipping to change at line 620
* break rules. * break rules.
* *
* The binary data can only be used with the same version of ICU * The binary data can only be used with the same version of ICU
* and on the same platform type (processor endian-ness) * and on the same platform type (processor endian-ness)
* *
* @param length Returns the length of the binary data. (Out paramter. ) * @param length Returns the length of the binary data. (Out paramter. )
* *
* @return A pointer to the binary (compiled) rule data. The storage * @return A pointer to the binary (compiled) rule data. The storage
* belongs to the RulesBasedBreakIterator object, not the * belongs to the RulesBasedBreakIterator object, not the
* caller, and must not be modified or deleted. * caller, and must not be modified or deleted.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual const uint8_t *getBinaryRules(uint32_t &length); virtual const uint8_t *getBinaryRules(uint32_t &length);
/**
* Set the subject text string upon which the break iterator is operat
ing
* without changing any other aspect of the matching state.
* The new and previous text strings must have the same content.
*
* This function is intended for use in environments where ICU is oper
ating on
* strings that may move around in memory. It provides a mechanism fo
r notifying
* ICU that the string has been relocated, and providing a new UText t
o access the
* string in its new position.
*
* Note that the break iterator implementation never copies the underl
ying text
* of a string being processed, but always operates directly on the or
iginal text
* provided by the user. Refreshing simply drops the references to the
old text
* and replaces them with references to the new.
*
* Caution: this function is normally used only by very specialized,
* system-level code. One example use case is with garbage collection
that moves
* the text in memory.
*
* @param input The new (moved) text string.
* @param status Receives errors detected by this function.
* @return *this
*
* @draft ICU 49
*/
virtual RuleBasedBreakIterator &refreshInputText(UText *input, UErrorCo
de &status);
protected: protected:
//===================================================================== == //===================================================================== ==
// implementation // implementation
//===================================================================== == //===================================================================== ==
/** /**
* Dumps caches and performs other actions associated with a complete c hange * Dumps caches and performs other actions associated with a complete c hange
* in text or iteration position. * in text or iteration position.
* @internal * @internal
*/ */
virtual void reset(void); virtual void reset(void);
skipping to change at line 657 skipping to change at line 686
*/ */
virtual int32_t getBreakType() const; virtual int32_t getBreakType() const;
#endif #endif
/** /**
* Set the type of the break iterator. * Set the type of the break iterator.
* @internal * @internal
*/ */
virtual void setBreakType(int32_t type); virtual void setBreakType(int32_t type);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Common initialization function, used by constructors and bufferClon e. * Common initialization function, used by constructors and bufferClon e.
* (Also used by DictionaryBasedBreakIterator::createBufferClone().) * (Also used by DictionaryBasedBreakIterator::createBufferClone().)
* @internal * @internal
*/ */
void init(); void init();
#endif /* U_HIDE_INTERNAL_API */
private: private:
/** /**
* This method backs the iterator back up to a "safe position" in the t ext. * This method backs the iterator back up to a "safe position" in the t ext.
* This is a position that we know, without any context, must be a brea k position. * This is a position that we know, without any context, must be a brea k position.
* The various calling methods then iterate forward from this safe posi tion to * The various calling methods then iterate forward from this safe posi tion to
* the appropriate position to return. (For more information, see the description * the appropriate position to return. (For more information, see the description
* of buildBackwardsStateTable() in RuleBasedBreakIterator.Builder.) * of buildBackwardsStateTable() in RuleBasedBreakIterator.Builder.)
* @param statetable state table used of moving backwards * @param statetable state table used of moving backwards
skipping to change at line 690 skipping to change at line 721
* and advances through the text character by character until we reach the end * and advances through the text character by character until we reach the end
* of the text or the state machine transitions to state 0. We update our return * of the text or the state machine transitions to state 0. We update our return
* value every time the state machine passes through a possible end sta te. * value every time the state machine passes through a possible end sta te.
* @param statetable state table used of moving forwards * @param statetable state table used of moving forwards
* @internal * @internal
*/ */
int32_t handleNext(const RBBIStateTable *statetable); int32_t handleNext(const RBBIStateTable *statetable);
protected: protected:
#ifndef U_HIDE_INTERNAL_API
/** /**
* This is the function that actually implements dictionary-based * This is the function that actually implements dictionary-based
* breaking. Covering at least the range from startPos to endPos, * breaking. Covering at least the range from startPos to endPos,
* it checks for dictionary characters, and if it finds them determines * it checks for dictionary characters, and if it finds them determines
* the appropriate object to deal with them. It may cache found breaks in * the appropriate object to deal with them. It may cache found breaks in
* fCachedBreakPositions as it goes. It may well also look at text outs ide * fCachedBreakPositions as it goes. It may well also look at text outs ide
* the range startPos to endPos. * the range startPos to endPos.
* If going forward, endPos is the normal Unicode break result, and * If going forward, endPos is the normal Unicode break result, and
* if goind in reverse, startPos is the normal Unicode break result * if goind in reverse, startPos is the normal Unicode break result
* @param startPos The start position of a range of text * @param startPos The start position of a range of text
* @param endPos The end position of a range of text * @param endPos The end position of a range of text
* @param reverse The call is for the reverse direction * @param reverse The call is for the reverse direction
* @internal * @internal
*/ */
int32_t checkDictionary(int32_t startPos, int32_t endPos, UBool reverse ); int32_t checkDictionary(int32_t startPos, int32_t endPos, UBool reverse );
#endif /* U_HIDE_INTERNAL_API */
private: private:
/** /**
* This function returns the appropriate LanguageBreakEngine for a * This function returns the appropriate LanguageBreakEngine for a
* given character c. * given character c.
* @param c A character in the dictionary set * @param c A character in the dictionary set
* @internal * @internal
*/ */
const LanguageBreakEngine *getLanguageBreakEngine(UChar32 c); const LanguageBreakEngine *getLanguageBreakEngine(UChar32 c);
 End of changes. 10 change blocks. 
3 lines changed or deleted 45 lines changed or added


 rbnf.h   rbnf.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 1997-2010, International Business Machines Corporation and others. * Copyright (C) 1997-2012, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef RBNF_H #ifndef RBNF_H
#define RBNF_H #define RBNF_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
skipping to change at line 965 skipping to change at line 965
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
virtual UClassID getDynamicClassID(void) const; virtual UClassID getDynamicClassID(void) const;
/**
* Sets the decimal format symbols, which is generally not changed
* by the programmer or user. The formatter takes ownership of
* symbolsToAdopt; the client must not delete it.
*
* @param symbolsToAdopt DecimalFormatSymbols to be adopted.
* @draft ICU 49
*/
virtual void adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsToA
dopt);
/**
* Sets the decimal format symbols, which is generally not changed
* by the programmer or user. A clone of the symbols is created and
* the symbols is _not_ adopted; the client is still responsible for
* deleting it.
*
* @param symbols DecimalFormatSymbols.
* @draft ICU 49
*/
virtual void setDecimalFormatSymbols(const DecimalFormatSymbols& symbol
s);
private: private:
RuleBasedNumberFormat(); // default constructor not implemented RuleBasedNumberFormat(); // default constructor not implemented
// this will ref the localizations if they are not NULL // this will ref the localizations if they are not NULL
// caller must deref to get adoption // caller must deref to get adoption
RuleBasedNumberFormat(const UnicodeString& description, LocalizationInf o* localizations, RuleBasedNumberFormat(const UnicodeString& description, LocalizationInf o* localizations,
const Locale& locale, UParseError& perror, UErrorCode& status ); const Locale& locale, UParseError& perror, UErrorCode& status );
void init(const UnicodeString& rules, LocalizationInfo* localizations, UParseError& perror, UErrorCode& status); void init(const UnicodeString& rules, LocalizationInfo* localizations, UParseError& perror, UErrorCode& status);
void dispose(); void dispose();
skipping to change at line 991 skipping to change at line 1012
friend class NFSubstitution; friend class NFSubstitution;
friend class NFRule; friend class NFRule;
friend class FractionalPartSubstitution; friend class FractionalPartSubstitution;
inline NFRuleSet * getDefaultRuleSet() const; inline NFRuleSet * getDefaultRuleSet() const;
Collator * getCollator() const; Collator * getCollator() const;
DecimalFormatSymbols * getDecimalFormatSymbols() const; DecimalFormatSymbols * getDecimalFormatSymbols() const;
private: private:
NFRuleSet **ruleSets; NFRuleSet **ruleSets;
UnicodeString* ruleSetDescriptions;
int32_t numRuleSets;
NFRuleSet *defaultRuleSet; NFRuleSet *defaultRuleSet;
Locale locale; Locale locale;
Collator* collator; Collator* collator;
DecimalFormatSymbols* decimalFormatSymbols; DecimalFormatSymbols* decimalFormatSymbols;
UBool lenient; UBool lenient;
UnicodeString* lenientParseRules; UnicodeString* lenientParseRules;
LocalizationInfo* localizations; LocalizationInfo* localizations;
// Temporary workaround - when noParse is true, do noting in parse.
// TODO: We need a real fix - see #6895/#6896
UBool noParse;
}; };
// --------------- // ---------------
inline UnicodeString& inline UnicodeString&
RuleBasedNumberFormat::format(const Formattable& obj, RuleBasedNumberFormat::format(const Formattable& obj,
UnicodeString& result, UnicodeString& result,
UErrorCode& status) const UErrorCode& status) const
{ {
// Don't use Format:: - use immediate base class only, // Don't use Format:: - use immediate base class only,
 End of changes. 4 change blocks. 
5 lines changed or deleted 26 lines changed or added


 regex.h   regex.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2002-2011, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* file name: regex.h * file name: regex.h
* encoding: US-ASCII * encoding: US-ASCII
* indentation:4 * indentation:4
* *
* created on: 2002oct22 * created on: 2002oct22
* created by: Andy Heninger * created by: Andy Heninger
* *
* ICU Regular Expressions, API for C++ * ICU Regular Expressions, API for C++
skipping to change at line 56 skipping to change at line 56
#if !UCONFIG_NO_REGULAR_EXPRESSIONS #if !UCONFIG_NO_REGULAR_EXPRESSIONS
#include "unicode/uobject.h" #include "unicode/uobject.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
#include "unicode/utext.h" #include "unicode/utext.h"
#include "unicode/parseerr.h" #include "unicode/parseerr.h"
#include "unicode/uregex.h" #include "unicode/uregex.h"
U_NAMESPACE_BEGIN // Forward Declarations
// Forward Declarations... U_NAMESPACE_BEGIN
class RegexMatcher;
class RegexPattern;
class UVector;
class UVector32;
class UVector64;
class UnicodeSet;
struct REStackFrame;
struct Regex8BitSet; struct Regex8BitSet;
class RuleBasedBreakIterator;
class RegexCImpl; class RegexCImpl;
class RegexMatcher;
class RegexPattern;
struct REStackFrame;
class RuleBasedBreakIterator;
class UnicodeSet;
class UVector;
class UVector32;
class UVector64;
/** /**
* RBBIPatternDump Debug function, displays the compiled form of a patt ern. * RBBIPatternDump Debug function, displays the compiled form of a patt ern.
* @internal * @internal
*/ */
#ifdef REGEX_DEBUG #ifdef REGEX_DEBUG
U_INTERNAL void U_EXPORT2 U_INTERNAL void U_EXPORT2
RegexPatternDump(const RegexPattern *pat); RegexPatternDump(const RegexPattern *pat);
#else #else
#undef RegexPatternDump #undef RegexPatternDump
skipping to change at line 209 skipping to change at line 209
* then creating a RegexMatcher object from the pattern.</p> * then creating a RegexMatcher object from the pattern.</p>
* *
* @param regex The regular expression to be compiled. Note, the text re ferred * @param regex The regular expression to be compiled. Note, the text re ferred
* to by this UText must not be deleted during the lifetime of the * to by this UText must not be deleted during the lifetime of the
* RegexPattern object or any RegexMatcher object created f rom it. * RegexPattern object or any RegexMatcher object created f rom it.
* @param pe Receives the position (line and column nubers) of any er ror * @param pe Receives the position (line and column nubers) of any er ror
* within the regular expression.) * within the regular expression.)
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return A regexPattern object for the compiled pattern. * @return A regexPattern object for the compiled pattern.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
static RegexPattern * U_EXPORT2 compile( UText *regex, static RegexPattern * U_EXPORT2 compile( UText *regex,
UParseError &pe, UParseError &pe,
UErrorCode &status); UErrorCode &status);
/** /**
* Compiles the regular expression in string form into a RegexPattern * Compiles the regular expression in string form into a RegexPattern
* object using the specified match mode flags. These compile methods, * object using the specified match mode flags. These compile methods,
* rather than the constructors, are the usual way that RegexPattern obj ects * rather than the constructors, are the usual way that RegexPattern obj ects
* are created. * are created.
skipping to change at line 268 skipping to change at line 268
* *
* @param regex The regular expression to be compiled. Note, the text re ferred * @param regex The regular expression to be compiled. Note, the text re ferred
* to by this UText must not be deleted during the lifetime of the * to by this UText must not be deleted during the lifetime of the
* RegexPattern object or any RegexMatcher object created f rom it. * RegexPattern object or any RegexMatcher object created f rom it.
* @param flags The match mode flags to be used. * @param flags The match mode flags to be used.
* @param pe Receives the position (line and column numbers) of any e rror * @param pe Receives the position (line and column numbers) of any e rror
* within the regular expression.) * within the regular expression.)
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return A regexPattern object for the compiled pattern. * @return A regexPattern object for the compiled pattern.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
static RegexPattern * U_EXPORT2 compile( UText *regex, static RegexPattern * U_EXPORT2 compile( UText *regex,
uint32_t flags, uint32_t flags,
UParseError &pe, UParseError &pe,
UErrorCode &status); UErrorCode &status);
/** /**
* Compiles the regular expression in string form into a RegexPattern * Compiles the regular expression in string form into a RegexPattern
* object using the specified match mode flags. These compile methods, * object using the specified match mode flags. These compile methods,
* rather than the constructors, are the usual way that RegexPattern obj ects * rather than the constructors, are the usual way that RegexPattern obj ects
skipping to change at line 323 skipping to change at line 323
* from a pattern string instead of than separately compiling the pat tern and * from a pattern string instead of than separately compiling the pat tern and
* then creating a RegexMatcher object from the pattern.</p> * then creating a RegexMatcher object from the pattern.</p>
* *
* @param regex The regular expression to be compiled. Note, the text re ferred * @param regex The regular expression to be compiled. Note, the text re ferred
* to by this UText must not be deleted during the lifetime of the * to by this UText must not be deleted during the lifetime of the
* RegexPattern object or any RegexMatcher object created f rom it. * RegexPattern object or any RegexMatcher object created f rom it.
* @param flags The match mode flags to be used. * @param flags The match mode flags to be used.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return A regexPattern object for the compiled pattern. * @return A regexPattern object for the compiled pattern.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
static RegexPattern * U_EXPORT2 compile( UText *regex, static RegexPattern * U_EXPORT2 compile( UText *regex,
uint32_t flags, uint32_t flags,
UErrorCode &status); UErrorCode &status);
/** /**
* Get the match mode flags that were used when compiling this pattern. * Get the match mode flags that were used when compiling this pattern.
* @return the match mode flags * @return the match mode flags
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
skipping to change at line 418 skipping to change at line 418
* both compiles the regular expression and applies it in a single opera tion. * both compiles the regular expression and applies it in a single opera tion.
* Note that if the same pattern needs to be applied repeatedly, this me thod will be * Note that if the same pattern needs to be applied repeatedly, this me thod will be
* less efficient than creating and reusing a RegexMatcher object. * less efficient than creating and reusing a RegexMatcher object.
* *
* @param regex The regular expression * @param regex The regular expression
* @param input The string data to be matched * @param input The string data to be matched
* @param pe Receives the position of any syntax errors within the regul ar expression * @param pe Receives the position of any syntax errors within the regul ar expression
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return True if the regular expression exactly matches the full input string. * @return True if the regular expression exactly matches the full input string.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
static UBool U_EXPORT2 matches(UText *regex, static UBool U_EXPORT2 matches(UText *regex,
UText *input, UText *input,
UParseError &pe, UParseError &pe,
UErrorCode &status); UErrorCode &status);
/** /**
* Returns the regular expression from which this pattern was compiled. This method will work * Returns the regular expression from which this pattern was compiled. This method will work
* even if the pattern was compiled from a UText. * even if the pattern was compiled from a UText.
* *
skipping to change at line 443 skipping to change at line 443
virtual UnicodeString pattern() const; virtual UnicodeString pattern() const;
/** /**
* Returns the regular expression from which this pattern was compiled. This method will work * Returns the regular expression from which this pattern was compiled. This method will work
* even if the pattern was compiled from a UnicodeString. * even if the pattern was compiled from a UnicodeString.
* *
* Note: This is the original input, not a clone. If the pattern was ori ginally compiled from a * Note: This is the original input, not a clone. If the pattern was ori ginally compiled from a
* UText, and that UText was modified, the returned UText may no longer reflect the RegexPattern * UText, and that UText was modified, the returned UText may no longer reflect the RegexPattern
* object. * object.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UText *patternText(UErrorCode &status) const; virtual UText *patternText(UErrorCode &status) const;
/** /**
* Split a string into fields. Somewhat like split() from Perl or Java . * Split a string into fields. Somewhat like split() from Perl or Java .
* Pattern matches identify delimiters that separate the input * Pattern matches identify delimiters that separate the input
* into fields. The input data between the delimiters becomes the * into fields. The input data between the delimiters becomes the
* fields themselves. * fields themselves.
* *
* If the delimiter pattern includes capture groups, the captured text will * If the delimiter pattern includes capture groups, the captured text will
skipping to change at line 526 skipping to change at line 526
* that field. This new UText is not guaranteed to be mu table. * that field. This new UText is not guaranteed to be mu table.
* @param destCapacity The number of elements in the destination array . * @param destCapacity The number of elements in the destination array .
* If the number of fields found is less than destCapaci ty, the * If the number of fields found is less than destCapaci ty, the
* extra strings in the destination array are not altere d. * extra strings in the destination array are not altere d.
* If the number of destination strings is less than the number * If the number of destination strings is less than the number
* of fields, the trailing part of the input string, inc luding any * of fields, the trailing part of the input string, inc luding any
* field delimiters, is placed in the last destination s tring. * field delimiters, is placed in the last destination s tring.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return The number of destination strings used. * @return The number of destination strings used.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual int32_t split(UText *input, virtual int32_t split(UText *input,
UText *dest[], UText *dest[],
int32_t destCapacity, int32_t destCapacity,
UErrorCode &status) const; UErrorCode &status) const;
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 2.4 * @stable ICU 2.4
skipping to change at line 653 skipping to change at line 653
* a RegexPattern object. Note that if several RegexMatchers need to be * a RegexPattern object. Note that if several RegexMatchers need to be
* created for the same expression, it will be more efficient to * created for the same expression, it will be more efficient to
* separately create and cache a RegexPattern object, and use * separately create and cache a RegexPattern object, and use
* its matcher() method to create the RegexMatcher objects. * its matcher() method to create the RegexMatcher objects.
* *
* @param regexp The regular expression to be compiled. * @param regexp The regular expression to be compiled.
* @param flags Regular expression options, such as case insensitive matching. * @param flags Regular expression options, such as case insensitive matching.
* @see UREGEX_CASE_INSENSITIVE * @see UREGEX_CASE_INSENSITIVE
* @param status Any errors are reported by setting this UErrorCode v ariable. * @param status Any errors are reported by setting this UErrorCode v ariable.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
RegexMatcher(UText *regexp, uint32_t flags, UErrorCode &status); RegexMatcher(UText *regexp, uint32_t flags, UErrorCode &status);
/** /**
* Construct a RegexMatcher for a regular expression. * Construct a RegexMatcher for a regular expression.
* This is a convenience method that avoids the need to explicitly cre ate * This is a convenience method that avoids the need to explicitly cre ate
* a RegexPattern object. Note that if several RegexMatchers need to be * a RegexPattern object. Note that if several RegexMatchers need to be
* created for the same expression, it will be more efficient to * created for the same expression, it will be more efficient to
* separately create and cache a RegexPattern object, and use * separately create and cache a RegexPattern object, and use
* its matcher() method to create the RegexMatcher objects. * its matcher() method to create the RegexMatcher objects.
skipping to change at line 700 skipping to change at line 700
* pattern matching operations happen on this clone. While read-only operations on * pattern matching operations happen on this clone. While read-only operations on
* the supplied text are permitted, it is critical that the underlying string not be * the supplied text are permitted, it is critical that the underlying string not be
* altered or deleted before use by the regular expression operations is complete. * altered or deleted before use by the regular expression operations is complete.
* *
* @param regexp The Regular Expression to be compiled. * @param regexp The Regular Expression to be compiled.
* @param input The string to match. The matcher retains a shallow clone of the text. * @param input The string to match. The matcher retains a shallow clone of the text.
* @param flags Regular expression options, such as case insensitive matching. * @param flags Regular expression options, such as case insensitive matching.
* @see UREGEX_CASE_INSENSITIVE * @see UREGEX_CASE_INSENSITIVE
* @param status Any errors are reported by setting this UErrorCode v ariable. * @param status Any errors are reported by setting this UErrorCode v ariable.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
RegexMatcher(UText *regexp, UText *input, RegexMatcher(UText *regexp, UText *input,
uint32_t flags, UErrorCode &status); uint32_t flags, UErrorCode &status);
private: private:
/** /**
* Cause a compilation error if an application accidentally attempts to * Cause a compilation error if an application accidentally attempts to
* create a matcher with a (UChar *) string as input rather than * create a matcher with a (UChar *) string as input rather than
* a UnicodeString. Avoids a dangling reference to a temporary str ing. * a UnicodeString. Avoids a dangling reference to a temporary str ing.
* <p> * <p>
skipping to change at line 849 skipping to change at line 849
* set to the beginning of the requested group. * set to the beginning of the requested group.
* *
* @param dest The UText into which the input should be clone d, or NULL to create a new UText * @param dest The UText into which the input should be clone d, or NULL to create a new UText
* @param group_len A reference to receive the length of the desir ed capture group * @param group_len A reference to receive the length of the desir ed capture group
* @param status A reference to a UErrorCode to receive any err ors. * @param status A reference to a UErrorCode to receive any err ors.
* Possible errors are U_REGEX_INVALID_STATE if no match * Possible errors are U_REGEX_INVALID_STATE if no match
* has been attempted or the last match failed an d * has been attempted or the last match failed an d
* U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr oup number. * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr oup number.
* @return dest if non-NULL, a shallow copy of the input text otherwis e * @return dest if non-NULL, a shallow copy of the input text otherwis e
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UText *group(UText *dest, int64_t &group_len, UErrorCode &statu s) const; virtual UText *group(UText *dest, int64_t &group_len, UErrorCode &statu s) const;
/** /**
* Returns a shallow clone of the entire live input string with the UT ext current native index * Returns a shallow clone of the entire live input string with the UT ext current native index
* set to the beginning of the requested group. * set to the beginning of the requested group.
* *
* @param groupNum The capture group number. * @param groupNum The capture group number.
* @param dest The UText into which the input should be clone d, or NULL to create a new UText. * @param dest The UText into which the input should be clone d, or NULL to create a new UText.
* @param group_len A reference to receive the length of the desir ed capture group * @param group_len A reference to receive the length of the desir ed capture group
* @param status A reference to a UErrorCode to receive any err ors. * @param status A reference to a UErrorCode to receive any err ors.
* Possible errors are U_REGEX_INVALID_STATE if no match * Possible errors are U_REGEX_INVALID_STATE if no match
* has been attempted or the last match failed an d * has been attempted or the last match failed an d
* U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr oup number. * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr oup number.
* @return dest if non-NULL, a shallow copy of the input text otherwis e * @return dest if non-NULL, a shallow copy of the input text otherwis e
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UText *group(int32_t groupNum, UText *dest, int64_t &group_len, UErrorCode &status) const; virtual UText *group(int32_t groupNum, UText *dest, int64_t &group_len, UErrorCode &status) const;
/** /**
* Returns a string containing the text captured by the given group * Returns a string containing the text captured by the given group
* during the previous match operation. Group(0) is the entire match. * during the previous match operation. Group(0) is the entire match.
* *
* @param groupNum the capture group number * @param groupNum the capture group number
* @param dest A mutable UText in which the matching text is placed. * @param dest A mutable UText in which the matching text is placed.
* If NULL, a new UText will be created (which ma y not be mutable). * If NULL, a new UText will be created (which ma y not be mutable).
skipping to change at line 901 skipping to change at line 901
* @return The (native) position in the input string of the start of the last match. * @return The (native) position in the input string of the start of the last match.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
virtual int32_t start(UErrorCode &status) const; virtual int32_t start(UErrorCode &status) const;
/** /**
* Returns the index in the input string of the start of the text matc hed * Returns the index in the input string of the start of the text matc hed
* during the previous match operation. * during the previous match operation.
* @param status a reference to a UErrorCode to receive any er rors. * @param status a reference to a UErrorCode to receive any er rors.
* @return The (native) position in the input string of the start of the last match. * @return The (native) position in the input string of the start of the last match.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual int64_t start64(UErrorCode &status) const; virtual int64_t start64(UErrorCode &status) const;
/** /**
* Returns the index in the input string of the start of the text matc hed by the * Returns the index in the input string of the start of the text matc hed by the
* specified capture group during the previous match operation. Retu rn -1 if * specified capture group during the previous match operation. Retu rn -1 if
* the capture group exists in the pattern, but was not part of the l ast match. * the capture group exists in the pattern, but was not part of the l ast match.
* *
* @param group the capture group number * @param group the capture group number
* @param status A reference to a UErrorCode to receive any err ors. Possible * @param status A reference to a UErrorCode to receive any err ors. Possible
skipping to change at line 931 skipping to change at line 931
* Returns the index in the input string of the start of the text matc hed by the * Returns the index in the input string of the start of the text matc hed by the
* specified capture group during the previous match operation. Retu rn -1 if * specified capture group during the previous match operation. Retu rn -1 if
* the capture group exists in the pattern, but was not part of the l ast match. * the capture group exists in the pattern, but was not part of the l ast match.
* *
* @param group the capture group number. * @param group the capture group number.
* @param status A reference to a UErrorCode to receive any err ors. Possible * @param status A reference to a UErrorCode to receive any err ors. Possible
* errors are U_REGEX_INVALID_STATE if no match has been * errors are U_REGEX_INVALID_STATE if no match has been
* attempted or the last match failed, and * attempted or the last match failed, and
* U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr oup number. * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr oup number.
* @return the (native) start position of substring matched by the sp ecified group. * @return the (native) start position of substring matched by the sp ecified group.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual int64_t start64(int32_t group, UErrorCode &status) const; virtual int64_t start64(int32_t group, UErrorCode &status) const;
/** /**
* Returns the index in the input string of the first character follo wing the * Returns the index in the input string of the first character follo wing the
* text matched during the previous match operation. * text matched during the previous match operation.
* *
* @param status A reference to a UErrorCode to receive any err ors. Possible * @param status A reference to a UErrorCode to receive any err ors. Possible
* errors are U_REGEX_INVALID_STATE if no match has been * errors are U_REGEX_INVALID_STATE if no match has been
* attempted or the last match failed. * attempted or the last match failed.
skipping to change at line 961 skipping to change at line 961
* Returns the index in the input string of the first character follo wing the * Returns the index in the input string of the first character follo wing the
* text matched during the previous match operation. * text matched during the previous match operation.
* *
* @param status A reference to a UErrorCode to receive any err ors. Possible * @param status A reference to a UErrorCode to receive any err ors. Possible
* errors are U_REGEX_INVALID_STATE if no match has been * errors are U_REGEX_INVALID_STATE if no match has been
* attempted or the last match failed. * attempted or the last match failed.
* @return the index of the last character matched, plus one. * @return the index of the last character matched, plus one.
* The index value returned is a native index, co rresponding to * The index value returned is a native index, co rresponding to
* code units for the underlying encoding type, f or example, * code units for the underlying encoding type, f or example,
* a byte index for UTF-8. * a byte index for UTF-8.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual int64_t end64(UErrorCode &status) const; virtual int64_t end64(UErrorCode &status) const;
/** /**
* Returns the index in the input string of the character following t he * Returns the index in the input string of the character following t he
* text matched by the specified capture group during the previous ma tch operation. * text matched by the specified capture group during the previous ma tch operation.
* *
* @param group the capture group number * @param group the capture group number
* @param status A reference to a UErrorCode to receive any er rors. Possible * @param status A reference to a UErrorCode to receive any er rors. Possible
* errors are U_REGEX_INVALID_STATE if no match has been * errors are U_REGEX_INVALID_STATE if no match has been
skipping to change at line 999 skipping to change at line 999
* @param status A reference to a UErrorCode to receive any er rors. Possible * @param status A reference to a UErrorCode to receive any er rors. Possible
* errors are U_REGEX_INVALID_STATE if no match has been * errors are U_REGEX_INVALID_STATE if no match has been
* attempted or the last match failed and * attempted or the last match failed and
* U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr oup number * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr oup number
* @return the index of the first character following the text * @return the index of the first character following the text
* captured by the specified group during the previous matc h operation. * captured by the specified group during the previous matc h operation.
* Return -1 if the capture group exists in the pattern but was not part of the match. * Return -1 if the capture group exists in the pattern but was not part of the match.
* The index value returned is a native index, correspondin g to * The index value returned is a native index, correspondin g to
* code units for the underlying encoding type, for example , * code units for the underlying encoding type, for example ,
* a byte index for UTF8. * a byte index for UTF8.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual int64_t end64(int32_t group, UErrorCode &status) const; virtual int64_t end64(int32_t group, UErrorCode &status) const;
/** /**
* Resets this matcher. The effect is to remove any memory of previou s matches, * Resets this matcher. The effect is to remove any memory of previou s matches,
* and to cause subsequent find() operations to begin at the begin ning of * and to cause subsequent find() operations to begin at the begin ning of
* the input string. * the input string.
* *
* @return this RegexMatcher. * @return this RegexMatcher.
* @stable ICU 2.4 * @stable ICU 2.4
skipping to change at line 1060 skipping to change at line 1060
* Resets this matcher with a new input string. This allows instances of RegexMatcher * Resets this matcher with a new input string. This allows instances of RegexMatcher
* to be reused, which is more efficient than creating a new RegexMa tcher for * to be reused, which is more efficient than creating a new RegexMa tcher for
* each input string to be processed. * each input string to be processed.
* @param input The new string on which subsequent pattern matches wil l operate. * @param input The new string on which subsequent pattern matches wil l operate.
* The matcher makes a shallow clone of the given text; o wnership of the * The matcher makes a shallow clone of the given text; o wnership of the
* original string remains with the caller. Because no de ep copy of the * original string remains with the caller. Because no de ep copy of the
* text is made, it is essential that the caller not modi fy the string * text is made, it is essential that the caller not modi fy the string
* until after regexp operations on it are done. * until after regexp operations on it are done.
* @return this RegexMatcher. * @return this RegexMatcher.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual RegexMatcher &reset(UText *input); virtual RegexMatcher &reset(UText *input);
/** /**
* Set the subject text string upon which the regular expression is loo king for matches * Set the subject text string upon which the regular expression is loo king for matches
* without changing any other aspect of the matching state. * without changing any other aspect of the matching state.
* The new and previous text strings must have the same content. * The new and previous text strings must have the same content.
* *
* This function is intended for use in environments where ICU is opera ting on * This function is intended for use in environments where ICU is opera ting on
* strings that may move around in memory. It provides a mechanism for notifying * strings that may move around in memory. It provides a mechanism for notifying
skipping to change at line 1086 skipping to change at line 1086
* provided by the user. Refreshing simply drops the references to the old text * provided by the user. Refreshing simply drops the references to the old text
* and replaces them with references to the new. * and replaces them with references to the new.
* *
* Caution: this function is normally used only by very specialized, * Caution: this function is normally used only by very specialized,
* system-level code. One example use case is with garbage collection that moves * system-level code. One example use case is with garbage collection that moves
* the text in memory. * the text in memory.
* *
* @param input The new (moved) text string. * @param input The new (moved) text string.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* *
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual RegexMatcher &refreshInputText(UText *input, UErrorCode &status ); virtual RegexMatcher &refreshInputText(UText *input, UErrorCode &status );
private: private:
/** /**
* Cause a compilation error if an application accidentally attempts to * Cause a compilation error if an application accidentally attempts to
* reset a matcher with a (UChar *) string as input rather than * reset a matcher with a (UChar *) string as input rather than
* a UnicodeString. Avoids a dangling reference to a temporary str ing. * a UnicodeString. Avoids a dangling reference to a temporary str ing.
* <p> * <p>
* To efficiently work with UChar *strings, wrap the data in a UnicodeS tring * To efficiently work with UChar *strings, wrap the data in a UnicodeS tring
skipping to change at line 1122 skipping to change at line 1122
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
virtual const UnicodeString &input() const; virtual const UnicodeString &input() const;
/** /**
* Returns the input string being matched. This is the live input tex t; it should not be * Returns the input string being matched. This is the live input tex t; it should not be
* altered or deleted. This method will work even if the input was ori ginally supplied as * altered or deleted. This method will work even if the input was ori ginally supplied as
* a UnicodeString. * a UnicodeString.
* @return the input text * @return the input text
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UText *inputText() const; virtual UText *inputText() const;
/** /**
* Returns the input string being matched, either by copying it into t he provided * Returns the input string being matched, either by copying it into t he provided
* UText parameter or by returning a shallow clone of the live input. Note that copying * UText parameter or by returning a shallow clone of the live input. Note that copying
* the entire input may cause significant performance and memory issue s. * the entire input may cause significant performance and memory issue s.
* @param dest The UText into which the input should be copied, or NUL L to create a new UText * @param dest The UText into which the input should be copied, or NUL L to create a new UText
* @param status error code * @param status error code
* @return dest if non-NULL, a shallow copy of the input text otherwis e * @return dest if non-NULL, a shallow copy of the input text otherwis e
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UText *getInput(UText *dest, UErrorCode &status) const; virtual UText *getInput(UText *dest, UErrorCode &status) const;
/** Sets the limits of this matcher's region. /** Sets the limits of this matcher's region.
* The region is the part of the input string that will be searched to find a match. * The region is the part of the input string that will be searched to find a match.
* Invoking this method resets the matcher, and then sets the region to start * Invoking this method resets the matcher, and then sets the region to start
* at the index specified by the start parameter and end at the index s pecified * at the index specified by the start parameter and end at the index s pecified
* by the end parameter. * by the end parameter.
* *
* Depending on the transparency and anchoring being used (see useTrans parentBounds * Depending on the transparency and anchoring being used (see useTrans parentBounds
skipping to change at line 1167 skipping to change at line 1167
/** /**
* Identical to region(start, limit, status) but also allows a start po sition without * Identical to region(start, limit, status) but also allows a start po sition without
* resetting the region state. * resetting the region state.
* @param regionStart The region start * @param regionStart The region start
* @param regionLimit the limit of the region * @param regionLimit the limit of the region
* @param startIndex The (native) index within the region bounds at wh ich to begin searches. * @param startIndex The (native) index within the region bounds at wh ich to begin searches.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* If startIndex is not within the specified region boun ds, * If startIndex is not within the specified region boun ds,
* U_INDEX_OUTOFBOUNDS_ERROR is returned. * U_INDEX_OUTOFBOUNDS_ERROR is returned.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual RegexMatcher &region(int64_t regionStart, int64_t regionLimit, int64_t startIndex, UErrorCode &status); virtual RegexMatcher &region(int64_t regionStart, int64_t regionLimit, int64_t startIndex, UErrorCode &status);
/** /**
* Reports the start index of this matcher's region. The searches this matcher * Reports the start index of this matcher's region. The searches this matcher
* conducts are limited to finding matches within regionStart (inclusiv e) and * conducts are limited to finding matches within regionStart (inclusiv e) and
* regionEnd (exclusive). * regionEnd (exclusive).
* *
* @return The starting (native) index of this matcher's region. * @return The starting (native) index of this matcher's region.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual int32_t regionStart() const; virtual int32_t regionStart() const;
/** /**
* Reports the start index of this matcher's region. The searches this matcher * Reports the start index of this matcher's region. The searches this matcher
* conducts are limited to finding matches within regionStart (inclusiv e) and * conducts are limited to finding matches within regionStart (inclusiv e) and
* regionEnd (exclusive). * regionEnd (exclusive).
* *
* @return The starting (native) index of this matcher's region. * @return The starting (native) index of this matcher's region.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual int64_t regionStart64() const; virtual int64_t regionStart64() const;
/** /**
* Reports the end (limit) index (exclusive) of this matcher's region. The searches * Reports the end (limit) index (exclusive) of this matcher's region. The searches
* this matcher conducts are limited to finding matches within regionS tart * this matcher conducts are limited to finding matches within regionS tart
* (inclusive) and regionEnd (exclusive). * (inclusive) and regionEnd (exclusive).
* *
* @return The ending point (native) of this matcher's region. * @return The ending point (native) of this matcher's region.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual int32_t regionEnd() const; virtual int32_t regionEnd() const;
/** /**
* Reports the end (limit) index (exclusive) of this matcher's region. The searches * Reports the end (limit) index (exclusive) of this matcher's region. The searches
* this matcher conducts are limited to finding matches within regionSt art * this matcher conducts are limited to finding matches within regionSt art
* (inclusive) and regionEnd (exclusive). * (inclusive) and regionEnd (exclusive).
* *
* @return The ending point (native) of this matcher's region. * @return The ending point (native) of this matcher's region.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual int64_t regionEnd64() const; virtual int64_t regionEnd64() const;
/** /**
* Queries the transparency of region bounds for this matcher. * Queries the transparency of region bounds for this matcher.
* See useTransparentBounds for a description of transparent and opaqu e bounds. * See useTransparentBounds for a description of transparent and opaqu e bounds.
* By default, a matcher uses opaque region boundaries. * By default, a matcher uses opaque region boundaries.
* *
* @return TRUE if this matcher is using opaque bounds, false if it is not. * @return TRUE if this matcher is using opaque bounds, false if it is not.
* @stable ICU 4.0 * @stable ICU 4.0
skipping to change at line 1265 skipping to change at line 1265
* *
* Anchoring Bounds are the default for regions. * Anchoring Bounds are the default for regions.
* *
* @param b TRUE if to enable anchoring bounds; FALSE to disable them. * @param b TRUE if to enable anchoring bounds; FALSE to disable them.
* @return This Matcher * @return This Matcher
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual RegexMatcher &useAnchoringBounds(UBool b); virtual RegexMatcher &useAnchoringBounds(UBool b);
/** /**
* Return TRUE if the most recent matching operation touched the * Return TRUE if the most recent matching operation attempted to acce
* end of the text being processed. In this case, additional input t ss
ext could * additional input beyond the available input text.
* change the results of that match. * In this case, additional input text could change the results of th
e match.
* *
* hitEnd() is defined for both successful and unsuccessful matches. * hitEnd() is defined for both successful and unsuccessful matches.
* In either case hitEnd() will return TRUE if if the end of the text was * In either case hitEnd() will return TRUE if if the end of the text was
* reached at any point during the matching process. * reached at any point during the matching process.
* *
* @return TRUE if the most recent match hit the end of input * @return TRUE if the most recent match hit the end of input
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual UBool hitEnd() const; virtual UBool hitEnd() const;
skipping to change at line 1332 skipping to change at line 1332
* replacement string. The replacement string may contain references to * replacement string. The replacement string may contain references to
* capture groups. * capture groups.
* *
* @param replacement a string containing the replacement text. * @param replacement a string containing the replacement text.
* @param dest a mutable UText in which the results are plac ed. * @param dest a mutable UText in which the results are plac ed.
* If NULL, a new UText will be created (which may not be mutable). * If NULL, a new UText will be created (which may not be mutable).
* @param status a reference to a UErrorCode to receive any er rors. * @param status a reference to a UErrorCode to receive any er rors.
* @return a string containing the results of the find a nd replace. * @return a string containing the results of the find a nd replace.
* If a pre-allocated UText was provided, it wi ll always be used and returned. * If a pre-allocated UText was provided, it wi ll always be used and returned.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UText *replaceAll(UText *replacement, UText *dest, UErrorCode & status); virtual UText *replaceAll(UText *replacement, UText *dest, UErrorCode & status);
/** /**
* Replaces the first substring of the input that matches * Replaces the first substring of the input that matches
* the pattern with the replacement string. This is a convenience * the pattern with the replacement string. This is a convenience
* function that provides a complete find-and-replace operation. * function that provides a complete find-and-replace operation.
* *
* <p>This function first resets this RegexMatcher. It then scans the in put string * <p>This function first resets this RegexMatcher. It then scans the in put string
* looking for a match of the pattern. Input that is not part * looking for a match of the pattern. Input that is not part
skipping to change at line 1380 skipping to change at line 1380
* would begin) after completing a replaceFirst() is not specified. The * would begin) after completing a replaceFirst() is not specified. The
* RegexMatcher should be reset before doing additional find() operat ions.</p> * RegexMatcher should be reset before doing additional find() operat ions.</p>
* *
* @param replacement a string containing the replacement text. * @param replacement a string containing the replacement text.
* @param dest a mutable UText in which the results are plac ed. * @param dest a mutable UText in which the results are plac ed.
* If NULL, a new UText will be created (which may not be mutable). * If NULL, a new UText will be created (which may not be mutable).
* @param status a reference to a UErrorCode to receive any er rors. * @param status a reference to a UErrorCode to receive any er rors.
* @return a string containing the results of the find a nd replace. * @return a string containing the results of the find a nd replace.
* If a pre-allocated UText was provided, it wi ll always be used and returned. * If a pre-allocated UText was provided, it wi ll always be used and returned.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UText *replaceFirst(UText *replacement, UText *dest, UErrorCode &status); virtual UText *replaceFirst(UText *replacement, UText *dest, UErrorCode &status);
/** /**
* Implements a replace operation intended to be used as part of an * Implements a replace operation intended to be used as part of an
* incremental find-and-replace. * incremental find-and-replace.
* *
* <p>The input string, starting from the end of the previous replacem ent and ending at * <p>The input string, starting from the end of the previous replacem ent and ending at
* the start of the current match, is appended to the destination stri ng. Then the * the start of the current match, is appended to the destination stri ng. Then the
* replacement string is appended to the output string, * replacement string is appended to the output string,
skipping to change at line 1439 skipping to change at line 1439
* the input text that matched the regexp pattern . The replacement * the input text that matched the regexp pattern . The replacement
* text may contain references to captured text f rom the input. * text may contain references to captured text f rom the input.
* @param status A reference to a UErrorCode to receive any err ors. Possible * @param status A reference to a UErrorCode to receive any err ors. Possible
* errors are U_REGEX_INVALID_STATE if no match has been * errors are U_REGEX_INVALID_STATE if no match has been
* attempted or the last match failed, and U_INDE X_OUTOFBOUNDS_ERROR * attempted or the last match failed, and U_INDE X_OUTOFBOUNDS_ERROR
* if the replacement text specifies a capture gr oup that * if the replacement text specifies a capture gr oup that
* does not exist in the pattern. * does not exist in the pattern.
* *
* @return this RegexMatcher * @return this RegexMatcher
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual RegexMatcher &appendReplacement(UText *dest, virtual RegexMatcher &appendReplacement(UText *dest,
UText *replacement, UErrorCode &status); UText *replacement, UErrorCode &status);
/** /**
* As the final step in a find-and-replace operation, append the remaind er * As the final step in a find-and-replace operation, append the remaind er
* of the input string, starting at the position following the last appe ndReplacement(), * of the input string, starting at the position following the last appe ndReplacement(),
* to the destination string. <code>appendTail()</code> is intended to b e invoked after one * to the destination string. <code>appendTail()</code> is intended to b e invoked after one
* or more invocations of the <code>RegexMatcher::appendReplacement()</c ode>. * or more invocations of the <code>RegexMatcher::appendReplacement()</c ode>.
* *
skipping to change at line 1467 skipping to change at line 1467
* As the final step in a find-and-replace operation, append the remaind er * As the final step in a find-and-replace operation, append the remaind er
* of the input string, starting at the position following the last appe ndReplacement(), * of the input string, starting at the position following the last appe ndReplacement(),
* to the destination string. <code>appendTail()</code> is intended to b e invoked after one * to the destination string. <code>appendTail()</code> is intended to b e invoked after one
* or more invocations of the <code>RegexMatcher::appendReplacement()</c ode>. * or more invocations of the <code>RegexMatcher::appendReplacement()</c ode>.
* *
* @param dest A mutable UText to which the results of the find-and-rep lace are appended. * @param dest A mutable UText to which the results of the find-and-rep lace are appended.
* Must not be NULL. * Must not be NULL.
* @param status error cod * @param status error cod
* @return the destination string. * @return the destination string.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual UText *appendTail(UText *dest, UErrorCode &status); virtual UText *appendTail(UText *dest, UErrorCode &status);
/** /**
* Split a string into fields. Somewhat like split() from Perl. * Split a string into fields. Somewhat like split() from Perl.
* The pattern matches identify delimiters that separate the input * The pattern matches identify delimiters that separate the input
* into fields. The input data between the matches becomes the * into fields. The input data between the matches becomes the
* fields themselves. * fields themselves.
* *
* @param input The string to be split into fields. The field delimi ters * @param input The string to be split into fields. The field delimi ters
skipping to change at line 1520 skipping to change at line 1520
* that field. This new UText is not guaranteed to be mu table. * that field. This new UText is not guaranteed to be mu table.
* @param destCapacity The number of elements in the destination array . * @param destCapacity The number of elements in the destination array .
* If the number of fields found is less than destCapaci ty, the * If the number of fields found is less than destCapaci ty, the
* extra strings in the destination array are not altere d. * extra strings in the destination array are not altere d.
* If the number of destination strings is less than the number * If the number of destination strings is less than the number
* of fields, the trailing part of the input string, inc luding any * of fields, the trailing part of the input string, inc luding any
* field delimiters, is placed in the last destination s tring. * field delimiters, is placed in the last destination s tring.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return The number of fields into which the input string was split. * @return The number of fields into which the input string was split.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual int32_t split(UText *input, virtual int32_t split(UText *input,
UText *dest[], UText *dest[],
int32_t destCapacity, int32_t destCapacity,
UErrorCode &status); UErrorCode &status);
/** /**
* Set a processing time limit for match operations with this Matcher. * Set a processing time limit for match operations with this Matcher.
* *
* Some patterns, when matching certain strings, can run in exponentia l time. * Some patterns, when matching certain strings, can run in exponentia l time.
skipping to change at line 1632 skipping to change at line 1632
* Set a progress callback function for use with find operations on this Matcher. * Set a progress callback function for use with find operations on this Matcher.
* During find operations, the callback will be invoked after each retur n from a * During find operations, the callback will be invoked after each retur n from a
* match attempt, giving the application the opportunity to terminate a long-running * match attempt, giving the application the opportunity to terminate a long-running
* find operation. * find operation.
* *
* @param callback A pointer to the user-supplied callback funct ion. * @param callback A pointer to the user-supplied callback funct ion.
* @param context User context pointer. The value supplied at the * @param context User context pointer. The value supplied at the
* time the callback function is set will be sav ed * time the callback function is set will be sav ed
* and passed to the callback each time that it is called. * and passed to the callback each time that it is called.
* @param status A reference to a UErrorCode to receive any er rors. * @param status A reference to a UErrorCode to receive any er rors.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual void setFindProgressCallback(URegexFindProgressCallback *c allback, virtual void setFindProgressCallback(URegexFindProgressCallback *c allback,
const void *context, const void *context,
UErrorCode &status); UErrorCode &status);
/** /**
* Get the find progress callback function for this URegularExpression. * Get the find progress callback function for this URegularExpression.
* *
* @param callback Out parameter, receives a pointer to the user -supplied * @param callback Out parameter, receives a pointer to the user -supplied
* callback function. * callback function.
* @param context Out parameter, receives the user context poin ter that * @param context Out parameter, receives the user context poin ter that
* was set when uregex_setFindProgressCallback() was called. * was set when uregex_setFindProgressCallback() was called.
* @param status A reference to a UErrorCode to receive any er rors. * @param status A reference to a UErrorCode to receive any er rors.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
virtual void getFindProgressCallback(URegexFindProgressCallback *& callback, virtual void getFindProgressCallback(URegexFindProgressCallback *& callback,
const void *&context, const void *&context,
UErrorCode &status); UErrorCode &status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* setTrace Debug function, enable/disable tracing of the matching engine. * setTrace Debug function, enable/disable tracing of the matching engine.
* For internal ICU development use only. DO NO USE!!!! * For internal ICU development use only. DO NO USE!!!!
* @internal * @internal
*/ */
void setTrace(UBool state); void setTrace(UBool state);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* ICU "poor man's RTTI", returns a UClassID for this class. * ICU "poor man's RTTI", returns a UClassID for this class.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
static UClassID U_EXPORT2 getStaticClassID(); static UClassID U_EXPORT2 getStaticClassID();
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
skipping to change at line 1686 skipping to change at line 1688
RegexMatcher(); // default constructor not implemented RegexMatcher(); // default constructor not implemented
RegexMatcher(const RegexPattern *pat); RegexMatcher(const RegexPattern *pat);
RegexMatcher(const RegexMatcher &other); RegexMatcher(const RegexMatcher &other);
RegexMatcher &operator =(const RegexMatcher &rhs); RegexMatcher &operator =(const RegexMatcher &rhs);
void init(UErrorCode &status); // Common initializ ation void init(UErrorCode &status); // Common initializ ation
void init2(UText *t, UErrorCode &e); // Common initialization, part 2. void init2(UText *t, UErrorCode &e); // Common initialization, part 2.
friend class RegexPattern; friend class RegexPattern;
friend class RegexCImpl; friend class RegexCImpl;
public: public:
#ifndef U_HIDE_INTERNAL_API
/** @internal */ /** @internal */
void resetPreserveRegion(); // Reset matcher state, but preserve any r egion. void resetPreserveRegion(); // Reset matcher state, but preserve any r egion.
#endif /* U_HIDE_INTERNAL_API */
private: private:
// //
// MatchAt This is the internal interface to the match engine itself . // MatchAt This is the internal interface to the match engine itself .
// Match status comes back in matcher member variables. // Match status comes back in matcher member variables.
// //
void MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status); void MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status);
inline void backTrack(int64_t &inputIdx, int32_t &patIdx); inline void backTrack(int64_t &inputIdx, int32_t &patIdx);
UBool isWordBoundary(int64_t pos); // perform Pe rl-like \b test UBool isWordBoundary(int64_t pos); // perform Pe rl-like \b test
UBool isUWordBoundary(int64_t pos); // perform RB BI based \b test UBool isUWordBoundary(int64_t pos); // perform RB BI based \b test
 End of changes. 39 change blocks. 
43 lines changed or deleted 48 lines changed or added


 resbund.h   resbund.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1996-2007, International Business Machines Corporation * Copyright (C) 1996-2011, International Business Machines Corporation
* and others. All Rights Reserved. * and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* File resbund.h * File resbund.h
* *
* CREATED BY * CREATED BY
* Richard Gillam * Richard Gillam
* *
* Modification History: * Modification History:
skipping to change at line 410 skipping to change at line 410
* *
* @param key a key associated with the wanted string * @param key a key associated with the wanted string
* @param status fills in the outgoing error code * @param status fills in the outgoing error code
* @return an UnicodeString object. If there is an err or, string is bogus * @return an UnicodeString object. If there is an err or, string is bogus
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString UnicodeString
getStringEx(const char* key, getStringEx(const char* key,
UErrorCode& status) const; UErrorCode& status) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the version number associated with this ResourceBundle as a s tring. Please * Return the version number associated with this ResourceBundle as a s tring. Please
* use getVersion, as this method is going to be deprecated. * use getVersion, as this method is going to be deprecated.
* *
* @return A version number string as specified in the resource bundle or its parent. * @return A version number string as specified in the resource bundle or its parent.
* The caller does not own this string. * The caller does not own this string.
* @see getVersion * @see getVersion
* @deprecated ICU 2.8 Use getVersion instead. * @deprecated ICU 2.8 Use getVersion instead.
*/ */
const char* const char*
getVersionNumber(void) const; getVersionNumber(void) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Return the version number associated with this ResourceBundle as a U VersionInfo array. * Return the version number associated with this ResourceBundle as a U VersionInfo array.
* *
* @param versionInfo A UVersionInfo array that is filled with the vers ion number * @param versionInfo A UVersionInfo array that is filled with the vers ion number
* as specified in the resource bundle or its parent . * as specified in the resource bundle or its parent .
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
void void
getVersion(UVersionInfo versionInfo) const; getVersion(UVersionInfo versionInfo) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the Locale associated with this ResourceBundle. * Return the Locale associated with this ResourceBundle.
* *
* @return a Locale object * @return a Locale object
* @deprecated ICU 2.8 Use getLocale(ULocDataLocaleType type, UErrorCod e &status) overload instead. * @deprecated ICU 2.8 Use getLocale(ULocDataLocaleType type, UErrorCod e &status) overload instead.
*/ */
const Locale& const Locale&
getLocale(void) const; getLocale(void) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Return the Locale associated with this ResourceBundle. * Return the Locale associated with this ResourceBundle.
* @param type You can choose between requested, valid and actual * @param type You can choose between requested, valid and actual
* locale. For description see the definition of * locale. For description see the definition of
* ULocDataLocaleType in uloc.h * ULocDataLocaleType in uloc.h
* @param status just for catching illegal arguments * @param status just for catching illegal arguments
* *
* @return a Locale object * @return a Locale object
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
const Locale const Locale
getLocale(ULocDataLocaleType type, UErrorCode &status) const; getLocale(ULocDataLocaleType type, UErrorCode &status) const;
#ifndef U_HIDE_INTERNAL_API
/** /**
* This API implements multilevel fallback * This API implements multilevel fallback
* @internal * @internal
*/ */
ResourceBundle ResourceBundle
getWithFallback(const char* key, UErrorCode& status); getWithFallback(const char* key, UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
/** /**
* ICU "poor man's RTTI", returns a UClassID for this class. * ICU "poor man's RTTI", returns a UClassID for this class.
* *
 End of changes. 7 change blocks. 
1 lines changed or deleted 7 lines changed or added


 smpdtfmt.h   smpdtfmt.h 
/* /*
* Copyright (C) 1997-2011, International Business Machines Corporation and * Copyright (C) 1997-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* File SMPDTFMT.H * File SMPDTFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 07/09/97 helena Make ParsePosition into a class. * 07/09/97 helena Make ParsePosition into a class.
skipping to change at line 75 skipping to change at line 75
* pattern, all ASCII letters are reserved as pattern letters, which are de fined * pattern, all ASCII letters are reserved as pattern letters, which are de fined
* as the following: * as the following:
* <pre> * <pre>
* \code * \code
* Symbol Meaning Presentation Example * Symbol Meaning Presentation Example
* ------ ------- ------------ ------- * ------ ------- ------------ -------
* G era designator (Text) AD * G era designator (Text) AD
* y year (Number) 1996 * y year (Number) 1996
* Y year (week of year) (Number) 1997 * Y year (week of year) (Number) 1997
* u extended year (Number) 4601 * u extended year (Number) 4601
* U cyclic year name (Text,NumFallback) ren-chen (29)
* Q Quarter (Text & Number) Q2 & 02 * Q Quarter (Text & Number) Q2 & 02
* M month in year (Text & Number) July & 07 * M month in year (Text & Number) July & 07
* d day in month (Number) 10 * d day in month (Number) 10
* h hour in am/pm (1~12) (Number) 12 * h hour in am/pm (1~12) (Number) 12
* H hour in day (0~23) (Number) 0 * H hour in day (0~23) (Number) 0
* m minute in hour (Number) 30 * m minute in hour (Number) 30
* s second in minute (Number) 55 * s second in minute (Number) 55
* S fractional second (Number) 978 * S fractional second (Number) 978
* E day of week (Text) Tuesday * E day of week (Text) Tuesday
* e day of week (local 1~7) (Text & Number) Tues & 2 * e day of week (local 1~7) (Text & Number) Tues & 2
* D day in year (Number) 189 * D day in year (Number) 189
* F day of week in month (Number) 2 (2nd Wed in July) * F day of week in month (Number) 2 (2nd Wed in July)
* w week in year (Number) 27 * w week in year (Number) 27
* W week in month (Number) 2 * W week in month (Number) 2
* a am/pm marker (Text) PM * a am/pm marker (Text) PM
* k hour in day (1~24) (Number) 24 * k hour in day (1~24) (Number) 24
* K hour in am/pm (0~11) (Number) 0 * K hour in am/pm (0~11) (Number) 0
* z time zone (Time) Pacific Standard Ti * z time zone (Text) PST
me * zzzz time zone (Text) Pacific Standard Ti
me
* Z time zone (RFC 822) (Number) -0800 * Z time zone (RFC 822) (Number) -0800
* v time zone (generic) (Text) Pacific Time * ZZZZ time zone (RFC 822) (Text & Number) GMT-08:00
* V time zone (abreviation) (Text) PT * ZZZZZ time zone (ISO 8601) (Text & Number) -08:00 & Z
* VVVV time zone (location) (Text) United States (Los * v time zone (generic) (Text) PT
Angeles) * vvvv time zone (generic) (Text) Pacific Time
* V time zone (abreviation) (Text) PST
* VVVV time zone (location) (Text) United States Time
(Los Angeles)
* g Julian day (Number) 2451334 * g Julian day (Number) 2451334
* A milliseconds in day (Number) 69540000 * A milliseconds in day (Number) 69540000
* q stand alone quarter (Text & Number) Q2 & 02 * q stand alone quarter (Text & Number) Q2 & 02
* L stand alone month (Text & Number) July & 07 * L stand alone month (Text & Number) July & 07
* c stand alone day of week (Text & Number) Tuesday & 2 * c stand alone day of week (Text & Number) Tuesday & 2
* ' escape for text (Delimiter) 'Date=' * ' escape for text (Delimiter) 'Date='
* '' single quote (Literal) 'o''clock' * '' single quote (Literal) 'o''clock'
* \endcode * \endcode
* </pre> * </pre>
* The count of pattern letters determine the format. * The count of pattern letters determine the format.
skipping to change at line 120 skipping to change at line 125
* <P> * <P>
* (Number): the minimum number of digits. Shorter numbers are zero-padded to * (Number): the minimum number of digits. Shorter numbers are zero-padded to
* this amount (e.g. if "m" produces "6", "mm" produces "06"). Year is hand led * this amount (e.g. if "m" produces "6", "mm" produces "06"). Year is hand led
* specially; that is, if the count of 'y' is 2, the Year will be truncated to 2 digits. * specially; that is, if the count of 'y' is 2, the Year will be truncated to 2 digits.
* (e.g., if "yyyy" produces "1997", "yy" produces "97".) * (e.g., if "yyyy" produces "1997", "yy" produces "97".)
* Unlike other fields, fractional seconds are padded on the right with zer o. * Unlike other fields, fractional seconds are padded on the right with zer o.
* <P> * <P>
* (Text & Number): 3 or over, use text, otherwise use number. (e.g., "M" produces "1", * (Text & Number): 3 or over, use text, otherwise use number. (e.g., "M" produces "1",
* "MM" produces "01", "MMM" produces "Jan", and "MMMM" produces "January". ) * "MM" produces "01", "MMM" produces "Jan", and "MMMM" produces "January". )
* <P> * <P>
* (Text,NumFallback): Behaves like Text if there is supporting data, like
* Number otherwise.
* <P>
* Any characters in the pattern that are not in the ranges of ['a'..'z'] a nd * Any characters in the pattern that are not in the ranges of ['a'..'z'] a nd
* ['A'..'Z'] will be treated as quoted text. For instance, characters * ['A'..'Z'] will be treated as quoted text. For instance, characters
* like ':', '.', ' ', '#' and '@' will appear in the resulting time text * like ':', '.', ' ', '#' and '@' will appear in the resulting time text
* even they are not embraced within single quotes. * even they are not embraced within single quotes.
* <P> * <P>
* A pattern containing any invalid pattern letter will result in a failing * A pattern containing any invalid pattern letter will result in a failing
* UErrorCode result during formatting or parsing. * UErrorCode result during formatting or parsing.
* <P> * <P>
* Examples using the US locale: * Examples using the US locale:
* <pre> * <pre>
skipping to change at line 183 skipping to change at line 191
* relative to some century. It does this by adjusting dates to be * relative to some century. It does this by adjusting dates to be
* within 80 years before and 20 years after the time the SimpleDateFormat * within 80 years before and 20 years after the time the SimpleDateFormat
* instance is created. For example, using a pattern of "MM/dd/yy" and a * instance is created. For example, using a pattern of "MM/dd/yy" and a
* SimpleDateFormat instance created on Jan 1, 1997, the string * SimpleDateFormat instance created on Jan 1, 1997, the string
* "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/ 64" * "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/ 64"
* would be interpreted as May 4, 1964. * would be interpreted as May 4, 1964.
* During parsing, only strings consisting of exactly two digits, as define d by * During parsing, only strings consisting of exactly two digits, as define d by
* <code>Unicode::isDigit()</code>, will be parsed into the default century . * <code>Unicode::isDigit()</code>, will be parsed into the default century .
* Any other numeric string, such as a one digit string, a three or more di git * Any other numeric string, such as a one digit string, a three or more di git
* string, or a two digit string that isn't all digits (for example, "-1"), is * string, or a two digit string that isn't all digits (for example, "-1"), is
* interpreted literally. So "01/02/3" or "01/02/003" are parsed, using th * interpreted literally. So "01/02/3" or "01/02/003" are parsed (for the
e * Gregorian calendar), using the same pattern, as Jan 2, 3 AD. Likewise (
* same pattern, as Jan 2, 3 AD. Likewise, "01/02/-3" is parsed as Jan 2, but
4 BC. * only in lenient parse mode, the default) "01/02/-3" is parsed as Jan 2,
4 BC.
* *
* <p> * <p>
* If the year pattern has more than two 'y' characters, the year is * If the year pattern has more than two 'y' characters, the year is
* interpreted literally, regardless of the number of digits. So using the * interpreted literally, regardless of the number of digits. So using the
* pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D. * pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.
* *
* <p> * <p>
* When numeric fields abut one another directly, with no intervening delim iter * When numeric fields abut one another directly, with no intervening delim iter
* characters, they constitute a run of abutting numeric fields. Such runs are * characters, they constitute a run of abutting numeric fields. Such runs are
* parsed specially. For example, the format "HHmmss" parses the input tex t * parsed specially. For example, the format "HHmmss" parses the input tex t
skipping to change at line 393 skipping to change at line 402
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos The formatting position. On input: an alignment fie ld, * @param pos The formatting position. On input: an alignment fie ld,
* if desired. On output: the offsets of the alignment field. * if desired. On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
virtual UnicodeString& format( Calendar& cal, virtual UnicodeString& format( Calendar& cal,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since
it is virtual */
/**
* Format a date or time, which is the standard millis since 24:00 GMT,
Jan
* 1, 1970. Overrides DateFormat pure virtual method.
* <P>
* Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
* 1996.07.10 AD at 15:08:56 PDT
*
* @param cal Calendar set to the date and time to be formatted
* into a date/time string.
* @param types Array of UDateFormatContextTypes for which the corr
esponding
* value specified in the next parameter should overri
de the
* formatter's default value for this call (this does
not
* change the default value).
* @param values Array of UDateFormatContextValues corresponding 1-1
to the
* UDateFormatContextTypes in the previous parameter.
* @param typesAndValuesCount Number of elements in the types and value
s
* arrays.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
* @param pos The formatting position. On input: an alignment fie
ld,
* if desired. On output: the offsets of the alignment
field.
* @return Reference to 'appendTo' parameter.
* @draft ICU 49
*/
virtual UnicodeString& format( Calendar& cal,
const UDateFormatContextType* types,
const UDateFormatContextValue* values,
int32_t typesAndValuesCount,
UnicodeString& appendTo,
FieldPosition& pos) const;
/** /**
* Format a date or time, which is the standard millis since 24:00 GMT, Jan * Format a date or time, which is the standard millis since 24:00 GMT, Jan
* 1, 1970. Overrides DateFormat pure virtual method. * 1, 1970. Overrides DateFormat pure virtual method.
* <P> * <P>
* Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
* 1996.07.10 AD at 15:08:56 PDT * 1996.07.10 AD at 15:08:56 PDT
* *
* @param cal Calendar set to the date and time to be formatted * @param cal Calendar set to the date and time to be formatted
* into a date/time string. * into a date/time string.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
skipping to change at line 528 skipping to change at line 569
/** /**
* Parse a date/time string beginning at the given parse position. For * Parse a date/time string beginning at the given parse position. For
* example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te
* that is equivalent to Date(837039928046). * that is equivalent to Date(837039928046).
* <P> * <P>
* By default, parsing is lenient: If the input is not in the form used by * By default, parsing is lenient: If the input is not in the form used by
* this object's format method but can still be parsed as a date, then the * this object's format method but can still be parsed as a date, then the
* parse succeeds. Clients may insist on strict adherence to the format by * parse succeeds. Clients may insist on strict adherence to the format by
* calling setLenient(false). * calling setLenient(false).
* @see DateFormat::setLenient(boolean)
* *
* @param text The date/time string to be parsed * @param text The date/time string to be parsed
* @param cal a Calendar set to the date and time to be formatted * @param cal A Calendar set on input to the date and time to be used
* into a date/time string. for
* missing values in the date/time string being parsed, an
d set
* on output to the parsed date/time. When the calendar ty
pe is
* different from the internal calendar held by this Simpl
eDateFormat
* instance, the internal calendar will be cloned to a wor
k
* calendar set to the same milliseconds and time zone as
the
* cal parameter, field values will be parsed based on the
work
* calendar, then the result (milliseconds and time zone)
will
* be set in this calendar.
* @param pos On input, the position at which to start parsing; on * @param pos On input, the position at which to start parsing; on
* output, the position at which parsing terminated, or th e * output, the position at which parsing terminated, or th e
* start position if the parse failed. * start position if the parse failed.
* @return A valid UDate if the input could be parsed. * @return A valid UDate if the input could be parsed.
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
virtual void parse( const UnicodeString& text, virtual void parse( const UnicodeString& text,
Calendar& cal, Calendar& cal,
ParsePosition& pos) const; ParsePosition& pos) const;
/** /**
* Parse a date/time string starting at the given parse position. For * Parse a date/time string starting at the given parse position. For
* example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te
* that is equivalent to Date(837039928046). * that is equivalent to Date(837039928046).
* <P> * <P>
* By default, parsing is lenient: If the input is not in the form used by * By default, parsing is lenient: If the input is not in the form used by
* this object's format method but can still be parsed as a date, then the * this object's format method but can still be parsed as a date, then the
* parse succeeds. Clients may insist on strict adherence to the format by * parse succeeds. Clients may insist on strict adherence to the format by
* calling setLenient(false). * calling setLenient(false).
*
* @see DateFormat::setLenient(boolean) * @see DateFormat::setLenient(boolean)
* <P>
* Note that the normal date formats associated with some calendars - s
uch
* as the Chinese lunar calendar - do not specify enough fields to enab
le
* dates to be parsed unambiguously. In the case of the Chinese lunar
* calendar, while the year within the current 60-year cycle is specifi
ed,
* the number of such cycles since the start date of the calendar (in t
he
* ERA field of the Calendar object) is not normally part of the format
,
* and parsing may assume the wrong era. For cases such as this it is
* recommended that clients parse using the method
* parse(const UnicodeString&, Calendar& cal, ParsePosition&)
* with the Calendar passed in set to the current date, or to a date
* within the era/cycle that should be assumed if absent in the format.
* *
* @param text The date/time string to be parsed * @param text The date/time string to be parsed
* @param pos On input, the position at which to start parsing; on * @param pos On input, the position at which to start parsing; on
* output, the position at which parsing terminated, or th e * output, the position at which parsing terminated, or th e
* start position if the parse failed. * start position if the parse failed.
* @return A valid UDate if the input could be parsed. * @return A valid UDate if the input could be parsed.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UDate parse( const UnicodeString& text, UDate parse( const UnicodeString& text,
ParsePosition& pos) const; ParsePosition& pos) const;
/** /**
* Parse a date/time string. For example, a time text "07/10/96 4:5 PM, PDT" * Parse a date/time string. For example, a time text "07/10/96 4:5 PM, PDT"
* will be parsed into a UDate that is equivalent to Date(837039928046) . * will be parsed into a UDate that is equivalent to Date(837039928046) .
* Parsing begins at the beginning of the string and proceeds as far as * Parsing begins at the beginning of the string and proceeds as far as
* possible. Assuming no parse errors were encountered, this function * possible. Assuming no parse errors were encountered, this function
* doesn't return any information about how much of the string was cons umed * doesn't return any information about how much of the string was cons umed
* by the parsing. If you need that information, use the version of * by the parsing. If you need that information, use the version of
* parse() that takes a ParsePosition. * parse() that takes a ParsePosition.
* <P>
* By default, parsing is lenient: If the input is not in the form used
by
* this object's format method but can still be parsed as a date, then
the
* parse succeeds. Clients may insist on strict adherence to the format
by
* calling setLenient(false).
* @see DateFormat::setLenient(boolean)
* <P>
* Note that the normal date formats associated with some calendars - s
uch
* as the Chinese lunar calendar - do not specify enough fields to enab
le
* dates to be parsed unambiguously. In the case of the Chinese lunar
* calendar, while the year within the current 60-year cycle is specifi
ed,
* the number of such cycles since the start date of the calendar (in t
he
* ERA field of the Calendar object) is not normally part of the format
,
* and parsing may assume the wrong era. For cases such as this it is
* recommended that clients parse using the method
* parse(const UnicodeString&, Calendar& cal, ParsePosition&)
* with the Calendar passed in set to the current date, or to a date
* within the era/cycle that should be assumed if absent in the format.
* *
* @param text The date/time string to be parsed * @param text The date/time string to be parsed into a UDate value.
* @param status Filled in with U_ZERO_ERROR if the parse was successfu l, and with * @param status Filled in with U_ZERO_ERROR if the parse was successfu l, and with
* an error value if there was a parse error. * an error value if there was a parse error.
* @return A valid UDate if the input could be parsed. * @return A valid UDate if the input could be parsed.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UDate parse( const UnicodeString& text, virtual UDate parse( const UnicodeString& text,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Set the start UDate used to interpret two-digit year strings. * Set the start UDate used to interpret two-digit year strings.
skipping to change at line 729 skipping to change at line 807
* Set the calendar to be used by this date format. Initially, the defa ult * Set the calendar to be used by this date format. Initially, the defa ult
* calendar for the specified or default locale is used. The caller sh ould * calendar for the specified or default locale is used. The caller sh ould
* not delete the Calendar object after it is adopted by this call. * not delete the Calendar object after it is adopted by this call.
* Adopting a new calendar will change to the default symbols. * Adopting a new calendar will change to the default symbols.
* *
* @param calendarToAdopt Calendar object to be adopted. * @param calendarToAdopt Calendar object to be adopted.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void adoptCalendar(Calendar* calendarToAdopt); virtual void adoptCalendar(Calendar* calendarToAdopt);
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since
it is virtual */
/**
* Set the formatter's default value for a particular context type,
* such as UDAT_CAPITALIZATION.
* @param type The context type for which the default value should be s
et.
* @param value The default value to set for the specified context type
.
* @param status Input/output status. If at entry this indicates a fail
ure
* status, the function will do nothing; otherwise this w
ill be
* updated with any new status from the function.
* @draft ICU 49
*/
virtual void setDefaultContext(UDateFormatContextType type, UDateFormat
ContextValue value,
UErrorCode& status);
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since
it is virtual */
/**
* Get the formatter's default value for a particular context type,
* such as UDAT_CAPITALIZATION.
* @param type The context type for which the default value should be o
btained.
* @param status Input/output status. If at entry this indicates a fail
ure
* status, the function will do nothing; otherwise this w
ill be
* updated with any new status from the function.
* @return The current default value for the specified context type.
* @draft ICU 49
*/
virtual int32_t getDefaultContext(UDateFormatContextType type, UErrorCo
de& status) const;
#ifndef U_HIDE_INTERNAL_API
/**
* Sets the TimeZoneFormat to be used by this date/time formatter.
* The caller should not delete the TimeZoneFormat object after
* it is adopted by this call.
* @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted
.
* @internal ICU 49 technology preview
*/
virtual void adoptTimeZoneFormat(TimeZoneFormat* timeZoneFormatToAdopt)
;
/**
* Sets the TimeZoneFormat to be used by this date/time formatter.
* @param newTimeZoneFormat The TimeZoneFormat object to copy.
* @internal ICU 49 technology preview
*/
virtual void setTimeZoneFormat(const TimeZoneFormat& newTimeZoneFormat)
;
/**
* Gets the time zone format object associated with this date/time form
atter.
* @return the time zone format associated with this date/time formatte
r.
* @internal ICU 49 technology preview
*/
virtual const TimeZoneFormat* getTimeZoneFormat(void) const;
#endif /* U_HIDE_INTERNAL_API */
#ifndef U_HIDE_INTERNAL_API
/** /**
* This is for ICU internal use only. Please do not use. * This is for ICU internal use only. Please do not use.
* Check whether the 'field' is smaller than all the fields covered in * Check whether the 'field' is smaller than all the fields covered in
* pattern, return TRUE if it is. The sequence of calendar field, * pattern, return TRUE if it is. The sequence of calendar field,
* from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE, ... * from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE, ...
* @param field the calendar field need to check against * @param field the calendar field need to check against
* @return TRUE if the 'field' is smaller than all the fields * @return TRUE if the 'field' is smaller than all the fields
* covered in pattern. FALSE otherwise. * covered in pattern. FALSE otherwise.
* @internal ICU 4.0 * @internal ICU 4.0
*/ */
skipping to change at line 764 skipping to change at line 895
/** /**
* This is for ICU internal use only. Please do not use. * This is for ICU internal use only. Please do not use.
* Get the locale of this simple date formatter. * Get the locale of this simple date formatter.
* It is used in DateIntervalFormat. * It is used in DateIntervalFormat.
* *
* @return locale in this simple date formatter * @return locale in this simple date formatter
* @internal ICU 4.0 * @internal ICU 4.0
*/ */
const Locale& getSmpFmtLocale(void) const; const Locale& getSmpFmtLocale(void) const;
#endif /* U_HIDE_INTERNAL_API */
private: private:
friend class DateFormat; friend class DateFormat;
void initializeDefaultCentury(void); void initializeDefaultCentury(void);
SimpleDateFormat(); // default constructor not implemented SimpleDateFormat(); // default constructor not implemented
/** /**
* Used by the DateFormat factory methods to construct a SimpleDateForm at. * Used by the DateFormat factory methods to construct a SimpleDateForm at.
skipping to change at line 795 skipping to change at line 927
* This is an internal method, called by DateFormat. It should never f ail. * This is an internal method, called by DateFormat. It should never f ail.
* @param locale the given locale. * @param locale the given locale.
* @param status Output param set to success/failure code on * @param status Output param set to success/failure code on
* exit. * exit.
*/ */
SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use defa ult pattern SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use defa ult pattern
/** /**
* Hook called by format(... FieldPosition& ...) and format(...FieldPos itionIterator&...) * Hook called by format(... FieldPosition& ...) and format(...FieldPos itionIterator&...)
*/ */
UnicodeString& _format(Calendar& cal, UnicodeString& appendTo, FieldPos UnicodeString& _format(Calendar& cal, UDateFormatContextValue capitaliz
itionHandler& handler, ationContext,
UErrorCode& status) const; UnicodeString& appendTo, FieldPositionHandler& h
andler, UErrorCode& status) const;
/** /**
* Called by format() to format a single field. * Called by format() to format a single field.
* *
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param ch The format character we encountered in the pattern. * @param ch The format character we encountered in the pattern.
* @param count Number of characters in the current pattern symbol (e.g., * @param count Number of characters in the current pattern symbol (e.g.,
* "yyyy" in the pattern would result in a call to thi s function * "yyyy" in the pattern would result in a call to thi s function
* with ch equal to 'y' and count equal to 4) * with ch equal to 'y' and count equal to 4)
* @param capitalizationContext Capitalization context for this date fo
rmat.
* @param fieldNum Zero-based numbering of current field within the ov
erall format.
* @param handler Records information about field positions. * @param handler Records information about field positions.
* @param cal Calendar to use * @param cal Calendar to use
* @param status Receives a status code, which will be U_ZERO_ERROR if the operation * @param status Receives a status code, which will be U_ZERO_ERROR if the operation
* succeeds. * succeeds.
*/ */
void subFormat(UnicodeString &appendTo, void subFormat(UnicodeString &appendTo,
UChar ch, UChar ch,
int32_t count, int32_t count,
UDateFormatContextValue capitalizationContext,
int32_t fieldNum,
FieldPositionHandler& handler, FieldPositionHandler& handler,
Calendar& cal, Calendar& cal,
UErrorCode& status) const; // in case of illegal argumen t UErrorCode& status) const; // in case of illegal argumen t
/** /**
* Used by subFormat() to format a numeric value. * Used by subFormat() to format a numeric value.
* Appends to toAppendTo a string representation of "value" * Appends to toAppendTo a string representation of "value"
* having a number of digits between "minDigits" and * having a number of digits between "minDigits" and
* "maxDigits". Uses the DateFormat's NumberFormat. * "maxDigits". Uses the DateFormat's NumberFormat.
* *
skipping to change at line 887 skipping to change at line 1023
*/ */
void initialize(const Locale& locale, UErrorCode& status); void initialize(const Locale& locale, UErrorCode& status);
/** /**
* Private code-size reduction function used by subParse. * Private code-size reduction function used by subParse.
* @param text the time text being parsed. * @param text the time text being parsed.
* @param start where to start parsing. * @param start where to start parsing.
* @param field the date field being parsed. * @param field the date field being parsed.
* @param stringArray the string array to parsed. * @param stringArray the string array to parsed.
* @param stringArrayCount the size of the array. * @param stringArrayCount the size of the array.
* @param monthPattern pointer to leap month pattern, or NULL if none.
* @param cal a Calendar set to the date and time to be formatted * @param cal a Calendar set to the date and time to be formatted
* into a date/time string. * into a date/time string.
* @return the new start position if matching succeeded; a negative num ber * @return the new start position if matching succeeded; a negative num ber
* indicating matching failure, otherwise. * indicating matching failure, otherwise.
*/ */
int32_t matchString(const UnicodeString& text, int32_t start, UCalendar DateFields field, int32_t matchString(const UnicodeString& text, int32_t start, UCalendar DateFields field,
const UnicodeString* stringArray, int32_t stringArr const UnicodeString* stringArray, int32_t stringArr
ayCount, Calendar& cal) const; ayCount,
const UnicodeString* monthPattern, Calendar& cal) c
onst;
/** /**
* Private code-size reduction function used by subParse. * Private code-size reduction function used by subParse.
* @param text the time text being parsed. * @param text the time text being parsed.
* @param start where to start parsing. * @param start where to start parsing.
* @param field the date field being parsed. * @param field the date field being parsed.
* @param stringArray the string array to parsed. * @param stringArray the string array to parsed.
* @param stringArrayCount the size of the array. * @param stringArrayCount the size of the array.
* @param cal a Calendar set to the date and time to be formatted * @param cal a Calendar set to the date and time to be formatted
* into a date/time string. * into a date/time string.
skipping to change at line 940 skipping to change at line 1078
* @param start where to start parsing. * @param start where to start parsing.
* @param ch the pattern character for the date field text to be parsed . * @param ch the pattern character for the date field text to be parsed .
* @param count the count of a pattern character. * @param count the count of a pattern character.
* @param obeyCount if true then the count is strictly obeyed. * @param obeyCount if true then the count is strictly obeyed.
* @param allowNegative * @param allowNegative
* @param ambiguousYear If true then the two-digit year == the default start year. * @param ambiguousYear If true then the two-digit year == the default start year.
* @param saveHebrewMonth Used to hang onto month until year is known. * @param saveHebrewMonth Used to hang onto month until year is known.
* @param cal a Calendar set to the date and time to be formatted * @param cal a Calendar set to the date and time to be formatted
* into a date/time string. * into a date/time string.
* @param patLoc * @param patLoc
* @param numericLeapMonthFormatter If non-null, used to parse numeric leap months.
* @return the new start position if matching succeeded; a negative num ber * @return the new start position if matching succeeded; a negative num ber
* indicating matching failure, otherwise. * indicating matching failure, otherwise.
*/ */
int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, i nt32_t count, int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, i nt32_t count,
UBool obeyCount, UBool allowNegative, UBool ambiguousY ear[], int32_t& saveHebrewMonth, Calendar& cal, UBool obeyCount, UBool allowNegative, UBool ambiguousY ear[], int32_t& saveHebrewMonth, Calendar& cal,
int32_t patLoc) const; int32_t patLoc, MessageFormat * numericLeapMonthFormat ter) const;
void parseInt(const UnicodeString& text, void parseInt(const UnicodeString& text,
Formattable& number, Formattable& number,
ParsePosition& pos, ParsePosition& pos,
UBool allowNegative, UBool allowNegative,
NumberFormat *fmt) const; NumberFormat *fmt) const;
void parseInt(const UnicodeString& text, void parseInt(const UnicodeString& text,
Formattable& number, Formattable& number,
int32_t maxDigits, int32_t maxDigits,
skipping to change at line 1016 skipping to change at line 1155
*/ */
int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) c onst; int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) c onst;
/** /**
* Skip over a run of zero or more isUWhiteSpace() characters at pos * Skip over a run of zero or more isUWhiteSpace() characters at pos
* in text. * in text.
*/ */
int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const; int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const;
/** /**
* Private methods for formatting/parsing GMT string
*/
void appendGMT(NumberFormat *currentNumberFormat,UnicodeString &appendT
o, Calendar& cal, UErrorCode& status) const;
void formatGMTDefault(NumberFormat *currentNumberFormat,UnicodeString &
appendTo, int32_t offset) const;
int32_t parseGMT(const UnicodeString &text, ParsePosition &pos) const;
int32_t parseGMTDefault(const UnicodeString &text, ParsePosition &pos)
const;
UBool isDefaultGMTFormat() const;
void formatRFC822TZ(UnicodeString &appendTo, int32_t offset) const;
/**
* Initialize MessageFormat instances used for GMT formatting/parsing
*/
void initGMTFormatters(UErrorCode &status);
/**
* Initialize NumberFormat instances used for numbering system override s. * Initialize NumberFormat instances used for numbering system override s.
*/ */
void initNumberFormatters(const Locale &locale,UErrorCode &status); void initNumberFormatters(const Locale &locale,UErrorCode &status);
/** /**
* Get the numbering system to be used for a particular field. * Get the numbering system to be used for a particular field.
*/ */
NumberFormat * getNumberFormatByIndex(UDateFormatField index) const; NumberFormat * getNumberFormatByIndex(UDateFormatField index) const;
/** /**
skipping to change at line 1116 skipping to change at line 1239
* defaultCenturyStartYear are only used if explicitly set by the user * defaultCenturyStartYear are only used if explicitly set by the user
* through the API method parseAmbiguousDatesAsAfter(). * through the API method parseAmbiguousDatesAsAfter().
*/ */
UDate fDefaultCenturyStart; UDate fDefaultCenturyStart;
/** /**
* See documentation for defaultCenturyStart. * See documentation for defaultCenturyStart.
*/ */
/*transient*/ int32_t fDefaultCenturyStartYear; /*transient*/ int32_t fDefaultCenturyStartYear;
enum ParsedTZType { int32_t tztype; // here to avoid api change
TZTYPE_UNK,
TZTYPE_STD,
TZTYPE_DST
};
ParsedTZType tztype; // here to avoid api change
typedef struct NSOverride { typedef struct NSOverride {
NumberFormat *nf; NumberFormat *nf;
int32_t hash; int32_t hash;
NSOverride *next; NSOverride *next;
} NSOverride; } NSOverride;
/*
* MessageFormat instances used for localized GMT format
*/
enum {
kGMTNegativeHMS = 0,
kGMTNegativeHM,
kGMTPositiveHMS,
kGMTPositiveHM,
kNumGMTFormatters
};
enum {
kGMTNegativeHMSMinLenIdx = 0,
kGMTPositiveHMSMinLenIdx,
kNumGMTFormatMinLengths
};
MessageFormat **fGMTFormatters;
// If a GMT hour format has a second field, we need to make sure
// the length of input localized GMT string must match the expected
// length. Otherwise, sub DateForamt handling offset format may
// unexpectedly success parsing input GMT string without second field.
// See #6880 about this issue.
// TODO: SimpleDateFormat should provide an option to invalidate
//
int32_t fGMTFormatHmsMinLen[kNumGMTFormatMinLengths];
NumberFormat **fNumberFormatters; NumberFormat **fNumberFormatters;
NSOverride *fOverrideList; NSOverride *fOverrideList;
UBool fHaveDefaultCentury; UBool fHaveDefaultCentury;
UDateFormatContextValue fDefaultCapitalizationContext;
}; };
inline UDate inline UDate
SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const
{ {
return fDefaultCenturyStart; return fDefaultCenturyStart;
} }
inline UnicodeString& inline UnicodeString&
SimpleDateFormat::format(const Formattable& obj, SimpleDateFormat::format(const Formattable& obj,
 End of changes. 26 change blocks. 
75 lines changed or deleted 213 lines changed or added


 sortkey.h   sortkey.h 
skipping to change at line 32 skipping to change at line 32
#define SORTKEY_H #define SORTKEY_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: Keys for comparing strings multiple times. * \brief C++ API: Keys for comparing strings multiple times.
*/ */
#if !UCONFIG_NO_COLLATION #if !UCONFIG_NO_COLLATION
#ifndef U_HIDE_DEPRECATED_API
#include "unicode/uobject.h" #include "unicode/uobject.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
#include "unicode/coll.h" #include "unicode/coll.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/* forward declaration */ /* forward declaration */
class RuleBasedCollator; class RuleBasedCollator;
skipping to change at line 325 skipping to change at line 326
inline const uint8_t* inline const uint8_t*
CollationKey::getByteArray(int32_t &count) const CollationKey::getByteArray(int32_t &count) const
{ {
count = fCount; count = fCount;
return fBytes; return fBytes;
} }
U_NAMESPACE_END U_NAMESPACE_END
#endif /* U_HIDE_DEPRECATED_API */
#endif /* #if !UCONFIG_NO_COLLATION */ #endif /* #if !UCONFIG_NO_COLLATION */
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 std_string.h   std_string.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2009-2010, International Business Machines * Copyright (C) 2009-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: std_string.h * file name: std_string.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2009feb19 * created on: 2009feb19
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 28 skipping to change at line 28
#define __STD_STRING_H__ #define __STD_STRING_H__
/** /**
* \file * \file
* \brief C++ API: Central ICU header for including the C++ standard &lt;st ring&gt; * \brief C++ API: Central ICU header for including the C++ standard &lt;st ring&gt;
* header and for related definitions. * header and for related definitions.
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
/**
* \def U_HAVE_STD_STRING
* Define whether the standard C++ (STL) &lt;string&gt; header is available
.
* @internal
*/
#ifndef U_HAVE_STD_STRING
#define U_HAVE_STD_STRING 1
#endif
#if U_HAVE_STD_STRING #if U_HAVE_STD_STRING
#include <string> #include <string>
/**
* \def U_STD_NS
* Define the namespace to use for standard C++ (STL) classes.
* Either std or empty.
* @draft ICU 4.2
*/
/**
* \def U_STD_NSQ
* Define the namespace qualifier to use for standard C++ (STL) classes.
* Either std:: or empty.
* For example,
* U_STD_NSQ string StringFromUnicodeString(const UnicodeString &unistr);
* @draft ICU 4.2
*/
/**
* \def U_STD_NS_USE
* This is used to specify that the rest of the code uses the
* standard (STL) namespace.
* Either "using namespace std;" or empty.
* @draft ICU 4.2
*/
#ifndef U_STD_NSQ
# if U_HAVE_NAMESPACE
# define U_STD_NS std
# define U_STD_NSQ U_STD_NS::
# define U_STD_NS_USE using namespace U_STD_NS;
# else
# define U_STD_NS
# define U_STD_NSQ
# define U_STD_NS_USE
# endif
#endif
#endif // U_HAVE_STD_STRING #endif // U_HAVE_STD_STRING
#endif // __STD_STRING_H__ #endif // __STD_STRING_H__
 End of changes. 3 change blocks. 
46 lines changed or deleted 1 lines changed or added


 stringpiece.h   stringpiece.h 
// Copyright (C) 2011, International Business Machines // Copyright (C) 2009-2012, International Business Machines
// Corporation and others. All Rights Reserved. // Corporation and others. All Rights Reserved.
// //
// Copyright 2001 and onwards Google Inc. // Copyright 2001 and onwards Google Inc.
// Author: Sanjay Ghemawat // Author: Sanjay Ghemawat
// This code is a contribution of Google code, and the style used here is // This code is a contribution of Google code, and the style used here is
// a compromise between the original Google code and the ICU coding guideli nes. // a compromise between the original Google code and the ICU coding guideli nes.
// For example, data types are ICU-ified (size_t,int->int32_t), // For example, data types are ICU-ified (size_t,int->int32_t),
// and API comments doxygen-ified, but function names and behavior are // and API comments doxygen-ified, but function names and behavior are
// as in the original, if possible. // as in the original, if possible.
skipping to change at line 74 skipping to change at line 74
* Constructs from a NUL-terminated const char * pointer. * Constructs from a NUL-terminated const char * pointer.
* @param str a NUL-terminated const char * pointer * @param str a NUL-terminated const char * pointer
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
StringPiece(const char* str); StringPiece(const char* str);
#if U_HAVE_STD_STRING #if U_HAVE_STD_STRING
/** /**
* Constructs from a std::string. * Constructs from a std::string.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
StringPiece(const U_STD_NSQ string& str) StringPiece(const std::string& str)
: ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { } : ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { }
#endif #endif
/** /**
* Constructs from a const char * pointer and a specified length. * Constructs from a const char * pointer and a specified length.
* @param offset a const char * pointer (need not be terminated) * @param offset a const char * pointer (need not be terminated)
* @param len the length of the string; must be non-negative * @param len the length of the string; must be non-negative
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { }
/** /**
skipping to change at line 141 skipping to change at line 141
/** /**
* Sets to an empty string. * Sets to an empty string.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
void clear() { ptr_ = NULL; length_ = 0; } void clear() { ptr_ = NULL; length_ = 0; }
/** /**
* Reset the stringpiece to refer to new data. * Reset the stringpiece to refer to new data.
* @param xdata pointer the new string data. Need not be nul terminated. * @param xdata pointer the new string data. Need not be nul terminated.
* @param len the length of the new data * @param len the length of the new data
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
void set(const char* xdata, int32_t len) { ptr_ = xdata; length_ = len; } void set(const char* xdata, int32_t len) { ptr_ = xdata; length_ = len; }
/** /**
* Reset the stringpiece to refer to new data. * Reset the stringpiece to refer to new data.
* @param str a pointer to a NUL-terminated string. * @param str a pointer to a NUL-terminated string.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
void set(const char* str); void set(const char* str);
/** /**
* Removes the first n string units. * Removes the first n string units.
* @param n prefix length, must be non-negative and <=length() * @param n prefix length, must be non-negative and <=length()
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
void remove_prefix(int32_t n) { void remove_prefix(int32_t n) {
if (n >= 0) { if (n >= 0) {
skipping to change at line 206 skipping to change at line 206
StringPiece substr(int32_t pos, int32_t len = npos) const { StringPiece substr(int32_t pos, int32_t len = npos) const {
return StringPiece(*this, pos, len); return StringPiece(*this, pos, len);
} }
}; };
/** /**
* Global operator == for StringPiece * Global operator == for StringPiece
* @param x The first StringPiece to compare. * @param x The first StringPiece to compare.
* @param y The second StringPiece to compare. * @param y The second StringPiece to compare.
* @return TRUE if the string data is equal * @return TRUE if the string data is equal
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_EXPORT UBool U_EXPORT2 U_EXPORT UBool U_EXPORT2
operator==(const StringPiece& x, const StringPiece& y); operator==(const StringPiece& x, const StringPiece& y);
/** /**
* Global operator != for StringPiece * Global operator != for StringPiece
* @param x The first StringPiece to compare. * @param x The first StringPiece to compare.
* @param y The second StringPiece to compare. * @param y The second StringPiece to compare.
* @return TRUE if the string data is not equal * @return TRUE if the string data is not equal
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UBool operator!=(const StringPiece& x, const StringPiece& y) { inline UBool operator!=(const StringPiece& x, const StringPiece& y) {
return !(x == y); return !(x == y);
} }
U_NAMESPACE_END U_NAMESPACE_END
#endif // __STRINGPIECE_H__ #endif // __STRINGPIECE_H__
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added


 stringtriebuilder.h   stringtriebuilder.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: stringtriebuilder.h * file name: stringtriebuilder.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010dec24 * created on: 2010dec24
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 27 skipping to change at line 27
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uobject.h" #include "unicode/uobject.h"
// Forward declaration. // Forward declaration.
struct UHashtable; struct UHashtable;
typedef struct UHashtable UHashtable; typedef struct UHashtable UHashtable;
/** /**
* Build options for BytesTrieBuilder and CharsTrieBuilder. * Build options for BytesTrieBuilder and CharsTrieBuilder.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
enum UStringTrieBuildOption { enum UStringTrieBuildOption {
/** /**
* Builds a trie quickly. * Builds a trie quickly.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
USTRINGTRIE_BUILD_FAST, USTRINGTRIE_BUILD_FAST,
/** /**
* Builds a trie more slowly, attempting to generate * Builds a trie more slowly, attempting to generate
* a shorter but equivalent serialization. * a shorter but equivalent serialization.
* This build option also uses more memory. * This build option also uses more memory.
* *
* This option can be effective when many integer values are the same * This option can be effective when many integer values are the same
* and string/byte sequence suffixes can be shared. * and string/byte sequence suffixes can be shared.
* Runtime speed is not expected to improve. * Runtime speed is not expected to improve.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
USTRINGTRIE_BUILD_SMALL USTRINGTRIE_BUILD_SMALL
}; };
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* Base class for string trie builder classes. * Base class for string trie builder classes.
* *
* This class is not intended for public subclassing. * This class is not intended for public subclassing.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API StringTrieBuilder : public UObject { class U_COMMON_API StringTrieBuilder : public UObject {
public: public:
#ifndef U_HIDE_INTERNAL_API
/** @internal */ /** @internal */
static UBool hashNode(const void *node); static UBool hashNode(const void *node);
/** @internal */ /** @internal */
static UBool equalNodes(const void *left, const void *right); static UBool equalNodes(const void *left, const void *right);
#endif /* U_HIDE_INTERNAL_API */
protected: protected:
// Do not enclose the protected default constructor with #ifndef U_HIDE
_INTERNAL_API
// or else the compiler will create a public default constructor.
/** @internal */ /** @internal */
StringTrieBuilder(); StringTrieBuilder();
/** @internal */ /** @internal */
virtual ~StringTrieBuilder(); virtual ~StringTrieBuilder();
#ifndef U_HIDE_INTERNAL_API
/** @internal */ /** @internal */
void createCompactBuilder(int32_t sizeGuess, UErrorCode &errorCode); void createCompactBuilder(int32_t sizeGuess, UErrorCode &errorCode);
/** @internal */ /** @internal */
void deleteCompactBuilder(); void deleteCompactBuilder();
/** @internal */ /** @internal */
void build(UStringTrieBuildOption buildOption, int32_t elementsLength, UErrorCode &errorCode); void build(UStringTrieBuildOption buildOption, int32_t elementsLength, UErrorCode &errorCode);
/** @internal */ /** @internal */
int32_t writeNode(int32_t start, int32_t limit, int32_t unitIndex); int32_t writeNode(int32_t start, int32_t limit, int32_t unitIndex);
/** @internal */ /** @internal */
int32_t writeBranchSubNode(int32_t start, int32_t limit, int32_t unitIn dex, int32_t length); int32_t writeBranchSubNode(int32_t start, int32_t limit, int32_t unitIn dex, int32_t length);
#endif /* U_HIDE_INTERNAL_API */
class Node; class Node;
#ifndef U_HIDE_INTERNAL_API
/** @internal */ /** @internal */
Node *makeNode(int32_t start, int32_t limit, int32_t unitIndex, UErrorC ode &errorCode); Node *makeNode(int32_t start, int32_t limit, int32_t unitIndex, UErrorC ode &errorCode);
/** @internal */ /** @internal */
Node *makeBranchSubNode(int32_t start, int32_t limit, int32_t unitIndex , Node *makeBranchSubNode(int32_t start, int32_t limit, int32_t unitIndex ,
int32_t length, UErrorCode &errorCode); int32_t length, UErrorCode &errorCode);
#endif /* U_HIDE_INTERNAL_API */
/** @internal */ /** @internal */
virtual int32_t getElementStringLength(int32_t i) const = 0; virtual int32_t getElementStringLength(int32_t i) const = 0;
/** @internal */ /** @internal */
virtual UChar getElementUnit(int32_t i, int32_t unitIndex) const = 0; virtual UChar getElementUnit(int32_t i, int32_t unitIndex) const = 0;
/** @internal */ /** @internal */
virtual int32_t getElementValue(int32_t i) const = 0; virtual int32_t getElementValue(int32_t i) const = 0;
// Finds the first unit index after this one where // Finds the first unit index after this one where
// the first and last element have different units again. // the first and last element have different units again.
skipping to change at line 120 skipping to change at line 128
/** @internal */ /** @internal */
virtual UBool matchNodesCanHaveValues() const = 0; virtual UBool matchNodesCanHaveValues() const = 0;
/** @internal */ /** @internal */
virtual int32_t getMaxBranchLinearSubNodeLength() const = 0; virtual int32_t getMaxBranchLinearSubNodeLength() const = 0;
/** @internal */ /** @internal */
virtual int32_t getMinLinearMatch() const = 0; virtual int32_t getMinLinearMatch() const = 0;
/** @internal */ /** @internal */
virtual int32_t getMaxLinearMatchLength() const = 0; virtual int32_t getMaxLinearMatchLength() const = 0;
#ifndef U_HIDE_INTERNAL_API
// max(BytesTrie::kMaxBranchLinearSubNodeLength, UCharsTrie::kMaxBranch LinearSubNodeLength). // max(BytesTrie::kMaxBranchLinearSubNodeLength, UCharsTrie::kMaxBranch LinearSubNodeLength).
/** @internal */ /** @internal */
static const int32_t kMaxBranchLinearSubNodeLength=5; static const int32_t kMaxBranchLinearSubNodeLength=5;
// Maximum number of nested split-branch levels for a branch on all 2^1 6 possible UChar units. // Maximum number of nested split-branch levels for a branch on all 2^1 6 possible UChar units.
// log2(2^16/kMaxBranchLinearSubNodeLength) rounded up. // log2(2^16/kMaxBranchLinearSubNodeLength) rounded up.
/** @internal */ /** @internal */
static const int32_t kMaxSplitBranchLevels=14; static const int32_t kMaxSplitBranchLevels=14;
/** /**
skipping to change at line 357 skipping to change at line 366
BranchHeadNode(int32_t len, Node *subNode) BranchHeadNode(int32_t len, Node *subNode)
: ValueNode((0x666666*37+len)*37+hashCode(subNode)), : ValueNode((0x666666*37+len)*37+hashCode(subNode)),
length(len), next(subNode) {} length(len), next(subNode) {}
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber); virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
virtual void write(StringTrieBuilder &builder); virtual void write(StringTrieBuilder &builder);
protected: protected:
int32_t length; int32_t length;
Node *next; // A branch sub-node. Node *next; // A branch sub-node.
}; };
#endif /* U_HIDE_INTERNAL_API */
/** @internal */ /** @internal */
virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32 _t length, virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32 _t length,
Node *nextNode) const = 0; Node *nextNode) const = 0;
/** @internal */ /** @internal */
virtual int32_t write(int32_t unit) = 0; virtual int32_t write(int32_t unit) = 0;
/** @internal */ /** @internal */
virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length) = 0; virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length) = 0;
/** @internal */ /** @internal */
 End of changes. 14 change blocks. 
5 lines changed or deleted 16 lines changed or added


 tblcoll.h   tblcoll.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 1996-2011, International Business Machines Corporation and * Copyright (C) 1996-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** *** *************************************************************************** ***
*/ */
/** /**
* \file * \file
* \brief C++ API: RuleBasedCollator class provides the simple implementati on of Collator. * \brief C++ API: RuleBasedCollator class provides the simple implementati on of Collator.
*/ */
/** /**
skipping to change at line 676 skipping to change at line 676
* Retrieves the reordering codes for this collator. * Retrieves the reordering codes for this collator.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
* will only return the length of the result without writing any of th e result string (pre-flighting). * will only return the length of the result without writing any of th e result string (pre-flighting).
* @param status A reference to an error code value, which must not ind icate * @param status A reference to an error code value, which must not ind icate
* a failure before the function call. * a failure before the function call.
* @return The length of the script ordering array. * @return The length of the script ordering array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see Collator#getEquivalentReorderCodes * @see Collator#getEquivalentReorderCodes
* @see Collator#setReorderCodes * @see Collator#setReorderCodes
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest, virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Sets the ordering of scripts for this collator. * Sets the ordering of scripts for this collator.
* @param reorderCodes An array of script codes in the new order. This can be NULL if the * @param reorderCodes An array of script codes in the new order. This can be NULL if the
* length is also set to 0. An empty array will clear any reordering co des on the collator. * length is also set to 0. An empty array will clear any reordering co des on the collator.
* @param reorderCodesLength The length of reorderCodes. * @param reorderCodesLength The length of reorderCodes.
* @param status error code * @param status error code
* @see Collator#getReorderCodes * @see Collator#getReorderCodes
* @see Collator#getEquivalentReorderCodes * @see Collator#getEquivalentReorderCodes
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes, virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength, int32_t reorderCodesLength,
UErrorCode& status) ; UErrorCode& status) ;
/** /**
* Retrieves the reorder codes that are grouped with the given reorder code. Some reorder * Retrieves the reorder codes that are grouped with the given reorder code. Some reorder
* codes will be grouped and must reorder together. * codes will be grouped and must reorder together.
* @param reorderCode The reorder code to determine equivalence for. * @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script equivalene reordering codes. * @param dest The array to fill with the script equivalene reordering codes.
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the
* function will only return the length of the result without writing a ny of the result * function will only return the length of the result without writing a ny of the result
* string (pre-flighting). * string (pre-flighting).
* @param status A reference to an error code value, which must not ind icate * @param status A reference to an error code value, which must not ind icate
* a failure before the function call. * a failure before the function call.
* @return The length of the of the reordering code equivalence array. * @return The length of the of the reordering code equivalence array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see Collator#getReorderCodes * @see Collator#getReorderCodes
* @see Collator#setReorderCodes * @see Collator#setReorderCodes
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode, static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
int32_t* dest, int32_t* dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode& status); UErrorCode& status);
private: private:
// private static constants ------------------------------------------- ---- // private static constants ------------------------------------------- ----
skipping to change at line 857 skipping to change at line 857
/** /**
* Creates the c struct for ucollator. This used internally by StringSea rch. * Creates the c struct for ucollator. This used internally by StringSea rch.
* Hence the responsibility of cleaning up the ucollator is not done by * Hence the responsibility of cleaning up the ucollator is not done by
* this RuleBasedCollator. The isDataOwned flag is set to FALSE. * this RuleBasedCollator. The isDataOwned flag is set to FALSE.
* @param collator new ucollator data * @param collator new ucollator data
*/ */
void setUCollator(UCollator *collator); void setUCollator(UCollator *collator);
public: public:
#ifndef U_HIDE_INTERNAL_API
/** /**
* Get UCollator data struct. Used only by StringSearch & intltest. * Get UCollator data struct. Used only by StringSearch & intltest.
* @return UCollator data struct * @return UCollator data struct
* @internal * @internal
*/ */
const UCollator * getUCollator(); const UCollator * getUCollator();
#endif /* U_HIDE_INTERNAL_API */
protected: protected:
/** /**
* Used internally by registraton to define the requested and valid loca les. * Used internally by registraton to define the requested and valid loca les.
* @param requestedLocale the requsted locale * @param requestedLocale the requsted locale
* @param validLocale the valid locale * @param validLocale the valid locale
* @param actualLocale the actual locale * @param actualLocale the actual locale
* @internal * @internal
*/ */
virtual void setLocales(const Locale& requestedLocale, const Locale& va lidLocale, const Locale& actualLocale); virtual void setLocales(const Locale& requestedLocale, const Locale& va lidLocale, const Locale& actualLocale);
skipping to change at line 906 skipping to change at line 908
Collator::ECollationStrength getECollationStrength( Collator::ECollationStrength getECollationStrength(
const UCollationStrength &strength) const; const UCollationStrength &strength) const;
/** /**
* Converts C++'s ECollationStrength to UCollationStrength * Converts C++'s ECollationStrength to UCollationStrength
* @param strength member of the enum ECollationStrength * @param strength member of the enum ECollationStrength
* @return UCollationStrength equivalent of ECollationStrength * @return UCollationStrength equivalent of ECollationStrength
*/ */
UCollationStrength getUCollationStrength( UCollationStrength getUCollationStrength(
const Collator::ECollationStrength &strength) const; const Collator::ECollationStrength &strength) const;
public:
/** Get the short definition string for a collator. This internal API h
arvests the collator's
* locale and the attribute set and produces a string that can be used
for opening
* a collator with the same properties using the ucol_openFromShortStr
ing API.
* This string will be normalized.
* The structure and the syntax of the string is defined in the "Namin
g collators"
* section of the users guide:
* http://icu-project.org/userguide/Collate_Concepts.html#Naming_Colla
tors
* This function supports preflighting.
*
* This is internal, and intended to be used with delegate converters.
*
* @param locale a locale that will appear as a collators locale in th
e resulting
* short string definition. If NULL, the locale will be
harvested
* from the collator.
* @param buffer space to hold the resulting string
* @param capacity capacity of the buffer
* @param status for returning errors. All the preflighting errors are
featured
* @return length of the resulting string
* @see ucol_openFromShortString
* @see ucol_normalizeShortDefinitionString
* @see ucol_getShortDefinitionString
* @internal
*/
virtual int32_t internalGetShortDefinitionString(const char *locale,
char *buffer,
int32_t capacity,
UErrorCode &status) co
nst;
}; };
// inline method implementation ------------------------------------------- -- // inline method implementation ------------------------------------------- --
inline void RuleBasedCollator::setUCollator(const Locale &locale, inline void RuleBasedCollator::setUCollator(const Locale &locale,
UErrorCode &status) UErrorCode &status)
{ {
setUCollator(locale.getName(), status); setUCollator(locale.getName(), status);
} }
skipping to change at line 928 skipping to change at line 958
if (ucollator && dataIsOwned) { if (ucollator && dataIsOwned) {
ucol_close(ucollator); ucol_close(ucollator);
} }
ucollator = collator; ucollator = collator;
dataIsOwned = FALSE; dataIsOwned = FALSE;
isWriteThroughAlias = TRUE; isWriteThroughAlias = TRUE;
setRuleStringFromCollator(); setRuleStringFromCollator();
} }
#ifndef U_HIDE_INTERNAL_API
inline const UCollator * RuleBasedCollator::getUCollator() inline const UCollator * RuleBasedCollator::getUCollator()
{ {
return ucollator; return ucollator;
} }
#endif
inline Collator::EComparisonResult RuleBasedCollator::getEComparisonResult( inline Collator::EComparisonResult RuleBasedCollator::getEComparisonResult(
const UCollationResult &result) const const UCollationResult &result) const
{ {
switch (result) switch (result)
{ {
case UCOL_LESS : case UCOL_LESS :
return Collator::LESS; return Collator::LESS;
case UCOL_EQUAL : case UCOL_EQUAL :
return Collator::EQUAL; return Collator::EQUAL;
 End of changes. 9 change blocks. 
4 lines changed or deleted 45 lines changed or added


 timezone.h   timezone.h 
/************************************************************************* /*************************************************************************
* Copyright (c) 1997-2011, International Business Machines Corporation * Copyright (c) 1997-2012, International Business Machines Corporation
* and others. All Rights Reserved. * and others. All Rights Reserved.
************************************************************************** **************************************************************************
* *
* File TIMEZONE.H * File TIMEZONE.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/21/97 aliu Overhauled header. * 04/21/97 aliu Overhauled header.
* 07/09/97 helena Changed createInstance to createDefault. * 07/09/97 helena Changed createInstance to createDefault.
skipping to change at line 70 skipping to change at line 70
* You can also get a <code>TimeZone</code> using <code>createTimeZone</cod e> along * You can also get a <code>TimeZone</code> using <code>createTimeZone</cod e> along
* with a time zone ID. For instance, the time zone ID for the US Pacific * with a time zone ID. For instance, the time zone ID for the US Pacific
* Time zone is "America/Los_Angeles". So, you can get a Pacific Time <code >TimeZone</code> object * Time zone is "America/Los_Angeles". So, you can get a Pacific Time <code >TimeZone</code> object
* with: * with:
* \htmlonly<blockquote>\endhtmlonly * \htmlonly<blockquote>\endhtmlonly
* <pre> * <pre>
* TimeZone *tz = TimeZone::createTimeZone("America/Los_Angeles"); * TimeZone *tz = TimeZone::createTimeZone("America/Los_Angeles");
* </pre> * </pre>
* \htmlonly</blockquote>\endhtmlonly * \htmlonly</blockquote>\endhtmlonly
* You can use <code>getAvailableIDs</code> method to iterate through * You can use <code>getAvailableIDs</code> method to iterate through
* all the supported time zone IDs. You can then choose a * all the supported time zone IDs, or getCanonicalID method to check
* if a time zone ID is supported or not. You can then choose a
* supported ID to get a <code>TimeZone</code>. * supported ID to get a <code>TimeZone</code>.
* If the time zone you want is not represented by one of the * If the time zone you want is not represented by one of the
* supported IDs, then you can create a custom time zone ID with * supported IDs, then you can create a custom time zone ID with
* the following syntax: * the following syntax:
* *
* \htmlonly<blockquote>\endhtmlonly * \htmlonly<blockquote>\endhtmlonly
* <pre> * <pre>
* GMT[+|-]hh[[:]mm] * GMT[+|-]hh[[:]mm]
* </pre> * </pre>
* \htmlonly</blockquote>\endhtmlonly * \htmlonly</blockquote>\endhtmlonly
* *
* For example, you might specify GMT+14:00 as a custom * For example, you might specify GMT+14:00 as a custom
* time zone ID. The <code>TimeZone</code> that is returned * time zone ID. The <code>TimeZone</code> that is returned
* when you specify a custom time zone ID does not include * when you specify a custom time zone ID uses the specified
* daylight savings time. * offset from GMT(=UTC) and does not observe daylight saving
* time. For example, you might specify GMT+14:00 as a custom
* time zone ID to create a TimeZone representing 14 hours ahead
* of GMT (with no daylight saving time). In addition,
* <code>getCanonicalID</code> can also be used to
* normalize a custom time zone ID.
* *
* TimeZone is an abstract class representing a time zone. A TimeZone is n eeded for * TimeZone is an abstract class representing a time zone. A TimeZone is n eeded for
* Calendar to produce local time for a particular time zone. A TimeZone c omprises * Calendar to produce local time for a particular time zone. A TimeZone c omprises
* three basic pieces of information: * three basic pieces of information:
* <ul> * <ul>
* <li>A time zone offset; that, is the number of milliseconds to add or subtract * <li>A time zone offset; that, is the number of milliseconds to add or subtract
* from a time expressed in terms of GMT to convert it to the same tim e in that * from a time expressed in terms of GMT to convert it to the same tim e in that
* time zone (without taking daylight savings time into account).</li> * time zone (without taking daylight savings time into account).</li>
* <li>Logic necessary to take daylight savings time into account if day light savings * <li>Logic necessary to take daylight savings time into account if day light savings
* time is observed in that time zone (e.g., the days and hours on whi ch daylight * time is observed in that time zone (e.g., the days and hours on whi ch daylight
* savings time begins and ends).</li> * savings time begins and ends).</li>
* <li>An ID. This is a text string that uniquely identifies the time z one.</li> * <li>An ID. This is a text string that uniquely identifies the time z one.</li>
* </ul> * </ul>
* *
* (Only the ID is actually implemented in TimeZone; subclasses of TimeZone may handle * (Only the ID is actually implemented in TimeZone; subclasses of TimeZone may handle
* daylight savings time and GMT offset in different ways. Currently we on * daylight savings time and GMT offset in different ways. Currently we ha
ly have one ve the following
* TimeZone subclass: SimpleTimeZone.) * TimeZone subclasses: RuleBasedTimeZone, SimpleTimeZone, and VTimeZone.)
* <P> * <P>
* The TimeZone class contains a static list containing a TimeZone object f or every * The TimeZone class contains a static list containing a TimeZone object f or every
* combination of GMT offset and daylight-savings time rules currently in u se in the * combination of GMT offset and daylight-savings time rules currently in u se in the
* world, each with a unique ID. Each ID consists of a region (usually a c ontinent or * world, each with a unique ID. Each ID consists of a region (usually a c ontinent or
* ocean) and a city in that region, separated by a slash, (for example, US Pacific * ocean) and a city in that region, separated by a slash, (for example, US Pacific
* Time is "America/Los_Angeles.") Because older versions of this class us ed * Time is "America/Los_Angeles.") Because older versions of this class us ed
* three- or four-letter abbreviations instead, there is also a table that maps the older * three- or four-letter abbreviations instead, there is also a table that maps the older
* abbreviations to the newer ones (for example, "PST" maps to "America/Los _Angeles"). * abbreviations to the newer ones (for example, "PST" maps to "America/Los _Angeles").
* Anywhere the API requires an ID, you can use either form. * Anywhere the API requires an ID, you can use either form.
* <P> * <P>
skipping to change at line 130 skipping to change at line 136
* your machine is set up correctly), TimeZone::createDefault() will return a TimeZone * your machine is set up correctly), TimeZone::createDefault() will return a TimeZone
* for Japanese Standard Time ("Asia/Tokyo"). * for Japanese Standard Time ("Asia/Tokyo").
*/ */
class U_I18N_API TimeZone : public UObject { class U_I18N_API TimeZone : public UObject {
public: public:
/** /**
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual ~TimeZone(); virtual ~TimeZone();
#ifndef U_HIDE_DRAFT_API
/** /**
* The GMT time zone has a raw offset of zero and does not use daylight * Returns the "unknown" time zone.
* It behaves like the GMT/UTC time zone but has the
* <code>UCAL_UNKNOWN_ZONE_ID</code> = "Etc/Unknown".
* createTimeZone() returns a mutable clone of this time zone if the in
put ID is not recognized.
*
* @return the "unknown" time zone.
* @see UCAL_UNKNOWN_ZONE_ID
* @see createTimeZone
* @see getGMT
* @draft ICU 49
*/
static const TimeZone& U_EXPORT2 getUnknown();
#endif /* U_HIDE_DRAFT_API */
/**
* The GMT (=UTC) time zone has a raw offset of zero and does not use d
aylight
* savings time. This is a commonly used time zone. * savings time. This is a commonly used time zone.
* @return the GMT time zone. *
* <p>Note: For backward compatibility reason, the ID used by the time
* zone returned by this method is "GMT", although the ICU's canonical
* ID for the GMT time zone is "Etc/GMT".
*
* @return the GMT/UTC time zone.
* @see getUnknown
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static const TimeZone* U_EXPORT2 getGMT(void); static const TimeZone* U_EXPORT2 getGMT(void);
/** /**
* Creates a <code>TimeZone</code> for the given ID. * Creates a <code>TimeZone</code> for the given ID.
* @param ID the ID for a <code>TimeZone</code>, such as "America/Los_A ngeles", * @param ID the ID for a <code>TimeZone</code>, such as "America/Los_A ngeles",
* or a custom ID such as "GMT-8:00". * or a custom ID such as "GMT-8:00".
* @return the specified <code>TimeZone</code>, or the GMT zone with ID * @return the specified <code>TimeZone</code>, or a mutable clone of g
* <code>UCAL_UNKNOWN_ZONE_ID</code> ("Etc/Unknown") if the given ID ca etUnknown()
nnot be understood. * if the given ID cannot be understood or if the given ID is "Etc/Unkn
* Return result guaranteed to be non-null. If you require that the spe own".
cific zone asked * The return result is guaranteed to be non-NULL.
* for be returned, check the ID of the return result. * If you require that the specific zone asked for be returned,
* compare the result with getUnknown() or check the ID of the return r
esult.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static TimeZone* U_EXPORT2 createTimeZone(const UnicodeString& ID); static TimeZone* U_EXPORT2 createTimeZone(const UnicodeString& ID);
/** /**
* Returns an enumeration over system time zone IDs with the given * Returns an enumeration over system time zone IDs with the given
* filter conditions. * filter conditions.
* @param zoneType The system time zone type. * @param zoneType The system time zone type.
* @param region The ISO 3166 two-letter country code or UN M.49 * @param region The ISO 3166 two-letter country code or UN M.49
* three-digit area code. When NULL, no filtering * three-digit area code. When NULL, no filtering
* done by region. * done by region.
* @param rawOffset An offset from GMT in milliseconds, ignoring * @param rawOffset An offset from GMT in milliseconds, ignoring
* the effect of daylight savings time, if any. * the effect of daylight savings time, if any.
* When NULL, no filtering done by zone offset. * When NULL, no filtering done by zone offset.
* @param ec Output param to filled in with a success or * @param ec Output param to filled in with a success or
* an error. * an error.
* @return an enumeration object, owned by the caller. * @return an enumeration object, owned by the caller.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
static StringEnumeration* U_EXPORT2 createTimeZoneIDEnumeration( static StringEnumeration* U_EXPORT2 createTimeZoneIDEnumeration(
USystemTimeZoneType zoneType, USystemTimeZoneType zoneType,
const char* region, const char* region,
const int32_t* rawOffset, const int32_t* rawOffset,
UErrorCode& ec); UErrorCode& ec);
/** /**
* Returns an enumeration over all recognized time zone IDs. (i.e., * Returns an enumeration over all recognized time zone IDs. (i.e.,
* all strings that createTimeZone() accepts) * all strings that createTimeZone() accepts)
skipping to change at line 274 skipping to change at line 303
* Sets the default time zone (i.e., what's returned by createDefault() ) to be the * Sets the default time zone (i.e., what's returned by createDefault() ) to be the
* specified time zone. If NULL is specified for the time zone, the de fault time * specified time zone. If NULL is specified for the time zone, the de fault time
* zone is set to the default host time zone. This call adopts the Tim eZone object * zone is set to the default host time zone. This call adopts the Tim eZone object
* passed in; the clent is no longer responsible for deleting it. * passed in; the clent is no longer responsible for deleting it.
* *
* @param zone A pointer to the new TimeZone object to use as the defa ult. * @param zone A pointer to the new TimeZone object to use as the defa ult.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static void U_EXPORT2 adoptDefault(TimeZone* zone); static void U_EXPORT2 adoptDefault(TimeZone* zone);
#ifndef U_HIDE_SYSTEM_API
/** /**
* Same as adoptDefault(), except that the TimeZone object passed in is NOT adopted; * Same as adoptDefault(), except that the TimeZone object passed in is NOT adopted;
* the caller remains responsible for deleting it. * the caller remains responsible for deleting it.
* *
* @param zone The given timezone. * @param zone The given timezone.
* @system * @system
* @stable ICU 2.0
*/ */
static void U_EXPORT2 setDefault(const TimeZone& zone); static void U_EXPORT2 setDefault(const TimeZone& zone);
#endif /* U_HIDE_SYSTEM_API */
/** /**
* Returns the timezone data version currently used by ICU. * Returns the timezone data version currently used by ICU.
* @param status Output param to filled in with a success or an error. * @param status Output param to filled in with a success or an error.
* @return the version string, such as "2007f" * @return the version string, such as "2007f"
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
static const char* U_EXPORT2 getTZDataVersion(UErrorCode& status); static const char* U_EXPORT2 getTZDataVersion(UErrorCode& status);
/** /**
skipping to change at line 589 skipping to change at line 621
* <p><strong>Note:</strong>The default implementation of * <p><strong>Note:</strong>The default implementation of
* ICU TimeZone uses the tz database, which supports historic * ICU TimeZone uses the tz database, which supports historic
* rule changes, for system time zones. With the implementation, * rule changes, for system time zones. With the implementation,
* there are time zones that used daylight savings time in the * there are time zones that used daylight savings time in the
* past, but no longer used currently. For example, Asia/Tokyo has * past, but no longer used currently. For example, Asia/Tokyo has
* never used daylight savings time since 1951. Most clients would * never used daylight savings time since 1951. Most clients would
* expect that this method to return <code>FALSE</code> for such case. * expect that this method to return <code>FALSE</code> for such case.
* The default implementation of this method returns <code>TRUE</code> * The default implementation of this method returns <code>TRUE</code>
* when the time zone uses daylight savings time in the current * when the time zone uses daylight savings time in the current
* (Gregorian) calendar year. * (Gregorian) calendar year.
* <p>In Java 7, <code>observesDaylightTime()</code> was added in
* addition to <code>useDaylightTime()</code>. In Java, <code>useDaylig
htTime()</code>
* only checks if daylight saving time is observed by the last known
* rule. This specification might not be what most users would expect
* if daylight saving time is currently observed, but not scheduled
* in future. In this case, Java's <code>userDaylightTime()</code> retu
rns
* <code>false</code>. To resolve the issue, Java 7 added <code>observe
sDaylightTime()</code>,
* which takes the current rule into account. The method <code>observes
DaylightTime()</code>
* was added in ICU4J for supporting API signature compatibility with J
DK.
* In general, ICU4C also provides JDK compatible methods, but the curr
ent
* implementation <code>userDaylightTime()</code> serves the purpose
* (takes the current rule into account), <code>observesDaylightTime()<
/code>
* is not added in ICU4C. In addition to <code>useDaylightTime()</code>
, ICU4C
* <code>BasicTimeZone</code> class (Note that <code>TimeZone::createTi
meZone(const UnicodeString &ID)</code>
* always returns a <code>BasicTimeZone</code>) provides a series of me
thods allowing
* historic and future time zone rule iteration, so you can check if da
ylight saving
* time is observed or not within a given period.
*
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UBool useDaylightTime(void) const = 0; virtual UBool useDaylightTime(void) const = 0;
/** /**
* Queries if the given date is in daylight savings time in * Queries if the given date is in daylight savings time in
* this time zone. * this time zone.
* This method is wasteful since it creates a new GregorianCalendar and * This method is wasteful since it creates a new GregorianCalendar and
* deletes it each time it is called. This is a deprecated method * deletes it each time it is called. This is a deprecated method
* and provided only for Java compatibility. * and provided only for Java compatibility.
skipping to change at line 680 skipping to change at line 730
* for example - "Etc/UTC", "EST5EDT", then this method returns * for example - "Etc/UTC", "EST5EDT", then this method returns
* "001" (UN M.49 area code for World). * "001" (UN M.49 area code for World).
* *
* @param id The system time zone ID. * @param id The system time zone ID.
* @param region Output buffer for receiving the region code. * @param region Output buffer for receiving the region code.
* @param capacity The size of the output buffer. * @param capacity The size of the output buffer.
* @param status Receives the status. When the given time zone ID * @param status Receives the status. When the given time zone ID
* is not a known system time zone ID, * is not a known system time zone ID,
* U_ILLEGAL_ARGUMENT_ERROR is set. * U_ILLEGAL_ARGUMENT_ERROR is set.
* @return The length of the output region code. * @return The length of the output region code.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
static int32_t U_EXPORT2 getRegion(const UnicodeString& id, static int32_t U_EXPORT2 getRegion(const UnicodeString& id,
char *region, int32_t capacity, UErrorCode& status); char *region, int32_t capacity, UErrorCode& status);
protected: protected:
/** /**
* Default constructor. ID is initialized to the empty string. * Default constructor. ID is initialized to the empty string.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 714 skipping to change at line 764
*/ */
TimeZone(const TimeZone& source); TimeZone(const TimeZone& source);
/** /**
* Default assignment operator. * Default assignment operator.
* @param right the object to be copied. * @param right the object to be copied.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
TimeZone& operator=(const TimeZone& right); TimeZone& operator=(const TimeZone& right);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Utility function. For internally loading rule data. * Utility function. For internally loading rule data.
* @param top Top resource bundle for tz data * @param top Top resource bundle for tz data
* @param ruleid ID of rule to load * @param ruleid ID of rule to load
* @param oldbundle Old bundle to reuse or NULL * @param oldbundle Old bundle to reuse or NULL
* @param status Status parameter * @param status Status parameter
* @return either a new bundle or *oldbundle * @return either a new bundle or *oldbundle
* @internal * @internal
*/ */
static UResourceBundle* loadRule(const UResourceBundle* top, const Unic odeString& ruleid, UResourceBundle* oldbundle, UErrorCode&status); static UResourceBundle* loadRule(const UResourceBundle* top, const Unic odeString& ruleid, UResourceBundle* oldbundle, UErrorCode&status);
#endif /* U_HIDE_INTERNAL_API */
private: private:
friend class ZoneMeta; friend class ZoneMeta;
static TimeZone* createCustomTimeZone(const UnicodeString&); // Creates a time zone based on the string. static TimeZone* createCustomTimeZone(const UnicodeString&); // Creates a time zone based on the string.
/** /**
* Finds the given ID in the Olson tzdata. If the given ID is found in the tzdata, * Finds the given ID in the Olson tzdata. If the given ID is found in the tzdata,
* returns the pointer to the ID resource. This method is exposed throu gh ZoneMeta class * returns the pointer to the ID resource. This method is exposed throu gh ZoneMeta class
* for ICU internal implementation and useful for building hashtable us ing a time zone * for ICU internal implementation and useful for building hashtable us ing a time zone
 End of changes. 16 change blocks. 
17 lines changed or deleted 83 lines changed or added


 tmutfmt.h   tmutfmt.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 2008-2011, Google, International Business Machines Corpora tion * Copyright (C) 2008-2012, Google, International Business Machines Corpora tion
* and others. All Rights Reserved. * and others. All Rights Reserved.
************************************************************************** ***** ************************************************************************** *****
*/ */
#ifndef __TMUTFMT_H__ #ifndef __TMUTFMT_H__
#define __TMUTFMT_H__ #define __TMUTFMT_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
skipping to change at line 32 skipping to change at line 32
#include "unicode/tmutamt.h" #include "unicode/tmutamt.h"
#include "unicode/measfmt.h" #include "unicode/measfmt.h"
#include "unicode/numfmt.h" #include "unicode/numfmt.h"
#include "unicode/plurrule.h" #include "unicode/plurrule.h"
/** /**
* Constants for various styles. * Constants for various styles.
* There are 2 styles: full name and abbreviated name. * There are 2 styles: full name and abbreviated name.
* For example, for English, the full name for hour duration is "3 hours", * For example, for English, the full name for hour duration is "3 hours",
* and the abbreviated name is "3 hrs". * and the abbreviated name is "3 hrs".
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
enum UTimeUnitFormatStyle { enum UTimeUnitFormatStyle {
/** @draft ICU 4.8 */ /** @stable ICU 4.8 */
UTMUTFMT_FULL_STYLE, UTMUTFMT_FULL_STYLE,
/** @draft ICU 4.8 */ /** @stable ICU 4.8 */
UTMUTFMT_ABBREVIATED_STYLE, UTMUTFMT_ABBREVIATED_STYLE,
/** @draft ICU 4.8 */ /** @stable ICU 4.8 */
UTMUTFMT_FORMAT_STYLE_COUNT UTMUTFMT_FORMAT_STYLE_COUNT
}; };
typedef enum UTimeUnitFormatStyle UTimeUnitFormatStyle; /**< @draft ICU 4.8 */ typedef enum UTimeUnitFormatStyle UTimeUnitFormatStyle; /**< @stable ICU 4. 8 */
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class Hashtable; class Hashtable;
/** /**
* Format or parse a TimeUnitAmount, using plural rules for the units where available. * Format or parse a TimeUnitAmount, using plural rules for the units where available.
* *
* <P> * <P>
* Code Sample: * Code Sample:
skipping to change at line 76 skipping to change at line 76
* ((Format*)format)->parseObject(formatted, result, status); * ((Format*)format)->parseObject(formatted, result, status);
* if (U_SUCCESS(status)) { * if (U_SUCCESS(status)) {
* assert (result == formattable); * assert (result == formattable);
* } * }
* } * }
* </pre> * </pre>
* *
* <P> * <P>
* @see TimeUnitAmount * @see TimeUnitAmount
* @see TimeUnitFormat * @see TimeUnitFormat
* @draft ICU 4.2 * @stable ICU 4.2
*/ */
class U_I18N_API TimeUnitFormat: public MeasureFormat { class U_I18N_API TimeUnitFormat: public MeasureFormat {
public: public:
/** /**
* Create TimeUnitFormat with default locale, and full name style. * Create TimeUnitFormat with default locale, and full name style.
* Use setLocale and/or setFormat to modify. * Use setLocale and/or setFormat to modify.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
TimeUnitFormat(UErrorCode& status); TimeUnitFormat(UErrorCode& status);
/** /**
* Create TimeUnitFormat given locale, and full name style. * Create TimeUnitFormat given locale, and full name style.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
TimeUnitFormat(const Locale& locale, UErrorCode& status); TimeUnitFormat(const Locale& locale, UErrorCode& status);
/** /**
* Create TimeUnitFormat given locale and style. * Create TimeUnitFormat given locale and style.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
TimeUnitFormat(const Locale& locale, UTimeUnitFormatStyle style, UError Code& status); TimeUnitFormat(const Locale& locale, UTimeUnitFormatStyle style, UError Code& status);
/** /**
* Copy constructor. * Copy constructor.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
TimeUnitFormat(const TimeUnitFormat&); TimeUnitFormat(const TimeUnitFormat&);
/** /**
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 lines changed or added


 translit.h   translit.h 
skipping to change at line 280 skipping to change at line 280
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
int32_t integer; int32_t integer;
/** /**
* This token, interpreted as a native pointer. * This token, interpreted as a native pointer.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
void* pointer; void* pointer;
}; };
#ifndef U_HIDE_INTERNAL_API
/** /**
* Return a token containing an integer. * Return a token containing an integer.
* @return a token containing an integer. * @return a token containing an integer.
* @internal * @internal
*/ */
inline static Token integerToken(int32_t); inline static Token integerToken(int32_t);
/** /**
* Return a token containing a pointer. * Return a token containing a pointer.
* @return a token containing a pointer. * @return a token containing a pointer.
* @internal * @internal
*/ */
inline static Token pointerToken(void*); inline static Token pointerToken(void*);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* A function that creates and returns a Transliterator. When * A function that creates and returns a Transliterator. When
* invoked, it will be passed the ID string that is being * invoked, it will be passed the ID string that is being
* instantiated, together with the context pointer that was passed * instantiated, together with the context pointer that was passed
* in when the factory function was first registered. Many * in when the factory function was first registered. Many
* factory functions will ignore both parameters, however, * factory functions will ignore both parameters, however,
* functions that are registered to more than one ID may use the * functions that are registered to more than one ID may use the
* ID or the context parameter to parameterize the transliterator * ID or the context parameter to parameterize the transliterator
* they create. * they create.
skipping to change at line 1017 skipping to change at line 1019
* This can be a compound ID and can include filters and should * This can be a compound ID and can include filters and should
* refer to transliterators that have already been registered with * refer to transliterators that have already been registered with
* the framework, although this isn't checked. * the framework, although this isn't checked.
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
static void U_EXPORT2 registerAlias(const UnicodeString& aliasID, static void U_EXPORT2 registerAlias(const UnicodeString& aliasID,
const UnicodeString& realID); const UnicodeString& realID);
protected: protected:
#ifndef U_HIDE_INTERNAL_API
/** /**
* @internal * @internal
* @param id the ID being registered * @param id the ID being registered
* @param factory a function pointer that will be copied and * @param factory a function pointer that will be copied and
* called later when the given ID is passed to createInstance() * called later when the given ID is passed to createInstance()
* @param context a context pointer that will be stored and * @param context a context pointer that will be stored and
* later passed to the factory function when an ID matching * later passed to the factory function when an ID matching
* the registration ID is being instantiated with this factory. * the registration ID is being instantiated with this factory.
*/ */
static void _registerFactory(const UnicodeString& id, static void _registerFactory(const UnicodeString& id,
skipping to change at line 1076 skipping to change at line 1079
* @param target the target against which to register the inverse * @param target the target against which to register the inverse
* @param inverseTarget the inverse of target, that is * @param inverseTarget the inverse of target, that is
* Any-target.getInverse() => Any-inverseTarget * Any-target.getInverse() => Any-inverseTarget
* @param bidirectional if true, register the reverse relation * @param bidirectional if true, register the reverse relation
* as well, that is, Any-inverseTarget.getInverse() => Any-target * as well, that is, Any-inverseTarget.getInverse() => Any-target
* @internal * @internal
*/ */
static void _registerSpecialInverse(const UnicodeString& target, static void _registerSpecialInverse(const UnicodeString& target,
const UnicodeString& inverseTarget, const UnicodeString& inverseTarget,
UBool bidirectional); UBool bidirectional);
#endif /* U_HIDE_INTERNAL_API */
public: public:
/** /**
* Unregisters a transliterator or class. This may be either * Unregisters a transliterator or class. This may be either
* a system transliterator or a user transliterator or class. * a system transliterator or a user transliterator or class.
* Any attempt to construct an unregistered transliterator based * Any attempt to construct an unregistered transliterator based
* on its ID will fail. * on its ID will fail.
* *
* @param ID the ID of the transliterator or class * @param ID the ID of the transliterator or class
skipping to change at line 1181 skipping to change at line 1185
* @return reference to result * @return reference to result
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static UnicodeString& U_EXPORT2 getAvailableVariant(int32_t index, static UnicodeString& U_EXPORT2 getAvailableVariant(int32_t index,
const UnicodeString& source, const UnicodeString& source,
const UnicodeString& target, const UnicodeString& target,
UnicodeString& result); UnicodeString& result);
protected: protected:
#ifndef U_HIDE_INTERNAL_API
/** /**
* Non-mutexed internal method * Non-mutexed internal method
* @internal * @internal
*/ */
static int32_t _countAvailableSources(void); static int32_t _countAvailableSources(void);
/** /**
* Non-mutexed internal method * Non-mutexed internal method
* @internal * @internal
*/ */
skipping to change at line 1223 skipping to change at line 1228
const UnicodeString& target); const UnicodeString& target);
/** /**
* Non-mutexed internal method * Non-mutexed internal method
* @internal * @internal
*/ */
static UnicodeString& _getAvailableVariant(int32_t index, static UnicodeString& _getAvailableVariant(int32_t index,
const UnicodeString& source, const UnicodeString& source,
const UnicodeString& target, const UnicodeString& target,
UnicodeString& result); UnicodeString& result);
#endif /* U_HIDE_INTERNAL_API */
protected: protected:
/** /**
* Set the ID of this transliterators. Subclasses shouldn't do * Set the ID of this transliterators. Subclasses shouldn't do
* this, unless the underlying script behavior has changed. * this, unless the underlying script behavior has changed.
* @param id the new id t to be set. * @param id the new id t to be set.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
void setID(const UnicodeString& id); void setID(const UnicodeString& id);
skipping to change at line 1269 skipping to change at line 1275
* class have the same class ID. Objects of other classes have * class have the same class ID. Objects of other classes have
* different class IDs. * different class IDs.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UClassID getDynamicClassID(void) const = 0; virtual UClassID getDynamicClassID(void) const = 0;
private: private:
static UBool initializeRegistry(UErrorCode &status); static UBool initializeRegistry(UErrorCode &status);
public: public:
#ifndef U_HIDE_OBSOLETE_API
/** /**
* Return the number of IDs currently registered with the system. * Return the number of IDs currently registered with the system.
* To retrieve the actual IDs, call getAvailableID(i) with * To retrieve the actual IDs, call getAvailableID(i) with
* i from 0 to countAvailableIDs() - 1. * i from 0 to countAvailableIDs() - 1.
* @return the number of IDs currently registered with the system. * @return the number of IDs currently registered with the system.
* @obsolete ICU 3.4 use getAvailableIDs() instead * @obsolete ICU 3.4 use getAvailableIDs() instead
*/ */
static int32_t U_EXPORT2 countAvailableIDs(void); static int32_t U_EXPORT2 countAvailableIDs(void);
/** /**
skipping to change at line 1291 skipping to change at line 1298
* range, the result of getAvailableID(0) is returned. * range, the result of getAvailableID(0) is returned.
* @param index the given ID index. * @param index the given ID index.
* @return the index-th available ID. index must be between 0 * @return the index-th available ID. index must be between 0
* and countAvailableIDs() - 1, inclusive. If index is ou t of * and countAvailableIDs() - 1, inclusive. If index is ou t of
* range, the result of getAvailableID(0) is returned. * range, the result of getAvailableID(0) is returned.
* @obsolete ICU 3.4 use getAvailableIDs() instead; this function * @obsolete ICU 3.4 use getAvailableIDs() instead; this function
* is not thread safe, since it returns a reference to storage that * is not thread safe, since it returns a reference to storage that
* may become invalid if another thread calls unregister * may become invalid if another thread calls unregister
*/ */
static const UnicodeString& U_EXPORT2 getAvailableID(int32_t index); static const UnicodeString& U_EXPORT2 getAvailableID(int32_t index);
#endif /* U_HIDE_OBSOLETE_API */
}; };
inline int32_t Transliterator::getMaximumContextLength(void) const { inline int32_t Transliterator::getMaximumContextLength(void) const {
return maximumContextLength; return maximumContextLength;
} }
inline void Transliterator::setID(const UnicodeString& id) { inline void Transliterator::setID(const UnicodeString& id) {
ID = id; ID = id;
// NUL-terminate the ID string, which is a non-aliased copy. // NUL-terminate the ID string, which is a non-aliased copy.
ID.append((UChar)0); ID.append((UChar)0);
ID.truncate(ID.length()-1); ID.truncate(ID.length()-1);
} }
#ifndef U_HIDE_INTERNAL_API
inline Transliterator::Token Transliterator::integerToken(int32_t i) { inline Transliterator::Token Transliterator::integerToken(int32_t i) {
Token t; Token t;
t.integer = i; t.integer = i;
return t; return t;
} }
inline Transliterator::Token Transliterator::pointerToken(void* p) { inline Transliterator::Token Transliterator::pointerToken(void* p) {
Token t; Token t;
t.pointer = p; t.pointer = p;
return t; return t;
} }
#endif
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_TRANSLITERATION */ #endif /* #if !UCONFIG_NO_TRANSLITERATION */
#endif #endif
 End of changes. 10 change blocks. 
0 lines changed or deleted 10 lines changed or added


 ubidi.h   ubidi.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1999-2011, International Business Machines * Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* file name: ubidi.h * file name: ubidi.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 1999jul27 * created on: 1999jul27
* created by: Markus W. Scherer, updated by Matitiahu Allouche * created by: Markus W. Scherer, updated by Matitiahu Allouche
skipping to change at line 453 skipping to change at line 453
* <p>As return value for <code>ubidi_getDirection()</code>, it means * <p>As return value for <code>ubidi_getDirection()</code>, it means
* that the source string contains both left-to-right and * that the source string contains both left-to-right and
* right-to-left characters. * right-to-left characters.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UBIDI_MIXED, UBIDI_MIXED,
/** No strongly directional text. /** No strongly directional text.
* <p>As return value for <code>ubidi_getBaseDirection()</code>, it means * <p>As return value for <code>ubidi_getBaseDirection()</code>, it means
* that the source string is missing or empty, or contains neither lef t-to-right * that the source string is missing or empty, or contains neither lef t-to-right
* nor right-to-left characters. * nor right-to-left characters.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UBIDI_NEUTRAL UBIDI_NEUTRAL
}; };
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
typedef enum UBiDiDirection UBiDiDirection; typedef enum UBiDiDirection UBiDiDirection;
/** /**
* Forward declaration of the <code>UBiDi</code> structure for the declarat ion of * Forward declaration of the <code>UBiDi</code> structure for the declarat ion of
* the API functions. Its fields are implementation-specific.<p> * the API functions. Its fields are implementation-specific.<p>
skipping to change at line 1129 skipping to change at line 1129
* must be zero and this pointer can be NULL. * must be zero and this pointer can be NULL.
* *
* @param epiLength is the length of the epilogue; if <code>epiLength==-1</ code> * @param epiLength is the length of the epilogue; if <code>epiLength==-1</ code>
* then the epilogue must be zero-terminated. * then the epilogue must be zero-terminated.
* Otherwise epiLength must be >= 0. If <code>epiLength==0</code>, i t means * Otherwise epiLength must be >= 0. If <code>epiLength==0</code>, i t means
* that there is no epilogue to consider. * that there is no epilogue to consider.
* *
* @param pErrorCode must be a valid pointer to an error code value. * @param pErrorCode must be a valid pointer to an error code value.
* *
* @see ubidi_setPara * @see ubidi_setPara
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
ubidi_setContext(UBiDi *pBiDi, ubidi_setContext(UBiDi *pBiDi,
const UChar *prologue, int32_t proLength, const UChar *prologue, int32_t proLength,
const UChar *epilogue, int32_t epiLength, const UChar *epilogue, int32_t epiLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Perform the Unicode Bidi algorithm. It is defined in the * Perform the Unicode Bidi algorithm. It is defined in the
* <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard A nned #9</a>, * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard A nned #9</a>,
skipping to change at line 1316 skipping to change at line 1316
* Note: the text must be (at least) @c length long. * Note: the text must be (at least) @c length long.
* *
* @param length is the length of the text; * @param length is the length of the text;
* if <code>length==-1</code> then the text * if <code>length==-1</code> then the text
* must be zero-terminated. * must be zero-terminated.
* *
* @return <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>, * @return <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>,
* <code>UBIDI_NEUTRAL</code> * <code>UBIDI_NEUTRAL</code>
* *
* @see UBiDiDirection * @see UBiDiDirection
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UBiDiDirection U_EXPORT2 U_DRAFT UBiDiDirection U_EXPORT2
ubidi_getBaseDirection(const UChar *text, int32_t length ); ubidi_getBaseDirection(const UChar *text, int32_t length );
/** /**
* Get the pointer to the text. * Get the pointer to the text.
* *
* @param pBiDi is the paragraph or line <code>UBiDi</code> object. * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
* *
* @return The pointer to the text that the UBiDi object was created for. * @return The pointer to the text that the UBiDi object was created for.
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 ubrk.h   ubrk.h 
skipping to change at line 490 skipping to change at line 490
* the actual locale. * the actual locale.
* @param bi break iterator * @param bi break iterator
* @param type locale type (valid or actual) * @param type locale type (valid or actual)
* @param status error code * @param status error code
* @return locale string * @return locale string
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
U_STABLE const char* U_EXPORT2 U_STABLE const char* U_EXPORT2
ubrk_getLocaleByType(const UBreakIterator *bi, ULocDataLocaleType type, UEr rorCode* status); ubrk_getLocaleByType(const UBreakIterator *bi, ULocDataLocaleType type, UEr rorCode* status);
#ifndef U_HIDE_DRAFT_API
/**
* Set the subject text string upon which the break iterator is operating
* without changing any other aspect of the state.
* The new and previous text strings must have the same content.
*
* This function is intended for use in environments where ICU is operati
ng on
* strings that may move around in memory. It provides a mechanism for n
otifying
* ICU that the string has been relocated, and providing a new UText to a
ccess the
* string in its new position.
*
* Note that the break iterator never copies the underlying text
* of a string being processed, but always operates directly on the origi
nal text
* provided by the user. Refreshing simply drops the references to the ol
d text
* and replaces them with references to the new.
*
* Caution: this function is normally used only by very specialized
* system-level code. One example use case is with garbage co
llection
* that moves the text in memory.
*
* @param bi The break iterator.
* @param text The new (moved) text string.
* @param status Receives errors detected by this function.
*
* @draft ICU 49
*/
U_DRAFT void U_EXPORT2
ubrk_refreshUText(UBreakIterator *bi,
UText *text,
UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ #endif /* #if !UCONFIG_NO_BREAK_ITERATION */
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 38 lines changed or added


 ucal.h   ucal.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 1996-2011, International Business Machines Corporation and * Copyright (C) 1996-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
************************************************************************** ***** ************************************************************************** *****
*/ */
#ifndef UCAL_H #ifndef UCAL_H
#define UCAL_H #define UCAL_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uenum.h" #include "unicode/uenum.h"
#include "unicode/uloc.h" #include "unicode/uloc.h"
skipping to change at line 145 skipping to change at line 145
* <code>Calendar</code> also provides a date arithmetic function for * <code>Calendar</code> also provides a date arithmetic function for
* adding the specified (signed) amount of time to a particular time field. * adding the specified (signed) amount of time to a particular time field.
* For example, subtracting 5 days from the date <code>September 12, 1996</ code> * For example, subtracting 5 days from the date <code>September 12, 1996</ code>
* results in <code>September 7, 1996</code>. * results in <code>September 7, 1996</code>.
* *
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
/** /**
* The time zone ID reserved for unknown time zone. * The time zone ID reserved for unknown time zone.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define UCAL_UNKNOWN_ZONE_ID "Etc/Unknown" #define UCAL_UNKNOWN_ZONE_ID "Etc/Unknown"
/** A calendar. /** A calendar.
* For usage in C programs. * For usage in C programs.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef void* UCalendar; typedef void* UCalendar;
/** Possible types of UCalendars /** Possible types of UCalendars
skipping to change at line 528 skipping to change at line 528
UCAL_PM UCAL_PM
}; };
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
typedef enum UCalendarAMPMs UCalendarAMPMs; typedef enum UCalendarAMPMs UCalendarAMPMs;
/** /**
* System time zone type constants used by filtering zones * System time zone type constants used by filtering zones
* in ucal_openTimeZoneIDEnumeration. * in ucal_openTimeZoneIDEnumeration.
* @see ucal_openTimeZoneIDEnumeration * @see ucal_openTimeZoneIDEnumeration
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
enum USystemTimeZoneType { enum USystemTimeZoneType {
/** /**
* Any system zones. * Any system zones.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCAL_ZONE_TYPE_ANY, UCAL_ZONE_TYPE_ANY,
/** /**
* Canonical system zones. * Canonical system zones.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCAL_ZONE_TYPE_CANONICAL, UCAL_ZONE_TYPE_CANONICAL,
/** /**
* Canonical system zones associated with actual locations. * Canonical system zones associated with actual locations.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCAL_ZONE_TYPE_CANONICAL_LOCATION UCAL_ZONE_TYPE_CANONICAL_LOCATION
}; };
/** @draft ICU 4.8 */ /** @stable ICU 4.8 */
typedef enum USystemTimeZoneType USystemTimeZoneType; typedef enum USystemTimeZoneType USystemTimeZoneType;
/** /**
* Create an enumeration over system time zone IDs with the given * Create an enumeration over system time zone IDs with the given
* filter conditions. * filter conditions.
* @param zoneType The system time zone type. * @param zoneType The system time zone type.
* @param region The ISO 3166 two-letter country code or UN M.49 * @param region The ISO 3166 two-letter country code or UN M.49
* three-digit area code. When NULL, no filtering * three-digit area code. When NULL, no filtering
* done by region. * done by region.
* @param rawOffset An offset from GMT in milliseconds, ignoring the * @param rawOffset An offset from GMT in milliseconds, ignoring the
* effect of daylight savings time, if any. When NULL, * effect of daylight savings time, if any. When NULL,
* no filtering done by zone offset. * no filtering done by zone offset.
* @param ec A pointer to an UErrorCode to receive any errors * @param ec A pointer to an UErrorCode to receive any errors
* @return an enumeration object that the caller must dispose of * @return an enumeration object that the caller must dispose of
* using enum_close(), or NULL upon failure. In case of failure, * using enum_close(), or NULL upon failure. In case of failure,
* *ec will indicate the error. * *ec will indicate the error.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UEnumeration* U_EXPORT2 U_DRAFT UEnumeration* U_EXPORT2
ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* re gion, ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* re gion,
const int32_t* rawOffset, UErrorCode* ec); const int32_t* rawOffset, UErrorCode* ec);
/** /**
* Create an enumeration over all time zones. * Create an enumeration over all time zones.
* *
* @param ec input/output error code * @param ec input/output error code
* *
skipping to change at line 668 skipping to change at line 668
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UDate U_EXPORT2 U_STABLE UDate U_EXPORT2
ucal_getNow(void); ucal_getNow(void);
/** /**
* Open a UCalendar. * Open a UCalendar.
* A UCalendar may be used to convert a millisecond value to a year, * A UCalendar may be used to convert a millisecond value to a year,
* month, and day. * month, and day.
* <p> * <p>
* Note: When unknown TimeZone ID is specified, the UCalendar returned * Note: When unknown TimeZone ID is specified or if the TimeZone ID specif
* by the function is initialized with GMT zone with TimeZone ID <code>UCAL ied is "Etc/Unknown",
_UNKNOWN_ZONE_ID</code> * the UCalendar returned by the function is initialized with GMT zone with
* ("Etc/Unknown") without any errors/warnings. If you want to check if a TimeZone ID
TimeZone ID is valid * <code>UCAL_UNKNOWN_ZONE_ID</code> ("Etc/Unknown") without any errors/war
* prior to this function, use <code>ucal_getCanonicalTimeZoneID</code>. nings. If you want
* to check if a TimeZone ID is valid prior to this function, use <code>uca
l_getCanonicalTimeZoneID</code>.
* *
* @param zoneID The desired TimeZone ID. If 0, use the default time zone. * @param zoneID The desired TimeZone ID. If 0, use the default time zone.
* @param len The length of zoneID, or -1 if null-terminated. * @param len The length of zoneID, or -1 if null-terminated.
* @param locale The desired locale * @param locale The desired locale
* @param type The type of UCalendar to open. This can be UCAL_GREGORIAN to open the Gregorian * @param type The type of UCalendar to open. This can be UCAL_GREGORIAN to open the Gregorian
* calendar for the locale, or UCAL_DEFAULT to open the default calendar fo r the locale (the * calendar for the locale, or UCAL_DEFAULT to open the default calendar fo r the locale (the
* default calendar may also be Gregorian). To open a specific non-Gregoria n calendar for the * default calendar may also be Gregorian). To open a specific non-Gregoria n calendar for the
* locale, use uloc_setKeywordValue to set the value of the calendar keywor d for the locale * locale, use uloc_setKeywordValue to set the value of the calendar keywor d for the locale
* and then pass the locale to ucal_open with UCAL_DEFAULT as the type. * and then pass the locale to ucal_open with UCAL_DEFAULT as the type.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
skipping to change at line 850 skipping to change at line 850
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
U_STABLE UDate U_EXPORT2 U_STABLE UDate U_EXPORT2
ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode); ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode);
/** /**
* Types of UCalendar attributes * Types of UCalendar attributes
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
enum UCalendarAttribute { enum UCalendarAttribute {
/** Lenient parsing */ /**
* Lenient parsing
* @stable ICU 2.0
*/
UCAL_LENIENT, UCAL_LENIENT,
/** First day of week */ /**
* First day of week
* @stable ICU 2.0
*/
UCAL_FIRST_DAY_OF_WEEK, UCAL_FIRST_DAY_OF_WEEK,
/** Minimum number of days in first week */ /**
* Minimum number of days in first week
* @stable ICU 2.0
*/
UCAL_MINIMAL_DAYS_IN_FIRST_WEEK UCAL_MINIMAL_DAYS_IN_FIRST_WEEK
#ifndef U_HIDE_DRAFT_API
,
/**
* The behavior for handling wall time repeating multiple times
* at negative time zone offset transitions
* @draft ICU 49
*/
UCAL_REPEATED_WALL_TIME,
/**
* The behavior for handling skipped wall time at positive time
* zone offset transitions.
* @draft ICU 49
*/
UCAL_SKIPPED_WALL_TIME
#endif /* U_HIDE_DRAFT_API */
}; };
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
typedef enum UCalendarAttribute UCalendarAttribute; typedef enum UCalendarAttribute UCalendarAttribute;
/** /**
* Options for handling ambiguous wall time at time zone
* offset transitions.
* @draft ICU 49
*/
enum UCalendarWallTimeOption {
/**
* An ambiguous wall time to be interpreted as the latest.
* This option is valid for UCAL_REPEATED_WALL_TIME and
* UCAL_SKIPPED_WALL_TIME.
* @draft ICU 49
*/
UCAL_WALLTIME_LAST
#ifndef U_HIDE_DRAFT_API
,
/**
* An ambiguous wall time to be interpreted as the earliest.
* This option is valid for UCAL_REPEATED_WALL_TIME and
* UCAL_SKIPPED_WALL_TIME.
* @draft ICU 49
*/
UCAL_WALLTIME_FIRST,
/**
* An ambiguous wall time to be interpreted as the next valid
* wall time. This option is valid for UCAL_SKIPPED_WALL_TIME.
* @draft ICU 49
*/
UCAL_WALLTIME_NEXT_VALID
#endif /* U_HIDE_DRAFT_API */
};
/** @draft ICU 49 */
typedef enum UCalendarWallTimeOption UCalendarWallTimeOption;
/**
* Get a numeric attribute associated with a UCalendar. * Get a numeric attribute associated with a UCalendar.
* Numeric attributes include the first day of the week, or the minimal num bers * Numeric attributes include the first day of the week, or the minimal num bers
* of days in the first week of the month. * of days in the first week of the month.
* @param cal The UCalendar to query. * @param cal The UCalendar to query.
* @param attr The desired attribute; one of UCAL_LENIENT, UCAL_FIRST_DAY_O F_WEEK, * @param attr The desired attribute; one of UCAL_LENIENT, UCAL_FIRST_DAY_O F_WEEK,
* or UCAL_MINIMAL_DAYS_IN_FIRST_WEEK * UCAL_MINIMAL_DAYS_IN_FIRST_WEEK, UCAL_REPEATED_WALL_TIME or UCAL_SKIPPED _WALL_TIME
* @return The value of attr. * @return The value of attr.
* @see ucal_setAttribute * @see ucal_setAttribute
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucal_getAttribute(const UCalendar* cal, ucal_getAttribute(const UCalendar* cal,
UCalendarAttribute attr); UCalendarAttribute attr);
/** /**
* Set a numeric attribute associated with a UCalendar. * Set a numeric attribute associated with a UCalendar.
* Numeric attributes include the first day of the week, or the minimal num bers * Numeric attributes include the first day of the week, or the minimal num bers
* of days in the first week of the month. * of days in the first week of the month.
* @param cal The UCalendar to set. * @param cal The UCalendar to set.
* @param attr The desired attribute; one of UCAL_LENIENT, UCAL_FIRST_DAY_O F_WEEK, * @param attr The desired attribute; one of UCAL_LENIENT, UCAL_FIRST_DAY_O F_WEEK,
* or UCAL_MINIMAL_DAYS_IN_FIRST_WEEK * UCAL_MINIMAL_DAYS_IN_FIRST_WEEK, UCAL_REPEATED_WALL_TIME or UCAL_SKIPPED _WALL_TIME
* @param newValue The new value of attr. * @param newValue The new value of attr.
* @see ucal_getAttribute * @see ucal_getAttribute
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ucal_setAttribute(UCalendar* cal, ucal_setAttribute(UCalendar* cal,
UCalendarAttribute attr, UCalendarAttribute attr,
int32_t newValue); int32_t newValue);
/** /**
skipping to change at line 1357 skipping to change at line 1414
* with progressively smaller fields. * with progressively smaller fields.
* *
* @param cal The UCalendar to compare and update. * @param cal The UCalendar to compare and update.
* @param target The target date to compare to the current calendar setting . * @param target The target date to compare to the current calendar setting .
* @param field The field to compare; one of UCAL_ERA, UCAL_YEAR, UCAL_MONT H, * @param field The field to compare; one of UCAL_ERA, UCAL_YEAR, UCAL_MONT H,
* UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL _DAY_OF_WEEK, * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL _DAY_OF_WEEK,
* UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL _MINUTE, UCAL_SECOND, * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL _MINUTE, UCAL_SECOND,
* UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @return The date difference for the specified field. * @return The date difference for the specified field.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
ucal_getFieldDifference(UCalendar* cal, ucal_getFieldDifference(UCalendar* cal,
UDate target, UDate target,
UCalendarDateFields field, UCalendarDateFields field,
UErrorCode* status); UErrorCode* status);
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 17 change blocks. 
20 lines changed or deleted 79 lines changed or added


 uchar.h   uchar.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File UCHAR.H * File UCHAR.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/02/97 aliu Creation. * 04/02/97 aliu Creation.
* 03/29/99 helena Updated for C APIs. * 03/29/99 helena Updated for C APIs.
skipping to change at line 42 skipping to change at line 42
/*========================================================================= =*/ /*========================================================================= =*/
/** /**
* Unicode version number, default for the current ICU version. * Unicode version number, default for the current ICU version.
* The actual Unicode Character Database (UCD) data is stored in uprops.dat * The actual Unicode Character Database (UCD) data is stored in uprops.dat
* and may be generated from UCD files from a different Unicode version. * and may be generated from UCD files from a different Unicode version.
* Call u_getUnicodeVersion to get the actual Unicode version of the data. * Call u_getUnicodeVersion to get the actual Unicode version of the data.
* *
* @see u_getUnicodeVersion * @see u_getUnicodeVersion
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#define U_UNICODE_VERSION "6.0" #define U_UNICODE_VERSION "6.1"
/** /**
* \file * \file
* \brief C API: Unicode Properties * \brief C API: Unicode Properties
* *
* This C API provides low-level access to the Unicode Character Database. * This C API provides low-level access to the Unicode Character Database.
* In addition to raw property values, some convenience functions calculate * In addition to raw property values, some convenience functions calculate
* derived properties, for example for Java-style programming. * derived properties, for example for Java-style programming.
* *
* Unicode assigns each code point (not just assigned character) values for * Unicode assigns each code point (not just assigned character) values for
skipping to change at line 142 skipping to change at line 142
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#define UCHAR_MAX_VALUE 0x10ffff #define UCHAR_MAX_VALUE 0x10ffff
/** /**
* Get a single-bit bit set (a flag) from a bit number 0..31. * Get a single-bit bit set (a flag) from a bit number 0..31.
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
#define U_MASK(x) ((uint32_t)1<<(x)) #define U_MASK(x) ((uint32_t)1<<(x))
/*
* !! Note: Several comments in this file are machine-read by the
* genpname tool. These comments describe the correspondence between
* icu enum constants and UCD entities. Do not delete them. Update
* these comments as needed.
*
* Any comment of the form "/ *[name]* /" (spaces added) is such
* a comment.
*
* The U_JG_* and U_GC_*_MASK constants are matched by their symbolic
* name, which must match PropertyValueAliases.txt.
*/
/** /**
* Selection constants for Unicode properties. * Selection constants for Unicode properties.
* These constants are used in functions like u_hasBinaryProperty to select * These constants are used in functions like u_hasBinaryProperty to select
* one of the Unicode properties. * one of the Unicode properties.
* *
* The properties APIs are intended to reflect Unicode properties as define d * The properties APIs are intended to reflect Unicode properties as define d
* in the Unicode Character Database (UCD) and Unicode Technical Reports (U TR). * in the Unicode Character Database (UCD) and Unicode Technical Reports (U TR).
* For details about the properties see http://www.unicode.org/ucd/ . * For details about the properties see http://www.unicode.org/ucd/ .
* For names of Unicode properties see the UCD file PropertyAliases.txt. * For names of Unicode properties see the UCD file PropertyAliases.txt.
* *
* Important: If ICU is built with UCD files from Unicode versions below, e .g., 3.2, * Important: If ICU is built with UCD files from Unicode versions below, e .g., 3.2,
* then properties marked with "new in Unicode 3.2" are not or not fully av ailable. * then properties marked with "new in Unicode 3.2" are not or not fully av ailable.
* Check u_getUnicodeVersion to be sure. * Check u_getUnicodeVersion to be sure.
* *
* @see u_hasBinaryProperty * @see u_hasBinaryProperty
* @see u_getIntPropertyValue * @see u_getIntPropertyValue
* @see u_getUnicodeVersion * @see u_getUnicodeVersion
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
typedef enum UProperty { typedef enum UProperty {
/* See note !!. Comments of the form "Binary property Dash", /*
"Enumerated property Script", "Double property Numeric_Value", * Note: UProperty constants are parsed by preparseucd.py.
and "String property Age" are read by genpname. */ * It matches lines like
* UCHAR_<Unicode property name>=<integer>,
*/
/* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that
debuggers display UCHAR_ALPHABETIC as the symbolic name for 0, debuggers display UCHAR_ALPHABETIC as the symbolic name for 0,
rather than UCHAR_BINARY_START. Likewise for other *_START rather than UCHAR_BINARY_START. Likewise for other *_START
identifiers. */ identifiers. */
/** Binary property Alphabetic. Same as u_isUAlphabetic, different from u_isalpha. /** Binary property Alphabetic. Same as u_isUAlphabetic, different from u_isalpha.
Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */ Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */
UCHAR_ALPHABETIC=0, UCHAR_ALPHABETIC=0,
/** First constant for binary Unicode properties. @stable ICU 2.1 */ /** First constant for binary Unicode properties. @stable ICU 2.1 */
skipping to change at line 530 skipping to change at line 519
Corresponds to u_charAge. @stable ICU 2.4 */ Corresponds to u_charAge. @stable ICU 2.4 */
UCHAR_AGE=0x4000, UCHAR_AGE=0x4000,
/** First constant for string Unicode properties. @stable ICU 2.4 */ /** First constant for string Unicode properties. @stable ICU 2.4 */
UCHAR_STRING_START=UCHAR_AGE, UCHAR_STRING_START=UCHAR_AGE,
/** String property Bidi_Mirroring_Glyph. /** String property Bidi_Mirroring_Glyph.
Corresponds to u_charMirror. @stable ICU 2.4 */ Corresponds to u_charMirror. @stable ICU 2.4 */
UCHAR_BIDI_MIRRORING_GLYPH=0x4001, UCHAR_BIDI_MIRRORING_GLYPH=0x4001,
/** String property Case_Folding. /** String property Case_Folding.
Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */ Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */
UCHAR_CASE_FOLDING=0x4002, UCHAR_CASE_FOLDING=0x4002,
/** String property ISO_Comment. /** Deprecated string property ISO_Comment.
Corresponds to u_getISOComment. @stable ICU 2.4 */ Corresponds to u_getISOComment. @deprecated ICU 49 */
UCHAR_ISO_COMMENT=0x4003, UCHAR_ISO_COMMENT=0x4003,
/** String property Lowercase_Mapping. /** String property Lowercase_Mapping.
Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */ Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */
UCHAR_LOWERCASE_MAPPING=0x4004, UCHAR_LOWERCASE_MAPPING=0x4004,
/** String property Name. /** String property Name.
Corresponds to u_charName. @stable ICU 2.4 */ Corresponds to u_charName. @stable ICU 2.4 */
UCHAR_NAME=0x4005, UCHAR_NAME=0x4005,
/** String property Simple_Case_Folding. /** String property Simple_Case_Folding.
Corresponds to u_foldCase. @stable ICU 2.4 */ Corresponds to u_foldCase. @stable ICU 2.4 */
UCHAR_SIMPLE_CASE_FOLDING=0x4006, UCHAR_SIMPLE_CASE_FOLDING=0x4006,
skipping to change at line 555 skipping to change at line 544
/** String property Simple_Titlecase_Mapping. /** String property Simple_Titlecase_Mapping.
Corresponds to u_totitle. @stable ICU 2.4 */ Corresponds to u_totitle. @stable ICU 2.4 */
UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008, UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008,
/** String property Simple_Uppercase_Mapping. /** String property Simple_Uppercase_Mapping.
Corresponds to u_toupper. @stable ICU 2.4 */ Corresponds to u_toupper. @stable ICU 2.4 */
UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009, UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009,
/** String property Titlecase_Mapping. /** String property Titlecase_Mapping.
Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */ Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */
UCHAR_TITLECASE_MAPPING=0x400A, UCHAR_TITLECASE_MAPPING=0x400A,
/** String property Unicode_1_Name. /** String property Unicode_1_Name.
Corresponds to u_charName. @stable ICU 2.4 */ This property is of little practical value.
Beginning with ICU 49, ICU APIs return an empty string for this pro
perty.
Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU
49 */
UCHAR_UNICODE_1_NAME=0x400B, UCHAR_UNICODE_1_NAME=0x400B,
/** String property Uppercase_Mapping. /** String property Uppercase_Mapping.
Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */
UCHAR_UPPERCASE_MAPPING=0x400C, UCHAR_UPPERCASE_MAPPING=0x400C,
/** One more than the last constant for string Unicode properties. @sta ble ICU 2.4 */ /** One more than the last constant for string Unicode properties. @sta ble ICU 2.4 */
UCHAR_STRING_LIMIT=0x400D, UCHAR_STRING_LIMIT=0x400D,
#ifndef U_HIDE_DRAFT_API
/** Provisional property Script_Extensions (new in Unicode 6.0). /** Provisional property Script_Extensions (new in Unicode 6.0).
As a provisional property, it may be modified or removed As a provisional property, it may be modified or removed
in future versions of the Unicode Standard, and thus in ICU. in future versions of the Unicode Standard, and thus in ICU.
Some characters are commonly used in multiple scripts. Some characters are commonly used in multiple scripts.
For more information, see UAX #24: http://www.unicode.org/reports/t r24/. For more information, see UAX #24: http://www.unicode.org/reports/t r24/.
Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h. Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h.
@draft ICU 4.6 */ @draft ICU 4.6 */
UCHAR_SCRIPT_EXTENSIONS=0x7000, UCHAR_SCRIPT_EXTENSIONS=0x7000,
/** First constant for Unicode properties with unusual value types. @dr aft ICU 4.6 */ /** First constant for Unicode properties with unusual value types. @dr aft ICU 4.6 */
UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS,
/** One more than the last constant for Unicode properties with unusual value types. /** One more than the last constant for Unicode properties with unusual value types.
* @draft ICU 4.6 */ * @draft ICU 4.6 */
UCHAR_OTHER_PROPERTY_LIMIT=0x7001, UCHAR_OTHER_PROPERTY_LIMIT=0x7001,
#endif /* U_HIDE_DRAFT_API */
/** Represents a nonexistent or invalid property or property value. @st able ICU 2.4 */ /** Represents a nonexistent or invalid property or property value. @st able ICU 2.4 */
UCHAR_INVALID_CODE = -1 UCHAR_INVALID_CODE = -1
} UProperty; } UProperty;
/** /**
* Data for enumerated Unicode general category types. * Data for enumerated Unicode general category types.
* See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html .
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UCharCategory typedef enum UCharCategory
{ {
/** See note !!. Comments of the form "Cn" are read by genpname. */ /*
* Note: UCharCategory constants and their API comments are parsed by p
reparseucd.py.
* It matches pairs of lines like
* / ** <Unicode 2-letter General_Category value> comment... * /
* U_<[A-Z_]+> = <integer>,
*/
/** Non-category for unassigned and non-character code points. @stable ICU 2.0 */ /** Non-category for unassigned and non-character code points. @stable ICU 2.0 */
U_UNASSIGNED = 0, U_UNASSIGNED = 0,
/** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have th is property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */ /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have th is property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */
U_GENERAL_OTHER_TYPES = 0, U_GENERAL_OTHER_TYPES = 0,
/** Lu @stable ICU 2.0 */ /** Lu @stable ICU 2.0 */
U_UPPERCASE_LETTER = 1, U_UPPERCASE_LETTER = 1,
/** Ll @stable ICU 2.0 */ /** Ll @stable ICU 2.0 */
U_LOWERCASE_LETTER = 2, U_LOWERCASE_LETTER = 2,
/** Lt @stable ICU 2.0 */ /** Lt @stable ICU 2.0 */
skipping to change at line 772 skipping to change at line 770
U_GC_PI_MASK|U_GC_PF_MASK) U_GC_PI_MASK|U_GC_PF_MASK)
/** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU 2.1 */ /** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU 2.1 */
#define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK) #define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK)
/** /**
* This specifies the language directional property of a character set. * This specifies the language directional property of a character set.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UCharDirection { typedef enum UCharDirection {
/** See note !!. Comments of the form "EN" are read by genpname. */ /*
* Note: UCharDirection constants and their API comments are parsed by
preparseucd.py.
* It matches pairs of lines like
* / ** <Unicode 1..3-letter Bidi_Class value> comment... * /
* U_<[A-Z_]+> = <integer>,
*/
/** L @stable ICU 2.0 */ /** L @stable ICU 2.0 */
U_LEFT_TO_RIGHT = 0, U_LEFT_TO_RIGHT = 0,
/** R @stable ICU 2.0 */ /** R @stable ICU 2.0 */
U_RIGHT_TO_LEFT = 1, U_RIGHT_TO_LEFT = 1,
/** EN @stable ICU 2.0 */ /** EN @stable ICU 2.0 */
U_EUROPEAN_NUMBER = 2, U_EUROPEAN_NUMBER = 2,
/** ES @stable ICU 2.0 */ /** ES @stable ICU 2.0 */
U_EUROPEAN_NUMBER_SEPARATOR = 3, U_EUROPEAN_NUMBER_SEPARATOR = 3,
/** ET @stable ICU 2.0 */ /** ET @stable ICU 2.0 */
skipping to change at line 821 skipping to change at line 824
U_BOUNDARY_NEUTRAL = 18, U_BOUNDARY_NEUTRAL = 18,
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
U_CHAR_DIRECTION_COUNT U_CHAR_DIRECTION_COUNT
} UCharDirection; } UCharDirection;
/** /**
* Constants for Unicode blocks, see the Unicode Data file Blocks.txt * Constants for Unicode blocks, see the Unicode Data file Blocks.txt
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
enum UBlockCode { enum UBlockCode {
/*
* Note: UBlockCode constants are parsed by preparseucd.py.
* It matches lines like
* UBLOCK_<Unicode Block value name> = <integer>,
*/
/** New No_Block value in Unicode 4. @stable ICU 2.6 */ /** New No_Block value in Unicode 4. @stable ICU 2.6 */
UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */ UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_BASIC_LATIN = 1, /*[0000]*/ /*See note !!*/ UBLOCK_BASIC_LATIN = 1, /*[0000]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/ UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/ UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/ UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/
skipping to change at line 1063 skipping to change at line 1071
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_HIGH_SURROGATES =75, /*[D800]*/ UBLOCK_HIGH_SURROGATES =75, /*[D800]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/ UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_LOW_SURROGATES =77, /*[DC00]*/ UBLOCK_LOW_SURROGATES =77, /*[DC00]*/
/** /**
* Same as UBLOCK_PRIVATE_USE_AREA. * Same as UBLOCK_PRIVATE_USE.
* Until Unicode 3.1.1, the corresponding block name was "Private Use", * Until Unicode 3.1.1, the corresponding block name was "Private Use",
* and multiple code point ranges had this block. * and multiple code point ranges had this block.
* Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and
* adds separate blocks for the supplementary PUAs. * adds separate blocks for the supplementary PUAs.
* *
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UBLOCK_PRIVATE_USE = 78, UBLOCK_PRIVATE_USE_AREA =78, /*[E000]*/
/** /**
* Same as UBLOCK_PRIVATE_USE. * Same as UBLOCK_PRIVATE_USE_AREA.
* Until Unicode 3.1.1, the corresponding block name was "Private Use", * Until Unicode 3.1.1, the corresponding block name was "Private Use",
* and multiple code point ranges had this block. * and multiple code point ranges had this block.
* Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and
* adds separate blocks for the supplementary PUAs. * adds separate blocks for the supplementary PUAs.
* *
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UBLOCK_PRIVATE_USE_AREA =UBLOCK_PRIVATE_USE, /*[E000]*/ UBLOCK_PRIVATE_USE = UBLOCK_PRIVATE_USE_AREA,
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/ UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/ UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/ UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/
skipping to change at line 1113 skipping to change at line 1121
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_SPECIALS =86, /*[FFF0]*/ UBLOCK_SPECIALS =86, /*[FFF0]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/ UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/
/* New blocks in Unicode 3.1 */ /* New blocks in Unicode 3.1 */
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_OLD_ITALIC = 88 , /*[10300]*/ UBLOCK_OLD_ITALIC = 88, /*[10300]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_GOTHIC = 89 , /*[10330]*/ UBLOCK_GOTHIC = 89, /*[10330]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_DESERET = 90 , /*[10400]*/ UBLOCK_DESERET = 90, /*[10400]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91 , /*[1D000]*/ UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91, /*[1D000]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_MUSICAL_SYMBOLS = 92 , /*[1D100]*/ UBLOCK_MUSICAL_SYMBOLS = 92, /*[1D100]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93 , /*[1D400]*/ UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93, /*[1D400]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94 , /*[20000]*/ UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94, /*[20000]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95 , /*[2F800]*/ UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95, /*[2F800]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_TAGS = 96, /*[E0000]*/ UBLOCK_TAGS = 96, /*[E0000]*/
/* New blocks in Unicode 3.2 */ /* New blocks in Unicode 3.2 */
/** @stable ICU 3.0 */
UBLOCK_CYRILLIC_SUPPLEMENT = 97, /*[0500]*/
/** /**
* Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrilli c Supplement". * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrilli c Supplement".
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
UBLOCK_CYRILLIC_SUPPLEMENTARY = 97, UBLOCK_CYRILLIC_SUPPLEMENTARY = UBLOCK_CYRILLIC_SUPPLEMENT,
/** @stable ICU 3.0 */
UBLOCK_CYRILLIC_SUPPLEMENT = UBLOCK_CYRILLIC_SUPPLEMENTARY, /*[0500]*/
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UBLOCK_TAGALOG = 98, /*[1700]*/ UBLOCK_TAGALOG = 98, /*[1700]*/
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UBLOCK_HANUNOO = 99, /*[1720]*/ UBLOCK_HANUNOO = 99, /*[1720]*/
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UBLOCK_BUHID = 100, /*[1740]*/ UBLOCK_BUHID = 100, /*[1740]*/
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UBLOCK_TAGBANWA = 101, /*[1760]*/ UBLOCK_TAGBANWA = 101, /*[1760]*/
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/ UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/
skipping to change at line 1383 skipping to change at line 1391
UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/ UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/
/** @stable ICU 4.6 */ /** @stable ICU 4.6 */
UBLOCK_EMOTICONS = 206, /*[1F600]*/ UBLOCK_EMOTICONS = 206, /*[1F600]*/
/** @stable ICU 4.6 */ /** @stable ICU 4.6 */
UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/ UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/
/** @stable ICU 4.6 */ /** @stable ICU 4.6 */
UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/ UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/
/** @stable ICU 4.6 */ /** @stable ICU 4.6 */
UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/ UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/
/* New blocks in Unicode 6.1 */
/** @stable ICU 49 */
UBLOCK_ARABIC_EXTENDED_A = 210, /*[08A0]*/
/** @stable ICU 49 */
UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = 211, /*[1EE00]*/
/** @stable ICU 49 */
UBLOCK_CHAKMA = 212, /*[11100]*/
/** @stable ICU 49 */
UBLOCK_MEETEI_MAYEK_EXTENSIONS = 213, /*[AAE0]*/
/** @stable ICU 49 */
UBLOCK_MEROITIC_CURSIVE = 214, /*[109A0]*/
/** @stable ICU 49 */
UBLOCK_MEROITIC_HIEROGLYPHS = 215, /*[10980]*/
/** @stable ICU 49 */
UBLOCK_MIAO = 216, /*[16F00]*/
/** @stable ICU 49 */
UBLOCK_SHARADA = 217, /*[11180]*/
/** @stable ICU 49 */
UBLOCK_SORA_SOMPENG = 218, /*[110D0]*/
/** @stable ICU 49 */
UBLOCK_SUNDANESE_SUPPLEMENT = 219, /*[1CC0]*/
/** @stable ICU 49 */
UBLOCK_TAKRI = 220, /*[11680]*/
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_COUNT = 210, UBLOCK_COUNT = 221,
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
UBLOCK_INVALID_CODE=-1 UBLOCK_INVALID_CODE=-1
}; };
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
typedef enum UBlockCode UBlockCode; typedef enum UBlockCode UBlockCode;
/** /**
* East Asian Width constants. * East Asian Width constants.
* *
* @see UCHAR_EAST_ASIAN_WIDTH * @see UCHAR_EAST_ASIAN_WIDTH
* @see u_getIntPropertyValue * @see u_getIntPropertyValue
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum UEastAsianWidth { typedef enum UEastAsianWidth {
U_EA_NEUTRAL, /*[N]*/ /*See note !!*/ /*
* Note: UEastAsianWidth constants are parsed by preparseucd.py.
* It matches lines like
* U_EA_<Unicode East_Asian_Width value name>
*/
U_EA_NEUTRAL, /*[N]*/
U_EA_AMBIGUOUS, /*[A]*/ U_EA_AMBIGUOUS, /*[A]*/
U_EA_HALFWIDTH, /*[H]*/ U_EA_HALFWIDTH, /*[H]*/
U_EA_FULLWIDTH, /*[F]*/ U_EA_FULLWIDTH, /*[F]*/
U_EA_NARROW, /*[Na]*/ U_EA_NARROW, /*[Na]*/
U_EA_WIDE, /*[W]*/ U_EA_WIDE, /*[W]*/
U_EA_COUNT U_EA_COUNT
} UEastAsianWidth; } UEastAsianWidth;
/*
* Implementation note:
* Keep UEastAsianWidth constant values in sync with names list in genprops
/props2.c.
*/
/** /**
* Selector constants for u_charName(). * Selector constants for u_charName().
* u_charName() returns the "modern" name of a * u_charName() returns the "modern" name of a
* Unicode character; or the name that was defined in * Unicode character; or the name that was defined in
* Unicode version 1.0, before the Unicode standard merged * Unicode version 1.0, before the Unicode standard merged
* with ISO-10646; or an "extended" name that gives each * with ISO-10646; or an "extended" name that gives each
* Unicode code point a unique name. * Unicode code point a unique name.
* *
* @see u_charName * @see u_charName
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UCharNameChoice { typedef enum UCharNameChoice {
/** Unicode character name (Name property). @stable ICU 2.0 */
U_UNICODE_CHAR_NAME, U_UNICODE_CHAR_NAME,
/**
* The Unicode_1_Name property value which is of little practical value
.
* Beginning with ICU 49, ICU APIs return an empty string for this name
choice.
* @deprecated ICU 49
*/
U_UNICODE_10_CHAR_NAME, U_UNICODE_10_CHAR_NAME,
/** Standard or synthetic character name. @stable ICU 2.0 */
U_EXTENDED_CHAR_NAME, U_EXTENDED_CHAR_NAME,
U_CHAR_NAME_ALIAS, /**< Corrected name from NameAliases.txt. @ /** Corrected name from NameAliases.txt. @stable ICU 4.4 */
stable ICU 4.4 */ U_CHAR_NAME_ALIAS,
/** @stable ICU 2.0 */
U_CHAR_NAME_CHOICE_COUNT U_CHAR_NAME_CHOICE_COUNT
} UCharNameChoice; } UCharNameChoice;
/** /**
* Selector constants for u_getPropertyName() and * Selector constants for u_getPropertyName() and
* u_getPropertyValueName(). These selectors are used to choose which * u_getPropertyValueName(). These selectors are used to choose which
* name is returned for a given property or value. All properties and * name is returned for a given property or value. All properties and
* values have a long name. Most have a short name, but some do not. * values have a long name. Most have a short name, but some do not.
* Unicode allows for additional names, beyond the long and short * Unicode allows for additional names, beyond the long and short
* name, which would be indicated by U_LONG_PROPERTY_NAME + i, where * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where
skipping to change at line 1459 skipping to change at line 1503
U_PROPERTY_NAME_CHOICE_COUNT U_PROPERTY_NAME_CHOICE_COUNT
} UPropertyNameChoice; } UPropertyNameChoice;
/** /**
* Decomposition Type constants. * Decomposition Type constants.
* *
* @see UCHAR_DECOMPOSITION_TYPE * @see UCHAR_DECOMPOSITION_TYPE
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum UDecompositionType { typedef enum UDecompositionType {
U_DT_NONE, /*[none]*/ /*See note !!*/ /*
* Note: UDecompositionType constants are parsed by preparseucd.py.
* It matches lines like
* U_DT_<Unicode Decomposition_Type value name>
*/
U_DT_NONE, /*[none]*/
U_DT_CANONICAL, /*[can]*/ U_DT_CANONICAL, /*[can]*/
U_DT_COMPAT, /*[com]*/ U_DT_COMPAT, /*[com]*/
U_DT_CIRCLE, /*[enc]*/ U_DT_CIRCLE, /*[enc]*/
U_DT_FINAL, /*[fin]*/ U_DT_FINAL, /*[fin]*/
U_DT_FONT, /*[font]*/ U_DT_FONT, /*[font]*/
U_DT_FRACTION, /*[fra]*/ U_DT_FRACTION, /*[fra]*/
U_DT_INITIAL, /*[init]*/ U_DT_INITIAL, /*[init]*/
U_DT_ISOLATED, /*[iso]*/ U_DT_ISOLATED, /*[iso]*/
U_DT_MEDIAL, /*[med]*/ U_DT_MEDIAL, /*[med]*/
U_DT_NARROW, /*[nar]*/ U_DT_NARROW, /*[nar]*/
skipping to change at line 1487 skipping to change at line 1537
U_DT_COUNT /* 18 */ U_DT_COUNT /* 18 */
} UDecompositionType; } UDecompositionType;
/** /**
* Joining Type constants. * Joining Type constants.
* *
* @see UCHAR_JOINING_TYPE * @see UCHAR_JOINING_TYPE
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum UJoiningType { typedef enum UJoiningType {
U_JT_NON_JOINING, /*[U]*/ /*See note !!*/ /*
* Note: UJoiningType constants are parsed by preparseucd.py.
* It matches lines like
* U_JT_<Unicode Joining_Type value name>
*/
U_JT_NON_JOINING, /*[U]*/
U_JT_JOIN_CAUSING, /*[C]*/ U_JT_JOIN_CAUSING, /*[C]*/
U_JT_DUAL_JOINING, /*[D]*/ U_JT_DUAL_JOINING, /*[D]*/
U_JT_LEFT_JOINING, /*[L]*/ U_JT_LEFT_JOINING, /*[L]*/
U_JT_RIGHT_JOINING, /*[R]*/ U_JT_RIGHT_JOINING, /*[R]*/
U_JT_TRANSPARENT, /*[T]*/ U_JT_TRANSPARENT, /*[T]*/
U_JT_COUNT /* 6 */ U_JT_COUNT /* 6 */
} UJoiningType; } UJoiningType;
/** /**
* Joining Group constants. * Joining Group constants.
* *
* @see UCHAR_JOINING_GROUP * @see UCHAR_JOINING_GROUP
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum UJoiningGroup { typedef enum UJoiningGroup {
/*
* Note: UJoiningGroup constants are parsed by preparseucd.py.
* It matches lines like
* U_JG_<Unicode Joining_Group value name>
*/
U_JG_NO_JOINING_GROUP, U_JG_NO_JOINING_GROUP,
U_JG_AIN, U_JG_AIN,
U_JG_ALAPH, U_JG_ALAPH,
U_JG_ALEF, U_JG_ALEF,
U_JG_BEH, U_JG_BEH,
U_JG_BETH, U_JG_BETH,
U_JG_DAL, U_JG_DAL,
U_JG_DALATH_RISH, U_JG_DALATH_RISH,
U_JG_E, U_JG_E,
U_JG_FEH, U_JG_FEH,
skipping to change at line 1561 skipping to change at line 1623
U_JG_YEH_WITH_TAIL, U_JG_YEH_WITH_TAIL,
U_JG_YUDH, U_JG_YUDH,
U_JG_YUDH_HE, U_JG_YUDH_HE,
U_JG_ZAIN, U_JG_ZAIN,
U_JG_FE, /**< @stable ICU 2.6 */ U_JG_FE, /**< @stable ICU 2.6 */
U_JG_KHAPH, /**< @stable ICU 2.6 */ U_JG_KHAPH, /**< @stable ICU 2.6 */
U_JG_ZHAIN, /**< @stable ICU 2.6 */ U_JG_ZHAIN, /**< @stable ICU 2.6 */
U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */ U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */
U_JG_FARSI_YEH, /**< @stable ICU 4.4 */ U_JG_FARSI_YEH, /**< @stable ICU 4.4 */
U_JG_NYA, /**< @stable ICU 4.4 */ U_JG_NYA, /**< @stable ICU 4.4 */
U_JG_ROHINGYA_YEH, /**< @stable ICU 49 */
U_JG_COUNT U_JG_COUNT
} UJoiningGroup; } UJoiningGroup;
/** /**
* Grapheme Cluster Break constants. * Grapheme Cluster Break constants.
* *
* @see UCHAR_GRAPHEME_CLUSTER_BREAK * @see UCHAR_GRAPHEME_CLUSTER_BREAK
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum UGraphemeClusterBreak { typedef enum UGraphemeClusterBreak {
U_GCB_OTHER = 0, /*[XX]*/ /*See note !!*/ /*
* Note: UGraphemeClusterBreak constants are parsed by preparseucd.py.
* It matches lines like
* U_GCB_<Unicode Grapheme_Cluster_Break value name>
*/
U_GCB_OTHER = 0, /*[XX]*/
U_GCB_CONTROL = 1, /*[CN]*/ U_GCB_CONTROL = 1, /*[CN]*/
U_GCB_CR = 2, /*[CR]*/ U_GCB_CR = 2, /*[CR]*/
U_GCB_EXTEND = 3, /*[EX]*/ U_GCB_EXTEND = 3, /*[EX]*/
U_GCB_L = 4, /*[L]*/ U_GCB_L = 4, /*[L]*/
U_GCB_LF = 5, /*[LF]*/ U_GCB_LF = 5, /*[LF]*/
U_GCB_LV = 6, /*[LV]*/ U_GCB_LV = 6, /*[LV]*/
U_GCB_LVT = 7, /*[LVT]*/ U_GCB_LVT = 7, /*[LVT]*/
U_GCB_T = 8, /*[T]*/ U_GCB_T = 8, /*[T]*/
U_GCB_V = 9, /*[V]*/ U_GCB_V = 9, /*[V]*/
U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5. 1/ICU 4.0 */ U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5. 1/ICU 4.0 */
skipping to change at line 1594 skipping to change at line 1663
} UGraphemeClusterBreak; } UGraphemeClusterBreak;
/** /**
* Word Break constants. * Word Break constants.
* (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.) * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.)
* *
* @see UCHAR_WORD_BREAK * @see UCHAR_WORD_BREAK
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum UWordBreakValues { typedef enum UWordBreakValues {
U_WB_OTHER = 0, /*[XX]*/ /*See note !!*/ /*
* Note: UWordBreakValues constants are parsed by preparseucd.py.
* It matches lines like
* U_WB_<Unicode Word_Break value name>
*/
U_WB_OTHER = 0, /*[XX]*/
U_WB_ALETTER = 1, /*[LE]*/ U_WB_ALETTER = 1, /*[LE]*/
U_WB_FORMAT = 2, /*[FO]*/ U_WB_FORMAT = 2, /*[FO]*/
U_WB_KATAKANA = 3, /*[KA]*/ U_WB_KATAKANA = 3, /*[KA]*/
U_WB_MIDLETTER = 4, /*[ML]*/ U_WB_MIDLETTER = 4, /*[ML]*/
U_WB_MIDNUM = 5, /*[MN]*/ U_WB_MIDNUM = 5, /*[MN]*/
U_WB_NUMERIC = 6, /*[NU]*/ U_WB_NUMERIC = 6, /*[NU]*/
U_WB_EXTENDNUMLET = 7, /*[EX]*/ U_WB_EXTENDNUMLET = 7, /*[EX]*/
U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5. 1/ICU 4.0 */ U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5. 1/ICU 4.0 */
U_WB_EXTEND = 9, /*[Extend]*/ U_WB_EXTEND = 9, /*[Extend]*/
U_WB_LF = 10, /*[LF]*/ U_WB_LF = 10, /*[LF]*/
skipping to change at line 1617 skipping to change at line 1692
U_WB_COUNT = 13 U_WB_COUNT = 13
} UWordBreakValues; } UWordBreakValues;
/** /**
* Sentence Break constants. * Sentence Break constants.
* *
* @see UCHAR_SENTENCE_BREAK * @see UCHAR_SENTENCE_BREAK
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum USentenceBreak { typedef enum USentenceBreak {
U_SB_OTHER = 0, /*[XX]*/ /*See note !!*/ /*
* Note: USentenceBreak constants are parsed by preparseucd.py.
* It matches lines like
* U_SB_<Unicode Sentence_Break value name>
*/
U_SB_OTHER = 0, /*[XX]*/
U_SB_ATERM = 1, /*[AT]*/ U_SB_ATERM = 1, /*[AT]*/
U_SB_CLOSE = 2, /*[CL]*/ U_SB_CLOSE = 2, /*[CL]*/
U_SB_FORMAT = 3, /*[FO]*/ U_SB_FORMAT = 3, /*[FO]*/
U_SB_LOWER = 4, /*[LO]*/ U_SB_LOWER = 4, /*[LO]*/
U_SB_NUMERIC = 5, /*[NU]*/ U_SB_NUMERIC = 5, /*[NU]*/
U_SB_OLETTER = 6, /*[LE]*/ U_SB_OLETTER = 6, /*[LE]*/
U_SB_SEP = 7, /*[SE]*/ U_SB_SEP = 7, /*[SE]*/
U_SB_SP = 8, /*[SP]*/ U_SB_SP = 8, /*[SP]*/
U_SB_STERM = 9, /*[ST]*/ U_SB_STERM = 9, /*[ST]*/
U_SB_UPPER = 10, /*[UP]*/ U_SB_UPPER = 10, /*[UP]*/
skipping to change at line 1642 skipping to change at line 1723
U_SB_COUNT = 15 U_SB_COUNT = 15
} USentenceBreak; } USentenceBreak;
/** /**
* Line Break constants. * Line Break constants.
* *
* @see UCHAR_LINE_BREAK * @see UCHAR_LINE_BREAK
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum ULineBreak { typedef enum ULineBreak {
U_LB_UNKNOWN = 0, /*[XX]*/ /*See note !!*/ /*
* Note: ULineBreak constants are parsed by preparseucd.py.
* It matches lines like
* U_LB_<Unicode Line_Break value name>
*/
U_LB_UNKNOWN = 0, /*[XX]*/
U_LB_AMBIGUOUS = 1, /*[AI]*/ U_LB_AMBIGUOUS = 1, /*[AI]*/
U_LB_ALPHABETIC = 2, /*[AL]*/ U_LB_ALPHABETIC = 2, /*[AL]*/
U_LB_BREAK_BOTH = 3, /*[B2]*/ U_LB_BREAK_BOTH = 3, /*[B2]*/
U_LB_BREAK_AFTER = 4, /*[BA]*/ U_LB_BREAK_AFTER = 4, /*[BA]*/
U_LB_BREAK_BEFORE = 5, /*[BB]*/ U_LB_BREAK_BEFORE = 5, /*[BB]*/
U_LB_MANDATORY_BREAK = 6, /*[BK]*/ U_LB_MANDATORY_BREAK = 6, /*[BK]*/
U_LB_CONTINGENT_BREAK = 7, /*[CB]*/ U_LB_CONTINGENT_BREAK = 7, /*[CB]*/
U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/ U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/
U_LB_COMBINING_MARK = 9, /*[CM]*/ U_LB_COMBINING_MARK = 9, /*[CM]*/
U_LB_CARRIAGE_RETURN = 10, /*[CR]*/ U_LB_CARRIAGE_RETURN = 10, /*[CR]*/
U_LB_EXCLAMATION = 11, /*[EX]*/ U_LB_EXCLAMATION = 11, /*[EX]*/
U_LB_GLUE = 12, /*[GL]*/ U_LB_GLUE = 12, /*[GL]*/
U_LB_HYPHEN = 13, /*[HY]*/ U_LB_HYPHEN = 13, /*[HY]*/
U_LB_IDEOGRAPHIC = 14, /*[ID]*/ U_LB_IDEOGRAPHIC = 14, /*[ID]*/
U_LB_INSEPERABLE = 15,
/** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @stable ICU 3.0 */ /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @stable ICU 3.0 */
U_LB_INSEPARABLE=U_LB_INSEPERABLE,/*[IN]*/ U_LB_INSEPARABLE = 15, /*[IN]*/
U_LB_INSEPERABLE = U_LB_INSEPARABLE,
U_LB_INFIX_NUMERIC = 16, /*[IS]*/ U_LB_INFIX_NUMERIC = 16, /*[IS]*/
U_LB_LINE_FEED = 17, /*[LF]*/ U_LB_LINE_FEED = 17, /*[LF]*/
U_LB_NONSTARTER = 18, /*[NS]*/ U_LB_NONSTARTER = 18, /*[NS]*/
U_LB_NUMERIC = 19, /*[NU]*/ U_LB_NUMERIC = 19, /*[NU]*/
U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/ U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/
U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/ U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/
U_LB_PREFIX_NUMERIC = 22, /*[PR]*/ U_LB_PREFIX_NUMERIC = 22, /*[PR]*/
U_LB_QUOTATION = 23, /*[QU]*/ U_LB_QUOTATION = 23, /*[QU]*/
U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/ U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/
U_LB_SURROGATE = 25, /*[SG]*/ U_LB_SURROGATE = 25, /*[SG]*/
skipping to change at line 1681 skipping to change at line 1768
U_LB_BREAK_SYMBOLS = 27, /*[SY]*/ U_LB_BREAK_SYMBOLS = 27, /*[SY]*/
U_LB_ZWSPACE = 28, /*[ZW]*/ U_LB_ZWSPACE = 28, /*[ZW]*/
U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4 /ICU 2.6 */ U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4 /ICU 2.6 */
U_LB_WORD_JOINER = 30, /*[WJ]*/ U_LB_WORD_JOINER = 30, /*[WJ]*/
U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4 .1/ICU 3.4 */ U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4 .1/ICU 3.4 */
U_LB_H3 = 32, /*[H3]*/ U_LB_H3 = 32, /*[H3]*/
U_LB_JL = 33, /*[JL]*/ U_LB_JL = 33, /*[JL]*/
U_LB_JT = 34, /*[JT]*/ U_LB_JT = 34, /*[JT]*/
U_LB_JV = 35, /*[JV]*/ U_LB_JV = 35, /*[JV]*/
U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */
U_LB_COUNT = 37 U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/I
CU 49 */
U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */
U_LB_COUNT = 39
} ULineBreak; } ULineBreak;
/** /**
* Numeric Type constants. * Numeric Type constants.
* *
* @see UCHAR_NUMERIC_TYPE * @see UCHAR_NUMERIC_TYPE
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum UNumericType { typedef enum UNumericType {
U_NT_NONE, /*[None]*/ /*See note !!*/ /*
* Note: UNumericType constants are parsed by preparseucd.py.
* It matches lines like
* U_NT_<Unicode Numeric_Type value name>
*/
U_NT_NONE, /*[None]*/
U_NT_DECIMAL, /*[de]*/ U_NT_DECIMAL, /*[de]*/
U_NT_DIGIT, /*[di]*/ U_NT_DIGIT, /*[di]*/
U_NT_NUMERIC, /*[nu]*/ U_NT_NUMERIC, /*[nu]*/
U_NT_COUNT U_NT_COUNT
} UNumericType; } UNumericType;
/** /**
* Hangul Syllable Type constants. * Hangul Syllable Type constants.
* *
* @see UCHAR_HANGUL_SYLLABLE_TYPE * @see UCHAR_HANGUL_SYLLABLE_TYPE
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
typedef enum UHangulSyllableType { typedef enum UHangulSyllableType {
U_HST_NOT_APPLICABLE, /*[NA]*/ /*See note !!*/ /*
* Note: UHangulSyllableType constants are parsed by preparseucd.py.
* It matches lines like
* U_HST_<Unicode Hangul_Syllable_Type value name>
*/
U_HST_NOT_APPLICABLE, /*[NA]*/
U_HST_LEADING_JAMO, /*[L]*/ U_HST_LEADING_JAMO, /*[L]*/
U_HST_VOWEL_JAMO, /*[V]*/ U_HST_VOWEL_JAMO, /*[V]*/
U_HST_TRAILING_JAMO, /*[T]*/ U_HST_TRAILING_JAMO, /*[T]*/
U_HST_LV_SYLLABLE, /*[LV]*/ U_HST_LV_SYLLABLE, /*[LV]*/
U_HST_LVT_SYLLABLE, /*[LVT]*/ U_HST_LVT_SYLLABLE, /*[LVT]*/
U_HST_COUNT U_HST_COUNT
} UHangulSyllableType; } UHangulSyllableType;
/** /**
* Check a binary Unicode property for a code point. * Check a binary Unicode property for a code point.
skipping to change at line 1908 skipping to change at line 2009
/** /**
* Get the numeric value for a Unicode code point as defined in the * Get the numeric value for a Unicode code point as defined in the
* Unicode Character Database. * Unicode Character Database.
* *
* A "double" return type is necessary because * A "double" return type is necessary because
* some numeric values are fractions, negative, or too large for int32_t. * some numeric values are fractions, negative, or too large for int32_t.
* *
* For characters without any numeric values in the Unicode Character Datab ase, * For characters without any numeric values in the Unicode Character Datab ase,
* this function will return U_NO_NUMERIC_VALUE. * this function will return U_NO_NUMERIC_VALUE.
* Note: This is different from the Unicode Standard which specifies NaN as
the default value.
* (NaN is not available on all platforms.)
* *
* Similar to java.lang.Character.getNumericValue(), but u_getNumericValue( ) * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue( )
* also supports negative values, large values, and fractions, * also supports negative values, large values, and fractions,
* while Java's getNumericValue() returns values 10..35 for ASCII letters. * while Java's getNumericValue() returns values 10..35 for ASCII letters.
* *
* @param c Code point to get the numeric value for. * @param c Code point to get the numeric value for.
* @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined. * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined.
* *
* @see U_NO_NUMERIC_VALUE * @see U_NO_NUMERIC_VALUE
* @stable ICU 2.2 * @stable ICU 2.2
skipping to change at line 2556 skipping to change at line 2659
* @see u_charFromName * @see u_charFromName
* @see u_enumCharNames * @see u_enumCharNames
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_charName(UChar32 code, UCharNameChoice nameChoice, u_charName(UChar32 code, UCharNameChoice nameChoice,
char *buffer, int32_t bufferLength, char *buffer, int32_t bufferLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Get the ISO 10646 comment for a character. * Returns an empty string.
* The ISO 10646 comment is an informative field in the Unicode Character * Used to return the ISO 10646 comment for a character.
* Database (UnicodeData.txt field 11) and is from the ISO 10646 names list * The Unicode ISO_Comment property is deprecated and has no values.
.
*
* Note: Unicode 5.2 removes all ISO comment data, resulting in empty strin
gs
* returned for all characters.
* *
* @param c The character (code point) for which to get the ISO comment. * @param c The character (code point) for which to get the ISO comment.
* It must be <code>0<=c<=0x10ffff</code>. * It must be <code>0<=c<=0x10ffff</code>.
* @param dest Destination address for copying the comment. * @param dest Destination address for copying the comment.
* The comment will be zero-terminated if possible. * The comment will be zero-terminated if possible.
* If there is no comment, then the buffer will be set to the e mpty string. * If there is no comment, then the buffer will be set to the e mpty string.
* @param destCapacity <code>==sizeof(dest)</code> * @param destCapacity <code>==sizeof(dest)</code>
* @param pErrorCode Pointer to a UErrorCode variable; * @param pErrorCode Pointer to a UErrorCode variable;
* check for <code>U_SUCCESS()</code> after <code>u_getISOComment()< /code> * check for <code>U_SUCCESS()</code> after <code>u_getISOComment()< /code>
* returns. * returns.
* @return The length of the comment, or 0 if there is no comment for this * @return 0
character.
* If the destCapacity is less than or equal to the length, then th
e buffer
* contains the truncated name and the returned length indicates th
e full
* length of the name.
* The length does not include the zero-termination.
* *
* @stable ICU 2.2 * @deprecated ICU 49
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_getISOComment(UChar32 c, u_getISOComment(UChar32 c,
char *dest, int32_t destCapacity, char *dest, int32_t destCapacity,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Find a Unicode character by its name and return its code point value. * Find a Unicode character by its name and return its code point value.
* The name is matched exactly and completely. * The name is matched exactly and completely.
* If the name does not correspond to a code point, <i>pErrorCode</i> * If the name does not correspond to a code point, <i>pErrorCode</i>
 End of changes. 51 change blocks. 
76 lines changed or deleted 173 lines changed or added


 ucharstrie.h   ucharstrie.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: ucharstrie.h * file name: ucharstrie.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010nov14 * created on: 2010nov14
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 46 skipping to change at line 46
* Light-weight, non-const reader class for a UCharsTrie. * Light-weight, non-const reader class for a UCharsTrie.
* Traverses a UChar-serialized data structure with minimal state, * Traverses a UChar-serialized data structure with minimal state,
* for mapping strings (16-bit-unit sequences) to non-negative integer valu es. * for mapping strings (16-bit-unit sequences) to non-negative integer valu es.
* *
* This class owns the serialized trie data only if it was constructed by * This class owns the serialized trie data only if it was constructed by
* the builder's build() method. * the builder's build() method.
* The public constructor and the copy constructor only alias the data (onl y copy the pointer). * The public constructor and the copy constructor only alias the data (onl y copy the pointer).
* There is no assignment operator. * There is no assignment operator.
* *
* This class is not intended for public subclassing. * This class is not intended for public subclassing.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API UCharsTrie : public UMemory { class U_COMMON_API UCharsTrie : public UMemory {
public: public:
/** /**
* Constructs a UCharsTrie reader instance. * Constructs a UCharsTrie reader instance.
* *
* The trieUChars must contain a copy of a UChar sequence from the UCha rsTrieBuilder, * The trieUChars must contain a copy of a UChar sequence from the UCha rsTrieBuilder,
* starting with the first UChar of that sequence. * starting with the first UChar of that sequence.
* The UCharsTrie object will not read more UChars than * The UCharsTrie object will not read more UChars than
* the UCharsTrieBuilder generated in the corresponding build() call. * the UCharsTrieBuilder generated in the corresponding build() call.
* *
* The array is not copied/cloned and must not be modified while * The array is not copied/cloned and must not be modified while
* the UCharsTrie object is in use. * the UCharsTrie object is in use.
* *
* @param trieUChars The UChar array that contains the serialized trie. * @param trieUChars The UChar array that contains the serialized trie.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCharsTrie(const UChar *trieUChars) UCharsTrie(const UChar *trieUChars)
: ownedArray_(NULL), uchars_(trieUChars), : ownedArray_(NULL), uchars_(trieUChars),
pos_(uchars_), remainingMatchLength_(-1) {} pos_(uchars_), remainingMatchLength_(-1) {}
/** /**
* Destructor. * Destructor.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
~UCharsTrie(); ~UCharsTrie();
/** /**
* Copy constructor, copies the other trie reader object and its state, * Copy constructor, copies the other trie reader object and its state,
* but not the UChar array which will be shared. (Shallow copy.) * but not the UChar array which will be shared. (Shallow copy.)
* @param other Another UCharsTrie object. * @param other Another UCharsTrie object.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCharsTrie(const UCharsTrie &other) UCharsTrie(const UCharsTrie &other)
: ownedArray_(NULL), uchars_(other.uchars_), : ownedArray_(NULL), uchars_(other.uchars_),
pos_(other.pos_), remainingMatchLength_(other.remainingMatchL ength_) {} pos_(other.pos_), remainingMatchLength_(other.remainingMatchL ength_) {}
/** /**
* Resets this trie to its initial state. * Resets this trie to its initial state.
* @return *this * @return *this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCharsTrie &reset() { UCharsTrie &reset() {
pos_=uchars_; pos_=uchars_;
remainingMatchLength_=-1; remainingMatchLength_=-1;
return *this; return *this;
} }
/** /**
* UCharsTrie state object, for saving a trie's current state * UCharsTrie state object, for saving a trie's current state
* and resetting the trie back to this state later. * and resetting the trie back to this state later.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class State : public UMemory { class State : public UMemory {
public: public:
/** /**
* Constructs an empty State. * Constructs an empty State.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
State() { uchars=NULL; } State() { uchars=NULL; }
private: private:
friend class UCharsTrie; friend class UCharsTrie;
const UChar *uchars; const UChar *uchars;
const UChar *pos; const UChar *pos;
int32_t remainingMatchLength; int32_t remainingMatchLength;
}; };
/** /**
* Saves the state of this trie. * Saves the state of this trie.
* @param state The State object to hold the trie's state. * @param state The State object to hold the trie's state.
* @return *this * @return *this
* @see resetToState * @see resetToState
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
const UCharsTrie &saveState(State &state) const { const UCharsTrie &saveState(State &state) const {
state.uchars=uchars_; state.uchars=uchars_;
state.pos=pos_; state.pos=pos_;
state.remainingMatchLength=remainingMatchLength_; state.remainingMatchLength=remainingMatchLength_;
return *this; return *this;
} }
/** /**
* Resets this trie to the saved state. * Resets this trie to the saved state.
* If the state object contains no state, or the state of a different t rie, * If the state object contains no state, or the state of a different t rie,
* then this trie remains unchanged. * then this trie remains unchanged.
* @param state The State object which holds a saved trie state. * @param state The State object which holds a saved trie state.
* @return *this * @return *this
* @see saveState * @see saveState
* @see reset * @see reset
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCharsTrie &resetToState(const State &state) { UCharsTrie &resetToState(const State &state) {
if(uchars_==state.uchars && uchars_!=NULL) { if(uchars_==state.uchars && uchars_!=NULL) {
pos_=state.pos; pos_=state.pos;
remainingMatchLength_=state.remainingMatchLength; remainingMatchLength_=state.remainingMatchLength;
} }
return *this; return *this;
} }
/** /**
* Determines whether the string so far matches, whether it has a value , * Determines whether the string so far matches, whether it has a value ,
* and whether another input UChar can continue a matching string. * and whether another input UChar can continue a matching string.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UStringTrieResult current() const; UStringTrieResult current() const;
/** /**
* Traverses the trie from the initial state for this input UChar. * Traverses the trie from the initial state for this input UChar.
* Equivalent to reset().next(uchar). * Equivalent to reset().next(uchar).
* @param uchar Input char value. Values below 0 and above 0xffff will never match. * @param uchar Input char value. Values below 0 and above 0xffff will never match.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UStringTrieResult first(int32_t uchar) { inline UStringTrieResult first(int32_t uchar) {
remainingMatchLength_=-1; remainingMatchLength_=-1;
return nextImpl(uchars_, uchar); return nextImpl(uchars_, uchar);
} }
/** /**
* Traverses the trie from the initial state for the * Traverses the trie from the initial state for the
* one or two UTF-16 code units for this input code point. * one or two UTF-16 code units for this input code point.
* Equivalent to reset().nextForCodePoint(cp). * Equivalent to reset().nextForCodePoint(cp).
* @param cp A Unicode code point 0..0x10ffff. * @param cp A Unicode code point 0..0x10ffff.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UStringTrieResult firstForCodePoint(UChar32 cp) { UStringTrieResult firstForCodePoint(UChar32 cp);
return cp<=0xffff ?
first(cp) :
(USTRINGTRIE_HAS_NEXT(first(U16_LEAD(cp))) ?
next(U16_TRAIL(cp)) :
USTRINGTRIE_NO_MATCH);
}
/** /**
* Traverses the trie from the current state for this input UChar. * Traverses the trie from the current state for this input UChar.
* @param uchar Input char value. Values below 0 and above 0xffff will never match. * @param uchar Input char value. Values below 0 and above 0xffff will never match.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UStringTrieResult next(int32_t uchar); UStringTrieResult next(int32_t uchar);
/** /**
* Traverses the trie from the current state for the * Traverses the trie from the current state for the
* one or two UTF-16 code units for this input code point. * one or two UTF-16 code units for this input code point.
* @param cp A Unicode code point 0..0x10ffff. * @param cp A Unicode code point 0..0x10ffff.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UStringTrieResult nextForCodePoint(UChar32 cp) { UStringTrieResult nextForCodePoint(UChar32 cp);
return cp<=0xffff ?
next(cp) :
(USTRINGTRIE_HAS_NEXT(next(U16_LEAD(cp))) ?
next(U16_TRAIL(cp)) :
USTRINGTRIE_NO_MATCH);
}
/** /**
* Traverses the trie from the current state for this string. * Traverses the trie from the current state for this string.
* Equivalent to * Equivalent to
* \code * \code
* Result result=current(); * Result result=current();
* for(each c in s) * for(each c in s)
* if(!USTRINGTRIE_HAS_NEXT(result)) return USTRINGTRIE_NO_MATCH; * if(!USTRINGTRIE_HAS_NEXT(result)) return USTRINGTRIE_NO_MATCH;
* result=next(c); * result=next(c);
* return result; * return result;
* \endcode * \endcode
* @param s A string. Can be NULL if length is 0. * @param s A string. Can be NULL if length is 0.
* @param length The length of the string. Can be -1 if NUL-terminated. * @param length The length of the string. Can be -1 if NUL-terminated.
* @return The match/value Result. * @return The match/value Result.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UStringTrieResult next(const UChar *s, int32_t length); UStringTrieResult next(const UChar *s, int32_t length);
/** /**
* Returns a matching string's value if called immediately after * Returns a matching string's value if called immediately after
* current()/first()/next() returned USTRINGTRIE_INTERMEDIATE_VALUE or USTRINGTRIE_FINAL_VALUE. * current()/first()/next() returned USTRINGTRIE_INTERMEDIATE_VALUE or USTRINGTRIE_FINAL_VALUE.
* getValue() can be called multiple times. * getValue() can be called multiple times.
* *
* Do not call getValue() after USTRINGTRIE_NO_MATCH or USTRINGTRIE_NO_ VALUE! * Do not call getValue() after USTRINGTRIE_NO_MATCH or USTRINGTRIE_NO_ VALUE!
* @return The value for the string so far. * @return The value for the string so far.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline int32_t getValue() const { inline int32_t getValue() const {
const UChar *pos=pos_; const UChar *pos=pos_;
int32_t leadUnit=*pos++; int32_t leadUnit=*pos++;
// U_ASSERT(leadUnit>=kMinValueLead); // U_ASSERT(leadUnit>=kMinValueLead);
return leadUnit&kValueIsFinal ? return leadUnit&kValueIsFinal ?
readValue(pos, leadUnit&0x7fff) : readNodeValue(pos, leadUnit); readValue(pos, leadUnit&0x7fff) : readNodeValue(pos, leadUnit);
} }
/** /**
* Determines whether all strings reachable from the current state * Determines whether all strings reachable from the current state
* map to the same value. * map to the same value.
* @param uniqueValue Receives the unique value, if this function retur ns TRUE. * @param uniqueValue Receives the unique value, if this function retur ns TRUE.
* (output-only) * (output-only)
* @return TRUE if all strings reachable from the current state * @return TRUE if all strings reachable from the current state
* map to the same value. * map to the same value.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
inline UBool hasUniqueValue(int32_t &uniqueValue) const { inline UBool hasUniqueValue(int32_t &uniqueValue) const {
const UChar *pos=pos_; const UChar *pos=pos_;
// Skip the rest of a pending linear-match node. // Skip the rest of a pending linear-match node.
return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FA LSE, uniqueValue); return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FA LSE, uniqueValue);
} }
/** /**
* Finds each UChar which continues the string from the current state. * Finds each UChar which continues the string from the current state.
* That is, each UChar c for which it would be next(c)!=USTRINGTRIE_NO_ MATCH now. * That is, each UChar c for which it would be next(c)!=USTRINGTRIE_NO_ MATCH now.
* @param out Each next UChar is appended to this object. * @param out Each next UChar is appended to this object.
* @return the number of UChars which continue the string from here * @return the number of UChars which continue the string from here
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getNextUChars(Appendable &out) const; int32_t getNextUChars(Appendable &out) const;
/** /**
* Iterator for all of the (string, value) pairs in a UCharsTrie. * Iterator for all of the (string, value) pairs in a UCharsTrie.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API Iterator : public UMemory { class U_COMMON_API Iterator : public UMemory {
public: public:
/** /**
* Iterates from the root of a UChar-serialized UCharsTrie. * Iterates from the root of a UChar-serialized UCharsTrie.
* @param trieUChars The trie UChars. * @param trieUChars The trie UChars.
* @param maxStringLength If 0, the iterator returns full strings. * @param maxStringLength If 0, the iterator returns full strings.
* Otherwise, the iterator returns strings w ith this maximum length. * Otherwise, the iterator returns strings w ith this maximum length.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details. ) * function chaining. (See User Guide for details. )
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
Iterator(const UChar *trieUChars, int32_t maxStringLength, UErrorCo de &errorCode); Iterator(const UChar *trieUChars, int32_t maxStringLength, UErrorCo de &errorCode);
/** /**
* Iterates from the current state of the specified UCharsTrie. * Iterates from the current state of the specified UCharsTrie.
* @param trie The trie whose state will be copied for iteration. * @param trie The trie whose state will be copied for iteration.
* @param maxStringLength If 0, the iterator returns full strings. * @param maxStringLength If 0, the iterator returns full strings.
* Otherwise, the iterator returns strings w ith this maximum length. * Otherwise, the iterator returns strings w ith this maximum length.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details. ) * function chaining. (See User Guide for details. )
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
Iterator(const UCharsTrie &trie, int32_t maxStringLength, UErrorCod e &errorCode); Iterator(const UCharsTrie &trie, int32_t maxStringLength, UErrorCod e &errorCode);
/** /**
* Destructor. * Destructor.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
~Iterator(); ~Iterator();
/** /**
* Resets this iterator to its initial state. * Resets this iterator to its initial state.
* @return *this * @return *this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
Iterator &reset(); Iterator &reset();
/** /**
* @return TRUE if there are more elements. * @return TRUE if there are more elements.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool hasNext() const; UBool hasNext() const;
/** /**
* Finds the next (string, value) pair if there is one. * Finds the next (string, value) pair if there is one.
* *
* If the string is truncated to the maximum length and does not * If the string is truncated to the maximum length and does not
* have a real value, then the value is set to -1. * have a real value, then the value is set to -1.
* In this case, this "not a real value" is indistinguishable from * In this case, this "not a real value" is indistinguishable from
* a real value of -1. * a real value of -1.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details. ) * function chaining. (See User Guide for details. )
* @return TRUE if there is another element. * @return TRUE if there is another element.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UBool next(UErrorCode &errorCode); UBool next(UErrorCode &errorCode);
/** /**
* @return The string for the last successful next(). * @return The string for the last successful next().
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
const UnicodeString &getString() const { return str_; } const UnicodeString &getString() const { return str_; }
/** /**
* @return The value for the last successful next(). * @return The value for the last successful next().
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
int32_t getValue() const { return value_; } int32_t getValue() const { return value_; }
private: private:
UBool truncateAndStop() { UBool truncateAndStop() {
pos_=NULL; pos_=NULL;
value_=-1; // no real value for str value_=-1; // no real value for str
return TRUE; return TRUE;
} }
 End of changes. 30 change blocks. 
42 lines changed or deleted 30 lines changed or added


 ucharstriebuilder.h   ucharstriebuilder.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: ucharstriebuilder.h * file name: ucharstriebuilder.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010nov14 * created on: 2010nov14
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 31 skipping to change at line 31
#include "unicode/unistr.h" #include "unicode/unistr.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class UCharsTrieElement; class UCharsTrieElement;
/** /**
* Builder class for UCharsTrie. * Builder class for UCharsTrie.
* *
* This class is not intended for public subclassing. * This class is not intended for public subclassing.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API UCharsTrieBuilder : public StringTrieBuilder { class U_COMMON_API UCharsTrieBuilder : public StringTrieBuilder {
public: public:
/** /**
* Constructs an empty builder. * Constructs an empty builder.
* @param errorCode Standard ICU error code. * @param errorCode Standard ICU error code.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCharsTrieBuilder(UErrorCode &errorCode); UCharsTrieBuilder(UErrorCode &errorCode);
/** /**
* Destructor. * Destructor.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
virtual ~UCharsTrieBuilder(); virtual ~UCharsTrieBuilder();
/** /**
* Adds a (string, value) pair. * Adds a (string, value) pair.
* The string must be unique. * The string must be unique.
* The string contents will be copied; the builder does not keep * The string contents will be copied; the builder does not keep
* a reference to the input UnicodeString or its buffer. * a reference to the input UnicodeString or its buffer.
* @param s The input string. * @param s The input string.
* @param value The value associated with this string. * @param value The value associated with this string.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return *this * @return *this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCharsTrieBuilder &add(const UnicodeString &s, int32_t value, UErrorCod e &errorCode); UCharsTrieBuilder &add(const UnicodeString &s, int32_t value, UErrorCod e &errorCode);
/** /**
* Builds a UCharsTrie for the add()ed data. * Builds a UCharsTrie for the add()ed data.
* Once built, no further data can be add()ed until clear() is called. * Once built, no further data can be add()ed until clear() is called.
* *
* This method passes ownership of the builder's internal result array to the new trie object. * This method passes ownership of the builder's internal result array to the new trie object.
* Another call to any build() variant will re-serialize the trie. * Another call to any build() variant will re-serialize the trie.
* After clear() has been called, a new array will be used as well. * After clear() has been called, a new array will be used as well.
* @param buildOption Build option, see UStringTrieBuildOption. * @param buildOption Build option, see UStringTrieBuildOption.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return A new UCharsTrie for the add()ed data. * @return A new UCharsTrie for the add()ed data.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCharsTrie *build(UStringTrieBuildOption buildOption, UErrorCode &error Code); UCharsTrie *build(UStringTrieBuildOption buildOption, UErrorCode &error Code);
/** /**
* Builds a UCharsTrie for the add()ed data and UChar-serializes it. * Builds a UCharsTrie for the add()ed data and UChar-serializes it.
* Once built, no further data can be add()ed until clear() is called. * Once built, no further data can be add()ed until clear() is called.
* *
* Multiple calls to buildUnicodeString() set the UnicodeStrings to the * Multiple calls to buildUnicodeString() set the UnicodeStrings to the
* builder's same UChar array, without rebuilding. * builder's same UChar array, without rebuilding.
* If buildUnicodeString() is called after build(), the trie will be * If buildUnicodeString() is called after build(), the trie will be
skipping to change at line 100 skipping to change at line 100
* the owner of the previously returned array. * the owner of the previously returned array.
* After clear() has been called, a new array will be used as well. * After clear() has been called, a new array will be used as well.
* @param buildOption Build option, see UStringTrieBuildOption. * @param buildOption Build option, see UStringTrieBuildOption.
* @param result A UnicodeString which will be set to the UChar-seriali zed * @param result A UnicodeString which will be set to the UChar-seriali zed
* UCharsTrie for the add()ed data. * UCharsTrie for the add()ed data.
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function ret urns * pass the U_SUCCESS() test, or else the function ret urns
* immediately. Check for U_FAILURE() on output or use with * immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return result * @return result
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UnicodeString &buildUnicodeString(UStringTrieBuildOption buildOption, U nicodeString &result, UnicodeString &buildUnicodeString(UStringTrieBuildOption buildOption, U nicodeString &result,
UErrorCode &errorCode); UErrorCode &errorCode);
/** /**
* Removes all (string, value) pairs. * Removes all (string, value) pairs.
* New data can then be add()ed and a new trie can be built. * New data can then be add()ed and a new trie can be built.
* @return *this * @return *this
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCharsTrieBuilder &clear() { UCharsTrieBuilder &clear() {
strings.remove(); strings.remove();
elementsLength=0; elementsLength=0;
ucharsLength=0; ucharsLength=0;
return *this; return *this;
} }
private: private:
UCharsTrieBuilder(const UCharsTrieBuilder &other); // no copy construc tor UCharsTrieBuilder(const UCharsTrieBuilder &other); // no copy construc tor
skipping to change at line 140 skipping to change at line 140
virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t unitIndex) const; virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t unitIndex) const;
virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, i nt32_t count) const; virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, i nt32_t count) const;
virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex , UChar unit) const; virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex , UChar unit) const;
virtual UBool matchNodesCanHaveValues() const { return TRUE; } virtual UBool matchNodesCanHaveValues() const { return TRUE; }
virtual int32_t getMaxBranchLinearSubNodeLength() const { return UChars Trie::kMaxBranchLinearSubNodeLength; } virtual int32_t getMaxBranchLinearSubNodeLength() const { return UChars Trie::kMaxBranchLinearSubNodeLength; }
virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLine arMatch; } virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLine arMatch; }
virtual int32_t getMaxLinearMatchLength() const { return UCharsTrie::kM axLinearMatchLength; } virtual int32_t getMaxLinearMatchLength() const { return UCharsTrie::kM axLinearMatchLength; }
#ifndef U_HIDE_INTERNAL_API
class UCTLinearMatchNode : public LinearMatchNode { class UCTLinearMatchNode : public LinearMatchNode {
public: public:
UCTLinearMatchNode(const UChar *units, int32_t len, Node *nextNode) ; UCTLinearMatchNode(const UChar *units, int32_t len, Node *nextNode) ;
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
virtual void write(StringTrieBuilder &builder); virtual void write(StringTrieBuilder &builder);
private: private:
const UChar *s; const UChar *s;
}; };
#endif
virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32 _t length, virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32 _t length,
Node *nextNode) const; Node *nextNode) const;
UBool ensureCapacity(int32_t length); UBool ensureCapacity(int32_t length);
virtual int32_t write(int32_t unit); virtual int32_t write(int32_t unit);
int32_t write(const UChar *s, int32_t length); int32_t write(const UChar *s, int32_t length);
virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length); virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length);
virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal); virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal);
virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_ t node); virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_ t node);
 End of changes. 10 change blocks. 
8 lines changed or deleted 10 lines changed or added


 uclean.h   uclean.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* * Copyright (C) 2001-2011, International Business Machines
* * Corporation and others. All Rights Reserved.
* Copyright (C) 2001-2009, International Business Machines
*
* Corporation and others. All Rights Reserved.
*
*
*
*************************************************************************** *** *************************************************************************** ***
* file name: uclean.h * file name: uclean.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2001July05 * created on: 2001July05
* created by: George Rhoten * created by: George Rhoten
*/ */
skipping to change at line 55 skipping to change at line 53
* An Error will be returned if some required part of ICU data can not * An Error will be returned if some required part of ICU data can not
* be loaded or initialized. * be loaded or initialized.
* The function returns immediately if the input error code indicates a * The function returns immediately if the input error code indicates a
* failure, as usual. * failure, as usual.
* *
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
u_init(UErrorCode *status); u_init(UErrorCode *status);
#ifndef U_HIDE_SYSTEM_API
/** /**
* Clean up the system resources, such as allocated memory or open files, * Clean up the system resources, such as allocated memory or open files,
* used in all ICU libraries. This will free/delete all memory owned by the * used in all ICU libraries. This will free/delete all memory owned by the
* ICU libraries, and return them to their original load state. All open IC U * ICU libraries, and return them to their original load state. All open IC U
* items (collators, resource bundles, converters, etc.) must be closed bef ore * items (collators, resource bundles, converters, etc.) must be closed bef ore
* calling this function, otherwise ICU may not free its allocated memory * calling this function, otherwise ICU may not free its allocated memory
* (e.g. close your converters and resource bundles before calling this * (e.g. close your converters and resource bundles before calling this
* function). Generally, this function should be called once just before * function). Generally, this function should be called once just before
* an application exits. For applications that dynamically load and unload * an application exits. For applications that dynamically load and unload
* the ICU libraries (relatively uncommon), u_cleanup() should be called * the ICU libraries (relatively uncommon), u_cleanup() should be called
skipping to change at line 242 skipping to change at line 241
* @param a Pointer to a user-supplied malloc function. * @param a Pointer to a user-supplied malloc function.
* @param r Pointer to a user-supplied realloc function. * @param r Pointer to a user-supplied realloc function.
* @param f Pointer to a user-supplied free function. * @param f Pointer to a user-supplied free function.
* @param status Receives error values. * @param status Receives error values.
* @stable ICU 2.8 * @stable ICU 2.8
* @system * @system
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f, u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_SYSTEM_API */
#endif #endif
 End of changes. 3 change blocks. 
8 lines changed or deleted 4 lines changed or added


 ucnv.h   ucnv.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1999-2011, International Business Machines * Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* ucnv.h: * ucnv.h:
* External APIs for the ICU's codeset conversion library * External APIs for the ICU's codeset conversion library
* Bertrand A. Damiba * Bertrand A. Damiba
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/04/99 helena Fixed internal header inclusion. * 04/04/99 helena Fixed internal header inclusion.
skipping to change at line 343 skipping to change at line 343
* <p>If the alias is ambiguous, then the preferred converter is used * <p>If the alias is ambiguous, then the preferred converter is used
* and the status is set to U_AMBIGUOUS_ALIAS_WARNING.</p> * and the status is set to U_AMBIGUOUS_ALIAS_WARNING.</p>
* *
* <p>The conversion behavior and names can vary between platforms. ICU may * <p>The conversion behavior and names can vary between platforms. ICU may
* convert some characters differently from other platforms. Details on thi s topic * convert some characters differently from other platforms. Details on thi s topic
* are in the <a href="http://icu-project.org/userguide/conversion.html">Us er's * are in the <a href="http://icu-project.org/userguide/conversion.html">Us er's
* Guide</a>. Aliases starting with a "cp" prefix have no specific meaning * Guide</a>. Aliases starting with a "cp" prefix have no specific meaning
* other than its an alias starting with the letters "cp". Please do not * other than its an alias starting with the letters "cp". Please do not
* associate any meaning to these aliases.</p> * associate any meaning to these aliases.</p>
* *
* \snippet samples/ucnv/convsamp.cpp ucnv_open
*
* @param converterName Name of the coded character set table. * @param converterName Name of the coded character set table.
* This may have options appended to the string. * This may have options appended to the string.
* IANA alias character set names, IBM CCSIDs starting with "ibm-" , * IANA alias character set names, IBM CCSIDs starting with "ibm-" ,
* Windows codepage numbers starting with "windows-" are frequentl y * Windows codepage numbers starting with "windows-" are frequentl y
* used for this parameter. See ucnv_getAvailableName and * used for this parameter. See ucnv_getAvailableName and
* ucnv_getAlias for a complete list that is available. * ucnv_getAlias for a complete list that is available.
* If this parameter is NULL, the default converter will be used. * If this parameter is NULL, the default converter will be used.
* @param err outgoing error status <TT>U_MEMORY_ALLOCATION_ERROR, U_FILE_A CCESS_ERROR</TT> * @param err outgoing error status <TT>U_MEMORY_ALLOCATION_ERROR, U_FILE_A CCESS_ERROR</TT>
* @return the created Unicode converter object, or <TT>NULL</TT> if an err or occured * @return the created Unicode converter object, or <TT>NULL</TT> if an err or occured
* @see ucnv_openU * @see ucnv_openU
skipping to change at line 1856 skipping to change at line 1858
* always returns "UTF-8". * always returns "UTF-8".
* *
* @return returns the current default converter name. * @return returns the current default converter name.
* Storage owned by the library * Storage owned by the library
* @see ucnv_setDefaultName * @see ucnv_setDefaultName
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE const char * U_EXPORT2 U_STABLE const char * U_EXPORT2
ucnv_getDefaultName(void); ucnv_getDefaultName(void);
#ifndef U_HIDE_SYSTEM_API
/** /**
* This function is not thread safe. DO NOT call this function when ANY ICU * This function is not thread safe. DO NOT call this function when ANY ICU
* function is being used from more than one thread! This function sets the * function is being used from more than one thread! This function sets the
* current default converter name. If this function needs to be called, it * current default converter name. If this function needs to be called, it
* should be called during application initialization. Most of the time, th e * should be called during application initialization. Most of the time, th e
* results from ucnv_getDefaultName() or ucnv_open with a NULL string argum ent * results from ucnv_getDefaultName() or ucnv_open with a NULL string argum ent
* is sufficient for your application. * is sufficient for your application.
* *
* If U_CHARSET_IS_UTF8 is defined to 1 in utypes.h then this function * If U_CHARSET_IS_UTF8 is defined to 1 in utypes.h then this function
* does nothing. * does nothing.
* *
* @param name the converter name to be the default (must be known by ICU). * @param name the converter name to be the default (must be known by ICU).
* @see ucnv_getDefaultName * @see ucnv_getDefaultName
* @system * @system
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ucnv_setDefaultName(const char *name); ucnv_setDefaultName(const char *name);
#endif /* U_HIDE_SYSTEM_API */
/** /**
* Fixes the backslash character mismapping. For example, in SJIS, the bac kslash * Fixes the backslash character mismapping. For example, in SJIS, the bac kslash
* character in the ASCII portion is also used to represent the yen currenc y sign. * character in the ASCII portion is also used to represent the yen currenc y sign.
* When mapping from Unicode character 0x005C, it's unclear whether to map the * When mapping from Unicode character 0x005C, it's unclear whether to map the
* character back to yen or backslash in SJIS. This function will take the input * character back to yen or backslash in SJIS. This function will take the input
* buffer and replace all the yen sign characters with backslash. This is necessary * buffer and replace all the yen sign characters with backslash. This is necessary
* when the user tries to open a file with the input buffer on Windows. * when the user tries to open a file with the input buffer on Windows.
* This function will test the converter to see whether such mapping is * This function will test the converter to see whether such mapping is
* required. You can sometimes avoid using this function by using the corr ect version * required. You can sometimes avoid using this function by using the corr ect version
skipping to change at line 1953 skipping to change at line 1957
* The first code unit (UChar) from the start of the stream will be U+FEFF * The first code unit (UChar) from the start of the stream will be U+FEFF
* (the Unicode BOM/signature character) and can usually be ignored. * (the Unicode BOM/signature character) and can usually be ignored.
* *
* For most Unicode charsets it is also possible to ignore the indicated * For most Unicode charsets it is also possible to ignore the indicated
* number of initial stream bytes and start converting after them. * number of initial stream bytes and start converting after them.
* However, there are stateful Unicode charsets (UTF-7 and BOCU-1) for whic h * However, there are stateful Unicode charsets (UTF-7 and BOCU-1) for whic h
* this will not work. Therefore, it is best to ignore the first output UCh ar * this will not work. Therefore, it is best to ignore the first output UCh ar
* instead of the input signature bytes. * instead of the input signature bytes.
* <p> * <p>
* Usage: * Usage:
* @code * \snippet samples/ucnv/convsamp.cpp ucnv_detectUnicodeSignature
* UErrorCode err = U_ZERO_ERROR;
* char input[] = { '\xEF','\xBB', '\xBF','\x41','\x42','\x43' };
* int32_t signatureLength = 0;
* char *encoding = ucnv_detectUnicodeSignature(input,sizeof(input),&s
ignatureLength,&err);
* UConverter *conv = NULL;
* UChar output[100];
* UChar *target = output, *out;
* char *source = input;
* if(encoding!=NULL && U_SUCCESS(err)){
* // should signature be discarded ?
* conv = ucnv_open(encoding, &err);
* // do the conversion
* ucnv_toUnicode(conv,
* target, output + sizeof(output)/U_SIZEOF_UCHAR,
* source, input + sizeof(input),
* NULL, TRUE, &err);
* out = output;
* if (discardSignature){
* ++out; // ignore initial U+FEFF
* }
* while(out != target) {
* printf("%04x ", *out++);
* }
* puts("");
* }
*
* @endcode
* *
* @param source The source string in which the signature should be detected. * @param source The source string in which the signature should be detected.
* @param sourceLength Length of the input string, or -1 if terminated with a NUL byte. * @param sourceLength Length of the input string, or -1 if terminated with a NUL byte.
* @param signatureLength A pointer to int32_t to receive the number of b ytes that make up the signature * @param signatureLength A pointer to int32_t to receive the number of b ytes that make up the signature
* of the detected UTF. 0 if not detected. * of the detected UTF. 0 if not detected.
* Can be a NULL pointer. * Can be a NULL pointer.
* @param pErrorCode ICU error code in/out parameter. * @param pErrorCode ICU error code in/out parameter.
* Must fulfill U_SUCCESS before the function call . * Must fulfill U_SUCCESS before the function call .
* @return The name of the encoding detected. NULL if encoding is not detec ted. * @return The name of the encoding detected. NULL if encoding is not detec ted.
* @stable ICU 2.4 * @stable ICU 2.4
skipping to change at line 2039 skipping to change at line 2016
* An example of this are converters that are of the type UCNV_SBCS or UCNV _DBCS. * An example of this are converters that are of the type UCNV_SBCS or UCNV _DBCS.
* Another example is UTF-32 which is always 4 bytes per character. * Another example is UTF-32 which is always 4 bytes per character.
* A Unicode code point may be represented by more than one UTF-8 or UTF-16 code unit * A Unicode code point may be represented by more than one UTF-8 or UTF-16 code unit
* but a UTF-32 converter encodes each code point with 4 bytes. * but a UTF-32 converter encodes each code point with 4 bytes.
* Note: This method is not intended to be used to determine whether the ch arset has a * Note: This method is not intended to be used to determine whether the ch arset has a
* fixed ratio of bytes to Unicode codes <i>units</i> for any particular Un icode encoding form. * fixed ratio of bytes to Unicode codes <i>units</i> for any particular Un icode encoding form.
* FALSE is returned with the UErrorCode if error occurs or cnv is NULL. * FALSE is returned with the UErrorCode if error occurs or cnv is NULL.
* @param cnv The converter to be tested * @param cnv The converter to be tested
* @param status ICU error code in/out paramter * @param status ICU error code in/out paramter
* @return TRUE if the converter is fixed-width * @return TRUE if the converter is fixed-width
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status); ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status);
#endif #endif
#endif #endif
/*_UCNV*/ /*_UCNV*/
 End of changes. 6 change blocks. 
31 lines changed or deleted 7 lines changed or added


 ucol.h   ucol.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (c) 1996-2011, International Business Machines Corporation and others. * Copyright (c) 1996-2012, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef UCOL_H #ifndef UCOL_H
#define UCOL_H #define UCOL_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_COLLATION #if !UCONFIG_NO_COLLATION
skipping to change at line 140 skipping to change at line 140
UCOL_ATTRIBUTE_VALUE_COUNT UCOL_ATTRIBUTE_VALUE_COUNT
} UColAttributeValue; } UColAttributeValue;
/** /**
* Enum containing the codes for reordering segments of the collation table that are not script * Enum containing the codes for reordering segments of the collation table that are not script
* codes. These reordering codes are to be used in conjunction with the scr ipt codes. * codes. These reordering codes are to be used in conjunction with the scr ipt codes.
* @see ucol_getReorderCodes * @see ucol_getReorderCodes
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see ucol_getEquivalentReorderCodes * @see ucol_getEquivalentReorderCodes
* @draft ICU 4.8 * @see UScriptCode
* @stable ICU 4.8
*/ */
typedef enum { typedef enum {
/** /**
* A special reordering code that is used to specify the default * A special reordering code that is used to specify the default
* reordering codes for a locale. * reordering codes for a locale.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_DEFAULT = -1, UCOL_REORDER_CODE_DEFAULT = -1,
/** /**
* A special reordering code that is used to specify no reordering codes . * A special reordering code that is used to specify no reordering codes .
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_NONE = USCRIPT_UNKNOWN, UCOL_REORDER_CODE_NONE = USCRIPT_UNKNOWN,
/** /**
* A special reordering code that is used to specify all other codes use d for * A special reordering code that is used to specify all other codes use d for
* reordering except for the codes lised as UColReorderCode values and t hose * reordering except for the codes lised as UColReorderCode values and t hose
* listed explicitly in a reordering. * listed explicitly in a reordering.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_OTHERS = USCRIPT_UNKNOWN, UCOL_REORDER_CODE_OTHERS = USCRIPT_UNKNOWN,
/** /**
* Characters with the space property. * Characters with the space property.
* @draft ICU 4.8 * This is equivalent to the rule value "space".
* @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_SPACE = 0x1000, UCOL_REORDER_CODE_SPACE = 0x1000,
/** /**
* The first entry in the enumeration of reordering groups. * The first entry in the enumeration of reordering groups. This is inte
* @draft ICU 4.8 nded for use in
* range checking and enumeration of the reorder codes.
* @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_FIRST = UCOL_REORDER_CODE_SPACE, UCOL_REORDER_CODE_FIRST = UCOL_REORDER_CODE_SPACE,
/** /**
* Characters with the punctuation property. * Characters with the punctuation property.
* @draft ICU 4.8 * This is equivalent to the rule value "punct".
* @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_PUNCTUATION = 0x1001, UCOL_REORDER_CODE_PUNCTUATION = 0x1001,
/** /**
* Characters with the symbol property. * Characters with the symbol property.
* @draft ICU 4.8 * This is equivalent to the rule value "symbol".
* @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_SYMBOL = 0x1002, UCOL_REORDER_CODE_SYMBOL = 0x1002,
/** /**
* Characters with the currency property. * Characters with the currency property.
* @draft ICU 4.8 * This is equivalent to the rule value "currency".
* @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_CURRENCY = 0x1003, UCOL_REORDER_CODE_CURRENCY = 0x1003,
/** /**
* Characters with the digit property. * Characters with the digit property.
* @draft ICU 4.8 * This is equivalent to the rule value "digit".
* @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_DIGIT = 0x1004, UCOL_REORDER_CODE_DIGIT = 0x1004,
/** /**
* The limit of the reorder codes. * The limit of the reorder codes. This is intended for use in range che
* @draft ICU 4.8 cking
* and enumeration of the reorder codes.
* @stable ICU 4.8
*/ */
UCOL_REORDER_CODE_LIMIT = 0x1005 UCOL_REORDER_CODE_LIMIT = 0x1005
} UColReorderCode; } UColReorderCode;
/** /**
* Base letter represents a primary difference. Set comparison * Base letter represents a primary difference. Set comparison
* level to UCOL_PRIMARY to ignore secondary and tertiary differences. * level to UCOL_PRIMARY to ignore secondary and tertiary differences.
* Use this to set the strength of a Collator object. * Use this to set the strength of a Collator object.
* Example of primary difference, "abc" &lt; "abd" * Example of primary difference, "abc" &lt; "abd"
* *
skipping to change at line 399 skipping to change at line 407
* @see ucol_normalizeShortDefinitionString * @see ucol_normalizeShortDefinitionString
* @stable ICU 3.0 * @stable ICU 3.0
* *
*/ */
U_STABLE UCollator* U_EXPORT2 U_STABLE UCollator* U_EXPORT2
ucol_openFromShortString( const char *definition, ucol_openFromShortString( const char *definition,
UBool forceDefaults, UBool forceDefaults,
UParseError *parseError, UParseError *parseError,
UErrorCode *status); UErrorCode *status);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Get a set containing the contractions defined by the collator. The set i ncludes * Get a set containing the contractions defined by the collator. The set i ncludes
* both the UCA contractions and the contractions defined by the collator. This set * both the UCA contractions and the contractions defined by the collator. This set
* will contain only strings. If a tailoring explicitly suppresses contract ions from * will contain only strings. If a tailoring explicitly suppresses contract ions from
* the UCA (like Russian), removed contractions will not be in the resultin g set. * the UCA (like Russian), removed contractions will not be in the resultin g set.
* @param coll collator * @param coll collator
* @param conts the set to hold the result. It gets emptied before * @param conts the set to hold the result. It gets emptied before
* contractions are added. * contractions are added.
* @param status to hold the error code * @param status to hold the error code
* @return the size of the contraction set * @return the size of the contraction set
* *
* @deprecated ICU 3.4, use ucol_getContractionsAndExpansions instead * @deprecated ICU 3.4, use ucol_getContractionsAndExpansions instead
*/ */
U_DEPRECATED int32_t U_EXPORT2 U_DEPRECATED int32_t U_EXPORT2
ucol_getContractions( const UCollator *coll, ucol_getContractions( const UCollator *coll,
USet *conts, USet *conts,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Get a set containing the expansions defined by the collator. The set inc ludes * Get a set containing the expansions defined by the collator. The set inc ludes
* both the UCA expansions and the expansions defined by the tailoring * both the UCA expansions and the expansions defined by the tailoring
* @param coll collator * @param coll collator
* @param contractions if not NULL, the set to hold the contractions * @param contractions if not NULL, the set to hold the contractions
* @param expansions if not NULL, the set to hold the expansions * @param expansions if not NULL, the set to hold the expansions
* @param addPrefixes add the prefix contextual elements to contractions * @param addPrefixes add the prefix contextual elements to contractions
* @param status to hold the error code * @param status to hold the error code
* *
skipping to change at line 599 skipping to change at line 609
* These reordering codes are a combination of UScript codes and UColReorde rCode entries. * These reordering codes are a combination of UScript codes and UColReorde rCode entries.
* @param coll The UCollator to query. * @param coll The UCollator to query.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
* @param destCapacity The length of dest. If it is 0, then dest may be NUL L and the function * @param destCapacity The length of dest. If it is 0, then dest may be NUL L and the function
* will only return the length of the result without writing any of the res ult string (pre-flighting). * will only return the length of the result without writing any of the res ult string (pre-flighting).
* @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a
* failure before the function call. * failure before the function call.
* @return The number of reordering codes written to the dest array. * @return The number of reordering codes written to the dest array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see ucol_getEquivalentReorderCodes * @see ucol_getEquivalentReorderCodes
* @draft ICU 4.8 * @see UScriptCode
* @see UColReorderCode
* @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
ucol_getReorderCodes(const UCollator* coll, ucol_getReorderCodes(const UCollator* coll,
int32_t* dest, int32_t* dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Sets the reordering codes for this collator. * Sets the reordering codes for this collator.
* Collation reordering allows scripts and some other defined blocks of cha racters * Collation reordering allows scripts and some other defined blocks of cha racters
* to be moved relative to each other as a block. This reordering is done o n top of * to be moved relative to each other as a block. This reordering is done o n top of
skipping to change at line 627 skipping to change at line 639
* these special non-script blocks if those special blocks are explicitly s pecified in the reordering. * these special non-script blocks if those special blocks are explicitly s pecified in the reordering.
* <p>The special code OTHERS stands for any script that is not explicitly * <p>The special code OTHERS stands for any script that is not explicitly
* mentioned in the list of reordering codes given. Anything that is after OTHERS * mentioned in the list of reordering codes given. Anything that is after OTHERS
* will go at the very end of the reordering in the order given. * will go at the very end of the reordering in the order given.
* <p>The special reorder code DEFAULT will reset the reordering for this c ollator * <p>The special reorder code DEFAULT will reset the reordering for this c ollator
* to the default for this collator. The default reordering may be the DUCE T/CLDR order or may be a reordering that * to the default for this collator. The default reordering may be the DUCE T/CLDR order or may be a reordering that
* was specified when this collator was created from resource data or from rules. The * was specified when this collator was created from resource data or from rules. The
* DEFAULT code <b>must</b> be the sole code supplied when it used. If not * DEFAULT code <b>must</b> be the sole code supplied when it used. If not
* that will result in an U_ILLEGAL_ARGUMENT_ERROR being set. * that will result in an U_ILLEGAL_ARGUMENT_ERROR being set.
* <p>The special reorder code NONE will remove any reordering for this col lator. * <p>The special reorder code NONE will remove any reordering for this col lator.
* The result of setting no reordering will be to have the DUCET/CLDR reord ering used. The * The result of setting no reordering will be to have the DUCET/CLDR order ing used. The
* NONE code <b>must</b> be the sole code supplied when it used. * NONE code <b>must</b> be the sole code supplied when it used.
* @param coll The UCollator to set. * @param coll The UCollator to set.
* @param reorderCodes An array of script codes in the new order. This can be NULL if the * @param reorderCodes An array of script codes in the new order. This can be NULL if the
* length is also set to 0. An empty array will clear any reordering codes on the collator. * length is also set to 0. An empty array will clear any reordering codes on the collator.
* @param reorderCodesLength The length of reorderCodes. * @param reorderCodesLength The length of reorderCodes.
* @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a
* failure before the function call. * failure before the function call.
* @see ucol_getReorderCodes * @see ucol_getReorderCodes
* @see ucol_getEquivalentReorderCodes * @see ucol_getEquivalentReorderCodes
* @draft ICU 4.8 * @see UScriptCode
* @see UColReorderCode
* @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
ucol_setReorderCodes(UCollator* coll, ucol_setReorderCodes(UCollator* coll,
const int32_t* reorderCodes, const int32_t* reorderCodes,
int32_t reorderCodesLength, int32_t reorderCodesLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Retrieves the reorder codes that are grouped with the given reorder code . Some reorder * Retrieves the reorder codes that are grouped with the given reorder code . Some reorder
* codes will be grouped and must reorder together. * codes will be grouped and must reorder together.
* @param reorderCode The reorder code to determine equivalence for. * @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
* @param destCapacity The length of dest. If it is 0, then dest may be NUL L and the function * @param destCapacity The length of dest. If it is 0, then dest may be NUL L and the function
* will only return the length of the result without writing any of the res ult string (pre-flighting). * will only return the length of the result without writing any of the res ult string (pre-flighting).
* @param pErrorCode Must be a valid pointer to an error code value, which must not indicate * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate
* a failure before the function call. * a failure before the function call.
* @return The number of reordering codes written to the dest array. * @return The number of reordering codes written to the dest array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see ucol_getReorderCodes * @see ucol_getReorderCodes
* @draft ICU 4.8 * @see UScriptCode
* @see UColReorderCode
* @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
ucol_getEquivalentReorderCodes(int32_t reorderCode, ucol_getEquivalentReorderCodes(int32_t reorderCode,
int32_t* dest, int32_t* dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Get the display name for a UCollator. * Get the display name for a UCollator.
* The display name is suitable for presentation to a user. * The display name is suitable for presentation to a user.
skipping to change at line 1143 skipping to change at line 1159
*/ */
U_STABLE UCollator* U_EXPORT2 U_STABLE UCollator* U_EXPORT2
ucol_safeClone(const UCollator *coll, ucol_safeClone(const UCollator *coll,
void *stackBuffer, void *stackBuffer,
int32_t *pBufferSize, int32_t *pBufferSize,
UErrorCode *status); UErrorCode *status);
/** default memory size for the new clone. It needs to be this large for os /400 large pointers /** default memory size for the new clone. It needs to be this large for os /400 large pointers
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#define U_COL_SAFECLONE_BUFFERSIZE 512 #define U_COL_SAFECLONE_BUFFERSIZE 528
/** /**
* Returns current rules. Delta defines whether full rules are returned or just the tailoring. * Returns current rules. Delta defines whether full rules are returned or just the tailoring.
* Returns number of UChars needed to store rules. If buffer is NULL or buf ferLen is not enough * Returns number of UChars needed to store rules. If buffer is NULL or buf ferLen is not enough
* to store rules, will store up to available space. * to store rules, will store up to available space.
* @param coll collator to get the rules from * @param coll collator to get the rules from
* @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES.
* @param buffer buffer to store the result in. If NULL, you'll get no rule s. * @param buffer buffer to store the result in. If NULL, you'll get no rule s.
* @param bufferLen lenght of buffer to store rules in. If less then needed you'll get only the part that fits in. * @param bufferLen lenght of buffer to store rules in. If less then needed you'll get only the part that fits in.
* @return current rules * @return current rules
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen); ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* gets the locale name of the collator. If the collator * gets the locale name of the collator. If the collator
* is instantiated from the rules, then this function returns * is instantiated from the rules, then this function returns
* NULL. * NULL.
* @param coll The UCollator for which the locale is needed * @param coll The UCollator for which the locale is needed
* @param type You can choose between requested, valid and actual * @param type You can choose between requested, valid and actual
* locale. For description see the definition of * locale. For description see the definition of
* ULocDataLocaleType in uloc.h * ULocDataLocaleType in uloc.h
* @param status error code of the operation * @param status error code of the operation
* @return real locale name from which the collation data comes. * @return real locale name from which the collation data comes.
* If the collator was instantiated from rules, returns * If the collator was instantiated from rules, returns
* NULL. * NULL.
* @deprecated ICU 2.8 Use ucol_getLocaleByType instead * @deprecated ICU 2.8 Use ucol_getLocaleByType instead
*/ */
U_DEPRECATED const char * U_EXPORT2 U_DEPRECATED const char * U_EXPORT2
ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode * status); ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode * status);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* gets the locale name of the collator. If the collator * gets the locale name of the collator. If the collator
* is instantiated from the rules, then this function returns * is instantiated from the rules, then this function returns
* NULL. * NULL.
* @param coll The UCollator for which the locale is needed * @param coll The UCollator for which the locale is needed
* @param type You can choose between requested, valid and actual * @param type You can choose between requested, valid and actual
* locale. For description see the definition of * locale. For description see the definition of
* ULocDataLocaleType in uloc.h * ULocDataLocaleType in uloc.h
* @param status error code of the operation * @param status error code of the operation
skipping to change at line 1206 skipping to change at line 1224
* @param coll The UCollator for which we want to get tailored chars * @param coll The UCollator for which we want to get tailored chars
* @param status error code of the operation * @param status error code of the operation
* @return a pointer to newly created USet. Must be be disposed by using us et_close * @return a pointer to newly created USet. Must be be disposed by using us et_close
* @see ucol_openRules * @see ucol_openRules
* @see uset_close * @see uset_close
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
U_STABLE USet * U_EXPORT2 U_STABLE USet * U_EXPORT2
ucol_getTailoredSet(const UCollator *coll, UErrorCode *status); ucol_getTailoredSet(const UCollator *coll, UErrorCode *status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Universal attribute getter that returns UCOL_DEFAULT if the value is def ault * Universal attribute getter that returns UCOL_DEFAULT if the value is def ault
* @param coll collator which attributes are to be changed * @param coll collator which attributes are to be changed
* @param attr attribute type * @param attr attribute type
* @return attribute value or UCOL_DEFAULT if the value is default * @return attribute value or UCOL_DEFAULT if the value is default
* @param status to indicate whether the operation went on smoothly or ther e were errors * @param status to indicate whether the operation went on smoothly or ther e were errors
* @see UColAttribute * @see UColAttribute
* @see UColAttributeValue * @see UColAttributeValue
* @see ucol_setAttribute * @see ucol_setAttribute
* @internal ICU 3.0 * @internal ICU 3.0
skipping to change at line 1278 skipping to change at line 1297
* API will return an error if an invalid attribute or at tribute/value * API will return an error if an invalid attribute or at tribute/value
* combination is specified. * combination is specified.
* @see ucol_openFromShortString * @see ucol_openFromShortString
* @internal ICU 3.2.1 * @internal ICU 3.2.1
*/ */
U_INTERNAL void U_EXPORT2 U_INTERNAL void U_EXPORT2
ucol_prepareShortStringOpen( const char *definition, ucol_prepareShortStringOpen( const char *definition,
UBool forceDefaults, UBool forceDefaults,
UParseError *parseError, UParseError *parseError,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
/** Creates a binary image of a collator. This binary image can be stored a nd /** Creates a binary image of a collator. This binary image can be stored a nd
* later used to instantiate a collator using ucol_openBinary. * later used to instantiate a collator using ucol_openBinary.
* This API supports preflighting. * This API supports preflighting.
* @param coll Collator * @param coll Collator
* @param buffer a fill-in buffer to receive the binary image * @param buffer a fill-in buffer to receive the binary image
* @param capacity capacity of the destination buffer * @param capacity capacity of the destination buffer
* @param status for catching errors * @param status for catching errors
* @return size of the image * @return size of the image
* @see ucol_openBinary * @see ucol_openBinary
 End of changes. 23 change blocks. 
19 lines changed or deleted 41 lines changed or added


 ucoleitr.h   ucoleitr.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2001-2009, International Business Machines * Copyright (C) 2001-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* File ucoleitr.cpp * File ucoleitr.cpp
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/15/2001 synwee Modified all methods to process its own function * 02/15/2001 synwee Modified all methods to process its own function
* instead of calling the equivalent c++ api (coleit r.h) * instead of calling the equivalent c++ api (coleit r.h)
skipping to change at line 30 skipping to change at line 30
#if !UCONFIG_NO_COLLATION #if !UCONFIG_NO_COLLATION
/** /**
* This indicates an error has occured during processing or if no more CEs is * This indicates an error has occured during processing or if no more CEs is
* to be returned. * to be returned.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#define UCOL_NULLORDER ((int32_t)0xFFFFFFFF) #define UCOL_NULLORDER ((int32_t)0xFFFFFFFF)
#ifndef U_HIDE_INTERNAL_API
/** /**
* This indicates an error has occured during processing or there are no mo re CEs * This indicates an error has occured during processing or there are no mo re CEs
* to be returned. * to be returned.
* *
* @internal * @internal
*/ */
#define UCOL_PROCESSED_NULLORDER ((int64_t)U_INT64_MAX) #define UCOL_PROCESSED_NULLORDER ((int64_t)U_INT64_MAX)
#endif /* U_HIDE_INTERNAL_API */
#include "unicode/ucol.h" #include "unicode/ucol.h"
/** /**
* The UCollationElements struct. * The UCollationElements struct.
* For usage in C programs. * For usage in C programs.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef struct UCollationElements UCollationElements; typedef struct UCollationElements UCollationElements;
skipping to change at line 155 skipping to change at line 157
* This will move the 'cursor' to the beginning of the text. * This will move the 'cursor' to the beginning of the text.
* Property settings for collation will be reset to the current status. * Property settings for collation will be reset to the current status.
* @param elems The UCollationElements to reset. * @param elems The UCollationElements to reset.
* @see ucol_next * @see ucol_next
* @see ucol_previous * @see ucol_previous
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ucol_reset(UCollationElements *elems); ucol_reset(UCollationElements *elems);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Set the collation elements to use implicit ordering for Han * Set the collation elements to use implicit ordering for Han
* even if they've been tailored. This will also force Hangul * even if they've been tailored. This will also force Hangul
* syllables to be ordered by decomposing them to their component * syllables to be ordered by decomposing them to their component
* Jamo. * Jamo.
* *
* @param elems The UCollationElements containing the text. * @param elems The UCollationElements containing the text.
* @param status A pointer to a UErrorCode to reveive any errors. * @param status A pointer to a UErrorCode to reveive any errors.
* *
* @internal * @internal
*/ */
U_INTERNAL void U_EXPORT2 U_INTERNAL void U_EXPORT2
ucol_forceHanImplicit(UCollationElements *elems, UErrorCode *status); ucol_forceHanImplicit(UCollationElements *elems, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Get the ordering priority of the next collation element in the text. * Get the ordering priority of the next collation element in the text.
* A single character may contain more than one collation element. * A single character may contain more than one collation element.
* @param elems The UCollationElements containing the text. * @param elems The UCollationElements containing the text.
* @param status A pointer to an UErrorCode to receive any errors. * @param status A pointer to an UErrorCode to receive any errors.
* @return The next collation elements ordering, otherwise returns NULLORDE R * @return The next collation elements ordering, otherwise returns NULLORDE R
* if an error has occured or if the end of string has been reached * if an error has occured or if the end of string has been reached
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 200 skipping to change at line 204
* a U_BUFFER_OVERFLOW_ERROR is returned if the internal stac k * a U_BUFFER_OVERFLOW_ERROR is returned if the internal stac k
* buffer has been exhausted. * buffer has been exhausted.
* @return The previous collation elements ordering, otherwise returns * @return The previous collation elements ordering, otherwise returns
* NULLORDER if an error has occured or if the start of string has * NULLORDER if an error has occured or if the start of string has
* been reached. * been reached.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucol_previous(UCollationElements *elems, UErrorCode *status); ucol_previous(UCollationElements *elems, UErrorCode *status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Get the processed ordering priority of the next collation element in the text. * Get the processed ordering priority of the next collation element in the text.
* A single character may contain more than one collation element. * A single character may contain more than one collation element.
* *
* @param elems The UCollationElements containing the text. * @param elems The UCollationElements containing the text.
* @param ixLow a pointer to an int32_t to receive the iterator index befor e fetching the CE. * @param ixLow a pointer to an int32_t to receive the iterator index befor e fetching the CE.
* @param ixHigh a pointer to an int32_t to receive the iterator index afte r fetching the CE. * @param ixHigh a pointer to an int32_t to receive the iterator index afte r fetching the CE.
* @param status A pointer to an UErrorCode to receive any errors. * @param status A pointer to an UErrorCode to receive any errors.
* @return The next collation elements ordering, otherwise returns UCOL_PRO CESSED_NULLORDER * @return The next collation elements ordering, otherwise returns UCOL_PRO CESSED_NULLORDER
* if an error has occured or if the end of string has been reached * if an error has occured or if the end of string has been reached
skipping to change at line 238 skipping to change at line 243
* a U_BUFFER_OVERFLOW_ERROR is returned if the internal stac k * a U_BUFFER_OVERFLOW_ERROR is returned if the internal stac k
* buffer has been exhausted. * buffer has been exhausted.
* @return The previous collation elements ordering, otherwise returns * @return The previous collation elements ordering, otherwise returns
* UCOL_PROCESSED_NULLORDER if an error has occured or if the start of * UCOL_PROCESSED_NULLORDER if an error has occured or if the start of
* string has been reached. * string has been reached.
* *
* @internal * @internal
*/ */
U_INTERNAL int64_t U_EXPORT2 U_INTERNAL int64_t U_EXPORT2
ucol_previousProcessed(UCollationElements *elems, int32_t *ixLow, int32_t * ixHigh, UErrorCode *status); ucol_previousProcessed(UCollationElements *elems, int32_t *ixLow, int32_t * ixHigh, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Get the maximum length of any expansion sequences that end with the * Get the maximum length of any expansion sequences that end with the
* specified comparison order. * specified comparison order.
* This is useful for .... ? * This is useful for .... ?
* @param elems The UCollationElements containing the text. * @param elems The UCollationElements containing the text.
* @param order A collation order returned by previous or next. * @param order A collation order returned by previous or next.
* @return maximum size of the expansion sequences ending with the collatio n * @return maximum size of the expansion sequences ending with the collatio n
* element or 1 if collation element does not occur at the end of a ny * element or 1 if collation element does not occur at the end of a ny
* expansion sequence * expansion sequence
 End of changes. 7 change blocks. 
1 lines changed or deleted 7 lines changed or added


 uconfig.h   uconfig.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2002-2011, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* file name: uconfig.h * file name: uconfig.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2002sep19 * created on: 2002sep19
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
#ifndef __UCONFIG_H__ #ifndef __UCONFIG_H__
#define __UCONFIG_H__ #define __UCONFIG_H__
/*! /*!
* \file * \file
* \brief Switches for excluding parts of ICU library code modules. * \brief User-configurable settings
* *
* Allows to build partial, smaller libraries for special purposes. * Miscellaneous switches:
*
* A number of macros affect a variety of minor aspects of ICU.
* Most of them used to be defined elsewhere (e.g., in utypes.h or platform
.h)
* and moved here to make them easier to find.
*
* Switches for excluding parts of ICU library code modules:
*
* Changing these macros allows building partial, smaller libraries for spe
cial purposes.
* By default, all modules are built. * By default, all modules are built.
* The switches are fairly coarse, controlling large modules. * The switches are fairly coarse, controlling large modules.
* Basic services cannot be turned off. * Basic services cannot be turned off.
* *
* Building with any of these options does not guarantee that the * Building with any of these options does not guarantee that the
* ICU build process will completely work. It is recommended that * ICU build process will completely work. It is recommended that
* the ICU libraries and data be built using the normal build. * the ICU libraries and data be built using the normal build.
* At that time you should remove the data used by those services. * At that time you should remove the data used by those services.
* After building the ICU data library, you should rebuild the ICU * After building the ICU data library, you should rebuild the ICU
* libraries with these switches customized to your needs. * libraries with these switches customized to your needs.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
/** /**
* If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h" * If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h"
* prior to determining default settings for uconfig variables. * prior to determining default settings for uconfig variables.
* *
* @internal ICU 4.0 * @internal ICU 4.0
*
*/ */
#if defined(UCONFIG_USE_LOCAL) #if defined(UCONFIG_USE_LOCAL)
#include "uconfig_local.h" #include "uconfig_local.h"
#endif #endif
/** /**
* \def U_DEBUG
* Determines whether to include debugging code.
* Automatically set on Windows, but most compilers do not have
* related predefined macros.
* @internal
*/
#ifdef U_DEBUG
/* Use the predefined value. */
#elif defined(_DEBUG)
/*
* _DEBUG is defined by Visual Studio debug compilation.
* Do *not* test for its NDEBUG macro: It is an orthogonal macro
* which disables assert().
*/
# define U_DEBUG 1
# else
# define U_DEBUG 0
#endif
/**
* Determines wheter to enable auto cleanup of libraries.
* @internal
*/
#ifndef UCLN_NO_AUTO_CLEANUP
#define UCLN_NO_AUTO_CLEANUP 1
#endif
/**
* \def ICU_USE_THREADS
*
* Allows thread support (use of mutexes) to be compiled out of ICU.
* Default: use threads.
*
* Even with thread support compiled out, applications may override the
* (empty) mutex implementation with the u_setMutexFunctions() functions.
* @internal
*/
#ifdef ICU_USE_THREADS
/* Use the predefined value. */
#elif defined(APP_NO_THREADS)
/* APP_NO_THREADS is an old symbol. We'll honour it if present. */
# define ICU_USE_THREADS 0
#else
# define ICU_USE_THREADS 1
#endif
/**
* \def U_DISABLE_RENAMING
* Determines whether to disable renaming or not.
* @internal
*/
#ifndef U_DISABLE_RENAMING
#define U_DISABLE_RENAMING 0
#endif
/**
* \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS
* Determines whether utypes.h includes utf.h, utf8.h, utf16.h and utf_old.
h.
* utypes.h includes those headers if this macro is defined to 0.
* Otherwise, each those headers must be included explicitly when using one
of their macros.
* Defaults to 0 for backward compatibility, except inside ICU.
* @draft ICU 49
*/
#ifdef U_NO_DEFAULT_INCLUDE_UTF_HEADERS
/* Use the predefined value. */
#elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION
) || defined(U_I18N_IMPLEMENTATION) || \
defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || d
efined(U_LAYOUTEX_IMPLEMENTATION) || \
defined(U_TOOLUTIL_IMPLEMENTATION)
# define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 1
#else
# define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 0
#endif
/**
* \def U_OVERRIDE_CXX_ALLOCATION
* Determines whether to override new and delete.
* ICU is normally built such that all of its C++ classes, via their UMemor
y base,
* override operators new and delete to use its internal, customizable,
* non-exception-throwing memory allocation functions. (Default value 1 for
this macro.)
*
* This is especially important when the application and its libraries use
multiple heaps.
* For example, on Windows, this allows the ICU DLL to be used by
* applications that statically link the C Runtime library.
*
* @stable ICU 2.2
*/
#ifndef U_OVERRIDE_CXX_ALLOCATION
#define U_OVERRIDE_CXX_ALLOCATION 1
#endif
/**
* \def U_ENABLE_TRACING
* Determines whether to enable tracing.
* @internal
*/
#ifndef U_ENABLE_TRACING
#define U_ENABLE_TRACING 0
#endif
/**
* \def U_ENABLE_DYLOAD
* Whether to enable Dynamic loading in ICU.
* @internal
*/
#ifndef U_ENABLE_DYLOAD
#define U_ENABLE_DYLOAD 1
#endif
/**
* \def U_CHECK_DYLOAD
* Whether to test Dynamic loading as an OS capability.
* @internal
*/
#ifndef U_CHECK_DYLOAD
#define U_CHECK_DYLOAD 1
#endif
/**
* \def U_DEFAULT_SHOW_DRAFT
* Do we allow ICU users to use the draft APIs by default?
* @internal
*/
#ifndef U_DEFAULT_SHOW_DRAFT
#define U_DEFAULT_SHOW_DRAFT 1
#endif
/*=========================================================================
==*/
/* Custom icu entry point renaming
*/
/*=========================================================================
==*/
/**
* \def U_HAVE_LIB_SUFFIX
* 1 if a custom library suffix is set.
* @internal
*/
#ifdef U_HAVE_LIB_SUFFIX
/* Use the predefined value. */
#elif defined(U_LIB_SUFFIX_C_NAME)
# define U_HAVE_LIB_SUFFIX 1
#endif
/**
* \def U_LIB_SUFFIX_C_NAME_STRING
* Defines the library suffix as a string with C syntax.
* @internal
*/
#ifdef U_LIB_SUFFIX_C_NAME_STRING
/* Use the predefined value. */
#elif defined(U_LIB_SUFFIX_C_NAME)
# define U_LIB_SUFFIX_C_NAME_STRING #U_LIB_SUFFIX_C_NAME
#else
# define U_LIB_SUFFIX_C_NAME_STRING ""
#endif
/* common/i18n library switches -------------------------------------------
-- */
/**
* \def UCONFIG_ONLY_COLLATION * \def UCONFIG_ONLY_COLLATION
* This switch turns off modules that are not needed for collation. * This switch turns off modules that are not needed for collation.
* *
* It does not turn off legacy conversion because that is necessary * It does not turn off legacy conversion because that is necessary
* for ICU to work on EBCDIC platforms (for the default converter). * for ICU to work on EBCDIC platforms (for the default converter).
* If you want "only collation" and do not build for EBCDIC, * If you want "only collation" and do not build for EBCDIC,
* then you can define UCONFIG_NO_LEGACY_CONVERSION 1 as well. * then you can define UCONFIG_NO_LEGACY_CONVERSION 1 as well.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
skipping to change at line 183 skipping to change at line 347
*/ */
#ifndef UCONFIG_NO_IDNA #ifndef UCONFIG_NO_IDNA
# define UCONFIG_NO_IDNA 0 # define UCONFIG_NO_IDNA 0
#endif #endif
/** /**
* \def UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE * \def UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
* Determines the default UMessagePatternApostropheMode. * Determines the default UMessagePatternApostropheMode.
* See the documentation for that enum. * See the documentation for that enum.
* *
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#ifndef UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE #ifndef UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
# define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE UMSGPAT_APOS_DOUBLE_OPTIO NAL # define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE UMSGPAT_APOS_DOUBLE_OPTIO NAL
#endif #endif
/* i18n library switches -------------------------------------------------- -- */ /* i18n library switches -------------------------------------------------- -- */
/** /**
* \def UCONFIG_NO_COLLATION * \def UCONFIG_NO_COLLATION
* This switch turns off collation and collation-based string search. * This switch turns off collation and collation-based string search.
 End of changes. 6 change blocks. 
5 lines changed or deleted 182 lines changed or added


 ucurr.h   ucurr.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (c) 2002-2011, International Business Machines * Copyright (c) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
*/ */
#ifndef _UCURR_H_ #ifndef _UCURR_H_
#define _UCURR_H_ #define _UCURR_H_
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uenum.h" #include "unicode/uenum.h"
/** /**
skipping to change at line 270 skipping to change at line 270
* *
* @param to * @param to
* The upper bound of the date range, inclusive. When 'to' is U _DATE_MAX, check the availability of * The upper bound of the date range, inclusive. When 'to' is U _DATE_MAX, check the availability of
* the currency any date after 'from' * the currency any date after 'from'
* *
* @param errorCode * @param errorCode
* ICU error code * ICU error code
* *
* @return TRUE if the given ISO 4217 3-letter code is supported on the sp ecified date range. * @return TRUE if the given ISO 4217 3-letter code is supported on the sp ecified date range.
* *
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
ucurr_isAvailable(const UChar* isoCode, ucurr_isAvailable(const UChar* isoCode,
UDate from, UDate from,
UDate to, UDate to,
UErrorCode* errorCode); UErrorCode* errorCode);
/** /**
* Finds the number of valid currency codes for the * Finds the number of valid currency codes for the
* given locale and date. * given locale and date.
skipping to change at line 346 skipping to change at line 346
* @param status error status * @param status error status
* @return a string enumeration over keyword values for the given key and t he locale. * @return a string enumeration over keyword values for the given key and t he locale.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE UEnumeration* U_EXPORT2 U_STABLE UEnumeration* U_EXPORT2
ucurr_getKeywordValuesForLocale(const char* key, ucurr_getKeywordValuesForLocale(const char* key,
const char* locale, const char* locale,
UBool commonlyUsed, UBool commonlyUsed,
UErrorCode* status); UErrorCode* status);
#ifndef U_HIDE_DRAFT_API
/**
* Returns the ISO 4217 numeric code for the currency.
* <p>Note: If the ISO 4217 numeric code is not assigned for the currency o
r
* the currency is unknown, this function returns 0.
*
* @param currency null-terminated 3-letter ISO 4217 code
* @return The ISO 4217 numeric code of the currency
* @draft ICU 49
*/
U_DRAFT int32_t U_EXPORT2
ucurr_getNumericCode(const UChar* currency);
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 3 change blocks. 
2 lines changed or deleted 17 lines changed or added


 udat.h   udat.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 1996-2010, International Business Machines * Copyright (C) 1996-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
************************************************************************** ***** ************************************************************************** *****
*/ */
#ifndef UDAT_H #ifndef UDAT_H
#define UDAT_H #define UDAT_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
skipping to change at line 174 skipping to change at line 174
UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE, UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE,
/** No style */ /** No style */
UDAT_NONE = -1, UDAT_NONE = -1,
/** for internal API use only */ /** for internal API use only */
UDAT_IGNORE = -2 UDAT_IGNORE = -2
} UDateFormatStyle; } UDateFormatStyle;
/* Cannot use #ifndef U_HIDE_DRAFT_API for UDateFormatContextType and UDate
FormatContextValue
* since a SimpleDateFormat virtual method & data member depends on them */
/** Date format context types
* @draft ICU 49
*/
typedef enum UDateFormatContextType {
/**
* Type (key) for specifying the capitalization context for which a dat
e
* is to be formatted (possible values are in UDateFormatContextValue).
* @draft ICU 49
*/
UDAT_CAPITALIZATION = 1
} UDateFormatContextType;
/** Values for date format context types
* @draft ICU 49
*/
typedef enum UDateFormatContextValue {
/** Values for any UDateFormatContextType (key) */
/**
* Value for any UDateFormatContextType (such as UDAT_CAPITALIZATION) i
f the
* relevant context to be used in formatting a date is unknown (this is
the
* default value for any UDateFormatContextType when no value has been
* explicitly specified for that UDateFormatContextType).
* @draft ICU 49
*/
UDAT_CONTEXT_UNKNOWN = 0,
#if !UCONFIG_NO_BREAK_ITERATION
/** Values for type (key) UDAT_CAPITALIZATION */
/**
* UDAT_CAPITALIZATION value if a date (or date symbol) is to be format
ted
* with capitalization appropriate for the middle of a sentence.
* @draft ICU 49
*/
UDAT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = 1,
/**
* UDAT_CAPITALIZATION value if a date (or date symbol) is to be format
ted
* with capitalization appropriate for the beginning of a sentence.
* @draft ICU 49
*/
UDAT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = 2,
/**
* UDAT_CAPITALIZATION value if a date (or date symbol) is to be format
ted
* with capitalization appropriate for a user-interface list or menu it
em.
* @draft ICU 49
*/
UDAT_CAPITALIZATION_FOR_UI_LIST_OR_MENU = 3,
/**
* UDAT_CAPITALIZATION value if a date (or date symbol) is to be format
ted
* with capitalization appropriate for stand-alone usage such as an
* isolated name on a calendar page.
* @draft ICU 49
*/
UDAT_CAPITALIZATION_FOR_STANDALONE = 4
#endif
} UDateFormatContextValue;
/** /**
* @{ * @{
* Below are a set of pre-defined skeletons. * Below are a set of pre-defined skeletons.
* *
* <P> * <P>
* A skeleton * A skeleton
* <ol> * <ol>
* <li> * <li>
* only keeps the field pattern letter and ignores all other parts * only keeps the field pattern letter and ignores all other parts
* in a pattern, such as space, punctuations, and string literals. * in a pattern, such as space, punctuations, and string literals.
skipping to change at line 484 skipping to change at line 541
*/ */
UDAT_STANDALONE_QUARTER_FIELD = 28, UDAT_STANDALONE_QUARTER_FIELD = 28,
/** /**
* FieldPosition and UFieldPosition selector for 'V' field alignment, * FieldPosition and UFieldPosition selector for 'V' field alignment,
* corresponding to the UCAL_ZONE_OFFSET field. * corresponding to the UCAL_ZONE_OFFSET field.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
UDAT_TIMEZONE_SPECIAL_FIELD = 29, UDAT_TIMEZONE_SPECIAL_FIELD = 29,
/**
* FieldPosition selector for "U" field alignment,
* corresponding to cyclic year names. This is implemented
* using the {@link #UCAL_YEAR} field. This displays
* the cyclic year name, if available.
* @draft ICU 49
*/
UDAT_YEAR_NAME_FIELD = 30,
/** /**
* Number of FieldPosition and UFieldPosition selectors for * Number of FieldPosition and UFieldPosition selectors for
* DateFormat and UDateFormat. * DateFormat and UDateFormat.
* Valid selectors range from 0 to UDAT_FIELD_COUNT-1. * Valid selectors range from 0 to UDAT_FIELD_COUNT-1.
* This value is subject to change if new fields are defined * This value is subject to change if new fields are defined
* in the future. * in the future.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UDAT_FIELD_COUNT = 30 UDAT_FIELD_COUNT = 31
} UDateFormatField; } UDateFormatField;
/** /**
* Maps from a UDateFormatField to the corresponding UCalendarDateFields. * Maps from a UDateFormatField to the corresponding UCalendarDateFields.
* Note: since the mapping is many-to-one, there is no inverse mapping. * Note: since the mapping is many-to-one, there is no inverse mapping.
* @param field the UDateFormatField. * @param field the UDateFormatField.
* @return the UCalendarDateField. This will be UCAL_FIELD_COUNT in case * @return the UCalendarDateField. This will be UCAL_FIELD_COUNT in case
* of error (e.g., the input field is UDAT_FIELD_COUNT). * of error (e.g., the input field is UDAT_FIELD_COUNT).
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
U_STABLE UCalendarDateFields U_EXPORT2 U_STABLE UCalendarDateFields U_EXPORT2
udat_toCalendarDateField(UDateFormatField field); udat_toCalendarDateField(UDateFormatField field);
/** /**
* Open a new UDateFormat for formatting and parsing dates and times. * Open a new UDateFormat for formatting and parsing dates and times.
* A UDateFormat may be used to format dates in calls to {@link #udat_forma t }, * A UDateFormat may be used to format dates in calls to {@link #udat_forma t },
* and to parse dates in calls to {@link #udat_parse }. * and to parse dates in calls to {@link #udat_parse }.
* @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_ LONG, * @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_ LONG,
* UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time style s * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time style s
* are not currently supported) * are not currently supported).
* @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_ LONG, * @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_ LONG,
* UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_REL ATIVE, * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_REL ATIVE,
* UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE * UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE. As currently im
plemented,
* relative date formatting only affects a limited range of calendar days b
efore or
* after the current date, based on the CLDR &lt;field type="day"&gt;/&lt;r
elative&gt; data: For
* example, in English, "Yesterday", "Today", and "Tomorrow". Outside of th
is range,
* dates are formatted using the corresponding non-relative style.
* @param locale The locale specifying the formatting conventions * @param locale The locale specifying the formatting conventions
* @param tzID A timezone ID specifying the timezone to use. If 0, use * @param tzID A timezone ID specifying the timezone to use. If 0, use
* the default timezone. * the default timezone.
* @param tzIDLength The length of tzID, or -1 if null-terminated. * @param tzIDLength The length of tzID, or -1 if null-terminated.
* @param pattern A pattern specifying the format to use. * @param pattern A pattern specifying the format to use.
* @param patternLength The number of characters in the pattern, or -1 if n ull-terminated. * @param patternLength The number of characters in the pattern, or -1 if n ull-terminated.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @return A pointer to a UDateFormat to use for formatting dates and times , or 0 if * @return A pointer to a UDateFormat to use for formatting dates and times , or 0 if
* an error occurred. * an error occurred.
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 606 skipping to change at line 676
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
udat_format( const UDateFormat* format, udat_format( const UDateFormat* format,
UDate dateToFormat, UDate dateToFormat,
UChar* result, UChar* result,
int32_t resultLength, int32_t resultLength,
UFieldPosition* position, UFieldPosition* position,
UErrorCode* status); UErrorCode* status);
/** /**
* Parse a string into an date/time using a UDateFormat. * Parse a string into an date/time using a UDateFormat.
* The date will be parsed using the conventions specified in {@link #udat_o * The date will be parsed using the conventions specified in {@link #udat_o
pen } pen }.
* <P>
* Note that the normal date formats associated with some calendars - such
* as the Chinese lunar calendar - do not specify enough fields to enable
* dates to be parsed unambiguously. In the case of the Chinese lunar
* calendar, while the year within the current 60-year cycle is specified,
* the number of such cycles since the start date of the calendar (in the
* UCAL_ERA field of the UCalendar object) is not normally part of the forma
t,
* and parsing may assume the wrong era. For cases such as this it is
* recommended that clients parse using udat_parseCalendar with the UCalenda
r
* passed in set to the current date, or to a date within the era/cycle that
* should be assumed if absent in the format.
*
* @param format The formatter to use. * @param format The formatter to use.
* @param text The text to parse. * @param text The text to parse.
* @param textLength The length of text, or -1 if null-terminated. * @param textLength The length of text, or -1 if null-terminated.
* @param parsePos If not 0, on input a pointer to an integer specifying the offset at which * @param parsePos If not 0, on input a pointer to an integer specifying the offset at which
* to begin parsing. If not 0, on output the offset at which parsing ended. * to begin parsing. If not 0, on output the offset at which parsing ended.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @return The value of the parsed date/time * @return The value of the parsed date/time
* @see udat_format * @see udat_format
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UDate U_EXPORT2 U_STABLE UDate U_EXPORT2
udat_parse( const UDateFormat* format, udat_parse(const UDateFormat* format,
const UChar* text, const UChar* text,
int32_t textLength, int32_t textLength,
int32_t *parsePos, int32_t *parsePos,
UErrorCode *status); UErrorCode *status);
/** /**
* Parse a string into an date/time using a UDateFormat. * Parse a string into an date/time using a UDateFormat.
* The date will be parsed using the conventions specified in {@link #udat_o pen } * The date will be parsed using the conventions specified in {@link #udat_o pen }.
* @param format The formatter to use. * @param format The formatter to use.
* @param calendar The calendar in which to store the parsed data. * @param calendar A calendar set on input to the date and time to be used f
or
* missing values in the date/time string being parsed, and
set
* on output to the parsed date/time. When the calendar type
is
* different from the internal calendar held by the UDateFor
mat
* instance, the internal calendar will be cloned to a work
* calendar set to the same milliseconds and time zone as th
is
* calendar parameter, field values will be parsed based on
the
* work calendar, then the result (milliseconds and time zon
e)
* will be set in this calendar.
* @param text The text to parse. * @param text The text to parse.
* @param textLength The length of text, or -1 if null-terminated. * @param textLength The length of text, or -1 if null-terminated.
* @param parsePos If not 0, on input a pointer to an integer specifying the offset at which * @param parsePos If not 0, on input a pointer to an integer specifying the offset at which
* to begin parsing. If not 0, on output the offset at which parsing ended. * to begin parsing. If not 0, on output the offset at which parsing ended.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @see udat_format * @see udat_format
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
udat_parseCalendar(const UDateFormat* format, udat_parseCalendar(const UDateFormat* format,
skipping to change at line 934 skipping to change at line 1024
* @param type type of the locale we're looking for (valid or actual) * @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation * @param status error code for the operation
* @return the locale name * @return the locale name
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
U_STABLE const char* U_EXPORT2 U_STABLE const char* U_EXPORT2
udat_getLocaleByType(const UDateFormat *fmt, udat_getLocaleByType(const UDateFormat *fmt,
ULocDataLocaleType type, ULocDataLocaleType type,
UErrorCode* status); UErrorCode* status);
#ifndef U_HIDE_DRAFT_API
/**
* Set the formatter's default value for a particular context type,
* such as UDAT_CAPITALIZATION.
* @param fmt The formatter for which to set a context type's default value
.
* @param type The context type for which the default value should be set.
* @param value The default value to set for the specified context type.
* @param status A pointer to an UErrorCode to receive any errors
* @draft ICU 49
*/
U_DRAFT void U_EXPORT2
udat_setDefaultContext(UDateFormat* fmt,
UDateFormatContextType type, UDateFormatContextValue
value,
UErrorCode* status);
/**
* Get the formatter's default value for a particular context type,
* such as UDAT_CAPITALIZATION.
* @param fmt The formatter from which to get a context type's default valu
e.
* @param type The context type for which the default value should be obtai
ned.
* @param status A pointer to an UErrorCode to receive any errors
* @return The current default value for the specified context type.
* @draft ICU 49
*/
U_DRAFT int32_t U_EXPORT2
udat_getDefaultContext(UDateFormat* fmt,
UDateFormatContextType type,
UErrorCode* status);
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/** /**
* Extract the date pattern from a UDateFormat set for relative date formatt ing. * Extract the date pattern from a UDateFormat set for relative date formatt ing.
* The pattern will follow the pattern syntax rules. * The pattern will follow the pattern syntax rules.
* @param fmt The formatter to query. * @param fmt The formatter to query.
* @param result A pointer to a buffer to receive the pattern. * @param result A pointer to a buffer to receive the pattern.
* @param resultLength The maximum size of result. * @param resultLength The maximum size of result.
* @param status A pointer to a UErrorCode to receive any errors * @param status A pointer to a UErrorCode to receive any errors
* @return The total buffer size needed; if greater than resultLength, the o utput was truncated. * @return The total buffer size needed; if greater than resultLength, the o utput was truncated.
* @see udat_applyPatternRelative * @see udat_applyPatternRelative
* @internal ICU 4.2 technology preview * @internal ICU 4.2 technology preview
skipping to change at line 987 skipping to change at line 1108
* @see udat_toPatternRelativeDate, udat_toPatternRelativeTime * @see udat_toPatternRelativeDate, udat_toPatternRelativeTime
* @internal ICU 4.2 technology preview * @internal ICU 4.2 technology preview
*/ */
U_INTERNAL void U_EXPORT2 U_INTERNAL void U_EXPORT2
udat_applyPatternRelative(UDateFormat *format, udat_applyPatternRelative(UDateFormat *format,
const UChar *datePattern, const UChar *datePattern,
int32_t datePatternLength, int32_t datePatternLength,
const UChar *timePattern, const UChar *timePattern,
int32_t timePatternLength, int32_t timePatternLength,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
/**
* @internal
* @see udat_open
*/
typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle time
Style,
UDateFormatStyle dateS
tyle,
const char *loca
le,
const UChar *tzID
,
int32_t tzIDL
ength,
const UChar *patt
ern,
int32_t patte
rnLength,
UErrorCode *stat
us);
/**
* Register a provider factory
* @internal ICU 49
*/
U_INTERNAL void U_EXPORT2
udat_registerOpener(UDateFormatOpener opener, UErrorCode *status);
/**
* Un-Register a provider factory
* @internal ICU 49
*/
U_INTERNAL UDateFormatOpener U_EXPORT2
udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status);
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 12 change blocks. 
10 lines changed or deleted 193 lines changed or added


 udateintervalformat.h   udateintervalformat.h 
/* /*
*************************************************************************** ************** *************************************************************************** **************
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ************** *************************************************************************** **************
*/ */
#ifndef UDATEINTERVALFORMAT_H #ifndef UDATEINTERVALFORMAT_H
#define UDATEINTERVALFORMAT_H #define UDATEINTERVALFORMAT_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/umisc.h" #include "unicode/umisc.h"
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
/** /**
* \file
* \brief C API: Format a date interval.
*
* A UDateIntervalFormat is used to format the range between two UDate valu es * A UDateIntervalFormat is used to format the range between two UDate valu es
* in a locale-sensitive way, using a skeleton that specifies the precision and * in a locale-sensitive way, using a skeleton that specifies the precision and
* completeness of the information to show. If the range smaller than the r esolution * completeness of the information to show. If the range smaller than the r esolution
* specified by the skeleton, a single date format will be produced. If the range * specified by the skeleton, a single date format will be produced. If the range
* is larger than the format specified by the skeleton, a locale-specific f allback * is larger than the format specified by the skeleton, a locale-specific f allback
* will be used to format the items missing from the skeleton. * will be used to format the items missing from the skeleton.
* *
* For example, if the range is 2010-03-04 07:56 - 2010-03-04 19:56 (12 hou rs) * For example, if the range is 2010-03-04 07:56 - 2010-03-04 19:56 (12 hou rs)
* - The skeleton jm will produce * - The skeleton jm will produce
* for en_US, "7:56 AM - 7:56 PM" * for en_US, "7:56 AM - 7:56 PM"
skipping to change at line 74 skipping to change at line 77
* include: * include:
* af, am, ar, be, bg, bn, ca, cs, da, de (_AT), el, en (_AU,_CA,_GB,_IE, _IN...), * af, am, ar, be, bg, bn, ca, cs, da, de (_AT), el, en (_AU,_CA,_GB,_IE, _IN...),
* eo, es (_AR,_CL,_CO,...,_US) et, fa, fi, fo, fr (_BE,_CH,_CA), fur, gs w, he, * eo, es (_AR,_CL,_CO,...,_US) et, fa, fi, fo, fr (_BE,_CH,_CA), fur, gs w, he,
* hr, hu, hy, is, it (_CH), ja, kk, km, ko, lt, lv, mk, ml, mt, nb, nl ) _BE), * hr, hu, hy, is, it (_CH), ja, kk, km, ko, lt, lv, mk, ml, mt, nb, nl ) _BE),
* nn, pl, pt (_PT), rm, ro, ru (_UA), sk, sl, so, sq, sr, sr_Latn, sv, t h, to, * nn, pl, pt (_PT), rm, ro, ru (_UA), sk, sl, so, sq, sr, sr_Latn, sv, t h, to,
* tr, uk, ur, vi, zh (_SG), zh_Hant (_HK,_MO) * tr, uk, ur, vi, zh (_SG), zh_Hant (_HK,_MO)
*/ */
/** /**
* Opaque UDateIntervalFormat object for use in C programs. * Opaque UDateIntervalFormat object for use in C programs.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
struct UDateIntervalFormat; struct UDateIntervalFormat;
typedef struct UDateIntervalFormat UDateIntervalFormat; /**< C typedef for struct UDateIntervalFormat. @draft ICU 4.8 */ typedef struct UDateIntervalFormat UDateIntervalFormat; /**< C typedef for struct UDateIntervalFormat. @stable ICU 4.8 */
/** /**
* Open a new UDateIntervalFormat object using the predefined rules for a * Open a new UDateIntervalFormat object using the predefined rules for a
* given locale plus a specified skeleton. * given locale plus a specified skeleton.
* @param locale * @param locale
* The locale for whose rules should be used; may be NULL for * The locale for whose rules should be used; may be NULL for
* default locale. * default locale.
* @param skeleton * @param skeleton
* A pattern containing only the fields desired for the interval * A pattern containing only the fields desired for the interval
* format, for example "Hm", "yMMMd", or "yMMMEdHm". * format, for example "Hm", "yMMMd", or "yMMMEdHm".
skipping to change at line 101 skipping to change at line 104
* A timezone ID specifying the timezone to use. If 0, use the d efault * A timezone ID specifying the timezone to use. If 0, use the d efault
* timezone. * timezone.
* @param tzIDLength * @param tzIDLength
* The length of tzID, or -1 if null-terminated. If 0, use the d efault * The length of tzID, or -1 if null-terminated. If 0, use the d efault
* timezone. * timezone.
* @param status * @param status
* A pointer to a UErrorCode to receive any errors. * A pointer to a UErrorCode to receive any errors.
* @return * @return
* A pointer to a UDateIntervalFormat object for the specified l ocale, * A pointer to a UDateIntervalFormat object for the specified l ocale,
* or NULL if an error occurred. * or NULL if an error occurred.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UDateIntervalFormat* U_EXPORT2 U_DRAFT UDateIntervalFormat* U_EXPORT2
udtitvfmt_open(const char* locale, udtitvfmt_open(const char* locale,
const UChar* skeleton, const UChar* skeleton,
int32_t skeletonLength, int32_t skeletonLength,
const UChar* tzID, const UChar* tzID,
int32_t tzIDLength, int32_t tzIDLength,
UErrorCode* status); UErrorCode* status);
/** /**
* Close a UDateIntervalFormat object. Once closed it may no longer be used . * Close a UDateIntervalFormat object. Once closed it may no longer be used .
* @param formatter * @param formatter
* The UDateIntervalFormat object to close. * The UDateIntervalFormat object to close.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
udtitvfmt_close(UDateIntervalFormat *formatter); udtitvfmt_close(UDateIntervalFormat *formatter);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* \class LocalUDateIntervalFormatPointer * \class LocalUDateIntervalFormatPointer
* "Smart pointer" class, closes a UDateIntervalFormat via udtitvfmt_close( ). * "Smart pointer" class, closes a UDateIntervalFormat via udtitvfmt_close( ).
* For most methods see the LocalPointerBase base class. * For most methods see the LocalPointerBase base class.
* *
* @see LocalPointerBase * @see LocalPointerBase
* @see LocalPointer * @see LocalPointer
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDateIntervalFormatPointer, UDateIntervalF ormat, udtitvfmt_close); U_DEFINE_LOCAL_OPEN_POINTER(LocalUDateIntervalFormatPointer, UDateIntervalF ormat, udtitvfmt_close);
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
/** /**
* Formats a date/time range using the conventions established for the * Formats a date/time range using the conventions established for the
* UDateIntervalFormat object. * UDateIntervalFormat object.
skipping to change at line 163 skipping to change at line 166
* A pointer to a UFieldPosition. On input, position->field is r ead. * A pointer to a UFieldPosition. On input, position->field is r ead.
* On output, position->beginIndex and position->endIndex indica te * On output, position->beginIndex and position->endIndex indica te
* the beginning and ending indices of field number position->fi eld, * the beginning and ending indices of field number position->fi eld,
* if such a field exists. This parameter may be NULL, in which case * if such a field exists. This parameter may be NULL, in which case
* no field position data is returned. * no field position data is returned.
* @param status * @param status
* A pointer to a UErrorCode to receive any errors. * A pointer to a UErrorCode to receive any errors.
* @return * @return
* The total buffer size needed; if greater than resultLength, t he * The total buffer size needed; if greater than resultLength, t he
* output was truncated. * output was truncated.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
udtitvfmt_format(const UDateIntervalFormat* formatter, udtitvfmt_format(const UDateIntervalFormat* formatter,
UDate fromDate, UDate fromDate,
UDate toDate, UDate toDate,
UChar* result, UChar* result,
int32_t resultCapacity, int32_t resultCapacity,
UFieldPosition* position, UFieldPosition* position,
UErrorCode* status); UErrorCode* status);
 End of changes. 8 change blocks. 
7 lines changed or deleted 10 lines changed or added


 udatpg.h   udatpg.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2007-2010, International Business Machines * Copyright (C) 2007-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: udatpg.h * file name: udatpg.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2007jul30 * created on: 2007jul30
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 102 skipping to change at line 102
* pattern to match those in the skeleton (when this would not happen * pattern to match those in the skeleton (when this would not happen
* otherwise). These may be combined to force the length of multiple fields . * otherwise). These may be combined to force the length of multiple fields .
* Used with udatpg_getBestPatternWithOptions, udatpg_replaceFieldTypesWith Options. * Used with udatpg_getBestPatternWithOptions, udatpg_replaceFieldTypesWith Options.
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
typedef enum UDateTimePatternMatchOptions { typedef enum UDateTimePatternMatchOptions {
/** @stable ICU 4.4 */ /** @stable ICU 4.4 */
UDATPG_MATCH_NO_OPTIONS = 0, UDATPG_MATCH_NO_OPTIONS = 0,
/** @stable ICU 4.4 */ /** @stable ICU 4.4 */
UDATPG_MATCH_HOUR_FIELD_LENGTH = 1 << UDATPG_HOUR_FIELD, UDATPG_MATCH_HOUR_FIELD_LENGTH = 1 << UDATPG_HOUR_FIELD,
#ifndef U_HIDE_INTERNAL_API
/** @internal ICU 4.4 */ /** @internal ICU 4.4 */
UDATPG_MATCH_MINUTE_FIELD_LENGTH = 1 << UDATPG_MINUTE_FIELD, UDATPG_MATCH_MINUTE_FIELD_LENGTH = 1 << UDATPG_MINUTE_FIELD,
/** @internal ICU 4.4 */ /** @internal ICU 4.4 */
UDATPG_MATCH_SECOND_FIELD_LENGTH = 1 << UDATPG_SECOND_FIELD, UDATPG_MATCH_SECOND_FIELD_LENGTH = 1 << UDATPG_SECOND_FIELD,
#endif /* U_HIDE_INTERNAL_API */
/** @stable ICU 4.4 */ /** @stable ICU 4.4 */
UDATPG_MATCH_ALL_FIELDS_LENGTH = (1 << UDATPG_FIELD_COUNT) - 1 UDATPG_MATCH_ALL_FIELDS_LENGTH = (1 << UDATPG_FIELD_COUNT) - 1
} UDateTimePatternMatchOptions; } UDateTimePatternMatchOptions;
/** /**
* Status return values from udatpg_addPattern(). * Status return values from udatpg_addPattern().
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
typedef enum UDateTimePatternConflict { typedef enum UDateTimePatternConflict {
/** @stable ICU 3.8 */ /** @stable ICU 3.8 */
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 uenum.h   uenum.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2002-2010, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: uenum.h * file name: uenum.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:2 * indentation:2
* *
* created on: 2002jul08 * created on: 2002jul08
* created by: Vladimir Weinstein * created by: Vladimir Weinstein
skipping to change at line 167 skipping to change at line 167
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
/** /**
* Given a StringEnumeration, wrap it in a UEnumeration. The * Given a StringEnumeration, wrap it in a UEnumeration. The
* StringEnumeration is adopted; after this call, the caller must not * StringEnumeration is adopted; after this call, the caller must not
* delete it (regardless of error status). * delete it (regardless of error status).
* @param adopted the C++ StringEnumeration to be wrapped in a UEnumeration . * @param adopted the C++ StringEnumeration to be wrapped in a UEnumeration .
* @param ec the error code. * @param ec the error code.
* @return a UEnumeration wrapping the adopted StringEnumeration. * @return a UEnumeration wrapping the adopted StringEnumeration.
* @draft ICU 4.2 * @stable ICU 4.2
*/ */
U_CAPI UEnumeration* U_EXPORT2 U_CAPI UEnumeration* U_EXPORT2
uenum_openFromStringEnumeration(U_NAMESPACE_QUALIFIER StringEnumeration* ad opted, UErrorCode* ec); uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode * ec);
#endif #endif
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 uidna.h   uidna.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* *
* Copyright (C) 2003-2010, International Business Machines * Copyright (C) 2003-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
************************************************************************** ***** ************************************************************************** *****
* file name: uidna.h * file name: uidna.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2003feb1 * created on: 2003feb1
* created by: Ram Viswanadha * created by: Ram Viswanadha
skipping to change at line 45 skipping to change at line 45
* The C API functions which do not take a service object pointer * The C API functions which do not take a service object pointer
* implement IDNA2003. * implement IDNA2003.
*/ */
/* /*
* IDNA option bit set values. * IDNA option bit set values.
*/ */
enum { enum {
/** /**
* Default options value: None of the other options are set. * Default options value: None of the other options are set.
* For use in static worker and factory methods.
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
UIDNA_DEFAULT=0, UIDNA_DEFAULT=0,
/** /**
* Option to allow unassigned code points in domain names and labels. * Option to allow unassigned code points in domain names and labels.
* This option is ignored by the UTS46 implementation. * For use in static worker and factory methods.
* <p>This option is ignored by the UTS46 implementation.
* (UTS #46 disallows unassigned code points.) * (UTS #46 disallows unassigned code points.)
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
UIDNA_ALLOW_UNASSIGNED=1, UIDNA_ALLOW_UNASSIGNED=1,
/** /**
* Option to check whether the input conforms to the STD3 ASCII rules, * Option to check whether the input conforms to the STD3 ASCII rules,
* for example the restriction of labels to LDH characters * for example the restriction of labels to LDH characters
* (ASCII Letters, Digits and Hyphen-Minus). * (ASCII Letters, Digits and Hyphen-Minus).
* For use in static worker and factory methods.
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
UIDNA_USE_STD3_RULES=2, UIDNA_USE_STD3_RULES=2,
/** /**
* IDNA option to check for whether the input conforms to the BiDi rule s. * IDNA option to check for whether the input conforms to the BiDi rule s.
* This option is ignored by the IDNA2003 implementation. * For use in static worker and factory methods.
* <p>This option is ignored by the IDNA2003 implementation.
* (IDNA2003 always performs a BiDi check.) * (IDNA2003 always performs a BiDi check.)
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_CHECK_BIDI=4, UIDNA_CHECK_BIDI=4,
/** /**
* IDNA option to check for whether the input conforms to the CONTEXTJ rules. * IDNA option to check for whether the input conforms to the CONTEXTJ rules.
* This option is ignored by the IDNA2003 implementation. * For use in static worker and factory methods.
* <p>This option is ignored by the IDNA2003 implementation.
* (The CONTEXTJ check is new in IDNA2008.) * (The CONTEXTJ check is new in IDNA2008.)
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_CHECK_CONTEXTJ=8, UIDNA_CHECK_CONTEXTJ=8,
/** /**
* IDNA option for nontransitional processing in ToASCII(). * IDNA option for nontransitional processing in ToASCII().
* By default, ToASCII() uses transitional processing. * For use in static worker and factory methods.
* This option is ignored by the IDNA2003 implementation. * <p>By default, ToASCII() uses transitional processing.
* <p>This option is ignored by the IDNA2003 implementation.
* (This is only relevant for compatibility of newer IDNA implementatio ns with IDNA2003.) * (This is only relevant for compatibility of newer IDNA implementatio ns with IDNA2003.)
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_NONTRANSITIONAL_TO_ASCII=0x10, UIDNA_NONTRANSITIONAL_TO_ASCII=0x10,
/** /**
* IDNA option for nontransitional processing in ToUnicode(). * IDNA option for nontransitional processing in ToUnicode().
* By default, ToUnicode() uses transitional processing. * For use in static worker and factory methods.
* This option is ignored by the IDNA2003 implementation. * <p>By default, ToUnicode() uses transitional processing.
* <p>This option is ignored by the IDNA2003 implementation.
* (This is only relevant for compatibility of newer IDNA implementatio ns with IDNA2003.) * (This is only relevant for compatibility of newer IDNA implementatio ns with IDNA2003.)
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_NONTRANSITIONAL_TO_UNICODE=0x20 UIDNA_NONTRANSITIONAL_TO_UNICODE=0x20,
#ifndef U_HIDE_DRAFT_API
/**
* IDNA option to check for whether the input conforms to the CONTEXTO
rules.
* For use in static worker and factory methods.
* <p>This option is ignored by the IDNA2003 implementation.
* (The CONTEXTO check is new in IDNA2008.)
* <p>This is for use by registries for IDNA2008 conformance.
* UTS #46 does not require the CONTEXTO check.
* @draft ICU 49
*/
UIDNA_CHECK_CONTEXTO=0x40
#endif /* U_HIDE_DRAFT_API */
}; };
/** /**
* Opaque C service object type for the new IDNA API. * Opaque C service object type for the new IDNA API.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
struct UIDNA; struct UIDNA;
typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @draft ICU 4. 6 */ typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @stable ICU 4 .6 */
/** /**
* Returns a UIDNA instance which implements UTS #46. * Returns a UIDNA instance which implements UTS #46.
* Returns an unmodifiable instance, owned by the caller. * Returns an unmodifiable instance, owned by the caller.
* Cache it for multiple operations, and uidna_close() it when done. * Cache it for multiple operations, and uidna_close() it when done.
* The instance is thread-safe, that is, it can be used concurrently. * The instance is thread-safe, that is, it can be used concurrently.
* *
* For details about the UTS #46 implementation see the IDNA C++ class in i dna.h. * For details about the UTS #46 implementation see the IDNA C++ class in i dna.h.
* *
* @param options Bit set to modify the processing and error checking. * @param options Bit set to modify the processing and error checking.
* See option bit set values in uidna.h. * See option bit set values in uidna.h.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the UTS #46 UIDNA instance, if successful * @return the UTS #46 UIDNA instance, if successful
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UIDNA * U_EXPORT2 U_DRAFT UIDNA * U_EXPORT2
uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode); uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode);
/** /**
* Closes a UIDNA instance. * Closes a UIDNA instance.
* @param idna UIDNA instance to be closed * @param idna UIDNA instance to be closed
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uidna_close(UIDNA *idna); uidna_close(UIDNA *idna);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* \class LocalUIDNAPointer * \class LocalUIDNAPointer
* "Smart pointer" class, closes a UIDNA via uidna_close(). * "Smart pointer" class, closes a UIDNA via uidna_close().
* For most methods see the LocalPointerBase base class. * For most methods see the LocalPointerBase base class.
* *
* @see LocalPointerBase * @see LocalPointerBase
* @see LocalPointer * @see LocalPointer
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DEFINE_LOCAL_OPEN_POINTER(LocalUIDNAPointer, UIDNA, uidna_close); U_DEFINE_LOCAL_OPEN_POINTER(LocalUIDNAPointer, UIDNA, uidna_close);
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
/** /**
* Output container for IDNA processing errors. * Output container for IDNA processing errors.
* Initialize with UIDNA_INFO_INITIALIZER: * Initialize with UIDNA_INFO_INITIALIZER:
* \code * \code
* UIDNAInfo info = UIDNA_INFO_INITIALIZER; * UIDNAInfo info = UIDNA_INFO_INITIALIZER;
* int32_t length = uidna_nameToASCII(..., &info, &errorCode); * int32_t length = uidna_nameToASCII(..., &info, &errorCode);
* if(U_SUCCESS(errorCode) && info.errors!=0) { ... } * if(U_SUCCESS(errorCode) && info.errors!=0) { ... }
* \endcode * \endcode
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
struct UIDNAInfo { struct UIDNAInfo {
/** sizeof(UIDNAInfo) @draft ICU 4.6 */ /** sizeof(UIDNAInfo) @stable ICU 4.6 */
int16_t size; int16_t size;
/** /**
* Set to TRUE if transitional and nontransitional processing produce d ifferent results. * Set to TRUE if transitional and nontransitional processing produce d ifferent results.
* For details see C++ IDNAInfo::isTransitionalDifferent(). * For details see C++ IDNAInfo::isTransitionalDifferent().
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UBool isTransitionalDifferent; UBool isTransitionalDifferent;
UBool reservedB3; /**< Reserved field, do not use. @internal */ UBool reservedB3; /**< Reserved field, do not use. @internal */
/** /**
* Bit set indicating IDNA processing errors. 0 if no errors. * Bit set indicating IDNA processing errors. 0 if no errors.
* See UIDNA_ERROR_... constants. * See UIDNA_ERROR_... constants.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
uint32_t errors; uint32_t errors;
int32_t reservedI2; /**< Reserved field, do not use. @internal */ int32_t reservedI2; /**< Reserved field, do not use. @internal */
int32_t reservedI3; /**< Reserved field, do not use. @internal */ int32_t reservedI3; /**< Reserved field, do not use. @internal */
}; };
typedef struct UIDNAInfo UIDNAInfo; typedef struct UIDNAInfo UIDNAInfo;
/** /**
* Static initializer for a UIDNAInfo struct. * Static initializer for a UIDNAInfo struct.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
#define UIDNA_INFO_INITIALIZER { \ #define UIDNA_INFO_INITIALIZER { \
(int16_t)sizeof(UIDNAInfo), \ (int16_t)sizeof(UIDNAInfo), \
FALSE, FALSE, \ FALSE, FALSE, \
0, 0, 0 } 0, 0, 0 }
/** /**
* Converts a single domain name label into its ASCII form for DNS lookup. * Converts a single domain name label into its ASCII form for DNS lookup.
* If any processing step fails, then pInfo->errors will be non-zero and * If any processing step fails, then pInfo->errors will be non-zero and
* the result might not be an ASCII string. * the result might not be an ASCII string.
skipping to change at line 209 skipping to change at line 228
* @param label Input domain name label * @param label Input domain name label
* @param length Label length, or -1 if NUL-terminated * @param length Label length, or -1 if NUL-terminated
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uidna_labelToASCII(const UIDNA *idna, uidna_labelToASCII(const UIDNA *idna,
const UChar *label, int32_t length, const UChar *label, int32_t length,
UChar *dest, int32_t capacity, UChar *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a single domain name label into its Unicode form for human-read able display. * Converts a single domain name label into its Unicode form for human-read able display.
* If any processing step fails, then pInfo->errors will be non-zero. * If any processing step fails, then pInfo->errors will be non-zero.
skipping to change at line 236 skipping to change at line 255
* @param label Input domain name label * @param label Input domain name label
* @param length Label length, or -1 if NUL-terminated * @param length Label length, or -1 if NUL-terminated
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uidna_labelToUnicode(const UIDNA *idna, uidna_labelToUnicode(const UIDNA *idna,
const UChar *label, int32_t length, const UChar *label, int32_t length,
UChar *dest, int32_t capacity, UChar *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a whole domain name into its ASCII form for DNS lookup. * Converts a whole domain name into its ASCII form for DNS lookup.
* If any processing step fails, then pInfo->errors will be non-zero and * If any processing step fails, then pInfo->errors will be non-zero and
skipping to change at line 265 skipping to change at line 284
* @param name Input domain name * @param name Input domain name
* @param length Domain name length, or -1 if NUL-terminated * @param length Domain name length, or -1 if NUL-terminated
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uidna_nameToASCII(const UIDNA *idna, uidna_nameToASCII(const UIDNA *idna,
const UChar *name, int32_t length, const UChar *name, int32_t length,
UChar *dest, int32_t capacity, UChar *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a whole domain name into its Unicode form for human-readable di splay. * Converts a whole domain name into its Unicode form for human-readable di splay.
* If any processing step fails, then pInfo->errors will be non-zero. * If any processing step fails, then pInfo->errors will be non-zero.
skipping to change at line 292 skipping to change at line 311
* @param name Input domain name * @param name Input domain name
* @param length Domain name length, or -1 if NUL-terminated * @param length Domain name length, or -1 if NUL-terminated
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uidna_nameToUnicode(const UIDNA *idna, uidna_nameToUnicode(const UIDNA *idna,
const UChar *name, int32_t length, const UChar *name, int32_t length,
UChar *dest, int32_t capacity, UChar *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/* UTF-8 versions of the processing methods ------------------------------- -- */ /* UTF-8 versions of the processing methods ------------------------------- -- */
/** /**
skipping to change at line 317 skipping to change at line 336
* @param label Input domain name label * @param label Input domain name label
* @param length Label length, or -1 if NUL-terminated * @param length Label length, or -1 if NUL-terminated
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uidna_labelToASCII_UTF8(const UIDNA *idna, uidna_labelToASCII_UTF8(const UIDNA *idna,
const char *label, int32_t length, const char *label, int32_t length,
char *dest, int32_t capacity, char *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a single domain name label into its Unicode form for human-read able display. * Converts a single domain name label into its Unicode form for human-read able display.
* UTF-8 version of uidna_labelToUnicode(), same behavior. * UTF-8 version of uidna_labelToUnicode(), same behavior.
skipping to change at line 340 skipping to change at line 359
* @param label Input domain name label * @param label Input domain name label
* @param length Label length, or -1 if NUL-terminated * @param length Label length, or -1 if NUL-terminated
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uidna_labelToUnicodeUTF8(const UIDNA *idna, uidna_labelToUnicodeUTF8(const UIDNA *idna,
const char *label, int32_t length, const char *label, int32_t length,
char *dest, int32_t capacity, char *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a whole domain name into its ASCII form for DNS lookup. * Converts a whole domain name into its ASCII form for DNS lookup.
* UTF-8 version of uidna_nameToASCII(), same behavior. * UTF-8 version of uidna_nameToASCII(), same behavior.
skipping to change at line 363 skipping to change at line 382
* @param name Input domain name * @param name Input domain name
* @param length Domain name length, or -1 if NUL-terminated * @param length Domain name length, or -1 if NUL-terminated
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uidna_nameToASCII_UTF8(const UIDNA *idna, uidna_nameToASCII_UTF8(const UIDNA *idna,
const char *name, int32_t length, const char *name, int32_t length,
char *dest, int32_t capacity, char *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a whole domain name into its Unicode form for human-readable di splay. * Converts a whole domain name into its Unicode form for human-readable di splay.
* UTF-8 version of uidna_nameToUnicode(), same behavior. * UTF-8 version of uidna_nameToUnicode(), same behavior.
skipping to change at line 386 skipping to change at line 405
* @param name Input domain name * @param name Input domain name
* @param length Domain name length, or -1 if NUL-terminated * @param length Domain name length, or -1 if NUL-terminated
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uidna_nameToUnicodeUTF8(const UIDNA *idna, uidna_nameToUnicodeUTF8(const UIDNA *idna,
const char *name, int32_t length, const char *name, int32_t length,
char *dest, int32_t capacity, char *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/* /*
* IDNA error bit set values. * IDNA error bit set values.
* When a domain name or label fails a processing step or does not meet the * When a domain name or label fails a processing step or does not meet the
* validity criteria, then one or more of these error bits are set. * validity criteria, then one or more of these error bits are set.
*/ */
enum { enum {
/** /**
* A non-final domain name label (or the whole domain name) is empty. * A non-final domain name label (or the whole domain name) is empty.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_EMPTY_LABEL=1, UIDNA_ERROR_EMPTY_LABEL=1,
/** /**
* A domain name label is longer than 63 bytes. * A domain name label is longer than 63 bytes.
* (See STD13/RFC1034 3.1. Name space specifications and terminology.) * (See STD13/RFC1034 3.1. Name space specifications and terminology.)
* This is only checked in ToASCII operations, and only if the output l abel is all-ASCII. * This is only checked in ToASCII operations, and only if the output l abel is all-ASCII.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_LABEL_TOO_LONG=2, UIDNA_ERROR_LABEL_TOO_LONG=2,
/** /**
* A domain name is longer than 255 bytes in its storage form. * A domain name is longer than 255 bytes in its storage form.
* (See STD13/RFC1034 3.1. Name space specifications and terminology.) * (See STD13/RFC1034 3.1. Name space specifications and terminology.)
* This is only checked in ToASCII operations, and only if the output d omain name is all-ASCII. * This is only checked in ToASCII operations, and only if the output d omain name is all-ASCII.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_DOMAIN_NAME_TOO_LONG=4, UIDNA_ERROR_DOMAIN_NAME_TOO_LONG=4,
/** /**
* A label starts with a hyphen-minus ('-'). * A label starts with a hyphen-minus ('-').
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_LEADING_HYPHEN=8, UIDNA_ERROR_LEADING_HYPHEN=8,
/** /**
* A label ends with a hyphen-minus ('-'). * A label ends with a hyphen-minus ('-').
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_TRAILING_HYPHEN=0x10, UIDNA_ERROR_TRAILING_HYPHEN=0x10,
/** /**
* A label contains hyphen-minus ('-') in the third and fourth position s. * A label contains hyphen-minus ('-') in the third and fourth position s.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_HYPHEN_3_4=0x20, UIDNA_ERROR_HYPHEN_3_4=0x20,
/** /**
* A label starts with a combining mark. * A label starts with a combining mark.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_LEADING_COMBINING_MARK=0x40, UIDNA_ERROR_LEADING_COMBINING_MARK=0x40,
/** /**
* A label or domain name contains disallowed characters. * A label or domain name contains disallowed characters.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_DISALLOWED=0x80, UIDNA_ERROR_DISALLOWED=0x80,
/** /**
* A label starts with "xn--" but does not contain valid Punycode. * A label starts with "xn--" but does not contain valid Punycode.
* That is, an xn-- label failed Punycode decoding. * That is, an xn-- label failed Punycode decoding.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_PUNYCODE=0x100, UIDNA_ERROR_PUNYCODE=0x100,
/** /**
* A label contains a dot=full stop. * A label contains a dot=full stop.
* This can occur in an input string for a single-label function. * This can occur in an input string for a single-label function.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_LABEL_HAS_DOT=0x200, UIDNA_ERROR_LABEL_HAS_DOT=0x200,
/** /**
* An ACE label does not contain a valid label string. * An ACE label does not contain a valid label string.
* The label was successfully ACE (Punycode) decoded but the resulting * The label was successfully ACE (Punycode) decoded but the resulting
* string had severe validation errors. For example, * string had severe validation errors. For example,
* it might contain characters that are not allowed in ACE labels, * it might contain characters that are not allowed in ACE labels,
* or it might not be normalized. * or it might not be normalized.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_INVALID_ACE_LABEL=0x400, UIDNA_ERROR_INVALID_ACE_LABEL=0x400,
/** /**
* A label does not meet the IDNA BiDi requirements (for right-to-left characters). * A label does not meet the IDNA BiDi requirements (for right-to-left characters).
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_BIDI=0x800, UIDNA_ERROR_BIDI=0x800,
/** /**
* A label does not meet the IDNA CONTEXTJ requirements. * A label does not meet the IDNA CONTEXTJ requirements.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UIDNA_ERROR_CONTEXTJ=0x1000 UIDNA_ERROR_CONTEXTJ=0x1000,
#ifndef U_HIDE_DRAFT_API
/**
* A label does not meet the IDNA CONTEXTO requirements for punctuation
characters.
* Some punctuation characters "Would otherwise have been DISALLOWED"
* but are allowed in certain contexts. (RFC 5892)
* @draft ICU 49
*/
UIDNA_ERROR_CONTEXTO_PUNCTUATION=0x2000,
/**
* A label does not meet the IDNA CONTEXTO requirements for digits.
* Arabic-Indic Digits (U+066x) must not be mixed with Extended Arabic-
Indic Digits (U+06Fx).
* @draft ICU 49
*/
UIDNA_ERROR_CONTEXTO_DIGITS=0x4000
#endif /* U_HIDE_DRAFT_API */
}; };
/* IDNA2003 API ----------------------------------------------------------- -- */ /* IDNA2003 API ----------------------------------------------------------- -- */
/** /**
* IDNA2003: This function implements the ToASCII operation as defined in t he IDNA RFC. * IDNA2003: This function implements the ToASCII operation as defined in t he IDNA RFC.
* This operation is done on <b>single labels</b> before sending it to some thing that expects * This operation is done on <b>single labels</b> before sending it to some thing that expects
* ASCII names. A label is an individual part of a domain name. Labels are usually * ASCII names. A label is an individual part of a domain name. Labels are usually
* separated by dots; e.g. "www.example.com" is composed of 3 labels "www", "example", and "com". * separated by dots; e.g. "www.example.com" is composed of 3 labels "www", "example", and "com".
* *
 End of changes. 45 change blocks. 
45 lines changed or deleted 82 lines changed or added


 uiter.h   uiter.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2002-2006,2009 International Business Machines * Copyright (C) 2002-2011 International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: uiter.h * file name: uiter.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2002jan18 * created on: 2002jan18
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 674 skipping to change at line 674
* getState() simply returns the current index. * getState() simply returns the current index.
* move() will always return the final index. * move() will always return the final index.
* *
* @param iter UCharIterator structure to be set for iteration * @param iter UCharIterator structure to be set for iteration
* @param charIter CharacterIterator to wrap * @param charIter CharacterIterator to wrap
* *
* @see UCharIterator * @see UCharIterator
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uiter_setCharacterIterator(UCharIterator *iter, U_NAMESPACE_QUALIFIER Chara cterIterator *charIter); uiter_setCharacterIterator(UCharIterator *iter, icu::CharacterIterator *cha rIter);
/** /**
* Set up a UCharIterator to iterate over a C++ Replaceable. * Set up a UCharIterator to iterate over a C++ Replaceable.
* *
* Sets the UCharIterator function pointers for iteration over the * Sets the UCharIterator function pointers for iteration over the
* Replaceable rep with iteration boundaries start=index=0 and * Replaceable rep with iteration boundaries start=index=0 and
* length=limit=rep->length(). * length=limit=rep->length().
* The "provider" may set the start, index, and limit values at any time * The "provider" may set the start, index, and limit values at any time
* within the range 0..length=rep->length(). * within the range 0..length=rep->length().
* The length field will be ignored. * The length field will be ignored.
skipping to change at line 699 skipping to change at line 699
* getState() simply returns the current index. * getState() simply returns the current index.
* move() will always return the final index. * move() will always return the final index.
* *
* @param iter UCharIterator structure to be set for iteration * @param iter UCharIterator structure to be set for iteration
* @param rep Replaceable to iterate over * @param rep Replaceable to iterate over
* *
* @see UCharIterator * @see UCharIterator
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uiter_setReplaceable(UCharIterator *iter, const U_NAMESPACE_QUALIFIER Repla ceable *rep); uiter_setReplaceable(UCharIterator *iter, const icu::Replaceable *rep);
#endif #endif
U_CDECL_END U_CDECL_END
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 uloc.h   uloc.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File ULOC.H * File ULOC.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/01/97 aliu Creation. * 04/01/97 aliu Creation.
* 08/22/98 stephen JDK 1.2 sync. * 08/22/98 stephen JDK 1.2 sync.
skipping to change at line 292 skipping to change at line 292
/** /**
* Invariant character separating keywords from the locale string * Invariant character separating keywords from the locale string
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
#define ULOC_KEYWORD_SEPARATOR '@' #define ULOC_KEYWORD_SEPARATOR '@'
/** /**
* Unicode code point for '@' separating keywords from the locale string. * Unicode code point for '@' separating keywords from the locale string.
* @see ULOC_KEYWORD_SEPARATOR * @see ULOC_KEYWORD_SEPARATOR
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
#define ULOC_KEYWORD_SEPARATOR_UNICODE 0x40 #define ULOC_KEYWORD_SEPARATOR_UNICODE 0x40
/** /**
* Invariant character for assigning value to a keyword * Invariant character for assigning value to a keyword
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
#define ULOC_KEYWORD_ASSIGN '=' #define ULOC_KEYWORD_ASSIGN '='
/** /**
* Unicode code point for '=' for assigning value to a keyword. * Unicode code point for '=' for assigning value to a keyword.
* @see ULOC_KEYWORD_ASSIGN * @see ULOC_KEYWORD_ASSIGN
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
#define ULOC_KEYWORD_ASSIGN_UNICODE 0x3D #define ULOC_KEYWORD_ASSIGN_UNICODE 0x3D
/** /**
* Invariant character separating keywords * Invariant character separating keywords
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
#define ULOC_KEYWORD_ITEM_SEPARATOR ';' #define ULOC_KEYWORD_ITEM_SEPARATOR ';'
/** /**
* Unicode code point for ';' separating keywords * Unicode code point for ';' separating keywords
* @see ULOC_KEYWORD_ITEM_SEPARATOR * @see ULOC_KEYWORD_ITEM_SEPARATOR
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
#define ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE 0x3B #define ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE 0x3B
/** /**
* Constants for *_getLocale() * Constants for *_getLocale()
* Allow user to select whether she wants information on * Allow user to select whether she wants information on
* requested, valid or actual locale. * requested, valid or actual locale.
* For example, a collator for "en_US_CALIFORNIA" was * For example, a collator for "en_US_CALIFORNIA" was
* requested. In the current state of ICU (2.0), * requested. In the current state of ICU (2.0),
* the requested locale is "en_US_CALIFORNIA", * the requested locale is "en_US_CALIFORNIA",
skipping to change at line 356 skipping to change at line 356
#ifndef U_HIDE_DEPRECATED_API #ifndef U_HIDE_DEPRECATED_API
/** This is the requested locale /** This is the requested locale
* @deprecated ICU 2.8 * @deprecated ICU 2.8
*/ */
ULOC_REQUESTED_LOCALE = 2, ULOC_REQUESTED_LOCALE = 2,
#endif /* U_HIDE_DEPRECATED_API */ #endif /* U_HIDE_DEPRECATED_API */
ULOC_DATA_LOCALE_TYPE_LIMIT = 3 ULOC_DATA_LOCALE_TYPE_LIMIT = 3
} ULocDataLocaleType ; } ULocDataLocaleType ;
#ifndef U_HIDE_SYSTEM_API
/** /**
* Gets ICU's default locale. * Gets ICU's default locale.
* The returned string is a snapshot in time, and will remain valid * The returned string is a snapshot in time, and will remain valid
* and unchanged even when uloc_setDefault() is called. * and unchanged even when uloc_setDefault() is called.
* The returned storage is owned by ICU, and must not be altered or delet ed * The returned storage is owned by ICU, and must not be altered or delet ed
* by the caller. * by the caller.
* *
* @return the ICU default locale * @return the ICU default locale
* @system * @system
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 390 skipping to change at line 391
* *
* @param localeID the new ICU default locale. A value of NULL will try to get * @param localeID the new ICU default locale. A value of NULL will try to get
* the system's default locale. * the system's default locale.
* @param status the error information if the setting of default locale fai ls * @param status the error information if the setting of default locale fai ls
* @system * @system
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uloc_setDefault(const char* localeID, uloc_setDefault(const char* localeID,
UErrorCode* status); UErrorCode* status);
#endif /* U_HIDE_SYSTEM_API */
/** /**
* Gets the language code for the specified locale. * Gets the language code for the specified locale.
* *
* @param localeID the locale to get the ISO language code with * @param localeID the locale to get the ISO language code with
* @param language the language code for localeID * @param language the language code for localeID
* @param languageCapacity the size of the language buffer to store the * @param languageCapacity the size of the language buffer to store the
* language code with * language code with
* @param err error information if retrieving the language code failed * @param err error information if retrieving the language code failed
* @return the actual buffer size needed for the language code. If it's gr eater * @return the actual buffer size needed for the language code. If it's gr eater
skipping to change at line 1071 skipping to change at line 1073
* supports grandfathered (regular and irregular) as well as private * supports grandfathered (regular and irregular) as well as private
* use language tags. Private use tags are represented as 'x-whatever', * use language tags. Private use tags are represented as 'x-whatever',
* and grandfathered tags are converted to their canonical replacements * and grandfathered tags are converted to their canonical replacements
* where they exist. Note that a few grandfathered tags have no modern * where they exist. Note that a few grandfathered tags have no modern
* replacement, these will be converted using the fallback described in * replacement, these will be converted using the fallback described in
* the first paragraph, so some information might be lost. * the first paragraph, so some information might be lost.
* @param langtag the input BCP47 language tag. * @param langtag the input BCP47 language tag.
* @param localeID the output buffer receiving a locale ID for the * @param localeID the output buffer receiving a locale ID for the
* specified BCP47 language tag. * specified BCP47 language tag.
* @param localeIDCapacity the size of the locale ID output buffer. * @param localeIDCapacity the size of the locale ID output buffer.
* @param parsedLength if not NULL, succsessfully parsed length * @param parsedLength if not NULL, successfully parsed length
* for the input language tag is set. * for the input language tag is set.
* @param err error information if receiving the locald ID * @param err error information if receiving the locald ID
* failed. * failed.
* @return the length of the locale ID. * @return the length of the locale ID.
* @draft ICU 4.2 * @stable ICU 4.2
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uloc_forLanguageTag(const char* langtag, uloc_forLanguageTag(const char* langtag,
char* localeID, char* localeID,
int32_t localeIDCapacity, int32_t localeIDCapacity,
int32_t* parsedLength, int32_t* parsedLength,
UErrorCode* err); UErrorCode* err);
/** /**
* Returns a well-formed language tag for this locale ID. * Returns a well-formed language tag for this locale ID.
* <p> * <p>
* <b>Note</b>: When <code>strict</code> is FALSE, any locale * <b>Note</b>: When <code>strict</code> is FALSE, any locale
* fields which do not satisfy the BCP47 syntax requirement will * fields which do not satisfy the BCP47 syntax requirement will
* be omitted from the result. When <code>strict</code> is * be omitted from the result. When <code>strict</code> is
* TRUE, this function sets U_ILLEGAL_ARGUMENT_ERROR to the * TRUE, this function sets U_ILLEGAL_ARGUMENT_ERROR to the
* <code>err</code> if any locale fields do not satisfy the * <code>err</code> if any locale fields do not satisfy the
* BCP47 syntax requirement. * BCP47 syntax requirement.
* @param localeID the input lcoale ID * @param localeID the input locale ID
* @param langtag the output buffer receiving BCP47 language * @param langtag the output buffer receiving BCP47 language
* tag for the locale ID. * tag for the locale ID.
* @param langtagCapacity the size of the BCP47 language tag * @param langtagCapacity the size of the BCP47 language tag
* output buffer. * output buffer.
* @param strict boolean value indicating if the function returns * @param strict boolean value indicating if the function returns
* an error for an ill-formed input locale ID. * an error for an ill-formed input locale ID.
* @param err error information if receiving the language * @param err error information if receiving the language
* tag failed. * tag failed.
* @return The length of the BCP47 language tag. * @return The length of the BCP47 language tag.
* @draft ICU 4.2 * @stable ICU 4.2
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uloc_toLanguageTag(const char* localeID, uloc_toLanguageTag(const char* localeID,
char* langtag, char* langtag,
int32_t langtagCapacity, int32_t langtagCapacity,
UBool strict, UBool strict,
UErrorCode* err); UErrorCode* err);
#endif /*_ULOC*/ #endif /*_ULOC*/
 End of changes. 10 change blocks. 
8 lines changed or deleted 10 lines changed or added


 ulocdata.h   ulocdata.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* * * *
* Copyright (C) 2003-2011, International Business Machines * * Copyright (C) 2003-2012, International Business Machines *
* Corporation and others. All Rights Reserved. * * Corporation and others. All Rights Reserved. *
* * * *
*************************************************************************** *** *************************************************************************** ***
* file name: ulocdata.h * file name: ulocdata.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2003Oct21 * created on: 2003Oct21
* created by: Ram Viswanadha * created by: Ram Viswanadha
skipping to change at line 44 skipping to change at line 44
typedef struct ULocaleData ULocaleData; typedef struct ULocaleData ULocaleData;
/** The possible types of exemplar character sets. /** The possible types of exemplar character sets.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum ULocaleDataExemplarSetType { typedef enum ULocaleDataExemplarSetType {
/** Basic set @stable ICU 3.4 */ /** Basic set @stable ICU 3.4 */
ULOCDATA_ES_STANDARD=0, ULOCDATA_ES_STANDARD=0,
/** Auxiliary set @stable ICU 3.4 */ /** Auxiliary set @stable ICU 3.4 */
ULOCDATA_ES_AUXILIARY=1, ULOCDATA_ES_AUXILIARY=1,
/** Index Character set @draft ICU 4.8 */ /** Index Character set @stable ICU 4.8 */
ULOCDATA_ES_INDEX=2, ULOCDATA_ES_INDEX=2,
/** One higher than the last valid type @stable ICU 3.4 */ /** One higher than the last valid type @stable ICU 3.4 */
ULOCDATA_ES_COUNT=3 ULOCDATA_ES_COUNT=3
} ULocaleDataExemplarSetType; } ULocaleDataExemplarSetType;
/** The possible types of delimiters. /** The possible types of delimiters.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum ULocaleDataDelimiterType { typedef enum ULocaleDataDelimiterType {
/** Quotation start @stable ICU 3.4 */ /** Quotation start @stable ICU 3.4 */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 umachine.h   umachine.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1999-2011, International Business Machines * Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* file name: umachine.h * file name: umachine.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 1999sep13 * created on: 1999sep13
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 43 skipping to change at line 43
* utypes.h to provide all the general definitions for ICU. * utypes.h to provide all the general definitions for ICU.
* All of these definitions used to be in utypes.h before * All of these definitions used to be in utypes.h before
* the UTF-handling macros made this unmaintainable. * the UTF-handling macros made this unmaintainable.
* *
*/ */
/*========================================================================= =*/ /*========================================================================= =*/
/* Include platform-dependent definitions */ /* Include platform-dependent definitions */
/* which are contained in the platform-specific file platform.h */ /* which are contained in the platform-specific file platform.h */
/*========================================================================= =*/ /*========================================================================= =*/
#if defined(U_PALMOS) #include "unicode/ptypes.h" /* platform.h is included in ptypes.h */
# include "unicode/ppalmos.h"
#elif !defined(__MINGW32__) && (defined(WIN32) || defined(_WIN32) || define
d(WIN64) || defined(_WIN64))
/*
* platform.h is now also generated by MSVC Solution/Project files
* from platform.win and should always be included unless you are
* building stubdata which is built before the platform.h file is
* generated.
*/
#ifndef STUBDATA_BUILD
# include "unicode/platform.h"
#endif
# include "unicode/pwin32.h"
#else
# include "unicode/ptypes.h" /* platform.h is included in ptypes.h */
#endif
/* /*
* ANSI C headers: * ANSI C headers:
* stddef.h defines wchar_t * stddef.h defines wchar_t
*/ */
#include <stddef.h> #include <stddef.h>
/*========================================================================= =*/ /*========================================================================= =*/
/* XP_CPLUSPLUS is a cross-platform symbol which should be defined when
*/
/* using C++. It should not be defined when compiling under C.
*/
/*=========================================================================
=*/
#ifdef __cplusplus
# ifndef XP_CPLUSPLUS
# define XP_CPLUSPLUS
# endif
#else
# undef XP_CPLUSPLUS
#endif
/*=========================================================================
=*/
/* For C wrappers, we use the symbol U_STABLE. */ /* For C wrappers, we use the symbol U_STABLE. */
/* This works properly if the includer is C or C++. */ /* This works properly if the includer is C or C++. */
/* Functions are declared U_STABLE return-type U_EXPORT2 function-name(). .. */ /* Functions are declared U_STABLE return-type U_EXPORT2 function-name(). .. */
/*========================================================================= =*/ /*========================================================================= =*/
/** /**
* \def U_CFUNC * \def U_CFUNC
* This is used in a declaration of a library private ICU C function. * This is used in a declaration of a library private ICU C function.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
skipping to change at line 103 skipping to change at line 75
* This is used to begin a declaration of a library private ICU C API. * This is used to begin a declaration of a library private ICU C API.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
/** /**
* \def U_CDECL_END * \def U_CDECL_END
* This is used to end a declaration of a library private ICU C API * This is used to end a declaration of a library private ICU C API
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#ifdef XP_CPLUSPLUS #ifdef __cplusplus
# define U_CFUNC extern "C" # define U_CFUNC extern "C"
# define U_CDECL_BEGIN extern "C" { # define U_CDECL_BEGIN extern "C" {
# define U_CDECL_END } # define U_CDECL_END }
#else #else
# define U_CFUNC extern # define U_CFUNC extern
# define U_CDECL_BEGIN # define U_CDECL_BEGIN
# define U_CDECL_END # define U_CDECL_END
#endif #endif
#ifndef U_ATTRIBUTE_DEPRECATED #ifndef U_ATTRIBUTE_DEPRECATED
skipping to change at line 126 skipping to change at line 98
* This is used for GCC specific attributes * This is used for GCC specific attributes
* @internal * @internal
*/ */
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
# define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated)) # define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
/** /**
* \def U_ATTRIBUTE_DEPRECATED * \def U_ATTRIBUTE_DEPRECATED
* This is used for Visual C++ specific attributes * This is used for Visual C++ specific attributes
* @internal * @internal
*/ */
#elif defined(U_WINDOWS) && defined(_MSC_VER) && (_MSC_VER >= 1400) #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
# define U_ATTRIBUTE_DEPRECATED __declspec(deprecated) # define U_ATTRIBUTE_DEPRECATED __declspec(deprecated)
#else #else
# define U_ATTRIBUTE_DEPRECATED # define U_ATTRIBUTE_DEPRECATED
#endif #endif
#endif #endif
/** This is used to declare a function as a public ICU C API @stable ICU 2. 0*/ /** This is used to declare a function as a public ICU C API @stable ICU 2. 0*/
#define U_CAPI U_CFUNC U_EXPORT #define U_CAPI U_CFUNC U_EXPORT
/** This is used to declare a function as a stable public ICU C API*/ /** This is used to declare a function as a stable public ICU C API*/
#define U_STABLE U_CAPI #define U_STABLE U_CAPI
skipping to change at line 244 skipping to change at line 216
/** The FALSE value of a UBool @stable ICU 2.0 */ /** The FALSE value of a UBool @stable ICU 2.0 */
# define FALSE 0 # define FALSE 0
#endif #endif
/*========================================================================= =*/ /*========================================================================= =*/
/* Unicode data types */ /* Unicode data types */
/*========================================================================= =*/ /*========================================================================= =*/
/* wchar_t-related definitions -------------------------------------------- */ /* wchar_t-related definitions -------------------------------------------- */
/**
* \def U_HAVE_WCHAR_H
* Indicates whether <wchar.h> is available (1) or not (0). Set to 1 by def
ault.
*
* @stable ICU 2.0
*/
#ifndef U_HAVE_WCHAR_H
# define U_HAVE_WCHAR_H 1
#endif
/**
* \def U_SIZEOF_WCHAR_T
* U_SIZEOF_WCHAR_T==sizeof(wchar_t) (0 means it is not defined or autoconf
could not set it)
*
* @stable ICU 2.0
*/
#if U_SIZEOF_WCHAR_T==0
# undef U_SIZEOF_WCHAR_T
# define U_SIZEOF_WCHAR_T 4
#endif
/* /*
* \def U_WCHAR_IS_UTF16 * \def U_WCHAR_IS_UTF16
* Defined if wchar_t uses UTF-16. * Defined if wchar_t uses UTF-16.
* *
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
/* /*
* \def U_WCHAR_IS_UTF32 * \def U_WCHAR_IS_UTF32
* Defined if wchar_t uses UTF-32. * Defined if wchar_t uses UTF-32.
* *
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32) #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32)
# ifdef __STDC_ISO_10646__ # ifdef __STDC_ISO_10646__
# if (U_SIZEOF_WCHAR_T==2) # if (U_SIZEOF_WCHAR_T==2)
# define U_WCHAR_IS_UTF16 # define U_WCHAR_IS_UTF16
# elif (U_SIZEOF_WCHAR_T==4) # elif (U_SIZEOF_WCHAR_T==4)
# define U_WCHAR_IS_UTF32 # define U_WCHAR_IS_UTF32
# endif # endif
# elif defined __UCS2__ # elif defined __UCS2__
# if (__OS390__ || __OS400__) && (U_SIZEOF_WCHAR_T==2) # if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZ EOF_WCHAR_T==2)
# define U_WCHAR_IS_UTF16 # define U_WCHAR_IS_UTF16
# endif # endif
# elif defined __UCS4__ # elif defined(__UCS4__) || (U_PLATFORM == U_PF_OS400 && defined(__UTF32_ _))
# if (U_SIZEOF_WCHAR_T==4) # if (U_SIZEOF_WCHAR_T==4)
# define U_WCHAR_IS_UTF32 # define U_WCHAR_IS_UTF32
# endif # endif
# elif defined(U_WINDOWS) # elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T==4 && U_PLATFORM_I
S_LINUX_BASED)
# define U_WCHAR_IS_UTF32
# elif U_PLATFORM_HAS_WIN32_API
# define U_WCHAR_IS_UTF16 # define U_WCHAR_IS_UTF16
# endif # endif
#endif #endif
/* UChar and UChar32 definitions ------------------------------------------ -- */ /* UChar and UChar32 definitions ------------------------------------------ -- */
/** Number of bytes in a UChar. @stable ICU 2.0 */ /** Number of bytes in a UChar. @stable ICU 2.0 */
#define U_SIZEOF_UCHAR 2 #define U_SIZEOF_UCHAR 2
/** /**
* \var UChar * \var UChar
* Define UChar to be wchar_t if that is 16 bits wide; always assumed to be * Define UChar to be char16_t, if available,
unsigned. * or wchar_t if that is 16 bits wide; always assumed to be unsigned.
* If wchar_t is not 16 bits wide, then define UChar to be uint16_t or char * If neither is available, then define UChar to be uint16_t.
16_t because GCC >=4.4 *
* can handle UTF16 string literals.
* This makes the definition of UChar platform-dependent * This makes the definition of UChar platform-dependent
* but allows direct string type compatibility with platforms with * but allows direct string type compatibility with platforms with
* 16-bit wchar_t types. * 16-bit wchar_t types.
* *
* @draft ICU 4.4 * @stable ICU 4.4
*/ */
/* Define UChar to be compatible with wchar_t if possible. */ /* Define UChar to be compatible with char16_t or wchar_t if possible. */
#if U_SIZEOF_WCHAR_T==2 #if U_HAVE_CHAR16_T
typedef wchar_t UChar;
#elif U_GNUC_UTF16_STRING
#if defined _GCC_
typedef __CHAR16_TYPE__ char16_t;
#endif
typedef char16_t UChar; typedef char16_t UChar;
#elif U_SIZEOF_WCHAR_T==2
typedef wchar_t UChar;
#elif defined(__CHAR16_TYPE__)
typedef __CHAR16_TYPE__ UChar;
#else #else
typedef uint16_t UChar; typedef uint16_t UChar;
#endif #endif
/** /**
* Define UChar32 as a type for single Unicode code points. * Define UChar32 as a type for single Unicode code points.
* UChar32 is a signed 32-bit integer (same as int32_t). * UChar32 is a signed 32-bit integer (same as int32_t).
* *
* The Unicode code point range is 0..0x10ffff. * The Unicode code point range is 0..0x10ffff.
* All other values (negative or >=0x110000) are illegal as Unicode code po ints. * All other values (negative or >=0x110000) are illegal as Unicode code po ints.
skipping to change at line 345 skipping to change at line 298
* Before ICU 2.4 (Jitterbug 2146), UChar32 was defined * Before ICU 2.4 (Jitterbug 2146), UChar32 was defined
* to be wchar_t if that is 32 bits wide (wchar_t may be signed or unsigned ) * to be wchar_t if that is 32 bits wide (wchar_t may be signed or unsigned )
* or else to be uint32_t. * or else to be uint32_t.
* That is, the definition of UChar32 was platform-dependent. * That is, the definition of UChar32 was platform-dependent.
* *
* @see U_SENTINEL * @see U_SENTINEL
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
typedef int32_t UChar32; typedef int32_t UChar32;
/*=========================================================================
=*/
/* U_INLINE and U_ALIGN_CODE Set default values if these are not already
*/
/* defined. Definitions normally are in
*/
/* platform.h or the corresponding file for
*/
/* the OS in use.
*/
/*=========================================================================
=*/
#ifndef U_HIDE_INTERNAL_API
/**
* \def U_ALIGN_CODE
* This is used to align code fragments to a specific byte boundary.
* This is useful for getting consistent performance test results.
* @internal
*/
#ifndef U_ALIGN_CODE
# define U_ALIGN_CODE(n)
#endif
#endif /* U_HIDE_INTERNAL_API */
/** /**
* \def U_INLINE * This value is intended for sentinel values for APIs that
* This is used to request inlining of a function, on platforms and languag * (take or) return single code points (UChar32).
es which support it. * It is outside of the Unicode code point range 0..0x10ffff.
* @internal *
* For example, a "done" or "error" value in a new API
* could be indicated with U_SENTINEL.
*
* ICU APIs designed before ICU 2.4 usually define service-specific "done"
* values, mostly 0xffff.
* Those may need to be distinguished from
* actual U+ffff text contents by calling functions like
* CharacterIterator::hasNext() or UnicodeString::length().
*
* @return -1
* @see UChar32
* @stable ICU 2.4
*/ */
#define U_SENTINEL (-1)
#ifndef U_INLINE
# ifdef XP_CPLUSPLUS
# define U_INLINE inline
# else
# define U_INLINE
# endif
#endif
#include "unicode/urename.h" #include "unicode/urename.h"
#endif #endif
 End of changes. 16 change blocks. 
115 lines changed or deleted 38 lines changed or added


 uniset.h   uniset.h 
skipping to change at line 27 skipping to change at line 27
/** /**
* \file * \file
* \brief C++ API: Unicode Set * \brief C++ API: Unicode Set
*/ */
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class BMPSet; class BMPSet;
class ParsePosition; class ParsePosition;
class RBBIRuleScanner;
class SymbolTable; class SymbolTable;
class UnicodeSetStringSpan; class UnicodeSetStringSpan;
class UVector; class UVector;
class RuleCharacterIterator; class RuleCharacterIterator;
/** /**
* A mutable set of Unicode characters and multicharacter strings. Objects of this class * A mutable set of Unicode characters and multicharacter strings. Objects of this class
* represent <em>character classes</em> used in regular expressions. * represent <em>character classes</em> used in regular expressions.
* A character specifies a subset of Unicode code points. Legal * A character specifies a subset of Unicode code points. Legal
* code points are U+0000 to U+10FFFF, inclusive. * code points are U+0000 to U+10FFFF, inclusive.
skipping to change at line 379 skipping to change at line 380
* Constructs a set from the given pattern. See the class * Constructs a set from the given pattern. See the class
* description for the syntax of the pattern language. * description for the syntax of the pattern language.
* @param pattern a string specifying what characters are in the set * @param pattern a string specifying what characters are in the set
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern
* contains a syntax error. * contains a syntax error.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeSet(const UnicodeString& pattern, UnicodeSet(const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Constructs a set from the given pattern. See the class * Constructs a set from the given pattern. See the class
* description for the syntax of the pattern language. * description for the syntax of the pattern language.
* @param pattern a string specifying what characters are in the set * @param pattern a string specifying what characters are in the set
* @param options bitmask for options to apply to the pattern. * @param options bitmask for options to apply to the pattern.
* Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
* @param symbols a symbol table mapping variable names to values * @param symbols a symbol table mapping variable names to values
* and stand-in characters to UnicodeSets; may be NULL * and stand-in characters to UnicodeSets; may be NULL
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern
* contains a syntax error. * contains a syntax error.
* @internal * @internal
*/ */
UnicodeSet(const UnicodeString& pattern, UnicodeSet(const UnicodeString& pattern,
uint32_t options, uint32_t options,
const SymbolTable* symbols, const SymbolTable* symbols,
UErrorCode& status); UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Constructs a set from the given pattern. See the class description * Constructs a set from the given pattern. See the class description
* for the syntax of the pattern language. * for the syntax of the pattern language.
* @param pattern a string specifying what characters are in the set * @param pattern a string specifying what characters are in the set
* @param pos on input, the position in pattern at which to start parsi ng. * @param pos on input, the position in pattern at which to start parsi ng.
* On output, the position after the last character parsed. * On output, the position after the last character parsed.
* @param options bitmask for options to apply to the pattern. * @param options bitmask for options to apply to the pattern.
* Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
* @param symbols a symbol table mapping variable names to values * @param symbols a symbol table mapping variable names to values
skipping to change at line 589 skipping to change at line 592
* @param pattern a string specifying what characters are in the set * @param pattern a string specifying what characters are in the set
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern
* contains a syntax error. * contains a syntax error.
* <em> Empties the set passed before applying the pattern.</em> * <em> Empties the set passed before applying the pattern.</em>
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeSet& applyPattern(const UnicodeString& pattern, UnicodeSet& applyPattern(const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Modifies this set to represent the set specified by the given * Modifies this set to represent the set specified by the given
* pattern, optionally ignoring Unicode Pattern_White_Space characters. * pattern, optionally ignoring Unicode Pattern_White_Space characters.
* See the class description for the syntax of the pattern language. * See the class description for the syntax of the pattern language.
* A frozen set will not be modified. * A frozen set will not be modified.
* @param pattern a string specifying what characters are in the set * @param pattern a string specifying what characters are in the set
* @param options bitmask for options to apply to the pattern. * @param options bitmask for options to apply to the pattern.
* Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
* @param symbols a symbol table mapping variable names to * @param symbols a symbol table mapping variable names to
* values and stand-ins to UnicodeSets; may be NULL * values and stand-ins to UnicodeSets; may be NULL
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern
* contains a syntax error. * contains a syntax error.
*<em> Empties the set passed before applying the pattern.</em> *<em> Empties the set passed before applying the pattern.</em>
* @return a reference to this * @return a reference to this
* @internal * @internal
*/ */
UnicodeSet& applyPattern(const UnicodeString& pattern, UnicodeSet& applyPattern(const UnicodeString& pattern,
uint32_t options, uint32_t options,
const SymbolTable* symbols, const SymbolTable* symbols,
UErrorCode& status); UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Parses the given pattern, starting at the given position. The * Parses the given pattern, starting at the given position. The
* character at pattern.charAt(pos.getIndex()) must be '[', or the * character at pattern.charAt(pos.getIndex()) must be '[', or the
* parse fails. Parsing continues until the corresponding closing * parse fails. Parsing continues until the corresponding closing
* ']'. If a syntax error is encountered between the opening and * ']'. If a syntax error is encountered between the opening and
* closing brace, the parse fails. Upon return from a successful * closing brace, the parse fails. Upon return from a successful
* parse, the ParsePosition is updated to point to the character * parse, the ParsePosition is updated to point to the character
* following the closing ']', and a StringBuffer containing a * following the closing ']', and a StringBuffer containing a
* pairs list for the parsed pattern is returned. This method calls * pairs list for the parsed pattern is returned. This method calls
skipping to change at line 1466 skipping to change at line 1471
private: private:
/** /**
* Returns <tt>true</tt> if this set contains any character whose low b yte * Returns <tt>true</tt> if this set contains any character whose low b yte
* is the given value. This is used by <tt>RuleBasedTransliterator</tt > for * is the given value. This is used by <tt>RuleBasedTransliterator</tt > for
* indexing. * indexing.
*/ */
virtual UBool matchesIndexValue(uint8_t v) const; virtual UBool matchesIndexValue(uint8_t v) const;
private: private:
friend class RBBIRuleScanner;
//---------------------------------------------------------------- //----------------------------------------------------------------
// Implementation: Clone as thawed (see ICU4J Freezable) // Implementation: Clone as thawed (see ICU4J Freezable)
//---------------------------------------------------------------- //----------------------------------------------------------------
UnicodeSet(const UnicodeSet& o, UBool /* asThawed */); UnicodeSet(const UnicodeSet& o, UBool /* asThawed */);
//---------------------------------------------------------------- //----------------------------------------------------------------
// Implementation: Pattern parsing // Implementation: Pattern parsing
//---------------------------------------------------------------- //----------------------------------------------------------------
void applyPatternIgnoreSpace(const UnicodeString& pattern,
ParsePosition& pos,
const SymbolTable* symbols,
UErrorCode& status);
void applyPattern(RuleCharacterIterator& chars, void applyPattern(RuleCharacterIterator& chars,
const SymbolTable* symbols, const SymbolTable* symbols,
UnicodeString& rebuiltPat, UnicodeString& rebuiltPat,
uint32_t options, uint32_t options,
UnicodeSet& (UnicodeSet::*caseClosure)(int32_t attrib ute),
UErrorCode& ec); UErrorCode& ec);
//---------------------------------------------------------------- //----------------------------------------------------------------
// Implementation: Utility methods // Implementation: Utility methods
//---------------------------------------------------------------- //----------------------------------------------------------------
void ensureCapacity(int32_t newLen, UErrorCode& ec); void ensureCapacity(int32_t newLen, UErrorCode& ec);
void ensureBufferCapacity(int32_t newLen, UErrorCode& ec); void ensureBufferCapacity(int32_t newLen, UErrorCode& ec);
 End of changes. 8 change blocks. 
0 lines changed or deleted 12 lines changed or added


 unistr.h   unistr.h 
skipping to change at line 34 skipping to change at line 34
/** /**
* \file * \file
* \brief C++ API: Unicode String * \brief C++ API: Unicode String
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/rep.h" #include "unicode/rep.h"
#include "unicode/std_string.h" #include "unicode/std_string.h"
#include "unicode/stringpiece.h" #include "unicode/stringpiece.h"
#include "unicode/bytestream.h" #include "unicode/bytestream.h"
#include "unicode/ucasemap.h"
struct UConverter; // unicode/ucnv.h struct UConverter; // unicode/ucnv.h
class StringThreadTest; class StringThreadTest;
#ifndef U_COMPARE_CODE_POINT_ORDER #ifndef U_COMPARE_CODE_POINT_ORDER
/* see also ustring.h and unorm.h */ /* see also ustring.h and unorm.h */
/** /**
* Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc: * Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc:
* Compare strings in code point order instead of code unit order. * Compare strings in code point order instead of code unit order.
* @stable ICU 2.2 * @stable ICU 2.2
skipping to change at line 56 skipping to change at line 57
#endif #endif
#ifndef USTRING_H #ifndef USTRING_H
/** /**
* \ingroup ustring_ustrlen * \ingroup ustring_ustrlen
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_strlen(const UChar *s); u_strlen(const UChar *s);
#endif #endif
#ifndef U_STRING_CASE_MAPPER_DEFINED
#define U_STRING_CASE_MAPPER_DEFINED
/**
* Internal string case mapping function type.
* @internal
*/
typedef int32_t U_CALLCONV
UStringCaseMapper(const UCaseMap *csm,
UChar *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength,
UErrorCode *pErrorCode);
#endif
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class BreakIterator; // unicode/brkiter.h class BreakIterator; // unicode/brkiter.h
class Locale; // unicode/locid.h class Locale; // unicode/locid.h
class StringCharacterIterator; class StringCharacterIterator;
class UnicodeStringAppendable; // unicode/appendable.h class UnicodeStringAppendable; // unicode/appendable.h
/* The <iostream> include has been moved to unicode/ustream.h */ /* The <iostream> include has been moved to unicode/ustream.h */
/** /**
* Constant to be used in the UnicodeString(char *, int32_t, EInvariant) co nstructor * Constant to be used in the UnicodeString(char *, int32_t, EInvariant) co nstructor
* which constructs a Unicode string from an invariant-character char * str ing. * which constructs a Unicode string from an invariant-character char * str ing.
* About invariant characters see utypes.h. * About invariant characters see utypes.h.
* This constructor has no runtime dependency on conversion code and is * This constructor has no runtime dependency on conversion code and is
* therefore recommended over ones taking a charset name string * therefore recommended over ones taking a charset name string
* (where the empty string "" indicates invariant-character conversion). * (where the empty string "" indicates invariant-character conversion).
* *
* @stable ICU 3.2 * @stable ICU 3.2
*/ */
#define US_INV U_NAMESPACE_QUALIFIER UnicodeString::kInvariant #define US_INV icu::UnicodeString::kInvariant
/** /**
* Unicode String literals in C++. * Unicode String literals in C++.
* Dependent on the platform properties, different UnicodeString * Dependent on the platform properties, different UnicodeString
* constructors should be used to create a UnicodeString object from * constructors should be used to create a UnicodeString object from
* a string literal. * a string literal.
* The macros are defined for maximum performance. * The macros are defined for maximum performance.
* They work only for strings that contain "invariant characters", i.e., * They work only for strings that contain "invariant characters", i.e.,
* only latin letters, digits, and some punctuation. * only latin letters, digits, and some punctuation.
* See utypes.h for details. * See utypes.h for details.
* *
* The string parameter must be a C string literal. * The string parameter must be a C string literal.
* The length of the string, not including the terminating * The length of the string, not including the terminating
* <code>NUL</code>, must be specified as a constant. * <code>NUL</code>, must be specified as a constant.
* The U_STRING_DECL macro should be invoked exactly once for one * The U_STRING_DECL macro should be invoked exactly once for one
* such string variable before it is used. * such string variable before it is used.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#if defined(U_DECLARE_UTF16) #if defined(U_DECLARE_UTF16)
# define UNICODE_STRING(cs, _length) U_NAMESPACE_QUALIFIER UnicodeString( TRUE, (const UChar *)U_DECLARE_UTF16(cs), _length) # define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const UCha r *)U_DECLARE_UTF16(cs), _length)
#elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16))) #elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16)))
# define UNICODE_STRING(cs, _length) U_NAMESPACE_QUALIFIER UnicodeString( TRUE, (const UChar *)L ## cs, _length) # define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const UCha r *)L ## cs, _length)
#elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY #elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY
# define UNICODE_STRING(cs, _length) U_NAMESPACE_QUALIFIER UnicodeString( TRUE, (const UChar *)cs, _length) # define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const UCha r *)cs, _length)
#else #else
# define UNICODE_STRING(cs, _length) U_NAMESPACE_QUALIFIER UnicodeString( cs, _length, US_INV) # define UNICODE_STRING(cs, _length) icu::UnicodeString(cs, _length, US_I NV)
#endif #endif
/** /**
* Unicode String literals in C++. * Unicode String literals in C++.
* Dependent on the platform properties, different UnicodeString * Dependent on the platform properties, different UnicodeString
* constructors should be used to create a UnicodeString object from * constructors should be used to create a UnicodeString object from
* a string literal. * a string literal.
* The macros are defined for improved performance. * The macros are defined for improved performance.
* They work only for strings that contain "invariant characters", i.e., * They work only for strings that contain "invariant characters", i.e.,
* only latin letters, digits, and some punctuation. * only latin letters, digits, and some punctuation.
* See utypes.h for details. * See utypes.h for details.
* *
* The string parameter must be a C string literal. * The string parameter must be a C string literal.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#define UNICODE_STRING_SIMPLE(cs) UNICODE_STRING(cs, -1) #define UNICODE_STRING_SIMPLE(cs) UNICODE_STRING(cs, -1)
/** /**
* \def UNISTR_FROM_CHAR_EXPLICIT
* This can be defined to be empty or "explicit".
* If explicit, then the UnicodeString(UChar) and UnicodeString(UChar32)
* constructors are marked as explicit, preventing their inadvertent use.
* @draft ICU 49
*/
#ifndef UNISTR_FROM_CHAR_EXPLICIT
# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION)
|| defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
// Auto-"explicit" in ICU library code.
# define UNISTR_FROM_CHAR_EXPLICIT explicit
# else
// Empty by default for source code compatibility.
# define UNISTR_FROM_CHAR_EXPLICIT
# endif
#endif
/**
* \def UNISTR_FROM_STRING_EXPLICIT
* This can be defined to be empty or "explicit".
* If explicit, then the UnicodeString(const char *) and UnicodeString(cons
t UChar *)
* constructors are marked as explicit, preventing their inadvertent use.
*
* In particular, this helps prevent accidentally depending on ICU conversi
on code
* by passing a string literal into an API with a const UnicodeString & par
ameter.
* @draft ICU 49
*/
#ifndef UNISTR_FROM_STRING_EXPLICIT
# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION)
|| defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
// Auto-"explicit" in ICU library code.
# define UNISTR_FROM_STRING_EXPLICIT explicit
# else
// Empty by default for source code compatibility.
# define UNISTR_FROM_STRING_EXPLICIT
# endif
#endif
/**
* UnicodeString is a string class that stores Unicode characters directly and provides * UnicodeString is a string class that stores Unicode characters directly and provides
* similar functionality as the Java String and StringBuffer classes. * similar functionality as the Java String and StringBuffer classes.
* It is a concrete implementation of the abstract class Replaceable (for t ransliteration). * It is a concrete implementation of the abstract class Replaceable (for t ransliteration).
* *
* The UnicodeString class is not suitable for subclassing. * The UnicodeString class is not suitable for subclassing.
* *
* <p>For an overview of Unicode strings in C and C++ see the * <p>For an overview of Unicode strings in C and C++ see the
* <a href="http://icu-project.org/userguide/strings.html">User Guide Strin gs chapter</a>.</p> * <a href="http://icu-project.org/userguide/strings.html">User Guide Strin gs chapter</a>.</p>
* *
* <p>In ICU, a Unicode string consists of 16-bit Unicode <em>code units</e m>. * <p>In ICU, a Unicode string consists of 16-bit Unicode <em>code units</e m>.
skipping to change at line 1244 skipping to change at line 1297
* Return the code point that contains the code unit * Return the code point that contains the code unit
* at offset <tt>offset</tt>. * at offset <tt>offset</tt>.
* If the offset is not valid (0..length()-1) then U+ffff is returned. * If the offset is not valid (0..length()-1) then U+ffff is returned.
* @param offset a valid offset into the text * @param offset a valid offset into the text
* that indicates the text offset of any of the code units * that indicates the text offset of any of the code units
* that will be assembled into a code point (21-bit value) and returned * that will be assembled into a code point (21-bit value) and returned
* @return the code point of text at <tt>offset</tt> * @return the code point of text at <tt>offset</tt>
* or 0xffff if the offset is not valid for this string * or 0xffff if the offset is not valid for this string
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UChar32 char32At(int32_t offset) const; UChar32 char32At(int32_t offset) const;
/** /**
* Adjust a random-access offset so that * Adjust a random-access offset so that
* it points to the beginning of a Unicode character. * it points to the beginning of a Unicode character.
* The offset that is passed in points to * The offset that is passed in points to
* any code unit of a code point, * any code unit of a code point,
* while the returned offset will point to the first code unit * while the returned offset will point to the first code unit
* of the same code point. * of the same code point.
* In UTF-16, if the input offset points to a second surrogate * In UTF-16, if the input offset points to a second surrogate
* of a surrogate pair, then the returned offset will point * of a surrogate pair, then the returned offset will point
* to the first surrogate. * to the first surrogate.
* @param offset a valid offset into one code point of the text * @param offset a valid offset into one code point of the text
* @return offset of the first code unit of the same code point * @return offset of the first code unit of the same code point
* @see U16_SET_CP_START * @see U16_SET_CP_START
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline int32_t getChar32Start(int32_t offset) const; int32_t getChar32Start(int32_t offset) const;
/** /**
* Adjust a random-access offset so that * Adjust a random-access offset so that
* it points behind a Unicode character. * it points behind a Unicode character.
* The offset that is passed in points behind * The offset that is passed in points behind
* any code unit of a code point, * any code unit of a code point,
* while the returned offset will point behind the last code unit * while the returned offset will point behind the last code unit
* of the same code point. * of the same code point.
* In UTF-16, if the input offset points behind the first surrogate * In UTF-16, if the input offset points behind the first surrogate
* (i.e., to the second surrogate) * (i.e., to the second surrogate)
* of a surrogate pair, then the returned offset will point * of a surrogate pair, then the returned offset will point
* behind the second surrogate (i.e., to the first surrogate). * behind the second surrogate (i.e., to the first surrogate).
* @param offset a valid offset after any code unit of a code point of th e text * @param offset a valid offset after any code unit of a code point of th e text
* @return offset of the first code unit after the same code point * @return offset of the first code unit after the same code point
* @see U16_SET_CP_LIMIT * @see U16_SET_CP_LIMIT
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline int32_t getChar32Limit(int32_t offset) const; int32_t getChar32Limit(int32_t offset) const;
/** /**
* Move the code unit index along the string by delta code points. * Move the code unit index along the string by delta code points.
* Interpret the input index as a code unit-based offset into the string, * Interpret the input index as a code unit-based offset into the string,
* move the index forward or backward by delta code points, and * move the index forward or backward by delta code points, and
* return the resulting index. * return the resulting index.
* The input index should point to the first code unit of a code point, * The input index should point to the first code unit of a code point,
* if there is more than one. * if there is more than one.
* *
* Both input and output indexes are code unit-based as for all * Both input and output indexes are code unit-based as for all
skipping to change at line 2068 skipping to change at line 2121
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& append(UChar srcChar); inline UnicodeString& append(UChar srcChar);
/** /**
* Append the code point <TT>srcChar</TT> to the UnicodeString object. * Append the code point <TT>srcChar</TT> to the UnicodeString object.
* @param srcChar the code point to append * @param srcChar the code point to append
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& append(UChar32 srcChar); UnicodeString& append(UChar32 srcChar);
/* Insert operations */ /* Insert operations */
/** /**
* Insert the characters in <TT>srcText</TT> in the range * Insert the characters in <TT>srcText</TT> in the range
* [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) into the UnicodeStr ing * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) into the UnicodeStr ing
* object at offset <TT>start</TT>. <TT>srcText</TT> is not modified. * object at offset <TT>start</TT>. <TT>srcText</TT> is not modified.
* @param start the offset where the insertion begins * @param start the offset where the insertion begins
* @param srcText the source for the new characters * @param srcText the source for the new characters
* @param srcStart the offset into <TT>srcText</TT> where new characters * @param srcStart the offset into <TT>srcText</TT> where new characters
skipping to change at line 2261 skipping to change at line 2314
* Replace the characters in the range * Replace the characters in the range
* [<TT>start</TT>, <TT>start + length</TT>) with the code point * [<TT>start</TT>, <TT>start + length</TT>) with the code point
* <TT>srcChar</TT>. * <TT>srcChar</TT>.
* @param start the offset at which the replace operation begins * @param start the offset at which the replace operation begins
* @param length the number of characters to replace. The character at * @param length the number of characters to replace. The character at
* <TT>start + length</TT> is not modified. * <TT>start + length</TT> is not modified.
* @param srcChar the new code point * @param srcChar the new code point
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& replace(int32_t start, UnicodeString& replace(int32_t start, int32_t length, UChar32 srcChar);
int32_t length,
UChar32 srcChar);
/** /**
* Replace the characters in the range [<TT>start</TT>, <TT>limit</TT>) * Replace the characters in the range [<TT>start</TT>, <TT>limit</TT>)
* with the characters in <TT>srcText</TT>. <TT>srcText</TT> is not modif ied. * with the characters in <TT>srcText</TT>. <TT>srcText</TT> is not modif ied.
* @param start the offset at which the replace operation begins * @param start the offset at which the replace operation begins
* @param limit the offset immediately following the replace range * @param limit the offset immediately following the replace range
* @param srcText the source for the new characters * @param srcText the source for the new characters
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 2801 skipping to change at line 2852
* accordingly. * accordingly.
* @param c is used to initially fill the string * @param c is used to initially fill the string
* @param count specifies how many code points c are to be written in the * @param count specifies how many code points c are to be written in the
* string * string
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString(int32_t capacity, UChar32 c, int32_t count); UnicodeString(int32_t capacity, UChar32 c, int32_t count);
/** /**
* Single UChar (code unit) constructor. * Single UChar (code unit) constructor.
*
* It is recommended to mark this constructor "explicit" by
* <code>-DUNISTR_FROM_CHAR_EXPLICIT=explicit</code>
* on the compiler command line or similar.
* @param ch the character to place in the UnicodeString * @param ch the character to place in the UnicodeString
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString(UChar ch); UNISTR_FROM_CHAR_EXPLICIT UnicodeString(UChar ch);
/** /**
* Single UChar32 (code point) constructor. * Single UChar32 (code point) constructor.
*
* It is recommended to mark this constructor "explicit" by
* <code>-DUNISTR_FROM_CHAR_EXPLICIT=explicit</code>
* on the compiler command line or similar.
* @param ch the character to place in the UnicodeString * @param ch the character to place in the UnicodeString
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString(UChar32 ch); UNISTR_FROM_CHAR_EXPLICIT UnicodeString(UChar32 ch);
/** /**
* UChar* constructor. * UChar* constructor.
*
* It is recommended to mark this constructor "explicit" by
* <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code>
* on the compiler command line or similar.
* @param text The characters to place in the UnicodeString. <TT>text</T T> * @param text The characters to place in the UnicodeString. <TT>text</T T>
* must be NULL (U+0000) terminated. * must be NULL (U+0000) terminated.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString(const UChar *text); UNISTR_FROM_STRING_EXPLICIT UnicodeString(const UChar *text);
/** /**
* UChar* constructor. * UChar* constructor.
* @param text The characters to place in the UnicodeString. * @param text The characters to place in the UnicodeString.
* @param textLength The number of Unicode characters in <TT>text</TT> * @param textLength The number of Unicode characters in <TT>text</TT>
* to copy. * to copy.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString(const UChar *text, UnicodeString(const UChar *text,
int32_t textLength); int32_t textLength);
skipping to change at line 2878 skipping to change at line 2941
* @param buffLength The number of Unicode characters in <code>buffer</co de> to alias. * @param buffLength The number of Unicode characters in <code>buffer</co de> to alias.
* @param buffCapacity The size of <code>buffer</code> in UChars. * @param buffCapacity The size of <code>buffer</code> in UChars.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString(UChar *buffer, int32_t buffLength, int32_t buffCapacity); UnicodeString(UChar *buffer, int32_t buffLength, int32_t buffCapacity);
#if U_CHARSET_IS_UTF8 || !UCONFIG_NO_CONVERSION #if U_CHARSET_IS_UTF8 || !UCONFIG_NO_CONVERSION
/** /**
* char* constructor. * char* constructor.
* Uses the default converter (and thus depends on the ICU conversion cod
e)
* unless U_CHARSET_IS_UTF8 is set to 1.
*
* For ASCII (really "invariant character") strings it is more efficient
to use
* the constructor that takes a US_INV (for its enum EInvariant).
* For ASCII (invariant-character) string literals, see UNICODE_STRING an
d
* UNICODE_STRING_SIMPLE.
*
* It is recommended to mark this constructor "explicit" by
* <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code>
* on the compiler command line or similar.
* @param codepageData an array of bytes, null-terminated, * @param codepageData an array of bytes, null-terminated,
* in the platform's default codepage. * in the platform's default codepage.
* @stable ICU 2.0 * @stable ICU 2.0
* @see UNICODE_STRING
* @see UNICODE_STRING_SIMPLE
*/ */
UnicodeString(const char *codepageData); UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char *codepageData);
/** /**
* char* constructor. * char* constructor.
* Uses the default converter (and thus depends on the ICU conversion cod
e)
* unless U_CHARSET_IS_UTF8 is set to 1.
* @param codepageData an array of bytes in the platform's default codepa ge. * @param codepageData an array of bytes in the platform's default codepa ge.
* @param dataLength The number of bytes in <TT>codepageData</TT>. * @param dataLength The number of bytes in <TT>codepageData</TT>.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString(const char *codepageData, int32_t dataLength); UnicodeString(const char *codepageData, int32_t dataLength);
#endif #endif
#if !UCONFIG_NO_CONVERSION #if !UCONFIG_NO_CONVERSION
skipping to change at line 3348 skipping to change at line 3426
* the buffer is too small. * the buffer is too small.
* *
* Return FALSE if memory could not be allocated. * Return FALSE if memory could not be allocated.
*/ */
UBool cloneArrayIfNeeded(int32_t newCapacity = -1, UBool cloneArrayIfNeeded(int32_t newCapacity = -1,
int32_t growCapacity = -1, int32_t growCapacity = -1,
UBool doCopyArray = TRUE, UBool doCopyArray = TRUE,
int32_t **pBufferToDelete = 0, int32_t **pBufferToDelete = 0,
UBool forceClone = FALSE); UBool forceClone = FALSE);
// common function for case mappings /**
* Common function for UnicodeString case mappings.
* The stringCaseMapper has the same type UStringCaseMapper
* as in ustr_imp.h for ustrcase_map().
*/
UnicodeString & UnicodeString &
caseMap(BreakIterator *titleIter, caseMap(const UCaseMap *csm, UStringCaseMapper *stringCaseMapper);
const char *locale,
uint32_t options,
int32_t toWhichCase);
// ref counting // ref counting
void addRef(void); void addRef(void);
int32_t removeRef(void); int32_t removeRef(void);
int32_t refCount(void) const; int32_t refCount(void) const;
// constants // constants
enum { enum {
// Set the stack buffer size so that sizeof(UnicodeString) is, // Set the stack buffer size so that sizeof(UnicodeString) is,
// naturally (without padding), a multiple of sizeof(pointer). // naturally (without padding), a multiple of sizeof(pointer).
skipping to change at line 4038 skipping to change at line 4117
int32_t srcLength) int32_t srcLength)
{ return doReplace(start, _length, srcChars, srcStart, srcLength); } { return doReplace(start, _length, srcChars, srcStart, srcLength); }
inline UnicodeString& inline UnicodeString&
UnicodeString::replace(int32_t start, UnicodeString::replace(int32_t start,
int32_t _length, int32_t _length,
UChar srcChar) UChar srcChar)
{ return doReplace(start, _length, &srcChar, 0, 1); } { return doReplace(start, _length, &srcChar, 0, 1); }
inline UnicodeString& inline UnicodeString&
UnicodeString::replace(int32_t start,
int32_t _length,
UChar32 srcChar) {
UChar buffer[U16_MAX_LENGTH];
int32_t count = 0;
UBool isError = FALSE;
U16_APPEND(buffer, count, U16_MAX_LENGTH, srcChar, isError);
return doReplace(start, _length, buffer, 0, count);
}
inline UnicodeString&
UnicodeString::replaceBetween(int32_t start, UnicodeString::replaceBetween(int32_t start,
int32_t limit, int32_t limit,
const UnicodeString& srcText) const UnicodeString& srcText)
{ return doReplace(start, limit - start, srcText, 0, srcText.length()); } { return doReplace(start, limit - start, srcText, 0, srcText.length()); }
inline UnicodeString& inline UnicodeString&
UnicodeString::replaceBetween(int32_t start, UnicodeString::replaceBetween(int32_t start,
int32_t limit, int32_t limit,
const UnicodeString& srcText, const UnicodeString& srcText,
int32_t srcStart, int32_t srcStart,
skipping to change at line 4146 skipping to change at line 4214
} }
inline UChar inline UChar
UnicodeString::charAt(int32_t offset) const UnicodeString::charAt(int32_t offset) const
{ return doCharAt(offset); } { return doCharAt(offset); }
inline UChar inline UChar
UnicodeString::operator[] (int32_t offset) const UnicodeString::operator[] (int32_t offset) const
{ return doCharAt(offset); } { return doCharAt(offset); }
inline UChar32
UnicodeString::char32At(int32_t offset) const
{
int32_t len = length();
if((uint32_t)offset < (uint32_t)len) {
const UChar *array = getArrayStart();
UChar32 c;
U16_GET(array, 0, offset, len, c);
return c;
} else {
return kInvalidUChar;
}
}
inline int32_t
UnicodeString::getChar32Start(int32_t offset) const {
if((uint32_t)offset < (uint32_t)length()) {
const UChar *array = getArrayStart();
U16_SET_CP_START(array, 0, offset);
return offset;
} else {
return 0;
}
}
inline int32_t
UnicodeString::getChar32Limit(int32_t offset) const {
int32_t len = length();
if((uint32_t)offset < (uint32_t)len) {
const UChar *array = getArrayStart();
U16_SET_CP_LIMIT(array, 0, offset, len);
return offset;
} else {
return len;
}
}
inline UBool inline UBool
UnicodeString::isEmpty() const { UnicodeString::isEmpty() const {
return fShortLength == 0; return fShortLength == 0;
} }
//======================================== //========================================
// Write implementation methods // Write implementation methods
//======================================== //========================================
inline void inline void
UnicodeString::setLength(int32_t len) { UnicodeString::setLength(int32_t len) {
skipping to change at line 4336 skipping to change at line 4367
inline UnicodeString& inline UnicodeString&
UnicodeString::append(const UChar *srcChars, UnicodeString::append(const UChar *srcChars,
int32_t srcLength) int32_t srcLength)
{ return doReplace(length(), 0, srcChars, 0, srcLength); } { return doReplace(length(), 0, srcChars, 0, srcLength); }
inline UnicodeString& inline UnicodeString&
UnicodeString::append(UChar srcChar) UnicodeString::append(UChar srcChar)
{ return doReplace(length(), 0, &srcChar, 0, 1); } { return doReplace(length(), 0, &srcChar, 0, 1); }
inline UnicodeString& inline UnicodeString&
UnicodeString::append(UChar32 srcChar) {
UChar buffer[U16_MAX_LENGTH];
int32_t _length = 0;
UBool isError = FALSE;
U16_APPEND(buffer, _length, U16_MAX_LENGTH, srcChar, isError);
return doReplace(length(), 0, buffer, 0, _length);
}
inline UnicodeString&
UnicodeString::operator+= (UChar ch) UnicodeString::operator+= (UChar ch)
{ return doReplace(length(), 0, &ch, 0, 1); } { return doReplace(length(), 0, &ch, 0, 1); }
inline UnicodeString& inline UnicodeString&
UnicodeString::operator+= (UChar32 ch) { UnicodeString::operator+= (UChar32 ch) {
return append(ch); return append(ch);
} }
inline UnicodeString& inline UnicodeString&
UnicodeString::operator+= (const UnicodeString& srcText) UnicodeString::operator+= (const UnicodeString& srcText)
 End of changes. 28 change blocks. 
78 lines changed or deleted 109 lines changed or added


 unorm2.h   unorm2.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2009-2010, International Business Machines * Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: unorm2.h * file name: unorm2.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2009dec15 * created on: 2009dec15
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 121 skipping to change at line 121
/** /**
* Opaque C service object type for the new normalization API. * Opaque C service object type for the new normalization API.
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
struct UNormalizer2; struct UNormalizer2;
typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNorma lizer2. @stable ICU 4.4 */ typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNorma lizer2. @stable ICU 4.4 */
#if !UCONFIG_NO_NORMALIZATION #if !UCONFIG_NO_NORMALIZATION
#ifndef U_HIDE_DRAFT_API
/**
* Returns a UNormalizer2 instance for Unicode NFC normalization.
* Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit
h
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFCInstance(UErrorCode *pErrorCode);
/**
* Returns a UNormalizer2 instance for Unicode NFD normalization.
* Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit
h
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFDInstance(UErrorCode *pErrorCode);
/**
* Returns a UNormalizer2 instance for Unicode NFKC normalization.
* Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit
h
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFKCInstance(UErrorCode *pErrorCode);
/**
* Returns a UNormalizer2 instance for Unicode NFKD normalization.
* Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit
h
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFKDInstance(UErrorCode *pErrorCode);
/**
* Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization.
* Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit
h
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
* @draft ICU 49
*/
U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Returns a UNormalizer2 instance which uses the specified data file * Returns a UNormalizer2 instance which uses the specified data file
* (packageName/name similar to ucnv_openPackage() and ures_open()/Resource Bundle) * (packageName/name similar to ucnv_openPackage() and ures_open()/Resource Bundle)
* and which composes or decomposes text according to the specified mode. * and which composes or decomposes text according to the specified mode.
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* *
* Use packageName=NULL for data files that are part of ICU's own data. * Use packageName=NULL for data files that are part of ICU's own data.
* Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFC/NFD. * Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFC/NFD.
* Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFKC/NFKD. * Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFKC/NFKD.
* Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_ Casefold. * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_ Casefold.
skipping to change at line 263 skipping to change at line 335
* @return first * @return first
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
unorm2_append(const UNormalizer2 *norm2, unorm2_append(const UNormalizer2 *norm2,
UChar *first, int32_t firstLength, int32_t firstCapacity, UChar *first, int32_t firstLength, int32_t firstCapacity,
const UChar *second, int32_t secondLength, const UChar *second, int32_t secondLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Gets the decomposition mapping of c. Equivalent to unorm2_normalize(stri * Gets the decomposition mapping of c.
ng(c)) * Roughly equivalent to normalizing the String form of c
* on a UNORM2_DECOMPOSE UNormalizer2 instance, but much faster. * on a UNORM2_DECOMPOSE UNormalizer2 instance, but much faster, and except
that this function
* returns a negative value and does not write a string
* if c does not have a decomposition mapping in this instance's data.
* This function is independent of the mode of the UNormalizer2. * This function is independent of the mode of the UNormalizer2.
* @param norm2 UNormalizer2 instance * @param norm2 UNormalizer2 instance
* @param c code point * @param c code point
* @param decomposition String buffer which will be set to c's * @param decomposition String buffer which will be set to c's
* decomposition mapping, if there is one. * decomposition mapping, if there is one.
* @param capacity number of UChars that can be written to decomposition * @param capacity number of UChars that can be written to decomposition
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function return s * pass the U_SUCCESS() test, or else the function return s
* immediately. Check for U_FAILURE() on output or use wi th * immediately. Check for U_FAILURE() on output or use wi th
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the non-negative length of c's decomposition, if there is one; o therwise a negative value * @return the non-negative length of c's decomposition, if there is one; o therwise a negative value
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
unorm2_getDecomposition(const UNormalizer2 *norm2, unorm2_getDecomposition(const UNormalizer2 *norm2,
UChar32 c, UChar *decomposition, int32_t capacity, UChar32 c, UChar *decomposition, int32_t capacity,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
#ifndef U_HIDE_DRAFT_API
/**
* Gets the raw decomposition mapping of c.
*
* This is similar to the unorm2_getDecomposition() function but returns th
e
* raw decomposition mapping as specified in UnicodeData.txt or
* (for custom data) in the mapping files processed by the gennorm2 tool.
* By contrast, unorm2_getDecomposition() returns the processed,
* recursively-decomposed version of this mapping.
*
* When used on a standard NFKC Normalizer2 instance,
* unorm2_getRawDecomposition() returns the Unicode Decomposition_Mapping (
dm) property.
*
* When used on a standard NFC Normalizer2 instance,
* it returns the Decomposition_Mapping only if the Decomposition_Type (dt)
is Canonical (Can);
* in this case, the result contains either one or two code points (=1..4 U
Chars).
*
* This function is independent of the mode of the UNormalizer2.
* @param norm2 UNormalizer2 instance
* @param c code point
* @param decomposition String buffer which will be set to c's
* raw decomposition mapping, if there is one.
* @param capacity number of UChars that can be written to decomposition
* @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function return
s
* immediately. Check for U_FAILURE() on output or use wi
th
* function chaining. (See User Guide for details.)
* @return the non-negative length of c's raw decomposition, if there is on
e; otherwise a negative value
* @draft ICU 49
*/
U_DRAFT int32_t U_EXPORT2
unorm2_getRawDecomposition(const UNormalizer2 *norm2,
UChar32 c, UChar *decomposition, int32_t capacit
y,
UErrorCode *pErrorCode);
/**
* Performs pairwise composition of a & b and returns the composite if ther
e is one.
*
* Returns a composite code point c only if c has a two-way mapping to a+b.
* In standard Unicode normalization, this means that
* c has a canonical decomposition to a+b
* and c does not have the Full_Composition_Exclusion property.
*
* This function is independent of the mode of the UNormalizer2.
* @param norm2 UNormalizer2 instance
* @param a A (normalization starter) code point.
* @param b Another code point.
* @return The non-negative composite code point if there is one; otherwise
a negative value.
* @draft ICU 49
*/
U_DRAFT UChar32 U_EXPORT2
unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b);
/**
* Gets the combining class of c.
* The default implementation returns 0
* but all standard implementations return the Unicode Canonical_Combining_
Class value.
* @param norm2 UNormalizer2 instance
* @param c code point
* @return c's combining class
* @draft ICU 49
*/
U_DRAFT uint8_t U_EXPORT2
unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Tests if the string is normalized. * Tests if the string is normalized.
* Internally, in cases where the quickCheck() method would return "maybe" * Internally, in cases where the quickCheck() method would return "maybe"
* (which is only possible for the two COMPOSE modes) this method * (which is only possible for the two COMPOSE modes) this method
* resolves to "yes" or "no" to provide a definitive result, * resolves to "yes" or "no" to provide a definitive result,
* at the cost of doing more work in those cases. * at the cost of doing more work in those cases.
* @param norm2 UNormalizer2 instance * @param norm2 UNormalizer2 instance
* @param s input string * @param s input string
* @param length length of the string, or -1 if NUL-terminated * @param length length of the string, or -1 if NUL-terminated
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
 End of changes. 5 change blocks. 
5 lines changed or deleted 162 lines changed or added


 unum.h   unum.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 1997-2011, International Business Machines Corporation and others. * Copyright (C) 1997-2012, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes * 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef _UNUM #ifndef _UNUM
#define _UNUM #define _UNUM
skipping to change at line 188 skipping to change at line 188
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
UNUM_NUMBERING_SYSTEM, UNUM_NUMBERING_SYSTEM,
/** /**
* Rule-based format defined by a pattern string. * Rule-based format defined by a pattern string.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UNUM_PATTERN_RULEBASED, UNUM_PATTERN_RULEBASED,
/** /**
* Currency format with an ISO currency code, e.g., "USD1.00". * Currency format with an ISO currency code, e.g., "USD1.00".
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UNUM_CURRENCY_ISO, UNUM_CURRENCY_ISO,
/** /**
* Currency format with a pluralized currency name, * Currency format with a pluralized currency name,
* e.g., "1.00 US dollar" and "3.00 US dollars". * e.g., "1.00 US dollar" and "3.00 US dollars".
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UNUM_CURRENCY_PLURAL, UNUM_CURRENCY_PLURAL,
/** /**
* One more than the highest number format style constant. * One more than the highest number format style constant.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UNUM_FORMAT_STYLE_COUNT, UNUM_FORMAT_STYLE_COUNT,
/** /**
* Default format * Default format
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UNUM_DEFAULT = UNUM_DECIMAL, UNUM_DEFAULT = UNUM_DECIMAL,
/** /**
* Alias for UNUM_PATTERN_DECIMAL * Alias for UNUM_PATTERN_DECIMAL
* @stable ICU 3.0 * @stable ICU 3.0
skipping to change at line 223 skipping to change at line 223
/** The possible number format rounding modes. /** The possible number format rounding modes.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UNumberFormatRoundingMode { typedef enum UNumberFormatRoundingMode {
UNUM_ROUND_CEILING, UNUM_ROUND_CEILING,
UNUM_ROUND_FLOOR, UNUM_ROUND_FLOOR,
UNUM_ROUND_DOWN, UNUM_ROUND_DOWN,
UNUM_ROUND_UP, UNUM_ROUND_UP,
/** /**
* Half-even rounding
* @stable, ICU 3.8
*/
UNUM_ROUND_HALFEVEN,
#ifndef U_HIDE_DEPRECATED_API
/**
* Half-even rounding, misspelled name * Half-even rounding, misspelled name
* @deprecated, ICU 3.8 * @deprecated, ICU 3.8
*/ */
UNUM_FOUND_HALFEVEN, UNUM_FOUND_HALFEVEN = UNUM_ROUND_HALFEVEN,
#endif /* U_HIDE_DEPRECATED_API */
UNUM_ROUND_HALFDOWN, UNUM_ROUND_HALFDOWN,
UNUM_ROUND_HALFUP, UNUM_ROUND_HALFUP,
/** /**
* ROUND_UNNECESSARY reports an error if formatted result is not exact . * ROUND_UNNECESSARY reports an error if formatted result is not exact .
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
UNUM_ROUND_UNNECESSARY, UNUM_ROUND_UNNECESSARY
/**
* Half-even rounding
* @stable, ICU 3.8
*/
UNUM_ROUND_HALFEVEN = UNUM_FOUND_HALFEVEN
} UNumberFormatRoundingMode; } UNumberFormatRoundingMode;
/** The possible number format pad positions. /** The possible number format pad positions.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UNumberFormatPadPosition { typedef enum UNumberFormatPadPosition {
UNUM_PAD_BEFORE_PREFIX, UNUM_PAD_BEFORE_PREFIX,
UNUM_PAD_AFTER_PREFIX, UNUM_PAD_AFTER_PREFIX,
UNUM_PAD_BEFORE_SUFFIX, UNUM_PAD_BEFORE_SUFFIX,
UNUM_PAD_AFTER_SUFFIX UNUM_PAD_AFTER_SUFFIX
} UNumberFormatPadPosition; } UNumberFormatPadPosition;
/** /**
* Constants for specifying currency spacing * Constants for specifying currency spacing
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
enum UCurrencySpacing { enum UCurrencySpacing {
/** @stable ICU 4.8 */
UNUM_CURRENCY_MATCH, UNUM_CURRENCY_MATCH,
/** @stable ICU 4.8 */
UNUM_CURRENCY_SURROUNDING_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH,
/** @stable ICU 4.8 */
UNUM_CURRENCY_INSERT, UNUM_CURRENCY_INSERT,
/** @stable ICU 4.8 */
UNUM_CURRENCY_SPACING_COUNT UNUM_CURRENCY_SPACING_COUNT
}; };
typedef enum UCurrencySpacing UCurrencySpacing; /**< @draft ICU 4.8 */ typedef enum UCurrencySpacing UCurrencySpacing; /**< @stable ICU 4.8 */
/**
* FieldPosition and UFieldPosition selectors for format fields
* defined by NumberFormat and UNumberFormat.
* @stable ICU 49
*/
typedef enum UNumberFormatFields {
/** @stable ICU 49 */
UNUM_INTEGER_FIELD,
/** @stable ICU 49 */
UNUM_FRACTION_FIELD,
/** @stable ICU 49 */
UNUM_DECIMAL_SEPARATOR_FIELD,
/** @stable ICU 49 */
UNUM_EXPONENT_SYMBOL_FIELD,
/** @stable ICU 49 */
UNUM_EXPONENT_SIGN_FIELD,
/** @stable ICU 49 */
UNUM_EXPONENT_FIELD,
/** @stable ICU 49 */
UNUM_GROUPING_SEPARATOR_FIELD,
/** @stable ICU 49 */
UNUM_CURRENCY_FIELD,
/** @stable ICU 49 */
UNUM_PERCENT_FIELD,
/** @stable ICU 49 */
UNUM_PERMILL_FIELD,
/** @stable ICU 49 */
UNUM_SIGN_FIELD,
/** @stable ICU 49 */
UNUM_FIELD_COUNT
} UNumberFormatFields;
/** /**
* Create and return a new UNumberFormat for formatting and parsing * Create and return a new UNumberFormat for formatting and parsing
* numbers. A UNumberFormat may be used to format numbers by calling * numbers. A UNumberFormat may be used to format numbers by calling
* {@link #unum_format }, and to parse numbers by calling {@link #unum_pars e }. * {@link #unum_format }, and to parse numbers by calling {@link #unum_pars e }.
* The caller must call {@link #unum_close } when done to release resources * The caller must call {@link #unum_close } when done to release resources
* used by this object. * used by this object.
* @param style The type of number format to open: one of * @param style The type of number format to open: one of
* UNUM_DECIMAL, UNUM_CURRENCY, UNUM_PERCENT, UNUM_SCIENTIFIC, UNUM_SPELLOU T, * UNUM_DECIMAL, UNUM_CURRENCY, UNUM_PERCENT, UNUM_SCIENTIFIC, UNUM_SPELLOU T,
* UNUM_PATTERN_DECIMAL, UNUM_PATTERN_RULEBASED, or UNUM_DEFAULT. * UNUM_PATTERN_DECIMAL, UNUM_PATTERN_RULEBASED, or UNUM_DEFAULT.
skipping to change at line 950 skipping to change at line 988
/** Nan symbol */ /** Nan symbol */
UNUM_NAN_SYMBOL = 15, UNUM_NAN_SYMBOL = 15,
/** Significant digit symbol /** Significant digit symbol
* @stable ICU 3.0 */ * @stable ICU 3.0 */
UNUM_SIGNIFICANT_DIGIT_SYMBOL = 16, UNUM_SIGNIFICANT_DIGIT_SYMBOL = 16,
/** The monetary grouping separator /** The monetary grouping separator
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL = 17, UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL = 17,
/** One /** One
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_ONE_DIGIT_SYMBOL = 18, UNUM_ONE_DIGIT_SYMBOL = 18,
/** Two /** Two
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_TWO_DIGIT_SYMBOL = 19, UNUM_TWO_DIGIT_SYMBOL = 19,
/** Three /** Three
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_THREE_DIGIT_SYMBOL = 20, UNUM_THREE_DIGIT_SYMBOL = 20,
/** Four /** Four
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_FOUR_DIGIT_SYMBOL = 21, UNUM_FOUR_DIGIT_SYMBOL = 21,
/** Five /** Five
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_FIVE_DIGIT_SYMBOL = 22, UNUM_FIVE_DIGIT_SYMBOL = 22,
/** Six /** Six
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_SIX_DIGIT_SYMBOL = 23, UNUM_SIX_DIGIT_SYMBOL = 23,
/** Seven /** Seven
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_SEVEN_DIGIT_SYMBOL = 24, UNUM_SEVEN_DIGIT_SYMBOL = 24,
/** Eight /** Eight
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_EIGHT_DIGIT_SYMBOL = 25, UNUM_EIGHT_DIGIT_SYMBOL = 25,
/** Nine /** Nine
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
UNUM_NINE_DIGIT_SYMBOL = 26, UNUM_NINE_DIGIT_SYMBOL = 26,
/** count symbol constants */ /** count symbol constants */
UNUM_FORMAT_SYMBOL_COUNT = 27 UNUM_FORMAT_SYMBOL_COUNT = 27
} UNumberFormatSymbol; } UNumberFormatSymbol;
/** /**
* Get a symbol associated with a UNumberFormat. * Get a symbol associated with a UNumberFormat.
* A UNumberFormat uses symbols to represent the special locale-dependent * A UNumberFormat uses symbols to represent the special locale-dependent
* characters in a number, for example the percent sign. This API is not * characters in a number, for example the percent sign. This API is not
 End of changes. 23 change blocks. 
23 lines changed or deleted 61 lines changed or added


 uobject.h   uobject.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 2002-2010, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* file name: uobject.h * file name: uobject.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2002jun26 * created on: 2002jun26
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
#ifndef __UOBJECT_H__ #ifndef __UOBJECT_H__
#define __UOBJECT_H__ #define __UOBJECT_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
U_NAMESPACE_BEGIN
/** /**
* \file * \file
* \brief C++ API: Common ICU base class UObject. * \brief C++ API: Common ICU base class UObject.
*/ */
/** U_OVERRIDE_CXX_ALLOCATION - Define this to override operator new and
* delete in UMemory. Enabled by default for
ICU.
*
* Enabling forces all allocation of ICU object types to use ICU's
* memory allocation. On Windows, this allows the ICU DLL to be use
d by
* applications that statically link the C Runtime library, meaning
that
* the app and ICU will be using different heaps.
*
* @stable ICU 2.2
*/
#ifndef U_OVERRIDE_CXX_ALLOCATION
#define U_OVERRIDE_CXX_ALLOCATION 1
#endif
/**
* \def U_HAVE_PLACEMENT_NEW
* Define this to define the placement new and
* delete in UMemory for STL.
*
* @stable ICU 2.6
*/
#ifndef U_HAVE_PLACEMENT_NEW
#define U_HAVE_PLACEMENT_NEW 1
#endif
/**
* \def U_HAVE_DEBUG_LOCATION_NEW
* Define this to define the MFC debug
* version of the operator new.
*
* @stable ICU 3.4
*/
#ifndef U_HAVE_DEBUG_LOCATION_NEW
#define U_HAVE_DEBUG_LOCATION_NEW 0
#endif
/** /**
* @{ * @{
* \def U_NO_THROW * \def U_NO_THROW
* Define this to define the throw() specification so * Define this to define the throw() specification so
* certain functions do not throw any exceptions * certain functions do not throw any exceptions
* *
* UMemory operator new methods should have the throw() specificati on * UMemory operator new methods should have the throw() specificati on
* appended to them, so that the compiler adds the additional NULL check * appended to them, so that the compiler adds the additional NULL check
* before calling constructors. Without, if <code>operator new</cod e> returns NULL the * before calling constructors. Without, if <code>operator new</cod e> returns NULL the
* constructor is still called, and if the constructor references m ember * constructor is still called, and if the constructor references m ember
* data, (which it typically does), the result is a segmentation vi olation. * data, (which it typically does), the result is a segmentation vi olation.
* *
* @draft ICU 4.2 * @stable ICU 4.2
*/ */
#ifndef U_NO_THROW #ifndef U_NO_THROW
#define U_NO_THROW throw() #define U_NO_THROW throw()
#endif #endif
/** @} */ /** @} */
/*=========================================================================
==*/
/* UClassID-based RTTI */
/*=========================================================================
==*/
/**
* UClassID is used to identify classes without using the compiler's RTTI.
* This was used before C++ compilers consistently supported RTTI.
* ICU 4.6 requires compiler RTTI to be turned on.
*
* Each class hierarchy which needs
* to implement polymorphic clone() or operator==() defines two methods,
* described in detail below. UClassID values can be compared using
* operator==(). Nothing else should be done with them.
*
* \par
* getDynamicClassID() is declared in the base class of the hierarchy as
* a pure virtual. Each concrete subclass implements it in the same way:
*
* \code
* class Base {
* public:
* virtual UClassID getDynamicClassID() const = 0;
* }
*
* class Derived {
* public:
* virtual UClassID getDynamicClassID() const
* { return Derived::getStaticClassID(); }
* }
* \endcode
*
* Each concrete class implements getStaticClassID() as well, which allows
* clients to test for a specific type.
*
* \code
* class Derived {
* public:
* static UClassID U_EXPORT2 getStaticClassID();
* private:
* static char fgClassID;
* }
*
* // In Derived.cpp:
* UClassID Derived::getStaticClassID()
* { return (UClassID)&Derived::fgClassID; }
* char Derived::fgClassID = 0; // Value is irrelevant
* \endcode
* @stable ICU 2.0
*/
typedef void* UClassID;
U_NAMESPACE_BEGIN
/** /**
* UMemory is the common ICU base class. * UMemory is the common ICU base class.
* All other ICU C++ classes are derived from UMemory (starting with ICU 2. 4). * All other ICU C++ classes are derived from UMemory (starting with ICU 2. 4).
* *
* This is primarily to make it possible and simple to override the * This is primarily to make it possible and simple to override the
* C++ memory management by adding new/delete operators to this base class. * C++ memory management by adding new/delete operators to this base class.
* *
* To override ALL ICU memory management, including that from plain C code, * To override ALL ICU memory management, including that from plain C code,
* replace the allocation functions declared in cmemory.h * replace the allocation functions declared in cmemory.h
* *
skipping to change at line 289 skipping to change at line 304
// * @internal // * @internal
// */ // */
// static UClassID getStaticClassID(); // static UClassID getStaticClassID();
// //
// /** // /**
// * @internal // * @internal
// */ // */
// UBool instanceOf(UClassID type) const; // UBool instanceOf(UClassID type) const;
}; };
#ifndef U_HIDE_INTERNAL_API
/** /**
* This is a simple macro to add ICU RTTI to an ICU object implementation. * This is a simple macro to add ICU RTTI to an ICU object implementation.
* This does not go into the header. This should only be used in *.cpp file s. * This does not go into the header. This should only be used in *.cpp file s.
* *
* @param myClass The name of the class that needs RTTI defined. * @param myClass The name of the class that needs RTTI defined.
* @internal * @internal
*/ */
#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass) \ #define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass) \
UClassID U_EXPORT2 myClass::getStaticClassID() { \ UClassID U_EXPORT2 myClass::getStaticClassID() { \
static char classID = 0; \ static char classID = 0; \
skipping to change at line 346 skipping to change at line 362
// * @param myClass The name of the class that needs RTTI defined. // * @param myClass The name of the class that needs RTTI defined.
// * @param myParent The name of the myClass's parent. // * @param myParent The name of the myClass's parent.
// * @internal // * @internal
// */ // */
/*#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass, myParent) \ /*#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass, myParent) \
UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass, myParent) \ UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass, myParent) \
UClassID myClass::getDynamicClassID() const { \ UClassID myClass::getDynamicClassID() const { \
return myClass::getStaticClassID(); \ return myClass::getStaticClassID(); \
} }
*/ */
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
 End of changes. 7 change blocks. 
43 lines changed or deleted 59 lines changed or added


 upluralrules.h   upluralrules.h 
/* /*
*************************************************************************** ************** *************************************************************************** **************
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ************** *************************************************************************** **************
*/ */
#ifndef UPLURALRULES_H #ifndef UPLURALRULES_H
#define UPLURALRULES_H #define UPLURALRULES_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
/** /**
* \file
* \brief C API: Plural rules, select plural keywords for numeric values.
*
* A UPluralRules object defines rules for mapping non-negative numeric * A UPluralRules object defines rules for mapping non-negative numeric
* values onto a small set of keywords. Rules are constructed from a text * values onto a small set of keywords. Rules are constructed from a text
* description, consisting of a series of keywords and conditions. * description, consisting of a series of keywords and conditions.
* The uplrules_select function examines each condition in order and * The uplrules_select function examines each condition in order and
* returns the keyword for the first condition that matches the number. * returns the keyword for the first condition that matches the number.
* If none match, the default rule(other) is returned. * If none match, the default rule(other) is returned.
* *
* For more information, see the LDML spec, C.11 Language Plural Rules: * For more information, see the LDML spec, C.11 Language Plural Rules:
* http://www.unicode.org/reports/tr35/#Language_Plural_Rules * http://www.unicode.org/reports/tr35/#Language_Plural_Rules
* *
skipping to change at line 39 skipping to change at line 42
* 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check * 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check
* the value of keyword returned by the uplrules_select function. * the value of keyword returned by the uplrules_select function.
* *
* These are based on CLDR <i>Language Plural Rules</i>. For these * These are based on CLDR <i>Language Plural Rules</i>. For these
* predefined rules, see the CLDR page at * predefined rules, see the CLDR page at
* http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plura l_rules.html * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plura l_rules.html
*/ */
/** /**
* Opaque UPluralRules object for use in C programs. * Opaque UPluralRules object for use in C programs.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
struct UPluralRules; struct UPluralRules;
typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPlura lRules. @draft ICU 4.8 */ typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPlura lRules. @stable ICU 4.8 */
/** /**
* Open a new UPluralRules object using the predefined plural rules for a * Open a new UPluralRules object using the predefined plural rules for a
* given locale. * given locale.
* @param locale The locale for which the rules are desired. * @param locale The locale for which the rules are desired.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return A UPluralRules for the specified locale, or 0 if an error occurr ed. * @return A UPluralRules for the specified locale, or 0 if an error occurr ed.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UPluralRules* U_EXPORT2 U_DRAFT UPluralRules* U_EXPORT2
uplrules_open(const char *locale, uplrules_open(const char *locale,
UErrorCode *status); UErrorCode *status);
/** /**
* Close a UPluralRules object. Once closed it may no longer be used. * Close a UPluralRules object. Once closed it may no longer be used.
* @param uplrules The UPluralRules object to close. * @param uplrules The UPluralRules object to close.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uplrules_close(UPluralRules *uplrules); uplrules_close(UPluralRules *uplrules);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* \class LocalUPluralRulesPointer * \class LocalUPluralRulesPointer
* "Smart pointer" class, closes a UPluralRules via uplrules_close(). * "Smart pointer" class, closes a UPluralRules via uplrules_close().
* For most methods see the LocalPointerBase base class. * For most methods see the LocalPointerBase base class.
* *
* @see LocalPointerBase * @see LocalPointerBase
* @see LocalPointer * @see LocalPointer
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DEFINE_LOCAL_OPEN_POINTER(LocalUPluralRulesPointer, UPluralRules, uplrule s_close); U_DEFINE_LOCAL_OPEN_POINTER(LocalUPluralRulesPointer, UPluralRules, uplrule s_close);
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
/** /**
* Given a number, returns the keyword of the first rule that * Given a number, returns the keyword of the first rule that
* applies to the number, according to the supplied UPluralRules object. * applies to the number, according to the supplied UPluralRules object.
* @param uplrules The UPluralRules object specifying the rules. * @param uplrules The UPluralRules object specifying the rules.
* @param number The number for which the rule has to be determined. * @param number The number for which the rule has to be determined.
* @param keyword The keyword of the rule that applies to number. * @param keyword The keyword of the rule that applies to number.
* @param capacity The capacity of keyword. * @param capacity The capacity of keyword.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The length of keyword. * @return The length of keyword.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uplrules_select(const UPluralRules *uplrules, uplrules_select(const UPluralRules *uplrules,
double number, double number,
UChar *keyword, int32_t capacity, UChar *keyword, int32_t capacity,
UErrorCode *status); UErrorCode *status);
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 8 change blocks. 
7 lines changed or deleted 10 lines changed or added


 uregex.h   uregex.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2004-2011, International Business Machines * Copyright (C) 2004-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* file name: uregex.h * file name: uregex.h
* encoding: US-ASCII * encoding: US-ASCII
* indentation:4 * indentation:4
* *
* created on: 2004mar09 * created on: 2004mar09
* created by: Andy Heninger * created by: Andy Heninger
* *
* ICU Regular Expressions, API for C * ICU Regular Expressions, API for C
skipping to change at line 66 skipping to change at line 66
/** Allow white space and comments within patterns @stable ICU 2.4 */ /** Allow white space and comments within patterns @stable ICU 2.4 */
UREGEX_COMMENTS = 4, UREGEX_COMMENTS = 4,
/** If set, '.' matches line terminators, otherwise '.' matching stop s at line end. /** If set, '.' matches line terminators, otherwise '.' matching stop s at line end.
* @stable ICU 2.4 */ * @stable ICU 2.4 */
UREGEX_DOTALL = 32, UREGEX_DOTALL = 32,
/** If set, treat the entire pattern as a literal string. /** If set, treat the entire pattern as a literal string.
* Metacharacters or escape sequences in the input sequence will be g iven * Metacharacters or escape sequences in the input sequence will be g iven
* no special meaning. Not implemented yet as of ICU 4.4. * no special meaning.
* *
* The flags CASE_INSENSITIVE and UNICODE_CASE retain their impact * The flag UREGEX_CASE_INSENSITIVE retains its impact
* on matching when used in conjunction with this flag. * on matching when used in conjunction with this flag.
* The other flags become superfluous. * The other flags become superfluous.
* TODO: say which escapes are still handled; anything Java does *
* early (\\u) we should still do.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UREGEX_LITERAL = 16, UREGEX_LITERAL = 16,
/** Control behavior of "$" and "^" /** Control behavior of "$" and "^"
* If set, recognize line terminators within string, * If set, recognize line terminators within string,
* otherwise, match only at start and end of input string. * otherwise, match only at start and end of input string.
* @stable ICU 2.4 */ * @stable ICU 2.4 */
UREGEX_MULTILINE = 8, UREGEX_MULTILINE = 8,
skipping to change at line 160 skipping to change at line 159
* @param flags Flags that alter the default matching behavior fo r * @param flags Flags that alter the default matching behavior fo r
* the regular expression, UREGEX_CASE_INSENSITIVE, for * the regular expression, UREGEX_CASE_INSENSITIVE, for
* example. For default behavior, set this paramete r to zero. * example. For default behavior, set this paramete r to zero.
* See <code>enum URegexpFlag</code>. All desired f lags * See <code>enum URegexpFlag</code>. All desired f lags
* are bitwise-ORed together. * are bitwise-ORed together.
* @param pe Receives the position (line and column numbers) o f any syntax * @param pe Receives the position (line and column numbers) o f any syntax
* error within the source regular expression string . If this * error within the source regular expression string . If this
* information is not wanted, pass NULL for this par ameter. * information is not wanted, pass NULL for this par ameter.
* @param status Receives error detected by this function. * @param status Receives error detected by this function.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT URegularExpression * U_EXPORT2 U_DRAFT URegularExpression * U_EXPORT2
uregex_openUText(UText *pattern, uregex_openUText(UText *pattern,
uint32_t flags, uint32_t flags,
UParseError *pe, UParseError *pe,
UErrorCode *status); UErrorCode *status);
/** /**
* Open (compile) an ICU regular expression. The resulting regular expre ssion * Open (compile) an ICU regular expression. The resulting regular expre ssion
* handle can then be used to perform various matching operations. * handle can then be used to perform various matching operations.
skipping to change at line 280 skipping to change at line 279
/** /**
* Returns the source text of the pattern for this regular expression. * Returns the source text of the pattern for this regular expression.
* This function will work even if the pattern was originally specified as a UChar string. * This function will work even if the pattern was originally specified as a UChar string.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @return the pattern text. The storage for the text is owned by the regu lar expression * @return the pattern text. The storage for the text is owned by the regu lar expression
* object, and must not be altered or deleted. * object, and must not be altered or deleted.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_DRAFT UText * U_EXPORT2
uregex_patternUText(const URegularExpression *regexp, uregex_patternUText(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the match mode flags that were specified when compiling this regula r expression. * Get the match mode flags that were specified when compiling this regula r expression.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @return The match mode flags * @return The match mode flags
skipping to change at line 338 skipping to change at line 337
* <p> * <p>
* Regular expression matching operations work directly on the applicatio n's * Regular expression matching operations work directly on the applicatio n's
* string data; only a shallow clone is made. The subject string data mu st not be * string data; only a shallow clone is made. The subject string data mu st not be
* altered after calling this function until after all regular expression * altered after calling this function until after all regular expression
* operations involving this string data are completed. * operations involving this string data are completed.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param text The subject text string. * @param text The subject text string.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_setUText(URegularExpression *regexp, uregex_setUText(URegularExpression *regexp,
UText *text, UText *text,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the subject text that is currently associated with this * Get the subject text that is currently associated with this
* regular expression object. If the input was supplied using uregex_se tText(), * regular expression object. If the input was supplied using uregex_se tText(),
* that pointer will be returned. Otherwise, the characters in the inpu t will * that pointer will be returned. Otherwise, the characters in the inpu t will
skipping to change at line 384 skipping to change at line 383
* This function will work even if the input was originally specified as a UChar string. * This function will work even if the input was originally specified as a UChar string.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param dest A mutable UText in which to store the current input. * @param dest A mutable UText in which to store the current input.
* If NULL, a new UText will be created as an immutable shallow clone * If NULL, a new UText will be created as an immutable shallow clone
* of the actual input string. * of the actual input string.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @return The subject text currently associated with this regu lar expression. * @return The subject text currently associated with this regu lar expression.
* If a pre-allocated UText was provided, it will alway s be used and returned. * If a pre-allocated UText was provided, it will alway s be used and returned.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_DRAFT UText * U_EXPORT2
uregex_getUText(URegularExpression *regexp, uregex_getUText(URegularExpression *regexp,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Set the subject text string upon which the regular expression is looki ng for matches * Set the subject text string upon which the regular expression is looki ng for matches
* without changing any other aspect of the matching state. * without changing any other aspect of the matching state.
* The new and previous text strings must have the same content. * The new and previous text strings must have the same content.
skipping to change at line 414 skipping to change at line 413
* and replaces them with references to the new. * and replaces them with references to the new.
* *
* Caution: this function is normally used only by very specialized * Caution: this function is normally used only by very specialized
* system-level code. One example use case is with garbage co llection * system-level code. One example use case is with garbage co llection
* that moves the text in memory. * that moves the text in memory.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param text The new (moved) text string. * @param text The new (moved) text string.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* *
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_refreshUText(URegularExpression *regexp, uregex_refreshUText(URegularExpression *regexp,
UText *text, UText *text,
UErrorCode *status); UErrorCode *status);
/** /**
* Attempts to match the input string against the pattern. * Attempts to match the input string against the pattern.
* To succeed, the match must extend to the end of the string, * To succeed, the match must extend to the end of the string,
* or cover the complete match region. * or cover the complete match region.
skipping to change at line 465 skipping to change at line 464
* *
* If startIndex == -1 the match must cover the input region, or the ent ire * If startIndex == -1 the match must cover the input region, or the ent ire
* input string if no region has been set. This directly corresponds to * input string if no region has been set. This directly corresponds to
* Matcher.matches() in Java * Matcher.matches() in Java
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param startIndex The input string (native) index at which to begi n matching, or -1 * @param startIndex The input string (native) index at which to begi n matching, or -1
* to match the input Region. * to match the input Region.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @return TRUE if there is a match * @return TRUE if there is a match
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
uregex_matches64(URegularExpression *regexp, uregex_matches64(URegularExpression *regexp,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Attempts to match the input string, starting from the specified index , against the pattern. * Attempts to match the input string, starting from the specified index , against the pattern.
* The match may be of any length, and is not required to extend to the end * The match may be of any length, and is not required to extend to the end
* of the input string. Contrast with uregex_matches(). * of the input string. Contrast with uregex_matches().
skipping to change at line 522 skipping to change at line 521
* *
* <p>If the match succeeds then more information can be obtained via th e * <p>If the match succeeds then more information can be obtained via th e
* <code>uregexp_start()</code>, <code>uregexp_end()</code>, * <code>uregexp_start()</code>, <code>uregexp_end()</code>,
* and <code>uregexp_group()</code> functions.</p> * and <code>uregexp_group()</code> functions.</p>
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param startIndex The input string (native) index at which to beg in matching, or * @param startIndex The input string (native) index at which to beg in matching, or
* -1 to match the Input Region * -1 to match the Input Region
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @return TRUE if there is a match. * @return TRUE if there is a match.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
uregex_lookingAt64(URegularExpression *regexp, uregex_lookingAt64(URegularExpression *regexp,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Find the first matching substring of the input string that matches th e pattern. * Find the first matching substring of the input string that matches th e pattern.
* If startIndex is >= zero the search for a match begins at the specifi ed index, * If startIndex is >= zero the search for a match begins at the specifi ed index,
* and any match region is reset. This corresponds directly with * and any match region is reset. This corresponds directly with
skipping to change at line 571 skipping to change at line 570
* or at the start of the full string if no region has been spec ified. * or at the start of the full string if no region has been spec ified.
* *
* If a match is found, <code>uregex_start(), uregex_end()</code>, and * If a match is found, <code>uregex_start(), uregex_end()</code>, and
* <code>uregex_group()</code> will provide more information regarding t he match. * <code>uregex_group()</code> will provide more information regarding t he match.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param startIndex The position (native) in the input string to beg in the search, or * @param startIndex The position (native) in the input string to beg in the search, or
* -1 to search within the Input Region. * -1 to search within the Input Region.
* @param status A reference to a UErrorCode to receive any error s. * @param status A reference to a UErrorCode to receive any error s.
* @return TRUE if a match is found. * @return TRUE if a match is found.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
uregex_find64(URegularExpression *regexp, uregex_find64(URegularExpression *regexp,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Find the next pattern match in the input string. Begin searching * Find the next pattern match in the input string. Begin searching
* the input at the location following the end of he previous match, * the input at the location following the end of he previous match,
* or at the start of the string (or region) if there is no * or at the start of the string (or region) if there is no
skipping to change at line 649 skipping to change at line 648
* the pattern. * the pattern.
* @param dest A mutable UText in which to store the current i nput. * @param dest A mutable UText in which to store the current i nput.
* If NULL, a new UText will be created as an immu table shallow clone * If NULL, a new UText will be created as an immu table shallow clone
* of the entire input string. * of the entire input string.
* @param groupLength The group length of the desired capture group. * @param groupLength The group length of the desired capture group.
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @return The subject text currently associated with this regular expression. * @return The subject text currently associated with this regular expression.
* If a pre-allocated UText was provided, it will always be used and returned. * If a pre-allocated UText was provided, it will always be used and returned.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_DRAFT UText * U_EXPORT2
uregex_groupUText(URegularExpression *regexp, uregex_groupUText(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UText *dest, UText *dest,
int64_t *groupLength, int64_t *groupLength,
UErrorCode *status); UErrorCode *status);
#ifndef U_HIDE_INTERNAL_API
/** Extract the string for the specified matching expression or subexpressi on. /** Extract the string for the specified matching expression or subexpressi on.
* Group #0 is the complete string of matched text. * Group #0 is the complete string of matched text.
* Group #1 is the text matched by the first set of capturing parentheses. * Group #1 is the text matched by the first set of capturing parentheses.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param groupNum The capture group to extract. Group 0 is the c omplete * @param groupNum The capture group to extract. Group 0 is the c omplete
* match. The value of this parameter must be * match. The value of this parameter must be
* less than or equal to the number of capture gro ups in * less than or equal to the number of capture gro ups in
* the pattern. * the pattern.
* @param dest Mutable UText to receive the matching string da ta. * @param dest Mutable UText to receive the matching string da ta.
skipping to change at line 680 skipping to change at line 680
* @return The matching string data. If a pre-allocated UT ext was provided, * @return The matching string data. If a pre-allocated UT ext was provided,
* it will always be used and returned. * it will always be used and returned.
* *
* @internal ICU 4.4 technology preview * @internal ICU 4.4 technology preview
*/ */
U_INTERNAL UText * U_EXPORT2 U_INTERNAL UText * U_EXPORT2
uregex_groupUTextDeep(URegularExpression *regexp, uregex_groupUTextDeep(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Returns the index in the input string of the start of the text matche d by the * Returns the index in the input string of the start of the text matche d by the
* specified capture group during the previous match operation. Return -1 if * specified capture group during the previous match operation. Return -1 if
* the capture group was not part of the last match. * the capture group was not part of the last match.
* Group #0 refers to the complete range of matched text. * Group #0 refers to the complete range of matched text.
* Group #1 refers to the text matched by the first set of capturing par entheses. * Group #1 refers to the text matched by the first set of capturing par entheses.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param groupNum The capture group number * @param groupNum The capture group number
skipping to change at line 713 skipping to change at line 714
* specified capture group during the previous match operation. Return -1 if * specified capture group during the previous match operation. Return -1 if
* the capture group was not part of the last match. * the capture group was not part of the last match.
* Group #0 refers to the complete range of matched text. * Group #0 refers to the complete range of matched text.
* Group #1 refers to the text matched by the first set of capturing par entheses. * Group #1 refers to the text matched by the first set of capturing par entheses.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param groupNum The capture group number * @param groupNum The capture group number
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @return the starting (native) position in the input of the text matched * @return the starting (native) position in the input of the text matched
* by the specified group. * by the specified group.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_DRAFT int64_t U_EXPORT2
uregex_start64(URegularExpression *regexp, uregex_start64(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UErrorCode *status); UErrorCode *status);
/** /**
* Returns the index in the input string of the position following the e nd * Returns the index in the input string of the position following the e nd
* of the text matched by the specified capture group. * of the text matched by the specified capture group.
* Return -1 if the capture group was not part of the last match. * Return -1 if the capture group was not part of the last match.
skipping to change at line 750 skipping to change at line 751
* Returns the index in the input string of the position following the e nd * Returns the index in the input string of the position following the e nd
* of the text matched by the specified capture group. * of the text matched by the specified capture group.
* Return -1 if the capture group was not part of the last match. * Return -1 if the capture group was not part of the last match.
* Group #0 refers to the complete range of matched text. * Group #0 refers to the complete range of matched text.
* Group #1 refers to the text matched by the first set of capturing par entheses. * Group #1 refers to the text matched by the first set of capturing par entheses.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param groupNum The capture group number * @param groupNum The capture group number
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @return the (native) index of the position following th e last matched character. * @return the (native) index of the position following th e last matched character.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_DRAFT int64_t U_EXPORT2
uregex_end64(URegularExpression *regexp, uregex_end64(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UErrorCode *status); UErrorCode *status);
/** /**
* Reset any saved state from the previous match. Has the effect of * Reset any saved state from the previous match. Has the effect of
* causing uregex_findNext to begin at the specified index, and causing * causing uregex_findNext to begin at the specified index, and causing
* uregex_start(), uregex_end() and uregex_group() to return an error * uregex_start(), uregex_end() and uregex_group() to return an error
skipping to change at line 787 skipping to change at line 788
* Reset any saved state from the previous match. Has the effect of * Reset any saved state from the previous match. Has the effect of
* causing uregex_findNext to begin at the specified index, and causing * causing uregex_findNext to begin at the specified index, and causing
* uregex_start(), uregex_end() and uregex_group() to return an error * uregex_start(), uregex_end() and uregex_group() to return an error
* indicating that there is no match information available. Clears any * indicating that there is no match information available. Clears any
* match region that may have been set. * match region that may have been set.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param index The position (native) in the text at which a * @param index The position (native) in the text at which a
* uregex_findNext() should begin searching. * uregex_findNext() should begin searching.
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_reset64(URegularExpression *regexp, uregex_reset64(URegularExpression *regexp,
int64_t index, int64_t index,
UErrorCode *status); UErrorCode *status);
/** /**
* Sets the limits of the matching region for this URegularExpression. * Sets the limits of the matching region for this URegularExpression.
* The region is the part of the input string that will be considered when matching. * The region is the part of the input string that will be considered when matching.
* Invoking this method resets any saved state from the previous match, * Invoking this method resets any saved state from the previous match,
skipping to change at line 839 skipping to change at line 840
* and useAnchoringBounds), certain constructs such as anchors may behave differently * and useAnchoringBounds), certain constructs such as anchors may behave differently
* at or around the boundaries of the region * at or around the boundaries of the region
* *
* The function will fail if start is greater than limit, or if either ind ex * The function will fail if start is greater than limit, or if either ind ex
* is less than zero or greater than the length of the string being match ed. * is less than zero or greater than the length of the string being match ed.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param regionStart The (native) index to begin searches at. * @param regionStart The (native) index to begin searches at.
* @param regionLimit The (native) index to end searches at (exclusive). * @param regionLimit The (native) index to end searches at (exclusive).
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_setRegion64(URegularExpression *regexp, uregex_setRegion64(URegularExpression *regexp,
int64_t regionStart, int64_t regionStart,
int64_t regionLimit, int64_t regionLimit,
UErrorCode *status); UErrorCode *status);
/** /**
* Set the matching region and the starting index for subsequent matches * Set the matching region and the starting index for subsequent matches
* in a single operation. * in a single operation.
* This is useful because the usual function for setting the starting * This is useful because the usual function for setting the starting
* index, urgex_reset(), also resets any region limits. * index, urgex_reset(), also resets any region limits.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param regionStart The (native) index to begin searches at. * @param regionStart The (native) index to begin searches at.
* @param regionLimit The (native) index to end searches at (exclusive). * @param regionLimit The (native) index to end searches at (exclusive).
* @param startIndex The index in the input text at which the next * @param startIndex The index in the input text at which the next
* match operation should begin. * match operation should begin.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_setRegionAndStart(URegularExpression *regexp, uregex_setRegionAndStart(URegularExpression *regexp,
int64_t regionStart, int64_t regionStart,
int64_t regionLimit, int64_t regionLimit,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Reports the start index of the matching region. Any matches found are l imited to * Reports the start index of the matching region. Any matches found are l imited to
skipping to change at line 889 skipping to change at line 890
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_regionStart. * 64bit version of uregex_regionStart.
* Reports the start index of the matching region. Any matches found are l imited to * Reports the start index of the matching region. Any matches found are l imited to
* to the region bounded by regionStart (inclusive) and regionEnd (exclusi ve). * to the region bounded by regionStart (inclusive) and regionEnd (exclusi ve).
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The starting (native) index of this matcher's region. * @return The starting (native) index of this matcher's region.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_DRAFT int64_t U_EXPORT2
uregex_regionStart64(const URegularExpression *regexp, uregex_regionStart64(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* Reports the end index (exclusive) of the matching region for this URegu larExpression. * Reports the end index (exclusive) of the matching region for this URegu larExpression.
* Any matches found are limited to to the region bounded by regionStart ( inclusive) * Any matches found are limited to to the region bounded by regionStart ( inclusive)
* and regionEnd (exclusive). * and regionEnd (exclusive).
* *
skipping to change at line 918 skipping to change at line 919
/** /**
* 64bit version of uregex_regionEnd. * 64bit version of uregex_regionEnd.
* Reports the end index (exclusive) of the matching region for this URegu larExpression. * Reports the end index (exclusive) of the matching region for this URegu larExpression.
* Any matches found are limited to to the region bounded by regionStart ( inclusive) * Any matches found are limited to to the region bounded by regionStart ( inclusive)
* and regionEnd (exclusive). * and regionEnd (exclusive).
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The ending point (native) of this matcher's region. * @return The ending point (native) of this matcher's region.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_DRAFT int64_t U_EXPORT2
uregex_regionEnd64(const URegularExpression *regexp, uregex_regionEnd64(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* Queries the transparency of region bounds for this URegularExpression. * Queries the transparency of region bounds for this URegularExpression.
* See useTransparentBounds for a description of transparent and opaque bo unds. * See useTransparentBounds for a description of transparent and opaque bo unds.
* By default, matching boundaries are opaque. * By default, matching boundaries are opaque.
* *
skipping to change at line 1073 skipping to change at line 1074
* references to capture groups; these take the form of $1, $2, etc. * references to capture groups; these take the form of $1, $2, etc.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param replacement A string containing the replacement text. * @param replacement A string containing the replacement text.
* @param dest A mutable UText that will receive the result . * @param dest A mutable UText that will receive the result .
* If NULL, a new UText will be created (which may not be mutable). * If NULL, a new UText will be created (which may not be mutable).
* @param status A reference to a UErrorCode to receive any e rrors. * @param status A reference to a UErrorCode to receive any e rrors.
* @return A UText containing the results of the find a nd replace. * @return A UText containing the results of the find a nd replace.
* If a pre-allocated UText was provided, it w ill always be used and returned. * If a pre-allocated UText was provided, it w ill always be used and returned.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_DRAFT UText * U_EXPORT2
uregex_replaceAllUText(URegularExpression *regexp, uregex_replaceAllUText(URegularExpression *regexp,
UText *replacement, UText *replacement,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Replaces the first substring of the input that matches the pattern * Replaces the first substring of the input that matches the pattern
* with the given replacement string. This is a convenience function t hat * with the given replacement string. This is a convenience function t hat
skipping to change at line 1132 skipping to change at line 1133
* references to capture groups; these take the form of $1, $2, etc. * references to capture groups; these take the form of $1, $2, etc.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param replacement A string containing the replacement text. * @param replacement A string containing the replacement text.
* @param dest A mutable UText that will receive the result . * @param dest A mutable UText that will receive the result .
* If NULL, a new UText will be created (which may not be mutable). * If NULL, a new UText will be created (which may not be mutable).
* @param status A reference to a UErrorCode to receive any e rrors. * @param status A reference to a UErrorCode to receive any e rrors.
* @return A UText containing the results of the find a nd replace. * @return A UText containing the results of the find a nd replace.
* If a pre-allocated UText was provided, it w ill always be used and returned. * If a pre-allocated UText was provided, it w ill always be used and returned.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_DRAFT UText * U_EXPORT2
uregex_replaceFirstUText(URegularExpression *regexp, uregex_replaceFirstUText(URegularExpression *regexp,
UText *replacement, UText *replacement,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Implements a replace operation intended to be used as part of an * Implements a replace operation intended to be used as part of an
* incremental find-and-replace. * incremental find-and-replace.
skipping to change at line 1214 skipping to change at line 1215
* operations, see replaceFirst() or replaceAll().</p> * operations, see replaceFirst() or replaceAll().</p>
* *
* @param regexp The regular expression object. * @param regexp The regular expression object.
* @param replacementText The string that will replace the matched por tion of the * @param replacementText The string that will replace the matched por tion of the
* input string as it is copied to the destination buffer. * input string as it is copied to the destination buffer.
* The replacement text may contain references ($1, for * The replacement text may contain references ($1, for
* example) to capture groups from the match. * example) to capture groups from the match.
* @param dest A mutable UText that will receive the result. Mu st not be NULL. * @param dest A mutable UText that will receive the result. Mu st not be NULL.
* @param status A reference to a UErrorCode to receive any error s. * @param status A reference to a UErrorCode to receive any error s.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_appendReplacementUText(URegularExpression *regexp, uregex_appendReplacementUText(URegularExpression *regexp,
UText *replacementText, UText *replacementText,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* As the final step in a find-and-replace operation, append the remainder * As the final step in a find-and-replace operation, append the remainder
* of the input string, starting at the position following the last match, * of the input string, starting at the position following the last match,
skipping to change at line 1268 skipping to change at line 1269
* *
* @param regexp The regular expression object. This is needed t o * @param regexp The regular expression object. This is needed t o
* obtain the input string and with the position * obtain the input string and with the position
* of the last match within it. * of the last match within it.
* @param dest A mutable UText that will receive the result. Mu st not be NULL. * @param dest A mutable UText that will receive the result. Mu st not be NULL.
* *
* @param status Error code * @param status Error code
* *
* @return The destination UText. * @return The destination UText.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_DRAFT UText * U_EXPORT2
uregex_appendTailUText(URegularExpression *regexp, uregex_appendTailUText(URegularExpression *regexp,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Split a string into fields. Somewhat like split() from Perl. * Split a string into fields. Somewhat like split() from Perl.
* The pattern matches identify delimiters that separate the input * The pattern matches identify delimiters that separate the input
* into fields. The input data between the matches becomes the * into fields. The input data between the matches becomes the
skipping to change at line 1359 skipping to change at line 1360
* If the number of fields found is less than destCapacity , the * If the number of fields found is less than destCapacity , the
* extra strings in the destination array are not altered. * extra strings in the destination array are not altered.
* If the number of destination strings is less than the n umber * If the number of destination strings is less than the n umber
* of fields, the trailing part of the input string, inclu ding any * of fields, the trailing part of the input string, inclu ding any
* field delimiters, is placed in the last destination str ing. * field delimiters, is placed in the last destination str ing.
* This behavior mimics that of Perl. It is not an error condition, and no * This behavior mimics that of Perl. It is not an error condition, and no
* error status is returned when all destField positions a re used. * error status is returned when all destField positions a re used.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return The number of fields into which the input string was sp lit. * @return The number of fields into which the input string was sp lit.
* *
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uregex_splitUText(URegularExpression *regexp, uregex_splitUText(URegularExpression *regexp,
UText *destFields[], UText *destFields[],
int32_t destFieldsCapacity, int32_t destFieldsCapacity,
UErrorCode *status); UErrorCode *status);
/** /**
* Set a processing time limit for match operations with this URegularExpre ssion. * Set a processing time limit for match operations with this URegularExpre ssion.
* *
skipping to change at line 1532 skipping to change at line 1533
* URegularExpression * URegularExpression
* *
* @param context context pointer. The callback function will be invoked * @param context context pointer. The callback function will be invoked
* with the context specified at the time that * with the context specified at the time that
* uregex_setFindProgressCallback() is called. * uregex_setFindProgressCallback() is called.
* @param matchIndex the next index at which a match attempt will be attem pted for this * @param matchIndex the next index at which a match attempt will be attem pted for this
* find operation. If this callback interrupts the search, this is the * find operation. If this callback interrupts the search, this is the
* index at which a find/findNext operation may be re-initi ated. * index at which a find/findNext operation may be re-initi ated.
* @return TRUE to continue the matching operation. * @return TRUE to continue the matching operation.
* FALSE to terminate the matching operation. * FALSE to terminate the matching operation.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_CDECL_BEGIN U_CDECL_BEGIN
typedef UBool U_CALLCONV URegexFindProgressCallback ( typedef UBool U_CALLCONV URegexFindProgressCallback (
const void *context, const void *context,
int64_t matchIndex); int64_t matchIndex);
U_CDECL_END U_CDECL_END
/** /**
* Set the find progress callback function for this URegularExpression. * Set the find progress callback function for this URegularExpression.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param callback A pointer to the user-supplied callback function. * @param callback A pointer to the user-supplied callback function.
* @param context User context pointer. The value supplied at the * @param context User context pointer. The value supplied at the
* time the callback function is set will be saved * time the callback function is set will be saved
* and passed to the callback each time that it is cal led. * and passed to the callback each time that it is cal led.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_setFindProgressCallback(URegularExpression *regexp, uregex_setFindProgressCallback(URegularExpression *regexp,
URegexFindProgressCallback *callback, URegexFindProgressCallback *callback,
const void *context, const void *context,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the find progress callback function for this URegularExpression. * Get the find progress callback function for this URegularExpression.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param callback Out parameter, receives a pointer to the user-suppl ied * @param callback Out parameter, receives a pointer to the user-suppl ied
* callback function. * callback function.
* @param context Out parameter, receives the user context pointer th at * @param context Out parameter, receives the user context pointer th at
* was set when uregex_setFindProgressCallback() was c alled. * was set when uregex_setFindProgressCallback() was c alled.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_getFindProgressCallback(const URegularExpression *regexp, uregex_getFindProgressCallback(const URegularExpression *regexp,
URegexFindProgressCallback **callbac k, URegexFindProgressCallback **callbac k,
const void **context , const void **context ,
UErrorCode *status); UErrorCode *status);
#endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */
#endif /* UREGEX_H */ #endif /* UREGEX_H */
 End of changes. 30 change blocks. 
29 lines changed or deleted 30 lines changed or added


 urename.h   urename.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2002-2011, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: urename.h * file name: urename.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: Perl script written by Vladimir Weinstein * Created by: Perl script written by Vladimir Weinstein
* *
skipping to change at line 35 skipping to change at line 35
that do not use Autoconf. */ that do not use Autoconf. */
/* #define U_DISABLE_RENAMING 1 */ /* #define U_DISABLE_RENAMING 1 */
#if !U_DISABLE_RENAMING #if !U_DISABLE_RENAMING
/* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one i n unicode/uvernum.h we can use, but we will give /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one i n unicode/uvernum.h we can use, but we will give
the platform a chance to define it first. the platform a chance to define it first.
Normally (if utypes.h or umachine.h was included first) this will not be necessary as it will already be defined. Normally (if utypes.h or umachine.h was included first) this will not be necessary as it will already be defined.
*/ */
#ifndef U_ICU_ENTRY_POINT_RENAME #ifndef U_ICU_ENTRY_POINT_RENAME
#include "unicode/uconfig.h"
#endif
#ifndef U_ICU_ENTRY_POINT_RENAME
#include "unicode/umachine.h" #include "unicode/umachine.h"
#endif #endif
/* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */ /* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */
#ifndef U_ICU_ENTRY_POINT_RENAME #ifndef U_ICU_ENTRY_POINT_RENAME
#include "unicode/uvernum.h" #include "unicode/uvernum.h"
#endif #endif
/* Error out before the following defines cause very strange and unexpected code breakage */ /* Error out before the following defines cause very strange and unexpected code breakage */
#ifndef U_ICU_ENTRY_POINT_RENAME #ifndef U_ICU_ENTRY_POINT_RENAME
#error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider defining U_DISABLE_RENAMING if renaming should not be used. #error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider defining U_DISABLE_RENAMING if renaming should not be used.
#endif #endif
/* C exports renaming data */ /* C exports renaming data */
#define DECPOWERS U_ICU_ENTRY_POINT_RENAME(DECPOWERS) #define DECPOWERS U_ICU_ENTRY_POINT_RENAME(DECPOWERS)
#define DECSTICKYTAB U_ICU_ENTRY_POINT_RENAME(DECSTICKYTAB) #define DECSTICKYTAB U_ICU_ENTRY_POINT_RENAME(DECSTICKYTAB)
#define LEN_CANONICAL_SYSTEM_LOCATION_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_CA
NONICAL_SYSTEM_LOCATION_ZONES)
#define LEN_CANONICAL_SYSTEM_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_CANONICAL_S
YSTEM_ZONES)
#define LEN_SYSTEM_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_SYSTEM_ZONES)
#define LNnn U_ICU_ENTRY_POINT_RENAME(LNnn)
#define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToS tring) #define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToS tring)
#define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_intege rToString) #define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_intege rToString)
#define T_CString_stricmp U_ICU_ENTRY_POINT_RENAME(T_CString_stricmp)
#define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_string ToInteger) #define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_string ToInteger)
#define T_CString_strnicmp U_ICU_ENTRY_POINT_RENAME(T_CString_strnicmp)
#define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCas e) #define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCas e)
#define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCas e) #define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCas e)
#define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CA LLBACK_ESCAPE) #define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CA LLBACK_ESCAPE)
#define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL BACK_SKIP) #define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL BACK_SKIP)
#define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL BACK_STOP) #define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL BACK_STOP)
#define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_ U_CALLBACK_SUBSTITUTE) #define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_ U_CALLBACK_SUBSTITUTE)
#define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBA CK_ESCAPE) #define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBA CK_ESCAPE)
#define UCNV_TO_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK _SKIP) #define UCNV_TO_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK _SKIP)
#define UCNV_TO_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK _STOP) #define UCNV_TO_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK _STOP)
#define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CA LLBACK_SUBSTITUTE) #define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CA LLBACK_SUBSTITUTE)
skipping to change at line 114 skipping to change at line 112
#define _UTF32Data U_ICU_ENTRY_POINT_RENAME(_UTF32Data) #define _UTF32Data U_ICU_ENTRY_POINT_RENAME(_UTF32Data)
#define _UTF32LEData U_ICU_ENTRY_POINT_RENAME(_UTF32LEData) #define _UTF32LEData U_ICU_ENTRY_POINT_RENAME(_UTF32LEData)
#define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data)
#define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data)
#define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close) #define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close)
#define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty) #define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty)
#define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData) #define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData)
#define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open) #define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open)
#define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search) #define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search)
#define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString) #define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString)
#define buildWSConfusableData U_ICU_ENTRY_POINT_RENAME(buildWSConfusableDat a)
#define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup)
#define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse) #define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse)
#define d2utable U_ICU_ENTRY_POINT_RENAME(d2utable) #define d2utable U_ICU_ENTRY_POINT_RENAME(d2utable)
#define deleteCEList U_ICU_ENTRY_POINT_RENAME(deleteCEList) #define deleteCEList U_ICU_ENTRY_POINT_RENAME(deleteCEList)
#define deleteChars U_ICU_ENTRY_POINT_RENAME(deleteChars) #define deleteChars U_ICU_ENTRY_POINT_RENAME(deleteChars)
#define deleteCollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(deleteCollDataCac heEntry) #define deleteCollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(deleteCollDataCac heEntry)
#define deleteStringList U_ICU_ENTRY_POINT_RENAME(deleteStringList) #define deleteStringList U_ICU_ENTRY_POINT_RENAME(deleteStringList)
#define deleteUnicodeStringKey U_ICU_ENTRY_POINT_RENAME(deleteUnicodeString Key) #define deleteUnicodeStringKey U_ICU_ENTRY_POINT_RENAME(deleteUnicodeString Key)
#define gICUInitMutex U_ICU_ENTRY_POINT_RENAME(gICUInitMutex)
#define gICUInitialized U_ICU_ENTRY_POINT_RENAME(gICUInitialized)
#define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone) #define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone)
#define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close) #define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close)
#define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals) #define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals)
#define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings) #define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings)
#define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamic ClassID) #define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamic ClassID)
#define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart) #define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart)
#define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart) #define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart)
#define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName) #define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName)
#define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart) #define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart)
#define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPrevious Start) #define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPrevious Start)
skipping to change at line 281 skipping to change at line 280
#define u_fungetc U_ICU_ENTRY_POINT_RENAME(u_fungetc) #define u_fungetc U_ICU_ENTRY_POINT_RENAME(u_fungetc)
#define u_getCombiningClass U_ICU_ENTRY_POINT_RENAME(u_getCombiningClass) #define u_getCombiningClass U_ICU_ENTRY_POINT_RENAME(u_getCombiningClass)
#define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory) #define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory)
#define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion) #define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion)
#define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverte r) #define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverte r)
#define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure) #define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure)
#define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment) #define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment)
#define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyM axValue) #define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyM axValue)
#define u_getIntPropertyMinValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyM inValue) #define u_getIntPropertyMinValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyM inValue)
#define u_getIntPropertyValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyValu e) #define u_getIntPropertyValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyValu e)
#define u_getMainProperties U_ICU_ENTRY_POINT_RENAME(u_getMainProperties)
#define u_getNumericValue U_ICU_ENTRY_POINT_RENAME(u_getNumericValue) #define u_getNumericValue U_ICU_ENTRY_POINT_RENAME(u_getNumericValue)
#define u_getPropertyEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyEnum) #define u_getPropertyEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyEnum)
#define u_getPropertyName U_ICU_ENTRY_POINT_RENAME(u_getPropertyName) #define u_getPropertyName U_ICU_ENTRY_POINT_RENAME(u_getPropertyName)
#define u_getPropertyValueEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueE num) #define u_getPropertyValueEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueE num)
#define u_getPropertyValueName U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueN ame) #define u_getPropertyValueName U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueN ame)
#define u_getUnicodeProperties U_ICU_ENTRY_POINT_RENAME(u_getUnicodePropert ies) #define u_getUnicodeProperties U_ICU_ENTRY_POINT_RENAME(u_getUnicodePropert ies)
#define u_getUnicodeVersion U_ICU_ENTRY_POINT_RENAME(u_getUnicodeVersion) #define u_getUnicodeVersion U_ICU_ENTRY_POINT_RENAME(u_getUnicodeVersion)
#define u_getVersion U_ICU_ENTRY_POINT_RENAME(u_getVersion) #define u_getVersion U_ICU_ENTRY_POINT_RENAME(u_getVersion)
#define u_get_stdout U_ICU_ENTRY_POINT_RENAME(u_get_stdout)
#define u_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_hasBinaryProperty) #define u_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_hasBinaryProperty)
#define u_init U_ICU_ENTRY_POINT_RENAME(u_init) #define u_init U_ICU_ENTRY_POINT_RENAME(u_init)
#define u_isDataOlder U_ICU_ENTRY_POINT_RENAME(u_isDataOlder)
#define u_isIDIgnorable U_ICU_ENTRY_POINT_RENAME(u_isIDIgnorable) #define u_isIDIgnorable U_ICU_ENTRY_POINT_RENAME(u_isIDIgnorable)
#define u_isIDPart U_ICU_ENTRY_POINT_RENAME(u_isIDPart) #define u_isIDPart U_ICU_ENTRY_POINT_RENAME(u_isIDPart)
#define u_isIDStart U_ICU_ENTRY_POINT_RENAME(u_isIDStart) #define u_isIDStart U_ICU_ENTRY_POINT_RENAME(u_isIDStart)
#define u_isISOControl U_ICU_ENTRY_POINT_RENAME(u_isISOControl) #define u_isISOControl U_ICU_ENTRY_POINT_RENAME(u_isISOControl)
#define u_isJavaIDPart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDPart) #define u_isJavaIDPart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDPart)
#define u_isJavaIDStart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDStart) #define u_isJavaIDStart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDStart)
#define u_isJavaSpaceChar U_ICU_ENTRY_POINT_RENAME(u_isJavaSpaceChar) #define u_isJavaSpaceChar U_ICU_ENTRY_POINT_RENAME(u_isJavaSpaceChar)
#define u_isMirrored U_ICU_ENTRY_POINT_RENAME(u_isMirrored) #define u_isMirrored U_ICU_ENTRY_POINT_RENAME(u_isMirrored)
#define u_isUAlphabetic U_ICU_ENTRY_POINT_RENAME(u_isUAlphabetic) #define u_isUAlphabetic U_ICU_ENTRY_POINT_RENAME(u_isUAlphabetic)
#define u_isULowercase U_ICU_ENTRY_POINT_RENAME(u_isULowercase) #define u_isULowercase U_ICU_ENTRY_POINT_RENAME(u_isULowercase)
skipping to change at line 338 skipping to change at line 338
#define u_memchr32 U_ICU_ENTRY_POINT_RENAME(u_memchr32) #define u_memchr32 U_ICU_ENTRY_POINT_RENAME(u_memchr32)
#define u_memcmp U_ICU_ENTRY_POINT_RENAME(u_memcmp) #define u_memcmp U_ICU_ENTRY_POINT_RENAME(u_memcmp)
#define u_memcmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_memcmpCodePointOr der) #define u_memcmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_memcmpCodePointOr der)
#define u_memcpy U_ICU_ENTRY_POINT_RENAME(u_memcpy) #define u_memcpy U_ICU_ENTRY_POINT_RENAME(u_memcpy)
#define u_memmove U_ICU_ENTRY_POINT_RENAME(u_memmove) #define u_memmove U_ICU_ENTRY_POINT_RENAME(u_memmove)
#define u_memrchr U_ICU_ENTRY_POINT_RENAME(u_memrchr) #define u_memrchr U_ICU_ENTRY_POINT_RENAME(u_memrchr)
#define u_memrchr32 U_ICU_ENTRY_POINT_RENAME(u_memrchr32) #define u_memrchr32 U_ICU_ENTRY_POINT_RENAME(u_memrchr32)
#define u_memset U_ICU_ENTRY_POINT_RENAME(u_memset) #define u_memset U_ICU_ENTRY_POINT_RENAME(u_memset)
#define u_parseMessage U_ICU_ENTRY_POINT_RENAME(u_parseMessage) #define u_parseMessage U_ICU_ENTRY_POINT_RENAME(u_parseMessage)
#define u_parseMessageWithError U_ICU_ENTRY_POINT_RENAME(u_parseMessageWith Error) #define u_parseMessageWithError U_ICU_ENTRY_POINT_RENAME(u_parseMessageWith Error)
#define u_printf U_ICU_ENTRY_POINT_RENAME(u_printf)
#define u_printf_parse U_ICU_ENTRY_POINT_RENAME(u_printf_parse) #define u_printf_parse U_ICU_ENTRY_POINT_RENAME(u_printf_parse)
#define u_printf_u U_ICU_ENTRY_POINT_RENAME(u_printf_u)
#define u_releaseDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_releaseDefault Converter) #define u_releaseDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_releaseDefault Converter)
#define u_scanf_parse U_ICU_ENTRY_POINT_RENAME(u_scanf_parse) #define u_scanf_parse U_ICU_ENTRY_POINT_RENAME(u_scanf_parse)
#define u_setAtomicIncDecFunctions U_ICU_ENTRY_POINT_RENAME(u_setAtomicIncD ecFunctions) #define u_setAtomicIncDecFunctions U_ICU_ENTRY_POINT_RENAME(u_setAtomicIncD ecFunctions)
#define u_setDataDirectory U_ICU_ENTRY_POINT_RENAME(u_setDataDirectory) #define u_setDataDirectory U_ICU_ENTRY_POINT_RENAME(u_setDataDirectory)
#define u_setMemoryFunctions U_ICU_ENTRY_POINT_RENAME(u_setMemoryFunctions) #define u_setMemoryFunctions U_ICU_ENTRY_POINT_RENAME(u_setMemoryFunctions)
#define u_setMutexFunctions U_ICU_ENTRY_POINT_RENAME(u_setMutexFunctions) #define u_setMutexFunctions U_ICU_ENTRY_POINT_RENAME(u_setMutexFunctions)
#define u_shapeArabic U_ICU_ENTRY_POINT_RENAME(u_shapeArabic) #define u_shapeArabic U_ICU_ENTRY_POINT_RENAME(u_shapeArabic)
#define u_snprintf U_ICU_ENTRY_POINT_RENAME(u_snprintf) #define u_snprintf U_ICU_ENTRY_POINT_RENAME(u_snprintf)
#define u_snprintf_u U_ICU_ENTRY_POINT_RENAME(u_snprintf_u) #define u_snprintf_u U_ICU_ENTRY_POINT_RENAME(u_snprintf_u)
#define u_sprintf U_ICU_ENTRY_POINT_RENAME(u_sprintf) #define u_sprintf U_ICU_ENTRY_POINT_RENAME(u_sprintf)
skipping to change at line 500 skipping to change at line 502
#define ubrk_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ubrk_getLocaleByType) #define ubrk_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ubrk_getLocaleByType)
#define ubrk_getRuleStatus U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus) #define ubrk_getRuleStatus U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus)
#define ubrk_getRuleStatusVec U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVe c) #define ubrk_getRuleStatusVec U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVe c)
#define ubrk_isBoundary U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary) #define ubrk_isBoundary U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary)
#define ubrk_last U_ICU_ENTRY_POINT_RENAME(ubrk_last) #define ubrk_last U_ICU_ENTRY_POINT_RENAME(ubrk_last)
#define ubrk_next U_ICU_ENTRY_POINT_RENAME(ubrk_next) #define ubrk_next U_ICU_ENTRY_POINT_RENAME(ubrk_next)
#define ubrk_open U_ICU_ENTRY_POINT_RENAME(ubrk_open) #define ubrk_open U_ICU_ENTRY_POINT_RENAME(ubrk_open)
#define ubrk_openRules U_ICU_ENTRY_POINT_RENAME(ubrk_openRules) #define ubrk_openRules U_ICU_ENTRY_POINT_RENAME(ubrk_openRules)
#define ubrk_preceding U_ICU_ENTRY_POINT_RENAME(ubrk_preceding) #define ubrk_preceding U_ICU_ENTRY_POINT_RENAME(ubrk_preceding)
#define ubrk_previous U_ICU_ENTRY_POINT_RENAME(ubrk_previous) #define ubrk_previous U_ICU_ENTRY_POINT_RENAME(ubrk_previous)
#define ubrk_refreshUText U_ICU_ENTRY_POINT_RENAME(ubrk_refreshUText)
#define ubrk_safeClone U_ICU_ENTRY_POINT_RENAME(ubrk_safeClone) #define ubrk_safeClone U_ICU_ENTRY_POINT_RENAME(ubrk_safeClone)
#define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText) #define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText)
#define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText) #define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText)
#define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap) #define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap)
#define ucal_add U_ICU_ENTRY_POINT_RENAME(ucal_add) #define ucal_add U_ICU_ENTRY_POINT_RENAME(ucal_add)
#define ucal_clear U_ICU_ENTRY_POINT_RENAME(ucal_clear) #define ucal_clear U_ICU_ENTRY_POINT_RENAME(ucal_clear)
#define ucal_clearField U_ICU_ENTRY_POINT_RENAME(ucal_clearField) #define ucal_clearField U_ICU_ENTRY_POINT_RENAME(ucal_clearField)
#define ucal_clone U_ICU_ENTRY_POINT_RENAME(ucal_clone) #define ucal_clone U_ICU_ENTRY_POINT_RENAME(ucal_clone)
#define ucal_close U_ICU_ENTRY_POINT_RENAME(ucal_close) #define ucal_close U_ICU_ENTRY_POINT_RENAME(ucal_close)
#define ucal_countAvailable U_ICU_ENTRY_POINT_RENAME(ucal_countAvailable) #define ucal_countAvailable U_ICU_ENTRY_POINT_RENAME(ucal_countAvailable)
skipping to change at line 567 skipping to change at line 570
#define ucase_toFullLower U_ICU_ENTRY_POINT_RENAME(ucase_toFullLower) #define ucase_toFullLower U_ICU_ENTRY_POINT_RENAME(ucase_toFullLower)
#define ucase_toFullTitle U_ICU_ENTRY_POINT_RENAME(ucase_toFullTitle) #define ucase_toFullTitle U_ICU_ENTRY_POINT_RENAME(ucase_toFullTitle)
#define ucase_toFullUpper U_ICU_ENTRY_POINT_RENAME(ucase_toFullUpper) #define ucase_toFullUpper U_ICU_ENTRY_POINT_RENAME(ucase_toFullUpper)
#define ucase_tolower U_ICU_ENTRY_POINT_RENAME(ucase_tolower) #define ucase_tolower U_ICU_ENTRY_POINT_RENAME(ucase_tolower)
#define ucase_totitle U_ICU_ENTRY_POINT_RENAME(ucase_totitle) #define ucase_totitle U_ICU_ENTRY_POINT_RENAME(ucase_totitle)
#define ucase_toupper U_ICU_ENTRY_POINT_RENAME(ucase_toupper) #define ucase_toupper U_ICU_ENTRY_POINT_RENAME(ucase_toupper)
#define ucasemap_close U_ICU_ENTRY_POINT_RENAME(ucasemap_close) #define ucasemap_close U_ICU_ENTRY_POINT_RENAME(ucasemap_close)
#define ucasemap_getBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_getBrea kIterator) #define ucasemap_getBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_getBrea kIterator)
#define ucasemap_getLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_getLocale) #define ucasemap_getLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_getLocale)
#define ucasemap_getOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_getOptions) #define ucasemap_getOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_getOptions)
#define ucasemap_internalUTF8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_inte
rnalUTF8ToTitle)
#define ucasemap_mapUTF8 U_ICU_ENTRY_POINT_RENAME(ucasemap_mapUTF8)
#define ucasemap_open U_ICU_ENTRY_POINT_RENAME(ucasemap_open) #define ucasemap_open U_ICU_ENTRY_POINT_RENAME(ucasemap_open)
#define ucasemap_setBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_setBrea kIterator) #define ucasemap_setBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_setBrea kIterator)
#define ucasemap_setLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_setLocale) #define ucasemap_setLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_setLocale)
#define ucasemap_setOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_setOptions) #define ucasemap_setOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_setOptions)
#define ucasemap_toTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_toTitle) #define ucasemap_toTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_toTitle)
#define ucasemap_utf8FoldCase U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8FoldCas e) #define ucasemap_utf8FoldCase U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8FoldCas e)
#define ucasemap_utf8ToLower U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToLower) #define ucasemap_utf8ToLower U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToLower)
#define ucasemap_utf8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToTitle) #define ucasemap_utf8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToTitle)
#define ucasemap_utf8ToUpper U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToUpper) #define ucasemap_utf8ToUpper U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToUpper)
#define ucd_close U_ICU_ENTRY_POINT_RENAME(ucd_close) #define ucd_close U_ICU_ENTRY_POINT_RENAME(ucd_close)
skipping to change at line 826 skipping to change at line 831
#define ucsdet_isInputFilterEnabled U_ICU_ENTRY_POINT_RENAME(ucsdet_isInput FilterEnabled) #define ucsdet_isInputFilterEnabled U_ICU_ENTRY_POINT_RENAME(ucsdet_isInput FilterEnabled)
#define ucsdet_open U_ICU_ENTRY_POINT_RENAME(ucsdet_open) #define ucsdet_open U_ICU_ENTRY_POINT_RENAME(ucsdet_open)
#define ucsdet_setDeclaredEncoding U_ICU_ENTRY_POINT_RENAME(ucsdet_setDecla redEncoding) #define ucsdet_setDeclaredEncoding U_ICU_ENTRY_POINT_RENAME(ucsdet_setDecla redEncoding)
#define ucsdet_setText U_ICU_ENTRY_POINT_RENAME(ucsdet_setText) #define ucsdet_setText U_ICU_ENTRY_POINT_RENAME(ucsdet_setText)
#define ucurr_countCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_countCurrencie s) #define ucurr_countCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_countCurrencie s)
#define ucurr_forLocale U_ICU_ENTRY_POINT_RENAME(ucurr_forLocale) #define ucurr_forLocale U_ICU_ENTRY_POINT_RENAME(ucurr_forLocale)
#define ucurr_forLocaleAndDate U_ICU_ENTRY_POINT_RENAME(ucurr_forLocaleAndD ate) #define ucurr_forLocaleAndDate U_ICU_ENTRY_POINT_RENAME(ucurr_forLocaleAndD ate)
#define ucurr_getDefaultFractionDigits U_ICU_ENTRY_POINT_RENAME(ucurr_getDe faultFractionDigits) #define ucurr_getDefaultFractionDigits U_ICU_ENTRY_POINT_RENAME(ucurr_getDe faultFractionDigits)
#define ucurr_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucurr_getK eywordValuesForLocale) #define ucurr_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucurr_getK eywordValuesForLocale)
#define ucurr_getName U_ICU_ENTRY_POINT_RENAME(ucurr_getName) #define ucurr_getName U_ICU_ENTRY_POINT_RENAME(ucurr_getName)
#define ucurr_getNumericCode U_ICU_ENTRY_POINT_RENAME(ucurr_getNumericCode)
#define ucurr_getPluralName U_ICU_ENTRY_POINT_RENAME(ucurr_getPluralName) #define ucurr_getPluralName U_ICU_ENTRY_POINT_RENAME(ucurr_getPluralName)
#define ucurr_getRoundingIncrement U_ICU_ENTRY_POINT_RENAME(ucurr_getRoundi ngIncrement) #define ucurr_getRoundingIncrement U_ICU_ENTRY_POINT_RENAME(ucurr_getRoundi ngIncrement)
#define ucurr_isAvailable U_ICU_ENTRY_POINT_RENAME(ucurr_isAvailable) #define ucurr_isAvailable U_ICU_ENTRY_POINT_RENAME(ucurr_isAvailable)
#define ucurr_openISOCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_openISOCurre ncies) #define ucurr_openISOCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_openISOCurre ncies)
#define ucurr_register U_ICU_ENTRY_POINT_RENAME(ucurr_register) #define ucurr_register U_ICU_ENTRY_POINT_RENAME(ucurr_register)
#define ucurr_unregister U_ICU_ENTRY_POINT_RENAME(ucurr_unregister) #define ucurr_unregister U_ICU_ENTRY_POINT_RENAME(ucurr_unregister)
#define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern) #define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern)
#define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatter nRelative) #define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatter nRelative)
#define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone) #define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone)
#define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close) #define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close)
#define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable) #define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable)
#define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols) #define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols)
#define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format) #define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format)
#define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYear Start) #define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYear Start)
#define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable) #define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable)
#define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar) #define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar)
#define udat_getDefaultContext U_ICU_ENTRY_POINT_RENAME(udat_getDefaultCont ext)
#define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType) #define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType)
#define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat) #define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat)
#define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols) #define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols)
#define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient) #define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient)
#define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open) #define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open)
#define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse) #define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse)
#define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar) #define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar)
#define udat_registerOpener U_ICU_ENTRY_POINT_RENAME(udat_registerOpener)
#define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYear Start) #define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYear Start)
#define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar) #define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar)
#define udat_setDefaultContext U_ICU_ENTRY_POINT_RENAME(udat_setDefaultCont ext)
#define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient) #define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient)
#define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat) #define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat)
#define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols) #define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols)
#define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDa teField) #define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDa teField)
#define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern) #define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern)
#define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternR elativeDate) #define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternR elativeDate)
#define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternR elativeTime) #define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternR elativeTime)
#define udat_unregisterOpener U_ICU_ENTRY_POINT_RENAME(udat_unregisterOpene r)
#define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonDat a) #define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonDat a)
#define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close) #define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close)
#define udata_closeSwapper U_ICU_ENTRY_POINT_RENAME(udata_closeSwapper) #define udata_closeSwapper U_ICU_ENTRY_POINT_RENAME(udata_closeSwapper)
#define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize) #define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize)
#define udata_getInfo U_ICU_ENTRY_POINT_RENAME(udata_getInfo) #define udata_getInfo U_ICU_ENTRY_POINT_RENAME(udata_getInfo)
#define udata_getInfoSize U_ICU_ENTRY_POINT_RENAME(udata_getInfoSize) #define udata_getInfoSize U_ICU_ENTRY_POINT_RENAME(udata_getInfoSize)
#define udata_getLength U_ICU_ENTRY_POINT_RENAME(udata_getLength) #define udata_getLength U_ICU_ENTRY_POINT_RENAME(udata_getLength)
#define udata_getMemory U_ICU_ENTRY_POINT_RENAME(udata_getMemory) #define udata_getMemory U_ICU_ENTRY_POINT_RENAME(udata_getMemory)
#define udata_getRawMemory U_ICU_ENTRY_POINT_RENAME(udata_getRawMemory) #define udata_getRawMemory U_ICU_ENTRY_POINT_RENAME(udata_getRawMemory)
#define udata_open U_ICU_ENTRY_POINT_RENAME(udata_open) #define udata_open U_ICU_ENTRY_POINT_RENAME(udata_open)
skipping to change at line 935 skipping to change at line 945
#define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) #define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop)
#define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close) #define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close)
#define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_c ompareCaselessUnicodeString) #define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_c ompareCaselessUnicodeString)
#define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) #define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars)
#define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) #define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars)
#define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) #define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong)
#define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) #define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars)
#define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUn icodeString) #define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUn icodeString)
#define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count) #define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count)
#define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtabl e) #define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtabl e)
#define uhash_deleteUObject U_ICU_ENTRY_POINT_RENAME(uhash_deleteUObject)
#define uhash_deleteUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_deleteUnic
odeString)
#define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) #define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals)
#define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find) #define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find)
#define uhash_freeBlock U_ICU_ENTRY_POINT_RENAME(uhash_freeBlock)
#define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get) #define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get)
#define uhash_geti U_ICU_ENTRY_POINT_RENAME(uhash_geti) #define uhash_geti U_ICU_ENTRY_POINT_RENAME(uhash_geti)
#define uhash_hashCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hash CaselessUnicodeString) #define uhash_hashCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hash CaselessUnicodeString)
#define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars) #define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars)
#define uhash_hashCharsN U_ICU_ENTRY_POINT_RENAME(uhash_hashCharsN)
#define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars) #define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars)
#define uhash_hashLong U_ICU_ENTRY_POINT_RENAME(uhash_hashLong) #define uhash_hashLong U_ICU_ENTRY_POINT_RENAME(uhash_hashLong)
#define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars) #define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars)
#define uhash_hashUCharsN U_ICU_ENTRY_POINT_RENAME(uhash_hashUCharsN)
#define uhash_hashUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashUnicodeS tring) #define uhash_hashUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashUnicodeS tring)
#define uhash_iget U_ICU_ENTRY_POINT_RENAME(uhash_iget) #define uhash_iget U_ICU_ENTRY_POINT_RENAME(uhash_iget)
#define uhash_igeti U_ICU_ENTRY_POINT_RENAME(uhash_igeti) #define uhash_igeti U_ICU_ENTRY_POINT_RENAME(uhash_igeti)
#define uhash_init U_ICU_ENTRY_POINT_RENAME(uhash_init) #define uhash_init U_ICU_ENTRY_POINT_RENAME(uhash_init)
#define uhash_iput U_ICU_ENTRY_POINT_RENAME(uhash_iput) #define uhash_iput U_ICU_ENTRY_POINT_RENAME(uhash_iput)
#define uhash_iputi U_ICU_ENTRY_POINT_RENAME(uhash_iputi) #define uhash_iputi U_ICU_ENTRY_POINT_RENAME(uhash_iputi)
#define uhash_iremove U_ICU_ENTRY_POINT_RENAME(uhash_iremove) #define uhash_iremove U_ICU_ENTRY_POINT_RENAME(uhash_iremove)
#define uhash_iremovei U_ICU_ENTRY_POINT_RENAME(uhash_iremovei) #define uhash_iremovei U_ICU_ENTRY_POINT_RENAME(uhash_iremovei)
#define uhash_nextElement U_ICU_ENTRY_POINT_RENAME(uhash_nextElement) #define uhash_nextElement U_ICU_ENTRY_POINT_RENAME(uhash_nextElement)
#define uhash_open U_ICU_ENTRY_POINT_RENAME(uhash_open) #define uhash_open U_ICU_ENTRY_POINT_RENAME(uhash_open)
skipping to change at line 1041 skipping to change at line 1046
#define uloc_getCountry U_ICU_ENTRY_POINT_RENAME(uloc_getCountry) #define uloc_getCountry U_ICU_ENTRY_POINT_RENAME(uloc_getCountry)
#define uloc_getCurrentCountryID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentCo untryID) #define uloc_getCurrentCountryID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentCo untryID)
#define uloc_getCurrentLanguageID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentL anguageID) #define uloc_getCurrentLanguageID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentL anguageID)
#define uloc_getDefault U_ICU_ENTRY_POINT_RENAME(uloc_getDefault) #define uloc_getDefault U_ICU_ENTRY_POINT_RENAME(uloc_getDefault)
#define uloc_getDisplayCountry U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayCoun try) #define uloc_getDisplayCountry U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayCoun try)
#define uloc_getDisplayKeyword U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayKeyw ord) #define uloc_getDisplayKeyword U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayKeyw ord)
#define uloc_getDisplayKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getDispla yKeywordValue) #define uloc_getDisplayKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getDispla yKeywordValue)
#define uloc_getDisplayLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayLan guage) #define uloc_getDisplayLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayLan guage)
#define uloc_getDisplayName U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayName) #define uloc_getDisplayName U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayName)
#define uloc_getDisplayScript U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScrip t) #define uloc_getDisplayScript U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScrip t)
#define uloc_getDisplayScriptInContext U_ICU_ENTRY_POINT_RENAME(uloc_getDis playScriptInContext)
#define uloc_getDisplayVariant U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayVari ant) #define uloc_getDisplayVariant U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayVari ant)
#define uloc_getISO3Country U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Country) #define uloc_getISO3Country U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Country)
#define uloc_getISO3Language U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Language) #define uloc_getISO3Language U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Language)
#define uloc_getISOCountries U_ICU_ENTRY_POINT_RENAME(uloc_getISOCountries) #define uloc_getISOCountries U_ICU_ENTRY_POINT_RENAME(uloc_getISOCountries)
#define uloc_getISOLanguages U_ICU_ENTRY_POINT_RENAME(uloc_getISOLanguages) #define uloc_getISOLanguages U_ICU_ENTRY_POINT_RENAME(uloc_getISOLanguages)
#define uloc_getKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getKeywordValue) #define uloc_getKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getKeywordValue)
#define uloc_getLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLCID) #define uloc_getLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLCID)
#define uloc_getLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getLanguage) #define uloc_getLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getLanguage)
#define uloc_getLineOrientation U_ICU_ENTRY_POINT_RENAME(uloc_getLineOrient ation) #define uloc_getLineOrientation U_ICU_ENTRY_POINT_RENAME(uloc_getLineOrient ation)
#define uloc_getLocaleForLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLocaleForLCI D) #define uloc_getLocaleForLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLocaleForLCI D)
skipping to change at line 1098 skipping to change at line 1104
#define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec) #define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec)
#define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc) #define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc)
#define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup) #define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup)
#define umtx_destroy U_ICU_ENTRY_POINT_RENAME(umtx_destroy) #define umtx_destroy U_ICU_ENTRY_POINT_RENAME(umtx_destroy)
#define umtx_init U_ICU_ENTRY_POINT_RENAME(umtx_init) #define umtx_init U_ICU_ENTRY_POINT_RENAME(umtx_init)
#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) #define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) #define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
#define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnic ode32Instance) #define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnic ode32Instance)
#define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) #define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append)
#define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) #define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close)
#define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair)
#define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombini
ngClass)
#define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecompos ition) #define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecompos ition)
#define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance) #define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance)
#define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstanc
e)
#define unorm2_getNFDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFDInstanc
e)
#define unorm2_getNFKCCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getN
FKCCasefoldInstance)
#define unorm2_getNFKCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCInsta
nce)
#define unorm2_getNFKDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKDInsta
nce)
#define unorm2_getRawDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getRawDe
composition)
#define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundary After) #define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundary After)
#define unorm2_hasBoundaryBefore U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundar yBefore) #define unorm2_hasBoundaryBefore U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundar yBefore)
#define unorm2_isInert U_ICU_ENTRY_POINT_RENAME(unorm2_isInert) #define unorm2_isInert U_ICU_ENTRY_POINT_RENAME(unorm2_isInert)
#define unorm2_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized) #define unorm2_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized)
#define unorm2_normalize U_ICU_ENTRY_POINT_RENAME(unorm2_normalize) #define unorm2_normalize U_ICU_ENTRY_POINT_RENAME(unorm2_normalize)
#define unorm2_normalizeSecondAndAppend U_ICU_ENTRY_POINT_RENAME(unorm2_nor malizeSecondAndAppend) #define unorm2_normalizeSecondAndAppend U_ICU_ENTRY_POINT_RENAME(unorm2_nor malizeSecondAndAppend)
#define unorm2_openFiltered U_ICU_ENTRY_POINT_RENAME(unorm2_openFiltered) #define unorm2_openFiltered U_ICU_ENTRY_POINT_RENAME(unorm2_openFiltered)
#define unorm2_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck) #define unorm2_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck)
#define unorm2_spanQuickCheckYes U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickC heckYes) #define unorm2_spanQuickCheckYes U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickC heckYes)
#define unorm2_swap U_ICU_ENTRY_POINT_RENAME(unorm2_swap) #define unorm2_swap U_ICU_ENTRY_POINT_RENAME(unorm2_swap)
#define unorm_closeIter U_ICU_ENTRY_POINT_RENAME(unorm_closeIter) #define unorm_closeIter U_ICU_ENTRY_POINT_RENAME(unorm_closeIter)
#define unorm_compare U_ICU_ENTRY_POINT_RENAME(unorm_compare) #define unorm_compare U_ICU_ENTRY_POINT_RENAME(unorm_compare)
#define unorm_concatenate U_ICU_ENTRY_POINT_RENAME(unorm_concatenate) #define unorm_concatenate U_ICU_ENTRY_POINT_RENAME(unorm_concatenate)
#define unorm_getFCDTrieIndex U_ICU_ENTRY_POINT_RENAME(unorm_getFCDTrieInde x) #define unorm_getFCD16 U_ICU_ENTRY_POINT_RENAME(unorm_getFCD16)
#define unorm_getQuickCheck U_ICU_ENTRY_POINT_RENAME(unorm_getQuickCheck) #define unorm_getQuickCheck U_ICU_ENTRY_POINT_RENAME(unorm_getQuickCheck)
#define unorm_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm_isNormalized) #define unorm_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm_isNormalized)
#define unorm_isNormalizedWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_isNorm alizedWithOptions) #define unorm_isNormalizedWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_isNorm alizedWithOptions)
#define unorm_next U_ICU_ENTRY_POINT_RENAME(unorm_next) #define unorm_next U_ICU_ENTRY_POINT_RENAME(unorm_next)
#define unorm_normalize U_ICU_ENTRY_POINT_RENAME(unorm_normalize) #define unorm_normalize U_ICU_ENTRY_POINT_RENAME(unorm_normalize)
#define unorm_openIter U_ICU_ENTRY_POINT_RENAME(unorm_openIter) #define unorm_openIter U_ICU_ENTRY_POINT_RENAME(unorm_openIter)
#define unorm_previous U_ICU_ENTRY_POINT_RENAME(unorm_previous) #define unorm_previous U_ICU_ENTRY_POINT_RENAME(unorm_previous)
#define unorm_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm_quickCheck) #define unorm_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm_quickCheck)
#define unorm_quickCheckWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_quickChe ckWithOptions) #define unorm_quickCheckWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_quickChe ckWithOptions)
#define unorm_setIter U_ICU_ENTRY_POINT_RENAME(unorm_setIter) #define unorm_setIter U_ICU_ENTRY_POINT_RENAME(unorm_setIter)
skipping to change at line 1181 skipping to change at line 1195
#define uplug_removePlug U_ICU_ENTRY_POINT_RENAME(uplug_removePlug) #define uplug_removePlug U_ICU_ENTRY_POINT_RENAME(uplug_removePlug)
#define uplug_setContext U_ICU_ENTRY_POINT_RENAME(uplug_setContext) #define uplug_setContext U_ICU_ENTRY_POINT_RENAME(uplug_setContext)
#define uplug_setPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_setPlugLevel) #define uplug_setPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_setPlugLevel)
#define uplug_setPlugName U_ICU_ENTRY_POINT_RENAME(uplug_setPlugName) #define uplug_setPlugName U_ICU_ENTRY_POINT_RENAME(uplug_setPlugName)
#define uplug_setPlugNoUnload U_ICU_ENTRY_POINT_RENAME(uplug_setPlugNoUnloa d) #define uplug_setPlugNoUnload U_ICU_ENTRY_POINT_RENAME(uplug_setPlugNoUnloa d)
#define uprops_getSource U_ICU_ENTRY_POINT_RENAME(uprops_getSource) #define uprops_getSource U_ICU_ENTRY_POINT_RENAME(uprops_getSource)
#define upropsvec_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(upropsvec_addP ropertyStarts) #define upropsvec_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(upropsvec_addP ropertyStarts)
#define uprv_aestrncpy U_ICU_ENTRY_POINT_RENAME(uprv_aestrncpy) #define uprv_aestrncpy U_ICU_ENTRY_POINT_RENAME(uprv_aestrncpy)
#define uprv_asciiFromEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_asciiFromEbcdic) #define uprv_asciiFromEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_asciiFromEbcdic)
#define uprv_asciitolower U_ICU_ENTRY_POINT_RENAME(uprv_asciitolower) #define uprv_asciitolower U_ICU_ENTRY_POINT_RENAME(uprv_asciitolower)
#define uprv_calloc U_ICU_ENTRY_POINT_RENAME(uprv_calloc)
#define uprv_ceil U_ICU_ENTRY_POINT_RENAME(uprv_ceil) #define uprv_ceil U_ICU_ENTRY_POINT_RENAME(uprv_ceil)
#define uprv_cnttab_addContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_add Contraction) #define uprv_cnttab_addContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_add Contraction)
#define uprv_cnttab_changeContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_ changeContraction) #define uprv_cnttab_changeContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_ changeContraction)
#define uprv_cnttab_changeLastCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_chang eLastCE) #define uprv_cnttab_changeLastCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_chang eLastCE)
#define uprv_cnttab_clone U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_clone) #define uprv_cnttab_clone U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_clone)
#define uprv_cnttab_close U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_close) #define uprv_cnttab_close U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_close)
#define uprv_cnttab_constructTable U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_con structTable) #define uprv_cnttab_constructTable U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_con structTable)
#define uprv_cnttab_findCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCE) #define uprv_cnttab_findCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCE)
#define uprv_cnttab_findCP U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCP) #define uprv_cnttab_findCP U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCP)
#define uprv_cnttab_getCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_getCE) #define uprv_cnttab_getCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_getCE)
skipping to change at line 1217 skipping to change at line 1232
#define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContext GetRounding) #define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContext GetRounding)
#define uprv_decContextGetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextGe tStatus) #define uprv_decContextGetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextGe tStatus)
#define uprv_decContextRestoreStatus U_ICU_ENTRY_POINT_RENAME(uprv_decConte xtRestoreStatus) #define uprv_decContextRestoreStatus U_ICU_ENTRY_POINT_RENAME(uprv_decConte xtRestoreStatus)
#define uprv_decContextSaveStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextS aveStatus) #define uprv_decContextSaveStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextS aveStatus)
#define uprv_decContextSetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContext SetRounding) #define uprv_decContextSetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContext SetRounding)
#define uprv_decContextSetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextSe tStatus) #define uprv_decContextSetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextSe tStatus)
#define uprv_decContextSetStatusFromString U_ICU_ENTRY_POINT_RENAME(uprv_de cContextSetStatusFromString) #define uprv_decContextSetStatusFromString U_ICU_ENTRY_POINT_RENAME(uprv_de cContextSetStatusFromString)
#define uprv_decContextSetStatusFromStringQuiet U_ICU_ENTRY_POINT_RENAME(up rv_decContextSetStatusFromStringQuiet) #define uprv_decContextSetStatusFromStringQuiet U_ICU_ENTRY_POINT_RENAME(up rv_decContextSetStatusFromStringQuiet)
#define uprv_decContextSetStatusQuiet U_ICU_ENTRY_POINT_RENAME(uprv_decCont extSetStatusQuiet) #define uprv_decContextSetStatusQuiet U_ICU_ENTRY_POINT_RENAME(uprv_decCont extSetStatusQuiet)
#define uprv_decContextStatusToString U_ICU_ENTRY_POINT_RENAME(uprv_decCont extStatusToString) #define uprv_decContextStatusToString U_ICU_ENTRY_POINT_RENAME(uprv_decCont extStatusToString)
#define uprv_decContextTestEndian U_ICU_ENTRY_POINT_RENAME(uprv_decContextT estEndian)
#define uprv_decContextTestSavedStatus U_ICU_ENTRY_POINT_RENAME(uprv_decCon textTestSavedStatus) #define uprv_decContextTestSavedStatus U_ICU_ENTRY_POINT_RENAME(uprv_decCon textTestSavedStatus)
#define uprv_decContextTestStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextT estStatus) #define uprv_decContextTestStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextT estStatus)
#define uprv_decContextZeroStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextZ eroStatus) #define uprv_decContextZeroStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextZ eroStatus)
#define uprv_decNumberAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAbs) #define uprv_decNumberAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAbs)
#define uprv_decNumberAdd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAdd) #define uprv_decNumberAdd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAdd)
#define uprv_decNumberAnd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAnd) #define uprv_decNumberAnd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAnd)
#define uprv_decNumberClass U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClass) #define uprv_decNumberClass U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClass)
#define uprv_decNumberClassToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumber ClassToString) #define uprv_decNumberClassToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumber ClassToString)
#define uprv_decNumberCompare U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompar e) #define uprv_decNumberCompare U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompar e)
#define uprv_decNumberCompareSignal U_ICU_ENTRY_POINT_RENAME(uprv_decNumber CompareSignal) #define uprv_decNumberCompareSignal U_ICU_ENTRY_POINT_RENAME(uprv_decNumber CompareSignal)
skipping to change at line 1283 skipping to change at line 1297
#define uprv_decNumberToEngString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTo EngString) #define uprv_decNumberToEngString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTo EngString)
#define uprv_decNumberToInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToInt3 2) #define uprv_decNumberToInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToInt3 2)
#define uprv_decNumberToIntegralExact U_ICU_ENTRY_POINT_RENAME(uprv_decNumb erToIntegralExact) #define uprv_decNumberToIntegralExact U_ICU_ENTRY_POINT_RENAME(uprv_decNumb erToIntegralExact)
#define uprv_decNumberToIntegralValue U_ICU_ENTRY_POINT_RENAME(uprv_decNumb erToIntegralValue) #define uprv_decNumberToIntegralValue U_ICU_ENTRY_POINT_RENAME(uprv_decNumb erToIntegralValue)
#define uprv_decNumberToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToStr ing) #define uprv_decNumberToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToStr ing)
#define uprv_decNumberToUInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToUIn t32) #define uprv_decNumberToUInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToUIn t32)
#define uprv_decNumberTrim U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTrim) #define uprv_decNumberTrim U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTrim)
#define uprv_decNumberVersion U_ICU_ENTRY_POINT_RENAME(uprv_decNumberVersio n) #define uprv_decNumberVersion U_ICU_ENTRY_POINT_RENAME(uprv_decNumberVersio n)
#define uprv_decNumberXor U_ICU_ENTRY_POINT_RENAME(uprv_decNumberXor) #define uprv_decNumberXor U_ICU_ENTRY_POINT_RENAME(uprv_decNumberXor)
#define uprv_decNumberZero U_ICU_ENTRY_POINT_RENAME(uprv_decNumberZero) #define uprv_decNumberZero U_ICU_ENTRY_POINT_RENAME(uprv_decNumberZero)
#define uprv_deleteUObject U_ICU_ENTRY_POINT_RENAME(uprv_deleteUObject)
#define uprv_delete_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_delete_collIt erate) #define uprv_delete_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_delete_collIt erate)
#define uprv_dl_close U_ICU_ENTRY_POINT_RENAME(uprv_dl_close) #define uprv_dl_close U_ICU_ENTRY_POINT_RENAME(uprv_dl_close)
#define uprv_dl_open U_ICU_ENTRY_POINT_RENAME(uprv_dl_open) #define uprv_dl_open U_ICU_ENTRY_POINT_RENAME(uprv_dl_open)
#define uprv_dlsym_func U_ICU_ENTRY_POINT_RENAME(uprv_dlsym_func) #define uprv_dlsym_func U_ICU_ENTRY_POINT_RENAME(uprv_dlsym_func)
#define uprv_eastrncpy U_ICU_ENTRY_POINT_RENAME(uprv_eastrncpy) #define uprv_eastrncpy U_ICU_ENTRY_POINT_RENAME(uprv_eastrncpy)
#define uprv_ebcdicFromAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicFromAscii) #define uprv_ebcdicFromAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicFromAscii)
#define uprv_ebcdicToLowercaseAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicToL owercaseAscii) #define uprv_ebcdicToLowercaseAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicToL owercaseAscii)
#define uprv_ebcdictolower U_ICU_ENTRY_POINT_RENAME(uprv_ebcdictolower) #define uprv_ebcdictolower U_ICU_ENTRY_POINT_RENAME(uprv_ebcdictolower)
#define uprv_fabs U_ICU_ENTRY_POINT_RENAME(uprv_fabs) #define uprv_fabs U_ICU_ENTRY_POINT_RENAME(uprv_fabs)
#define uprv_floor U_ICU_ENTRY_POINT_RENAME(uprv_floor) #define uprv_floor U_ICU_ENTRY_POINT_RENAME(uprv_floor)
skipping to change at line 1311 skipping to change at line 1326
#define uprv_getMaxCharNameLength U_ICU_ENTRY_POINT_RENAME(uprv_getMaxCharN ameLength) #define uprv_getMaxCharNameLength U_ICU_ENTRY_POINT_RENAME(uprv_getMaxCharN ameLength)
#define uprv_getMaxValues U_ICU_ENTRY_POINT_RENAME(uprv_getMaxValues) #define uprv_getMaxValues U_ICU_ENTRY_POINT_RENAME(uprv_getMaxValues)
#define uprv_getNaN U_ICU_ENTRY_POINT_RENAME(uprv_getNaN) #define uprv_getNaN U_ICU_ENTRY_POINT_RENAME(uprv_getNaN)
#define uprv_getRawUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getRawUTCtime) #define uprv_getRawUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getRawUTCtime)
#define uprv_getStaticCurrencyName U_ICU_ENTRY_POINT_RENAME(uprv_getStaticC urrencyName) #define uprv_getStaticCurrencyName U_ICU_ENTRY_POINT_RENAME(uprv_getStaticC urrencyName)
#define uprv_getUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getUTCtime) #define uprv_getUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getUTCtime)
#define uprv_haveProperties U_ICU_ENTRY_POINT_RENAME(uprv_haveProperties) #define uprv_haveProperties U_ICU_ENTRY_POINT_RENAME(uprv_haveProperties)
#define uprv_init_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_init_collIterat e) #define uprv_init_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_init_collIterat e)
#define uprv_init_pce U_ICU_ENTRY_POINT_RENAME(uprv_init_pce) #define uprv_init_pce U_ICU_ENTRY_POINT_RENAME(uprv_init_pce)
#define uprv_int32Comparator U_ICU_ENTRY_POINT_RENAME(uprv_int32Comparator) #define uprv_int32Comparator U_ICU_ENTRY_POINT_RENAME(uprv_int32Comparator)
#define uprv_isASCIILetter U_ICU_ENTRY_POINT_RENAME(uprv_isASCIILetter)
#define uprv_isInfinite U_ICU_ENTRY_POINT_RENAME(uprv_isInfinite) #define uprv_isInfinite U_ICU_ENTRY_POINT_RENAME(uprv_isInfinite)
#define uprv_isInvariantString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantStr ing) #define uprv_isInvariantString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantStr ing)
#define uprv_isInvariantUString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantUS tring) #define uprv_isInvariantUString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantUS tring)
#define uprv_isNaN U_ICU_ENTRY_POINT_RENAME(uprv_isNaN) #define uprv_isNaN U_ICU_ENTRY_POINT_RENAME(uprv_isNaN)
#define uprv_isNegativeInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isNegativeInf inity) #define uprv_isNegativeInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isNegativeInf inity)
#define uprv_isPositiveInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isPositiveInf inity) #define uprv_isPositiveInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isPositiveInf inity)
#define uprv_itou U_ICU_ENTRY_POINT_RENAME(uprv_itou) #define uprv_itou U_ICU_ENTRY_POINT_RENAME(uprv_itou)
#define uprv_log U_ICU_ENTRY_POINT_RENAME(uprv_log) #define uprv_log U_ICU_ENTRY_POINT_RENAME(uprv_log)
#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc) #define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
#define uprv_mapFile U_ICU_ENTRY_POINT_RENAME(uprv_mapFile) #define uprv_mapFile U_ICU_ENTRY_POINT_RENAME(uprv_mapFile)
#define uprv_max U_ICU_ENTRY_POINT_RENAME(uprv_max) #define uprv_max U_ICU_ENTRY_POINT_RENAME(uprv_max)
#define uprv_maxMantissa U_ICU_ENTRY_POINT_RENAME(uprv_maxMantissa) #define uprv_maxMantissa U_ICU_ENTRY_POINT_RENAME(uprv_maxMantissa)
#define uprv_maximumPtr U_ICU_ENTRY_POINT_RENAME(uprv_maximumPtr) #define uprv_maximumPtr U_ICU_ENTRY_POINT_RENAME(uprv_maximumPtr)
#define uprv_min U_ICU_ENTRY_POINT_RENAME(uprv_min) #define uprv_min U_ICU_ENTRY_POINT_RENAME(uprv_min)
#define uprv_modf U_ICU_ENTRY_POINT_RENAME(uprv_modf) #define uprv_modf U_ICU_ENTRY_POINT_RENAME(uprv_modf)
#define uprv_new_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_new_collIterate) #define uprv_new_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_new_collIterate)
#define uprv_openPatternWhiteSpaceSet U_ICU_ENTRY_POINT_RENAME(uprv_openPat ternWhiteSpaceSet)
#define uprv_parseCurrency U_ICU_ENTRY_POINT_RENAME(uprv_parseCurrency) #define uprv_parseCurrency U_ICU_ENTRY_POINT_RENAME(uprv_parseCurrency)
#define uprv_pathIsAbsolute U_ICU_ENTRY_POINT_RENAME(uprv_pathIsAbsolute) #define uprv_pathIsAbsolute U_ICU_ENTRY_POINT_RENAME(uprv_pathIsAbsolute)
#define uprv_pow U_ICU_ENTRY_POINT_RENAME(uprv_pow) #define uprv_pow U_ICU_ENTRY_POINT_RENAME(uprv_pow)
#define uprv_pow10 U_ICU_ENTRY_POINT_RENAME(uprv_pow10) #define uprv_pow10 U_ICU_ENTRY_POINT_RENAME(uprv_pow10)
#define uprv_realloc U_ICU_ENTRY_POINT_RENAME(uprv_realloc) #define uprv_realloc U_ICU_ENTRY_POINT_RENAME(uprv_realloc)
#define uprv_round U_ICU_ENTRY_POINT_RENAME(uprv_round) #define uprv_round U_ICU_ENTRY_POINT_RENAME(uprv_round)
#define uprv_sortArray U_ICU_ENTRY_POINT_RENAME(uprv_sortArray) #define uprv_sortArray U_ICU_ENTRY_POINT_RENAME(uprv_sortArray)
#define uprv_strCompare U_ICU_ENTRY_POINT_RENAME(uprv_strCompare) #define uprv_strCompare U_ICU_ENTRY_POINT_RENAME(uprv_strCompare)
#define uprv_strdup U_ICU_ENTRY_POINT_RENAME(uprv_strdup) #define uprv_strdup U_ICU_ENTRY_POINT_RENAME(uprv_strdup)
#define uprv_stricmp U_ICU_ENTRY_POINT_RENAME(uprv_stricmp)
#define uprv_strndup U_ICU_ENTRY_POINT_RENAME(uprv_strndup) #define uprv_strndup U_ICU_ENTRY_POINT_RENAME(uprv_strndup)
#define uprv_strnicmp U_ICU_ENTRY_POINT_RENAME(uprv_strnicmp)
#define uprv_syntaxError U_ICU_ENTRY_POINT_RENAME(uprv_syntaxError) #define uprv_syntaxError U_ICU_ENTRY_POINT_RENAME(uprv_syntaxError)
#define uprv_timezone U_ICU_ENTRY_POINT_RENAME(uprv_timezone) #define uprv_timezone U_ICU_ENTRY_POINT_RENAME(uprv_timezone)
#define uprv_toupper U_ICU_ENTRY_POINT_RENAME(uprv_toupper) #define uprv_toupper U_ICU_ENTRY_POINT_RENAME(uprv_toupper)
#define uprv_trunc U_ICU_ENTRY_POINT_RENAME(uprv_trunc) #define uprv_trunc U_ICU_ENTRY_POINT_RENAME(uprv_trunc)
#define uprv_tzname U_ICU_ENTRY_POINT_RENAME(uprv_tzname) #define uprv_tzname U_ICU_ENTRY_POINT_RENAME(uprv_tzname)
#define uprv_tzset U_ICU_ENTRY_POINT_RENAME(uprv_tzset) #define uprv_tzset U_ICU_ENTRY_POINT_RENAME(uprv_tzset)
#define uprv_uca_addAnElement U_ICU_ENTRY_POINT_RENAME(uprv_uca_addAnElemen t) #define uprv_uca_addAnElement U_ICU_ENTRY_POINT_RENAME(uprv_uca_addAnElemen t)
#define uprv_uca_assembleTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_assembleTa ble) #define uprv_uca_assembleTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_assembleTa ble)
#define uprv_uca_canonicalClosure U_ICU_ENTRY_POINT_RENAME(uprv_uca_canonic alClosure) #define uprv_uca_canonicalClosure U_ICU_ENTRY_POINT_RENAME(uprv_uca_canonic alClosure)
#define uprv_uca_closeTempTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_closeTemp Table) #define uprv_uca_closeTempTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_closeTemp Table)
skipping to change at line 1600 skipping to change at line 1617
#define uspoof_setAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedCh ars) #define uspoof_setAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedCh ars)
#define uspoof_setAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowed Locales) #define uspoof_setAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowed Locales)
#define uspoof_setAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_setAllo wedUnicodeSet) #define uspoof_setAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_setAllo wedUnicodeSet)
#define uspoof_setChecks U_ICU_ENTRY_POINT_RENAME(uspoof_setChecks) #define uspoof_setChecks U_ICU_ENTRY_POINT_RENAME(uspoof_setChecks)
#define uspoof_swap U_ICU_ENTRY_POINT_RENAME(uspoof_swap) #define uspoof_swap U_ICU_ENTRY_POINT_RENAME(uspoof_swap)
#define usprep_close U_ICU_ENTRY_POINT_RENAME(usprep_close) #define usprep_close U_ICU_ENTRY_POINT_RENAME(usprep_close)
#define usprep_open U_ICU_ENTRY_POINT_RENAME(usprep_open) #define usprep_open U_ICU_ENTRY_POINT_RENAME(usprep_open)
#define usprep_openByType U_ICU_ENTRY_POINT_RENAME(usprep_openByType) #define usprep_openByType U_ICU_ENTRY_POINT_RENAME(usprep_openByType)
#define usprep_prepare U_ICU_ENTRY_POINT_RENAME(usprep_prepare) #define usprep_prepare U_ICU_ENTRY_POINT_RENAME(usprep_prepare)
#define usprep_swap U_ICU_ENTRY_POINT_RENAME(usprep_swap) #define usprep_swap U_ICU_ENTRY_POINT_RENAME(usprep_swap)
#define ustr_foldCase U_ICU_ENTRY_POINT_RENAME(ustr_foldCase) #define ustr_hashCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashCharsN)
#define ustr_toLower U_ICU_ENTRY_POINT_RENAME(ustr_toLower) #define ustr_hashICharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashICharsN)
#define ustr_toTitle U_ICU_ENTRY_POINT_RENAME(ustr_toTitle) #define ustr_hashUCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashUCharsN)
#define ustr_toUpper U_ICU_ENTRY_POINT_RENAME(ustr_toUpper) #define ustrcase_internalFold U_ICU_ENTRY_POINT_RENAME(ustrcase_internalFol
#define utext_caseCompare U_ICU_ENTRY_POINT_RENAME(utext_caseCompare) d)
#define utext_caseCompareNativeLimit U_ICU_ENTRY_POINT_RENAME(utext_caseCom #define ustrcase_internalToLower U_ICU_ENTRY_POINT_RENAME(ustrcase_internal
pareNativeLimit) ToLower)
#define ustrcase_internalToTitle U_ICU_ENTRY_POINT_RENAME(ustrcase_internal
ToTitle)
#define ustrcase_internalToUpper U_ICU_ENTRY_POINT_RENAME(ustrcase_internal
ToUpper)
#define ustrcase_map U_ICU_ENTRY_POINT_RENAME(ustrcase_map)
#define ustrcase_setTempCaseMapLocale U_ICU_ENTRY_POINT_RENAME(ustrcase_set
TempCaseMapLocale)
#define utext_char32At U_ICU_ENTRY_POINT_RENAME(utext_char32At) #define utext_char32At U_ICU_ENTRY_POINT_RENAME(utext_char32At)
#define utext_clone U_ICU_ENTRY_POINT_RENAME(utext_clone) #define utext_clone U_ICU_ENTRY_POINT_RENAME(utext_clone)
#define utext_close U_ICU_ENTRY_POINT_RENAME(utext_close) #define utext_close U_ICU_ENTRY_POINT_RENAME(utext_close)
#define utext_compare U_ICU_ENTRY_POINT_RENAME(utext_compare)
#define utext_compareNativeLimit U_ICU_ENTRY_POINT_RENAME(utext_compareNati
veLimit)
#define utext_copy U_ICU_ENTRY_POINT_RENAME(utext_copy) #define utext_copy U_ICU_ENTRY_POINT_RENAME(utext_copy)
#define utext_current32 U_ICU_ENTRY_POINT_RENAME(utext_current32) #define utext_current32 U_ICU_ENTRY_POINT_RENAME(utext_current32)
#define utext_equals U_ICU_ENTRY_POINT_RENAME(utext_equals) #define utext_equals U_ICU_ENTRY_POINT_RENAME(utext_equals)
#define utext_extract U_ICU_ENTRY_POINT_RENAME(utext_extract) #define utext_extract U_ICU_ENTRY_POINT_RENAME(utext_extract)
#define utext_freeze U_ICU_ENTRY_POINT_RENAME(utext_freeze) #define utext_freeze U_ICU_ENTRY_POINT_RENAME(utext_freeze)
#define utext_getNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex) #define utext_getNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex)
#define utext_getPreviousNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getPrev iousNativeIndex) #define utext_getPreviousNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getPrev iousNativeIndex)
#define utext_hasMetaData U_ICU_ENTRY_POINT_RENAME(utext_hasMetaData) #define utext_hasMetaData U_ICU_ENTRY_POINT_RENAME(utext_hasMetaData)
#define utext_isLengthExpensive U_ICU_ENTRY_POINT_RENAME(utext_isLengthExpe nsive) #define utext_isLengthExpensive U_ICU_ENTRY_POINT_RENAME(utext_isLengthExpe nsive)
#define utext_isWritable U_ICU_ENTRY_POINT_RENAME(utext_isWritable) #define utext_isWritable U_ICU_ENTRY_POINT_RENAME(utext_isWritable)
skipping to change at line 1759 skipping to change at line 1777
#define ztrans_getFrom U_ICU_ENTRY_POINT_RENAME(ztrans_getFrom) #define ztrans_getFrom U_ICU_ENTRY_POINT_RENAME(ztrans_getFrom)
#define ztrans_getStaticClassID U_ICU_ENTRY_POINT_RENAME(ztrans_getStaticCl assID) #define ztrans_getStaticClassID U_ICU_ENTRY_POINT_RENAME(ztrans_getStaticCl assID)
#define ztrans_getTime U_ICU_ENTRY_POINT_RENAME(ztrans_getTime) #define ztrans_getTime U_ICU_ENTRY_POINT_RENAME(ztrans_getTime)
#define ztrans_getTo U_ICU_ENTRY_POINT_RENAME(ztrans_getTo) #define ztrans_getTo U_ICU_ENTRY_POINT_RENAME(ztrans_getTo)
#define ztrans_open U_ICU_ENTRY_POINT_RENAME(ztrans_open) #define ztrans_open U_ICU_ENTRY_POINT_RENAME(ztrans_open)
#define ztrans_openEmpty U_ICU_ENTRY_POINT_RENAME(ztrans_openEmpty) #define ztrans_openEmpty U_ICU_ENTRY_POINT_RENAME(ztrans_openEmpty)
#define ztrans_setFrom U_ICU_ENTRY_POINT_RENAME(ztrans_setFrom) #define ztrans_setFrom U_ICU_ENTRY_POINT_RENAME(ztrans_setFrom)
#define ztrans_setTime U_ICU_ENTRY_POINT_RENAME(ztrans_setTime) #define ztrans_setTime U_ICU_ENTRY_POINT_RENAME(ztrans_setTime)
#define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo) #define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo)
/* C++ class names renaming defines */
#ifdef XP_CPLUSPLUS
#if !U_HAVE_NAMESPACE
#define AbsoluteValueSubstitution U_ICU_ENTRY_POINT_RENAME(AbsoluteValueSub
stitution)
#define AlphabeticIndex U_ICU_ENTRY_POINT_RENAME(AlphabeticIndex)
#define AlternateSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(AlternateSub
stitutionSubtable)
#define AnchorTable U_ICU_ENTRY_POINT_RENAME(AnchorTable)
#define AndConstraint U_ICU_ENTRY_POINT_RENAME(AndConstraint)
#define AnnualTimeZoneRule U_ICU_ENTRY_POINT_RENAME(AnnualTimeZoneRule)
#define AnyTransliterator U_ICU_ENTRY_POINT_RENAME(AnyTransliterator)
#define Appendable U_ICU_ENTRY_POINT_RENAME(Appendable)
#define ArabicOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(ArabicOpenTypeL
ayoutEngine)
#define ArabicShaping U_ICU_ENTRY_POINT_RENAME(ArabicShaping)
#define ArgExtractor U_ICU_ENTRY_POINT_RENAME(ArgExtractor)
#define BMPSet U_ICU_ENTRY_POINT_RENAME(BMPSet)
#define BackwardUTrie2StringIterator U_ICU_ENTRY_POINT_RENAME(BackwardUTrie
2StringIterator)
#define BadCharacterTable U_ICU_ENTRY_POINT_RENAME(BadCharacterTable)
#define BasicCalendarFactory U_ICU_ENTRY_POINT_RENAME(BasicCalendarFactory)
#define BasicTimeZone U_ICU_ENTRY_POINT_RENAME(BasicTimeZone)
#define BinarySearchLookupTable U_ICU_ENTRY_POINT_RENAME(BinarySearchLookup
Table)
#define BoyerMooreSearch U_ICU_ENTRY_POINT_RENAME(BoyerMooreSearch)
#define BreakIterator U_ICU_ENTRY_POINT_RENAME(BreakIterator)
#define BreakTransliterator U_ICU_ENTRY_POINT_RENAME(BreakTransliterator)
#define BuddhistCalendar U_ICU_ENTRY_POINT_RENAME(BuddhistCalendar)
#define BuildCompactTrieHorizontalNode U_ICU_ENTRY_POINT_RENAME(BuildCompac
tTrieHorizontalNode)
#define BuildCompactTrieNode U_ICU_ENTRY_POINT_RENAME(BuildCompactTrieNode)
#define BuildCompactTrieVerticalNode U_ICU_ENTRY_POINT_RENAME(BuildCompactT
rieVerticalNode)
#define BuilderScriptSet U_ICU_ENTRY_POINT_RENAME(BuilderScriptSet)
#define ByteSink U_ICU_ENTRY_POINT_RENAME(ByteSink)
#define BytesTrie U_ICU_ENTRY_POINT_RENAME(BytesTrie)
#define BytesTrieBuilder U_ICU_ENTRY_POINT_RENAME(BytesTrieBuilder)
#define BytesTrieElement U_ICU_ENTRY_POINT_RENAME(BytesTrieElement)
#define CEBuffer U_ICU_ENTRY_POINT_RENAME(CEBuffer)
#define CECalendar U_ICU_ENTRY_POINT_RENAME(CECalendar)
#define CEList U_ICU_ENTRY_POINT_RENAME(CEList)
#define CEToStringsMap U_ICU_ENTRY_POINT_RENAME(CEToStringsMap)
#define CFactory U_ICU_ENTRY_POINT_RENAME(CFactory)
#define Calendar U_ICU_ENTRY_POINT_RENAME(Calendar)
#define CalendarAstronomer U_ICU_ENTRY_POINT_RENAME(CalendarAstronomer)
#define CalendarCache U_ICU_ENTRY_POINT_RENAME(CalendarCache)
#define CalendarData U_ICU_ENTRY_POINT_RENAME(CalendarData)
#define CalendarService U_ICU_ENTRY_POINT_RENAME(CalendarService)
#define CanonIterData U_ICU_ENTRY_POINT_RENAME(CanonIterData)
#define CanonIterDataSingleton U_ICU_ENTRY_POINT_RENAME(CanonIterDataSingle
ton)
#define CanonMarkFilter U_ICU_ENTRY_POINT_RENAME(CanonMarkFilter)
#define CanonShaping U_ICU_ENTRY_POINT_RENAME(CanonShaping)
#define CanonicalIterator U_ICU_ENTRY_POINT_RENAME(CanonicalIterator)
#define CaseMapTransliterator U_ICU_ENTRY_POINT_RENAME(CaseMapTransliterato
r)
#define ChainingContextualSubstitutionFormat1Subtable U_ICU_ENTRY_POINT_REN
AME(ChainingContextualSubstitutionFormat1Subtable)
#define ChainingContextualSubstitutionFormat2Subtable U_ICU_ENTRY_POINT_REN
AME(ChainingContextualSubstitutionFormat2Subtable)
#define ChainingContextualSubstitutionFormat3Subtable U_ICU_ENTRY_POINT_REN
AME(ChainingContextualSubstitutionFormat3Subtable)
#define ChainingContextualSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(Cha
iningContextualSubstitutionSubtable)
#define CharString U_ICU_ENTRY_POINT_RENAME(CharString)
#define CharSubstitutionFilter U_ICU_ENTRY_POINT_RENAME(CharSubstitutionFil
ter)
#define CharacterIterator U_ICU_ENTRY_POINT_RENAME(CharacterIterator)
#define CharacterNode U_ICU_ENTRY_POINT_RENAME(CharacterNode)
#define CharsetDetector U_ICU_ENTRY_POINT_RENAME(CharsetDetector)
#define CharsetMatch U_ICU_ENTRY_POINT_RENAME(CharsetMatch)
#define CharsetRecog_2022 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_2022)
#define CharsetRecog_2022CN U_ICU_ENTRY_POINT_RENAME(CharsetRecog_2022CN)
#define CharsetRecog_2022JP U_ICU_ENTRY_POINT_RENAME(CharsetRecog_2022JP)
#define CharsetRecog_2022KR U_ICU_ENTRY_POINT_RENAME(CharsetRecog_2022KR)
#define CharsetRecog_8859_1 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1)
#define CharsetRecog_8859_1_da U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_da)
#define CharsetRecog_8859_1_de U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_de)
#define CharsetRecog_8859_1_en U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_en)
#define CharsetRecog_8859_1_es U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_es)
#define CharsetRecog_8859_1_fr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_fr)
#define CharsetRecog_8859_1_it U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_it)
#define CharsetRecog_8859_1_nl U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_nl)
#define CharsetRecog_8859_1_no U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_no)
#define CharsetRecog_8859_1_pt U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_pt)
#define CharsetRecog_8859_1_sv U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1
_sv)
#define CharsetRecog_8859_2 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2)
#define CharsetRecog_8859_2_cs U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2
_cs)
#define CharsetRecog_8859_2_hu U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2
_hu)
#define CharsetRecog_8859_2_pl U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2
_pl)
#define CharsetRecog_8859_2_ro U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2
_ro)
#define CharsetRecog_8859_5 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_5)
#define CharsetRecog_8859_5_ru U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_5
_ru)
#define CharsetRecog_8859_6 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_6)
#define CharsetRecog_8859_6_ar U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_6
_ar)
#define CharsetRecog_8859_7 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_7)
#define CharsetRecog_8859_7_el U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_7
_el)
#define CharsetRecog_8859_8 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_8)
#define CharsetRecog_8859_8_I_he U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859
_8_I_he)
#define CharsetRecog_8859_8_he U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_8
_he)
#define CharsetRecog_8859_9 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_9)
#define CharsetRecog_8859_9_tr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_9
_tr)
#define CharsetRecog_IBM420_ar U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IBM420
_ar)
#define CharsetRecog_IBM420_ar_ltr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IB
M420_ar_ltr)
#define CharsetRecog_IBM420_ar_rtl U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IB
M420_ar_rtl)
#define CharsetRecog_IBM424_he U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IBM424
_he)
#define CharsetRecog_IBM424_he_ltr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IB
M424_he_ltr)
#define CharsetRecog_IBM424_he_rtl U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IB
M424_he_rtl)
#define CharsetRecog_KOI8_R U_ICU_ENTRY_POINT_RENAME(CharsetRecog_KOI8_R)
#define CharsetRecog_UTF8 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF8)
#define CharsetRecog_UTF_16_BE U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_16
_BE)
#define CharsetRecog_UTF_16_LE U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_16
_LE)
#define CharsetRecog_UTF_32 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_32)
#define CharsetRecog_UTF_32_BE U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_32
_BE)
#define CharsetRecog_UTF_32_LE U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_32
_LE)
#define CharsetRecog_Unicode U_ICU_ENTRY_POINT_RENAME(CharsetRecog_Unicode)
#define CharsetRecog_big5 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_big5)
#define CharsetRecog_euc U_ICU_ENTRY_POINT_RENAME(CharsetRecog_euc)
#define CharsetRecog_euc_jp U_ICU_ENTRY_POINT_RENAME(CharsetRecog_euc_jp)
#define CharsetRecog_euc_kr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_euc_kr)
#define CharsetRecog_gb_18030 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_gb_1803
0)
#define CharsetRecog_mbcs U_ICU_ENTRY_POINT_RENAME(CharsetRecog_mbcs)
#define CharsetRecog_sbcs U_ICU_ENTRY_POINT_RENAME(CharsetRecog_sbcs)
#define CharsetRecog_sjis U_ICU_ENTRY_POINT_RENAME(CharsetRecog_sjis)
#define CharsetRecog_windows_1251 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_win
dows_1251)
#define CharsetRecog_windows_1256 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_win
dows_1256)
#define CharsetRecognizer U_ICU_ENTRY_POINT_RENAME(CharsetRecognizer)
#define CheckedArrayByteSink U_ICU_ENTRY_POINT_RENAME(CheckedArrayByteSink)
#define ChineseCalendar U_ICU_ENTRY_POINT_RENAME(ChineseCalendar)
#define ChoiceFormat U_ICU_ENTRY_POINT_RENAME(ChoiceFormat)
#define ClassDefFormat1Table U_ICU_ENTRY_POINT_RENAME(ClassDefFormat1Table)
#define ClassDefFormat2Table U_ICU_ENTRY_POINT_RENAME(ClassDefFormat2Table)
#define ClassDefinitionTable U_ICU_ENTRY_POINT_RENAME(ClassDefinitionTable)
#define ClockMath U_ICU_ENTRY_POINT_RENAME(ClockMath)
#define CollData U_ICU_ENTRY_POINT_RENAME(CollData)
#define CollDataCache U_ICU_ENTRY_POINT_RENAME(CollDataCache)
#define CollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(CollDataCacheEntry)
#define CollationElementIterator U_ICU_ENTRY_POINT_RENAME(CollationElementI
terator)
#define CollationKey U_ICU_ENTRY_POINT_RENAME(CollationKey)
#define CollationLocaleListEnumeration U_ICU_ENTRY_POINT_RENAME(CollationLo
caleListEnumeration)
#define Collator U_ICU_ENTRY_POINT_RENAME(Collator)
#define CollatorFactory U_ICU_ENTRY_POINT_RENAME(CollatorFactory)
#define CompactTrieDictionary U_ICU_ENTRY_POINT_RENAME(CompactTrieDictionar
y)
#define CompactTrieEnumeration U_ICU_ENTRY_POINT_RENAME(CompactTrieEnumerat
ion)
#define ComposeNormalizer2 U_ICU_ENTRY_POINT_RENAME(ComposeNormalizer2)
#define CompoundTransliterator U_ICU_ENTRY_POINT_RENAME(CompoundTranslitera
tor)
#define ConfusabledataBuilder U_ICU_ENTRY_POINT_RENAME(ConfusabledataBuilde
r)
#define ContextualGlyphSubstitutionProcessor U_ICU_ENTRY_POINT_RENAME(Conte
xtualGlyphSubstitutionProcessor)
#define ContextualSubstitutionBase U_ICU_ENTRY_POINT_RENAME(ContextualSubst
itutionBase)
#define ContextualSubstitutionFormat1Subtable U_ICU_ENTRY_POINT_RENAME(Cont
extualSubstitutionFormat1Subtable)
#define ContextualSubstitutionFormat2Subtable U_ICU_ENTRY_POINT_RENAME(Cont
extualSubstitutionFormat2Subtable)
#define ContextualSubstitutionFormat3Subtable U_ICU_ENTRY_POINT_RENAME(Cont
extualSubstitutionFormat3Subtable)
#define ContextualSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(ContextualS
ubstitutionSubtable)
#define CopticCalendar U_ICU_ENTRY_POINT_RENAME(CopticCalendar)
#define CoverageFormat1Table U_ICU_ENTRY_POINT_RENAME(CoverageFormat1Table)
#define CoverageFormat2Table U_ICU_ENTRY_POINT_RENAME(CoverageFormat2Table)
#define CoverageTable U_ICU_ENTRY_POINT_RENAME(CoverageTable)
#define CurrencyAmount U_ICU_ENTRY_POINT_RENAME(CurrencyAmount)
#define CurrencyFormat U_ICU_ENTRY_POINT_RENAME(CurrencyFormat)
#define CurrencyPluralInfo U_ICU_ENTRY_POINT_RENAME(CurrencyPluralInfo)
#define CurrencyUnit U_ICU_ENTRY_POINT_RENAME(CurrencyUnit)
#define CursiveAttachmentSubtable U_ICU_ENTRY_POINT_RENAME(CursiveAttachmen
tSubtable)
#define DTRedundantEnumeration U_ICU_ENTRY_POINT_RENAME(DTRedundantEnumerat
ion)
#define DTSkeletonEnumeration U_ICU_ENTRY_POINT_RENAME(DTSkeletonEnumeratio
n)
#define DateFormat U_ICU_ENTRY_POINT_RENAME(DateFormat)
#define DateFormatSymbols U_ICU_ENTRY_POINT_RENAME(DateFormatSymbols)
#define DateInterval U_ICU_ENTRY_POINT_RENAME(DateInterval)
#define DateIntervalFormat U_ICU_ENTRY_POINT_RENAME(DateIntervalFormat)
#define DateIntervalInfo U_ICU_ENTRY_POINT_RENAME(DateIntervalInfo)
#define DateTimeMatcher U_ICU_ENTRY_POINT_RENAME(DateTimeMatcher)
#define DateTimePatternGenerator U_ICU_ENTRY_POINT_RENAME(DateTimePatternGe
nerator)
#define DateTimeRule U_ICU_ENTRY_POINT_RENAME(DateTimeRule)
#define DecimalFormat U_ICU_ENTRY_POINT_RENAME(DecimalFormat)
#define DecimalFormatStaticSets U_ICU_ENTRY_POINT_RENAME(DecimalFormatStati
cSets)
#define DecimalFormatSymbols U_ICU_ENTRY_POINT_RENAME(DecimalFormatSymbols)
#define DecomposeNormalizer2 U_ICU_ENTRY_POINT_RENAME(DecomposeNormalizer2)
#define DefaultCalendarFactory U_ICU_ENTRY_POINT_RENAME(DefaultCalendarFact
ory)
#define DefaultCharMapper U_ICU_ENTRY_POINT_RENAME(DefaultCharMapper)
#define DeviceTable U_ICU_ENTRY_POINT_RENAME(DeviceTable)
#define DictionaryBreakEngine U_ICU_ENTRY_POINT_RENAME(DictionaryBreakEngin
e)
#define DigitList U_ICU_ENTRY_POINT_RENAME(DigitList)
#define DistanceInfo U_ICU_ENTRY_POINT_RENAME(DistanceInfo)
#define ErrorCode U_ICU_ENTRY_POINT_RENAME(ErrorCode)
#define EscapeTransliterator U_ICU_ENTRY_POINT_RENAME(EscapeTransliterator)
#define EthiopicCalendar U_ICU_ENTRY_POINT_RENAME(EthiopicCalendar)
#define EventListener U_ICU_ENTRY_POINT_RENAME(EventListener)
#define ExtensionSubtable U_ICU_ENTRY_POINT_RENAME(ExtensionSubtable)
#define FCDNormalizer2 U_ICU_ENTRY_POINT_RENAME(FCDNormalizer2)
#define FCDTrieSingleton U_ICU_ENTRY_POINT_RENAME(FCDTrieSingleton)
#define FeatureListTable U_ICU_ENTRY_POINT_RENAME(FeatureListTable)
#define FieldPosition U_ICU_ENTRY_POINT_RENAME(FieldPosition)
#define FieldPositionHandler U_ICU_ENTRY_POINT_RENAME(FieldPositionHandler)
#define FieldPositionIterator U_ICU_ENTRY_POINT_RENAME(FieldPositionIterato
r)
#define FieldPositionIteratorHandler U_ICU_ENTRY_POINT_RENAME(FieldPosition
IteratorHandler)
#define FieldPositionOnlyHandler U_ICU_ENTRY_POINT_RENAME(FieldPositionOnly
Handler)
#define FilteredNormalizer2 U_ICU_ENTRY_POINT_RENAME(FilteredNormalizer2)
#define FontRuns U_ICU_ENTRY_POINT_RENAME(FontRuns)
#define Format U_ICU_ENTRY_POINT_RENAME(Format)
#define Format1AnchorTable U_ICU_ENTRY_POINT_RENAME(Format1AnchorTable)
#define Format2AnchorTable U_ICU_ENTRY_POINT_RENAME(Format2AnchorTable)
#define Format3AnchorTable U_ICU_ENTRY_POINT_RENAME(Format3AnchorTable)
#define FormatNameEnumeration U_ICU_ENTRY_POINT_RENAME(FormatNameEnumeratio
n)
#define FormatParser U_ICU_ENTRY_POINT_RENAME(FormatParser)
#define Formattable U_ICU_ENTRY_POINT_RENAME(Formattable)
#define ForwardCharacterIterator U_ICU_ENTRY_POINT_RENAME(ForwardCharacterI
terator)
#define ForwardUTrie2StringIterator U_ICU_ENTRY_POINT_RENAME(ForwardUTrie2S
tringIterator)
#define FractionalPartSubstitution U_ICU_ENTRY_POINT_RENAME(FractionalPartS
ubstitution)
#define FunctionReplacer U_ICU_ENTRY_POINT_RENAME(FunctionReplacer)
#define GDEFMarkFilter U_ICU_ENTRY_POINT_RENAME(GDEFMarkFilter)
#define GNameSearchHandler U_ICU_ENTRY_POINT_RENAME(GNameSearchHandler)
#define GXLayoutEngine U_ICU_ENTRY_POINT_RENAME(GXLayoutEngine)
#define GlyphDefinitionTableHeader U_ICU_ENTRY_POINT_RENAME(GlyphDefinition
TableHeader)
#define GlyphIterator U_ICU_ENTRY_POINT_RENAME(GlyphIterator)
#define GlyphLookupTableHeader U_ICU_ENTRY_POINT_RENAME(GlyphLookupTableHea
der)
#define GlyphPositionAdjustments U_ICU_ENTRY_POINT_RENAME(GlyphPositionAdju
stments)
#define GlyphPositioningLookupProcessor U_ICU_ENTRY_POINT_RENAME(GlyphPosit
ioningLookupProcessor)
#define GlyphPositioningTableHeader U_ICU_ENTRY_POINT_RENAME(GlyphPositioni
ngTableHeader)
#define GlyphSubstitutionLookupProcessor U_ICU_ENTRY_POINT_RENAME(GlyphSubs
titutionLookupProcessor)
#define GlyphSubstitutionTableHeader U_ICU_ENTRY_POINT_RENAME(GlyphSubstitu
tionTableHeader)
#define GoodSuffixTable U_ICU_ENTRY_POINT_RENAME(GoodSuffixTable)
#define Grego U_ICU_ENTRY_POINT_RENAME(Grego)
#define GregorianCalendar U_ICU_ENTRY_POINT_RENAME(GregorianCalendar)
#define HanOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(HanOpenTypeLayoutE
ngine)
#define HangulOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(HangulOpenTypeL
ayoutEngine)
#define HebrewCalendar U_ICU_ENTRY_POINT_RENAME(HebrewCalendar)
#define ICUBreakIteratorFactory U_ICU_ENTRY_POINT_RENAME(ICUBreakIteratorFa
ctory)
#define ICUBreakIteratorService U_ICU_ENTRY_POINT_RENAME(ICUBreakIteratorSe
rvice)
#define ICUCollatorFactory U_ICU_ENTRY_POINT_RENAME(ICUCollatorFactory)
#define ICUCollatorService U_ICU_ENTRY_POINT_RENAME(ICUCollatorService)
#define ICUDataTable U_ICU_ENTRY_POINT_RENAME(ICUDataTable)
#define ICULanguageBreakFactory U_ICU_ENTRY_POINT_RENAME(ICULanguageBreakFa
ctory)
#define ICULocaleService U_ICU_ENTRY_POINT_RENAME(ICULocaleService)
#define ICUNotifier U_ICU_ENTRY_POINT_RENAME(ICUNotifier)
#define ICUNumberFormatFactory U_ICU_ENTRY_POINT_RENAME(ICUNumberFormatFact
ory)
#define ICUNumberFormatService U_ICU_ENTRY_POINT_RENAME(ICUNumberFormatServ
ice)
#define ICUResourceBundleFactory U_ICU_ENTRY_POINT_RENAME(ICUResourceBundle
Factory)
#define ICUService U_ICU_ENTRY_POINT_RENAME(ICUService)
#define ICUServiceFactory U_ICU_ENTRY_POINT_RENAME(ICUServiceFactory)
#define ICUServiceKey U_ICU_ENTRY_POINT_RENAME(ICUServiceKey)
#define ICU_Utility U_ICU_ENTRY_POINT_RENAME(ICU_Utility)
#define IDNA U_ICU_ENTRY_POINT_RENAME(IDNA)
#define IndianCalendar U_ICU_ENTRY_POINT_RENAME(IndianCalendar)
#define IndicClassTable U_ICU_ENTRY_POINT_RENAME(IndicClassTable)
#define IndicOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(IndicOpenTypeLay
outEngine)
#define IndicRearrangementProcessor U_ICU_ENTRY_POINT_RENAME(IndicRearrange
mentProcessor)
#define IndicReordering U_ICU_ENTRY_POINT_RENAME(IndicReordering)
#define InitialTimeZoneRule U_ICU_ENTRY_POINT_RENAME(InitialTimeZoneRule)
#define InputText U_ICU_ENTRY_POINT_RENAME(InputText)
#define IntegralPartSubstitution U_ICU_ENTRY_POINT_RENAME(IntegralPartSubst
itution)
#define IslamicCalendar U_ICU_ENTRY_POINT_RENAME(IslamicCalendar)
#define IteratedChar U_ICU_ENTRY_POINT_RENAME(IteratedChar)
#define JapaneseCalendar U_ICU_ENTRY_POINT_RENAME(JapaneseCalendar)
#define KernTable U_ICU_ENTRY_POINT_RENAME(KernTable)
#define KeywordEnumeration U_ICU_ENTRY_POINT_RENAME(KeywordEnumeration)
#define KhmerBreakEngine U_ICU_ENTRY_POINT_RENAME(KhmerBreakEngine)
#define KhmerClassTable U_ICU_ENTRY_POINT_RENAME(KhmerClassTable)
#define KhmerOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(KhmerOpenTypeLay
outEngine)
#define KhmerReordering U_ICU_ENTRY_POINT_RENAME(KhmerReordering)
#define LECharMapper U_ICU_ENTRY_POINT_RENAME(LECharMapper)
#define LEFontInstance U_ICU_ENTRY_POINT_RENAME(LEFontInstance)
#define LEGlyphFilter U_ICU_ENTRY_POINT_RENAME(LEGlyphFilter)
#define LEGlyphStorage U_ICU_ENTRY_POINT_RENAME(LEGlyphStorage)
#define LEInsertionCallback U_ICU_ENTRY_POINT_RENAME(LEInsertionCallback)
#define LEInsertionList U_ICU_ENTRY_POINT_RENAME(LEInsertionList)
#define LXUtilities U_ICU_ENTRY_POINT_RENAME(LXUtilities)
#define LanguageBreakEngine U_ICU_ENTRY_POINT_RENAME(LanguageBreakEngine)
#define LanguageBreakFactory U_ICU_ENTRY_POINT_RENAME(LanguageBreakFactory)
#define LayoutEngine U_ICU_ENTRY_POINT_RENAME(LayoutEngine)
#define LigatureSubstitutionProcessor U_ICU_ENTRY_POINT_RENAME(LigatureSubs
titutionProcessor)
#define LigatureSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(LigatureSubst
itutionSubtable)
#define LocDataParser U_ICU_ENTRY_POINT_RENAME(LocDataParser)
#define Locale U_ICU_ENTRY_POINT_RENAME(Locale)
#define LocaleBased U_ICU_ENTRY_POINT_RENAME(LocaleBased)
#define LocaleDisplayNames U_ICU_ENTRY_POINT_RENAME(LocaleDisplayNames)
#define LocaleDisplayNamesImpl U_ICU_ENTRY_POINT_RENAME(LocaleDisplayNamesI
mpl)
#define LocaleKey U_ICU_ENTRY_POINT_RENAME(LocaleKey)
#define LocaleKeyFactory U_ICU_ENTRY_POINT_RENAME(LocaleKeyFactory)
#define LocaleRuns U_ICU_ENTRY_POINT_RENAME(LocaleRuns)
#define LocaleUtility U_ICU_ENTRY_POINT_RENAME(LocaleUtility)
#define LocalizationInfo U_ICU_ENTRY_POINT_RENAME(LocalizationInfo)
#define LookupListTable U_ICU_ENTRY_POINT_RENAME(LookupListTable)
#define LookupProcessor U_ICU_ENTRY_POINT_RENAME(LookupProcessor)
#define LookupSubtable U_ICU_ENTRY_POINT_RENAME(LookupSubtable)
#define LookupTable U_ICU_ENTRY_POINT_RENAME(LookupTable)
#define LowercaseTransliterator U_ICU_ENTRY_POINT_RENAME(LowercaseTranslite
rator)
#define MPreFixups U_ICU_ENTRY_POINT_RENAME(MPreFixups)
#define MarkArray U_ICU_ENTRY_POINT_RENAME(MarkArray)
#define MarkToBasePositioningSubtable U_ICU_ENTRY_POINT_RENAME(MarkToBasePo
sitioningSubtable)
#define MarkToLigaturePositioningSubtable U_ICU_ENTRY_POINT_RENAME(MarkToLi
gaturePositioningSubtable)
#define MarkToMarkPositioningSubtable U_ICU_ENTRY_POINT_RENAME(MarkToMarkPo
sitioningSubtable)
#define Measure U_ICU_ENTRY_POINT_RENAME(Measure)
#define MeasureFormat U_ICU_ENTRY_POINT_RENAME(MeasureFormat)
#define MeasureUnit U_ICU_ENTRY_POINT_RENAME(MeasureUnit)
#define MessageFormat U_ICU_ENTRY_POINT_RENAME(MessageFormat)
#define MessageFormatAdapter U_ICU_ENTRY_POINT_RENAME(MessageFormatAdapter)
#define MessageImpl U_ICU_ENTRY_POINT_RENAME(MessageImpl)
#define MessagePattern U_ICU_ENTRY_POINT_RENAME(MessagePattern)
#define MetaZoneIDsEnumeration U_ICU_ENTRY_POINT_RENAME(MetaZoneIDsEnumerat
ion)
#define ModulusSubstitution U_ICU_ENTRY_POINT_RENAME(ModulusSubstitution)
#define MoonRiseSetCoordFunc U_ICU_ENTRY_POINT_RENAME(MoonRiseSetCoordFunc)
#define MoonTimeAngleFunc U_ICU_ENTRY_POINT_RENAME(MoonTimeAngleFunc)
#define MorphSubtableHeader U_ICU_ENTRY_POINT_RENAME(MorphSubtableHeader)
#define MorphTableHeader U_ICU_ENTRY_POINT_RENAME(MorphTableHeader)
#define MultipleSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(MultipleSubst
itutionSubtable)
#define MultiplierSubstitution U_ICU_ENTRY_POINT_RENAME(MultiplierSubstitut
ion)
#define MutableTrieDictionary U_ICU_ENTRY_POINT_RENAME(MutableTrieDictionar
y)
#define MutableTrieEnumeration U_ICU_ENTRY_POINT_RENAME(MutableTrieEnumerat
ion)
#define NFDBuffer U_ICU_ENTRY_POINT_RENAME(NFDBuffer)
#define NFFactory U_ICU_ENTRY_POINT_RENAME(NFFactory)
#define NFRule U_ICU_ENTRY_POINT_RENAME(NFRule)
#define NFRuleSet U_ICU_ENTRY_POINT_RENAME(NFRuleSet)
#define NFSubstitution U_ICU_ENTRY_POINT_RENAME(NFSubstitution)
#define NGramParser U_ICU_ENTRY_POINT_RENAME(NGramParser)
#define NameUnicodeTransliterator U_ICU_ENTRY_POINT_RENAME(NameUnicodeTrans
literator)
#define NonContextualGlyphSubstitutionProcessor U_ICU_ENTRY_POINT_RENAME(No
nContextualGlyphSubstitutionProcessor)
#define NoopNormalizer2 U_ICU_ENTRY_POINT_RENAME(NoopNormalizer2)
#define Norm2AllModes U_ICU_ENTRY_POINT_RENAME(Norm2AllModes)
#define NormalizationTransliterator U_ICU_ENTRY_POINT_RENAME(NormalizationT
ransliterator)
#define Normalizer U_ICU_ENTRY_POINT_RENAME(Normalizer)
#define Normalizer2 U_ICU_ENTRY_POINT_RENAME(Normalizer2)
#define Normalizer2Factory U_ICU_ENTRY_POINT_RENAME(Normalizer2Factory)
#define Normalizer2Impl U_ICU_ENTRY_POINT_RENAME(Normalizer2Impl)
#define Normalizer2WithImpl U_ICU_ENTRY_POINT_RENAME(Normalizer2WithImpl)
#define NullSubstitution U_ICU_ENTRY_POINT_RENAME(NullSubstitution)
#define NullTransliterator U_ICU_ENTRY_POINT_RENAME(NullTransliterator)
#define NumberFormat U_ICU_ENTRY_POINT_RENAME(NumberFormat)
#define NumberFormatFactory U_ICU_ENTRY_POINT_RENAME(NumberFormatFactory)
#define NumberingSystem U_ICU_ENTRY_POINT_RENAME(NumberingSystem)
#define NumeratorSubstitution U_ICU_ENTRY_POINT_RENAME(NumeratorSubstitutio
n)
#define OlsonTimeZone U_ICU_ENTRY_POINT_RENAME(OlsonTimeZone)
#define OpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(OpenTypeLayoutEngine)
#define OpenTypeUtilities U_ICU_ENTRY_POINT_RENAME(OpenTypeUtilities)
#define OrConstraint U_ICU_ENTRY_POINT_RENAME(OrConstraint)
#define PCEBuffer U_ICU_ENTRY_POINT_RENAME(PCEBuffer)
#define PairPositioningFormat1Subtable U_ICU_ENTRY_POINT_RENAME(PairPositio
ningFormat1Subtable)
#define PairPositioningFormat2Subtable U_ICU_ENTRY_POINT_RENAME(PairPositio
ningFormat2Subtable)
#define PairPositioningSubtable U_ICU_ENTRY_POINT_RENAME(PairPositioningSub
table)
#define ParagraphLayout U_ICU_ENTRY_POINT_RENAME(ParagraphLayout)
#define ParseData U_ICU_ENTRY_POINT_RENAME(ParseData)
#define ParsePosition U_ICU_ENTRY_POINT_RENAME(ParsePosition)
#define PatternMap U_ICU_ENTRY_POINT_RENAME(PatternMap)
#define PatternMapIterator U_ICU_ENTRY_POINT_RENAME(PatternMapIterator)
#define PatternProps U_ICU_ENTRY_POINT_RENAME(PatternProps)
#define PersianCalendar U_ICU_ENTRY_POINT_RENAME(PersianCalendar)
#define PluralFormat U_ICU_ENTRY_POINT_RENAME(PluralFormat)
#define PluralKeywordEnumeration U_ICU_ENTRY_POINT_RENAME(PluralKeywordEnum
eration)
#define PluralRules U_ICU_ENTRY_POINT_RENAME(PluralRules)
#define PropNameData U_ICU_ENTRY_POINT_RENAME(PropNameData)
#define PtnElem U_ICU_ENTRY_POINT_RENAME(PtnElem)
#define PtnSkeleton U_ICU_ENTRY_POINT_RENAME(PtnSkeleton)
#define Quantifier U_ICU_ENTRY_POINT_RENAME(Quantifier)
#define RBBIDataWrapper U_ICU_ENTRY_POINT_RENAME(RBBIDataWrapper)
#define RBBINode U_ICU_ENTRY_POINT_RENAME(RBBINode)
#define RBBIRuleBuilder U_ICU_ENTRY_POINT_RENAME(RBBIRuleBuilder)
#define RBBIRuleScanner U_ICU_ENTRY_POINT_RENAME(RBBIRuleScanner)
#define RBBISetBuilder U_ICU_ENTRY_POINT_RENAME(RBBISetBuilder)
#define RBBIStateDescriptor U_ICU_ENTRY_POINT_RENAME(RBBIStateDescriptor)
#define RBBISymbolTable U_ICU_ENTRY_POINT_RENAME(RBBISymbolTable)
#define RBBISymbolTableEntry U_ICU_ENTRY_POINT_RENAME(RBBISymbolTableEntry)
#define RBBITableBuilder U_ICU_ENTRY_POINT_RENAME(RBBITableBuilder)
#define RCEBuffer U_ICU_ENTRY_POINT_RENAME(RCEBuffer)
#define RangeDescriptor U_ICU_ENTRY_POINT_RENAME(RangeDescriptor)
#define RegexCompile U_ICU_ENTRY_POINT_RENAME(RegexCompile)
#define RegexMatcher U_ICU_ENTRY_POINT_RENAME(RegexMatcher)
#define RegexPattern U_ICU_ENTRY_POINT_RENAME(RegexPattern)
#define RegexStaticSets U_ICU_ENTRY_POINT_RENAME(RegexStaticSets)
#define RegularExpression U_ICU_ENTRY_POINT_RENAME(RegularExpression)
#define RelativeDateFormat U_ICU_ENTRY_POINT_RENAME(RelativeDateFormat)
#define RemoveTransliterator U_ICU_ENTRY_POINT_RENAME(RemoveTransliterator)
#define ReorderingBuffer U_ICU_ENTRY_POINT_RENAME(ReorderingBuffer)
#define Replaceable U_ICU_ENTRY_POINT_RENAME(Replaceable)
#define ReplaceableGlue U_ICU_ENTRY_POINT_RENAME(ReplaceableGlue)
#define ResourceBundle U_ICU_ENTRY_POINT_RENAME(ResourceBundle)
#define RiseSetCoordFunc U_ICU_ENTRY_POINT_RENAME(RiseSetCoordFunc)
#define RuleBasedBreakIterator U_ICU_ENTRY_POINT_RENAME(RuleBasedBreakItera
tor)
#define RuleBasedCollator U_ICU_ENTRY_POINT_RENAME(RuleBasedCollator)
#define RuleBasedNumberFormat U_ICU_ENTRY_POINT_RENAME(RuleBasedNumberForma
t)
#define RuleBasedTimeZone U_ICU_ENTRY_POINT_RENAME(RuleBasedTimeZone)
#define RuleBasedTransliterator U_ICU_ENTRY_POINT_RENAME(RuleBasedTranslite
rator)
#define RuleChain U_ICU_ENTRY_POINT_RENAME(RuleChain)
#define RuleCharacterIterator U_ICU_ENTRY_POINT_RENAME(RuleCharacterIterato
r)
#define RuleHalf U_ICU_ENTRY_POINT_RENAME(RuleHalf)
#define RuleParser U_ICU_ENTRY_POINT_RENAME(RuleParser)
#define RunArray U_ICU_ENTRY_POINT_RENAME(RunArray)
#define SPUString U_ICU_ENTRY_POINT_RENAME(SPUString)
#define SPUStringPool U_ICU_ENTRY_POINT_RENAME(SPUStringPool)
#define SameValueSubstitution U_ICU_ENTRY_POINT_RENAME(SameValueSubstitutio
n)
#define ScriptListTable U_ICU_ENTRY_POINT_RENAME(ScriptListTable)
#define ScriptRunIterator U_ICU_ENTRY_POINT_RENAME(ScriptRunIterator)
#define ScriptSet U_ICU_ENTRY_POINT_RENAME(ScriptSet)
#define ScriptTable U_ICU_ENTRY_POINT_RENAME(ScriptTable)
#define SearchIterator U_ICU_ENTRY_POINT_RENAME(SearchIterator)
#define SegmentArrayProcessor U_ICU_ENTRY_POINT_RENAME(SegmentArrayProcesso
r)
#define SegmentSingleProcessor U_ICU_ENTRY_POINT_RENAME(SegmentSingleProces
sor)
#define SelectFormat U_ICU_ENTRY_POINT_RENAME(SelectFormat)
#define ServiceEnumeration U_ICU_ENTRY_POINT_RENAME(ServiceEnumeration)
#define ServiceListener U_ICU_ENTRY_POINT_RENAME(ServiceListener)
#define SimpleArrayProcessor U_ICU_ENTRY_POINT_RENAME(SimpleArrayProcessor)
#define SimpleDateFormat U_ICU_ENTRY_POINT_RENAME(SimpleDateFormat)
#define SimpleDateFormatStaticSets U_ICU_ENTRY_POINT_RENAME(SimpleDateForma
tStaticSets)
#define SimpleFactory U_ICU_ENTRY_POINT_RENAME(SimpleFactory)
#define SimpleLocaleKeyFactory U_ICU_ENTRY_POINT_RENAME(SimpleLocaleKeyFact
ory)
#define SimpleNumberFormatFactory U_ICU_ENTRY_POINT_RENAME(SimpleNumberForm
atFactory)
#define SimpleSingleton U_ICU_ENTRY_POINT_RENAME(SimpleSingleton)
#define SimpleTimeZone U_ICU_ENTRY_POINT_RENAME(SimpleTimeZone)
#define SinglePositioningFormat1Subtable U_ICU_ENTRY_POINT_RENAME(SinglePos
itioningFormat1Subtable)
#define SinglePositioningFormat2Subtable U_ICU_ENTRY_POINT_RENAME(SinglePos
itioningFormat2Subtable)
#define SinglePositioningSubtable U_ICU_ENTRY_POINT_RENAME(SinglePositionin
gSubtable)
#define SingleSubstitutionFormat1Subtable U_ICU_ENTRY_POINT_RENAME(SingleSu
bstitutionFormat1Subtable)
#define SingleSubstitutionFormat2Subtable U_ICU_ENTRY_POINT_RENAME(SingleSu
bstitutionFormat2Subtable)
#define SingleSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(SingleSubstitut
ionSubtable)
#define SingleTableProcessor U_ICU_ENTRY_POINT_RENAME(SingleTableProcessor)
#define SortKeyByteSink U_ICU_ENTRY_POINT_RENAME(SortKeyByteSink)
#define SpoofData U_ICU_ENTRY_POINT_RENAME(SpoofData)
#define SpoofImpl U_ICU_ENTRY_POINT_RENAME(SpoofImpl)
#define StateTableProcessor U_ICU_ENTRY_POINT_RENAME(StateTableProcessor)
#define StringCharacterIterator U_ICU_ENTRY_POINT_RENAME(StringCharacterIte
rator)
#define StringEnumeration U_ICU_ENTRY_POINT_RENAME(StringEnumeration)
#define StringList U_ICU_ENTRY_POINT_RENAME(StringList)
#define StringLocalizationInfo U_ICU_ENTRY_POINT_RENAME(StringLocalizationI
nfo)
#define StringMatcher U_ICU_ENTRY_POINT_RENAME(StringMatcher)
#define StringPair U_ICU_ENTRY_POINT_RENAME(StringPair)
#define StringPiece U_ICU_ENTRY_POINT_RENAME(StringPiece)
#define StringReplacer U_ICU_ENTRY_POINT_RENAME(StringReplacer)
#define StringSearch U_ICU_ENTRY_POINT_RENAME(StringSearch)
#define StringToCEsMap U_ICU_ENTRY_POINT_RENAME(StringToCEsMap)
#define StringTrieBuilder U_ICU_ENTRY_POINT_RENAME(StringTrieBuilder)
#define StyleRuns U_ICU_ENTRY_POINT_RENAME(StyleRuns)
#define SubstitutionLookup U_ICU_ENTRY_POINT_RENAME(SubstitutionLookup)
#define SubtableProcessor U_ICU_ENTRY_POINT_RENAME(SubtableProcessor)
#define SunTimeAngleFunc U_ICU_ENTRY_POINT_RENAME(SunTimeAngleFunc)
#define SymbolTable U_ICU_ENTRY_POINT_RENAME(SymbolTable)
#define TZEnumeration U_ICU_ENTRY_POINT_RENAME(TZEnumeration)
#define TZNames U_ICU_ENTRY_POINT_RENAME(TZNames)
#define TaiwanCalendar U_ICU_ENTRY_POINT_RENAME(TaiwanCalendar)
#define Target U_ICU_ENTRY_POINT_RENAME(Target)
#define TernaryNode U_ICU_ENTRY_POINT_RENAME(TernaryNode)
#define TextTrieMap U_ICU_ENTRY_POINT_RENAME(TextTrieMap)
#define TextTrieMapSearchResultHandler U_ICU_ENTRY_POINT_RENAME(TextTrieMap
SearchResultHandler)
#define ThaiBreakEngine U_ICU_ENTRY_POINT_RENAME(ThaiBreakEngine)
#define ThaiLayoutEngine U_ICU_ENTRY_POINT_RENAME(ThaiLayoutEngine)
#define ThaiShaping U_ICU_ENTRY_POINT_RENAME(ThaiShaping)
#define TibetanClassTable U_ICU_ENTRY_POINT_RENAME(TibetanClassTable)
#define TibetanOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(TibetanOpenTyp
eLayoutEngine)
#define TibetanReordering U_ICU_ENTRY_POINT_RENAME(TibetanReordering)
#define TimeArrayTimeZoneRule U_ICU_ENTRY_POINT_RENAME(TimeArrayTimeZoneRul
e)
#define TimeUnit U_ICU_ENTRY_POINT_RENAME(TimeUnit)
#define TimeUnitAmount U_ICU_ENTRY_POINT_RENAME(TimeUnitAmount)
#define TimeUnitFormat U_ICU_ENTRY_POINT_RENAME(TimeUnitFormat)
#define TimeZone U_ICU_ENTRY_POINT_RENAME(TimeZone)
#define TimeZoneFormat U_ICU_ENTRY_POINT_RENAME(TimeZoneFormat)
#define TimeZoneFormatDelegate U_ICU_ENTRY_POINT_RENAME(TimeZoneFormatDeleg
ate)
#define TimeZoneFormatImpl U_ICU_ENTRY_POINT_RENAME(TimeZoneFormatImpl)
#define TimeZoneGenericNameMatchInfo U_ICU_ENTRY_POINT_RENAME(TimeZoneGener
icNameMatchInfo)
#define TimeZoneGenericNames U_ICU_ENTRY_POINT_RENAME(TimeZoneGenericNames)
#define TimeZoneNameMatchInfo U_ICU_ENTRY_POINT_RENAME(TimeZoneNameMatchInf
o)
#define TimeZoneNameMatchInfoImpl U_ICU_ENTRY_POINT_RENAME(TimeZoneNameMatc
hInfoImpl)
#define TimeZoneNames U_ICU_ENTRY_POINT_RENAME(TimeZoneNames)
#define TimeZoneNamesDelegate U_ICU_ENTRY_POINT_RENAME(TimeZoneNamesDelegat
e)
#define TimeZoneNamesImpl U_ICU_ENTRY_POINT_RENAME(TimeZoneNamesImpl)
#define TimeZoneRule U_ICU_ENTRY_POINT_RENAME(TimeZoneRule)
#define TimeZoneTransition U_ICU_ENTRY_POINT_RENAME(TimeZoneTransition)
#define TitlecaseTransliterator U_ICU_ENTRY_POINT_RENAME(TitlecaseTranslite
rator)
#define TransliterationRule U_ICU_ENTRY_POINT_RENAME(TransliterationRule)
#define TransliterationRuleData U_ICU_ENTRY_POINT_RENAME(TransliterationRul
eData)
#define TransliterationRuleSet U_ICU_ENTRY_POINT_RENAME(TransliterationRule
Set)
#define Transliterator U_ICU_ENTRY_POINT_RENAME(Transliterator)
#define TransliteratorAlias U_ICU_ENTRY_POINT_RENAME(TransliteratorAlias)
#define TransliteratorEntry U_ICU_ENTRY_POINT_RENAME(TransliteratorEntry)
#define TransliteratorIDParser U_ICU_ENTRY_POINT_RENAME(TransliteratorIDPar
ser)
#define TransliteratorParser U_ICU_ENTRY_POINT_RENAME(TransliteratorParser)
#define TransliteratorRegistry U_ICU_ENTRY_POINT_RENAME(TransliteratorRegis
try)
#define TransliteratorSpec U_ICU_ENTRY_POINT_RENAME(TransliteratorSpec)
#define TriStateSingleton U_ICU_ENTRY_POINT_RENAME(TriStateSingleton)
#define TrieWordDictionary U_ICU_ENTRY_POINT_RENAME(TrieWordDictionary)
#define TrimmedArrayProcessor U_ICU_ENTRY_POINT_RENAME(TrimmedArrayProcesso
r)
#define UCharCharacterIterator U_ICU_ENTRY_POINT_RENAME(UCharCharacterItera
tor)
#define UCharsTrie U_ICU_ENTRY_POINT_RENAME(UCharsTrie)
#define UCharsTrieBuilder U_ICU_ENTRY_POINT_RENAME(UCharsTrieBuilder)
#define UCharsTrieElement U_ICU_ENTRY_POINT_RENAME(UCharsTrieElement)
#define UCollationPCE U_ICU_ENTRY_POINT_RENAME(UCollationPCE)
#define UDataPathIterator U_ICU_ENTRY_POINT_RENAME(UDataPathIterator)
#define ULocRuns U_ICU_ENTRY_POINT_RENAME(ULocRuns)
#define UMemory U_ICU_ENTRY_POINT_RENAME(UMemory)
#define UObject U_ICU_ENTRY_POINT_RENAME(UObject)
#define UStack U_ICU_ENTRY_POINT_RENAME(UStack)
#define UStringEnumeration U_ICU_ENTRY_POINT_RENAME(UStringEnumeration)
#define UTS46 U_ICU_ENTRY_POINT_RENAME(UTS46)
#define UTrie2Singleton U_ICU_ENTRY_POINT_RENAME(UTrie2Singleton)
#define UVector U_ICU_ENTRY_POINT_RENAME(UVector)
#define UVector32 U_ICU_ENTRY_POINT_RENAME(UVector32)
#define UVector64 U_ICU_ENTRY_POINT_RENAME(UVector64)
#define UnescapeTransliterator U_ICU_ENTRY_POINT_RENAME(UnescapeTranslitera
tor)
#define UnhandledEngine U_ICU_ENTRY_POINT_RENAME(UnhandledEngine)
#define UnicodeArabicOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(UnicodeA
rabicOpenTypeLayoutEngine)
#define UnicodeFilter U_ICU_ENTRY_POINT_RENAME(UnicodeFilter)
#define UnicodeFunctor U_ICU_ENTRY_POINT_RENAME(UnicodeFunctor)
#define UnicodeMatcher U_ICU_ENTRY_POINT_RENAME(UnicodeMatcher)
#define UnicodeNameTransliterator U_ICU_ENTRY_POINT_RENAME(UnicodeNameTrans
literator)
#define UnicodeReplacer U_ICU_ENTRY_POINT_RENAME(UnicodeReplacer)
#define UnicodeSet U_ICU_ENTRY_POINT_RENAME(UnicodeSet)
#define UnicodeSetIterator U_ICU_ENTRY_POINT_RENAME(UnicodeSetIterator)
#define UnicodeSetStringSpan U_ICU_ENTRY_POINT_RENAME(UnicodeSetStringSpan)
#define UnicodeString U_ICU_ENTRY_POINT_RENAME(UnicodeString)
#define UnicodeStringAppendable U_ICU_ENTRY_POINT_RENAME(UnicodeStringAppen
dable)
#define UppercaseTransliterator U_ICU_ENTRY_POINT_RENAME(UppercaseTranslite
rator)
#define VTZReader U_ICU_ENTRY_POINT_RENAME(VTZReader)
#define VTZWriter U_ICU_ENTRY_POINT_RENAME(VTZWriter)
#define VTimeZone U_ICU_ENTRY_POINT_RENAME(VTimeZone)
#define ValueRecord U_ICU_ENTRY_POINT_RENAME(ValueRecord)
#define ValueRuns U_ICU_ENTRY_POINT_RENAME(ValueRuns)
#define ZNStringPool U_ICU_ENTRY_POINT_RENAME(ZNStringPool)
#define ZNStringPoolChunk U_ICU_ENTRY_POINT_RENAME(ZNStringPoolChunk)
#define ZNameSearchHandler U_ICU_ENTRY_POINT_RENAME(ZNameSearchHandler)
#define ZNames U_ICU_ENTRY_POINT_RENAME(ZNames)
#define ZoneMeta U_ICU_ENTRY_POINT_RENAME(ZoneMeta)
#define collIterate U_ICU_ENTRY_POINT_RENAME(collIterate)
#define locale_set_default_internal U_ICU_ENTRY_POINT_RENAME(locale_set_def
ault_internal)
#define util64_fromDouble U_ICU_ENTRY_POINT_RENAME(util64_fromDouble)
#define util64_pow U_ICU_ENTRY_POINT_RENAME(util64_pow)
#define util64_tou U_ICU_ENTRY_POINT_RENAME(util64_tou)
#endif
#endif
#endif #endif
#endif #endif
 End of changes. 37 change blocks. 
695 lines changed or deleted 56 lines changed or added


 ures.h   ures.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File URES.H (formerly CRESBUND.H) * File URES.H (formerly CRESBUND.H)
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/01/97 aliu Creation. * 04/01/97 aliu Creation.
* 02/22/99 damiba overhaul. * 02/22/99 damiba overhaul.
skipping to change at line 210 skipping to change at line 210
* @param status fills in the outgoing error code. * @param status fills in the outgoing error code.
* @return a newly allocated resource bundle. * @return a newly allocated resource bundle.
* @see ures_open * @see ures_open
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UResourceBundle* U_EXPORT2 U_STABLE UResourceBundle* U_EXPORT2
ures_openU(const UChar* packageName, ures_openU(const UChar* packageName,
const char* locale, const char* locale,
UErrorCode* status); UErrorCode* status);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Returns the number of strings/arrays in resource bundles. * Returns the number of strings/arrays in resource bundles.
* Better to use ures_getSize, as this function will be deprecated. * Better to use ures_getSize, as this function will be deprecated.
* *
*@param resourceBundle resource bundle containing the desired strings *@param resourceBundle resource bundle containing the desired strings
*@param resourceKey key tagging the resource *@param resourceKey key tagging the resource
*@param err fills in the outgoing error code *@param err fills in the outgoing error code
* could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found
* could be a non-failing error * could be a non-failing error
* e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_FALLB ACK_WARNING </TT> * e.g.: <TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_FALLB ACK_WARNING </TT>
*@return: for <STRONG>Arrays</STRONG>: returns the number of resources in the array *@return: for <STRONG>Arrays</STRONG>: returns the number of resources in the array
* <STRONG>Tables</STRONG>: returns the number of resources in the table * <STRONG>Tables</STRONG>: returns the number of resources in the table
* <STRONG>single string</STRONG>: returns 1 * <STRONG>single string</STRONG>: returns 1
*@see ures_getSize *@see ures_getSize
* @deprecated ICU 2.8 User ures_getSize instead * @deprecated ICU 2.8 User ures_getSize instead
*/ */
U_DEPRECATED int32_t U_EXPORT2 U_DEPRECATED int32_t U_EXPORT2
ures_countArrayItems(const UResourceBundle* resourceBundle, ures_countArrayItems(const UResourceBundle* resourceBundle,
const char* resourceKey, const char* resourceKey,
UErrorCode* err); UErrorCode* err);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Close a resource bundle, all pointers returned from the various ures_get XXX calls * Close a resource bundle, all pointers returned from the various ures_get XXX calls
* on this particular bundle should be considered invalid henceforth. * on this particular bundle should be considered invalid henceforth.
* *
* @param resourceBundle a pointer to a resourceBundle struct. Can be NULL. * @param resourceBundle a pointer to a resourceBundle struct. Can be NULL.
* @see ures_open * @see ures_open
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ures_close(UResourceBundle* resourceBundle); ures_close(UResourceBundle* resourceBundle);
skipping to change at line 260 skipping to change at line 262
* @see LocalPointerBase * @see LocalPointerBase
* @see LocalPointer * @see LocalPointer
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
U_DEFINE_LOCAL_OPEN_POINTER(LocalUResourceBundlePointer, UResourceBundle, u res_close); U_DEFINE_LOCAL_OPEN_POINTER(LocalUResourceBundlePointer, UResourceBundle, u res_close);
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the version number associated with this ResourceBundle as a strin g. Please * Return the version number associated with this ResourceBundle as a strin g. Please
* use ures_getVersion as this function is going to be deprecated. * use ures_getVersion as this function is going to be deprecated.
* *
* @param resourceBundle The resource bundle for which the version is check ed. * @param resourceBundle The resource bundle for which the version is check ed.
* @return A version number string as specified in the resource bundle or its parent. * @return A version number string as specified in the resource bundle or its parent.
* The caller does not own this string. * The caller does not own this string.
* @see ures_getVersion * @see ures_getVersion
* @deprecated ICU 2.8 Use ures_getVersion instead. * @deprecated ICU 2.8 Use ures_getVersion instead.
*/ */
U_DEPRECATED const char* U_EXPORT2 U_DEPRECATED const char* U_EXPORT2
ures_getVersionNumber(const UResourceBundle* resourceBundle); ures_getVersionNumber(const UResourceBundle* resourceBundle);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Return the version number associated with this ResourceBundle as an * Return the version number associated with this ResourceBundle as an
* UVersionInfo array. * UVersionInfo array.
* *
* @param resB The resource bundle for which the version is checked. * @param resB The resource bundle for which the version is checked.
* @param versionInfo A UVersionInfo array that is filled with the version number * @param versionInfo A UVersionInfo array that is filled with the version number
* as specified in the resource bundle or its parent. * as specified in the resource bundle or its parent.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ures_getVersion(const UResourceBundle* resB, ures_getVersion(const UResourceBundle* resB,
UVersionInfo versionInfo); UVersionInfo versionInfo);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the name of the Locale associated with this ResourceBundle. This API allows * Return the name of the Locale associated with this ResourceBundle. This API allows
* you to query for the real locale of the resource. For example, if you re quested * you to query for the real locale of the resource. For example, if you re quested
* "en_US_CALIFORNIA" and only "en_US" bundle exists, "en_US" will be retur ned. * "en_US_CALIFORNIA" and only "en_US" bundle exists, "en_US" will be retur ned.
* For subresources, the locale where this resource comes from will be retu rned. * For subresources, the locale where this resource comes from will be retu rned.
* If fallback has occured, getLocale will reflect this. * If fallback has occured, getLocale will reflect this.
* *
* @param resourceBundle resource bundle in question * @param resourceBundle resource bundle in question
* @param status just for catching illegal arguments * @param status just for catching illegal arguments
* @return A Locale name * @return A Locale name
* @deprecated ICU 2.8 Use ures_getLocaleByType instead. * @deprecated ICU 2.8 Use ures_getLocaleByType instead.
*/ */
U_DEPRECATED const char* U_EXPORT2 U_DEPRECATED const char* U_EXPORT2
ures_getLocale(const UResourceBundle* resourceBundle, ures_getLocale(const UResourceBundle* resourceBundle,
UErrorCode* status); UErrorCode* status);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Return the name of the Locale associated with this ResourceBundle. * Return the name of the Locale associated with this ResourceBundle.
* You can choose between requested, valid and real locale. * You can choose between requested, valid and real locale.
* *
* @param resourceBundle resource bundle in question * @param resourceBundle resource bundle in question
* @param type You can choose between requested, valid and actual * @param type You can choose between requested, valid and actual
* locale. For description see the definition of * locale. For description see the definition of
* ULocDataLocaleType in uloc.h * ULocDataLocaleType in uloc.h
* @param status just for catching illegal arguments * @param status just for catching illegal arguments
* @return A Locale name * @return A Locale name
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
U_STABLE const char* U_EXPORT2 U_STABLE const char* U_EXPORT2
ures_getLocaleByType(const UResourceBundle* resourceBundle, ures_getLocaleByType(const UResourceBundle* resourceBundle,
ULocDataLocaleType type, ULocDataLocaleType type,
UErrorCode* status); UErrorCode* status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Same as ures_open() but uses the fill-in parameter instead of allocating * Same as ures_open() but uses the fill-in parameter instead of allocating
* a bundle, if r!=NULL. * a bundle, if r!=NULL.
* TODO need to revisit usefulness of this function * TODO need to revisit usefulness of this function
* and usage model for fillIn parameters without knowing sizeof(UResou rceBundle) * and usage model for fillIn parameters without knowing sizeof(UResou rceBundle)
* @param r The resourcebundle to open * @param r The resourcebundle to open
* @param packageName The packageName and locale together point to an ICU udata object, * @param packageName The packageName and locale together point to an ICU udata object,
* as defined by <code> udata_open( packageName, "res" , locale, err) </code> * as defined by <code> udata_open( packageName, "res" , locale, err) </code>
* or equivalent. Typically, packageName will refer t o a (.dat) file, or to * or equivalent. Typically, packageName will refer t o a (.dat) file, or to
* a package registered with udata_setAppData(). Using a full file or directory * a package registered with udata_setAppData(). Using a full file or directory
skipping to change at line 340 skipping to change at line 347
* @param localeID specifies the locale for which we want to open the resou rce * @param localeID specifies the locale for which we want to open the resou rce
* @param status The error code * @param status The error code
* @return a newly allocated resource bundle or NULL if it doesn't exist. * @return a newly allocated resource bundle or NULL if it doesn't exist.
* @internal * @internal
*/ */
U_INTERNAL void U_EXPORT2 U_INTERNAL void U_EXPORT2
ures_openFillIn(UResourceBundle *r, ures_openFillIn(UResourceBundle *r,
const char* packageName, const char* packageName,
const char* localeID, const char* localeID,
UErrorCode* status); UErrorCode* status);
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Returns a string from a string resource type * Returns a string from a string resource type
* *
* @param resourceBundle a string resource * @param resourceBundle a string resource
* @param len fills in the length of resulting string * @param len fills in the length of resulting string
* @param status fills in the outgoing error code * @param status fills in the outgoing error code
* could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found * could be <TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not found
* Always check the value of status. Don't count on returnin g NULL. * Always check the value of status. Don't count on returnin g NULL.
* could be a non-failing error * could be a non-failing error
 End of changes. 9 change blocks. 
1 lines changed or deleted 9 lines changed or added


 uscript.h   uscript.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File USCRIPT.H * File USCRIPT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 07/06/2001 Ram Creation. * 07/06/2001 Ram Creation.
************************************************************************** **** ************************************************************************** ****
skipping to change at line 47 skipping to change at line 47
* *
* For example, there are no characters that have a UCD script code of * For example, there are no characters that have a UCD script code of
* Hans or Hant. All Han ideographs have the Hani script code. * Hans or Hant. All Han ideographs have the Hani script code.
* The Hans and Hant script codes are used with CLDR data. * The Hans and Hant script codes are used with CLDR data.
* *
* ISO 15924 script codes are included for use with CLDR and similar. * ISO 15924 script codes are included for use with CLDR and similar.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum UScriptCode { typedef enum UScriptCode {
/*
* Note: UScriptCode constants and their ISO script code comments
* are parsed by preparseucd.py.
* It matches lines like
* USCRIPT_<Unicode Script value name> = <integer>, / * <ISO scrip
t code> * /
*/
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
USCRIPT_INVALID_CODE = -1, USCRIPT_INVALID_CODE = -1,
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
USCRIPT_COMMON = 0, /* Zyyy */ USCRIPT_COMMON = 0, /* Zyyy */
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script" , for non-spacing combining marks; also Qaai */ USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script" , for non-spacing combining marks; also Qaai */
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
USCRIPT_ARABIC = 2, /* Arab */ USCRIPT_ARABIC = 2, /* Arab */
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
USCRIPT_ARMENIAN = 3, /* Armn */ USCRIPT_ARMENIAN = 3, /* Armn */
skipping to change at line 385 skipping to change at line 392
USCRIPT_SHARADA = 151,/* Shrd */ USCRIPT_SHARADA = 151,/* Shrd */
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
USCRIPT_SORA_SOMPENG = 152,/* Sora */ USCRIPT_SORA_SOMPENG = 152,/* Sora */
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
USCRIPT_TAKRI = 153,/* Takr */ USCRIPT_TAKRI = 153,/* Takr */
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
USCRIPT_TANGUT = 154,/* Tang */ USCRIPT_TANGUT = 154,/* Tang */
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
USCRIPT_WOLEAI = 155,/* Wole */ USCRIPT_WOLEAI = 155,/* Wole */
/** @stable ICU 49 */
USCRIPT_ANATOLIAN_HIEROGLYPHS = 156,/* Hluw */
/** @stable ICU 49 */
USCRIPT_KHOJKI = 157,/* Khoj */
/** @stable ICU 49 */
USCRIPT_TIRHUTA = 158,/* Tirh */
/* Private use codes from Qaaa - Qabx are not supported */ /* Private use codes from Qaaa - Qabx are not supported */
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
USCRIPT_CODE_LIMIT = 156 USCRIPT_CODE_LIMIT = 159
} UScriptCode; } UScriptCode;
/** /**
* Gets script codes associated with the given locale or ISO 15924 abbrevia tion or name. * Gets script codes associated with the given locale or ISO 15924 abbrevia tion or name.
* Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym". * Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym".
* Fills in USCRIPT_LATIN given "en" OR "en_US" * Fills in USCRIPT_LATIN given "en" OR "en_US"
* If required capacity is greater than capacity of the destination buffer then the error code * If required capacity is greater than capacity of the destination buffer then the error code
* is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned * is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned
* *
* <p>Note: To search by short or long script alias only, use * <p>Note: To search by short or long script alias only, use
skipping to change at line 445 skipping to change at line 459
* Gets the script code associated with the given codepoint. * Gets the script code associated with the given codepoint.
* Returns USCRIPT_MALAYALAM given 0x0D02 * Returns USCRIPT_MALAYALAM given 0x0D02
* @param codepoint UChar32 codepoint * @param codepoint UChar32 codepoint
* @param err the error status code. * @param err the error status code.
* @return The UScriptCode, or 0 if codepoint is invalid * @return The UScriptCode, or 0 if codepoint is invalid
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
U_STABLE UScriptCode U_EXPORT2 U_STABLE UScriptCode U_EXPORT2
uscript_getScript(UChar32 codepoint, UErrorCode *err); uscript_getScript(UChar32 codepoint, UErrorCode *err);
#ifndef U_HIDE_DRAFT_API
/** /**
* Is code point c used in script sc? * Do the Script_Extensions of code point c contain script sc?
* That is, does code point c have the Script property value sc, * If c does not have explicit Script_Extensions, then this tests whether
* or do code point c's Script_Extensions include script code sc? * c has the Script property value sc.
* *
* Some characters are commonly used in multiple scripts. * Some characters are commonly used in multiple scripts.
* For more information, see UAX #24: http://www.unicode.org/reports/tr24/. * For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
* *
* The Script_Extensions property is provisional. It may be modified or rem oved * The Script_Extensions property is provisional. It may be modified or rem oved
* in future versions of the Unicode Standard, and thus in ICU. * in future versions of the Unicode Standard, and thus in ICU.
* @param c code point * @param c code point
* @param sc script code * @param sc script code
* @return TRUE if Script(c)==sc or sc is in Script_Extensions(c) * @return TRUE if sc is in Script_Extensions(c)
* @draft ICU 4.6 * @draft ICU 49
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
uscript_hasScript(UChar32 c, UScriptCode sc); uscript_hasScript(UChar32 c, UScriptCode sc);
/** /**
* Writes code point c's Script_Extensions as a list of UScriptCode values * Writes code point c's Script_Extensions as a list of UScriptCode values
* to the output scripts array. * to the output scripts array and returns the number of script codes.
* - If c does have Script_Extensions, then the Script property value
* (normally Common or Inherited) is not included.
* - If c does not have Script_Extensions, then the one Script code is writ
ten to the output array.
* - If c is not a valid code point, then the one USCRIPT_UNKNOWN code is w
ritten.
* In other words, if the return value is 1,
* then the output array contains exactly c's single Script code.
* If the return value is n>=2, then the output array contains c's n Script
_Extensions script codes.
* *
* Some characters are commonly used in multiple scripts. * Some characters are commonly used in multiple scripts.
* For more information, see UAX #24: http://www.unicode.org/reports/tr24/. * For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
* *
* If there are more than capacity script codes to be written, then * If there are more than capacity script codes to be written, then
* U_BUFFER_OVERFLOW_ERROR is set and the number of Script_Extensions is re turned. * U_BUFFER_OVERFLOW_ERROR is set and the number of Script_Extensions is re turned.
* (Usual ICU buffer handling behavior.) * (Usual ICU buffer handling behavior.)
* *
* The Script_Extensions property is provisional. It may be modified or rem oved * The Script_Extensions property is provisional. It may be modified or rem oved
* in future versions of the Unicode Standard, and thus in ICU. * in future versions of the Unicode Standard, and thus in ICU.
* @param c code point * @param c code point
* @param scripts output script code array * @param scripts output script code array
* @param capacity capacity of the scripts array * @param capacity capacity of the scripts array
* @param errorCode Standard ICU error code. Its input value must * @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return number of script codes in c's Script_Extensions, * @return number of script codes in c's Script_Extensions, or 1 for the si ngle Script value,
* written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insu fficient capacity * written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insu fficient capacity
* @draft ICU 4.6 * @draft ICU 49
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uscript_getScriptExtensions(UChar32 c, uscript_getScriptExtensions(UChar32 c,
UScriptCode *scripts, int32_t capacity, UScriptCode *scripts, int32_t capacity,
UErrorCode *errorCode); UErrorCode *errorCode);
#endif /* U_HIDE_DRAFT_API */
#endif #endif
 End of changes. 11 change blocks. 
10 lines changed or deleted 37 lines changed or added


 usearch.h   usearch.h 
skipping to change at line 712 skipping to change at line 712
* Search will begin at the start of the text string if a forward iteration * Search will begin at the start of the text string if a forward iteration
* is initiated before a backwards iteration. Otherwise if a backwards * is initiated before a backwards iteration. Otherwise if a backwards
* iteration is initiated before a forwards iteration, the search will begin * iteration is initiated before a forwards iteration, the search will begin
* at the end of the text string. * at the end of the text string.
* @param strsrch search iterator data struct * @param strsrch search iterator data struct
* @see #usearch_first * @see #usearch_first
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch); U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch);
#ifndef U_HIDE_INTERNAL_API
/** /**
* Simple forward search for the pattern, starting at a specified index, * Simple forward search for the pattern, starting at a specified index,
* and using using a default set search options. * and using using a default set search options.
* *
* This is an experimental function, and is not an official part of the * This is an experimental function, and is not an official part of the
* ICU API. * ICU API.
* *
* The collator options, such as UCOL_STRENGTH and UCOL_NORMALIZTION, are honored. * The collator options, such as UCOL_STRENGTH and UCOL_NORMALIZTION, are honored.
* *
* The UStringSearch options USEARCH_CANONICAL_MATCH, USEARCH_OVERLAP and * The UStringSearch options USEARCH_CANONICAL_MATCH, USEARCH_OVERLAP and
skipping to change at line 831 skipping to change at line 832
* @param status Report any errors. Note that no match found is not an error. * @param status Report any errors. Note that no match found is not an error.
* @return TRUE if a match was found, FALSE otherwise. * @return TRUE if a match was found, FALSE otherwise.
* *
* @internal * @internal
*/ */
U_INTERNAL UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch, U_INTERNAL UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
int32_t startIdx, int32_t startIdx,
int32_t *matchSta rt, int32_t *matchSta rt,
int32_t *matchLim it, int32_t *matchLim it,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
#endif /* #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION */ #endif /* #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION */
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 uset.h   uset.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2002-2010, International Business Machines * Copyright (C) 2002-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: uset.h * file name: uset.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2002mar07 * created on: 2002mar07
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 91 skipping to change at line 91
USET_CASE_INSENSITIVE = 2, USET_CASE_INSENSITIVE = 2,
/** /**
* Enable case insensitive matching. E.g., "[ab]" with this flag * Enable case insensitive matching. E.g., "[ab]" with this flag
* will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will * will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will
* match all except 'a', 'A', 'b', and 'B'. This adds the lower-, * match all except 'a', 'A', 'b', and 'B'. This adds the lower-,
* title-, and uppercase mappings as well as the case folding * title-, and uppercase mappings as well as the case folding
* of each existing element in the set. * of each existing element in the set.
* @stable ICU 3.2 * @stable ICU 3.2
*/ */
USET_ADD_CASE_MAPPINGS = 4, USET_ADD_CASE_MAPPINGS = 4
/**
* Enough for any single-code point set
* @internal
*/
USET_SERIALIZED_STATIC_ARRAY_CAPACITY=8
}; };
/** /**
* Argument values for whether span() and similar functions continue while * Argument values for whether span() and similar functions continue while
* the current character is contained vs. not contained in the set. * the current character is contained vs. not contained in the set.
* *
* The functionality is straightforward for sets with only single code poin ts, * The functionality is straightforward for sets with only single code poin ts,
* without strings (which is the common case): * without strings (which is the common case):
* - USET_SPAN_CONTAINED and USET_SPAN_SIMPLE * - USET_SPAN_CONTAINED and USET_SPAN_SIMPLE
* work the same. * work the same.
skipping to change at line 209 skipping to change at line 203
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
USET_SPAN_SIMPLE = 2, USET_SPAN_SIMPLE = 2,
/** /**
* One more than the last span condition. * One more than the last span condition.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
USET_SPAN_CONDITION_COUNT USET_SPAN_CONDITION_COUNT
} USetSpanCondition; } USetSpanCondition;
enum {
/**
* Capacity of USerializedSet::staticArray.
* Enough for any single-code point set.
* Also provides padding for nice sizeof(USerializedSet).
* @stable ICU 2.4
*/
USET_SERIALIZED_STATIC_ARRAY_CAPACITY=8
};
/** /**
* A serialized form of a Unicode set. Limited manipulations are * A serialized form of a Unicode set. Limited manipulations are
* possible directly on a serialized set. See below. * possible directly on a serialized set. See below.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
typedef struct USerializedSet { typedef struct USerializedSet {
/** /**
* The serialized Unicode Set. * The serialized Unicode Set.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
 End of changes. 3 change blocks. 
8 lines changed or deleted 12 lines changed or added


 ushape.h   ushape.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 2000-2011, International Business Machines * Copyright (C) 2000-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* file name: ushape.h * file name: ushape.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2000jun29 * created on: 2000jun29
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 456 skipping to change at line 456
/** /**
* If this option is used, shaping will use the new Unicode code point for TAIL (i.e. 0xFE73). * If this option is used, shaping will use the new Unicode code point for TAIL (i.e. 0xFE73).
* If this option is not specified (Default), old unofficial Unicode TAIL c ode point is used (i.e. 0x200B) * If this option is not specified (Default), old unofficial Unicode TAIL c ode point is used (i.e. 0x200B)
* De-shaping will not use this option as it will always search for both th e new Unicode code point for the * De-shaping will not use this option as it will always search for both th e new Unicode code point for the
* TAIL (i.e. 0xFE73) or the old unofficial Unicode TAIL code point (i.e. 0 x200B) and de-shape the * TAIL (i.e. 0xFE73) or the old unofficial Unicode TAIL code point (i.e. 0 x200B) and de-shape the
* Seen-Family letter accordingly. * Seen-Family letter accordingly.
* *
* Shaping Mode: Only shaping. * Shaping Mode: Only shaping.
* De-shaping Mode: N/A. * De-shaping Mode: N/A.
* Affects: All Seen options * Affects: All Seen options
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define U_SHAPE_TAIL_NEW_UNICODE 0x8000000 #define U_SHAPE_TAIL_NEW_UNICODE 0x8000000
/** /**
* Bit mask for new Unicode Tail option * Bit mask for new Unicode Tail option
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define U_SHAPE_TAIL_TYPE_MASK 0x8000000 #define U_SHAPE_TAIL_TYPE_MASK 0x8000000
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 uspoof.h   uspoof.h 
/* /*
*************************************************************************** ***************************************************************************
* Copyright (C) 2008-2010, International Business Machines Corporation * Copyright (C) 2008-2012, International Business Machines Corporation
* and others. All Rights Reserved. * and others. All Rights Reserved.
*************************************************************************** ***************************************************************************
* file name: uspoof.h * file name: uspoof.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2008Feb13 * created on: 2008Feb13
* created by: Andy Heninger * created by: Andy Heninger
* *
skipping to change at line 30 skipping to change at line 30
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uset.h" #include "unicode/uset.h"
#include "unicode/parseerr.h" #include "unicode/parseerr.h"
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
#if !UCONFIG_NO_NORMALIZATION #if !UCONFIG_NO_NORMALIZATION
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
#include "unicode/unistr.h" #include "unicode/unistr.h"
#include "unicode/uniset.h" #include "unicode/uniset.h"
U_NAMESPACE_USE
#endif #endif
/** /**
* \file * \file
* \brief Unicode Security and Spoofing Detection, C API. * \brief Unicode Security and Spoofing Detection, C API.
* *
* These functions are intended to check strings, typically * These functions are intended to check strings, typically
* identifiers of some type, such as URLs, for the presence of * identifiers of some type, such as URLs, for the presence of
* characters that are likely to be visually confusing - * characters that are likely to be visually confusing -
* for cases where the displayed form of an identifier may * for cases where the displayed form of an identifier may
skipping to change at line 489 skipping to change at line 487
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param chars A Unicode Set containing the list of * @param chars A Unicode Set containing the list of
* characters that are permitted. Ownership of the set * characters that are permitted. Ownership of the set
* remains with the caller. The incoming set is cloned by * remains with the caller. The incoming set is cloned by
* this function, so there are no restrictions on modifying * this function, so there are no restrictions on modifying
* or deleting the USet after calling this function. * or deleting the USet after calling this function.
* @param status The error code, set if this function encounters a proble m. * @param status The error code, set if this function encounters a proble m.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const UnicodeSet *chars, UEr rorCode *status); uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars , UErrorCode *status);
/** /**
* Get a UnicodeSet for the characters permitted in an identifier. * Get a UnicodeSet for the characters permitted in an identifier.
* This corresponds to the limits imposed by the Set Allowed Characters / * This corresponds to the limits imposed by the Set Allowed Characters /
* UnicodeSet functions. Limitations imposed by other checks will not be * UnicodeSet functions. Limitations imposed by other checks will not be
* reflected in the set returned by this function. * reflected in the set returned by this function.
* *
* The returned set will be frozen, meaning that it cannot be modified * The returned set will be frozen, meaning that it cannot be modified
* by the caller. * by the caller.
* *
skipping to change at line 511 skipping to change at line 509
* returned set will become invalid if the spoof detector is closed, * returned set will become invalid if the spoof detector is closed,
* or if a new set of allowed characters is specified. * or if a new set of allowed characters is specified.
* *
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param status The error code, set if this function encounters a proble m. * @param status The error code, set if this function encounters a proble m.
* @return A UnicodeSet containing the characters that are permitte d by * @return A UnicodeSet containing the characters that are permitte d by
* the USPOOF_CHAR_LIMIT test. * the USPOOF_CHAR_LIMIT test.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE const UnicodeSet * U_EXPORT2 U_STABLE const icu::UnicodeSet * U_EXPORT2
uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status); uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status);
#endif #endif
/** /**
* Check the specified string for possible security issues. * Check the specified string for possible security issues.
* The text to be checked will typically be an identifier of some sort. * The text to be checked will typically be an identifier of some sort.
* The set of checks to be performed is specified with uspoof_setChecks(). * The set of checks to be performed is specified with uspoof_setChecks().
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param text The string to be checked for possible security issues, * @param text The string to be checked for possible security issues,
skipping to change at line 611 skipping to change at line 609
* not reported here, but through the function's return valu e. * not reported here, but through the function's return valu e.
* @return An integer value with bits set for any potential security * @return An integer value with bits set for any potential security
* or spoofing issues detected. The bits are defined by * or spoofing issues detected. The bits are defined by
* enum USpoofChecks. Zero is returned if no issues * enum USpoofChecks. Zero is returned if no issues
* are found with the input string. * are found with the input string.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uspoof_checkUnicodeString(const USpoofChecker *sc, uspoof_checkUnicodeString(const USpoofChecker *sc,
const U_NAMESPACE_QUALIFIER UnicodeString &text, const icu::UnicodeString &text,
int32_t *position, int32_t *position,
UErrorCode *status); UErrorCode *status);
#endif #endif
/** /**
* Check the whether two specified strings are visually confusable. * Check the whether two specified strings are visually confusable.
* The types of confusability to be tested - single script, mixed script, * The types of confusability to be tested - single script, mixed script,
* or whole script - are determined by the check options set for the * or whole script - are determined by the check options set for the
* USpoofChecker. * USpoofChecker.
skipping to change at line 717 skipping to change at line 715
* Confusability of the strings is not reported here, * Confusability of the strings is not reported here,
* but through this function's return value. * but through this function's return value.
* @return An integer value with bit(s) set corresponding to * @return An integer value with bit(s) set corresponding to
* the type of confusability found, as defined by * the type of confusability found, as defined by
* enum USpoofChecks. Zero is returned if the strings * enum USpoofChecks. Zero is returned if the strings
* are not confusable. * are not confusable.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uspoof_areConfusableUnicodeString(const USpoofChecker *sc, uspoof_areConfusableUnicodeString(const USpoofChecker *sc,
const U_NAMESPACE_QUALIFIER UnicodeString const icu::UnicodeString &s1,
&s1, const icu::UnicodeString &s2,
const U_NAMESPACE_QUALIFIER UnicodeString
&s2,
UErrorCode *status); UErrorCode *status);
#endif #endif
/** /**
* Get the "skeleton" for an identifier string. * Get the "skeleton" for an identifier string.
* Skeletons are a transformation of the input string; * Skeletons are a transformation of the input string;
* Two strings are confusable if their skeletons are identical. * Two strings are confusable if their skeletons are identical.
* See Unicode UAX 39 for additional information. * See Unicode UAX 39 for additional information.
* *
* Using skeletons directly makes it possible to quickly check * Using skeletons directly makes it possible to quickly check
skipping to change at line 832 skipping to change at line 830
* @param dest The output string, to receive the skeleton string. * @param dest The output string, to receive the skeleton string.
* @param destCapacity The length of the output buffer, in bytes. * @param destCapacity The length of the output buffer, in bytes.
* The destCapacity may be zero, in which case the function will * The destCapacity may be zero, in which case the function will
* return the actual length of the skeleton. * return the actual length of the skeleton.
* @param status The error code, set if an error occurred while attemptin g to * @param status The error code, set if an error occurred while attemptin g to
* perform the check. * perform the check.
* @return A reference to the destination (skeleton) string. * @return A reference to the destination (skeleton) string.
* *
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE UnicodeString & U_EXPORT2 U_STABLE icu::UnicodeString & U_EXPORT2
uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
uint32_t type, uint32_t type,
const UnicodeString &s, const icu::UnicodeString &s,
UnicodeString &dest, icu::UnicodeString &dest,
UErrorCode *status); UErrorCode *status);
#endif /* U_SHOW_CPLUSPLUS_API */ #endif /* U_SHOW_CPLUSPLUS_API */
/** /**
* Serialize the data for a spoof detector into a chunk of memory. * Serialize the data for a spoof detector into a chunk of memory.
* The flattened spoof detection tables can later be used to efficiently * The flattened spoof detection tables can later be used to efficiently
* instantiate a new Spoof Detector. * instantiate a new Spoof Detector.
* *
* @param sc the Spoof Detector whose data is to be serialized. * @param sc the Spoof Detector whose data is to be serialized.
* @param data a pointer to 32-bit-aligned memory to be filled with the dat a, * @param data a pointer to 32-bit-aligned memory to be filled with the dat a,
 End of changes. 8 change blocks. 
13 lines changed or deleted 9 lines changed or added


 ustdio.h   ustdio.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1998-2010, International Business Machines * Copyright (C) 1998-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* File ustdio.h * File ustdio.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 10/16/98 stephen Creation. * 10/16/98 stephen Creation.
skipping to change at line 443 skipping to change at line 443
* @return alias to the converter * @return alias to the converter
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f); U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
/* Output functions */ /* Output functions */
/** /**
* Write formatted data to <TT>stdout</TT>.
* @param patternSpecification A pattern specifying how <TT>u_printf</TT> w
ill
* interpret the variable arguments received and format the data.
* @return The number of Unicode characters written to <TT>stdout</TT>
* @draft ICU 49
*/
U_DRAFT int32_t U_EXPORT2
u_printf(const char *patternSpecification,
... );
/**
* Write formatted data to a UFILE. * Write formatted data to a UFILE.
* @param f The UFILE to which to write. * @param f The UFILE to which to write.
* @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will * @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will
* interpret the variable arguments received and format the data. * interpret the variable arguments received and format the data.
* @return The number of Unicode characters written to <TT>f</TT>. * @return The number of Unicode characters written to <TT>f</TT>.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_fprintf(UFILE *f, u_fprintf(UFILE *f,
const char *patternSpecification, const char *patternSpecification,
skipping to change at line 473 skipping to change at line 484
* @return The number of Unicode characters written to <TT>f</TT>. * @return The number of Unicode characters written to <TT>f</TT>.
* @see u_fprintf * @see u_fprintf
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_vfprintf(UFILE *f, u_vfprintf(UFILE *f,
const char *patternSpecification, const char *patternSpecification,
va_list ap); va_list ap);
/** /**
* Write formatted data to <TT>stdout</TT>.
* @param patternSpecification A pattern specifying how <TT>u_printf_u</TT>
will
* interpret the variable arguments received and format the data.
* @return The number of Unicode characters written to <TT>stdout</TT>
* @draft ICU 49
*/
U_DRAFT int32_t U_EXPORT2
u_printf_u(const UChar *patternSpecification,
... );
/**
* Get a UFILE for <TT>stdout</TT>.
* @return UFILE that writes to <TT>stdout</TT>
* @draft ICU 49
*/
U_DRAFT UFILE * U_EXPORT2
u_get_stdout();
/**
* Write formatted data to a UFILE. * Write formatted data to a UFILE.
* @param f The UFILE to which to write. * @param f The UFILE to which to write.
* @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will * @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will
* interpret the variable arguments received and format the data. * interpret the variable arguments received and format the data.
* @return The number of Unicode characters written to <TT>f</TT>. * @return The number of Unicode characters written to <TT>f</TT>.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_fprintf_u(UFILE *f, u_fprintf_u(UFILE *f,
const UChar *patternSpecification, const UChar *patternSpecification,
 End of changes. 3 change blocks. 
1 lines changed or deleted 33 lines changed or added


 ustream.h   ustream.h 
skipping to change at line 57 skipping to change at line 57
/** /**
* Write the contents from a C++ istream to a UnicodeString. The UChars in the * Write the contents from a C++ istream to a UnicodeString. The UChars in the
* UnicodeString are converted from the char based istream with the default * UnicodeString are converted from the char based istream with the default
* converter. * converter.
* @stable 3.0 * @stable 3.0
*/ */
U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeS tring& s); U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeS tring& s);
U_NAMESPACE_END U_NAMESPACE_END
#elif U_IOSTREAM_SOURCE >= 198506
/* <istream.h> and <ostream.h> don't exist. */
#include <iostream.h>
U_NAMESPACE_BEGIN
/**
* Write the contents of a UnicodeString to a C++ ostream. This functions w
rites
* the characters in a UnicodeString to an ostream. The UChars in the
* UnicodeString are converted to the char based ostream with the default
* converter.
* @stable 3.0
*/
U_IO_API ostream & U_EXPORT2 operator<<(ostream& stream, const UnicodeStrin
g& s);
/**
* Write the contents from a C++ istream to a UnicodeString. The UChars in
the
* UnicodeString are converted from the char based istream with the default
* converter.
* @stable 3.0
*/
U_IO_API istream & U_EXPORT2 operator>>(istream& stream, UnicodeString& s);
U_NAMESPACE_END
#endif #endif
/* No operator for UChar because it can conflict with wchar_t */ /* No operator for UChar because it can conflict with wchar_t */
#endif #endif
 End of changes. 1 change blocks. 
26 lines changed or deleted 0 lines changed or added


 ustringtrie.h   ustringtrie.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* file name: udicttrie.h * file name: udicttrie.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010dec17 * created on: 2010dec17
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
skipping to change at line 30 skipping to change at line 30
* \brief C API: Helper definitions for dictionary trie APIs. * \brief C API: Helper definitions for dictionary trie APIs.
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* Return values for BytesTrie::next(), UCharsTrie::next() and similar meth ods. * Return values for BytesTrie::next(), UCharsTrie::next() and similar meth ods.
* @see USTRINGTRIE_MATCHES * @see USTRINGTRIE_MATCHES
* @see USTRINGTRIE_HAS_VALUE * @see USTRINGTRIE_HAS_VALUE
* @see USTRINGTRIE_HAS_NEXT * @see USTRINGTRIE_HAS_NEXT
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
enum UStringTrieResult { enum UStringTrieResult {
/** /**
* The input unit(s) did not continue a matching string. * The input unit(s) did not continue a matching string.
* Once current()/next() return USTRINGTRIE_NO_MATCH, * Once current()/next() return USTRINGTRIE_NO_MATCH,
* all further calls to current()/next() will also return USTRINGTRIE_N O_MATCH, * all further calls to current()/next() will also return USTRINGTRIE_N O_MATCH,
* until the trie is reset to its original state or to a saved state. * until the trie is reset to its original state or to a saved state.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
USTRINGTRIE_NO_MATCH, USTRINGTRIE_NO_MATCH,
/** /**
* The input unit(s) continued a matching string * The input unit(s) continued a matching string
* but there is no value for the string so far. * but there is no value for the string so far.
* (It is a prefix of a longer string.) * (It is a prefix of a longer string.)
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
USTRINGTRIE_NO_VALUE, USTRINGTRIE_NO_VALUE,
/** /**
* The input unit(s) continued a matching string * The input unit(s) continued a matching string
* and there is a value for the string so far. * and there is a value for the string so far.
* This value will be returned by getValue(). * This value will be returned by getValue().
* No further input byte/unit can continue a matching string. * No further input byte/unit can continue a matching string.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
USTRINGTRIE_FINAL_VALUE, USTRINGTRIE_FINAL_VALUE,
/** /**
* The input unit(s) continued a matching string * The input unit(s) continued a matching string
* and there is a value for the string so far. * and there is a value for the string so far.
* This value will be returned by getValue(). * This value will be returned by getValue().
* Another input byte/unit can continue a matching string. * Another input byte/unit can continue a matching string.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
USTRINGTRIE_INTERMEDIATE_VALUE USTRINGTRIE_INTERMEDIATE_VALUE
}; };
/** /**
* Same as (result!=USTRINGTRIE_NO_MATCH). * Same as (result!=USTRINGTRIE_NO_MATCH).
* @param result A result from BytesTrie::first(), UCharsTrie::next() etc. * @param result A result from BytesTrie::first(), UCharsTrie::next() etc.
* @return true if the input bytes/units so far are part of a matching stri ng/byte sequence. * @return true if the input bytes/units so far are part of a matching stri ng/byte sequence.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define USTRINGTRIE_MATCHES(result) ((result)!=USTRINGTRIE_NO_MATCH) #define USTRINGTRIE_MATCHES(result) ((result)!=USTRINGTRIE_NO_MATCH)
/** /**
* Equivalent to (result==USTRINGTRIE_INTERMEDIATE_VALUE || result==USTRING TRIE_FINAL_VALUE) but * Equivalent to (result==USTRINGTRIE_INTERMEDIATE_VALUE || result==USTRING TRIE_FINAL_VALUE) but
* this macro evaluates result exactly once. * this macro evaluates result exactly once.
* @param result A result from BytesTrie::first(), UCharsTrie::next() etc. * @param result A result from BytesTrie::first(), UCharsTrie::next() etc.
* @return true if there is a value for the input bytes/units so far. * @return true if there is a value for the input bytes/units so far.
* @see BytesTrie::getValue * @see BytesTrie::getValue
* @see UCharsTrie::getValue * @see UCharsTrie::getValue
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define USTRINGTRIE_HAS_VALUE(result) ((result)>=USTRINGTRIE_FINAL_VALUE) #define USTRINGTRIE_HAS_VALUE(result) ((result)>=USTRINGTRIE_FINAL_VALUE)
/** /**
* Equivalent to (result==USTRINGTRIE_NO_VALUE || result==USTRINGTRIE_INTER MEDIATE_VALUE) but * Equivalent to (result==USTRINGTRIE_NO_VALUE || result==USTRINGTRIE_INTER MEDIATE_VALUE) but
* this macro evaluates result exactly once. * this macro evaluates result exactly once.
* @param result A result from BytesTrie::first(), UCharsTrie::next() etc. * @param result A result from BytesTrie::first(), UCharsTrie::next() etc.
* @return true if another input byte/unit can continue a matching string. * @return true if another input byte/unit can continue a matching string.
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define USTRINGTRIE_HAS_NEXT(result) ((result)&1) #define USTRINGTRIE_HAS_NEXT(result) ((result)&1)
#endif /* __USTRINGTRIE_H__ */ #endif /* __USTRINGTRIE_H__ */
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added


 utext.h   utext.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2004-2010, International Business Machines * Copyright (C) 2004-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: utext.h * file name: utext.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2004oct06 * created on: 2004oct06
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 253 skipping to change at line 253
* @param ut Pointer to a UText struct. If NULL, a new UText will be created. * @param ut Pointer to a UText struct. If NULL, a new UText will be created.
* If non-NULL, must refer to an initialized UText struct, which will then * If non-NULL, must refer to an initialized UText struct, which will then
* be reset to reference the specified input string. * be reset to reference the specified input string.
* @param s A UnicodeString. * @param s A UnicodeString.
* @param status Errors are returned here. * @param status Errors are returned here.
* @return Pointer to the UText. If a UText was supplied as input, this * @return Pointer to the UText. If a UText was supplied as input, this
* will always be used and returned. * will always be used and returned.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
utext_openUnicodeString(UText *ut, U_NAMESPACE_QUALIFIER UnicodeString *s, UErrorCode *status); utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *statu s);
/** /**
* Open a UText for a const UnicodeString. The resulting UText will not b e writable. * Open a UText for a const UnicodeString. The resulting UText will not b e writable.
* *
* @param ut Pointer to a UText struct. If NULL, a new UText will be cr eated. * @param ut Pointer to a UText struct. If NULL, a new UText will be cr eated.
* If non-NULL, must refer to an initialized UText struct, wh ich will then * If non-NULL, must refer to an initialized UText struct, wh ich will then
* be reset to reference the specified input string. * be reset to reference the specified input string.
* @param s A const UnicodeString to be wrapped. * @param s A const UnicodeString to be wrapped.
* @param status Errors are returned here. * @param status Errors are returned here.
* @return Pointer to the UText. If a UText was supplied as input, t his * @return Pointer to the UText. If a UText was supplied as input, t his
* will always be used and returned. * will always be used and returned.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
utext_openConstUnicodeString(UText *ut, const U_NAMESPACE_QUALIFIER Unicode String *s, UErrorCode *status); utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UError Code *status);
/** /**
* Open a writable UText implementation for an ICU Replaceable object. * Open a writable UText implementation for an ICU Replaceable object.
* @param ut Pointer to a UText struct. If NULL, a new UText will be cr eated. * @param ut Pointer to a UText struct. If NULL, a new UText will be cr eated.
* If non-NULL, must refer to an already existing UText, whic h will then * If non-NULL, must refer to an already existing UText, whic h will then
* be reset to reference the specified replaceable text. * be reset to reference the specified replaceable text.
* @param rep A Replaceable text object. * @param rep A Replaceable text object.
* @param status Errors are returned here. * @param status Errors are returned here.
* @return Pointer to the UText. If a UText was supplied as input, t his * @return Pointer to the UText. If a UText was supplied as input, t his
* will always be used and returned. * will always be used and returned.
* @see Replaceable * @see Replaceable
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
utext_openReplaceable(UText *ut, U_NAMESPACE_QUALIFIER Replaceable *rep, UE rrorCode *status); utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status) ;
/** /**
* Open a UText implementation over an ICU CharacterIterator. * Open a UText implementation over an ICU CharacterIterator.
* @param ut Pointer to a UText struct. If NULL, a new UText will be cr eated. * @param ut Pointer to a UText struct. If NULL, a new UText will be cr eated.
* If non-NULL, must refer to an already existing UText, whic h will then * If non-NULL, must refer to an already existing UText, whic h will then
* be reset to reference the specified replaceable text. * be reset to reference the specified replaceable text.
* @param ci A Character Iterator. * @param ci A Character Iterator.
* @param status Errors are returned here. * @param status Errors are returned here.
* @return Pointer to the UText. If a UText was supplied as input, t his * @return Pointer to the UText. If a UText was supplied as input, t his
* will always be used and returned. * will always be used and returned.
* @see Replaceable * @see Replaceable
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
utext_openCharacterIterator(UText *ut, U_NAMESPACE_QUALIFIER CharacterItera tor *ic, UErrorCode *status); utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ic, UErrorCo de *status);
#endif #endif
/** /**
* Clone a UText. This is much like opening a UText where the source tex t is itself * Clone a UText. This is much like opening a UText where the source tex t is itself
* another UText. * another UText.
* *
* A deep clone will copy both the UText data structures and the underlyi ng text. * A deep clone will copy both the UText data structures and the underlyi ng text.
* The original and cloned UText will operate completely independently; m odifications * The original and cloned UText will operate completely independently; m odifications
* made to the text in one will not affect the other. Text providers are not * made to the text in one will not affect the other. Text providers are not
skipping to change at line 658 skipping to change at line 658
* @return Number of UChars in the data to be extracted. Does not include a trailing NUL. * @return Number of UChars in the data to be extracted. Does not include a trailing NUL.
* *
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
utext_extract(UText *ut, utext_extract(UText *ut,
int64_t nativeStart, int64_t nativeLimit, int64_t nativeStart, int64_t nativeLimit,
UChar *dest, int32_t destCapacity, UChar *dest, int32_t destCapacity,
UErrorCode *status); UErrorCode *status);
/**
* Compare two UTexts (binary order). The comparison begins at each source
text's
* iteration position. The iteration position of each UText will be left fo
llowing
* the last character compared.
*
* The comparison is done in code point order; unlike u_strCompare, you
* cannot choose to use code unit order. This is because the characters
* in a UText are accessed one code point at a time, and may not be from a
UTF-16
* context.
*
* This functions works with strings of different explicitly specified leng
ths
* unlike the ANSI C-like u_strcmp() and u_memcmp() etc.
* A length argument of -1 signifies that as much of the string should be u
sed as
* is necessary to compare with the other string. If both length arguments
are -1,
* the entire remaining portionss of both strings are used.
*
* @param s1 First source string.
* @param length1 Length of first source string in UTF-32 code points.
*
* @param s2 Second source string.
* @param length2 Length of second source string in UTF-32 code points.
*
* @return <0 or 0 or >0 as usual for string comparisons
*
* @internal ICU 4.4 technology preview
*/
U_INTERNAL int32_t U_EXPORT2
utext_compare(UText *s1, int32_t length1,
UText *s2, int32_t length2);
/**
* Compare two UTexts (binary order). The comparison begins at each source
text's
* iteration position. The iteration position of each UText will be left fo
llowing
* the last character compared. This method differs from utext_compare in t
hat
* it accepts native limits rather than lengths for each string.
*
* The comparison is done in code point order; unlike u_strCompare, you
* cannot choose to use code unit order. This is because the characters
* in a UText are accessed one code point at a time, and may not be from a
UTF-16
* context.
*
* This functions works with strings of different explicitly specified leng
ths
* unlike the ANSI C-like u_strcmp() and u_memcmp() etc.
* A limit argument of -1 signifies that as much of the string should be us
ed as
* is necessary to compare with the other string. If both limit arguments a
re -1,
* the entire remaining portionss of both strings are used.
*
* @param s1 First source string.
* @param limit1 Native index of the last character in the first source str
ing to be considered.
*
* @param s2 Second source string.
* @param limit2 Native index of the last character in the second source st
ring to be considered.
*
* @return <0 or 0 or >0 as usual for string comparisons
*
* @internal ICU 4.4 technology preview
*/
U_INTERNAL int32_t U_EXPORT2
utext_compareNativeLimit(UText *s1, int64_t limit1,
UText *s2, int64_t limit2);
/**
* Compare two UTexts case-insensitively using full case folding. The compa
rison
* begins at each source text's iteration position. The iteration position
of each
* UText will be left following the last character compared.
*
* The comparison is done in code point order; this is because the characte
rs
* in a UText are accessed one code point at a time, and may not be from a
UTF-16
* context.
*
* This functions works with strings of different explicitly specified leng
ths
* unlike the ANSI C-like u_strcmp() and u_memcmp() etc.
* A length argument of -1 signifies that as much of the string should be u
sed as
* is necessary to compare with the other string. If both length arguments
are -1,
* the entire remaining portionss of both strings are used.
*
* @param s1 First source string.
* @param length1 Length of first source string in UTF-32 code points.
*
* @param s2 Second source string.
* @param length2 Length of second source string in UTF-32 code points.
*
* @param options A bit set of options:
* - U_FOLD_CASE_DEFAULT or 0 is used for default options:
* Comparison in code point order with default case folding.
*
* - U_FOLD_CASE_EXCLUDE_SPECIAL_I
*
* @param pErrorCode Must be a valid pointer to an error code value,
* which must not indicate a failure before the function c
all.
*
* @return <0 or 0 or >0 as usual for string comparisons
*
* @internal ICU 4.4 technology preview
*/
U_INTERNAL int32_t U_EXPORT2
utext_caseCompare(UText *s1, int32_t length1,
UText *s2, int32_t length2,
uint32_t options, UErrorCode *pErrorCode);
/**
* Compare two UTexts case-insensitively using full case folding. The compa
rison
* begins at each source text's iteration position. The iteration position
of each
* UText will be left following the last character compared. This method di
ffers from
* utext_caseCompare in that it accepts native limits rather than lengths f
or each
* string.
*
* The comparison is done in code point order; this is because the characte
rs
* in a UText are accessed one code point at a time, and may not be from a
UTF-16
* context.
*
* This functions works with strings of different explicitly specified leng
ths
* unlike the ANSI C-like u_strcmp() and u_memcmp() etc.
* A limit argument of -1 signifies that as much of the string should be us
ed as
* is necessary to compare with the other string. If both length arguments
are -1,
* the entire remaining portionss of both strings are used.
*
* @param s1 First source string.
* @param limit1 Native index of the last character in the first source str
ing to be considered.
*
* @param s2 Second source string.
* @param limit2 Native index of the last character in the second source st
ring to be considered.
*
* @param options A bit set of options:
* - U_FOLD_CASE_DEFAULT or 0 is used for default options:
* Comparison in code point order with default case folding.
*
* - U_FOLD_CASE_EXCLUDE_SPECIAL_I
*
* @param pErrorCode Must be a valid pointer to an error code value,
* which must not indicate a failure before the function c
all.
*
* @return <0 or 0 or >0 as usual for string comparisons
*
* @internal ICU 4.4 technology preview
*/
U_INTERNAL int32_t U_EXPORT2
utext_caseCompareNativeLimit(UText *s1, int64_t limit1,
UText *s2, int64_t limit2,
uint32_t options, UErrorCode *pErrorCode);
/************************************************************************** ********** /************************************************************************** **********
* *
* #define inline versions of selected performance-critical text access fu nctions * #define inline versions of selected performance-critical text access fu nctions
* Caution: do not use auto increment++ or decrement-- expression s * Caution: do not use auto increment++ or decrement-- expression s
* as parameters to these macros. * as parameters to these macros.
* *
* For most use, where there is no extreme performance constraint, the * For most use, where there is no extreme performance constraint, the
* normal, non-inline functions are a better choice. The resultin g code * normal, non-inline functions are a better choice. The resultin g code
* will be smaller, and, if the need ever arises, easier to debug. * will be smaller, and, if the need ever arises, easier to debug.
* *
* These are implemented as #defines rather than real functions * These are implemented as #defines rather than real functions
* because there is no fully portable way to do inline functions i n plain C. * because there is no fully portable way to do inline functions i n plain C.
* *
************************************************************************** **********/ ************************************************************************** **********/
#ifndef U_HIDE_INTERNAL_API
/** /**
* inline version of utext_current32(), for performance-critical situations . * inline version of utext_current32(), for performance-critical situations .
* *
* Get the code point at the current iteration position of the UText. * Get the code point at the current iteration position of the UText.
* Returns U_SENTINEL (-1) if the position is at the end of the * Returns U_SENTINEL (-1) if the position is at the end of the
* text. * text.
* *
* @internal ICU 4.4 technology preview * @internal ICU 4.4 technology preview
*/ */
#define UTEXT_CURRENT32(ut) \ #define UTEXT_CURRENT32(ut) \
((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->c hunkOffset]<0xd800 ? \ ((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->c hunkOffset]<0xd800 ? \
((ut)->chunkContents)[((ut)->chunkOffset)] : utext_current32(ut)) ((ut)->chunkContents)[((ut)->chunkOffset)] : utext_current32(ut))
#endif /* U_HIDE_INTERNAL_API */
/** /**
* inline version of utext_next32(), for performance-critical situations. * inline version of utext_next32(), for performance-critical situations.
* *
* Get the code point at the current iteration position of the UText, and * Get the code point at the current iteration position of the UText, and
* advance the position to the first index following the character. * advance the position to the first index following the character.
* This is a post-increment operation. * This is a post-increment operation.
* Returns U_SENTINEL (-1) if the position is at the end of the * Returns U_SENTINEL (-1) if the position is at the end of the
* text. * text.
* *
skipping to change at line 1653 skipping to change at line 1514
* @param extraSpace The amount of additional space to be allocated as part * @param extraSpace The amount of additional space to be allocated as part
* of this UText, for use by types of providers that require * of this UText, for use by types of providers that require
* additional storage. * additional storage.
* @param status Errors are returned here. * @param status Errors are returned here.
* @return pointer to the UText, allocated if necessary, with extra space s et up if requested. * @return pointer to the UText, allocated if necessary, with extra space s et up if requested.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status); utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status);
#ifndef U_HIDE_INTERNAL_API
/** /**
* @internal * @internal
* Value used to help identify correctly initialized UText structs. * Value used to help identify correctly initialized UText structs.
* Note: must be publicly visible so that UTEXT_INITIALIZER can access i t. * Note: must be publicly visible so that UTEXT_INITIALIZER can access i t.
*/ */
enum { enum {
UTEXT_MAGIC = 0x345ad82c UTEXT_MAGIC = 0x345ad82c
}; };
#endif /* U_HIDE_INTERNAL_API */
/** /**
* initializer to be used with local (stack) instances of a UText * initializer to be used with local (stack) instances of a UText
* struct. UText structs must be initialized before passing * struct. UText structs must be initialized before passing
* them to one of the utext_open functions. * them to one of the utext_open functions.
* *
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
#define UTEXT_INITIALIZER { \ #define UTEXT_INITIALIZER { \
UTEXT_MAGIC, /* magic */ \ UTEXT_MAGIC, /* magic */ \
 End of changes. 10 change blocks. 
181 lines changed or deleted 9 lines changed or added


 utf.h   utf.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 1999-2010, International Business Machines * Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: utf.h * file name: utf.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 1999sep09 * created on: 1999sep09
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
/** /**
* \file * \file
* \brief C API: Code point macros * \brief C API: Code point macros
* *
* This file defines macros for checking whether a code point is * This file defines macros for checking whether a code point is
* a surrogate or a non-character etc. * a surrogate or a non-character etc.
* *
* The UChar and UChar32 data types for Unicode code units and code points * The UChar and UChar32 data types for Unicode code units and code points
* are defined in umachines.h because they can be machine-dependent. * are defined in umachine.h because they can be machine-dependent.
* *
* utf.h is included by utypes.h and itself includes utf8.h and utf16.h aft * If U_NO_DEFAULT_INCLUDE_UTF_HEADERS is 0 then utf.h is included by utype
er some s.h
* common definitions. Those files define macros for efficiently getting co * and itself includes utf8.h and utf16.h after some
de points * common definitions.
* If U_NO_DEFAULT_INCLUDE_UTF_HEADERS is 1 then each of these headers must
be
* included explicitly if their definitions are used.
*
* utf8.h and utf16.h define macros for efficiently getting code points
* in and out of UTF-8/16 strings. * in and out of UTF-8/16 strings.
* utf16.h macros have "U16_" prefixes. * utf16.h macros have "U16_" prefixes.
* utf8.h defines similar macros with "U8_" prefixes for UTF-8 string handl ing. * utf8.h defines similar macros with "U8_" prefixes for UTF-8 string handl ing.
* *
* ICU processes 16-bit Unicode strings. * ICU mostly processes 16-bit Unicode strings.
* Most of the time, such strings are well-formed UTF-16. * Most of the time, such strings are well-formed UTF-16.
* Single, unpaired surrogates must be handled as well, and are treated in ICU * Single, unpaired surrogates must be handled as well, and are treated in ICU
* like regular code points where possible. * like regular code points where possible.
* (Pairs of surrogate code points are indistinguishable from supplementary * (Pairs of surrogate code points are indistinguishable from supplementary
* code points encoded as pairs of supplementary code units.) * code points encoded as pairs of supplementary code units.)
* *
* In fact, almost all Unicode code points in normal text (>99%) * In fact, almost all Unicode code points in normal text (>99%)
* are on the BMP (<=U+ffff) and even <=U+d7ff. * are on the BMP (<=U+ffff) and even <=U+d7ff.
* ICU functions handle supplementary code points (U+10000..U+10ffff) * ICU functions handle supplementary code points (U+10000..U+10ffff)
* but are optimized for the much more frequently occurring BMP code points . * but are optimized for the much more frequently occurring BMP code points .
* *
* utf.h defines UChar to be an unsigned 16-bit integer. If this matches wc * umachine.h defines UChar to be an unsigned 16-bit integer.
har_t, then * Where available, UChar is defined to be a char16_t
* UChar is defined to be exactly wchar_t, otherwise uint16_t. * or a wchar_t (if that is an unsigned 16-bit type), otherwise uint16_t.
* *
* UChar32 is defined to be a signed 32-bit integer (int32_t), large enough for a 21-bit * UChar32 is defined to be a signed 32-bit integer (int32_t), large enough for a 21-bit
* Unicode code point (Unicode scalar value, 0..0x10ffff). * Unicode code point (Unicode scalar value, 0..0x10ffff).
* Before ICU 2.4, the definition of UChar32 was similarly platform-depende nt as * Before ICU 2.4, the definition of UChar32 was similarly platform-depende nt as
* the definition of UChar. For details see the documentation for UChar32 i tself. * the definition of UChar. For details see the documentation for UChar32 i tself.
* *
* utf.h also defines a small number of C macros for single Unicode code po ints. * utf.h defines a small number of C macros for single Unicode code points.
* These are simple checks for surrogates and non-characters. * These are simple checks for surrogates and non-characters.
* For actual Unicode character properties see uchar.h. * For actual Unicode character properties see uchar.h.
* *
* By default, string operations must be done with error checking in case * By default, string operations must be done with error checking in case
* a string is not well-formed UTF-16. * a string is not well-formed UTF-16.
* The macros will detect if a surrogate code unit is unpaired * The macros will detect if a surrogate code unit is unpaired
* (lead unit without trail unit or vice versa) and just return the unit it self * (lead unit without trail unit or vice versa) and just return the unit it self
* as the code point. * as the code point.
* (It is an accidental property of Unicode and UTF-16 that all
* malformed sequences can be expressed unambiguously with a distinct subra
nge
* of Unicode code points.)
* *
* The regular "safe" macros require that the initial, passed-in string ind ex * The regular "safe" macros require that the initial, passed-in string ind ex
* is within bounds. They only check the index when they read more than one * is within bounds. They only check the index when they read more than one
* code unit. This is usually done with code similar to the following loop: * code unit. This is usually done with code similar to the following loop:
* <pre>while(i<length) { * <pre>while(i<length) {
* U16_NEXT(s, i, length, c); * U16_NEXT(s, i, length, c);
* // use c * // use c
* }</pre> * }</pre>
* *
* When it is safe to assume that text is well-formed UTF-16 * When it is safe to assume that text is well-formed UTF-16
skipping to change at line 98 skipping to change at line 101
* The unsafe UTF-8 macros are entirely implemented inside the macro defini tions * The unsafe UTF-8 macros are entirely implemented inside the macro defini tions
* and are fast, while the safe UTF-8 macros call functions for all but the * and are fast, while the safe UTF-8 macros call functions for all but the
* trivial (ASCII) cases. * trivial (ASCII) cases.
* (ICU 3.6 optimizes U8_NEXT() and U8_APPEND() to handle most other common * (ICU 3.6 optimizes U8_NEXT() and U8_APPEND() to handle most other common
* characters inline as well.) * characters inline as well.)
* *
* Unlike with UTF-16, malformed sequences cannot be expressed with distinc t * Unlike with UTF-16, malformed sequences cannot be expressed with distinc t
* code point values (0..U+10ffff). They are indicated with negative values instead. * code point values (0..U+10ffff). They are indicated with negative values instead.
* *
* For more information see the ICU User Guide Strings chapter * For more information see the ICU User Guide Strings chapter
* (http://icu-project.org/userguide/strings.html). * (http://userguide.icu-project.org/strings).
* *
* <em>Usage:</em> * <em>Usage:</em>
* ICU coding guidelines for if() statements should be followed when using these macros. * ICU coding guidelines for if() statements should be followed when using these macros.
* Compound statements (curly braces {}) must be used for if-else-while... * Compound statements (curly braces {}) must be used for if-else-while...
* bodies and all macro statements should be terminated with semicolon. * bodies and all macro statements should be terminated with semicolon.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#ifndef __UTF_H__ #ifndef __UTF_H__
#define __UTF_H__ #define __UTF_H__
#include "unicode/utypes.h" #include "unicode/umachine.h"
/* include the utfXX.h after the following definitions */ /* include the utfXX.h after the following definitions */
/* single-code point definitions ------------------------------------------ -- */ /* single-code point definitions ------------------------------------------ -- */
/** /**
* This value is intended for sentinel values for APIs that
* (take or) return single code points (UChar32).
* It is outside of the Unicode code point range 0..0x10ffff.
*
* For example, a "done" or "error" value in a new API
* could be indicated with U_SENTINEL.
*
* ICU APIs designed before ICU 2.4 usually define service-specific "done"
* values, mostly 0xffff.
* Those may need to be distinguished from
* actual U+ffff text contents by calling functions like
* CharacterIterator::hasNext() or UnicodeString::length().
*
* @return -1
* @see UChar32
* @stable ICU 2.4
*/
#define U_SENTINEL (-1)
/**
* Is this code point a Unicode noncharacter? * Is this code point a Unicode noncharacter?
* @param c 32-bit code point * @param c 32-bit code point
* @return TRUE or FALSE * @return TRUE or FALSE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_IS_UNICODE_NONCHAR(c) \ #define U_IS_UNICODE_NONCHAR(c) \
((c)>=0xfdd0 && \ ((c)>=0xfdd0 && \
((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && \ ((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && \
(uint32_t)(c)<=0x10ffff) (uint32_t)(c)<=0x10ffff)
skipping to change at line 230 skipping to change at line 213
* Assuming c is a surrogate code point (U_IS_SURROGATE(c)), * Assuming c is a surrogate code point (U_IS_SURROGATE(c)),
* is it a trail surrogate? * is it a trail surrogate?
* @param c 32-bit code point * @param c 32-bit code point
* @return TRUE or FALSE * @return TRUE or FALSE
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
#define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) #define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0)
/* include the utfXX.h ---------------------------------------------------- -- */ /* include the utfXX.h ---------------------------------------------------- -- */
#if !U_NO_DEFAULT_INCLUDE_UTF_HEADERS
#include "unicode/utf8.h" #include "unicode/utf8.h"
#include "unicode/utf16.h" #include "unicode/utf16.h"
/* utf_old.h contains deprecated, pre-ICU 2.4 definitions */ /* utf_old.h contains deprecated, pre-ICU 2.4 definitions */
#include "unicode/utf_old.h" #include "unicode/utf_old.h"
#endif #endif /* !U_NO_DEFAULT_INCLUDE_UTF_HEADERS */
#endif /* __UTF_H__ */
 End of changes. 12 change blocks. 
37 lines changed or deleted 20 lines changed or added


 utf16.h   utf16.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 1999-2010, International Business Machines * Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: utf16.h * file name: utf16.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 1999sep09 * created on: 1999sep09
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
/** /**
* \file * \file
* \brief C API: 16-bit Unicode handling macros * \brief C API: 16-bit Unicode handling macros
* *
* This file defines macros to deal with 16-bit Unicode (UTF-16) code units and strings. * This file defines macros to deal with 16-bit Unicode (UTF-16) code units and strings.
* utf16.h is included by utf.h after unicode/umachine.h
* and some common definitions.
* *
* For more information see utf.h and the ICU User Guide Strings chapter * For more information see utf.h and the ICU User Guide Strings chapter
* (http://icu-project.org/userguide/strings.html). * (http://userguide.icu-project.org/strings).
* *
* <em>Usage:</em> * <em>Usage:</em>
* ICU coding guidelines for if() statements should be followed when using these macros. * ICU coding guidelines for if() statements should be followed when using these macros.
* Compound statements (curly braces {}) must be used for if-else-while... * Compound statements (curly braces {}) must be used for if-else-while...
* bodies and all macro statements should be terminated with semicolon. * bodies and all macro statements should be terminated with semicolon.
*/ */
#ifndef __UTF16_H__ #ifndef __UTF16_H__
#define __UTF16_H__ #define __UTF16_H__
/* utf.h must be included first. */ #include "unicode/umachine.h"
#ifndef __UTF_H__ #ifndef __UTF_H__
# include "unicode/utf.h" # include "unicode/utf.h"
#endif #endif
/* single-code point definitions ------------------------------------------ -- */ /* single-code point definitions ------------------------------------------ -- */
/** /**
* Does this code unit alone encode a code point (BMP, not a surrogate)? * Does this code unit alone encode a code point (BMP, not a surrogate)?
* @param c 16-bit code unit * @param c 16-bit code unit
* @return TRUE or FALSE * @return TRUE or FALSE
 End of changes. 4 change blocks. 
5 lines changed or deleted 3 lines changed or added


 utf8.h   utf8.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 1999-2009, International Business Machines * Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: utf8.h * file name: utf8.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 1999sep13 * created on: 1999sep13
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
/** /**
* \file * \file
* \brief C API: 8-bit Unicode handling macros * \brief C API: 8-bit Unicode handling macros
* *
* This file defines macros to deal with 8-bit Unicode (UTF-8) code units ( bytes) and strings. * This file defines macros to deal with 8-bit Unicode (UTF-8) code units ( bytes) and strings.
* utf8.h is included by utf.h after unicode/umachine.h
* and some common definitions.
* *
* For more information see utf.h and the ICU User Guide Strings chapter * For more information see utf.h and the ICU User Guide Strings chapter
* (http://icu-project.org/userguide/strings.html). * (http://userguide.icu-project.org/strings).
* *
* <em>Usage:</em> * <em>Usage:</em>
* ICU coding guidelines for if() statements should be followed when using these macros. * ICU coding guidelines for if() statements should be followed when using these macros.
* Compound statements (curly braces {}) must be used for if-else-while... * Compound statements (curly braces {}) must be used for if-else-while...
* bodies and all macro statements should be terminated with semicolon. * bodies and all macro statements should be terminated with semicolon.
*/ */
#ifndef __UTF8_H__ #ifndef __UTF8_H__
#define __UTF8_H__ #define __UTF8_H__
/* utf.h must be included first. */ #include "unicode/umachine.h"
#ifndef __UTF_H__ #ifndef __UTF_H__
# include "unicode/utf.h" # include "unicode/utf.h"
#endif #endif
/* internal definitions --------------------------------------------------- -- */ /* internal definitions --------------------------------------------------- -- */
/** /**
* \var utf8_countTrailBytes * \var utf8_countTrailBytes
* Internal array with numbers of trail bytes for any given byte used in * Internal array with numbers of trail bytes for any given byte used in
* lead byte position. * lead byte position.
 End of changes. 4 change blocks. 
5 lines changed or deleted 3 lines changed or added


 utf_old.h   utf_old.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2002-2008, International Business Machines * Copyright (C) 2002-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: utf.h * file name: utf.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2002sep21 * created on: 2002sep21
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 31 skipping to change at line 31
/** /**
* *
* The macros in utf_old.h are all deprecated and their use discouraged. * The macros in utf_old.h are all deprecated and their use discouraged.
* Some of the design principles behind the set of UTF macros * Some of the design principles behind the set of UTF macros
* have changed or proved impractical. * have changed or proved impractical.
* Almost all of the old "UTF macros" are at least renamed. * Almost all of the old "UTF macros" are at least renamed.
* If you are looking for a new equivalent to an old macro, please see the * If you are looking for a new equivalent to an old macro, please see the
* comment at the old one. * comment at the old one.
* *
* utf_old.h is included by utf.h after unicode/umachine.h
* and some common definitions, to not break old code.
*
* Brief summary of reasons for deprecation: * Brief summary of reasons for deprecation:
* - Switch on UTF_SIZE (selection of UTF-8/16/32 default string processing ) * - Switch on UTF_SIZE (selection of UTF-8/16/32 default string processing )
* was impractical. * was impractical.
* - Switch on UTF_SAFE etc. (selection of unsafe/safe/strict default strin g processing) * - Switch on UTF_SAFE etc. (selection of unsafe/safe/strict default strin g processing)
* was of little use and impractical. * was of little use and impractical.
* - Whole classes of macros became obsolete outside of the UTF_SIZE/UTF_SA FE * - Whole classes of macros became obsolete outside of the UTF_SIZE/UTF_SA FE
* selection framework: UTF32_ macros (all trivial) * selection framework: UTF32_ macros (all trivial)
* and UTF_ default and intermediate macros (all aliases). * and UTF_ default and intermediate macros (all aliases).
* - The selection framework also caused many macro aliases. * - The selection framework also caused many macro aliases.
* - Change in Unicode standard: "irregular" sequences (3.0) became illegal (3.2). * - Change in Unicode standard: "irregular" sequences (3.0) became illegal (3.2).
skipping to change at line 151 skipping to change at line 148
* <hr> * <hr>
* *
* @deprecated ICU 2.4. Use the macros in utf.h, utf16.h, utf8.h instead. * @deprecated ICU 2.4. Use the macros in utf.h, utf16.h, utf8.h instead.
*/ */
#ifndef __UTF_OLD_H__ #ifndef __UTF_OLD_H__
#define __UTF_OLD_H__ #define __UTF_OLD_H__
#ifndef U_HIDE_DEPRECATED_API #ifndef U_HIDE_DEPRECATED_API
/* utf.h must be included first. */ #include "unicode/utf.h"
#ifndef __UTF_H__ #include "unicode/utf8.h"
# include "unicode/utf.h" #include "unicode/utf16.h"
#endif
/* Formerly utf.h, part 1 ------------------------------------------------- -- */ /* Formerly utf.h, part 1 ------------------------------------------------- -- */
#ifdef U_USE_UTF_DEPRECATES #ifdef U_USE_UTF_DEPRECATES
/** /**
* Unicode string and array offset and index type. * Unicode string and array offset and index type.
* ICU always counts Unicode code units (UChars) for * ICU always counts Unicode code units (UChars) for
* string offsets, indexes, and lengths, not Unicode code points. * string offsets, indexes, and lengths, not Unicode code points.
* *
* @obsolete ICU 2.6. Use int32_t directly instead since this API will be r emoved in that release. * @obsolete ICU 2.6. Use int32_t directly instead since this API will be r emoved in that release.
 End of changes. 3 change blocks. 
8 lines changed or deleted 4 lines changed or added


 utrans.h   utrans.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* Date Name Description * Date Name Description
* 06/21/00 aliu Creation. * 06/21/00 aliu Creation.
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef UTRANS_H #ifndef UTRANS_H
#define UTRANS_H #define UTRANS_H
skipping to change at line 513 skipping to change at line 513
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
utrans_transIncrementalUChars(const UTransliterator* trans, utrans_transIncrementalUChars(const UTransliterator* trans,
UChar* text, UChar* text,
int32_t* textLength, int32_t* textLength,
int32_t textCapacity, int32_t textCapacity,
UTransPosition* pos, UTransPosition* pos,
UErrorCode* status); UErrorCode* status);
/* deprecated API --------------------------------------------------------- -- */ /* deprecated API --------------------------------------------------------- -- */
#ifndef U_HIDE_DEPRECATED_API
/* see utrans.h documentation for why these functions are deprecated */ /* see utrans.h documentation for why these functions are deprecated */
/** /**
* Deprecated, use utrans_openU() instead. * Deprecated, use utrans_openU() instead.
* Open a custom transliterator, given a custom rules string * Open a custom transliterator, given a custom rules string
* OR * OR
* a system transliterator, given its ID. * a system transliterator, given its ID.
* Any non-NULL result from this function should later be closed with * Any non-NULL result from this function should later be closed with
* utrans_close(). * utrans_close().
* *
skipping to change at line 601 skipping to change at line 603
* NULL. * NULL.
* @return the actual length of the index-th ID, not including * @return the actual length of the index-th ID, not including
* zero-termination. This may be greater than bufCapacity. * zero-termination. This may be greater than bufCapacity.
* @deprecated ICU 2.8 Use utrans_openIDs() instead, see utrans.h * @deprecated ICU 2.8 Use utrans_openIDs() instead, see utrans.h
*/ */
U_DEPRECATED int32_t U_EXPORT2 U_DEPRECATED int32_t U_EXPORT2
utrans_getAvailableID(int32_t index, utrans_getAvailableID(int32_t index,
char* buf, char* buf,
int32_t bufCapacity); int32_t bufCapacity);
#endif /* U_HIDE_DEPRECATED_API */
#endif /* #if !UCONFIG_NO_TRANSLITERATION */ #endif /* #if !UCONFIG_NO_TRANSLITERATION */
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 lines changed or added


 utypes.h   utypes.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1996-2011, International Business Machines * Copyright (C) 1996-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* FILE NAME : UTYPES.H (formerly ptypes.h) * FILE NAME : UTYPES.H (formerly ptypes.h)
* *
* Date Name Description * Date Name Description
* 12/11/96 helena Creation. * 12/11/96 helena Creation.
* 02/27/97 aliu Added typedefs for UClassID, int8, int16, int32 , * 02/27/97 aliu Added typedefs for UClassID, int8, int16, int32 ,
* uint8, uint16, and uint32. * uint8, uint16, and uint32.
* 04/01/97 aliu Added XP_CPLUSPLUS and modified to work under C as * 04/01/97 aliu Added XP_CPLUSPLUS and modified to work under C as
skipping to change at line 36 skipping to change at line 36
* Renamed to utypes.h. * Renamed to utypes.h.
* 05/05/99 stephen Changed to use <inttypes.h> * 05/05/99 stephen Changed to use <inttypes.h>
* 12/07/99 helena Moved copyright notice string from ucnv_bld.h h ere. * 12/07/99 helena Moved copyright notice string from ucnv_bld.h h ere.
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef UTYPES_H #ifndef UTYPES_H
#define UTYPES_H #define UTYPES_H
#include "unicode/umachine.h" #include "unicode/umachine.h"
#include "unicode/utf.h"
#include "unicode/uversion.h" #include "unicode/uversion.h"
#include "unicode/uconfig.h" #include "unicode/uconfig.h"
#include "float.h" #include <float.h>
#if !U_NO_DEFAULT_INCLUDE_UTF_HEADERS
# include "unicode/utf.h"
#endif
/*! /*!
* \file * \file
* \brief Basic definitions for ICU, for both C and C++ APIs * \brief Basic definitions for ICU, for both C and C++ APIs
* *
* This file defines basic types, constants, and enumerations directly or * This file defines basic types, constants, and enumerations directly or
* indirectly by including other header files, especially utf.h for the * indirectly by including other header files, especially utf.h for the
* basic character and string definitions and umachine.h for consistent * basic character and string definitions and umachine.h for consistent
* integer and other types. * integer and other types.
*/ */
/** /**
* \def U_SHOW_CPLUSPLUS_API * \def U_SHOW_CPLUSPLUS_API
* @internal * @internal
*/ */
#ifdef XP_CPLUSPLUS #ifdef __cplusplus
# ifndef U_SHOW_CPLUSPLUS_API # ifndef U_SHOW_CPLUSPLUS_API
# define U_SHOW_CPLUSPLUS_API 1 # define U_SHOW_CPLUSPLUS_API 1
# endif # endif
#else #else
# undef U_SHOW_CPLUSPLUS_API # undef U_SHOW_CPLUSPLUS_API
# define U_SHOW_CPLUSPLUS_API 0 # define U_SHOW_CPLUSPLUS_API 0
#endif #endif
/** @{ API visibility control */ /** @{ API visibility control */
skipping to change at line 83 skipping to change at line 86
* Define this to 1 to request that internal API be "hidden" * Define this to 1 to request that internal API be "hidden"
* @internal * @internal
*/ */
#if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API) #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API)
#define U_HIDE_DRAFT_API 1 #define U_HIDE_DRAFT_API 1
#endif #endif
#if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API) #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API)
#define U_HIDE_INTERNAL_API 1 #define U_HIDE_INTERNAL_API 1
#endif #endif
#ifdef U_HIDE_DRAFT_API
#include "unicode/udraft.h"
#endif
#ifdef U_HIDE_DEPRECATED_API
#include "unicode/udeprctd.h"
#endif
#ifdef U_HIDE_DEPRECATED_API
#include "unicode/uobslete.h"
#endif
#ifdef U_HIDE_INTERNAL_API
#include "unicode/uintrnal.h"
#endif
#ifdef U_HIDE_SYSTEM_API
#include "unicode/usystem.h"
#endif
/** @} */ /** @} */
/*========================================================================= ==*/ /*========================================================================= ==*/
/* char Character set family
*/
/*=========================================================================
==*/
/**
* U_CHARSET_FAMILY is equal to this value when the platform is an ASCII ba
sed platform.
* @stable ICU 2.0
*/
#define U_ASCII_FAMILY 0
/**
* U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC b
ased platform.
* @stable ICU 2.0
*/
#define U_EBCDIC_FAMILY 1
/**
* \def U_CHARSET_FAMILY
*
* <p>These definitions allow to specify the encoding of text
* in the char data type as defined by the platform and the compiler.
* It is enough to determine the code point values of "invariant characters
",
* which are the ones shared by all encodings that are in use
* on a given platform.</p>
*
* <p>Those "invariant characters" should be all the uppercase and lowercas
e
* latin letters, the digits, the space, and "basic punctuation".
* Also, '\\n', '\\r', '\\t' should be available.</p>
*
* <p>The list of "invariant characters" is:<br>
* \code
* A-Z a-z 0-9 SPACE " % &amp; ' ( ) * + , - . / : ; <
= > ? _
* \endcode
* <br>
* (52 letters + 10 numbers + 20 punc/sym/space = 82 total)</p>
*
* <p>This matches the IBM Syntactic Character Set (CS 640).</p>
*
* <p>In other words, all the graphic characters in 7-bit ASCII should
* be safely accessible except the following:</p>
*
* \code
* '\' <backslash>
* '[' <left bracket>
* ']' <right bracket>
* '{' <left brace>
* '}' <right brace>
* '^' <circumflex>
* '~' <tilde>
* '!' <exclamation mark>
* '#' <number sign>
* '|' <vertical line>
* '$' <dollar sign>
* '@' <commercial at>
* '`' <grave accent>
* \endcode
* @stable ICU 2.0
*/
#ifndef U_CHARSET_FAMILY
# define U_CHARSET_FAMILY 0
#endif
/**
* \def U_CHARSET_IS_UTF8
*
* Hardcode the default charset to UTF-8.
*
* If this is set to 1, then
* - ICU will assume that all non-invariant char*, StringPiece, std::string
etc.
* contain UTF-8 text, regardless of what the system API uses
* - some ICU code will use fast functions like u_strFromUTF8()
* rather than the more general and more heavy-weight conversion API (ucn
v.h)
* - ucnv_getDefaultName() always returns "UTF-8"
* - ucnv_setDefaultName() is disabled and will not change the default char
set
* - static builds of ICU are smaller
* - more functionality is available with the UCONFIG_NO_CONVERSION build-t
ime
* configuration option (see unicode/uconfig.h)
* - the UCONFIG_NO_CONVERSION build option in uconfig.h is more usable
*
* @stable ICU 4.2
* @see UCONFIG_NO_CONVERSION
*/
#ifndef U_CHARSET_IS_UTF8
# define U_CHARSET_IS_UTF8 0
#endif
/*=========================================================================
==*/
/* ICUDATA naming scheme */ /* ICUDATA naming scheme */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** /**
* \def U_ICUDATA_TYPE_LETTER * \def U_ICUDATA_TYPE_LETTER
* *
* This is a platform-dependent string containing one letter: * This is a platform-dependent string containing one letter:
* - b for big-endian, ASCII-family platforms * - b for big-endian, ASCII-family platforms
* - l for little-endian, ASCII-family platforms * - l for little-endian, ASCII-family platforms
* - e for big-endian, EBCDIC-family platforms * - e for big-endian, EBCDIC-family platforms
skipping to change at line 239 skipping to change at line 135
# define U_ICUDATA_TYPE_LETTER "l" # define U_ICUDATA_TYPE_LETTER "l"
# define U_ICUDATA_TYPE_LITLETTER l # define U_ICUDATA_TYPE_LITLETTER l
# endif # endif
#endif #endif
/** /**
* A single string literal containing the icudata stub name. i.e. 'icudt18e ' for * A single string literal containing the icudata stub name. i.e. 'icudt18e ' for
* ICU 1.8.x on EBCDIC, etc.. * ICU 1.8.x on EBCDIC, etc..
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER #define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
/**< @internal */ #ifndef U_HIDE_INTERNAL_API
#define U_USRDATA_NAME "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER /**< @internal */ #define U_USRDATA_NAME "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER /**< @internal */
#define U_USE_USRDATA 1 /**< @internal */ #define U_USE_USRDATA 1 /**< @internal */
#endif /* U_HIDE_INTERNAL_API */
/** /**
* U_ICU_ENTRY_POINT is the name of the DLL entry point to the ICU data li brary. * U_ICU_ENTRY_POINT is the name of the DLL entry point to the ICU data li brary.
* Defined as a literal, not a string. * Defined as a literal, not a string.
* Tricky Preprocessor use - ## operator replaces macro paramters with t he literal string * Tricky Preprocessor use - ## operator replaces macro paramters with t he literal string
* from the corresponding macro invocation, _b efore_ other macro substitutions. * from the corresponding macro invocation, _b efore_ other macro substitutions.
* Need a nested \#defines to get the actual v ersion numbers rather than * Need a nested \#defines to get the actual v ersion numbers rather than
* the literal text U_ICU_VERSION_MAJOR_NUM in to the name. * the literal text U_ICU_VERSION_MAJOR_NUM in to the name.
* The net result will be something of the for m * The net result will be something of the for m
* \#define U_ICU_ENTRY_POINT icudt19_dat * \#define U_ICU_ENTRY_POINT icudt19_dat
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJ OR_NUM, U_ICU_VERSION_MINOR_NUM) #define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJ OR_NUM,U_LIB_SUFFIX_C_NAME)
#ifndef U_HIDE_INTERNAL_API
/** /**
* Do not use. * Do not use. Note that it's OK for the 2nd argument to be undefined (lite ral).
* @internal * @internal
*/ */
#define U_DEF2_ICUDATA_ENTRY_POINT(major, minor) U_DEF_ICUDATA_ENTRY_POINT( #define U_DEF2_ICUDATA_ENTRY_POINT(major,suff) U_DEF_ICUDATA_ENTRY_POINT(ma
major, minor) jor,suff)
/** /**
* Do not use. * Do not use.
* @internal * @internal
*/ */
#ifndef U_DEF_ICUDATA_ENTRY_POINT #ifndef U_DEF_ICUDATA_ENTRY_POINT
/* affected by symbol renaming. See platform.h */ /* affected by symbol renaming. See platform.h */
#define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt##major##minor##_dat #ifndef U_LIB_SUFFIX_C_NAME
#endif #define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##major##_dat
/**
* \def U_CALLCONV
* Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary
* in callback function typedefs to make sure that the calling convention
* is compatible.
*
* This is only used for non-ICU-API functions.
* When a function is a public ICU API,
* you must use the U_CAPI and U_EXPORT2 qualifiers.
* @stable ICU 2.0
*/
#if defined(OS390) && defined(XP_CPLUSPLUS)
# define U_CALLCONV __cdecl
#else #else
# define U_CALLCONV U_EXPORT2 #define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##suff ## major##_dat
#endif
#endif #endif
#endif /* U_HIDE_INTERNAL_API */
/** /**
* \def NULL * \def NULL
* Define NULL if necessary, to 0 for C++ and to ((void *)0) for C. * Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#ifndef NULL #ifndef NULL
#ifdef XP_CPLUSPLUS #ifdef __cplusplus
#define NULL 0 #define NULL 0
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif
#endif #endif
/*========================================================================= ==*/ /*========================================================================= ==*/
/* Calendar/TimeZone data types */ /* Calendar/TimeZone data types */
/*========================================================================= ==*/ /*========================================================================= ==*/
skipping to change at line 324 skipping to change at line 212
#define U_MILLIS_PER_SECOND (1000) #define U_MILLIS_PER_SECOND (1000)
/** The number of milliseconds per minute @stable ICU 2.0 */ /** The number of milliseconds per minute @stable ICU 2.0 */
#define U_MILLIS_PER_MINUTE (60000) #define U_MILLIS_PER_MINUTE (60000)
/** The number of milliseconds per hour @stable ICU 2.0 */ /** The number of milliseconds per hour @stable ICU 2.0 */
#define U_MILLIS_PER_HOUR (3600000) #define U_MILLIS_PER_HOUR (3600000)
/** The number of milliseconds per day @stable ICU 2.0 */ /** The number of milliseconds per day @stable ICU 2.0 */
#define U_MILLIS_PER_DAY (86400000) #define U_MILLIS_PER_DAY (86400000)
/** /**
* Maximum UDate value * Maximum UDate value
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define U_DATE_MAX DBL_MAX #define U_DATE_MAX DBL_MAX
/** /**
* Minimum UDate value * Minimum UDate value
* @draft ICU 4.8 * @stable ICU 4.8
*/ */
#define U_DATE_MIN -U_DATE_MAX #define U_DATE_MIN -U_DATE_MAX
/*========================================================================= ==*/ /*========================================================================= ==*/
/* UClassID-based RTTI */
/*=========================================================================
==*/
/**
* UClassID is used to identify classes without using RTTI, since RTTI
* is not yet supported by all C++ compilers. Each class hierarchy which n
eeds
* to implement polymorphic clone() or operator==() defines two methods,
* described in detail below. UClassID values can be compared using
* operator==(). Nothing else should be done with them.
*
* \par
* getDynamicClassID() is declared in the base class of the hierarchy as
* a pure virtual. Each concrete subclass implements it in the same way:
*
* \code
* class Base {
* public:
* virtual UClassID getDynamicClassID() const = 0;
* }
*
* class Derived {
* public:
* virtual UClassID getDynamicClassID() const
* { return Derived::getStaticClassID(); }
* }
* \endcode
*
* Each concrete class implements getStaticClassID() as well, which allows
* clients to test for a specific type.
*
* \code
* class Derived {
* public:
* static UClassID U_EXPORT2 getStaticClassID();
* private:
* static char fgClassID;
* }
*
* // In Derived.cpp:
* UClassID Derived::getStaticClassID()
* { return (UClassID)&Derived::fgClassID; }
* char Derived::fgClassID = 0; // Value is irrelevant
* \endcode
* @stable ICU 2.0
*/
typedef void* UClassID;
/*=========================================================================
==*/
/* Shared library/DLL import-export API control */ /* Shared library/DLL import-export API control */
/*========================================================================= ==*/ /*========================================================================= ==*/
/* /*
* Control of symbol import/export. * Control of symbol import/export.
* ICU is separated into three libraries. * ICU is separated into three libraries.
*/ */
/* /**
* \def U_COMBINED_IMPLEMENTATION * \def U_COMBINED_IMPLEMENTATION
* Set to export library symbols from inside the ICU library * Set to export library symbols from inside the ICU library
* when all of ICU is in a single library. * when all of ICU is in a single library.
* This can be set as a compiler option while building ICU, and it * This can be set as a compiler option while building ICU, and it
* needs to be the first one tested to override U_COMMON_API, U_I18N_API, e tc. * needs to be the first one tested to override U_COMMON_API, U_I18N_API, e tc.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
/** /**
* \def U_DATA_API * \def U_DATA_API
skipping to change at line 557 skipping to change at line 397
* b) Verify that new is never imported. * b) Verify that new is never imported.
* c) Verify that delete is only imported from object code for interface/mi xin classes. * c) Verify that delete is only imported from object code for interface/mi xin classes.
* d) Add global delete and delete[] only for the ICU4C library itself * d) Add global delete and delete[] only for the ICU4C library itself
* and define them in a way that crashes or otherwise easily shows a pro blem. * and define them in a way that crashes or otherwise easily shows a pro blem.
* *
* The following implements d). * The following implements d).
* The operator implementations crash; this is intentional and used for lib rary debugging. * The operator implementations crash; this is intentional and used for lib rary debugging.
* *
* Note: This is currently only done on Windows because * Note: This is currently only done on Windows because
* some Linux/Unix compilers have problems with defining global new/delete. * some Linux/Unix compilers have problems with defining global new/delete.
* On Windows, U_WINDOWS is defined, and it is _MSC_VER>=1200 for MSVC 6.0 and higher. * On Windows, it is _MSC_VER>=1200 for MSVC 6.0 and higher.
*/ */
#if defined(XP_CPLUSPLUS) && defined(U_WINDOWS) && U_DEBUG && U_OVERRIDE_CX X_ALLOCATION && (_MSC_VER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (d efined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || define d(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAY OUTEX_IMPLEMENTATION)) #if defined(__cplusplus) && U_DEBUG && U_OVERRIDE_CXX_ALLOCATION && (_MSC_V ER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (defined(U_COMMON_IMPLEME NTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION))
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
/** /**
* Global operator new, defined only inside ICU4C, must not be used. * Global operator new, defined only inside ICU4C, must not be used.
* Crashes intentionally. * Crashes intentionally.
* @internal * @internal
*/ */
inline void * inline void *
operator new(size_t /*size*/) { operator new(size_t /*size*/) {
char *q=NULL; char *q=NULL;
skipping to change at line 759 skipping to change at line 599
U_PATTERN_SYNTAX_ERROR, /**< Syntax error in format pattern * / U_PATTERN_SYNTAX_ERROR, /**< Syntax error in format pattern * /
U_ILLEGAL_PAD_POSITION, /**< Pad symbol misplaced in number p attern */ U_ILLEGAL_PAD_POSITION, /**< Pad symbol misplaced in number p attern */
U_UNMATCHED_BRACES, /**< Braces do not match in message p attern */ U_UNMATCHED_BRACES, /**< Braces do not match in message p attern */
U_UNSUPPORTED_PROPERTY, /**< UNUSED as of ICU 2.4 */ U_UNSUPPORTED_PROPERTY, /**< UNUSED as of ICU 2.4 */
U_UNSUPPORTED_ATTRIBUTE, /**< UNUSED as of ICU 2.4 */ U_UNSUPPORTED_ATTRIBUTE, /**< UNUSED as of ICU 2.4 */
U_ARGUMENT_TYPE_MISMATCH, /**< Argument name and argument index mismatch in MessageFormat functions */ U_ARGUMENT_TYPE_MISMATCH, /**< Argument name and argument index mismatch in MessageFormat functions */
U_DUPLICATE_KEYWORD, /**< Duplicate keyword in PluralForma t */ U_DUPLICATE_KEYWORD, /**< Duplicate keyword in PluralForma t */
U_UNDEFINED_KEYWORD, /**< Undefined Plural keyword */ U_UNDEFINED_KEYWORD, /**< Undefined Plural keyword */
U_DEFAULT_KEYWORD_MISSING, /**< Missing DEFAULT rule in plural r ules */ U_DEFAULT_KEYWORD_MISSING, /**< Missing DEFAULT rule in plural r ules */
U_DECIMAL_NUMBER_SYNTAX_ERROR, /**< Decimal number syntax error */ U_DECIMAL_NUMBER_SYNTAX_ERROR, /**< Decimal number syntax error */
U_FORMAT_INEXACT_ERROR, /**< Cannot format a number exactly a nd rounding mode is ROUND_UNNECESSARY @draft ICU 4.8 */ U_FORMAT_INEXACT_ERROR, /**< Cannot format a number exactly a nd rounding mode is ROUND_UNNECESSARY @stable ICU 4.8 */
U_FMT_PARSE_ERROR_LIMIT, /**< The limit for format library err ors */ U_FMT_PARSE_ERROR_LIMIT, /**< The limit for format library err ors */
/* /*
* the error code range 0x10200 0x102ff are reserved for Break Iterator related error * the error code range 0x10200 0x102ff are reserved for Break Iterator related error
*/ */
U_BRK_INTERNAL_ERROR=0x10200, /**< An internal error (bug) was detected. */ U_BRK_INTERNAL_ERROR=0x10200, /**< An internal error (bug) was detected. */
U_BRK_ERROR_START=0x10200, /**< Start of codes indicating B reak Iterator failures */ U_BRK_ERROR_START=0x10200, /**< Start of codes indicating B reak Iterator failures */
U_BRK_HEX_DIGITS_EXPECTED, /**< Hex digits expected as part of a escaped char in a rule. */ U_BRK_HEX_DIGITS_EXPECTED, /**< Hex digits expected as part of a escaped char in a rule. */
U_BRK_SEMICOLON_EXPECTED, /**< Missing ';' at the end of a RBBI rule. */ U_BRK_SEMICOLON_EXPECTED, /**< Missing ';' at the end of a RBBI rule. */
U_BRK_RULE_SYNTAX, /**< Syntax error in RBBI rule. */ U_BRK_RULE_SYNTAX, /**< Syntax error in RBBI rule. */
skipping to change at line 843 skipping to change at line 683
U_PLUGIN_TOO_HIGH=0x10500, /**< The plugin's level is too hi gh to be loaded right now. */ U_PLUGIN_TOO_HIGH=0x10500, /**< The plugin's level is too hi gh to be loaded right now. */
U_PLUGIN_DIDNT_SET_LEVEL, /**< The plugin didn't call uplug _setPlugLevel in response to a QUERY */ U_PLUGIN_DIDNT_SET_LEVEL, /**< The plugin didn't call uplug _setPlugLevel in response to a QUERY */
U_PLUGIN_ERROR_LIMIT, /**< This must always be the last value to indicate the limit for plugin errors */ U_PLUGIN_ERROR_LIMIT, /**< This must always be the last value to indicate the limit for plugin errors */
U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT /**< This must always be the la st value to indicate the limit for UErrorCode (last error code +1) */ U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT /**< This must always be the la st value to indicate the limit for UErrorCode (last error code +1) */
} UErrorCode; } UErrorCode;
/* Use the following to determine if an UErrorCode represents */ /* Use the following to determine if an UErrorCode represents */
/* operational success or failure. */ /* operational success or failure. */
#ifdef XP_CPLUSPLUS #ifdef __cplusplus
/** /**
* Does the error code indicate success? * Does the error code indicate success?
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static static
inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_E RROR); } inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_E RROR); }
/** /**
* Does the error code indicate a failure? * Does the error code indicate a failure?
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
 End of changes. 24 change blocks. 
205 lines changed or deleted 29 lines changed or added


 uvernum.h   uvernum.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2000-2011, International Business Machines * Copyright (C) 2000-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: uvernum.h * file name: uvernum.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: Vladimir Weinstein * Created by: Vladimir Weinstein
* Updated by: Steven R. Loomis * Updated by: Steven R. Loomis
skipping to change at line 45 skipping to change at line 45
*/ */
#ifndef UVERNUM_H #ifndef UVERNUM_H
#define UVERNUM_H #define UVERNUM_H
/** The standard copyright notice that gets compiled into each library. /** The standard copyright notice that gets compiled into each library.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_COPYRIGHT_STRING \ #define U_COPYRIGHT_STRING \
" Copyright (C) 2011, International Business Machines Corporation and oth ers. All Rights Reserved. " " Copyright (C) 2012, International Business Machines Corporation and oth ers. All Rights Reserved. "
/** The current ICU major version as an integer. /** The current ICU major version as an integer.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION_MAJOR_NUM 4 #define U_ICU_VERSION_MAJOR_NUM 49
/** The current ICU minor version as an integer. /** The current ICU minor version as an integer.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#define U_ICU_VERSION_MINOR_NUM 8 #define U_ICU_VERSION_MINOR_NUM 1
/** The current ICU patchlevel version as an integer. /** The current ICU patchlevel version as an integer.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION_PATCHLEVEL_NUM 1 #define U_ICU_VERSION_PATCHLEVEL_NUM 0
/** The current ICU build level version as an integer. /** The current ICU build level version as an integer.
* This value is for use by ICU clients. It defaults to 0. * This value is for use by ICU clients. It defaults to 0.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#ifndef U_ICU_VERSION_BUILDLEVEL_NUM #ifndef U_ICU_VERSION_BUILDLEVEL_NUM
#define U_ICU_VERSION_BUILDLEVEL_NUM 1 #define U_ICU_VERSION_BUILDLEVEL_NUM 0
#endif #endif
/** Glued version suffix for renamers /** Glued version suffix for renamers
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#define U_ICU_VERSION_SUFFIX _48 #define U_ICU_VERSION_SUFFIX _49
/**
* \def U_DEF2_ICU_ENTRY_POINT_RENAME
* @internal
*/
/**
* \def U_DEF_ICU_ENTRY_POINT_RENAME
* @internal
*/
/** Glued version suffix function for renamers /** Glued version suffix function for renamers
* This value will change in the subsequent releases of ICU. * This value will change in the subsequent releases of ICU.
* If a custom suffix (such as matching library suffixes) is desired, this can be modified. * If a custom suffix (such as matching library suffixes) is desired, this can be modified.
* Note that if present, platform.h may contain an earlier definition of t his macro. * Note that if present, platform.h may contain an earlier definition of t his macro.
* \def U_ICU_ENTRY_POINT_RENAME
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
#ifndef U_ICU_ENTRY_POINT_RENAME #ifndef U_ICU_ENTRY_POINT_RENAME
#define U_ICU_ENTRY_POINT_RENAME(x) x ## _48 #ifdef U_HAVE_LIB_SUFFIX
#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y,z) x ## y ## z
#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y,z) U_DEF_ICU_ENTRY_POINT_RENAME(x
,y,z)
#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_IC
U_VERSION_SUFFIX,U_LIB_SUFFIX_C_NAME)
#else
#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y
)
#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_IC
U_VERSION_SUFFIX)
#endif
#endif #endif
/** The current ICU library version as a dotted-decimal string. The patchle vel /** The current ICU library version as a dotted-decimal string. The patchle vel
* only appears in this string if it non-zero. * only appears in this string if it non-zero.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION "4.8.1.1" #define U_ICU_VERSION "49.1"
/** The current ICU library major/minor version as a string without dots, f or library name suffixes. /** The current ICU library major/minor version as a string without dots, f or library name suffixes.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#define U_ICU_VERSION_SHORT "48" #define U_ICU_VERSION_SHORT "49"
#ifndef U_HIDE_INTERNAL_API
/** Data version in ICU4C. /** Data version in ICU4C.
* @internal ICU 4.4 Internal Use Only * @internal ICU 4.4 Internal Use Only
**/ **/
#define U_ICU_DATA_VERSION "4.8.1" #define U_ICU_DATA_VERSION "49.1"
#endif /* U_HIDE_INTERNAL_API */
/*========================================================================= == /*========================================================================= ==
* ICU collation framework version information * ICU collation framework version information
* Version info that can be obtained from a collator is affected by these * Version info that can be obtained from a collator is affected by these
* numbers in a secret and magic way. Please use collator version as whole * numbers in a secret and magic way. Please use collator version as whole
*========================================================================= == *========================================================================= ==
*/ */
/** /**
* Collation runtime version (sort key generator, strcoll). * Collation runtime version (sort key generator, strcoll).
 End of changes. 15 change blocks. 
11 lines changed or deleted 35 lines changed or added


 uversion.h   uversion.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2000-2010, International Business Machines * Copyright (C) 2000-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: uversion.h * file name: uversion.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: Vladimir Weinstein * Created by: Vladimir Weinstein
* *
skipping to change at line 70 skipping to change at line 70
/* C++ namespace if supported. Versioned unless versioning is disabled. */ /* C++ namespace if supported. Versioned unless versioning is disabled. */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** /**
* \def U_NAMESPACE_BEGIN * \def U_NAMESPACE_BEGIN
* This is used to begin a declaration of a public ICU C++ API. * This is used to begin a declaration of a public ICU C++ API.
* When not compiling for C++, it does nothing. * When not compiling for C++, it does nothing.
* When compiling for C++, it begins an extern "C++" linkage block (to prot ect * When compiling for C++, it begins an extern "C++" linkage block (to prot ect
* against cases in which an external client includes ICU header files insi de * against cases in which an external client includes ICU header files insi de
* an extern "C" linkage block). * an extern "C" linkage block).
* If the C++ compiler supports namespaces, it also begins a namespace bloc *
k. * It also begins a versioned-ICU-namespace block.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
/** /**
* \def U_NAMESPACE_END * \def U_NAMESPACE_END
* This is used to end a declaration of a public ICU C++ API. * This is used to end a declaration of a public ICU C++ API.
* When not compiling for C++, it does nothing. * When not compiling for C++, it does nothing.
* When compiling for C++, it ends the extern "C++" block begun by * When compiling for C++, it ends the extern "C++" block begun by
* U_NAMESPACE_BEGIN. * U_NAMESPACE_BEGIN.
* If the C++ compiler supports namespaces, it also ends the namespace bloc *
k * It also ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGI
* begun by U_NAMESPACE_BEGIN. N.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
/** /**
* \def U_NAMESPACE_USE * \def U_NAMESPACE_USE
* This is used to specify that the rest of the code uses the * This is used to specify that the rest of the code uses the
* public ICU C++ API namespace. * public ICU C++ API namespace.
* If the compiler doesn't support namespaces, this does nothing. * This is invoked by default; we recommend that you turn it off:
* See the "Recommended Build Options" section of the ICU4C readme
* (http://source.icu-project.org/repos/icu/icu/trunk/readme.html#RecBuild)
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
/** /**
* \def U_NAMESPACE_QUALIFIER * \def U_NAMESPACE_QUALIFIER
* This is used to qualify that a function or class is part of * This is used to qualify that a function or class is part of
* the public ICU C++ API namespace. * the public ICU C++ API namespace.
* If the compiler doesn't support namespaces, this does nothing. *
* This macro is unnecessary since ICU 49 requires namespace support.
* You can just use "icu::" instead.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
/* Define namespace symbols if the compiler supports it. */ /* Define namespace symbols if the compiler supports it. */
#ifdef XP_CPLUSPLUS #ifdef __cplusplus
#if U_HAVE_NAMESPACE
# if U_DISABLE_RENAMING # if U_DISABLE_RENAMING
# define U_ICU_NAMESPACE icu # define U_ICU_NAMESPACE icu
namespace U_ICU_NAMESPACE { } namespace U_ICU_NAMESPACE { }
# else # else
# define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu) # define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu)
namespace U_ICU_NAMESPACE { } namespace U_ICU_NAMESPACE { }
namespace icu = U_ICU_NAMESPACE; namespace icu = U_ICU_NAMESPACE;
# endif # endif
# define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE { # define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE {
skipping to change at line 125 skipping to change at line 129
# define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE; # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
# define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE:: # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
# ifndef U_USING_ICU_NAMESPACE # ifndef U_USING_ICU_NAMESPACE
# define U_USING_ICU_NAMESPACE 1 # define U_USING_ICU_NAMESPACE 1
# endif # endif
# if U_USING_ICU_NAMESPACE # if U_USING_ICU_NAMESPACE
U_NAMESPACE_USE U_NAMESPACE_USE
# endif # endif
#else #else
# define U_NAMESPACE_BEGIN extern "C++" {
# define U_NAMESPACE_END }
# define U_NAMESPACE_USE
# define U_NAMESPACE_QUALIFIER
#endif
#else
# define U_NAMESPACE_BEGIN # define U_NAMESPACE_BEGIN
# define U_NAMESPACE_END # define U_NAMESPACE_END
# define U_NAMESPACE_USE # define U_NAMESPACE_USE
# define U_NAMESPACE_QUALIFIER # define U_NAMESPACE_QUALIFIER
#endif #endif
/*========================================================================= ==*/ /*========================================================================= ==*/
/* General version helper functions. Definitions in putil.c */ /* General version helper functions. Definitions in putil.c */
/*========================================================================= ==*/ /*========================================================================= ==*/
skipping to change at line 182 skipping to change at line 180
* Definition of this function lives in putil.c * Definition of this function lives in putil.c
* *
* @param versionArray The version information to be written as a string. * @param versionArray The version information to be written as a string.
* @param versionString A string buffer that will be filled in with * @param versionString A string buffer that will be filled in with
* a string corresponding to the numeric version * a string corresponding to the numeric version
* information in versionArray. * information in versionArray.
* The buffer size must be at least U_MAX_VERSION_STRI NG_LENGTH. * The buffer size must be at least U_MAX_VERSION_STRI NG_LENGTH.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
u_versionToString(UVersionInfo versionArray, char *versionString); u_versionToString(const UVersionInfo versionArray, char *versionString);
/** /**
* Gets the ICU release version. The version array stores the version info rmation * Gets the ICU release version. The version array stores the version info rmation
* for ICU. For example, release "1.3.31.2" is then represented as 0x01031 F02. * for ICU. For example, release "1.3.31.2" is then represented as 0x01031 F02.
* Definition of this function lives in putil.c * Definition of this function lives in putil.c
* *
* @param versionArray the version # information, the result will be filled in * @param versionArray the version # information, the result will be filled in
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
 End of changes. 8 change blocks. 
17 lines changed or deleted 14 lines changed or added


 vtzone.h   vtzone.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2010, International Business Machines Corporation and * Copyright (C) 2007-2012, International Business Machines Corporation and
* * others. All Rights Reserved.
* others. All Rights Reserved.
*
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef VTZONE_H #ifndef VTZONE_H
#define VTZONE_H #define VTZONE_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: RFC2445 VTIMEZONE support * \brief C++ API: RFC2445 VTIMEZONE support
skipping to change at line 97 skipping to change at line 97
* or NULL when the ID is unknown. * or NULL when the ID is unknown.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
static VTimeZone* createVTimeZoneByID(const UnicodeString& ID); static VTimeZone* createVTimeZoneByID(const UnicodeString& ID);
/** /**
* Create a <code>VTimeZone</code> instance using a basic time zone. * Create a <code>VTimeZone</code> instance using a basic time zone.
* @param basicTZ The basic time zone instance * @param basicTZ The basic time zone instance
* @param status Output param to filled in with a success or an error. * @param status Output param to filled in with a success or an error.
* @return A <code>VTimeZone</code> object initialized by the basic tim e zone. * @return A <code>VTimeZone</code> object initialized by the basic tim e zone.
* @draft ICU 4.6 * @stable ICU 4.6
*/ */
static VTimeZone* createVTimeZoneFromBasicTimeZone(const BasicTimeZone& basicTZ, static VTimeZone* createVTimeZoneFromBasicTimeZone(const BasicTimeZone& basicTZ,
UErrorCode &status); UErrorCode &status);
/** /**
* Create a <code>VTimeZone</code> instance by RFC2445 VTIMEZONE data * Create a <code>VTimeZone</code> instance by RFC2445 VTIMEZONE data
* *
* @param vtzdata The string including VTIMEZONE data block * @param vtzdata The string including VTIMEZONE data block
* @param status Output param to filled in with a success or an error. * @param status Output param to filled in with a success or an error.
* @return A <code>VTimeZone</code> initialized by the VTIMEZONE data o r * @return A <code>VTimeZone</code> initialized by the VTIMEZONE data o r
 End of changes. 2 change blocks. 
5 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/