LEFontInstance.h   LEFontInstance.h 
/* /*
* *
* (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * (C) Copyright IBM Corp. 1998-2012 - All Rights Reserved
* *
*/ */
#ifndef __LEFONTINSTANCE_H #ifndef __LEFONTINSTANCE_H
#define __LEFONTINSTANCE_H #define __LEFONTINSTANCE_H
#include "LETypes.h" #include "LETypes.h"
/** /**
* \file * \file
* \brief C++ API: Layout Engine Font Instance object * \brief C++ API: Layout Engine Font Instance object
*/ */
/**
* \def LE_CONFIG_FONTINSTANCE_LENGTH
* @internal
* Set this to 1 to enable a virtual function on LEFontInstance which takes
a font length, this is for compatibility with HarfBuzz. This is off by def
ault in ICU 50, but enabled by default in ICU 51+
*/
#ifndef LE_CONFIG_FONTINSTANCE_LENGTH
#define LE_CONFIG_FONTINSTANCE_LENGTH 0
#endif
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* Instances of this class are used by <code>LEFontInstance::mapCharsToGlyp hs</code> and * Instances of this class are used by <code>LEFontInstance::mapCharsToGlyp hs</code> and
* <code>LEFontInstance::mapCharToGlyph</code> to adjust character codes be fore the character * <code>LEFontInstance::mapCharToGlyph</code> to adjust character codes be fore the character
* to glyph mapping process. Examples of this are filtering out control cha racters * to glyph mapping process. Examples of this are filtering out control cha racters
* and character mirroring - replacing a character which has both a left an d a right * and character mirroring - replacing a character which has both a left an d a right
* hand form with the opposite form. * hand form with the opposite form.
* *
* @stable ICU 3.2 * @stable ICU 3.2
skipping to change at line 178 skipping to change at line 168
* *
* @param tableTag - the four byte table tag. (e.g. 'cmap') * @param tableTag - the four byte table tag. (e.g. 'cmap')
* *
* @return the address of the table in memory, or <code>NULL</code> * @return the address of the table in memory, or <code>NULL</code>
* if the table doesn't exist. * if the table doesn't exist.
* *
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
virtual const void *getFontTable(LETag tableTag) const = 0; virtual const void *getFontTable(LETag tableTag) const = 0;
#if LE_CONFIG_FONTINSTANCE_LENGTH
/** /**
* This method reads a table from the font. Note that in general, * This method reads a table from the font. Note that in general,
* it only makes sense to call this method on an <code>LEFontInstance</ code> * it only makes sense to call this method on an <code>LEFontInstance</ code>
* which represents a physical font - i.e. one which has been returned by * which represents a physical font - i.e. one which has been returned by
* <code>getSubFont()</code>. This is because each subfont in a composi te font * <code>getSubFont()</code>. This is because each subfont in a composi te font
* will have different tables, and there's no way to know which subfont to access. * will have different tables, and there's no way to know which subfont to access.
* *
* Subclasses which represent composite fonts should always return <cod e>NULL</code>. * Subclasses which represent composite fonts should always return <cod e>NULL</code>.
* *
* This version sets a length, for range checking. * This version sets a length, for range checking.
* *
* @param tableTag - the four byte table tag. (e.g. 'cmap') * @param tableTag - the four byte table tag. (e.g. 'cmap')
* @param length - ignored on entry, on exit will be the length of the table if known, or -1 if unknown. * @param length - ignored on entry, on exit will be the length of the table if known, or -1 if unknown.
* @return the address of the table in memory, or <code>NULL</code> * @return the address of the table in memory, or <code>NULL</code>
* if the table doesn't exist. * if the table doesn't exist.
* @internal * @internal
*/ */
virtual const void* getFontTable(LETag tableTag, size_t &length) const { length=-1; return getFontTable(tableTag); } /* -1 = unknown length */ virtual const void* getFontTable(LETag tableTag, size_t &length) const { length=-1; return getFontTable(tableTag); } /* -1 = unknown length */
#endif
/** /**
* This method is used to determine if the font can * This method is used to determine if the font can
* render the given character. This can usually be done * render the given character. This can usually be done
* by looking the character up in the font's character * by looking the character up in the font's character
* to glyph mapping. * to glyph mapping.
* *
* The default implementation of this method will return * The default implementation of this method will return
* <code>TRUE</code> if <code>mapCharToGlyph(ch)</code> * <code>TRUE</code> if <code>mapCharToGlyph(ch)</code>
* returns a non-zero value. * returns a non-zero value.
 End of changes. 5 change blocks. 
15 lines changed or deleted 1 lines changed or added


 LETypes.h   LETypes.h 
/* /*
* *
* (C) Copyright IBM Corp. 1998-2012 - All Rights Reserved * (C) Copyright IBM Corp. and others 1998-2013 - 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
skipping to change at line 450 skipping to change at line 450
LE_ABVM_FEATURE_TAG = 0x6162766DUL, /**< 'abvm' */ LE_ABVM_FEATURE_TAG = 0x6162766DUL, /**< 'abvm' */
LE_ABVS_FEATURE_TAG = 0x61627673UL, /**< 'abvs' */ LE_ABVS_FEATURE_TAG = 0x61627673UL, /**< 'abvs' */
LE_AFRC_FEATURE_TAG = 0x61667263UL, /**< 'afrc' */ LE_AFRC_FEATURE_TAG = 0x61667263UL, /**< 'afrc' */
LE_AKHN_FEATURE_TAG = 0x616B686EUL, /**< 'akhn' */ LE_AKHN_FEATURE_TAG = 0x616B686EUL, /**< 'akhn' */
LE_BLWF_FEATURE_TAG = 0x626C7766UL, /**< 'blwf' */ LE_BLWF_FEATURE_TAG = 0x626C7766UL, /**< 'blwf' */
LE_BLWM_FEATURE_TAG = 0x626C776DUL, /**< 'blwm' */ LE_BLWM_FEATURE_TAG = 0x626C776DUL, /**< 'blwm' */
LE_BLWS_FEATURE_TAG = 0x626C7773UL, /**< 'blws' */ LE_BLWS_FEATURE_TAG = 0x626C7773UL, /**< 'blws' */
LE_CALT_FEATURE_TAG = 0x63616C74UL, /**< 'calt' */ LE_CALT_FEATURE_TAG = 0x63616C74UL, /**< 'calt' */
LE_CASE_FEATURE_TAG = 0x63617365UL, /**< 'case' */ LE_CASE_FEATURE_TAG = 0x63617365UL, /**< 'case' */
LE_CCMP_FEATURE_TAG = 0x63636D70UL, /**< 'ccmp' */ LE_CCMP_FEATURE_TAG = 0x63636D70UL, /**< 'ccmp' */
LE_CJCT_FEATURE_TAG = 0x636A6374UL, /**< 'cjct' */ LE_CJCT_FEATURE_TAG = 0x636A6374UL, /**< 'cjct' */
LE_CLIG_FEATURE_TAG = 0x636C6967UL, /**< 'clig' */ LE_CLIG_FEATURE_TAG = 0x636C6967UL, /**< 'clig' */
LE_CPSP_FEATURE_TAG = 0x63707370UL, /**< 'cpsp' */ LE_CPSP_FEATURE_TAG = 0x63707370UL, /**< 'cpsp' */
LE_CSWH_FEATURE_TAG = 0x63737768UL, /**< 'cswh' */ LE_CSWH_FEATURE_TAG = 0x63737768UL, /**< 'cswh' */
LE_CURS_FEATURE_TAG = 0x63757273UL, /**< 'curs' */ LE_CURS_FEATURE_TAG = 0x63757273UL, /**< 'curs' */
LE_C2SC_FEATURE_TAG = 0x63327363UL, /**< 'c2sc' */ LE_C2SC_FEATURE_TAG = 0x63327363UL, /**< 'c2sc' */
LE_C2PC_FEATURE_TAG = 0x63327063UL, /**< 'c2pc' */ LE_C2PC_FEATURE_TAG = 0x63327063UL, /**< 'c2pc' */
LE_DIST_FEATURE_TAG = 0x64697374UL, /**< 'dist' */ LE_DIST_FEATURE_TAG = 0x64697374UL, /**< 'dist' */
LE_DLIG_FEATURE_TAG = 0x646C6967UL, /**< 'dlig' */ LE_DLIG_FEATURE_TAG = 0x646C6967UL, /**< 'dlig' */
LE_DNOM_FEATURE_TAG = 0x646E6F6DUL, /**< 'dnom' */ LE_DNOM_FEATURE_TAG = 0x646E6F6DUL, /**< 'dnom' */
LE_EXPT_FEATURE_TAG = 0x65787074UL, /**< 'expt' */ LE_EXPT_FEATURE_TAG = 0x65787074UL, /**< 'expt' */
skipping to change at line 514 skipping to change at line 514
LE_PNUM_FEATURE_TAG = 0x706E756DUL, /**< 'pnum' */ LE_PNUM_FEATURE_TAG = 0x706E756DUL, /**< 'pnum' */
LE_PREF_FEATURE_TAG = 0x70726566UL, /**< 'pref' */ LE_PREF_FEATURE_TAG = 0x70726566UL, /**< 'pref' */
LE_PRES_FEATURE_TAG = 0x70726573UL, /**< 'pres' */ LE_PRES_FEATURE_TAG = 0x70726573UL, /**< 'pres' */
LE_PSTF_FEATURE_TAG = 0x70737466UL, /**< 'pstf' */ LE_PSTF_FEATURE_TAG = 0x70737466UL, /**< 'pstf' */
LE_PSTS_FEATURE_TAG = 0x70737473UL, /**< 'psts' */ LE_PSTS_FEATURE_TAG = 0x70737473UL, /**< 'psts' */
LE_PWID_FEATURE_TAG = 0x70776964UL, /**< 'pwid' */ LE_PWID_FEATURE_TAG = 0x70776964UL, /**< 'pwid' */
LE_QWID_FEATURE_TAG = 0x71776964UL, /**< 'qwid' */ LE_QWID_FEATURE_TAG = 0x71776964UL, /**< 'qwid' */
LE_RAND_FEATURE_TAG = 0x72616E64UL, /**< 'rand' */ LE_RAND_FEATURE_TAG = 0x72616E64UL, /**< 'rand' */
LE_RLIG_FEATURE_TAG = 0x726C6967UL, /**< 'rlig' */ LE_RLIG_FEATURE_TAG = 0x726C6967UL, /**< 'rlig' */
LE_RPHF_FEATURE_TAG = 0x72706866UL, /**< 'rphf' */ LE_RPHF_FEATURE_TAG = 0x72706866UL, /**< 'rphf' */
LE_RKRF_FEATURE_TAG = 0x726B7266UL, /**< 'rkrf' */ LE_RKRF_FEATURE_TAG = 0x726B7266UL, /**< 'rkrf' */
LE_RTBD_FEATURE_TAG = 0x72746264UL, /**< 'rtbd' */ LE_RTBD_FEATURE_TAG = 0x72746264UL, /**< 'rtbd' */
LE_RTLA_FEATURE_TAG = 0x72746C61UL, /**< 'rtla' */ LE_RTLA_FEATURE_TAG = 0x72746C61UL, /**< 'rtla' */
LE_RUBY_FEATURE_TAG = 0x72756279UL, /**< 'ruby' */ LE_RUBY_FEATURE_TAG = 0x72756279UL, /**< 'ruby' */
LE_SALT_FEATURE_TAG = 0x73616C74UL, /**< 'salt' */ LE_SALT_FEATURE_TAG = 0x73616C74UL, /**< 'salt' */
LE_SINF_FEATURE_TAG = 0x73696E66UL, /**< 'sinf' */ LE_SINF_FEATURE_TAG = 0x73696E66UL, /**< 'sinf' */
LE_SIZE_FEATURE_TAG = 0x73697A65UL, /**< 'size' */ LE_SIZE_FEATURE_TAG = 0x73697A65UL, /**< 'size' */
LE_SMCP_FEATURE_TAG = 0x736D6370UL, /**< 'smcp' */ LE_SMCP_FEATURE_TAG = 0x736D6370UL, /**< 'smcp' */
LE_SMPL_FEATURE_TAG = 0x736D706CUL, /**< 'smpl' */ LE_SMPL_FEATURE_TAG = 0x736D706CUL, /**< 'smpl' */
LE_SS01_FEATURE_TAG = 0x73733031UL, /**< 'ss01' */ LE_SS01_FEATURE_TAG = 0x73733031UL, /**< 'ss01' */
LE_SS02_FEATURE_TAG = 0x73733032UL, /**< 'ss02' */ LE_SS02_FEATURE_TAG = 0x73733032UL, /**< 'ss02' */
skipping to change at line 566 skipping to change at line 566
LE_VHAL_FEATURE_TAG = 0x7668616CUL, /**< 'vhal' */ LE_VHAL_FEATURE_TAG = 0x7668616CUL, /**< 'vhal' */
LE_VJMO_FEATURE_TAG = 0x766A6D6FUL, /**< 'vjmo' */ LE_VJMO_FEATURE_TAG = 0x766A6D6FUL, /**< 'vjmo' */
LE_VKNA_FEATURE_TAG = 0x766B6E61UL, /**< 'vkna' */ LE_VKNA_FEATURE_TAG = 0x766B6E61UL, /**< 'vkna' */
LE_VKRN_FEATURE_TAG = 0x766B726EUL, /**< 'vkrn' */ LE_VKRN_FEATURE_TAG = 0x766B726EUL, /**< 'vkrn' */
LE_VPAL_FEATURE_TAG = 0x7670616CUL, /**< 'vpal' */ LE_VPAL_FEATURE_TAG = 0x7670616CUL, /**< 'vpal' */
LE_VRT2_FEATURE_TAG = 0x76727432UL, /**< 'vrt2' */ LE_VRT2_FEATURE_TAG = 0x76727432UL, /**< 'vrt2' */
LE_ZERO_FEATURE_TAG = 0x7A65726FUL /**< 'zero' */ LE_ZERO_FEATURE_TAG = 0x7A65726FUL /**< 'zero' */
}; };
/** /**
* @internal
*/
enum LEFeatureENUMs {
LE_Kerning_FEATURE_ENUM = 0, /**< Requests Kerning. Formerly LayoutEngi
ne::kTypoFlagKern */
LE_Ligatures_FEATURE_ENUM = 1, /**< Requests Ligatures. Formerly LayoutEn
gine::kTypoFlagLiga */
LE_CLIG_FEATURE_ENUM, /**< Feature specific enum */
LE_DLIG_FEATURE_ENUM, /**< Feature specific enum */
LE_HLIG_FEATURE_ENUM, /**< Feature specific enum */
LE_LIGA_FEATURE_ENUM, /**< Feature specific enum */
LE_RLIG_FEATURE_ENUM, /**< Feature specific enum */
LE_SMCP_FEATURE_ENUM, /**< Feature specific enum */
LE_FRAC_FEATURE_ENUM, /**< Feature specific enum */
LE_AFRC_FEATURE_ENUM, /**< Feature specific enum */
LE_ZERO_FEATURE_ENUM, /**< Feature specific enum */
LE_SWSH_FEATURE_ENUM, /**< Feature specific enum */
LE_CSWH_FEATURE_ENUM, /**< Feature specific enum */
LE_SALT_FEATURE_ENUM, /**< Feature specific enum */
LE_NALT_FEATURE_ENUM, /**< Feature specific enum */
LE_RUBY_FEATURE_ENUM, /**< Feature specific enum */
LE_SS01_FEATURE_ENUM, /**< Feature specific enum */
LE_SS02_FEATURE_ENUM, /**< Feature specific enum */
LE_SS03_FEATURE_ENUM, /**< Feature specific enum */
LE_SS04_FEATURE_ENUM, /**< Feature specific enum */
LE_SS05_FEATURE_ENUM, /**< Feature specific enum */
LE_SS06_FEATURE_ENUM, /**< Feature specific enum */
LE_SS07_FEATURE_ENUM, /**< Feature specific enum */
LE_CHAR_FILTER_FEATURE_ENUM = 31, /**< Apply CharSubstitutionFilter */
LE_FEATURE_ENUM_MAX = LE_CHAR_FILTER_FEATURE_ENUM
};
/**
* Flags for typographic features.
* @internal
* @{
*/
#define LE_Kerning_FEATURE_FLAG (1 << LE_Kerning_FEATURE_ENUM)
#define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM)
#define LE_CLIG_FEATURE_FLAG (1 << LE_CLIG_FEATURE_ENUM)
#define LE_DLIG_FEATURE_FLAG (1 << LE_DLIG_FEATURE_ENUM)
#define LE_HLIG_FEATURE_FLAG (1 << LE_HLIG_FEATURE_ENUM)
#define LE_LIGA_FEATURE_FLAG (1 << LE_LIGA_FEATURE_ENUM)
#define LE_RLIG_FEATURE_FLAG (1 << LE_RLIG_FEATURE_ENUM)
#define LE_SMCP_FEATURE_FLAG (1 << LE_SMCP_FEATURE_ENUM)
#define LE_FRAC_FEATURE_FLAG (1 << LE_FRAC_FEATURE_ENUM)
#define LE_AFRC_FEATURE_FLAG (1 << LE_AFRC_FEATURE_ENUM)
#define LE_ZERO_FEATURE_FLAG (1 << LE_ZERO_FEATURE_ENUM)
#define LE_SWSH_FEATURE_FLAG (1 << LE_SWSH_FEATURE_ENUM)
#define LE_CSWH_FEATURE_FLAG (1 << LE_CSWH_FEATURE_ENUM)
#define LE_SALT_FEATURE_FLAG (1 << LE_SALT_FEATURE_ENUM)
#define LE_NALT_FEATURE_FLAG (1 << LE_NALT_FEATURE_ENUM)
#define LE_RUBY_FEATURE_FLAG (1 << LE_RUBY_FEATURE_ENUM)
#define LE_SS01_FEATURE_FLAG (1 << LE_SS01_FEATURE_ENUM)
#define LE_SS02_FEATURE_FLAG (1 << LE_SS02_FEATURE_ENUM)
#define LE_SS03_FEATURE_FLAG (1 << LE_SS03_FEATURE_ENUM)
#define LE_SS04_FEATURE_FLAG (1 << LE_SS04_FEATURE_ENUM)
#define LE_SS05_FEATURE_FLAG (1 << LE_SS05_FEATURE_ENUM)
#define LE_SS06_FEATURE_FLAG (1 << LE_SS06_FEATURE_ENUM)
#define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM)
#define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM)
/**
* @}
*/
/**
* Error codes returned by the LayoutEngine. * Error codes returned by the LayoutEngine.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
enum LEErrorCode { enum LEErrorCode {
/* informational */ /* informational */
LE_NO_SUBFONT_WARNING = U_USING_DEFAULT_WARNING, /**< The font does not contain subfonts. */ LE_NO_SUBFONT_WARNING = U_USING_DEFAULT_WARNING, /**< The font does not contain subfonts. */
/* success */ /* success */
LE_NO_ERROR = U_ZERO_ERROR, /**< No error, no warni ng. */ LE_NO_ERROR = U_ZERO_ERROR, /**< No error, no warni ng. */
 End of changes. 4 change blocks. 
3 lines changed or deleted 71 lines changed or added


 LayoutEngine.h   LayoutEngine.h 
/* /*
* (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
*/ */
#ifndef __LAYOUTENGINE_H #ifndef __LAYOUTENGINE_H
#define __LAYOUTENGINE_H #define __LAYOUTENGINE_H
#include "LETypes.h" #include "LETypes.h"
/** /**
* \file * \file
* \brief C++ API: Virtual base class for complex text layout. * \brief C++ API: Virtual base class for complex text layout.
skipping to change at line 67 skipping to change at line 67
* 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 #ifndef U_HIDE_INTERNAL_API
/** @internal Flag to request kerning. */ /** @internal Flag to request kerning. Use LE_Kerning_FEATURE_FLAG inst ead. */
static const le_int32 kTypoFlagKern; static const le_int32 kTypoFlagKern;
/** @internal Flag to request ligatures. */ /** @internal Flag to request ligatures. Use LE_Ligatures_FEATURE_FLAG instead. */
static const le_int32 kTypoFlagLiga; static const le_int32 kTypoFlagLiga;
#endif /* U_HIDE_INTERNAL_API */ #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;
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 alphaindex.h   alphaindex.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2011-2012 International Business Machines * Copyright (C) 2011-2013 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"
skipping to change at line 72 skipping to change at line 72
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 BucketList;
class Collator; class Collator;
class RuleBasedCollator; class RuleBasedCollator;
class StringEnumeration; class StringEnumeration;
class UnicodeSet; class UnicodeSet;
class UVector; class UVector;
/** /**
* class AlphabeticIndex supports the creation of a UI index appropriate fo * AlphabeticIndex supports the creation of a UI index appropriate for a gi
r a given language, such as: ven language.
* It can support either direct use, or use with a client that doesn't supp
ort localized collation.
* The following is an example of what an index might look like in a UI:
* *
* <pre> * <pre>
* <b>... A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \\u00C6 \\u0 0D8 \\u00C5 ...</b> * <b>... A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ...</b>
* *
* <b>A</b> * <b>A</b>
* Addison * Addison
* Albertson * Albertson
* Azensky * Azensky
* <b>B</b> * <b>B</b>
* Baker * Baker
* ... * ...
* </pre> * </pre>
* *
skipping to change at line 106 skipping to change at line 109
* the target list, where everything in the bucket is greater than or equal to the character * the target list, where everything in the bucket is greater than or equal to the character
* (according to the locale's collation). Strings can be added to the index ; * (according to the locale's collation). Strings can be added to the index ;
* they will be in sorted order in the right bucket. * they will be in sorted order in the right bucket.
* <p> * <p>
* The class also supports having buckets for strings before the first (und erflow), * The class also supports having buckets for strings before the first (und erflow),
* after the last (overflow), and between scripts (inflow). For example, if the index * after the last (overflow), and between scripts (inflow). For example, if the index
* is constructed with labels for Russian and English, Greek characters wou ld fall * is constructed with labels for Russian and English, Greek characters wou ld fall
* into an inflow bucket between the other two scripts. * into an inflow bucket between the other two scripts.
* <p> * <p>
* The AlphabeticIndex class is not intended for public subclassing. * The AlphabeticIndex class is not intended for public subclassing.
* <p> *
* <i>Example</i> * <p><em>Note:</em> If you expect to have a lot of ASCII or Latin characte
* <p> rs
* The "show..." methods below are just to illustrate usage. * as well as characters from the user's language,
* then it is a good idea to call addLabels(Locale::getEnglish(), status).<
/p>
*
* <h2>Direct Use</h2>
* <p>The following shows an example of building an index directly.
* The "show..." methods below are just to illustrate usage.
* *
* <pre> * <pre>
* // Create a simple index. "Item" is assumed to be an application * // Create a simple index. "Item" is assumed to be an application
* // defined type that the application's UI and other processing knows abo ut, * // defined type that the application's UI and other processing knows abo ut,
* // and that has a name. * // and that has a name.
* *
* UErrorCode status = U_ZERO_ERROR; * UErrorCode status = U_ZERO_ERROR;
* AlphabeticIndex index = new AlphabeticIndex(desiredLocale, status); * AlphabeticIndex index = new AlphabeticIndex(desiredLocale, status);
* index->addLabels(additionalLocale, status); * index->addLabels(additionalLocale, status);
* for (Item *item in some source of Items ) { * for (Item *item in some source of Items ) {
skipping to change at line 149 skipping to change at line 156
* </pre> * </pre>
* *
* The caller can build different UIs using this class. * The caller can build different UIs using this class.
* For example, an index character could be omitted or grayed-out * For example, an index character could be omitted or grayed-out
* if its bucket is empty. Small buckets could also be combined based on si ze, such as: * if its bucket is empty. Small buckets could also be combined based on si ze, such as:
* *
* <pre> * <pre>
* <b>... A-F G-N O-Z ...</b> * <b>... A-F G-N O-Z ...</b>
* </pre> * </pre>
* *
* <p> * <h2>Client Support</h2>
* <b>Notes:</b> * <p>Callers can also use the AlphabeticIndex::ImmutableIndex, or the Alph
abeticIndex itself,
* to support sorting on a client that doesn't support AlphabeticIndex func
tionality.
*
* <p>The ImmutableIndex is both immutable and thread-safe.
* The corresponding AlphabeticIndex methods are not thread-safe because
* they "lazily" build the index buckets.
* <ul> * <ul>
* <li>Additional collation parameters can be passed in as part of the loca * <li>ImmutableIndex.getBucket(index) provides random access to all
le name. * buckets and their labels and label types.
* For example, German plus numeric * <li>The AlphabeticIndex bucket iterator or ImmutableIndex.getBucket(0..g
* sorting would be "de@kn-true". etBucketCount-1)
* can be used to get a list of the labels,
* such as "...", "A", "B",..., and send that list to the client.
* <li>When the client has a new name, it sends that name to the server.
* The server needs to call the following methods,
* and communicate the bucketIndex and collationKey back to the client.
*
* <pre>
* int32_t bucketIndex = index.getBucketIndex(name, status);
* const UnicodeString &label = immutableIndex.getBucket(bucketIndex)->getL
abel(); // optional
* int32_t skLength = collator.getSortKey(name, sk, skCapacity);
* </pre>
*
* <li>The client would put the name (and associated information) into its
bucket for bucketIndex. The sort key sk is a
* sequence of bytes that can be compared with a binary compare, and produc
e the right localized result.</li>
* </ul> * </ul>
* *
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
class U_I18N_API AlphabeticIndex: public UObject { class U_I18N_API AlphabeticIndex: public UObject {
public:
#ifdef U_HIDE_DRAFT_API
class Bucket;
#else
/**
* An index "bucket" with a label string and type.
* It is referenced by getBucketIndex(),
* and returned by ImmutableIndex.getBucket().
*
* The Bucket class is not intended for public subclassing.
* @draft ICU 51
*/
class U_I18N_API Bucket : public UObject {
public:
/**
* Destructor.
* @draft ICU 51
*/
virtual ~Bucket();
/**
* Returns the label string.
*
* @return the label string for the bucket
* @draft ICU 51
*/
const UnicodeString &getLabel() const { return label_; }
/**
* Returns whether this bucket is a normal, underflow, overflow, or
inflow bucket.
*
* @return the bucket label type
* @draft ICU 51
*/
UAlphabeticIndexLabelType getLabelType() const { return labelType_;
}
private:
friend class AlphabeticIndex;
friend class BucketList;
UnicodeString label_;
UnicodeString lowerBoundary_;
UAlphabeticIndexLabelType labelType_;
Bucket *displayBucket_;
int32_t displayIndex_;
UVector *records_; // Records are owned by the inputList_ vector.
Bucket(const UnicodeString &label, // Parameter strings are copie
d.
const UnicodeString &lowerBoundary,
UAlphabeticIndexLabelType type);
};
public: /**
* Immutable, thread-safe version of AlphabeticIndex.
* This class provides thread-safe methods for bucketing,
* and random access to buckets and their properties,
* but does not offer adding records to the index.
*
* The ImmutableIndex class is not intended for public subclassing.
*
* @draft ICU 51
*/
class U_I18N_API ImmutableIndex : public UObject {
public:
/**
* Destructor.
* @draft ICU 51
*/
virtual ~ImmutableIndex();
/**
* Returns the number of index buckets and labels, including underf
low/inflow/overflow.
*
* @return the number of index buckets
* @draft ICU 51
*/
int32_t getBucketCount() const;
/**
* Finds the index bucket for the given name and returns the number
of that bucket.
* Use getBucket() to get the bucket's properties.
*
* @param name the string to be sorted into an index bucket
* @return the bucket number for the name
* @draft ICU 51
*/
int32_t getBucketIndex(const UnicodeString &name, UErrorCode &error
Code) const;
/**
* Returns the index-th bucket. Returns NULL if the index is out of
range.
*
* @param index bucket number
* @return the index-th bucket
* @draft ICU 51
*/
const Bucket *getBucket(int32_t index) const;
private:
friend class AlphabeticIndex;
ImmutableIndex(BucketList *bucketList, Collator *collatorPrimaryOnl
y)
: buckets_(bucketList), collatorPrimaryOnly_(collatorPrimar
yOnly) {}
BucketList *buckets_;
Collator *collatorPrimaryOnly_;
};
#endif /* U_HIDE_DRAFT_API */
/** /**
* 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.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
AlphabeticIndex(const Locale &locale, UErrorCode &status); AlphabeticIndex(const Locale &locale, UErrorCode &status);
#ifndef U_HIDE_DRAFT_API
/**
* Construct an AlphabeticIndex that uses a specific collator.
*
* The index will be created with no labels; the addLabels() function m
ust be called
* after creation to add the desired labels to the index.
*
* The index adopts the collator, and is responsible for deleting it.
* The caller should make no further use of the collator after creating
the index.
*
* @param collator The collator to use to order the contents of this in
dex.
* @param status Error code, will be set with the reason if the
* operation fails.
* @draft ICU 51
*/
AlphabeticIndex(RuleBasedCollator *collator, UErrorCode &status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* 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
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &addLabels(const UnicodeSet &additions, UError Code &status); virtual AlphabeticIndex &addLabels(const UnicodeSet &additions, UErrorC ode &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
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
virtual AlphabeticIndex &addLabels(const Locale &locale, UErrorCode &s tatus); virtual AlphabeticIndex &addLabels(const Locale &locale, UErrorCode &st atus);
/** /**
* Destructor * Destructor
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
virtual ~AlphabeticIndex(); virtual ~AlphabeticIndex();
#ifndef U_HIDE_DRAFT_API
/**
* Builds an immutable, thread-safe version of this instance, without d
ata records.
*
* @return an immutable index instance
* @draft ICU 51
*/
ImmutableIndex *buildImmutableIndex(UErrorCode &errorCode);
#endif /* U_HIDE_DRAFT_API */
/** /**
* 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.
* *
skipping to change at line 312 skipping to change at line 469
* 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
* @stable 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;
* 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
* after lowerLimit. Thus in X Y Z ... <i>Devanagari-ka</i>, the overfl
ow character for Z
* would be the <i>Greek-alpha</i>.
*
* @param lowerLimit The character below the overflow (or inflow) buc
ket
* @param status error code
* @return string that defines top of the overflow buck for lowerLimit,
or an empty string if there is none
* @internal
*/
virtual const UnicodeString &getOverflowComparisonString(const UnicodeS
tring &lowerLimit,
UErrorCode &st
atus);
/**
* Add a record to the index. Each record will be associated with an i ndex Bucket * Add a record to the index. Each record will be associated with an i ndex Bucket
* based on the record's name. The list of records for each bucket wi ll be sorted * based on the record's name. The list of records for each bucket wi ll be sorted
* based on the collation ordering of the names in the index's locale. * based on the collation ordering of the names in the index's locale.
* 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
skipping to change at line 490 skipping to change at line 632
/** /**
* 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.
* @stable 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.
virtual UClassID getDynamicClassID() const;
/** /**
* No Copy constructor. * No Copy constructor.
* @internal * @internal
*/ */
AlphabeticIndex(const AlphabeticIndex &other); AlphabeticIndex(const AlphabeticIndex &other);
/** /**
* No assignment. * No assignment.
*/ */
AlphabeticIndex &operator =(const AlphabeticIndex & /*other*/) { retur n *this;}; AlphabeticIndex &operator =(const AlphabeticIndex & /*other*/) { retur n *this;};
skipping to change at line 517 skipping to change at line 656
*/ */
virtual UBool operator==(const AlphabeticIndex& other) const; virtual UBool operator==(const AlphabeticIndex& other) const;
/** /**
* Inequality operator. * Inequality operator.
* @internal * @internal
*/ */
virtual UBool operator!=(const AlphabeticIndex& other) const; virtual UBool operator!=(const AlphabeticIndex& other) const;
// Common initialization, for use from all constructors. // Common initialization, for use from all constructors.
void init(UErrorCode &status); void init(const Locale *locale, UErrorCode &status);
// Initialize & destruct static constants used by this class.
static void staticInit(UErrorCode &status);
// 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 initPinyinBounds(const Collator *coll, UErrorCode &status);
public:
#ifndef U_HIDE_INTERNAL_API
/**
* Delete all shared (static) data associated with an AlphabeticInde
x.
* Internal function, not intended for direct use.
* @internal.
*/
static void staticCleanup();
#endif /* U_HIDE_INTERNAL_API */
private:
// Add index characters from the specified locale to the dest set. /**
// Does not remove any previous contents from dest. * This method is called to get the index exemplars. Normally these com
static void getIndexExemplars(UnicodeSet &dest, const Locale &locale, e from the locale directly,
UErrorCode &status); * but if they aren't available, we have to synthesize them.
*/
UVector *firstStringsInScript(UErrorCode &status); void addIndexExemplars(const Locale &locale, UErrorCode &status);
/**
* Add Chinese index characters from the tailoring.
*/
UBool addChineseIndexCharacters(UErrorCode &errorCode);
static UnicodeString separated(const UnicodeString &item); UVector *firstStringsInScript(UErrorCode &status);
static UnicodeSet *getScriptSet(UnicodeSet &dest, const UnicodeString &codePoint, UErrorCode &status); static UnicodeString separated(const UnicodeString &item);
void buildIndex(UErrorCode &status); /**
void buildBucketList(UErrorCode &status); * Determine the best labels to use.
void bucketRecords(UErrorCode &status); * This is based on the exemplars, but we also process to make sure tha
t they are unique,
* and sort differently, and that the overall list is small enough.
*/
void initLabels(UVector &indexCharacters, UErrorCode &errorCode) const;
BucketList *createBucketList(UErrorCode &errorCode) const;
void initBuckets(UErrorCode &errorCode);
void clearBuckets();
void internalResetBucketIterator();
public: public:
// The following internal items are declared public only to allow acce // The Record is declared public only to allow access from
ss from // implementation code written in plain C.
// implementation code written in plain C. They are not intended for // It is not intended for public use.
// public use.
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
/** /**
* A record, or item, in the index. * A (name, data) pair, to be sorted by name into one of the index buck
ets.
* The user data is not used by the index implementation.
* @internal * @internal
*/ */
struct Record: public UMemory { struct Record: public UMemory {
AlphabeticIndex *alphaIndex_; const UnicodeString name_;
const UnicodeString name_; const void *data_;
UnicodeString sortingName_; // Usually the same as name_; Record(const UnicodeString &name, const void *data);
different for Pinyin. ~Record();
const void *data_; };
int32_t serialNumber_; // Defines sorting order for
names that compare equal.
Record(AlphabeticIndex *alphaIndex, const UnicodeString &name, con
st void *data);
~Record();
};
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
/** private:
* Holds all user records before they are distributed into buckets.
* Type of contents is (Record *)
* @internal
*/
UVector *inputRecords_;
/** /**
* A Bucket holds an index label and references to everything belongin * Holds all user records before they are distributed into buckets.
g to that label. * Type of contents is (Record *)
* For implementation use only. Declared public because pure C implem * @internal
entation code needs access. */
* @internal UVector *inputList_;
*/
struct Bucket: public UMemory {
UnicodeString label_;
UnicodeString lowerBoundary_;
UAlphabeticIndexLabelType labelType_;
UVector *records_; // Records are owned by inputRecords_
vector.
Bucket(const UnicodeString &label, // Parameter strings are copi
ed.
const UnicodeString &lowerBoundary,
UAlphabeticIndexLabelType type, UErrorCode &status);
~Bucket();
};
public: int32_t labelsIterIndex_; // Index of next item to return.
int32_t itemsIterIndex_;
Bucket *currentBucket_; // While an iteration of the index in
underway,
// point to the bucket for the curr
ent label.
// NULL when no iteration underway.
/** int32_t maxLabelCount_; // Limit on # of labels permitted in
* Language Types. For internal ICU use only. the index.
* @internal (but not hidden with U_HIDE_INTERNAL_API because it is us
ed in public API)
*/
enum ELangType {
/** @internal */
kNormal,
/** @internal */
kSimplified,
/** @internal */
kTraditional
};
/** UnicodeSet *initialLabels_; // Initial (unprocessed) set of Label
* Get the Language Type for this Index. Based on the locale. s. Union
* @internal // of those explicitly set by the u
*/ ser plus
static ELangType langTypeFromLocale(const Locale &loc); // those from locales. Raw values,
before
// crunching into bucket labels.
UVector *firstCharsInScripts_; // The first character from each scri
pt,
// in collation order.
RuleBasedCollator *collator_;
RuleBasedCollator *collatorPrimaryOnly_;
private: // Lazy evaluated: null means that we have not built yet.
BucketList *buckets_;
// Holds the contents of this index, buckets of user items. UnicodeString inflowLabel_;
// UVector elements are of type (Bucket *) UnicodeString overflowLabel_;
UVector *bucketList_; UnicodeString underflowLabel_;
UnicodeString overflowComparisonString_;
int32_t labelsIterIndex_; // Index of next item to return.
int32_t itemsIterIndex_;
Bucket *currentBucket_; // While an iteration of the index in
underway,
// point to the bucket for the curre
nt label.
// NULL when no iteration underway.
UBool indexBuildRequired_; // Caller has made changes to the ind
ex that
// require rebuilding & bucketing bef
ore the
// contents can be iterated.
int32_t maxLabelCount_; // Limit on # of labels permitted in t
he index.
UHashtable *alreadyIn_; // Key=UnicodeString, value=UnicodeSet
UnicodeSet *initialLabels_; // Initial (unprocessed) set of Labels
. Union
// of those explicitly set by the us
er plus
// those from locales. Raw values,
before
// crunching into bucket labels.
UVector *labels_; // List of Labels, after processing, s
orting.
// Contents are (UnicodeString *)
UnicodeSet *noDistinctSorting_; // As the set of labels is built, stri
ngs may
// be discarded from the exemplars. Th
is contains
// some of the discards, and is
// intended for debugging.
UnicodeSet *notAlphabetic_; // As the set of labels is built, stri
ngs may
// be discarded from the exemplars. Th
is contains
// some of the discards, and is
// intended for debugging.
UVector *firstScriptCharacters_; // The first character from each
script,
// in collation order.
Locale locale_;
Collator *collator_;
Collator *collatorPrimaryOnly_;
UnicodeString inflowLabel_;
UnicodeString overflowLabel_;
UnicodeString underflowLabel_;
UnicodeString overflowComparisonString_;
ELangType langType_; // The language type, simplified Chin
ese, Traditional Chinese,
// or not Chinese (Normal). Part of
the Pinyin support
typedef const UChar PinyinLookup[24][3];
static PinyinLookup HACK_PINYIN_LOOKUP_SHORT;
static PinyinLookup HACK_PINYIN_LOOKUP_LONG;
// These will be lazily set to the short or long tables based on which
// Chinese collation has been configured into the ICU library.
static PinyinLookup *HACK_PINYIN_LOOKUP;
static const UChar *PINYIN_LOWER_BOUNDS;
int32_t recordCounter_; // Counts Records created. For min
ting record serial numbers.
// Constants. Lazily initialized the first time an AlphabeticIndex object
is created.
static UnicodeSet *ALPHABETIC;
static UnicodeSet *CORE_LATIN;
static UnicodeSet *ETHIOPIC;
static UnicodeSet *HANGUL;
static UnicodeSet *IGNORE_SCRIPTS;
static UnicodeSet *TO_TRY;
static UnicodeSet *UNIHAN;
static const UnicodeString *EMPTY_STRING;
UnicodeString emptyString_;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* UCONFIG_NO_COLLATION / UCONFIG_NO_NORMALIZATION */ #endif /* UCONFIG_NO_COLLATION / UCONFIG_NO_NORMALIZATION */
#endif #endif
 End of changes. 33 change blocks. 
232 lines changed or deleted 271 lines changed or added


 appendable.h   appendable.h 
skipping to change at line 143 skipping to change at line 143
* @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
* @stable 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:
// No ICU "poor man's RTTI" for this class nor its subclasses.
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.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
class U_COMMON_API UnicodeStringAppendable : public Appendable { class U_COMMON_API UnicodeStringAppendable : public Appendable {
public: public:
 End of changes. 1 change blocks. 
4 lines changed or deleted 0 lines changed or added


 basictz.h   basictz.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2011, International Business Machines Corporation and * Copyright (C) 2007-2013, 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 50 skipping to change at line 50
virtual ~BasicTimeZone(); virtual ~BasicTimeZone();
/** /**
* Gets the first time zone transition after the base time. * Gets the first time zone transition after the base time.
* @param base The base time. * @param base The base time.
* @param inclusive Whether the base time is inclusive or not. * @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time. * @param result Receives the first transition after the base time.
* @return TRUE if the transition is found. * @return TRUE if the transition is found.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTr ansition& result) /*const*/ = 0; virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTr ansition& result) const = 0;
/** /**
* Gets the most recent time zone transition before the base time. * Gets the most recent time zone transition before the base time.
* @param base The base time. * @param base The base time.
* @param inclusive Whether the base time is inclusive or not. * @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time. * @param result Receives the most recent transition before the base time.
* @return TRUE if the transition is found. * @return TRUE if the transition is found.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZo neTransition& result) /*const*/ = 0; virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZo neTransition& result) const = 0;
/** /**
* Checks if the time zone has equivalent transitions in the time range . * Checks if the time zone has equivalent transitions in the time range .
* This method returns true when all of transition times, from/to stand ard * This method returns true when all of transition times, from/to stand ard
* offsets and DST savings used by this time zone match the other in th e * offsets and DST savings used by this time zone match the other in th e
* time range. * time range.
* @param tz The <code>BasicTimeZone</code> object to be compared wi th. * @param tz The <code>BasicTimeZone</code> object to be compared wi th.
* @param start The start time of the evaluated time range (inclusive) * @param start The start time of the evaluated time range (inclusive)
* @param end The end time of the evaluated time range (inclusive) * @param end The end time of the evaluated time range (inclusive)
* @param ignoreDstAmount * @param ignoreDstAmount
skipping to change at line 82 skipping to change at line 82
* changes will be ignored, except either of them is zero. * changes will be ignored, except either of them is zero.
* For example, a transition from rawoffset 3:00/dstsaving s 1:00 * For example, a transition from rawoffset 3:00/dstsaving s 1:00
* to rawoffset 2:00/dstsavings 2:00 is excluded from the comparison, * to rawoffset 2:00/dstsavings 2:00 is excluded from the comparison,
* but a transtion from rawoffset 2:00/dstsavings 1:00 to * but a transtion from rawoffset 2:00/dstsavings 1:00 to
* rawoffset 3:00/dstsavings 0:00 is included. * rawoffset 3:00/dstsavings 0:00 is included.
* @param ec Output param to filled in with a success or an error. * @param ec Output param to filled in with a success or an error.
* @return true if the other time zone has the equivalent transiti ons in the * @return true if the other time zone has the equivalent transiti ons in the
* time range. * time range.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool hasEquivalentTransitions(/*const*/ BasicTimeZone& tz, UDa virtual UBool hasEquivalentTransitions(const BasicTimeZone& tz, UDate s
te start, UDate end, tart, UDate end,
UBool ignoreDstAmount, UErrorCode& ec) /*const*/; UBool ignoreDstAmount, UErrorCode& ec) const;
/** /**
* Returns the number of <code>TimeZoneRule</code>s which represents ti me transitions, * Returns the number of <code>TimeZoneRule</code>s which represents ti me transitions,
* for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except
* <code>InitialTimeZoneRule</code>. The return value range is 0 or an y positive value. * <code>InitialTimeZoneRule</code>. The return value range is 0 or an y positive value.
* @param status Receives error status code. * @param status Receives error status code.
* @return The number of <code>TimeZoneRule</code>s representing time t ransitions. * @return The number of <code>TimeZoneRule</code>s representing time t ransitions.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual int32_t countTransitionRules(UErrorCode& status) /*const*/ = 0; virtual int32_t countTransitionRules(UErrorCode& status) const = 0;
/** /**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZ oneRule</code> * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZ oneRule</code>
* which represent time transitions for this time zone. On successful return, * which represent time transitions for this time zone. On successful return,
* the argument initial points to non-NULL <code>InitialTimeZoneRule</c ode> and * the argument initial points to non-NULL <code>InitialTimeZoneRule</c ode> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</ code> * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</ code>
* instances up to the size specified by trscount. The results are ref erencing the * instances up to the size specified by trscount. The results are ref erencing the
* rule instance held by this time zone instance. Therefore, after thi s time zone * rule instance held by this time zone instance. Therefore, after thi s time zone
* is destructed, they are no longer available. * is destructed, they are no longer available.
* @param initial Receives the initial timezone rule * @param initial Receives the initial timezone rule
* @param trsrules Receives the timezone transition rules * @param trsrules Receives the timezone transition rules
* @param trscount On input, specify the size of the array 'transi tions' receiving * @param trscount On input, specify the size of the array 'transi tions' receiving
* the timezone transition rules. On output, actu al number of * the timezone transition rules. On output, actu al number of
* rules filled in the array will be set. * rules filled in the array will be set.
* @param status Receives error status code. * @param status Receives error status code.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& stat us) /*const*/ = 0; const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& stat us) const = 0;
/** /**
* Gets the set of time zone rules valid at the specified time. Some k nown external time zone * Gets the set of time zone rules valid at the specified time. Some k nown external time zone
* implementations are not capable to handle historic time zone rule ch anges. Also some * implementations are not capable to handle historic time zone rule ch anges. Also some
* implementations can only handle certain type of rule definitions. * implementations can only handle certain type of rule definitions.
* If this time zone does not use any daylight saving time within about 1 year from the specified * If this time zone does not use any daylight saving time within about 1 year from the specified
* time, only the <code>InitialTimeZone</code> is returned. Otherwise, the rule for standard * time, only the <code>InitialTimeZone</code> is returned. Otherwise, the rule for standard
* time and daylight saving time transitions are returned in addition t o the * time and daylight saving time transitions are returned in addition t o the
* <code>InitialTimeZoneRule</code>. The standard and daylight saving time transition rules are * <code>InitialTimeZoneRule</code>. The standard and daylight saving time transition rules are
* represented by <code>AnnualTimeZoneRule</code> with <code>DateTimeRu le::DOW</code> for its date * represented by <code>AnnualTimeZoneRule</code> with <code>DateTimeRu le::DOW</code> for its date
skipping to change at line 141 skipping to change at line 141
* @param std Receives the <code>AnnualTimeZoneRule</code> for st andard time transitions. * @param std Receives the <code>AnnualTimeZoneRule</code> for st andard time transitions.
* When this time time zone does not observe daylight saving times around the * When this time time zone does not observe daylight saving times around the
* 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 #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 */ #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 #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,
skipping to change at line 204 skipping to change at line 204
BasicTimeZone(const BasicTimeZone& source); BasicTimeZone(const BasicTimeZone& source);
/** /**
* Gets the set of TimeZoneRule instances applicable to the specified t ime and after. * Gets the set of TimeZoneRule instances applicable to the specified t ime and after.
* @param start The start date used for extracting time zone rules * @param start The start date used for extracting time zone rules
* @param initial Receives the InitialTimeZone, always not NULL * @param initial Receives the InitialTimeZone, always not NULL
* @param transitionRules Receives the transition rules, could be NUL L * @param transitionRules Receives the transition rules, could be NUL L
* @param status Receives error status code * @param status Receives error status code
*/ */
void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, UVector*& transitionRules, void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, UVector*& transitionRules,
UErrorCode& status) /*const*/; UErrorCode& status) const;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // BASICTZ_H #endif // BASICTZ_H
//eof //eof
 End of changes. 9 change blocks. 
11 lines changed or deleted 11 lines changed or added


 brkiter.h   brkiter.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, 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 184 skipping to change at line 184
/** /**
* Reset the break iterator to operate over the text represented by * Reset the break iterator to operate over the text represented by
* the UText. The iterator position is reset to the start. * the UText. The iterator position is reset to the start.
* *
* This function makes a shallow clone of the supplied UText. This mea ns * This function makes a shallow clone of the supplied UText. This mea ns
* that the caller is free to immediately close or otherwise reuse the * that the caller is free to immediately close or otherwise reuse the
* Utext that was passed as a parameter, but that the underlying text i tself * Utext that was passed as a parameter, but that the underlying text i tself
* must not be altered while being referenced by the break iterator. * must not be altered while being referenced by the break iterator.
* *
* All index positions returned by break iterator functions are
* native indices from the UText. For example, when breaking UTF-8
* encoded text, the break positions returned by next(), previous(), et
c.
* will be UTF-8 string indices, not UTF-16 positions.
*
* @param text The UText used to change the text. * @param text The UText used to change the text.
* @param status receives any error codes. * @param status receives any error codes.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
virtual void setText(UText *text, UErrorCode &status) = 0; virtual void setText(UText *text, UErrorCode &status) = 0;
/** /**
* Change the text over which this operates. The text boundary is * Change the text over which this operates. The text boundary is
* reset to the start. * reset to the start.
* Note that setText(UText *) provides similar functionality to this fu nction, * Note that setText(UText *) provides similar functionality to this fu nction,
skipping to change at line 543 skipping to change at line 548
* 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.
* @return *this * @return *this
* *
* @draft ICU 49 * @stable ICU 49
*/ */
virtual BreakIterator &refreshInputText(UText *input, UErrorCode &statu s) = 0; 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;
 End of changes. 3 change blocks. 
2 lines changed or deleted 8 lines changed or added


 calendar.h   calendar.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, 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 900 skipping to change at line 900
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 * Sets the behavior for handling wall time repeating multiple times
* at negative time zone offset transitions. For example, 1:30 AM on * at negative time zone offset transitions. For example, 1:30 AM on
* November 6, 2011 in US Eastern time (Ameirca/New_York) occurs twice; * 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> * 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 * 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 * (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 * interpreted as 1:30 AM EST (last occurrence). The default value is
* <code>UCAL_WALLTIME_LAST</code>. * <code>UCAL_WALLTIME_LAST</code>.
* <p> * <p>
* <b>Note:</b>When <code>UCAL_WALLTIME_NEXT_VALID</code> is not a vali d * <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> * 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 * nor <code>UCAL_WALLTIME_LAST</code>, this method has no effect and w ill keep
* the current setting. * the current setting.
* *
* @param option the behavior for handling repeating wall time, either * @param option the behavior for handling repeating wall time, either
* <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>. * <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>.
* @see #getRepeatedWallTimeOption * @see #getRepeatedWallTimeOption
* @draft ICU 49 * @stable ICU 49
*/ */
void setRepeatedWallTimeOption(UCalendarWallTimeOption option); void setRepeatedWallTimeOption(UCalendarWallTimeOption option);
/** /**
* Gets the behavior for handling wall time repeating multiple times * Gets the behavior for handling wall time repeating multiple times
* at negative time zone offset transitions. * at negative time zone offset transitions.
* *
* @return the behavior for handling repeating wall time, either * @return the behavior for handling repeating wall time, either
* <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>. * <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>.
* @see #setRepeatedWallTimeOption * @see #setRepeatedWallTimeOption
* @draft ICU 49 * @stable ICU 49
*/ */
UCalendarWallTimeOption getRepeatedWallTimeOption(void) const; UCalendarWallTimeOption getRepeatedWallTimeOption(void) const;
/** /**
* Sets the behavior for handling skipped wall time at positive time zo ne offset * 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) * 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 * 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 * <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> * 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 * is used, 2:30 AM is interpreted as 31 minutes after 1:59 AM EST, the refore, it will be
skipping to change at line 953 skipping to change at line 952
* <code>UCAL_WALLTIME_LAST</code>. * <code>UCAL_WALLTIME_LAST</code>.
* <p> * <p>
* <b>Note:</b>This option is effective only when this calendar is leni ent. * <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. * 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 * @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 * offset transitions, one of <code>UCAL_WALLTIME_FIRST</code>, <code>U CAL_WALLTIME_LAST</code> and
* <code>UCAL_WALLTIME_NEXT_VALID</code>. * <code>UCAL_WALLTIME_NEXT_VALID</code>.
* @see #getSkippedWallTimeOption * @see #getSkippedWallTimeOption
* *
* @draft ICU 49 * @stable ICU 49
*/ */
void setSkippedWallTimeOption(UCalendarWallTimeOption option); void setSkippedWallTimeOption(UCalendarWallTimeOption option);
/** /**
* Gets the behavior for handling skipped wall time at positive time zo ne offset * Gets the behavior for handling skipped wall time at positive time zo ne offset
* transitions. * transitions.
* *
* @return the behavior for handling skipped wall time, one of * @return the behavior for handling skipped wall time, one of
* <code>UCAL_WALLTIME_FIRST</code>, <code>UCAL_WALLTIME_LAST</code> * <code>UCAL_WALLTIME_FIRST</code>, <code>UCAL_WALLTIME_LAST</code>
* and <code>UCAL_WALLTIME_NEXT_VALID</code>. * and <code>UCAL_WALLTIME_NEXT_VALID</code>.
* @see #setSkippedWallTimeOption * @see #setSkippedWallTimeOption
* @draft ICU 49 * @stable ICU 49
*/ */
UCalendarWallTimeOption getSkippedWallTimeOption(void) const; UCalendarWallTimeOption getSkippedWallTimeOption(void) const;
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DEPRECATED_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 */ #endif /* U_HIDE_DEPRECATED_API */
skipping to change at line 1373 skipping to change at line 1371
* // deal with errors & overflow * // deal with errors & overflow
* } * }
* string lang(langTag, length); * string lang(langTag, length);
* size_t caPos = lang.find("-ca-"); * size_t caPos = lang.find("-ca-");
* lang.erase(0, caPos + 4); * lang.erase(0, caPos + 4);
* // lang now contains the LDML calendar type * // lang now contains the LDML calendar type
* } * }
* \endcode * \endcode
* *
* @return legacy calendar type name string * @return legacy calendar type name string
* @draft ICU 49 * @stable 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 1609 skipping to change at line 1607
* temporary calendar. * temporary calendar.
* @internal * @internal
*/ */
virtual void prepareGetActual(UCalendarDateFields field, UBool isMinimu m, UErrorCode &status); virtual void prepareGetActual(UCalendarDateFields field, UBool isMinimu m, UErrorCode &status);
/** /**
* Limit enums. Not in sync with UCalendarLimitType (refers to internal fields). * Limit enums. Not in sync with UCalendarLimitType (refers to internal fields).
* @internal * @internal
*/ */
enum ELimitType { enum ELimitType {
#ifndef U_HIDE_INTERNAL_API
UCAL_LIMIT_MINIMUM = 0, UCAL_LIMIT_MINIMUM = 0,
UCAL_LIMIT_GREATEST_MINIMUM, UCAL_LIMIT_GREATEST_MINIMUM,
UCAL_LIMIT_LEAST_MAXIMUM, UCAL_LIMIT_LEAST_MAXIMUM,
UCAL_LIMIT_MAXIMUM, UCAL_LIMIT_MAXIMUM,
UCAL_LIMIT_COUNT UCAL_LIMIT_COUNT
#endif /* U_HIDE_INTERNAL_API */
}; };
/** /**
* Subclass API for defining limits of different types. * Subclass API for defining limits of different types.
* Subclasses must implement this method to return limits for the * Subclasses must implement this method to return limits for the
* following fields: * following fields:
* *
* <pre>UCAL_ERA * <pre>UCAL_ERA
* UCAL_YEAR * UCAL_YEAR
* UCAL_MONTH * UCAL_MONTH
 End of changes. 10 change blocks. 
8 lines changed or deleted 8 lines changed or added


 dbbi.h   dbbi.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1999-2006 IBM Corp. All rights reserved. * Copyright (C) 1999-2006,2013 IBM Corp. All rights reserved.
********************************************************************** **********************************************************************
* Date Name Description * Date Name Description
* 12/1/99 rgillam Complete port from Java. * 12/1/99 rgillam Complete port from Java.
* 01/13/2000 helena Added UErrorCode to ctors. * 01/13/2000 helena Added UErrorCode to ctors.
********************************************************************** **********************************************************************
*/ */
#ifndef DBBI_H #ifndef DBBI_H
#define DBBI_H #define DBBI_H
skipping to change at line 25 skipping to change at line 25
#if !UCONFIG_NO_BREAK_ITERATION #if !UCONFIG_NO_BREAK_ITERATION
/** /**
* \file * \file
* \brief C++ API: Dictionary Based Break Iterator * \brief C++ API: Dictionary Based Break Iterator
*/ */
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
#ifndef U_HIDE_DEPRECATED_API
/** /**
* An obsolete subclass of RuleBasedBreakIterator. Handling of dictionary- * An obsolete subclass of RuleBasedBreakIterator. Handling of dictionary-
* based break iteration has been folded into the base class. This class * based break iteration has been folded into the base class. This class
* is deprecated as of ICU 3.6. * is deprecated as of ICU 3.6.
*/ */
#ifndef U_HIDE_DEPRECATED_API
typedef RuleBasedBreakIterator DictionaryBasedBreakIterator; typedef RuleBasedBreakIterator DictionaryBasedBreakIterator;
#endif #endif /* U_HIDE_DEPRECATED_API */
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ #endif /* #if !UCONFIG_NO_BREAK_ITERATION */
#endif #endif
 End of changes. 4 change blocks. 
5 lines changed or deleted 3 lines changed or added


 dcfmtsym.h   dcfmtsym.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, 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 403 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 444 skipping to change at line 442
} }
} }
// ------------------------------------- // -------------------------------------
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. 5 change blocks. 
5 lines changed or deleted 1 lines changed or added


 decimfmt.h   decimfmt.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, 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.
* 04/03/97 aliu Rewrote parsing and formatting completely, and * 04/03/97 aliu Rewrote parsing and formatting completely, and
* cleaned up and debugged. Actually works now. * cleaned up and debugged. Actually works now.
* 04/17/97 aliu Changed DigitCount to int per code review. * 04/17/97 aliu Changed DigitCount to int per code review.
* 07/10/97 helena Made ParsePosition a class and get rid of the f unction * 07/10/97 helena Made ParsePosition a class and get rid of the f unction
* hiding problems. * hiding problems.
* 09/09/97 aliu Ported over support for exponential formats. * 09/09/97 aliu Ported over support for exponential formats.
* 07/20/98 stephen Changed documentation * 07/20/98 stephen Changed documentation
* 01/30/13 emmons Added Scaling methods
*************************************************************************** ***** *************************************************************************** *****
*/ */
#ifndef DECIMFMT_H #ifndef DECIMFMT_H
#define DECIMFMT_H #define DECIMFMT_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: Formats decimal numbers. * \brief C++ API: Formats decimal numbers.
skipping to change at line 43 skipping to change at line 44
#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" #include "unicode/curramt.h"
#include "unicode/enumset.h" #include "unicode/enumset.h"
#ifndef U_HIDE_INTERNAL_API
/** /**
* \def UNUM_DECIMALFORMAT_INTERNAL_SIZE * \def UNUM_DECIMALFORMAT_INTERNAL_SIZE
* @internal * @internal
*/ */
#if UCONFIG_FORMAT_FASTPATHS_49 #if UCONFIG_FORMAT_FASTPATHS_49
#define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16 #define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16
#endif #endif
#endif /* U_HIDE_INTERNAL_API */
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 760 skipping to change at line 763
/** /**
* 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
*/ */
DecimalFormat( const UnicodeString& pattern, DecimalFormat( const UnicodeString& pattern,
DecimalFormatSymbols* symbolsToAdopt, DecimalFormatSymbols* symbolsToAdopt,
UNumberFormatStyle style, UNumberFormatStyle style,
UErrorCode& status); UErrorCode& status);
#if UCONFIG_HAVE_PARSEALLINPUT
/**
* @internal
*/
void setParseAllInput(UNumberFormatAttributeValue value);
#endif
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Set an integer attribute on this DecimalFormat. * Set an integer attribute on this DecimalFormat.
* May return U_UNSUPPORTED_ERROR if this instance does not support * May return U_UNSUPPORTED_ERROR if this instance does not support
* the specified attribute. * the specified attribute.
* @param attr the attribute to set * @param attr the attribute to set
* @param newvalue new value * @param newvalue new value
* @param status the error type * @param status the error type
* @return *this - for chaining * @return *this - for chaining (example: format.setAttribute(...).setA
* @internal ICU 50 ttribute(...) )
* @draft ICU 51
*/ */
virtual DecimalFormat& setAttribute( UNumberFormatAttribute attr, virtual DecimalFormat& setAttribute( UNumberFormatAttribute attr,
int32_t newvalue, int32_t newvalue,
UErrorCode &status); UErrorCode &status);
/** /**
* Get an integer * Get an integer
* May return U_UNSUPPORTED_ERROR if this instance does not support * May return U_UNSUPPORTED_ERROR if this instance does not support
* the specified attribute. * the specified attribute.
* @param attr the attribute to set * @param attr the attribute to set
* @param status the error type * @param status the error type
* @return the attribute value. Undefined if there is an error. * @return the attribute value. Undefined if there is an error.
* @internal ICU 50 * @draft ICU 51
*/ */
virtual int32_t getAttribute( UNumberFormatAttribute attr, virtual int32_t getAttribute( UNumberFormatAttribute attr,
UErrorCode &status) const; UErrorCode &status) const;
#if UCONFIG_HAVE_PARSEALLINPUT
/**
* @internal
*/
void setParseAllInput(UNumberFormatAttributeValue value);
#endif
#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
* a NumberFormat factory method. * a NumberFormat factory method.
skipping to change at line 1206 skipping to change at line 1209
* *
* @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 pos input-output position; on input, the position within tex t * @param pos input-output position; on input, the position within tex t
* to match; must have 0 <= pos.getIndex() < text.length(); * 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 outpu t. * If the parse fails, the position in unchanged upon outpu t.
* @return if parse succeeds, a pointer to a newly-created Currency Amount * @return if parse succeeds, a pointer to a newly-created Currency Amount
* object (owned by the caller) containing information abou t * object (owned by the caller) containing information abou t
* the parsed currency; if parse fails, this is NULL. * the parsed currency; if parse fails, this is NULL.
* @draft ICU 49 * @stable ICU 49
*/ */
virtual CurrencyAmount* parseCurrency(const UnicodeString& text, virtual CurrencyAmount* parseCurrency(const UnicodeString& text,
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
skipping to change at line 2226 skipping to change at line 2228
UnicodeString* fNegSuffixPattern; UnicodeString* fNegSuffixPattern;
/** /**
* Formatter for ChoiceFormat-based currency names. If this field * Formatter for ChoiceFormat-based currency names. If this field
* is not null, then delegate to it to format currency symbols. * is not null, then delegate to it to format currency symbols.
* @since ICU 2.6 * @since ICU 2.6
*/ */
ChoiceFormat* fCurrencyChoice; ChoiceFormat* fCurrencyChoice;
DigitList * fMultiplier; // NULL for multiplier of one DigitList * fMultiplier; // NULL for multiplier of one
int32_t fScale;
int32_t fGroupingSize; int32_t fGroupingSize;
int32_t fGroupingSize2; int32_t fGroupingSize2;
UBool fDecimalSeparatorAlwaysShown; UBool fDecimalSeparatorAlwaysShown;
DecimalFormatSymbols* fSymbols; DecimalFormatSymbols* fSymbols;
UBool fUseSignificantDigits; UBool fUseSignificantDigits;
int32_t fMinSignificantDigits; int32_t fMinSignificantDigits;
int32_t fMaxSignificantDigits; int32_t fMaxSignificantDigits;
UBool fUseExponentialNotation; UBool fUseExponentialNotation;
skipping to change at line 2367 skipping to change at line 2370
// Information needed for DecimalFormat to format/parse currency plural . // Information needed for DecimalFormat to format/parse currency plural .
CurrencyPluralInfo* fCurrencyPluralInfo; CurrencyPluralInfo* fCurrencyPluralInfo;
#if UCONFIG_HAVE_PARSEALLINPUT #if UCONFIG_HAVE_PARSEALLINPUT
UNumberFormatAttributeValue fParseAllInput; UNumberFormatAttributeValue fParseAllInput;
#endif #endif
protected: protected:
#ifndef U_HIDE_INTERNAL_API
/**
* Rounds a value according to the rules of this object.
* @internal
*/
DigitList& _round(const DigitList& number, DigitList& adjustedNum, UBoo
l& isNegative, UErrorCode& status) const;
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Returns the currency in effect for this formatter. Subclasses * Returns the currency in effect for this formatter. Subclasses
* should override this method as needed. Unlike getCurrency(), * should override this method as needed. Unlike getCurrency(),
* this method should never return "". * this method should never return "".
* @result output parameter for null-terminated result, which must * @result output parameter for null-terminated result, which must
* have a capacity of at least 4 * have a capacity of at least 4
* @internal * @internal
*/ */
virtual void getEffectiveCurrency(UChar* result, UErrorCode& ec) const; virtual void getEffectiveCurrency(UChar* result, UErrorCode& ec) const;
skipping to change at line 2436 skipping to change at line 2447
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. 15 change blocks. 
20 lines changed or deleted 30 lines changed or added


 dtfmtsym.h   dtfmtsym.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, 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 286 skipping to change at line 286
}; };
/** /**
* Selector for date formatting width * Selector for date formatting width
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
enum DtWidthType { enum DtWidthType {
ABBREVIATED, ABBREVIATED,
WIDE, WIDE,
NARROW, NARROW,
DT_WIDTH_COUNT #ifndef U_HIDE_DRAFT_API
/**
* Short width is currently only supported for weekday names.
* @draft ICU 51
*/
SHORT,
#endif /* U_HIDE_DRAFT_API */
/**
*/
DT_WIDTH_COUNT = 4
}; };
/** /**
* Gets month strings by width and context. For example: "January", "Fe bruary", etc. * Gets month strings by width and context. For example: "January", "Fe bruary", etc.
* @param count Filled in with length of the array. * @param count Filled in with length of the array.
* @param context The formatting context, either FORMAT or STANDALONE * @param context The formatting context, either FORMAT or STANDALONE
* @param width The width of returned strings, either WIDE, ABBREVIAT ED, or NARROW. * @param width The width of returned strings, either WIDE, ABBREVIAT ED, or NARROW.
* @return the month strings. (DateFormatSymbols retains ownership.) * @return the month strings. (DateFormatSymbols retains ownership.)
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
skipping to change at line 311 skipping to change at line 320
* *
* @param months The new month strings. (not adopted; caller retains o wnership) * @param months The new month strings. (not adopted; caller retains o wnership)
* @param count Filled in with length of the array. * @param count Filled in with length of the array.
* @param context The formatting context, either FORMAT or STANDALONE * @param context The formatting context, either FORMAT or STANDALONE
* @param width The width of returned strings, either WIDE, ABBREVIAT ED, or NARROW. * @param width The width of returned strings, either WIDE, ABBREVIAT ED, or NARROW.
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
void setMonths(const UnicodeString* months, int32_t count, DtContextTyp e context, DtWidthType width); void setMonths(const UnicodeString* months, int32_t count, DtContextTyp e context, DtWidthType width);
/** /**
* Gets weekday strings. For example: "Sunday", "Monday", etc. * Gets wide weekday strings. For example: "Sunday", "Monday", etc.
* @param count Filled in with length of the array. * @param count Filled in with length of the array.
* @return the weekday strings. (DateFormatSymbols retains ownership.) * @return the weekday strings. (DateFormatSymbols retains ownership.)
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
const UnicodeString* getWeekdays(int32_t& count) const; const UnicodeString* getWeekdays(int32_t& count) const;
/** /**
* Sets weekday strings. For example: "Sunday", "Monday", etc. * Sets wide weekday strings. For example: "Sunday", "Monday", etc.
* @param weekdays the new weekday strings. (not adopted; caller re tains ownership) * @param weekdays the new weekday strings. (not adopted; caller re tains 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 setWeekdays(const UnicodeString* weekdays, int32_t count); void setWeekdays(const UnicodeString* weekdays, int32_t count);
/** /**
* Gets short weekday strings. For example: "Sun", "Mon", etc. * Gets abbreviated weekday strings. For example: "Sun", "Mon", etc. (N
ote: The method name is
* misleading; it does not get the CLDR-style "short" weekday strings,
e.g. "Su", "Mo", etc.)
* @param count Filled in with length of the array. * @param count Filled in with length of the array.
* @return the short weekday strings. (DateFormatSymbols re tains ownership.) * @return the abbreviated weekday strings. (DateFormatSymb ols retains ownership.)
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
const UnicodeString* getShortWeekdays(int32_t& count) const; const UnicodeString* getShortWeekdays(int32_t& count) const;
/** /**
* Sets short weekday strings. For example: "Sun", "Mon", etc. * Sets abbreviated weekday strings. For example: "Sun", "Mon", etc. (N
* @param shortWeekdays the new short weekday strings. (not adopted; c ote: The method name is
aller retains ownership) * misleading; it does not set the CLDR-style "short" weekday strings,
* @param count Filled in with length of the array. e.g. "Su", "Mo", etc.)
* @param abbrevWeekdays the new abbreviated weekday strings. (not ado
pted; caller retains ownership)
* @param count Filled in with length of the array.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
void setShortWeekdays(const UnicodeString* shortWeekdays, int32_t count ); void setShortWeekdays(const UnicodeString* abbrevWeekdays, int32_t coun t);
/** /**
* Gets weekday strings by width and context. For example: "Sunday", "M onday", etc. * Gets weekday strings by width and context. For example: "Sunday", "M onday", etc.
* @param count Filled in with length of the array. * @param count Filled in with length of the array.
* @param context The formatting context, either FORMAT or STANDALONE * @param context The formatting context, either FORMAT or STANDALONE
* @param width The width of returned strings, either WIDE, ABBREVIAT ED, or NARROW * @param width The width of returned strings, either WIDE, ABBREVIAT ED, SHORT, or NARROW
* @return the month strings. (DateFormatSymbols retains ownership.) * @return the month strings. (DateFormatSymbols retains ownership.)
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
const UnicodeString* getWeekdays(int32_t& count, DtContextType context, DtWidthType width) const; const UnicodeString* getWeekdays(int32_t& count, DtContextType context, DtWidthType width) const;
/** /**
* Sets weekday strings by width and context. For example: "Sunday", "M onday", etc. * Sets weekday strings by width and context. For example: "Sunday", "M onday", etc.
* @param weekdays The new weekday strings. (not adopted; caller retai ns ownership) * @param weekdays The new weekday 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.
* @param context The formatting context, either FORMAT or STANDALONE * @param context The formatting context, either FORMAT or STANDALONE
* @param width The width of returned strings, either WIDE, ABBREVI ATED, or NARROW * @param width The width of returned strings, either WIDE, ABBREVI ATED, SHORT, or NARROW
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
void setWeekdays(const UnicodeString* weekdays, int32_t count, DtContex tType context, DtWidthType width); void setWeekdays(const UnicodeString* weekdays, int32_t count, DtContex tType context, DtWidthType width);
/** /**
* Gets quarter strings by width and context. For example: "1st Quarter ", "2nd Quarter", etc. * Gets quarter strings by width and context. For example: "1st Quarter ", "2nd Quarter", etc.
* @param count Filled in with length of the array. * @param count Filled in with length of the array.
* @param context The formatting context, either FORMAT or STANDALONE * @param context The formatting context, either FORMAT or STANDALONE
* @param width The width of returned strings, either WIDE or ABBREVI ATED. There * @param width The width of returned strings, either WIDE or ABBREVI ATED. There
* are no NARROW quarters. * are no NARROW quarters.
skipping to change at line 595 skipping to change at line 606
UnicodeString* fStandaloneShortMonths; UnicodeString* fStandaloneShortMonths;
int32_t fStandaloneShortMonthsCount; int32_t fStandaloneShortMonthsCount;
/** /**
* Standalone Narrow month strings. For example: "J", "F", etc. * Standalone Narrow month strings. For example: "J", "F", etc.
*/ */
UnicodeString* fStandaloneNarrowMonths; UnicodeString* fStandaloneNarrowMonths;
int32_t fStandaloneNarrowMonthsCount; int32_t fStandaloneNarrowMonthsCount;
/** /**
* Weekday strings. For example: "Sunday", "Monday", etc. * CLDR-style format wide weekday strings. For example: "Sunday", "Mond ay", etc.
*/ */
UnicodeString* fWeekdays; UnicodeString* fWeekdays;
int32_t fWeekdaysCount; int32_t fWeekdaysCount;
/** /**
* Short weekday strings. For example: "Sun", "Mon", etc. * CLDR-style format abbreviated (not short) weekday strings. For examp le: "Sun", "Mon", etc.
*/ */
UnicodeString* fShortWeekdays; UnicodeString* fShortWeekdays;
int32_t fShortWeekdaysCount; int32_t fShortWeekdaysCount;
/** /**
* Narrow weekday strings. For example: "Sun", "Mon", etc. * CLDR-style format short weekday strings. For example: "Su", "Mo", et
c.
*/
UnicodeString* fShorterWeekdays;
int32_t fShorterWeekdaysCount;
/**
* CLDR-style format narrow weekday strings. For example: "S", "M", etc
.
*/ */
UnicodeString* fNarrowWeekdays; UnicodeString* fNarrowWeekdays;
int32_t fNarrowWeekdaysCount; int32_t fNarrowWeekdaysCount;
/** /**
* Standalone Weekday strings. For example: "Sunday", "Monday", etc. * CLDR-style standalone wide weekday strings. For example: "Sunday", " Monday", etc.
*/ */
UnicodeString* fStandaloneWeekdays; UnicodeString* fStandaloneWeekdays;
int32_t fStandaloneWeekdaysCount; int32_t fStandaloneWeekdaysCount;
/** /**
* Standalone Short weekday strings. For example: "Sun", "Mon", etc. * CLDR-style standalone abbreviated (not short) weekday strings. For e xample: "Sun", "Mon", etc.
*/ */
UnicodeString* fStandaloneShortWeekdays; UnicodeString* fStandaloneShortWeekdays;
int32_t fStandaloneShortWeekdaysCount; int32_t fStandaloneShortWeekdaysCount;
/** /**
* CLDR-style standalone short weekday strings. For example: "Su", "Mo"
, etc.
*/
UnicodeString* fStandaloneShorterWeekdays;
int32_t fStandaloneShorterWeekdaysCount;
/**
* Standalone Narrow weekday strings. For example: "Sun", "Mon", etc. * Standalone Narrow weekday strings. For example: "Sun", "Mon", etc.
*/ */
UnicodeString* fStandaloneNarrowWeekdays; UnicodeString* fStandaloneNarrowWeekdays;
int32_t fStandaloneNarrowWeekdaysCount; int32_t fStandaloneNarrowWeekdaysCount;
/** /**
* Ampm strings. For example: "AM" and "PM". * Ampm strings. For example: "AM" and "PM".
*/ */
UnicodeString* fAmPms; UnicodeString* fAmPms;
int32_t fAmPmsCount; int32_t fAmPmsCount;
skipping to change at line 721 skipping to change at line 744
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
/** /**
* Localized date-time pattern characters. For example: use 'u' as 'y'. * Localized date-time pattern characters. For example: use 'u' as 'y'.
*/ */
UnicodeString fLocalPatternChars; UnicodeString fLocalPatternChars;
#ifndef U_HIDE_INTERNAL_API
/** /**
* Capitalization transforms. For each usage type, the first array elem ent indicates * Capitalization transforms. For each usage type, the first array elem ent indicates
* whether to titlecase for uiListOrMenu context, the second indicates whether to * whether to titlecase for uiListOrMenu context, the second indicates whether to
* titlecase for stand-alone context. * titlecase for stand-alone context.
*/ */
UBool fCapitalization[kCapContextUsageTypeCount][2]; 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. 18 change blocks. 
20 lines changed or deleted 48 lines changed or added


 fmtable.h   fmtable.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File FMTABLE.H * File FMTABLE.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/29/97 aliu Creation. * 02/29/97 aliu Creation.
*************************************************************************** ***** *************************************************************************** *****
skipping to change at line 34 skipping to change at line 34
* \brief C++ API: Formattable is a thin wrapper for primitive numeric type s. * \brief C++ API: Formattable is a thin wrapper for primitive numeric type s.
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class CharString; class CharString;
class DigitList; class DigitList;
#ifndef U_HIDE_INTERNAL_API
/** /**
* \def UNUM_INTERNAL_STACKARRAY_SIZE * \def UNUM_INTERNAL_STACKARRAY_SIZE
* @internal * @internal
*/ */
#if U_PLATFORM == U_PF_OS400 #if U_PLATFORM == U_PF_OS400
#define UNUM_INTERNAL_STACKARRAY_SIZE 144 #define UNUM_INTERNAL_STACKARRAY_SIZE 144
#else #else
#define UNUM_INTERNAL_STACKARRAY_SIZE 128 #define UNUM_INTERNAL_STACKARRAY_SIZE 128
#endif #endif
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Formattable objects can be passed to the Format class or * Formattable objects can be passed to the Format class or
* its subclasses for formatting. Formattable is a thin wrapper * its subclasses for formatting. Formattable is a thin wrapper
* class which interconverts between the primitive numeric types * class which interconverts between the primitive numeric types
* (double, long, etc.) as well as UDate and UnicodeString. * (double, long, etc.) as well as UDate and UnicodeString.
* *
* <p>Internally, a Formattable object is a union of primitive types. * <p>Internally, a Formattable object is a union of primitive types.
* As such, it can only store one flavor of data at a time. To * As such, it can only store one flavor of data at a time. To
* determine what flavor of data it contains, use the getType method. * determine what flavor of data it contains, use the getType method.
skipping to change at line 686 skipping to change at line 688
} }
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. 5 change blocks. 
3 lines changed or deleted 3 lines changed or added


 fpositer.h   fpositer.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 attiter.h * File attiter.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 12/15/2009 dougfelt Created * 12/15/2009 dougfelt Created
*************************************************************************** ***** *************************************************************************** *****
skipping to change at line 111 skipping to change at line 111
/** /**
* Sets the data used by the iterator, and resets the position. * Sets the data used by the iterator, and resets the position.
* Returns U_ILLEGAL_ARGUMENT_ERROR in status if the data is not valid * Returns U_ILLEGAL_ARGUMENT_ERROR in status if the data is not valid
* (length is not a multiple of 3, or start >= limit for any run). * (length is not a multiple of 3, or start >= limit for any run).
*/ */
void setData(UVector32 *adopt, UErrorCode& status); void setData(UVector32 *adopt, UErrorCode& status);
UVector32 *data; UVector32 *data;
int32_t pos; int32_t pos;
// No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // FPOSITER_H #endif // FPOSITER_H
 End of changes. 2 change blocks. 
4 lines changed or deleted 1 lines changed or added


 gender.h   gender.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2008-2012, International Business Machines Corporation and * Copyright (C) 2008-2013, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* *
* File GENDER.H * File GENDER.H
* *
* Modification History:* * Modification History:*
* Date Name Description * Date Name Description
* *
*************************************************************************** ***** *************************************************************************** *****
*/ */
#ifndef _GENDER #ifndef _GENDER
#define _GENDER #define _GENDER
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/ugender.h" #include "unicode/ugender.h"
#include "unicode/uobject.h" #include "unicode/uobject.h"
class GenderInfoTest; class GenderInfoTest;
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
skipping to change at line 72 skipping to change at line 73
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @return the gender of the whole list. * @return the gender of the whole list.
* @draft ICU 50 * @draft ICU 50
*/ */
UGender getListGender(const UGender* genders, int32_t length, UErrorCod e& status) const; UGender getListGender(const UGender* genders, int32_t length, UErrorCod e& status) const;
/** /**
* Destructor. * Destructor.
* *
* @draft ICU 50 * @draft ICU 50
* @internal
*/ */
virtual ~GenderInfo(); virtual ~GenderInfo();
private: private:
int32_t _style; int32_t _style;
/** /**
* No "poor man's RTTI"
*/
virtual UClassID getDynamicClassID() const;
/**
* Copy constructor. One object per locale invariant. Clients * Copy constructor. One object per locale invariant. Clients
* must never copy GenderInfo objects. * must never copy GenderInfo objects.
*/ */
GenderInfo(const GenderInfo& other); GenderInfo(const GenderInfo& other);
/** /**
* Assignment operator. Not applicable to immutable objects. * Assignment operator. Not applicable to immutable objects.
*/ */
GenderInfo& operator=(const GenderInfo&); GenderInfo& operator=(const GenderInfo&);
skipping to change at line 109 skipping to change at line 104
static const GenderInfo* getMixedNeutralInstance(); static const GenderInfo* getMixedNeutralInstance();
static const GenderInfo* getMaleTaintsInstance(); static const GenderInfo* getMaleTaintsInstance();
static const GenderInfo* loadInstance(const Locale& locale, UErrorCode& status); static const GenderInfo* loadInstance(const Locale& locale, UErrorCode& status);
friend class ::GenderInfoTest; friend class ::GenderInfoTest;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _GENDER #endif // _GENDER
//eof //eof
 End of changes. 5 change blocks. 
7 lines changed or deleted 3 lines changed or added


 gregocal.h   gregocal.h 
/* /*
* Copyright (C) 1997-2012, International Business Machines Corporation and others. * Copyright (C) 1997-2013, 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 471 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 */
/** /**
* Returns the calendar type name string for this Calendar object. * Returns the calendar type name string for this Calendar object.
* The returned string is the legacy ICU calendar attribute value, * The returned string is the legacy ICU calendar attribute value,
* for example, "gregorian" or "japanese". * for example, "gregorian" or "japanese".
* *
* For more details see the Calendar::getType() documentation. * For more details see the Calendar::getType() documentation.
* *
* @return legacy calendar type name string * @return legacy calendar type name string
* @draft ICU 49 * @stable 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.
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added


 icudataver.h   icudataver.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 2009-2012, International Business Machines * Copyright (C) 2009-2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
*/ */
/** /**
* \file * \file
* \brief C API: access to ICU Data Version number * \brief C API: access to ICU Data Version number
*/ */
#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
/** /**
* @draft ICU 49 * @stable ICU 49
*/ */
#define U_ICU_VERSION_BUNDLE "icuver" #define U_ICU_VERSION_BUNDLE "icuver"
/** /**
* @draft ICU 49 * @stable ICU 49
*/ */
#define U_ICU_DATA_KEY "DataVersion" #define U_ICU_DATA_KEY "DataVersion"
/** /**
* 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
* *
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UEr U_STABLE void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UE
rorCode *status); rrorCode *status);
#endif /* U_HIDE_DRAFT_API */
#endif #endif
 End of changes. 6 change blocks. 
8 lines changed or deleted 6 lines changed or added


 idna.h   idna.h 
skipping to change at line 257 skipping to change at line 257
* @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
* @stable 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:
// No ICU "poor man's RTTI" for this class nor its subclasses.
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.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
class U_COMMON_API IDNAInfo : public UMemory { class U_COMMON_API IDNAInfo : public UMemory {
 End of changes. 1 change blocks. 
4 lines changed or deleted 0 lines changed or added


 listformatter.h   listformatter.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2012, International Business Machines * Copyright (C) 2012-2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: listformatter.h * file name: listformatter.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 20120426 * created on: 20120426
* created by: Umesh P. Nair * created by: Umesh P. Nair
*/ */
#ifndef __LISTFORMATTER_H__ #ifndef __LISTFORMATTER_H__
#define __LISTFORMATTER_H__ #define __LISTFORMATTER_H__
#include "unicode/utypes.h"
#ifndef U_HIDE_DRAFT_API
#include "unicode/unistr.h" #include "unicode/unistr.h"
#include "unicode/locid.h" #include "unicode/locid.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** @internal */ /** @internal */
class Hashtable; class Hashtable;
/** @internal */ /** @internal */
struct ListFormatData : public UMemory { struct ListFormatData : public UMemory {
skipping to change at line 52 skipping to change at line 56
*/ */
/** /**
* An immutable class for formatting a list, using data from CLDR (or suppl ied * An immutable class for formatting a list, using data from CLDR (or suppl ied
* separately). * separately).
* *
* Example: Input data ["Alice", "Bob", "Charlie", "Delta"] will be formatt ed * Example: Input data ["Alice", "Bob", "Charlie", "Delta"] will be formatt ed
* as "Alice, Bob, Charlie and Delta" in English. * as "Alice, Bob, Charlie and Delta" in English.
* *
* The ListFormatter class is not intended for public subclassing. * The ListFormatter class is not intended for public subclassing.
* @draft ICU 50
*/ */
class U_COMMON_API ListFormatter : public UObject{ class U_COMMON_API ListFormatter : public UObject{
public: public:
/** /**
* Creates a ListFormatter appropriate for the default locale. * Creates a ListFormatter appropriate for the default locale.
* *
* @param errorCode ICU error code, set if no data available for defaul t locale. * @param errorCode ICU error code, set if no data available for defaul t locale.
* @return Pointer to a ListFormatter object for the default locale, * @return Pointer to a ListFormatter object for the default locale,
* created from internal data derived from CLDR data. * created from internal data derived from CLDR data.
skipping to change at line 98 skipping to change at line 103
* @param n_items Length of the array items. * @param n_items Length of the array items.
* @param appendTo The string to which the result should be appended to . * @param appendTo The string to which the result should be appended to .
* @param errorCode ICU error code, set if there is an error. * @param errorCode ICU error code, set if there is an error.
* @return Formatted string combining the elements of items, appended t o appendTo. * @return Formatted string combining the elements of items, appended t o appendTo.
* @draft ICU 50 * @draft ICU 50
*/ */
UnicodeString& format(const UnicodeString items[], int32_t n_items, UnicodeString& format(const UnicodeString items[], int32_t n_items,
UnicodeString& appendTo, UErrorCode& errorCode) const; UnicodeString& appendTo, UErrorCode& errorCode) const;
/** /**
* Gets the fallback locale for a given locale.
* TODO: Consider moving this to the Locale class.
* @param in The input locale.
* @param out The output locale after fallback.
* @internal For testing.
*/
static void getFallbackLocale(const Locale& in, Locale& out, UErrorCode
& errorCode);
/**
* @internal constructor made public for testing. * @internal constructor made public for testing.
*/ */
ListFormatter(const ListFormatData& listFormatterData); ListFormatter(const ListFormatData& listFormatterData);
private: private:
static void initializeHash(UErrorCode& errorCode); static void initializeHash(UErrorCode& errorCode);
static void addDataToHash(const char* locale, const char* two, const ch ar* start, const char* middle, const char* end, UErrorCode& errorCode);
static const ListFormatData* getListFormatData(const Locale& locale, UE rrorCode& errorCode); static const ListFormatData* getListFormatData(const Locale& locale, UE rrorCode& errorCode);
ListFormatter(); ListFormatter();
ListFormatter(const ListFormatter&); ListFormatter(const ListFormatter&);
ListFormatter& operator = (const ListFormatter&); ListFormatter& operator = (const ListFormatter&);
void addNewString(const UnicodeString& pattern, UnicodeString& original String, void addNewString(const UnicodeString& pattern, UnicodeString& original String,
const UnicodeString& newString, UErrorCode& errorCode ) const; const UnicodeString& newString, UErrorCode& errorCode ) const;
virtual UClassID getDynamicClassID() const;
const ListFormatData& data; const ListFormatData& data;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif #endif
 End of changes. 7 change blocks. 
13 lines changed or deleted 7 lines changed or added


 locdspnm.h   locdspnm.h 
skipping to change at line 64 skipping to change at line 64
* dialectHandling. * dialectHandling.
* *
* @param locale the display locale * @param locale the display locale
* @param dialectHandling how to select names for locales * @param dialectHandling how to select names for locales
* @return a LocaleDisplayNames instance * @return a LocaleDisplayNames instance
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local e, static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local e,
UDialectHandling dialectHandling); UDialectHandling dialectHandling);
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_DRAFT_API
/** /**
* Returns an instance of LocaleDisplayNames that returns names formatt ed * Returns an instance of LocaleDisplayNames that returns names formatt ed
* for the provided locale, using the provided UDisplayContext settings . * for the provided locale, using the provided UDisplayContext settings .
* *
* @param locale the display locale * @param locale the display locale
* @param contexts List of one or more context settings (e.g. for diale ct * @param contexts List of one or more context settings (e.g. for diale ct
* handling, capitalization, etc. * handling, capitalization, etc.
* @param length Number of items in the contexts list * @param length Number of items in the contexts list
* @return a LocaleDisplayNames instance * @return a LocaleDisplayNames instance
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local e, static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local e,
UDisplayContext *contexts, int32_t length); UDisplayContext *contexts, int32_t length);
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_DRAFT_API */
// getters for state // getters for state
/** /**
* Returns the locale used to determine the display names. This is * Returns the locale used to determine the display names. This is
* not necessarily the same locale passed to {@link #createInstance}. * not necessarily the same locale passed to {@link #createInstance}.
* @return the display locale * @return the display locale
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual const Locale& getLocale() const = 0; virtual const Locale& getLocale() const = 0;
skipping to change at line 100 skipping to change at line 100
* Returns the dialect handling used in the display names. * Returns the dialect handling used in the display names.
* @return the dialect handling enum * @return the dialect handling enum
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UDialectHandling getDialectHandling() const = 0; virtual UDialectHandling getDialectHandling() const = 0;
/** /**
* Returns the UDisplayContext value for the specified UDisplayContextT ype. * Returns the UDisplayContext value for the specified UDisplayContextT ype.
* @param type the UDisplayContextType whose value to return * @param type the UDisplayContextType whose value to return
* @return the UDisplayContext for the specified type. * @return the UDisplayContext for the specified type.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
virtual UDisplayContext getContext(UDisplayContextType type) const = 0; virtual UDisplayContext getContext(UDisplayContextType type) const = 0;
// names for entire locales // names for entire locales
/** /**
* Returns the display name of the provided locale. * Returns the display name of the provided locale.
* @param locale the locale whose display name to return * @param locale the locale whose display name to return
* @param result receives the locale's display name * @param result receives the locale's display name
* @return the display name of the provided locale * @return the display name of the provided locale
* @stable ICU 4.4 * @stable ICU 4.4
skipping to change at line 196 skipping to change at line 196
/** /**
* Returns the display name of the provided value (used with the provid ed key). * Returns the display name of the provided value (used with the provid ed key).
* @param key the locale key name * @param key the locale key name
* @param value the locale key's value * @param value the locale key's value
* @param result receives the value's display name * @param result receives the value's display name
* @return the display name of the provided value * @return the display name of the provided value
* @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:
// No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const;
}; };
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
 End of changes. 5 change blocks. 
8 lines changed or deleted 4 lines changed or added


 locid.h   locid.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1996-2012, International Business Machines * Copyright (C) 1996-2013, 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 450 skipping to change at line 450
* @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
/** /**
* Sets 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.
* *
* @draft ICU 49 * @stable 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;
/** /**
 End of changes. 4 change blocks. 
4 lines changed or deleted 2 lines changed or added


 messagepattern.h   messagepattern.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2011-2012, International Business Machines * Copyright (C) 2011-2013, 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 250 skipping to change at line 250
* 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.
* @stable 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.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_SELECT, UMSGPAT_ARG_TYPE_SELECT,
#ifndef U_HIDE_DRAFT_API
/** /**
* The argument is an ordinal-number PluralFormat * The argument is an ordinal-number PluralFormat
* with the same style parts sequence and semantics as UMSGPAT_ARG_TYPE _PLURAL. * with the same style parts sequence and semantics as UMSGPAT_ARG_TYPE _PLURAL.
* @draft ICU 50 * @draft ICU 50
*/ */
UMSGPAT_ARG_TYPE_SELECTORDINAL UMSGPAT_ARG_TYPE_SELECTORDINAL
#endif /* U_HIDE_DRAFT_API */
}; };
/** /**
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
typedef enum UMessagePatternArgType UMessagePatternArgType; typedef enum UMessagePatternArgType UMessagePatternArgType;
#ifndef U_HIDE_DRAFT_API
/** /**
* Returns TRUE if the argument type has a plural style part sequence and s emantics, * Returns TRUE if the argument type has a plural style part sequence and s emantics,
* for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL. * for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL.
* @draft ICU 50 * @draft ICU 50
*/ */
#define UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) \ #define UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) \
((argType)==UMSGPAT_ARG_TYPE_PLURAL || (argType)==UMSGPAT_ARG_TYPE_SELE CTORDINAL) ((argType)==UMSGPAT_ARG_TYPE_PLURAL || (argType)==UMSGPAT_ARG_TYPE_SELE CTORDINAL)
#endif /* U_HIDE_DRAFT_API */
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.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_NAME_NOT_NUMBER=-1, UMSGPAT_ARG_NAME_NOT_NUMBER=-1,
/** /**
skipping to change at line 920 skipping to change at line 924
int32_t value, UErrorCode &errorCode); int32_t value, UErrorCode &errorCode);
void addLimitPart(int32_t start, void addLimitPart(int32_t start,
UMessagePatternPartType type, int32_t index, int32_t length, UMessagePatternPartType type, int32_t index, int32_t length,
int32_t value, UErrorCode &errorCode); int32_t value, UErrorCode &errorCode);
void addArgDoublePart(double numericValue, int32_t start, int32_t lengt h, UErrorCode &errorCode); void addArgDoublePart(double numericValue, int32_t start, int32_t lengt h, UErrorCode &errorCode);
void setParseError(UParseError *parseError, int32_t index); void setParseError(UParseError *parseError, int32_t index);
// No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const;
UBool init(UErrorCode &errorCode); UBool init(UErrorCode &errorCode);
UBool copyStorage(const MessagePattern &other, UErrorCode &errorCode); UBool copyStorage(const MessagePattern &other, UErrorCode &errorCode);
UMessagePatternApostropheMode aposMode; UMessagePatternApostropheMode aposMode;
UnicodeString msg; UnicodeString msg;
// ArrayList<Part> parts=new ArrayList<Part>(); // ArrayList<Part> parts=new ArrayList<Part>();
MessagePatternPartsList *partsList; MessagePatternPartsList *partsList;
Part *parts; Part *parts;
int32_t partsLength; int32_t partsLength;
// ArrayList<Double> numericValues; // ArrayList<Double> numericValues;
 End of changes. 6 change blocks. 
4 lines changed or deleted 5 lines changed or added


 msgfmt.h   msgfmt.h 
skipping to change at line 1085 skipping to change at line 1085
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition&, FieldPosition&,
UErrorCode& status) const; UErrorCode& status) const;
virtual UnicodeString& format(const Formattable& obj, virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPositionIterator* posIter, FieldPositionIterator* posIter,
UErrorCode& status) const; UErrorCode& status) const;
virtual void parseObject(const UnicodeString&, virtual void parseObject(const UnicodeString&,
Formattable&, Formattable&,
ParsePosition&) const; ParsePosition&) const;
virtual UClassID getDynamicClassID() const;
}; };
friend class MessageFormatAdapter; // getFormatTypeList() access friend class MessageFormatAdapter; // getFormatTypeList() access
}; };
inline UnicodeString& inline UnicodeString&
MessageFormat::format(const Formattable& obj, MessageFormat::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);
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 normalizer2.h   normalizer2.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2009-2012, International Business Machines * Copyright (C) 2009-2013, 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 86 skipping to change at line 86
* @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. * Destructor.
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
~Normalizer2(); ~Normalizer2();
#ifndef U_HIDE_DRAFT_API
/** /**
* Returns a Normalizer2 instance for Unicode NFC normalization. * Returns a Normalizer2 instance for Unicode NFC normalization.
* Same as getInstance(NULL, "nfc", UNORM2_COMPOSE, errorCode). * Same as getInstance(NULL, "nfc", UNORM2_COMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
static const Normalizer2 * static const Normalizer2 *
getNFCInstance(UErrorCode &errorCode); getNFCInstance(UErrorCode &errorCode);
/** /**
* Returns a Normalizer2 instance for Unicode NFD normalization. * Returns a Normalizer2 instance for Unicode NFD normalization.
* Same as getInstance(NULL, "nfc", UNORM2_DECOMPOSE, errorCode). * Same as getInstance(NULL, "nfc", UNORM2_DECOMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
static const Normalizer2 * static const Normalizer2 *
getNFDInstance(UErrorCode &errorCode); getNFDInstance(UErrorCode &errorCode);
/** /**
* Returns a Normalizer2 instance for Unicode NFKC normalization. * Returns a Normalizer2 instance for Unicode NFKC normalization.
* Same as getInstance(NULL, "nfkc", UNORM2_COMPOSE, errorCode). * Same as getInstance(NULL, "nfkc", UNORM2_COMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
static const Normalizer2 * static const Normalizer2 *
getNFKCInstance(UErrorCode &errorCode); getNFKCInstance(UErrorCode &errorCode);
/** /**
* Returns a Normalizer2 instance for Unicode NFKD normalization. * Returns a Normalizer2 instance for Unicode NFKD normalization.
* Same as getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, errorCode). * Same as getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
static const Normalizer2 * static const Normalizer2 *
getNFKDInstance(UErrorCode &errorCode); getNFKDInstance(UErrorCode &errorCode);
/** /**
* Returns a Normalizer2 instance for Unicode NFKC_Casefold normalizati on. * Returns a Normalizer2 instance for Unicode NFKC_Casefold normalizati on.
* Same as getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, errorCode). * Same as getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, errorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
static const Normalizer2 * static const Normalizer2 *
getNFKCCasefoldInstance(UErrorCode &errorCode); 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.
skipping to change at line 293 skipping to change at line 291
* When used on a standard NFC Normalizer2 instance, * When used on a standard NFC Normalizer2 instance,
* it returns the Decomposition_Mapping only if the Decomposition_Type (dt) is Canonical (Can); * 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). * 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. * This function is independent of the mode of the Normalizer2.
* The default implementation returns FALSE. * The default implementation returns FALSE.
* @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
* raw decomposition mapping, if there is one. * raw 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 49 * @stable ICU 49
*/ */
virtual UBool virtual UBool
getRawDecomposition(UChar32 c, UnicodeString &decomposition) const; getRawDecomposition(UChar32 c, UnicodeString &decomposition) const;
/** /**
* Performs pairwise composition of a & b and returns the composite if there is one. * 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. * Returns a composite code point c only if c has a two-way mapping to a+b.
* In standard Unicode normalization, this means that * In standard Unicode normalization, this means that
* c has a canonical decomposition to a+b * c has a canonical decomposition to a+b
* and c does not have the Full_Composition_Exclusion property. * and c does not have the Full_Composition_Exclusion property.
* *
* This function is independent of the mode of the Normalizer2. * This function is independent of the mode of the Normalizer2.
* The default implementation returns a negative value. * The default implementation returns a negative value.
* @param a A (normalization starter) code point. * @param a A (normalization starter) code point.
* @param b Another code point. * @param b Another code point.
* @return The non-negative composite code point if there is one; other wise a negative value. * @return The non-negative composite code point if there is one; other wise a negative value.
* @draft ICU 49 * @stable ICU 49
*/ */
virtual UChar32 virtual UChar32
composePair(UChar32 a, UChar32 b) const; composePair(UChar32 a, UChar32 b) const;
/** /**
* Gets the combining class of c. * Gets the combining class of c.
* The default implementation returns 0 * The default implementation returns 0
* but all standard implementations return the Unicode Canonical_Combin ing_Class value. * but all standard implementations return the Unicode Canonical_Combin ing_Class value.
* @param c code point * @param c code point
* @return c's combining class * @return c's combining class
* @draft ICU 49 * @stable ICU 49
*/ */
virtual uint8_t virtual uint8_t
getCombiningClass(UChar32 c) const; 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.
skipping to change at line 432 skipping to change at line 430
* In other words, a string containing this character can be normalized * In other words, a string containing this character can be normalized
* by processing portions before this character and after this * by processing portions before this character and after this
* character independently. * character independently.
* This is used for iterative normalization. See the class documentatio n for details. * This is used for iterative normalization. See the class documentatio n for details.
* Note that this operation may be significantly slower than hasBoundar yBefore(). * Note that this operation may be significantly slower than hasBoundar yBefore().
* @param c character to test * @param c character to test
* @return TRUE if c is normalization-inert * @return TRUE if c is normalization-inert
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UBool isInert(UChar32 c) const = 0; virtual UBool isInert(UChar32 c) const = 0;
private:
// No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const;
}; };
/** /**
* Normalization filtered by a UnicodeSet. * Normalization filtered by a UnicodeSet.
* Normalizes portions of the text contained in the filter set and leaves * Normalizes portions of the text contained in the filter set and leaves
* portions not contained in the filter set unchanged. * portions not contained in the filter set unchanged.
* Filtering is done via UnicodeSet::span(..., USET_SPAN_SIMPLE). * Filtering is done via UnicodeSet::span(..., USET_SPAN_SIMPLE).
* Not-in-the-filter text is treated as "is normalized" and "quick check ye s". * Not-in-the-filter text is treated as "is normalized" and "quick check ye s".
* This class implements all of (and only) the Normalizer2 API. * This class implements all of (and only) the Normalizer2 API.
* An instance of this class is unmodifiable/immutable but is constructed a nd * An instance of this class is unmodifiable/immutable but is constructed a nd
skipping to change at line 547 skipping to change at line 541
/** /**
* Gets the raw decomposition mapping of c. * Gets the raw decomposition mapping of c.
* For details see the base class documentation. * For details see the base class documentation.
* *
* 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
* raw decomposition mapping, if there is one. * raw 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 49 * @stable ICU 49
*/ */
virtual UBool virtual UBool
getRawDecomposition(UChar32 c, UnicodeString &decomposition) const; getRawDecomposition(UChar32 c, UnicodeString &decomposition) const;
/** /**
* Performs pairwise composition of a & b and returns the composite if there is one. * Performs pairwise composition of a & b and returns the composite if there is one.
* For details see the base class documentation. * For details see the base class documentation.
* *
* This function is independent of the mode of the Normalizer2. * This function is independent of the mode of the Normalizer2.
* @param a A (normalization starter) code point. * @param a A (normalization starter) code point.
* @param b Another code point. * @param b Another code point.
* @return The non-negative composite code point if there is one; other wise a negative value. * @return The non-negative composite code point if there is one; other wise a negative value.
* @draft ICU 49 * @stable ICU 49
*/ */
virtual UChar32 virtual UChar32
composePair(UChar32 a, UChar32 b) const; composePair(UChar32 a, UChar32 b) const;
/** /**
* Gets the combining class of c. * Gets the combining class of c.
* The default implementation returns 0 * The default implementation returns 0
* but all standard implementations return the Unicode Canonical_Combin ing_Class value. * but all standard implementations return the Unicode Canonical_Combin ing_Class value.
* @param c code point * @param c code point
* @return c's combining class * @return c's combining class
* @draft ICU 49 * @stable ICU 49
*/ */
virtual uint8_t virtual uint8_t
getCombiningClass(UChar32 c) const; 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
 End of changes. 15 change blocks. 
18 lines changed or deleted 12 lines changed or added


 numfmt.h   numfmt.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2012, International Business Machines Corporation and others. * Copyright (C) 1997-2013, 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 73 skipping to change at line 73
* <pre> * <pre>
* \code * \code
* double myNumber = 7.0; * double myNumber = 7.0;
* UnicodeString myString; * UnicodeString myString;
* UErrorCode success = U_ZERO_ERROR; * UErrorCode success = U_ZERO_ERROR;
* NumberFormat* nf = NumberFormat::createInstance(success) * NumberFormat* nf = NumberFormat::createInstance(success)
* nf->format(myNumber, myString); * nf->format(myNumber, myString);
* cout << " Example 1: " << myString << endl; * cout << " Example 1: " << myString << endl;
* \endcode * \endcode
* </pre> * </pre>
* Note that there are additional factory methods within subclasses of
* NumberFormat.
* <P>
* If you are formatting multiple numbers, it is more efficient to get * If you are formatting multiple numbers, it is more efficient to get
* the format and use it multiple times so that the system doesn't * the format and use it multiple times so that the system doesn't
* have to fetch the information about the local language and country * have to fetch the information about the local language and country
* conventions multiple times. * conventions multiple times.
* <pre> * <pre>
* \code * \code
* UnicodeString myString; * UnicodeString myString;
* UErrorCode success = U_ZERO_ERROR; * UErrorCode success = U_ZERO_ERROR;
* nf = NumberFormat::createInstance( success ); * nf = NumberFormat::createInstance( success );
* int32_t a[] = { 123, 3333, -1234567 }; * int32_t a[] = { 123, 3333, -1234567 };
skipping to change at line 621 skipping to change at line 624
* If parse fails, return contents are undefined. * If parse fails, return contents are undefined.
* @param status Output parameter set to a failure error code * @param status Output parameter set to a failure error code
* when a failure occurs. * when a failure occurs.
* @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 pos input-output position; on input, the position within tex t * @param pos input-output position; on input, the position within tex t
* to match; must have 0 <= pos.getIndex() < text.length(); * 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 outpu t. * If the parse fails, the position in unchanged upon outpu t.
* @return if parse succeeds, a pointer to a newly-created Currency Amount * @return if parse succeeds, a pointer to a newly-created Currency Amount
* object (owned by the caller) containing information abou t * object (owned by the caller) containing information abou t
* the parsed currency; if parse fails, this is NULL. * the parsed currency; if parse fails, this is NULL.
* @draft ICU 49 * @stable ICU 49
*/ */
virtual CurrencyAmount* parseCurrency(const UnicodeString& text, virtual CurrencyAmount* parseCurrency(const UnicodeString& text,
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
skipping to change at line 984 skipping to change at line 986
/** /**
* Returns the currency in effect for this formatter. Subclasses * Returns the currency in effect for this formatter. Subclasses
* should override this method as needed. Unlike getCurrency(), * should override this method as needed. Unlike getCurrency(),
* this method should never return "". * this method should never return "".
* @result output parameter for null-terminated result, which must * @result output parameter for null-terminated result, which must
* have a capacity of at least 4 * have a capacity of at least 4
* @internal * @internal
*/ */
virtual void getEffectiveCurrency(UChar* result, UErrorCode& ec) const; virtual void getEffectiveCurrency(UChar* result, UErrorCode& ec) const;
#ifndef U_HIDE_INTERNAL_API
/**
* Creates the specified number format style of the desired locale.
* If mustBeDecimalFormat is TRUE, then the returned pointer is
* either a DecimalFormat or it is NULL.
* @internal
*/
static NumberFormat* makeInstance(const Locale& desiredLocale,
UNumberFormatStyle style,
UBool mustBeDecimalFormat,
UErrorCode& errorCode);
#endif /* U_HIDE_INTERNAL_API */
private: private:
static UBool isStyleSupported(UNumberFormatStyle style); static UBool isStyleSupported(UNumberFormatStyle style);
/** /**
* 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.
 End of changes. 5 change blocks. 
3 lines changed or deleted 18 lines changed or added


 numsys.h   numsys.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010-2011, International Business Machines Corporation and * Copyright (C) 2010-2013, 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
* *
*************************************************************************** ***** *************************************************************************** *****
*/ */
#ifndef NUMSYS #ifndef NUMSYS
#define NUMSYS #define NUMSYS
#include "unicode/utypes.h"
#ifndef U_HIDE_INTERNAL_API
/** /**
* \def NUMSYS_NAME_CAPACITY * \def NUMSYS_NAME_CAPACITY
* Size of a numbering system name. * Size of a numbering system name.
* @internal * @internal
*/ */
#define NUMSYS_NAME_CAPACITY 8 #define NUMSYS_NAME_CAPACITY 8
#endif /* U_HIDE_INTERNAL_API */
#include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: NumberingSystem object * \brief C++ API: NumberingSystem object
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/uobject.h" #include "unicode/uobject.h"
skipping to change at line 123 skipping to change at line 125
* @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 * @stable 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. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added


 platform.h   platform.h 
skipping to change at line 275 skipping to change at line 275
/** /**
* \def U_HAVE_STDINT_H * \def U_HAVE_STDINT_H
* Defines whether stdint.h is available. It is a C99 standard header. * Defines whether stdint.h is available. It is a C99 standard header.
* We used to include inttypes.h which includes stdint.h but we usually do not need * We used to include inttypes.h which includes stdint.h but we usually do not need
* the additional definitions from inttypes.h. * the additional definitions from inttypes.h.
* @internal * @internal
*/ */
#ifdef U_HAVE_STDINT_H #ifdef U_HAVE_STDINT_H
/* Use the predefined value. */ /* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API #elif U_PLATFORM_USES_ONLY_WIN32_API
# if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER>=1600) # if defined(__BORLANDC__) || U_PLATFORM == U_PF_MINGW || (defined(_MSC_V ER) && _MSC_VER>=1600)
/* Windows Visual Studio 9 and below do not have stdint.h & inttype s.h, but VS 2010 adds them. */ /* 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 # define U_HAVE_STDINT_H 1
# else # else
# define U_HAVE_STDINT_H 0 # define U_HAVE_STDINT_H 0
# endif # endif
#elif U_PLATFORM == U_PF_SOLARIS #elif U_PLATFORM == U_PF_SOLARIS
/* Solaris has inttypes.h but not stdint.h. */ /* Solaris has inttypes.h but not stdint.h. */
# define U_HAVE_STDINT_H 0 # define U_HAVE_STDINT_H 0
#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) #elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER)
/* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 plurfmt.h   plurfmt.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2012, International Business Machines Corporation and * Copyright (C) 2007-2013, 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 195 skipping to change at line 195
* @param locale the default number formatting will be done using this * @param locale the default number formatting will be done using this
* locale. * locale.
* @param rules defines the behavior of the <code>PluralFormat</code> * @param rules defines the behavior of the <code>PluralFormat</code>
* object. * object.
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode & status); PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode & status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Creates a new <code>PluralFormat</code> for the plural type. * Creates a new <code>PluralFormat</code> for the plural type.
* The standard number formatting will be done using the given locale. * The standard number formatting will be done using the given locale.
* @param locale the default number formatting will be done using this * @param locale the default number formatting will be done using this
* locale. * locale.
* @param type The plural type (e.g., cardinal or ordinal). * @param type The plural type (e.g., cardinal or ordinal).
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @draft ICU 50 * @draft ICU 50
*/ */
PluralFormat(const Locale& locale, UPluralType type, UErrorCode& status ); PluralFormat(const Locale& locale, UPluralType type, UErrorCode& status );
#endif /* U_HIDE_DRAFT_API */
/** /**
* Creates a new cardinal-number <code>PluralFormat</code> for a given pattern string. * Creates a new cardinal-number <code>PluralFormat</code> for a given pattern string.
* The default locale will be used to get the set of plural rules and f or * The default locale will be used to get the set of plural rules and f or
* standard number formatting. * standard number formatting.
* @param pattern the pattern for this <code>PluralFormat</code>. * @param pattern the pattern for this <code>PluralFormat</code>.
* errors are returned to status if the pattern is inva lid. * errors are returned to status if the pattern is inva lid.
* @param status output param set to success/failure code on exit, wh ich * @param status output param set to success/failure code on exit, wh ich
* must not indicate a failure before the function call . * must not indicate a failure before the function call .
* @stable ICU 4.0 * @stable ICU 4.0
skipping to change at line 269 skipping to change at line 271
* errors are returned to status if the pattern is inval id. * errors are returned to status if the pattern is inval id.
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(const Locale& locale, PluralFormat(const Locale& locale,
const PluralRules& rules, const PluralRules& rules,
const UnicodeString& pattern, const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Creates a new <code>PluralFormat</code> for a plural type, a * Creates a new <code>PluralFormat</code> for a plural type, a
* pattern and a locale. * pattern and a locale.
* @param locale the <code>PluralFormat</code> will be configured with * @param locale the <code>PluralFormat</code> will be configured with
* rules for this locale. This locale will also be used for * rules for this locale. This locale will also be used for
* standard number formatting. * standard number formatting.
* @param type The plural type (e.g., cardinal or ordinal). * @param type The plural type (e.g., cardinal or ordinal).
* @param pattern the pattern for this <code>PluralFormat</code>. * @param pattern the pattern for this <code>PluralFormat</code>.
* errors are returned to status if the pattern is inval id. * errors are returned to status if the pattern is inval id.
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @draft ICU 50 * @draft ICU 50
*/ */
PluralFormat(const Locale& locale, PluralFormat(const Locale& locale,
UPluralType type, UPluralType type,
const UnicodeString& pattern, const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* copy constructor. * copy constructor.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(const PluralFormat& other); PluralFormat(const PluralFormat& other);
/** /**
* Destructor. * Destructor.
* @stable ICU 4.0 * @stable ICU 4.0
skipping to change at line 385 skipping to change at line 389
* @param status output param set to success/failure code on exit, wh ich * @param status output param set to success/failure code on exit, wh ich
* must not indicate a failure before the function call . * must not indicate a failure before the function call .
* @return the string containing the formatted plural message. * @return the string containing the formatted plural message.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UnicodeString& format(double number, UnicodeString& format(double number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos, FieldPosition& pos,
UErrorCode& status) const; UErrorCode& status) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Sets the locale used by this <code>PluraFormat</code> object. * Sets the locale used by this <code>PluraFormat</code> object.
* Note: Calling this method resets this <code>PluraFormat</code> objec t, * Note: Calling this method resets this <code>PluraFormat</code> objec t,
* i.e., a pattern that was applied previously will be removed, * i.e., a pattern that was applied previously will be removed,
* and the NumberFormat is set to the default number format for * and the NumberFormat is set to the default number format for
* the locale. The resulting format behaves the same as one * the locale. The resulting format behaves the same as one
* constructed from {@link #PluralFormat(const Locale& locale, UPlu ralType type, UErrorCode& status)} * constructed from {@link #PluralFormat(const Locale& locale, UPlu ralType type, UErrorCode& status)}
* with UPLURAL_TYPE_CARDINAL. * with UPLURAL_TYPE_CARDINAL.
* @param locale the <code>locale</code> to use to configure the forma tter. * @param locale the <code>locale</code> to use to configure the forma tter.
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @deprecated ICU 50 This method clears the pattern and might create * @deprecated ICU 50 This method clears the pattern and might create
* a different kind of PluralRules instance; * a different kind of PluralRules instance;
* use one of the constructors to create a new instance ins tead. * use one of the constructors to create a new instance ins tead.
*/ */
void setLocale(const Locale& locale, UErrorCode& status); void setLocale(const Locale& locale, UErrorCode& status);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Sets the number format used by this formatter. You only need to * Sets the number format used by this formatter. You only need to
* call this if you want a different number format than the default * call this if you want a different number format than the default
* formatter for the locale. * formatter for the locale.
* @param format the number format to use. * @param format the number format to use.
* @param status output param set to success/failure code on exit, wh ich * @param status output param set to success/failure code on exit, wh ich
* must not indicate a failure before the function call . * must not indicate a failure before the function call .
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
 End of changes. 7 change blocks. 
1 lines changed or deleted 7 lines changed or added


 plurrule.h   plurrule.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2008-2012, International Business Machines Corporation and * Copyright (C) 2008-2013, 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 204 skipping to change at line 204
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @return The predefined <code>PluralRules</code> object pointe r for * @return The predefined <code>PluralRules</code> object pointe r for
* this locale. If there's no predefined rules for this locale, * this locale. If there's no predefined rules for this locale,
* the rules for the closest parent in the locale hierar chy * the rules for the closest parent in the locale hierar chy
* that has one will be returned. The final fallback a lways * that has one will be returned. The final fallback a lways
* returns the default 'other' rules. * returns the default 'other' rules.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCod e& status); static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCod e& status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Provides access to the predefined <code>PluralRules</code> for a giv en * Provides access to the predefined <code>PluralRules</code> for a giv en
* locale and the plural type. * locale and the plural type.
* *
* @param locale The locale for which a <code>PluralRules</code> objec t is * @param locale The locale for which a <code>PluralRules</code> objec t is
* returned. * returned.
* @param type The plural type (e.g., cardinal or ordinal). * @param type The plural type (e.g., cardinal or ordinal).
* @param status Output param set to success/failure code on exit, whi ch * @param status Output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @return The predefined <code>PluralRules</code> object pointe r for * @return The predefined <code>PluralRules</code> object pointe r for
* this locale. If there's no predefined rules for this locale, * this locale. If there's no predefined rules for this locale,
* the rules for the closest parent in the locale hierar chy * the rules for the closest parent in the locale hierar chy
* that has one will be returned. The final fallback a lways * that has one will be returned. The final fallback a lways
* returns the default 'other' rules. * returns the default 'other' rules.
* @draft ICU 50 * @draft ICU 50
*/ */
static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralTy pe type, UErrorCode& status); static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralTy pe type, UErrorCode& status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Given a number, returns the keyword of the first rule that applies t o * Given a number, returns the keyword of the first rule that applies t o
* the number. This function can be used with isKeyword* functions to * the number. This function can be used with isKeyword* functions to
* determine the keyword for default plural rules. * determine the keyword for default plural 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.
* @return The keyword of the selected rule. * @return The keyword of the selected rule.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 rbbi.h   rbbi.h 
/* /*
*************************************************************************** ***************************************************************************
* Copyright (C) 1999-2012 International Business Machines Corporation * * Copyright (C) 1999-2013 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 647 skipping to change at line 647
* 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.
* @return *this * @return *this
* *
* @draft ICU 49 * @stable ICU 49
*/ */
virtual RuleBasedBreakIterator &refreshInputText(UText *input, UErrorCo de &status); 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.
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 rbnf.h   rbnf.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 1997-2012, International Business Machines Corporation and others. * Copyright (C) 1997-2013, 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 971 skipping to change at line 971
* @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 * Sets the decimal format symbols, which is generally not changed
* by the programmer or user. The formatter takes ownership of * by the programmer or user. The formatter takes ownership of
* symbolsToAdopt; the client must not delete it. * symbolsToAdopt; the client must not delete it.
* *
* @param symbolsToAdopt DecimalFormatSymbols to be adopted. * @param symbolsToAdopt DecimalFormatSymbols to be adopted.
* @draft ICU 49 * @stable ICU 49
*/ */
virtual void adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsToA dopt); virtual void adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsToA dopt);
/** /**
* Sets the decimal format symbols, which is generally not changed * Sets the decimal format symbols, which is generally not changed
* by the programmer or user. A clone of the symbols is created and * by the programmer or user. A clone of the symbols is created and
* the symbols is _not_ adopted; the client is still responsible for * the symbols is _not_ adopted; the client is still responsible for
* deleting it. * deleting it.
* *
* @param symbols DecimalFormatSymbols. * @param symbols DecimalFormatSymbols.
* @draft ICU 49 * @stable ICU 49
*/ */
virtual void setDecimalFormatSymbols(const DecimalFormatSymbols& symbol s); 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 );
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 rbtz.h   rbtz.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2008, International Business Machines Corporation and * * Copyright (C) 2007-2013, International Business Machines Corporation and *
* others. All Rights Reserved. * * others. All Rights Reserved. *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef RBTZ_H #ifndef RBTZ_H
#define RBTZ_H #define RBTZ_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
skipping to change at line 258 skipping to change at line 258
virtual UBool hasSameRules(const TimeZone& other) const; virtual UBool hasSameRules(const TimeZone& other) const;
/** /**
* Gets the first time zone transition after the base time. * Gets the first time zone transition after the base time.
* @param base The base time. * @param base The base time.
* @param inclusive Whether the base time is inclusive or not. * @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time. * @param result Receives the first transition after the base time.
* @return TRUE if the transition is found. * @return TRUE if the transition is found.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTr ansition& result) /*const*/; virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTr ansition& result) const;
/** /**
* Gets the most recent time zone transition before the base time. * Gets the most recent time zone transition before the base time.
* @param base The base time. * @param base The base time.
* @param inclusive Whether the base time is inclusive or not. * @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time. * @param result Receives the most recent transition before the base time.
* @return TRUE if the transition is found. * @return TRUE if the transition is found.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZo neTransition& result) /*const*/; virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZo neTransition& result) const;
/** /**
* Returns the number of <code>TimeZoneRule</code>s which represents ti me transitions, * Returns the number of <code>TimeZoneRule</code>s which represents ti me transitions,
* for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except
* <code>InitialTimeZoneRule</code>. The return value range is 0 or an y positive value. * <code>InitialTimeZoneRule</code>. The return value range is 0 or an y positive value.
* @param status Receives error status code. * @param status Receives error status code.
* @return The number of <code>TimeZoneRule</code>s representing time t ransitions. * @return The number of <code>TimeZoneRule</code>s representing time t ransitions.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual int32_t countTransitionRules(UErrorCode& status) /*const*/; virtual int32_t countTransitionRules(UErrorCode& status) const;
/** /**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZ oneRule</code> * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZ oneRule</code>
* which represent time transitions for this time zone. On successful return, * which represent time transitions for this time zone. On successful return,
* the argument initial points to non-NULL <code>InitialTimeZoneRule</c ode> and * the argument initial points to non-NULL <code>InitialTimeZoneRule</c ode> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</ code> * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</ code>
* instances up to the size specified by trscount. The results are ref erencing the * instances up to the size specified by trscount. The results are ref erencing the
* rule instance held by this time zone instance. Therefore, after thi s time zone * rule instance held by this time zone instance. Therefore, after thi s time zone
* is destructed, they are no longer available. * is destructed, they are no longer available.
* @param initial Receives the initial timezone rule * @param initial Receives the initial timezone rule
* @param trsrules Receives the timezone transition rules * @param trsrules Receives the timezone transition rules
* @param trscount On input, specify the size of the array 'transi tions' receiving * @param trscount On input, specify the size of the array 'transi tions' receiving
* the timezone transition rules. On output, actu al number of * the timezone transition rules. On output, actu al number of
* rules filled in the array will be set. * rules filled in the array will be set.
* @param status Receives error status code. * @param status Receives error status code.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& stat us) /*const*/; const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& stat us) const;
/** /**
* 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;
private: private:
void deleteRules(void); void deleteRules(void);
void deleteTransitions(void); void deleteTransitions(void);
UVector* copyRules(UVector* source); UVector* copyRules(UVector* source);
TimeZoneRule* findRuleInFinal(UDate date, UBool local, TimeZoneRule* findRuleInFinal(UDate date, UBool local,
int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const; int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const;
UBool findNext(UDate base, UBool inclusive, UDate& time, TimeZoneRule*& from, TimeZoneRule*& to) const; UBool findNext(UDate base, UBool inclusive, UDate& time, TimeZoneRule*& from, TimeZoneRule*& to) const;
UBool findPrev(UDate base, UBool inclusive, UDate& time, TimeZoneRule*& from, TimeZoneRule*& to) const; UBool findPrev(UDate base, UBool inclusive, UDate& time, TimeZoneRule*& from, TimeZoneRule*& to) const;
int32_t getLocalDelta(int32_t rawBefore, int32_t dstBefore, int32_t raw After, int32_t dstAfter, int32_t getLocalDelta(int32_t rawBefore, int32_t dstBefore, int32_t raw After, int32_t dstAfter,
int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const; int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const;
UDate getTransitionTime(Transition* transition, UBool local, UDate getTransitionTime(Transition* transition, UBool local,
int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const; int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const;
void getOffsetInternal(UDate date, UBool local, int32_t NonExistingTime Opt, int32_t DuplicatedTimeOpt, void getOffsetInternal(UDate date, UBool local, int32_t NonExistingTime Opt, int32_t DuplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& ec) const; int32_t& rawOffset, int32_t& dstOffset, UErrorCode& ec) const;
void completeConst(UErrorCode &status) const;
InitialTimeZoneRule *fInitialRule; InitialTimeZoneRule *fInitialRule;
UVector *fHistoricRules; UVector *fHistoricRules;
UVector *fFinalRules; UVector *fFinalRules;
UVector *fHistoricTransitions; UVector *fHistoricTransitions;
UBool fUpToDate; UBool fUpToDate;
public: public:
/** /**
* 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
 End of changes. 7 change blocks. 
6 lines changed or deleted 7 lines changed or added


 regex.h   regex.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2002-2012, International Business Machines * Copyright (C) 2002-2013, 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 71 skipping to change at line 71
class RegexCImpl; class RegexCImpl;
class RegexMatcher; class RegexMatcher;
class RegexPattern; class RegexPattern;
struct REStackFrame; struct REStackFrame;
class RuleBasedBreakIterator; class RuleBasedBreakIterator;
class UnicodeSet; class UnicodeSet;
class UVector; class UVector;
class UVector32; class UVector32;
class UVector64; class UVector64;
#ifndef U_HIDE_INTERNAL_API
/** /**
* 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
#define RegexPatternDump(pat) #define RegexPatternDump(pat)
#endif #endif
#endif /* U_HIDE_INTERNAL_API */
/** /**
* Class <code>RegexPattern</code> represents a compiled regular expressio n. It includes * Class <code>RegexPattern</code> represents a compiled regular expressio n. It includes
* factory methods for creating a RegexPattern object from the source (str ing) form * factory methods for creating a RegexPattern object from the source (str ing) form
* of a regular expression, methods for creating RegexMatchers that allow the pattern * of a regular expression, methods for creating RegexMatchers that allow the pattern
* to be applied to input text, and a few convenience methods for simple c ommon * to be applied to input text, and a few convenience methods for simple c ommon
* uses of regular expressions. * uses of regular expressions.
* *
* <p>Class RegexPattern is not intended to be subclassed.</p> * <p>Class RegexPattern is not intended to be subclassed.</p>
* *
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 rep.h   rep.h 
/* /*
************************************************************************** **************************************************************************
* Copyright (C) 1999-2005, International Business Machines Corporation and * Copyright (C) 1999-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
************************************************************************** **************************************************************************
* Date Name Description * Date Name Description
* 11/17/99 aliu Creation. Ported from java. Modified to * 11/17/99 aliu Creation. Ported from java. Modified to
* match current UnicodeString API. Forced * match current UnicodeString API. Forced
* to use name "handleReplaceBetween" because * to use name "handleReplaceBetween" because
* of existing methods in UnicodeString. * of existing methods in UnicodeString.
************************************************************************** **************************************************************************
*/ */
skipping to change at line 208 skipping to change at line 208
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
virtual Replaceable *clone() const; virtual Replaceable *clone() const;
protected: protected:
/** /**
* Default constructor. * Default constructor.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
Replaceable(); inline Replaceable();
/* /*
* Assignment operator not declared. The compiler will provide one * Assignment operator not declared. The compiler will provide one
* which does nothing since this class does not contain any data member s. * which does nothing since this class does not contain any data member s.
* API/code coverage may show the assignment operator as present and * API/code coverage may show the assignment operator as present and
* untested - ignore. * untested - ignore.
* Subclasses need this assignment operator if they use compiler-provid ed * Subclasses need this assignment operator if they use compiler-provid ed
* assignment operators of their own. An alternative to not declaring o ne * assignment operators of their own. An alternative to not declaring o ne
* here would be to declare and empty-implement a protected or public o ne. * here would be to declare and empty-implement a protected or public o ne.
Replaceable &Replaceable::operator=(const Replaceable &); Replaceable &Replaceable::operator=(const Replaceable &);
skipping to change at line 240 skipping to change at line 240
*/ */
virtual UChar getCharAt(int32_t offset) const = 0; virtual UChar getCharAt(int32_t offset) const = 0;
/** /**
* Virtual version of char32At(). * Virtual version of char32At().
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
virtual UChar32 getChar32At(int32_t offset) const = 0; virtual UChar32 getChar32At(int32_t offset) const = 0;
}; };
inline Replaceable::Replaceable() {}
inline int32_t inline int32_t
Replaceable::length() const { Replaceable::length() const {
return getLength(); return getLength();
} }
inline UChar inline UChar
Replaceable::charAt(int32_t offset) const { Replaceable::charAt(int32_t offset) const {
return getCharAt(offset); return getCharAt(offset);
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 simpletz.h   simpletz.h 
/* /*
************************************************************************** ****** ************************************************************************** ******
* Copyright (C) 1997-2011, International Business Machines * * Copyright (C) 1997-2013, International Business Machines *
* Corporation and others. All Rights Reserved. * * Corporation and others. All Rights Reserved. *
************************************************************************** ****** ************************************************************************** ******
* *
* File SIMPLETZ.H * File SIMPLETZ.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/21/97 aliu Overhauled header. * 04/21/97 aliu Overhauled header.
* 08/10/98 stephen JDK 1.2 sync * 08/10/98 stephen JDK 1.2 sync
skipping to change at line 624 skipping to change at line 624
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset, virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
int32_t& dstOffset, UErrorCode& ec) const; int32_t& dstOffset, UErrorCode& ec) const;
/** /**
* 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;
/** /**
* Returns the TimeZone's raw GMT offset (i.e., the number of milliseco nds to add * Returns the TimeZone's raw GMT offset (i.e., the number of milliseco nds to add
* to GMT to get local time, before taking daylight savings time into a ccount). * to GMT to get local time, before taking daylight savings time into a ccount).
* *
* @return The TimeZone's raw GMT offset. * @return The TimeZone's raw GMT offset.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t getRawOffset(void) const; virtual int32_t getRawOffset(void) const;
skipping to change at line 712 skipping to change at line 712
virtual TimeZone* clone(void) const; virtual TimeZone* clone(void) const;
/** /**
* Gets the first time zone transition after the base time. * Gets the first time zone transition after the base time.
* @param base The base time. * @param base The base time.
* @param inclusive Whether the base time is inclusive or not. * @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time. * @param result Receives the first transition after the base time.
* @return TRUE if the transition is found. * @return TRUE if the transition is found.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTr ansition& result) /*const*/; virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTr ansition& result) const;
/** /**
* Gets the most recent time zone transition before the base time. * Gets the most recent time zone transition before the base time.
* @param base The base time. * @param base The base time.
* @param inclusive Whether the base time is inclusive or not. * @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time. * @param result Receives the most recent transition before the base time.
* @return TRUE if the transition is found. * @return TRUE if the transition is found.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZo neTransition& result) /*const*/; virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZo neTransition& result) const;
/** /**
* Returns the number of <code>TimeZoneRule</code>s which represents ti me transitions, * Returns the number of <code>TimeZoneRule</code>s which represents ti me transitions,
* for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except
* <code>InitialTimeZoneRule</code>. The return value range is 0 or an y positive value. * <code>InitialTimeZoneRule</code>. The return value range is 0 or an y positive value.
* @param status Receives error status code. * @param status Receives error status code.
* @return The number of <code>TimeZoneRule</code>s representing time t ransitions. * @return The number of <code>TimeZoneRule</code>s representing time t ransitions.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual int32_t countTransitionRules(UErrorCode& status) /*const*/; virtual int32_t countTransitionRules(UErrorCode& status) const;
/** /**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZ oneRule</code> * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZ oneRule</code>
* which represent time transitions for this time zone. On successful return, * which represent time transitions for this time zone. On successful return,
* the argument initial points to non-NULL <code>InitialTimeZoneRule</c ode> and * the argument initial points to non-NULL <code>InitialTimeZoneRule</c ode> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</ code> * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</ code>
* instances up to the size specified by trscount. The results are ref erencing the * instances up to the size specified by trscount. The results are ref erencing the
* rule instance held by this time zone instance. Therefore, after thi s time zone * rule instance held by this time zone instance. Therefore, after thi s time zone
* is destructed, they are no longer available. * is destructed, they are no longer available.
* @param initial Receives the initial timezone rule * @param initial Receives the initial timezone rule
* @param trsrules Receives the timezone transition rules * @param trsrules Receives the timezone transition rules
* @param trscount On input, specify the size of the array 'transi tions' receiving * @param trscount On input, specify the size of the array 'transi tions' receiving
* the timezone transition rules. On output, actu al number of * the timezone transition rules. On output, actu al number of
* rules filled in the array will be set. * rules filled in the array will be set.
* @param status Receives error status code. * @param status Receives error status code.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& stat us) /*const*/; const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& stat us) const;
public: public:
/** /**
* Override TimeZone Returns a unique class ID POLYMORPHICALLY. Pure vi rtual * Override TimeZone Returns a unique class ID POLYMORPHICALLY. Pure vi rtual
* override. This method is to implement a simple version of RTTI, sinc e not all C++ * override. This method is to implement a simple version of RTTI, sinc e not all C++
* compilers support genuine RTTI. Polymorphic operator==() and clone() methods call * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call
* this method. * this method.
* *
* @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
skipping to change at line 872 skipping to change at line 872
static const int8_t STATICMONTHLENGTH[12]; // lengths of the months static const int8_t STATICMONTHLENGTH[12]; // lengths of the months
EMode startMode, endMode; // flags indicating what kind of rules the DST rules are EMode startMode, endMode; // flags indicating what kind of rules the DST rules are
/** /**
* A positive value indicating the amount of time saved during DST in m s. * A positive value indicating the amount of time saved during DST in m s.
* Typically one hour; sometimes 30 minutes. * Typically one hour; sometimes 30 minutes.
*/ */
int32_t dstSavings; int32_t dstSavings;
/* Private for BasicTimeZone implementation */ /* Private for BasicTimeZone implementation */
void checkTransitionRules(UErrorCode& status) const;
void initTransitionRules(UErrorCode& status); void initTransitionRules(UErrorCode& status);
void clearTransitionRules(void); void clearTransitionRules(void);
void deleteTransitionRules(void); void deleteTransitionRules(void);
UBool transitionRulesInitialized; UBool transitionRulesInitialized;
InitialTimeZoneRule* initialRule; InitialTimeZoneRule* initialRule;
TimeZoneTransition* firstTransition; TimeZoneTransition* firstTransition;
AnnualTimeZoneRule* stdRule; AnnualTimeZoneRule* stdRule;
AnnualTimeZoneRule* dstRule; AnnualTimeZoneRule* dstRule;
}; };
 End of changes. 7 change blocks. 
6 lines changed or deleted 7 lines changed or added


 smpdtfmt.h   smpdtfmt.h 
/* /*
* Copyright (C) 1997-2012, International Business Machines Corporation and * Copyright (C) 1997-2013, 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 62 skipping to change at line 62
* which is the standard milliseconds since 24:00 GMT, Jan 1, 1970. * which is the standard milliseconds since 24:00 GMT, Jan 1, 1970.
* <P> * <P>
* Clients are encouraged to create a date-time formatter using DateFormat: :getInstance(), * Clients are encouraged to create a date-time formatter using DateFormat: :getInstance(),
* getDateInstance(), getDateInstance(), or getDateTimeInstance() rather th an * getDateInstance(), getDateInstance(), or getDateTimeInstance() rather th an
* explicitly constructing an instance of SimpleDateFormat. This way, the client * explicitly constructing an instance of SimpleDateFormat. This way, the client
* is guaranteed to get an appropriate formatting pattern for whatever loca le the * is guaranteed to get an appropriate formatting pattern for whatever loca le the
* program is running in. However, if the client needs something more unus ual than * program is running in. However, if the client needs something more unus ual than
* the default patterns in the locales, he can construct a SimpleDateFormat directly * the default patterns in the locales, he can construct a SimpleDateFormat directly
* and give it an appropriate pattern (or use one of the factory methods on DateFormat * and give it an appropriate pattern (or use one of the factory methods on DateFormat
* and modify the pattern after the fact with toPattern() and applyPattern( ). * and modify the pattern after the fact with toPattern() and applyPattern( ).
* <P> *
* Date/Time format syntax: * <p><strong>Date and Time Patterns:</strong></p>
* <P> *
* The date/time format is specified by means of a string time pattern. In * <p>Date and time formats are specified by <em>date and time pattern</em>
this strings.
* pattern, all ASCII letters are reserved as pattern letters, which are de * Within date and time pattern strings, all unquoted ASCII letters [A-Za-z
fined ] are reserved
* as the following: * as pattern letters representing calendar fields. <code>SimpleDateFormat<
* <pre> /code> supports
* \code * the date and time formatting algorithm and pattern letters defined by <a
* Symbol Meaning Presentation Example href="http://www.unicode.org/reports/tr35/">UTS#35
* ------ ------- ------------ ------- * Unicode Locale Data Markup Language (LDML)</a>. The following pattern le
* G era designator (Text) AD tters are
* y year (Number) 1996 * currently available:</p>
* Y year (week of year) (Number) 1997 *
* u extended year (Number) 4601 * <table border="1">
* U cyclic year name (Text,NumFallback) ren-chen (29) * <tr>
* Q Quarter (Text & Number) Q2 & 02 * <th>Field</th>
* M month in year (Text & Number) July & 07 * <th style="text-align: center">Sym.</th>
* d day in month (Number) 10 * <th style="text-align: center">No.</th>
* h hour in am/pm (1~12) (Number) 12 * <th>Example</th>
* H hour in day (0~23) (Number) 0 * <th>Description</th>
* m minute in hour (Number) 30 * </tr>
* s second in minute (Number) 55 * <tr>
* S fractional second (Number) 978 * <th rowspan="3">era</th>
* (maximum resolution of SSS; truncated if shorter, zero-padded i * <td style="text-align: center" rowspan="3">G</td>
f longer) * <td style="text-align: center">1..3</td>
* E day of week (Text) Tuesday * <td>AD</td>
* e day of week (local 1~7) (Text & Number) Tues & 2 * <td rowspan="3">Era - Replaced with the Era string for the curre
* D day in year (Number) 189 nt date. One to three letters for the
* F day of week in month (Number) 2 (2nd Wed in July) * abbreviated form, four letters for the long form, five for the n
* w week in year (Number) 27 arrow form.</td>
* W week in month (Number) 2 * </tr>
* a am/pm marker (Text) PM * <tr>
* k hour in day (1~24) (Number) 24 * <td style="text-align: center">4</td>
* K hour in am/pm (0~11) (Number) 0 * <td>Anno Domini</td>
* z time zone (Text) PST * </tr>
* zzzz time zone (Text) Pacific Standard Ti * <tr>
me * <td style="text-align: center">5</td>
* Z time zone (RFC 822) (Number) -0800 * <td>A</td>
* ZZZZ time zone (RFC 822) (Text & Number) GMT-08:00 * </tr>
* ZZZZZ time zone (ISO 8601) (Text & Number) -08:00 & Z * <tr>
* v time zone (generic) (Text) PT * <th rowspan="6">year</th>
* vvvv time zone (generic) (Text) Pacific Time * <td style="text-align: center">y</td>
* V time zone (abreviation) (Text) PST * <td style="text-align: center">1..n</td>
* VVVV time zone (location) (Text) United States Time * <td>1996</td>
(Los Angeles) * <td>Year. Normally the length specifies the padding, but for two
* g Julian day (Number) 2451334 letters it also specifies the maximum
* A milliseconds in day (Number) 69540000 * length. Example:<div align="center">
* q stand alone quarter (Text & Number) Q2 & 02 * <center>
* L stand alone month (Text & Number) July & 07 * <table border="1" cellpadding="2" cellspacing="0">
* c stand alone day of week (Text & Number) Tuesday & 2 * <tr>
* ' escape for text (Delimiter) 'Date=' * <th>Year</th>
* '' single quote (Literal) 'o''clock' * <th style="text-align: right">y</th>
* \endcode * <th style="text-align: right">yy</th>
* </pre> * <th style="text-align: right">yyy</th>
* The count of pattern letters determine the format. * <th style="text-align: right">yyyy</th>
* <P> * <th style="text-align: right">yyyyy</th>
* (Text): 4 or more, use full form, &lt;4, use short or abbreviated form i * </tr>
f it * <tr>
* exists. (e.g., "EEEE" produces "Monday", "EEE" produces "Mon") * <td>AD 1</td>
* <P> * <td style="text-align: right">1</td>
* (Number): the minimum number of digits. Shorter numbers are zero-padded * <td style="text-align: right">01</td>
to * <td style="text-align: right">001</td>
* this amount (e.g. if "m" produces "6", "mm" produces "06"). Year is hand * <td style="text-align: right">0001</td>
led * <td style="text-align: right">00001</td>
* specially; that is, if the count of 'y' is 2, the Year will be truncated * </tr>
to 2 digits. * <tr>
* (e.g., if "yyyy" produces "1997", "yy" produces "97".) * <td>AD 12</td>
* Unlike other fields, fractional seconds are padded on the right with zer * <td style="text-align: right">12</td>
o. * <td style="text-align: right">12</td>
* <P> * <td style="text-align: right">012</td>
* (Text & Number): 3 or over, use text, otherwise use number. (e.g., "M" * <td style="text-align: right">0012</td>
produces "1", * <td style="text-align: right">00012</td>
* "MM" produces "01", "MMM" produces "Jan", and "MMMM" produces "January". * </tr>
) * <tr>
* <P> * <td>AD 123</td>
* (Text,NumFallback): Behaves like Text if there is supporting data, like * <td style="text-align: right">123</td>
* Number otherwise. * <td style="text-align: right">23</td>
* <td style="text-align: right">123</td>
* <td style="text-align: right">0123</td>
* <td style="text-align: right">00123</td>
* </tr>
* <tr>
* <td>AD 1234</td>
* <td style="text-align: right">1234</td>
* <td style="text-align: right">34</td>
* <td style="text-align: right">1234</td>
* <td style="text-align: right">1234</td>
* <td style="text-align: right">01234</td>
* </tr>
* <tr>
* <td>AD 12345</td>
* <td style="text-align: right">12345</td>
* <td style="text-align: right">45</td>
* <td style="text-align: right">12345</td>
* <td style="text-align: right">12345</td>
* <td style="text-align: right">12345</td>
* </tr>
* </table>
* </center></div>
* </td>
* </tr>
* <tr>
* <td style="text-align: center">Y</td>
* <td style="text-align: center">1..n</td>
* <td>1997</td>
* <td>Year (in "Week of Year" based calendars). Normally the lengt
h specifies the padding,
* but for two letters it also specifies the maximum length. This y
ear designation is used in ISO
* year-week calendar as defined by ISO 8601, but can be used in no
n-Gregorian based calendar systems
* where week date processing is desired. May not always be the sam
e value as calendar year.</td>
* </tr>
* <tr>
* <td style="text-align: center">u</td>
* <td style="text-align: center">1..n</td>
* <td>4601</td>
* <td>Extended year. This is a single number designating the year
of this calendar system, encompassing
* all supra-year fields. For example, for the Julian calendar syst
em, year numbers are positive, with an
* era of BCE or CE. An extended year value for the Julian calendar
system assigns positive values to CE
* years and negative values to BCE years, with 1 BCE being year 0.
</td>
* </tr>
* <tr>
* <td style="text-align: center" rowspan="3">U</td>
* <td style="text-align: center">1..3</td>
* <td>&#30002;&#23376;</td>
* <td rowspan="3">Cyclic year name. Calendars such as the Chinese
lunar calendar (and related calendars)
* and the Hindu calendars use 60-year cycles of year names. Use on
e through three letters for the abbreviated
* name, four for the full name, or five for the narrow name (curre
ntly the data only provides abbreviated names,
* which will be used for all requested name widths). If the calend
ar does not provide cyclic year name data,
* or if the year value to be formatted is out of the range of year
s for which cyclic name data is provided,
* then numeric formatting is used (behaves like 'y').</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>(currently also &#30002;&#23376;)</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>(currently also &#30002;&#23376;)</td>
* </tr>
* <tr>
* <th rowspan="6">quarter</th>
* <td rowspan="3" style="text-align: center">Q</td>
* <td style="text-align: center">1..2</td>
* <td>02</td>
* <td rowspan="3">Quarter - Use one or two for the numerical quart
er, three for the abbreviation, or four
* for the full name.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>Q2</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>2nd quarter</td>
* </tr>
* <tr>
* <td rowspan="3" style="text-align: center">q</td>
* <td style="text-align: center">1..2</td>
* <td>02</td>
* <td rowspan="3"><b>Stand-Alone</b> Quarter - Use one or two for
the numerical quarter, three for the abbreviation,
* or four for the full name.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>Q2</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>2nd quarter</td>
* </tr>
* <tr>
* <th rowspan="8">month</th>
* <td rowspan="4" style="text-align: center">M</td>
* <td style="text-align: center">1..2</td>
* <td>09</td>
* <td rowspan="4">Month - Use one or two for the numerical month,
three for the abbreviation, four for
* the full name, or five for the narrow name.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>Sept</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>September</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>S</td>
* </tr>
* <tr>
* <td rowspan="4" style="text-align: center">L</td>
* <td style="text-align: center">1..2</td>
* <td>09</td>
* <td rowspan="4"><b>Stand-Alone</b> Month - Use one or two for th
e numerical month, three for the abbreviation,
* or four for the full name, or 5 for the narrow name.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>Sept</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>September</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>S</td>
* </tr>
* <tr>
* <th rowspan="2">week</th>
* <td style="text-align: center">w</td>
* <td style="text-align: center">1..2</td>
* <td>27</td>
* <td>Week of Year.</td>
* </tr>
* <tr>
* <td style="text-align: center">W</td>
* <td style="text-align: center">1</td>
* <td>3</td>
* <td>Week of Month</td>
* </tr>
* <tr>
* <th rowspan="4">day</th>
* <td style="text-align: center">d</td>
* <td style="text-align: center">1..2</td>
* <td>1</td>
* <td>Date - Day of the month</td>
* </tr>
* <tr>
* <td style="text-align: center">D</td>
* <td style="text-align: center">1..3</td>
* <td>345</td>
* <td>Day of year</td>
* </tr>
* <tr>
* <td style="text-align: center">F</td>
* <td style="text-align: center">1</td>
* <td>2</td>
* <td>Day of Week in Month. The example is for the 2nd Wed in July
</td>
* </tr>
* <tr>
* <td style="text-align: center">g</td>
* <td style="text-align: center">1..n</td>
* <td>2451334</td>
* <td>Modified Julian day. This is different from the conventional
Julian day number in two regards.
* First, it demarcates days at local zone midnight, rather than no
on GMT. Second, it is a local number;
* that is, it depends on the local time zone. It can be thought of
as a single number that encompasses
* all the date-related fields.</td>
* </tr>
* <tr>
* <th rowspan="14">week<br>
* day</th>
* <td rowspan="4" style="text-align: center">E</td>
* <td style="text-align: center">1..3</td>
* <td>Tues</td>
* <td rowspan="4">Day of week - Use one through three letters for
the short day, or four for the full name,
* five for the narrow name, or six for the short name.</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>Tuesday</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>T</td>
* </tr>
* <tr>
* <td style="text-align: center">6</td>
* <td>Tu</td>
* </tr>
* <tr>
* <td rowspan="5" style="text-align: center">e</td>
* <td style="text-align: center">1..2</td>
* <td>2</td>
* <td rowspan="5">Local day of week. Same as E except adds a numer
ic value that will depend on the local
* starting day of the week, using one or two letters. For this exa
mple, Monday is the first day of the week.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>Tues</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>Tuesday</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>T</td>
* </tr>
* <tr>
* <td style="text-align: center">6</td>
* <td>Tu</td>
* </tr>
* <tr>
* <td rowspan="5" style="text-align: center">c</td>
* <td style="text-align: center">1</td>
* <td>2</td>
* <td rowspan="5"><b>Stand-Alone</b> local day of week - Use one l
etter for the local numeric value (same
* as 'e'), three for the short day, four for the full name, five f
or the narrow name, or six for
* the short name.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>Tues</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>Tuesday</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>T</td>
* </tr>
* <tr>
* <td style="text-align: center">6</td>
* <td>Tu</td>
* </tr>
* <tr>
* <th>period</th>
* <td style="text-align: center">a</td>
* <td style="text-align: center">1</td>
* <td>AM</td>
* <td>AM or PM</td>
* </tr>
* <tr>
* <th rowspan="4">hour</th>
* <td style="text-align: center">h</td>
* <td style="text-align: center">1..2</td>
* <td>11</td>
* <td>Hour [1-12]. When used in skeleton data or in a skeleton pas
sed in an API for flexible data pattern
* generation, it should match the 12-hour-cycle format preferred b
y the locale (h or K); it should not match
* a 24-hour-cycle format (H or k). Use hh for zero padding.</td>
* </tr>
* <tr>
* <td style="text-align: center">H</td>
* <td style="text-align: center">1..2</td>
* <td>13</td>
* <td>Hour [0-23]. When used in skeleton data or in a skeleton pas
sed in an API for flexible data pattern
* generation, it should match the 24-hour-cycle format preferred b
y the locale (H or k); it should not match a
* 12-hour-cycle format (h or K). Use HH for zero padding.</td>
* </tr>
* <tr>
* <td style="text-align: center">K</td>
* <td style="text-align: center">1..2</td>
* <td>0</td>
* <td>Hour [0-11]. When used in a skeleton, only matches K or h, s
ee above. Use KK for zero padding.</td>
* </tr>
* <tr>
* <td style="text-align: center">k</td>
* <td style="text-align: center">1..2</td>
* <td>24</td>
* <td>Hour [1-24]. When used in a skeleton, only matches k or H, s
ee above. Use kk for zero padding.</td>
* </tr>
* <tr>
* <th>minute</th>
* <td style="text-align: center">m</td>
* <td style="text-align: center">1..2</td>
* <td>59</td>
* <td>Minute. Use one or two for zero padding.</td>
* </tr>
* <tr>
* <th rowspan="3">second</th>
* <td style="text-align: center">s</td>
* <td style="text-align: center">1..2</td>
* <td>12</td>
* <td>Second. Use one or two for zero padding.</td>
* </tr>
* <tr>
* <td style="text-align: center">S</td>
* <td style="text-align: center">1..n</td>
* <td>3456</td>
* <td>Fractional Second - truncates (like other time fields) to th
e count of letters.
* (example shows display using pattern SSSS for seconds value 12.3
4567)</td>
* </tr>
* <tr>
* <td style="text-align: center">A</td>
* <td style="text-align: center">1..n</td>
* <td>69540000</td>
* <td>Milliseconds in day. This field behaves <i>exactly</i> like
a composite of all time-related fields,
* not including the zone fields. As such, it also reflects discont
inuities of those fields on DST transition
* days. On a day of DST onset, it will jump forward. On a day of D
ST cessation, it will jump backward. This
* reflects the fact that is must be combined with the offset field
to obtain a unique local time value.</td>
* </tr>
* <tr>
* <th rowspan="23">zone</th>
* <td rowspan="2" style="text-align: center">z</td>
* <td style="text-align: center">1..3</td>
* <td>PDT</td>
* <td>The <i>short specific non-location format</i>.
* Where that is unavailable, falls back to the <i>short localized
GMT format</i> ("O").</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>Pacific Daylight Time</td>
* <td>The <i>long specific non-location format</i>.
* Where that is unavailable, falls back to the <i>long localized G
MT format</i> ("OOOO").</td>
* </tr>
* <tr>
* <td rowspan="3" style="text-align: center">Z</td>
* <td style="text-align: center">1..3</td>
* <td>-0800</td>
* <td>The <i>ISO8601 basic format</i> with hours, minutes and opti
onal seconds fields.
* The format is equivalent to RFC 822 zone format (when optional s
econds field is absent).
* This is equivalent to the "xxxx" specifier.</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>GMT-8:00</td>
* <td>The <i>long localized GMT format</i>.
* This is equivalent to the "OOOO" specifier.</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>-08:00<br>
* -07:52:58</td>
* <td>The <i>ISO8601 extended format</i> with hours, minutes and o
ptional seconds fields.
* The ISO8601 UTC indicator "Z" is used when local time offset is
0.
* This is equivalent to the "XXXXX" specifier.</td>
* </tr>
* <tr>
* <td rowspan="2" style="text-align: center">O</td>
* <td style="text-align: center">1</td>
* <td>GMT-8</td>
* <td>The <i>short localized GMT format</i>.</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>GMT-08:00</td>
* <td>The <i>long localized GMT format</i>.</td>
* </tr>
* <tr>
* <td rowspan="2" style="text-align: center">v</td>
* <td style="text-align: center">1</td>
* <td>PT</td>
* <td>The <i>short generic non-location format</i>.
* Where that is unavailable, falls back to the <i>generic location
format</i> ("VVVV"),
* then the <i>short localized GMT format</i> as the final fallback
.</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>Pacific Time</td>
* <td>The <i>long generic non-location format</i>.
* Where that is unavailable, falls back to <i>generic location for
mat</i> ("VVVV").
* </tr>
* <tr>
* <td rowspan="4" style="text-align: center">V</td>
* <td style="text-align: center">1</td>
* <td>uslax</td>
* <td>The short time zone ID.
* Where that is unavailable, the special short time zone ID <i>unk
</i> (Unknown Zone) is used.<br>
* <i><b>Note</b>: This specifier was originally used for a variant
of the short specific non-location format,
* but it was deprecated in the later version of the LDML specifica
tion. In CLDR 23/ICU 51, the definition of
* the specifier was changed to designate a short time zone ID.</i>
</td>
* </tr>
* <tr>
* <td style="text-align: center">2</td>
* <td>America/Los_Angeles</td>
* <td>The long time zone ID.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>Los Angeles</td>
* <td>The exemplar city (location) for the time zone.
* Where that is unavailable, the localized exemplar city name for
the special zone <i>Etc/Unknown</i> is used
* as the fallback (for example, "Unknown City"). </td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>Los Angeles Time</td>
* <td>The <i>generic location format</i>.
* Where that is unavailable, falls back to the <i>long localized G
MT format</i> ("OOOO";
* Note: Fallback is only necessary with a GMT-style Time Zone ID,
like Etc/GMT-830.)<br>
* This is especially useful when presenting possible timezone choi
ces for user selection,
* since the naming is more uniform than the "v" format.</td>
* </tr>
* <tr>
* <td rowspan="5" style="text-align: center">X</td>
* <td style="text-align: center">1</td>
* <td>-08<br>
* +0530<br>
* Z</td>
* <td>The <i>ISO8601 basic format</i> with hours field and optiona
l minutes field.
* The ISO8601 UTC indicator "Z" is used when local time offset is
0.</td>
* </tr>
* <tr>
* <td style="text-align: center">2</td>
* <td>-0800<br>
* Z</td>
* <td>The <i>ISO8601 basic format</i> with hours and minutes field
s.
* The ISO8601 UTC indicator "Z" is used when local time offset is
0.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>-08:00<br>
* Z</td>
* <td>The <i>ISO8601 extended format</i> with hours and minutes fi
elds.
* The ISO8601 UTC indicator "Z" is used when local time offset is
0.</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>-0800<br>
* -075258<br>
* Z</td>
* <td>The <i>ISO8601 basic format</i> with hours, minutes and opti
onal seconds fields.
* (Note: The seconds field is not supported by the ISO8601 specifi
cation.)
* The ISO8601 UTC indicator "Z" is used when local time offset is
0.</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>-08:00<br>
* -07:52:58<br>
* Z</td>
* <td>The <i>ISO8601 extended format</i> with hours, minutes and o
ptional seconds fields.
* (Note: The seconds field is not supported by the ISO8601 specifi
cation.)
* The ISO8601 UTC indicator "Z" is used when local time offset is
0.</td>
* </tr>
* <tr>
* <td rowspan="5" style="text-align: center">x</td>
* <td style="text-align: center">1</td>
* <td>-08<br>
* +0530</td>
* <td>The <i>ISO8601 basic format</i> with hours field and optiona
l minutes field.</td>
* </tr>
* <tr>
* <td style="text-align: center">2</td>
* <td>-0800</td>
* <td>The <i>ISO8601 basic format</i> with hours and minutes field
s.</td>
* </tr>
* <tr>
* <td style="text-align: center">3</td>
* <td>-08:00</td>
* <td>The <i>ISO8601 extended format</i> with hours and minutes fi
elds.</td>
* </tr>
* <tr>
* <td style="text-align: center">4</td>
* <td>-0800<br>
* -075258</td>
* <td>The <i>ISO8601 basic format</i> with hours, minutes and opti
onal seconds fields.
* (Note: The seconds field is not supported by the ISO8601 specifi
cation.)</td>
* </tr>
* <tr>
* <td style="text-align: center">5</td>
* <td>-08:00<br>
* -07:52:58</td>
* <td>The <i>ISO8601 extended format</i> with hours, minutes and o
ptional seconds fields.
* (Note: The seconds field is not supported by the ISO8601 specifi
cation.)</td>
* </tr>
* </table>
*
* <P> * <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:
skipping to change at line 776 skipping to change at line 1252
* 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_INTERNAL_API for the following draft metho d since it is virtual */ /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method s ince it is virtual */
/** /**
* Set a particular UDisplayContext value in the formatter, such as * Set a particular UDisplayContext value in the formatter, such as
* UDISPCTX_CAPITALIZATION_FOR_STANDALONE. * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
* @param value The UDisplayContext value to set. * @param value The UDisplayContext value to set.
* @param status Input/output status. If at entry this indicates a fail ure * @param status Input/output status. If at entry this indicates a fail ure
* status, the function will do nothing; otherwise this w ill be * status, the function will do nothing; otherwise this w ill be
* updated with any new status from the function. * updated with any new status from the function.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
virtual void setContext(UDisplayContext value, UErrorCode& status); virtual void setContext(UDisplayContext value, UErrorCode& status);
/* Cannot use #ifndef U_HIDE_INTERNAL_API for the following draft metho d since it is virtual */ /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method s ince it is virtual */
/** /**
* Get the formatter's UDisplayContext value for the specified UDisplay ContextType, * Get the formatter's UDisplayContext value for the specified UDisplay ContextType,
* such as UDISPCTX_TYPE_CAPITALIZATION. * such as UDISPCTX_TYPE_CAPITALIZATION.
* @param type The UDisplayContextType whose value to return * @param type The UDisplayContextType whose value to return
* @param status Input/output status. If at entry this indicates a fail ure * @param status Input/output status. If at entry this indicates a fail ure
* status, the function will do nothing; otherwise this w ill be * status, the function will do nothing; otherwise this w ill be
* updated with any new status from the function. * updated with any new status from the function.
* @return The UDisplayContextValue for the specified type. * @return The UDisplayContextValue for the specified type.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode & status) const; virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode & status) const;
/* Cannot use #ifndef U_HIDE_INTERNAL_API for the following methods sin ce they are virtual */ /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following methods sin ce they are virtual */
/** /**
* Sets the TimeZoneFormat to be used by this date/time formatter. * Sets the TimeZoneFormat to be used by this date/time formatter.
* The caller should not delete the TimeZoneFormat object after * The caller should not delete the TimeZoneFormat object after
* it is adopted by this call. * it is adopted by this call.
* @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted . * @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted .
* @internal ICU 49 technology preview * @internal ICU 49 technology preview
 End of changes. 6 change blocks. 
84 lines changed or deleted 630 lines changed or added


 sortkey.h   sortkey.h 
/* /*
************************************************************************** *** ************************************************************************** ***
* Copyright (C) 1996-2012, International Business Machines Corporation and others. * Copyright (C) 1996-2013, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
************************************************************************** *** ************************************************************************** ***
* *
* File sortkey.h * File sortkey.h
* *
* Created by: Helena Shih * Created by: Helena Shih
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
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 183 skipping to change at line 182
/** /**
* Extracts the collation key values into a new array. The caller owns * Extracts the collation key values into a new array. The caller owns
* this storage and should free it. * this storage and should free it.
* @param count the output parameter of number of collation key values, * @param count the output parameter of number of collation key values,
* including any trailing nulls. * including any trailing nulls.
* @obsolete ICU 2.6. Use getByteArray instead since this API will be re moved in that release. * @obsolete ICU 2.6. Use getByteArray instead since this API will be re moved in that release.
*/ */
uint8_t* toByteArray(int32_t& count) const; uint8_t* toByteArray(int32_t& count) const;
#endif #endif
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Convenience method which does a string(bit-wise) comparison of the * Convenience method which does a string(bit-wise) comparison of the
* two collation keys. * two collation keys.
* @param target target collation key to be compared with * @param target target collation key to be compared with
* @return Returns Collator::LESS if sourceKey &lt; targetKey, * @return Returns Collator::LESS if sourceKey &lt; targetKey,
* Collator::GREATER if sourceKey > targetKey and Collator::EQUAL * Collator::GREATER if sourceKey > targetKey and Collator::EQUAL
* otherwise. * otherwise.
* @deprecated ICU 2.6 use the overload with error code * @deprecated ICU 2.6 use the overload with error code
*/ */
Collator::EComparisonResult compareTo(const CollationKey& target) const ; Collator::EComparisonResult compareTo(const CollationKey& target) const ;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Convenience method which does a string(bit-wise) comparison of the * Convenience method which does a string(bit-wise) comparison of the
* two collation keys. * two collation keys.
* @param target target collation key to be compared with * @param target target collation key to be compared with
* @param status error code * @param status error code
* @return Returns UCOL_LESS if sourceKey &lt; targetKey, * @return Returns UCOL_LESS if sourceKey &lt; targetKey,
* UCOL_GREATER if sourceKey > targetKey and UCOL_EQUAL * UCOL_GREATER if sourceKey > targetKey and UCOL_EQUAL
* otherwise. * otherwise.
* @stable ICU 2.6 * @stable ICU 2.6
skipping to change at line 332 skipping to change at line 333
inline const uint8_t* inline const uint8_t*
CollationKey::getByteArray(int32_t &count) const CollationKey::getByteArray(int32_t &count) const
{ {
count = getLength(); count = getLength();
return getBytes(); return getBytes();
} }
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. 5 change blocks. 
3 lines changed or deleted 3 lines changed or added


 stringtriebuilder.h   stringtriebuilder.h 
skipping to change at line 242 skipping to change at line 242
// If this node is part of the unwritten right branch edge, // If this node is part of the unwritten right branch edge,
// then we wait until that is written. // then we wait until that is written.
if(offset<0 && (offset<lastRight || firstRight<offset)) { if(offset<0 && (offset<lastRight || firstRight<offset)) {
write(builder); write(builder);
} }
} }
inline int32_t getOffset() const { return offset; } inline int32_t getOffset() const { return offset; }
protected: protected:
int32_t hash; int32_t hash;
int32_t offset; int32_t offset;
private:
// No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const;
}; };
// This class should not be overridden because // This class should not be overridden because
// registerFinalValue() compares a stack-allocated FinalValueNode // registerFinalValue() compares a stack-allocated FinalValueNode
// (stack-allocated so that we don't unnecessarily create lots of dupli cate nodes) // (stack-allocated so that we don't unnecessarily create lots of dupli cate nodes)
// with the input node, and the // with the input node, and the
// !Node::operator==(other) used inside FinalValueNode::operator==(othe r) // !Node::operator==(other) used inside FinalValueNode::operator==(othe r)
// will be false if the typeid's are different. // will be false if the typeid's are different.
/** @internal */ /** @internal */
class FinalValueNode : public Node { class FinalValueNode : public Node {
skipping to change at line 399 skipping to change at line 396
/** @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 */
virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal) = 0; virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal) = 0;
/** @internal */ /** @internal */
virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_ t node) = 0; virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_ t node) = 0;
/** @internal */ /** @internal */
virtual int32_t writeDeltaTo(int32_t jumpTarget) = 0; virtual int32_t writeDeltaTo(int32_t jumpTarget) = 0;
private:
// No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif // __STRINGTRIEBUILDER_H__ #endif // __STRINGTRIEBUILDER_H__
 End of changes. 2 change blocks. 
7 lines changed or deleted 0 lines changed or added


 tblcoll.h   tblcoll.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 1996-2012, International Business Machines Corporation and * Copyright (C) 1996-2013, 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 395 skipping to change at line 395
*/ */
const UnicodeString& getRules(void) const; const UnicodeString& getRules(void) const;
/** /**
* Gets the version information for a Collator. * Gets the version information for a Collator.
* @param info the version # information, the result will be filled in * @param info the version # information, the result will be filled in
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void getVersion(UVersionInfo info) const; virtual void getVersion(UVersionInfo info) const;
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Return the maximum length of any expansion sequences that end with t he * Returns the maximum length of any expansion sequences that end with the
* specified comparison order. * specified comparison order.
* @param order a collation order returned by previous or next. *
* This is specific to the kind of collation element values and sequenc
es
* returned by the CollationElementIterator.
* Call CollationElementIterator::getMaxExpansion() instead.
*
* @param order a collation order returned by CollationElementIterator:
:previous
* or CollationElementIterator::next.
* @return maximum size of the expansion sequences ending with the coll ation * @return maximum size of the expansion sequences ending with the coll ation
* element or 1 if collation element does not occur at the end of * element, or 1 if the collation element does not occur at the end of
* any expansion sequence * any expansion sequence
* @see CollationElementIterator#getMaxExpansion * @see CollationElementIterator#getMaxExpansion
* @stable ICU 2.0 * @deprecated ICU 51 Use CollationElementIterator::getMaxExpansion() i nstead.
*/ */
int32_t getMaxExpansion(int32_t order) const; int32_t getMaxExpansion(int32_t order) const;
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. Th is * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. Th is
* method is to implement a simple version of RTTI, since not all C++ * method is to implement a simple version of RTTI, since not all C++
* compilers support genuine RTTI. Polymorphic operator==() and clone() * compilers support genuine RTTI. Polymorphic operator==() and clone()
* methods call this method. * methods call this method.
* @return The class ID for this object. All objects of a given class h ave * @return The class ID for this object. All objects of a given class h ave
* the same class ID. Objects of other classes have different c lass * the same class ID. Objects of other classes have different c lass
* IDs. * IDs.
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 834 skipping to change at line 842
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
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_COLLATION */ #endif /* #if !UCONFIG_NO_COLLATION */
#endif #endif
 End of changes. 9 change blocks. 
7 lines changed or deleted 15 lines changed or added


 timezone.h   timezone.h 
/************************************************************************* /*************************************************************************
* Copyright (c) 1997-2012, International Business Machines Corporation * Copyright (c) 1997-2013, 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 136 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
/** /**
* Returns the "unknown" time zone. * Returns the "unknown" time zone.
* It behaves like the GMT/UTC time zone but has the * It behaves like the GMT/UTC time zone but has the
* <code>UCAL_UNKNOWN_ZONE_ID</code> = "Etc/Unknown". * <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. * createTimeZone() returns a mutable clone of this time zone if the in put ID is not recognized.
* *
* @return the "unknown" time zone. * @return the "unknown" time zone.
* @see UCAL_UNKNOWN_ZONE_ID * @see UCAL_UNKNOWN_ZONE_ID
* @see createTimeZone * @see createTimeZone
* @see getGMT * @see getGMT
* @draft ICU 49 * @stable ICU 49
*/ */
static const TimeZone& U_EXPORT2 getUnknown(); 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 * 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.
* *
* <p>Note: For backward compatibility reason, the ID used by the time * <p>Note: For backward compatibility reason, the ID used by the time
* zone returned by this method is "GMT", although the ICU's canonical * zone returned by this method is "GMT", although the ICU's canonical
* ID for the GMT time zone is "Etc/GMT". * ID for the GMT time zone is "Etc/GMT".
* *
* @return the GMT/UTC time zone. * @return the GMT/UTC time zone.
 End of changes. 4 change blocks. 
4 lines changed or deleted 2 lines changed or added


 translit.h   translit.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1999-2012, International Business Machines * Copyright (C) 1999-2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* Date Name Description * Date Name Description
* 11/17/99 aliu Creation. * 11/17/99 aliu Creation.
********************************************************************** **********************************************************************
*/ */
#ifndef TRANSLIT_H #ifndef TRANSLIT_H
#define TRANSLIT_H #define TRANSLIT_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
skipping to change at line 1311 skipping to change at line 1311
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. 3 change blocks. 
3 lines changed or deleted 1 lines changed or added


 tzfmt.h   tzfmt.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2011-2012, International Business Machines Corporation and * * Copyright (C) 2011-2013, International Business Machines Corporation and *
* others. All Rights Reserved. * * others. All Rights Reserved. *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef __TZFMT_H #ifndef __TZFMT_H
#define __TZFMT_H #define __TZFMT_H
/** /**
* \file * \file
* \brief C++ API: TimeZoneFormat * \brief C++ API: TimeZoneFormat
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_DRAFT_API
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/timezone.h" #include "unicode/timezone.h"
#include "unicode/tznames.h" #include "unicode/tznames.h"
U_CDECL_BEGIN U_CDECL_BEGIN
/** /**
* Constants for time zone display format style used by format/parse APIs * Constants for time zone display format style used by format/parse APIs
* in TimeZoneFormat. * in TimeZoneFormat.
* @draft ICU 50 * @draft ICU 50
skipping to change at line 57 skipping to change at line 57
* Specific long format, such as "Eastern Standard Time". * Specific long format, such as "Eastern Standard Time".
* @draft ICU 50 * @draft ICU 50
*/ */
UTZFMT_STYLE_SPECIFIC_LONG, UTZFMT_STYLE_SPECIFIC_LONG,
/** /**
* Specific short format, such as "EST", "PDT". * Specific short format, such as "EST", "PDT".
* @draft ICU 50 * @draft ICU 50
*/ */
UTZFMT_STYLE_SPECIFIC_SHORT, UTZFMT_STYLE_SPECIFIC_SHORT,
/** /**
* RFC822 format, such as "-0500"
* @draft ICU 50
*/
UTZFMT_STYLE_RFC822,
/**
* Localized GMT offset format, such as "GMT-05:00", "UTC+0100" * Localized GMT offset format, such as "GMT-05:00", "UTC+0100"
* @draft ICU 50 * @draft ICU 50
*/ */
UTZFMT_STYLE_LOCALIZED_GMT, UTZFMT_STYLE_LOCALIZED_GMT,
#ifndef U_HIDE_DRAFT_API
/** /**
* ISO 8601 format (extended), such as "-05:00", "Z"(UTC) * Short localized GMT offset format, such as "GMT-5", "UTC+1:30"
* @draft ICU 50 * This style is equivalent to the LDML date format pattern "O".
* @draft ICU 51
*/
UTZFMT_STYLE_LOCALIZED_GMT_SHORT,
/**
* Short ISO 8601 local time difference (basic format) or the UTC indic
ator.
* For example, "-05", "+0530", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "X".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_SHORT,
/**
* Short ISO 8601 locale time difference (basic format).
* For example, "-05" and "+0530".
* This style is equivalent to the LDML date format pattern "x".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT,
/**
* Fixed width ISO 8601 local time difference (basic format) or the UTC
indicator.
* For example, "-0500", "+0530", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XX".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_FIXED,
/**
* Fixed width ISO 8601 local time difference (basic format).
* For example, "-0500" and "+0530".
* This style is equivalent to the LDML date format pattern "xx".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED,
/**
* ISO 8601 local time difference (basic format) with optional seconds
field, or the UTC indicator.
* For example, "-0500", "+052538", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXXX".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_FULL,
/**
* ISO 8601 local time difference (basic format) with optional seconds
field.
* For example, "-0500" and "+052538".
* This style is equivalent to the LDML date format pattern "xxxx".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL,
/**
* Fixed width ISO 8601 local time difference (extended format) or the
UTC indicator.
* For example, "-05:00", "+05:30", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXX".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_EXTENDED_FIXED,
/**
* Fixed width ISO 8601 local time difference (extended format).
* For example, "-05:00" and "+05:30".
* This style is equivalent to the LDML date format pattern "xxx" and "
ZZZZZ".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED,
/**
* ISO 8601 local time difference (extended format) with optional secon
ds field, or the UTC indicator.
* For example, "-05:00", "+05:25:38", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXXXX".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_EXTENDED_FULL,
/**
* ISO 8601 local time difference (extended format) with optional secon
ds field.
* For example, "-05:00" and "+05:25:38".
* This style is equivalent to the LDML date format pattern "xxxxx".
* @draft ICU 51
*/
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL,
/**
* Time Zone ID, such as "America/Los_Angeles".
* @draft ICU 51
*/
UTZFMT_STYLE_ZONE_ID,
/**
* Short Time Zone ID (BCP 47 Unicode location extension, time zone typ
e value), such as "uslax".
* @draft ICU 51
*/
UTZFMT_STYLE_ZONE_ID_SHORT,
/**
* Exemplar location, such as "Los Angeles" and "Paris".
* @draft ICU 51
*/ */
UTZFMT_STYLE_ISO8601 UTZFMT_STYLE_EXEMPLAR_LOCATION
#endif /* U_HIDE_DRAFT_API */
} UTimeZoneFormatStyle; } UTimeZoneFormatStyle;
/** /**
* Constants for GMT offset pattern types. * Constants for GMT offset pattern types.
* @draft ICU 50 * @draft ICU 50
*/ */
typedef enum UTimeZoneFormatGMTOffsetPatternType { typedef enum UTimeZoneFormatGMTOffsetPatternType {
/** /**
* Positive offset with hour and minute fields * Positive offset with hours and minutes fields
* @draft ICU 50 * @draft ICU 50
*/ */
UTZFMT_PAT_POSITIVE_HM, UTZFMT_PAT_POSITIVE_HM,
/** /**
* Positive offset with hour, minute and second fields * Positive offset with hours, minutes and seconds fields
* @draft ICU 50 * @draft ICU 50
*/ */
UTZFMT_PAT_POSITIVE_HMS, UTZFMT_PAT_POSITIVE_HMS,
/** /**
* Negative offset with hour and minute fields * Negative offset with hours and minutes fields
* @draft ICU 50 * @draft ICU 50
*/ */
UTZFMT_PAT_NEGATIVE_HM, UTZFMT_PAT_NEGATIVE_HM,
/** /**
* Negative offset with hour, minute and second fields * Negative offset with hours, minutes and seconds fields
* @draft ICU 50 * @draft ICU 50
*/ */
UTZFMT_PAT_NEGATIVE_HMS UTZFMT_PAT_NEGATIVE_HMS,
#ifndef U_HIDE_DRAFT_API
/**
* Positive offset with hours field
* @draft ICU 51
*/
UTZFMT_PAT_POSITIVE_H,
/**
* Negative offset with hours field
* @draft ICU 51
*/
UTZFMT_PAT_NEGATIVE_H,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/**
* Number of UTimeZoneFormatGMTOffsetPatternType types.
* @internal
*/
UTZFMT_PAT_COUNT
#endif /* U_HIDE_INTERNAL_API */
} UTimeZoneFormatGMTOffsetPatternType; } UTimeZoneFormatGMTOffsetPatternType;
/** /**
* Constants for time types used by TimeZoneFormat APIs for * Constants for time types used by TimeZoneFormat APIs for
* receiving time type (standard time, daylight time or unknown). * receiving time type (standard time, daylight time or unknown).
* @draft ICU 50 * @draft ICU 50
*/ */
typedef enum UTimeZoneFormatTimeType { typedef enum UTimeZoneFormatTimeType {
/** /**
* Unknown * Unknown
skipping to change at line 336 skipping to change at line 439
/** /**
* Sets the default parse options. * Sets the default parse options.
* <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</cod e> * <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</cod e>
* created by {@link #createInstance} has no parse options set (UTZFMT_ PARSE_OPTION_NONE). * created by {@link #createInstance} has no parse options set (UTZFMT_ PARSE_OPTION_NONE).
* To specify multipe options, use bitwise flags of UTimeZoneFormatPars eOption. * To specify multipe options, use bitwise flags of UTimeZoneFormatPars eOption.
* @see #UTimeZoneFormatParseOption * @see #UTimeZoneFormatParseOption
* @draft ICU 50 * @draft ICU 50
*/ */
void setDefaultParseOptions(uint32_t flags); void setDefaultParseOptions(uint32_t flags);
#ifndef U_HIDE_DRAFT_API
/** /**
* Returns the RFC822 style time zone string for the given offset. * Returns the ISO 8601 basic time zone string for the given offset.
* For example, "-0800". * For example, "-08", "-0830" and "Z"
* @param offset The offset from GMT(UTC) in milliseconds. *
* @param result Recevies the RFC822 style GMT(UTC) offset format. * @param offset the offset from GMT(UTC) in milliseconds.
* @return A reference to the result. * @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used wh
en the offset is 0.
* @param isShort true if shortest form is used.
* @param ignoreSeconds true if non-zero offset seconds is appended.
* @param result Receives the ISO format string.
* @param status Receives the status * @param status Receives the status
* @see #parseOffsetRFC822 * @return the ISO 8601 basic format.
* @draft ICU 50 * @see #formatOffsetISO8601Extended
* @see #parseOffsetISO8601
* @draft ICU 51
*/ */
UnicodeString& formatOffsetRFC822(int32_t offset, UnicodeString& result UnicodeString& formatOffsetISO8601Basic(int32_t offset, UBool useUtcInd
, UErrorCode& status) const; icator, UBool isShort, UBool ignoreSeconds,
UnicodeString& result, UErrorCode& status) const;
/** /**
* Returns the ISO 8601 style time zone string for the given offset. * Returns the ISO 8601 extended time zone string for the given offset.
* For example, "-08:00" and "Z". * For example, "-08:00", "-08:30" and "Z"
* @param offset The offset from GMT(UTC) in milliseconds. *
* @param result Receives the ISO 8601 style GMT(UTC) offset format. * @param offset the offset from GMT(UTC) in milliseconds.
* @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used wh
en the offset is 0.
* @param isShort true if shortest form is used.
* @param ignoreSeconds true if non-zero offset seconds is appended.
* @param result Receives the ISO format string.
* @param status Receives the status * @param status Receives the status
* @return A reference to the result. * @return the ISO 8601 basic format.
* @see #formatOffsetISO8601Extended
* @see #parseOffsetISO8601 * @see #parseOffsetISO8601
* @draft ICU 50 * @draft ICU 51
*/ */
UnicodeString& formatOffsetISO8601(int32_t offset, UnicodeString& resul UnicodeString& formatOffsetISO8601Extended(int32_t offset, UBool useUtc
t, UErrorCode& status) const; Indicator, UBool isShort, UBool ignoreSeconds,
UnicodeString& result, UErrorCode& status) const;
#endif /* U_HIDE_DRAFT_API */
/** /**
* Returns the localized GMT(UTC) offset format for the given offset. * Returns the localized GMT(UTC) offset format for the given offset.
* The localized GMT offset is defined by; * The localized GMT offset is defined by;
* <ul> * <ul>
* <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern}) * <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern})
* <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPat tern}) * <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPat tern})
* <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigit s}) * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigit s})
* <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat}) * <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat})
* </ul> * </ul>
* This format always uses 2 digit hours and minutes. When the given of
fset has non-zero
* seconds, 2 digit seconds field will be appended. For example,
* GMT+05:00 and GMT+05:28:06.
* @param offset the offset from GMT(UTC) in milliseconds. * @param offset the offset from GMT(UTC) in milliseconds.
* @param status Receives the status * @param status Receives the status
* @param result Receives the localized GMT format string. * @param result Receives the localized GMT format string.
* @return A reference to the result. * @return A reference to the result.
* @see #parseOffsetLocalizedGMT * @see #parseOffsetLocalizedGMT
* @draft ICU 50 * @draft ICU 50
*/ */
UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const; UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
#ifndef U_HIDE_DRAFT_API
/**
* Returns the short localized GMT(UTC) offset format for the given off
set.
* The short localized GMT offset is defined by;
* <ul>
* <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern})
* <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPat
tern})
* <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigit
s})
* <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat})
* </ul>
* This format uses the shortest representation of offset. The hours fi
eld does not
* have leading zero and lower fields with zero will be truncated. For
example,
* GMT+5 and GMT+530.
* @param offset the offset from GMT(UTC) in milliseconds.
* @param status Receives the status
* @param result Receives the short localized GMT format string.
* @return A reference to the result.
* @see #parseOffsetShortLocalizedGMT
* @draft ICU 51
*/
UnicodeString& formatOffsetShortLocalizedGMT(int32_t offset, UnicodeStr
ing& result, UErrorCode& status) const;
#endif /* U_HIDE_DRAFT_API */
using Format::format; using Format::format;
/** /**
* Returns the display name of the time zone at the given date for the style. * Returns the display name of the time zone at the given date for the style.
* @param style The style (e.g. <code>UTZFMT_STYLE_GENERIC_LONG</code>, <code>UTZFMT_STYLE_LOCALIZED_GMT</code>...) * @param style The style (e.g. <code>UTZFMT_STYLE_GENERIC_LONG</code>, <code>UTZFMT_STYLE_LOCALIZED_GMT</code>...)
* @param tz The time zone. * @param tz The time zone.
* @param date The date. * @param date The date.
* @param name Receives the display name. * @param name Receives the display name.
* @param timeType the output argument for receiving the time type (sta ndard/daylight/unknown) * @param timeType the output argument for receiving the time type (sta ndard/daylight/unknown)
* used for the display name, or NULL if the information is not necessa ry. * used for the display name, or NULL if the information is not necessa ry.
* @return A reference to the result * @return A reference to the result
* @see #UTimeZoneFormatStyle * @see #UTimeZoneFormatStyle
* @see #UTimeZoneFormatTimeType * @see #UTimeZoneFormatTimeType
* @draft ICU 50 * @draft ICU 50
*/ */
virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZon e& tz, UDate date, virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZon e& tz, UDate date,
UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) cons t; UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) cons t;
/** /**
* Returns offset from GMT(UTC) in milliseconds for the given RFC822
* style time zone string. When the given string is not an RFC822 time
zone
* string, this method sets the current position as the error index
* to <code>ParsePosition pos</code> and returns 0.
* @param text The text contains RFC822 style time zone string (e.g. "-
0800")
* at the position.
* @param pos The ParsePosition object.
* @return The offset from GMT(UTC) in milliseconds for the given RFC82
2 style
* time zone string.
* @see #formatOffsetRFC822
* @draft ICU 50
*/
int32_t parseOffsetRFC822(const UnicodeString& text, ParsePosition& pos
) const;
/**
* Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 * Returns offset from GMT(UTC) in milliseconds for the given ISO 8601
* style time zone string. When the given string is not an ISO 8601 tim e zone * style time zone string. When the given string is not an ISO 8601 tim e zone
* string, this method sets the current position as the error index * string, this method sets the current position as the error index
* to <code>ParsePosition pos</code> and returns 0. * to <code>ParsePosition pos</code> and returns 0.
* @param text The text contains ISO8601 style time zone string (e.g. " -08:00", "Z") * @param text The text contains ISO8601 style time zone string (e.g. " -08:00", "Z")
* at the position. * at the position.
* @param pos The ParsePosition object. * @param pos The ParsePosition object.
* @return The offset from GMT(UTC) in milliseconds for the given ISO 8 601 style * @return The offset from GMT(UTC) in milliseconds for the given ISO 8 601 style
* time zone string. * time zone string.
* @see #formatOffsetISO8601 * @see #formatOffsetISO8601Basic
* @see #formatOffsetISO8601Extended
* @draft ICU 50 * @draft ICU 50
*/ */
int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& po s) const; int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& po s) const;
/** /**
* Returns offset from GMT(UTC) in milliseconds for the given localized GMT * Returns offset from GMT(UTC) in milliseconds for the given localized GMT
* offset format string. When the given string cannot be parsed, this m ethod * offset format string. When the given string cannot be parsed, this m ethod
* sets the current position as the error index to <code>ParsePosition pos</code> * sets the current position as the error index to <code>ParsePosition pos</code>
* and returns 0. * and returns 0.
* @param text The text contains a localized GMT offset string at the p osition. * @param text The text contains a localized GMT offset string at the p osition.
* @param pos The ParsePosition object. * @param pos The ParsePosition object.
* @return The offset from GMT(UTC) in milliseconds for the given local ized GMT * @return The offset from GMT(UTC) in milliseconds for the given local ized GMT
* offset format string. * offset format string.
* @see #formatOffsetLocalizedGMT * @see #formatOffsetLocalizedGMT
* @draft ICU 50 * @draft ICU 50
*/ */
int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePositio n& pos) const; int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePositio n& pos) const;
#ifndef U_HIDE_DRAFT_API
/**
* Returns offset from GMT(UTC) in milliseconds for the given short loc
alized GMT
* offset format string. When the given string cannot be parsed, this m
ethod
* sets the current position as the error index to <code>ParsePosition
pos</code>
* and returns 0.
* @param text The text contains a short localized GMT offset string at
the position.
* @param pos The ParsePosition object.
* @return The offset from GMT(UTC) in milliseconds for the given short
localized GMT
* offset format string.
* @see #formatOffsetShortLocalizedGMT
* @draft ICU 51
*/
int32_t parseOffsetShortLocalizedGMT(const UnicodeString& text, ParsePo
sition& pos) const;
#endif /* U_HIDE_DRAFT_API */
/** /**
* Returns a <code>TimeZone</code> by parsing the time zone string acco rding to * Returns a <code>TimeZone</code> by parsing the time zone string acco rding to
* the given parse position, the specified format style and parse optio ns. * the given parse position, the specified format style and parse optio ns.
* *
* @param text The text contains a time zone string at the position. * @param text The text contains a time zone string at the position.
* @param style The format style * @param style The format style
* @param pos The position. * @param pos The position.
* @param parseOptions The parse options repesented by bitwise flags of UTimeZoneFormatParseOption. * @param parseOptions The parse options repesented by bitwise flags of UTimeZoneFormatParseOption.
* @param timeType The output argument for receiving the time type (sta ndard/daylight/unknown), * @param timeType The output argument for receiving the time type (sta ndard/daylight/unknown),
* or NULL if the information is not necessary. * or NULL if the information is not necessary.
skipping to change at line 547 skipping to change at line 692
/* TimeZoneNames object used by this formatter */ /* TimeZoneNames object used by this formatter */
TimeZoneNames* fTimeZoneNames; TimeZoneNames* fTimeZoneNames;
/* TimeZoneGenericNames object used by this formatter - lazily instanti ated */ /* TimeZoneGenericNames object used by this formatter - lazily instanti ated */
TimeZoneGenericNames* fTimeZoneGenericNames; TimeZoneGenericNames* fTimeZoneGenericNames;
/* Localized GMT format pattern - e.g. "GMT{0}" */ /* Localized GMT format pattern - e.g. "GMT{0}" */
UnicodeString fGMTPattern; UnicodeString fGMTPattern;
/* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm " */ /* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm " */
UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS + 1]; UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_COUNT];
/* Localized decimal digits used by Localized GMT format */ /* Localized decimal digits used by Localized GMT format */
UChar32 fGMTOffsetDigits[10]; UChar32 fGMTOffsetDigits[10];
/* Localized GMT zero format - e.g. "GMT" */ /* Localized GMT zero format - e.g. "GMT" */
UnicodeString fGMTZeroFormat; UnicodeString fGMTZeroFormat;
/* Bit flags representing parse options */ /* Bit flags representing parse options */
uint32_t fDefParseOptionFlags; uint32_t fDefParseOptionFlags;
/* Constant parts of GMT format pattern, populated from localized GMT f ormat pattern*/ /* Constant parts of GMT format pattern, populated from localized GMT f ormat pattern*/
UnicodeString fGMTPatternPrefix; /* Substring before {0} */ UnicodeString fGMTPatternPrefix; /* Substring before {0} */
UnicodeString fGMTPatternSuffix; /* Substring after {0} */ UnicodeString fGMTPatternSuffix; /* Substring after {0} */
/* Compiled offset patterns generated from fGMTOffsetPatterns[] */ /* Compiled offset patterns generated from fGMTOffsetPatterns[] */
UVector* fGMTOffsetPatternItems[UTZFMT_PAT_NEGATIVE_HMS + 1]; UVector* fGMTOffsetPatternItems[UTZFMT_PAT_COUNT];
UBool fAbuttingOffsetHoursAndMinutes;
/** /**
* Returns the time zone's specific format string. * Returns the time zone's specific format string.
* @param tz the time zone * @param tz the time zone
* @param stdType the name type used for standard time * @param stdType the name type used for standard time
* @param dstType the name type used for daylight time * @param dstType the name type used for daylight time
* @param date the date * @param date the date
* @param name receives the time zone's specific format name string * @param name receives the time zone's specific format name string
* @param timeType when null, actual time type is set * @param timeType when null, actual time type is set
* @return a reference to name. * @return a reference to name.
skipping to change at line 596 skipping to change at line 743
UnicodeString& formatGeneric(const TimeZone& tz, int32_t genType, UDate date, UnicodeString& name) const; UnicodeString& formatGeneric(const TimeZone& tz, int32_t genType, UDate date, UnicodeString& name) const;
/** /**
* Lazily create a TimeZoneGenericNames instance * Lazily create a TimeZoneGenericNames instance
* @param status receives the status * @param status receives the status
* @return the cached TimeZoneGenericNames. * @return the cached TimeZoneGenericNames.
*/ */
const TimeZoneGenericNames* getTimeZoneGenericNames(UErrorCode& status) const; const TimeZoneGenericNames* getTimeZoneGenericNames(UErrorCode& status) const;
/** /**
* Private method returning the time zone's exemplar location string.
* This method will never return empty.
* @param tz the time zone
* @param name receives the time zone's exemplar location name
* @return a reference to name.
*/
UnicodeString& formatExemplarLocation(const TimeZone& tz, UnicodeString
& name) const;
/**
* Private enum specifying a combination of offset fields * Private enum specifying a combination of offset fields
*/ */
enum OffsetFields { enum OffsetFields {
FIELDS_H, FIELDS_H,
FIELDS_HM, FIELDS_HM,
FIELDS_HMS FIELDS_HMS
}; };
/** /**
* Parses the localized GMT pattern string and initialize * Parses the localized GMT pattern string and initialize
skipping to change at line 624 skipping to change at line 780
* Parse the GMT offset pattern into runtime optimized format. * Parse the GMT offset pattern into runtime optimized format.
* @param pattern the offset pattern string * @param pattern the offset pattern string
* @param required the required set of fields, such as FIELDS_HM * @param required the required set of fields, such as FIELDS_HM
* @param status U_ILLEGAL_ARGUMENT is set when the specified pattern d oes not contain * @param status U_ILLEGAL_ARGUMENT is set when the specified pattern d oes not contain
* pattern letters for the required fields. * pattern letters for the required fields.
* @return A list of GMTOffsetField objects, or NULL on error. * @return A list of GMTOffsetField objects, or NULL on error.
*/ */
static UVector* parseOffsetPattern(const UnicodeString& pattern, Offset Fields required, UErrorCode& status); static UVector* parseOffsetPattern(const UnicodeString& pattern, Offset Fields required, UErrorCode& status);
/** /**
* Appends second field to the offset pattern with hour/minute * Appends seconds field to the offset pattern with hour/minute
* Note: This code will be obsoleted once we add hour-minute-second pat tern data in CLDR. * Note: This code will be obsoleted once we add hour-minute-second pat tern data in CLDR.
* @param offsetHM the offset pattern including hour and minute fields * @param offsetHM the offset pattern including hours and minutes field
* @param result the output offset pattern including hour, minute and s s
econd fields * @param result the output offset pattern including hour, minute and s
econds fields
* @param status receives the status
* @return a reference to result
*/
static UnicodeString& expandOffsetPattern(const UnicodeString& offsetHM
, UnicodeString& result, UErrorCode& status);
/**
* Truncates minutes field to the offset pattern with hour/minute
* Note: This code will be obsoleted once we add hour pattern data in C
LDR.
* @param offsetHM the offset pattern including hours and minutes field
s
* @param result the output offset pattern including only hours field
* @param status receives the status
* @return a reference to result * @return a reference to result
*/ */
static UnicodeString& expandOffsetPattern(const UnicodeString& offsetHM , UnicodeString& result); static UnicodeString& truncateOffsetPattern(const UnicodeString& offset HM, UnicodeString& result, UErrorCode& status);
/** /**
* Break input string into UChar32[]. Each array element represents * Break input string into UChar32[]. Each array element represents
* a code point. This method is used for parsing localized digit * a code point. This method is used for parsing localized digit
* characters and support characters in Unicode supplemental planes. * characters and support characters in Unicode supplemental planes.
* @param str the string * @param str the string
* @param codeArray receives the result * @param codeArray receives the result
* @param capacity the capacity of codeArray * @param capacity the capacity of codeArray
* @return TRUE when the specified code array is fully filled with code points * @return TRUE when the specified code array is fully filled with code points
* (no under/overflow). * (no under/overflow).
*/ */
static UBool toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t capacity); static UBool toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t capacity);
/** /**
* Private method supprting all of ISO8601 formats
* @param offset the offset from GMT(UTC) in milliseconds.
* @param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used wh
en the offset is 0.
* @param isShort true if shortest form is used.
* @param ignoreSeconds true if non-zero offset seconds is appended.
* @param result Receives the result
* @param status Receives the status
* @return the ISO 8601 basic format.
*/
UnicodeString& formatOffsetISO8601(int32_t offset, UBool isBasic, UBool
useUtcIndicator,
UBool isShort, UBool ignoreSeconds, UnicodeString& result, UErrorCo
de& status) const;
/**
* Private method used for localized GMT formatting.
* @param offset the zone's UTC offset
* @param isShort true if the short localized GMT format is desired.
* @param result receives the localized GMT format string
* @param status receives the status
*/
UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UBool isShort,
UnicodeString& result, UErrorCode& status) const;
/**
* Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 style * Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 style
* (extended format) time zone string. When the given string is not an ISO 8601 time * (extended format) time zone string. When the given string is not an ISO 8601 time
* zone string, this method sets the current position as the error inde x * zone string, this method sets the current position as the error inde x
* to <code>ParsePosition pos</code> and returns 0. * to <code>ParsePosition pos</code> and returns 0.
* @param text the text contains ISO 8601 style time zone string (e.g. "-08:00", "Z") * @param text the text contains ISO 8601 style time zone string (e.g. "-08:00", "Z")
* at the position. * at the position.
* @param pos the position, non-negative error index will be set on fai lure. * @param pos the position, non-negative error index will be set on fai lure.
* @param extendedOnly TRUE if parsing the text as ISO 8601 extended of fset format (e.g. "-08:00"), * @param extendedOnly TRUE if parsing the text as ISO 8601 extended of fset format (e.g. "-08:00"),
* or FALSE to evaluate the text as basic format. * or FALSE to evaluate the text as basic format.
* @param hasDigitOffset receiving if the parsed zone string contains o ffset digits. * @param hasDigitOffset receiving if the parsed zone string contains o ffset digits.
skipping to change at line 677 skipping to change at line 866
*/ */
void appendOffsetDigits(UnicodeString& buf, int32_t n, uint8_t minDigit s) const; void appendOffsetDigits(UnicodeString& buf, int32_t n, uint8_t minDigit s) const;
/** /**
* Returns offset from GMT(UTC) in milliseconds for the given localized GMT * Returns offset from GMT(UTC) in milliseconds for the given localized GMT
* offset format string. When the given string cannot be parsed, this m ethod * offset format string. When the given string cannot be parsed, this m ethod
* sets the current position as the error index to <code>ParsePosition pos</code> * sets the current position as the error index to <code>ParsePosition pos</code>
* and returns 0. * and returns 0.
* @param text the text contains a localized GMT offset string at the p osition. * @param text the text contains a localized GMT offset string at the p osition.
* @param pos the position, non-negative error index will be set on fai lure. * @param pos the position, non-negative error index will be set on fai lure.
* @param isShort true if this parser to try the short format first
* @param hasDigitOffset receiving if the parsed zone string contains o ffset digits. * @param hasDigitOffset receiving if the parsed zone string contains o ffset digits.
* @return the offset from GMT(UTC) in milliseconds for the given local ized GMT * @return the offset from GMT(UTC) in milliseconds for the given local ized GMT
* offset format string. * offset format string.
*/ */
int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePositio n& pos, int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePositio n& pos,
UBool* hasDigitOffset) const; UBool isShort, UBool* hasDigitOffset) const;
/**
* Parse localized GMT format generated by the patter used by this form
atter, except
* GMT Zero format.
* @param text the input text
* @param start the start index
* @param isShort true if the short localized format is parsed.
* @param parsedLen receives the parsed length
* @return the parsed offset in milliseconds
*/
int32_t parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32
_t start,
UBool isShort, int32_t& parsedLen) const;
/** /**
* Parses localized GMT offset fields into offset. * Parses localized GMT offset fields into offset.
* @param text the input text * @param text the input text
* @param start the start index * @param start the start index
* @param minimumHourWidth true if the parser allows hour field width t o be 1 * @param isShort true if this is a short format - currently not used
* @param parsedLen the parsed length, or 0 on failure. * @param parsedLen the parsed length, or 0 on failure.
* @return the parsed offset in milliseconds. * @return the parsed offset in milliseconds.
*/ */
int32_t parseOffsetFields(const UnicodeString& text, int32_t start, UBo int32_t parseOffsetFields(const UnicodeString& text, int32_t start, UBo
ol minimumHourWidth, ol isShort, int32_t& parsedLen) const;
int32_t& parsedLen) const;
/**
* Parse localized GMT offset fields with the given pattern.
* @param text the input text
* @param start the start index
* @param pattenItems the pattern (already itemized)
* @param forceSingleHourDigit true if hours field is parsed as a singl
e digit
* @param hour receives the hour offset field
* @param min receives the minute offset field
* @param sec receives the second offset field
* @return the parsed length
*/
int32_t parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t
start,
UVector* patternItems, UBool forceSingleHourDigit, int32_t& hour, i
nt32_t& min, int32_t& sec) const;
/** /**
* Parses abutting localized GMT offset fields (such as 0800) into offs et. * Parses abutting localized GMT offset fields (such as 0800) into offs et.
* @param text the input text * @param text the input text
* @param start the start index * @param start the start index
* @param parsedLen the parsed length, or 0 on failure * @param parsedLen the parsed length, or 0 on failure
* @return the parsed offset in milliseconds. * @return the parsed offset in milliseconds.
*/ */
int32_t parseAbuttingOffsetFields(const UnicodeString& text, int32_t st art, int32_t& parsedLen) const; int32_t parseAbuttingOffsetFields(const UnicodeString& text, int32_t st art, int32_t& parsedLen) const;
skipping to change at line 773 skipping to change at line 988
/** /**
* Parses offset represented by contiguous ASCII digits. * Parses offset represented by contiguous ASCII digits.
* <p> * <p>
* Note: This method expects the input position is already at the start of * Note: This method expects the input position is already at the start of
* ASCII digits and does not parse sign (+/-). * ASCII digits and does not parse sign (+/-).
* @param text The text contains a sequence of ASCII digits * @param text The text contains a sequence of ASCII digits
* @param pos The parse position * @param pos The parse position
* @param minFields The minimum Fields to be parsed * @param minFields The minimum Fields to be parsed
* @param maxFields The maximum Fields to be parsed * @param maxFields The maximum Fields to be parsed
* @param fixedHourWidth true if hour field must be width of 2 * @param fixedHourWidth true if hours field must be width of 2
* @return Parsed offset, 0 or positive number. * @return Parsed offset, 0 or positive number.
*/ */
static int32_t parseAbuttingAsciiOffsetFields(const UnicodeString& text , ParsePosition& pos, static int32_t parseAbuttingAsciiOffsetFields(const UnicodeString& text , ParsePosition& pos,
OffsetFields minFields, OffsetFields maxFields, UBool fixedHourWidt h); OffsetFields minFields, OffsetFields maxFields, UBool fixedHourWidt h);
/** /**
* Parses offset represented by ASCII digits and separators. * Parses offset represented by ASCII digits and separators.
* <p> * <p>
* Note: This method expects the input position is already at the start of * Note: This method expects the input position is already at the start of
* ASCII digits and does not parse sign (+/-). * ASCII digits and does not parse sign (+/-).
* @param text The text * @param text The text
* @param pos The parse position * @param pos The parse position
* @param sep The separator character * @param sep The separator character
* @param minFields The minimum Fields to be parsed * @param minFields The minimum Fields to be parsed
* @param maxFields The maximum Fields to be parsed * @param maxFields The maximum Fields to be parsed
* @param fixedHourWidth true if hour field must be width of 2
* @return Parsed offset, 0 or positive number. * @return Parsed offset, 0 or positive number.
*/ */
static int32_t parseAsciiOffsetFields(const UnicodeString& text, ParseP osition& pos, UChar sep, static int32_t parseAsciiOffsetFields(const UnicodeString& text, ParseP osition& pos, UChar sep,
OffsetFields minFields, OffsetFields maxFields, UBool fixedHourWidt h); OffsetFields minFields, OffsetFields maxFields);
/** /**
* Unquotes the message format style pattern. * Unquotes the message format style pattern.
* @param pattern the pattern * @param pattern the pattern
* @param result receive the unquoted pattern. * @param result receive the unquoted pattern.
* @return A reference to result. * @return A reference to result.
*/ */
static UnicodeString& unquote(const UnicodeString& pattern, UnicodeStri ng& result); static UnicodeString& unquote(const UnicodeString& pattern, UnicodeStri ng& result);
/** /**
* Initialize localized GMT format offset hour/min/sec patterns. * Initialize localized GMT format offset hour/min/sec patterns.
* This method parses patterns into optimized run-time format. * This method parses patterns into optimized run-time format.
* @param status receives the status. * @param status receives the status.
*/ */
void initGMTOffsetPatterns(UErrorCode& status); void initGMTOffsetPatterns(UErrorCode& status);
/** /**
* Check if there are any GMT format offset patterns without
* any separators between hours field and minutes field and update
* fAbuttingOffsetHoursAndMinutes field. This method must be called
* after all patterns are parsed into pattern items.
*/
void checkAbuttingHoursAndMinutes();
/**
* Creates an instance of TimeZone for the given offset * Creates an instance of TimeZone for the given offset
* @param offset the offset * @param offset the offset
* @return A TimeZone with the given offset * @return A TimeZone with the given offset
*/ */
TimeZone* createTimeZoneForOffset(int32_t offset) const; TimeZone* createTimeZoneForOffset(int32_t offset) const;
/** /**
* Returns the time type for the given name type * Returns the time type for the given name type
* @param nameType the name type * @param nameType the name type
* @return the time type (unknown/standard/daylight) * @return the time type (unknown/standard/daylight)
*/ */
static UTimeZoneFormatTimeType getTimeType(UTimeZoneNameType nameType); static UTimeZoneFormatTimeType getTimeType(UTimeZoneNameType nameType);
/* /**
* Returns the time zone ID of a match at the specified index within * Returns the time zone ID of a match at the specified index within
* the MatchInfoCollection. * the MatchInfoCollection.
* @param matches the collection of matches * @param matches the collection of matches
* @param idx the index withing matches * @param idx the index withing matches
* @param tzID receives the resolved time zone ID * @param tzID receives the resolved time zone ID
* @return a reference to tzID. * @return a reference to tzID.
*/ */
UnicodeString& getTimeZoneID(const TimeZoneNames::MatchInfoCollection* matches, int32_t idx, UnicodeString& tzID) const; UnicodeString& getTimeZoneID(const TimeZoneNames::MatchInfoCollection* matches, int32_t idx, UnicodeString& tzID) const;
/**
* Parse a zone ID.
* @param text the text contains a time zone ID string at the position.
* @param pos the position
* @param tzID receives the zone ID
* @return a reference to tzID
*/
UnicodeString& parseZoneID(const UnicodeString& text, ParsePosition& po
s, UnicodeString& tzID) const;
/**
* Parse a short zone ID.
* @param text the text contains a short time zone ID string at the pos
ition.
* @param pos the position
* @param tzID receives the short zone ID
* @return a reference to tzID
*/
UnicodeString& parseShortZoneID(const UnicodeString& text, ParsePositio
n& pos, UnicodeString& tzID) const;
/**
* Parse an exemplar location string.
* @param text the text contains an exemplar location string at the pos
ition.
* @param pos the position.
* @param tzID receives the time zone ID
* @return a reference to tzID
*/
UnicodeString& parseExemplarLocation(const UnicodeString& text, ParsePo
sition& pos, UnicodeString& tzID) const;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* U_HIDE_INTERNAL_API */ #endif /* ndef U_HIDE_DRAFT_API */
#endif #endif /* !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 42 change blocks. 
70 lines changed or deleted 358 lines changed or added


 tznames.h   tznames.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2011-2012, International Business Machines Corporation and * * Copyright (C) 2011-2013, International Business Machines Corporation and *
* others. All Rights Reserved. * * others. All Rights Reserved. *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef __TZNAMES_H #ifndef __TZNAMES_H
#define __TZNAMES_H #define __TZNAMES_H
/** /**
* \file * \file
* \brief C++ API: TimeZoneNames * \brief C++ API: TimeZoneNames
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_DRAFT_API
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
U_CDECL_BEGIN U_CDECL_BEGIN
/** /**
* Constants for time zone display name types. * Constants for time zone display name types.
* @draft ICU 50 * @draft ICU 50
*/ */
skipping to change at line 63 skipping to change at line 63
UTZNM_SHORT_GENERIC = 0x08, UTZNM_SHORT_GENERIC = 0x08,
/** /**
* Short display name for standard time, such as "EST". * Short display name for standard time, such as "EST".
* @draft ICU 50 * @draft ICU 50
*/ */
UTZNM_SHORT_STANDARD = 0x10, UTZNM_SHORT_STANDARD = 0x10,
/** /**
* Short display name for daylight saving time, such as "EDT". * Short display name for daylight saving time, such as "EDT".
* @draft ICU 50 * @draft ICU 50
*/ */
UTZNM_SHORT_DAYLIGHT = 0x20 UTZNM_SHORT_DAYLIGHT = 0x20,
#ifndef U_HIDE_DRAFT_API
/**
* Exemplar location name, such as "Los Angeles".
* @draft ICU 51
*/
UTZNM_EXEMPLAR_LOCATION = 0x40
#endif /* U_HIDE_DRAFT_API */
} UTimeZoneNameType; } UTimeZoneNameType;
U_CDECL_END U_CDECL_END
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class UVector; class UVector;
struct MatchInfo; struct MatchInfo;
/** /**
skipping to change at line 114 skipping to change at line 121
* For example, time zone "Europe/London" has English long name for standar d time "Greenwich Mean Time", which is also * For example, time zone "Europe/London" has English long name for standar d time "Greenwich Mean Time", which is also
* shared with other time zones. However, the long name for daylight saving time is "British Summer Time", which is only * shared with other time zones. However, the long name for daylight saving time is "British Summer Time", which is only
* used for "Europe/London". * used for "Europe/London".
* *
* <p> * <p>
* {@link #getTimeZoneDisplayName} is designed for accessing a name only us ed by a single time zone. * {@link #getTimeZoneDisplayName} is designed for accessing a name only us ed by a single time zone.
* But is not necessarily mean that a subclass implementation use the same model with CLDR. A subclass implementation * But is not necessarily mean that a subclass implementation use the same model with CLDR. A subclass implementation
* may provide time zone names only through {@link #getTimeZoneDisplayName} , or only through {@link #getMetaZoneDisplayName}, * may provide time zone names only through {@link #getTimeZoneDisplayName} , or only through {@link #getMetaZoneDisplayName},
* or both. * or both.
* *
* <p>
* The default <code>TimeZoneNames</code> implementation returned by {@link
#createInstance}
* uses the locale data imported from CLDR. In CLDR, set of meta zone IDs a
nd mappings between zone IDs and meta zone
* IDs are shared by all locales. Therefore, the behavior of {@link #getAva
ilableMetaZoneIDs},
* {@link #getMetaZoneID}, and {@link #getReferenceZoneID} won't be changed
no matter
* what locale is used for getting an instance of <code>TimeZoneNames</code
>.
*
* @draft ICU 50 * @draft ICU 50
*/ */
class U_I18N_API TimeZoneNames : public UObject { class U_I18N_API TimeZoneNames : public UObject {
public: public:
/** /**
* Destructor. * Destructor.
* @draft ICU 50 * @draft ICU 50
*/ */
virtual ~TimeZoneNames(); virtual ~TimeZoneNames();
skipping to change at line 190 skipping to change at line 204
* @param mzID Receives the meta zone ID for the given time zone ID at the given date. If the time zone does not have a * @param mzID Receives the meta zone ID for the given time zone ID at the given date. If the time zone does not have a
* corresponding meta zone at the given date or the implementa tion does not support meta zones, "bogus" state * corresponding meta zone at the given date or the implementa tion does not support meta zones, "bogus" state
* is set. * is set.
* @return A reference to the result. * @return A reference to the result.
* @draft ICU 50 * @draft ICU 50
*/ */
virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate d ate, UnicodeString& mzID) const = 0; virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate d ate, UnicodeString& mzID) const = 0;
/** /**
* Returns the reference zone ID for the given meta zone ID for the reg ion. * Returns the reference zone ID for the given meta zone ID for the reg ion.
*
* Note: Each meta zone must have a reference zone associated with a sp
ecial region "001" (world).
* Some meta zones may have region specific reference zone IDs other th
an the special region
* "001". When a meta zone does not have any region specific reference
zone IDs, this method
* return the reference zone ID for the special region "001" (world).
*
* @param mzID The meta zone ID. * @param mzID The meta zone ID.
* @param region The region. * @param region The region.
* @param tzID Receives the reference zone ID ("golden zone" in the LDM L specification) for the given time zone ID for the * @param tzID Receives the reference zone ID ("golden zone" in the LDM L specification) for the given time zone ID for the
* region. If the meta zone is unknown or the implementation d oes not support meta zones, "bogus" state * region. If the meta zone is unknown or the implementation d oes not support meta zones, "bogus" state
* is set. * is set.
* @return A reference to the result. * @return A reference to the result.
* @draft ICU 50 * @draft ICU 50
*/ */
virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, co nst char* region, UnicodeString& tzID) const = 0; virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, co nst char* region, UnicodeString& tzID) const = 0;
skipping to change at line 280 skipping to change at line 300
* Constructor. * Constructor.
* @internal * @internal
*/ */
MatchInfoCollection(); MatchInfoCollection();
/** /**
* Destructor. * Destructor.
* @internal * @internal
*/ */
virtual ~MatchInfoCollection(); virtual ~MatchInfoCollection();
#ifndef U_HIDE_INTERNAL_API
/** /**
* Adds a zone match. * Adds a zone match.
* @param nameType The name type. * @param nameType The name type.
* @param matchLength The match length. * @param matchLength The match length.
* @param tzID The time zone ID. * @param tzID The time zone ID.
* @param status Receives the status * @param status Receives the status
* @internal * @internal
*/ */
void addZone(UTimeZoneNameType nameType, int32_t matchLength, void addZone(UTimeZoneNameType nameType, int32_t matchLength,
const UnicodeString& tzID, UErrorCode& status); const UnicodeString& tzID, UErrorCode& status);
skipping to change at line 345 skipping to change at line 366
UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const; UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const;
/** /**
* Gets the metazone ID of a match at the specified index. * Gets the metazone ID of a match at the specified index.
* @param idx The index * @param idx The index
* @param mzID Receives the metazone ID * @param mzID Receives the metazone ID
* @return TRUE if the meta zone ID was set to mzID. * @return TRUE if the meta zone ID was set to mzID.
* @internal * @internal
*/ */
UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const; UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const;
#endif /* U_HIDE_INTERNAL_API */
private: private:
UVector* fMatches; // vector of MatchEntry UVector* fMatches; // vector of MatchEntry
UVector* matches(UErrorCode& status); UVector* matches(UErrorCode& status);
}; };
/** /**
* Finds time zone name prefix matches for the input text at the * Finds time zone name prefix matches for the input text at the
* given offset and returns a collection of the matches. * given offset and returns a collection of the matches.
skipping to change at line 366 skipping to change at line 388
* @param start The starting offset within the text. * @param start The starting offset within the text.
* @param types The set of name types represented by bitwise flags of U TimeZoneNameType enums, * @param types The set of name types represented by bitwise flags of U TimeZoneNameType enums,
* or UTZNM_UNKNOWN for all name types. * or UTZNM_UNKNOWN for all name types.
* @param status Receives the status. * @param status Receives the status.
* @return A collection of matches (owned by the caller), or NULL if no matches are found. * @return A collection of matches (owned by the caller), or NULL if no matches are found.
* @see UTimeZoneNameType * @see UTimeZoneNameType
* @see MatchInfoCollection * @see MatchInfoCollection
* @internal * @internal
*/ */
virtual MatchInfoCollection* find(const UnicodeString& text, int32_t st art, uint32_t types, UErrorCode& status) const = 0; virtual MatchInfoCollection* find(const UnicodeString& text, int32_t st art, uint32_t types, UErrorCode& status) const = 0;
private:
// No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_DRAFT_API */
#endif #endif
#endif #endif
 End of changes. 9 change blocks. 
8 lines changed or deleted 34 lines changed or added


 ubrk.h   ubrk.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 1996-2012, International Business Machines Corporation and others. * Copyright (C) 1996-2013, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef UBRK_H #ifndef UBRK_H
#define UBRK_H #define UBRK_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "unicode/utext.h" #include "unicode/utext.h"
skipping to change at line 311 skipping to change at line 311
* @param status The error code * @param status The error code
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ubrk_setText(UBreakIterator* bi, ubrk_setText(UBreakIterator* bi,
const UChar* text, const UChar* text,
int32_t textLength, int32_t textLength,
UErrorCode* status); UErrorCode* status);
/** /**
* Sets an existing iterator to point to a new piece of text * Sets an existing iterator to point to a new piece of text.
*
* All index positions returned by break iterator functions are
* native indices from the UText. For example, when breaking UTF-8
* encoded text, the break positions returned by \ref ubrk_next, \ref ubrk_
previous, etc.
* will be UTF-8 string indices, not UTF-16 positions.
*
* @param bi The iterator to use * @param bi The iterator to use
* @param text The text to be set. * @param text The text to be set.
* This function makes a shallow clone of the supplied UText. This means * This function makes a shallow clone of the supplied UText. This means
* that the caller is free to immediately close or otherwise re use the * that the caller is free to immediately close or otherwise re use the
* UText that was passed as a parameter, but that the underlyin g text itself * UText that was passed as a parameter, but that the underlyin g text itself
* must not be altered while being referenced by the break iter ator. * must not be altered while being referenced by the break iter ator.
* @param status The error code * @param status The error code
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
skipping to change at line 489 skipping to change at line 495
* 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 * Set the subject text string upon which the break iterator is operating
* without changing any other aspect of the state. * without changing any other aspect of the 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 operati ng on * 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 * 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 * ICU that the string has been relocated, and providing a new UText to a ccess the
* string in its new position. * string in its new position.
* *
skipping to change at line 513 skipping to change at line 518
* 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 bi The break iterator. * @param bi The break iterator.
* @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 49 * @stable ICU 49
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
ubrk_refreshUText(UBreakIterator *bi, ubrk_refreshUText(UBreakIterator *bi,
UText *text, UText *text,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ #endif /* #if !UCONFIG_NO_BREAK_ITERATION */
#endif #endif
 End of changes. 6 change blocks. 
6 lines changed or deleted 11 lines changed or added


 ucal.h   ucal.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 1996-2012, International Business Machines Corporation and * Copyright (C) 1996-2013, 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 748 skipping to change at line 748
* @param len The length of zoneID, or -1 if null-terminated. * @param len The length of zoneID, or -1 if null-terminated.
* @param status A pointer to an UErrorCode to receive any errors. * @param status A pointer to an UErrorCode to receive any errors.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ucal_setTimeZone(UCalendar* cal, ucal_setTimeZone(UCalendar* cal,
const UChar* zoneID, const UChar* zoneID,
int32_t len, int32_t len,
UErrorCode* status); UErrorCode* status);
#ifndef U_HIDE_DRAFT_API
/**
* Get the ID of the UCalendar's time zone.
*
* @param cal The UCalendar to query.
* @param result Receives the UCalendar's time zone ID.
* @param resultLength The maximum size of result.
* @param status Receives the status.
* @return The total buffer size needed; if greater than resul
tLength, the output was truncated.
* @draft ICU 51
*/
U_DRAFT int32_t U_EXPORT2
ucal_getTimeZoneID(const UCalendar *cal,
UChar *result,
int32_t resultLength,
UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Possible formats for a UCalendar's display name * Possible formats for a UCalendar's display name
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
enum UCalendarDisplayNameType { enum UCalendarDisplayNameType {
/** Standard display name */ /** Standard display name */
UCAL_STANDARD, UCAL_STANDARD,
/** Short standard display name */ /** Short standard display name */
UCAL_SHORT_STANDARD, UCAL_SHORT_STANDARD,
/** Daylight savings display name */ /** Daylight savings display name */
skipping to change at line 864 skipping to change at line 882
UCAL_LENIENT, UCAL_LENIENT,
/** /**
* First day of week * First day of week
* @stable ICU 2.0 * @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 * @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 * The behavior for handling wall time repeating multiple times
* at negative time zone offset transitions * at negative time zone offset transitions
* @draft ICU 49 * @stable ICU 49
*/ */
UCAL_REPEATED_WALL_TIME, UCAL_REPEATED_WALL_TIME,
/** /**
* The behavior for handling skipped wall time at positive time * The behavior for handling skipped wall time at positive time
* zone offset transitions. * zone offset transitions.
* @draft ICU 49 * @stable ICU 49
*/ */
UCAL_SKIPPED_WALL_TIME 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 * Options for handling ambiguous wall time at time zone
* offset transitions. * offset transitions.
* @draft ICU 49 * @stable ICU 49
*/ */
enum UCalendarWallTimeOption { enum UCalendarWallTimeOption {
/** /**
* An ambiguous wall time to be interpreted as the latest. * An ambiguous wall time to be interpreted as the latest.
* This option is valid for UCAL_REPEATED_WALL_TIME and * This option is valid for UCAL_REPEATED_WALL_TIME and
* UCAL_SKIPPED_WALL_TIME. * UCAL_SKIPPED_WALL_TIME.
* @draft ICU 49 * @stable ICU 49
*/ */
UCAL_WALLTIME_LAST UCAL_WALLTIME_LAST,
#ifndef U_HIDE_DRAFT_API
,
/** /**
* An ambiguous wall time to be interpreted as the earliest. * An ambiguous wall time to be interpreted as the earliest.
* This option is valid for UCAL_REPEATED_WALL_TIME and * This option is valid for UCAL_REPEATED_WALL_TIME and
* UCAL_SKIPPED_WALL_TIME. * UCAL_SKIPPED_WALL_TIME.
* @draft ICU 49 * @stable ICU 49
*/ */
UCAL_WALLTIME_FIRST, UCAL_WALLTIME_FIRST,
/** /**
* An ambiguous wall time to be interpreted as the next valid * An ambiguous wall time to be interpreted as the next valid
* wall time. This option is valid for UCAL_SKIPPED_WALL_TIME. * wall time. This option is valid for UCAL_SKIPPED_WALL_TIME.
* @draft ICU 49 * @stable ICU 49
*/ */
UCAL_WALLTIME_NEXT_VALID UCAL_WALLTIME_NEXT_VALID
#endif /* U_HIDE_DRAFT_API */
}; };
/** @draft ICU 49 */ /** @stable ICU 49 */
typedef enum UCalendarWallTimeOption UCalendarWallTimeOption; 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,
* UCAL_MINIMAL_DAYS_IN_FIRST_WEEK, UCAL_REPEATED_WALL_TIME or UCAL_SKIPPED _WALL_TIME * 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.
 End of changes. 13 change blocks. 
16 lines changed or deleted 29 lines changed or added


 uchar.h   uchar.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, 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 1459 skipping to change at line 1459
* 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 */ /** Unicode character name (Name property). @stable ICU 2.0 */
U_UNICODE_CHAR_NAME, U_UNICODE_CHAR_NAME,
#ifndef U_HIDE_DEPRECATED_API
/** /**
* The Unicode_1_Name property value which is of little practical value . * 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. * Beginning with ICU 49, ICU APIs return an empty string for this name choice.
* @deprecated ICU 49 * @deprecated ICU 49
*/ */
U_UNICODE_10_CHAR_NAME, U_UNICODE_10_CHAR_NAME,
#endif /* U_HIDE_DEPRECATED_API */
/** Standard or synthetic character name. @stable ICU 2.0 */ /** Standard or synthetic character name. @stable ICU 2.0 */
U_EXTENDED_CHAR_NAME, U_EXTENDED_CHAR_NAME = U_UNICODE_CHAR_NAME+2,
/** Corrected name from NameAliases.txt. @stable ICU 4.4 */ /** Corrected name from NameAliases.txt. @stable ICU 4.4 */
U_CHAR_NAME_ALIAS, U_CHAR_NAME_ALIAS,
/** @stable ICU 2.0 */ /** @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
skipping to change at line 2657 skipping to change at line 2659
* @see UCharNameChoice * @see UCharNameChoice
* @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);
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Returns an empty string. * Returns an empty string.
* Used to return the ISO 10646 comment for a character. * Used to return the ISO 10646 comment for a character.
* The Unicode ISO_Comment property is deprecated and has no values. * The Unicode ISO_Comment property is deprecated and has no values.
* *
* @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.
skipping to change at line 2679 skipping to change at line 2682
* 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 0 * @return 0
* *
* @deprecated ICU 49 * @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);
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* 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>
* is set to <code>U_INVALID_CHAR_FOUND</code>. * is set to <code>U_INVALID_CHAR_FOUND</code>.
* A Unicode 1.0 name is matched only if it differs from the modern name. * A Unicode 1.0 name is matched only if it differs from the modern name.
* Unicode names are all uppercase. Extended names are lowercase followed * Unicode names are all uppercase. Extended names are lowercase followed
* by an uppercase hexadecimal number, and within angle brackets. * by an uppercase hexadecimal number, and within angle brackets.
* *
 End of changes. 6 change blocks. 
2 lines changed or deleted 6 lines changed or added


 ucol.h   ucol.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (c) 1996-2012, International Business Machines Corporation and others. * Copyright (c) 1996-2013, 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 534 skipping to change at line 534
* @see ucol_equal * @see ucol_equal
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UCollationResult U_EXPORT2 U_STABLE UCollationResult U_EXPORT2
ucol_strcoll( const UCollator *coll, ucol_strcoll( const UCollator *coll,
const UChar *source, const UChar *source,
int32_t sourceLength, int32_t sourceLength,
const UChar *target, const UChar *target,
int32_t targetLength); int32_t targetLength);
#ifndef U_HIDE_DRAFT_API
/** /**
* Compare two strings in UTF-8. * Compare two strings in UTF-8.
* The strings will be compared using the options already specified. * The strings will be compared using the options already specified.
* Note: When input string contains malformed a UTF-8 byte sequence, * Note: When input string contains malformed a UTF-8 byte sequence,
* this function treats these bytes as REPLACEMENT CHARACTER (U+FFFD). * this function treats these bytes as REPLACEMENT CHARACTER (U+FFFD).
* @param coll The UCollator containing the comparison rules. * @param coll The UCollator containing the comparison rules.
* @param source The source UTF-8 string. * @param source The source UTF-8 string.
* @param sourceLength The length of source, or -1 if null-terminated. * @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target UTF-8 string. * @param target The target UTF-8 string.
* @param targetLength The length of target, or -1 if null-terminated. * @param targetLength The length of target, or -1 if null-terminated.
skipping to change at line 560 skipping to change at line 561
* @draft ICU 50 * @draft ICU 50
*/ */
U_DRAFT UCollationResult U_EXPORT2 U_DRAFT UCollationResult U_EXPORT2
ucol_strcollUTF8( ucol_strcollUTF8(
const UCollator *coll, const UCollator *coll,
const char *source, const char *source,
int32_t sourceLength, int32_t sourceLength,
const char *target, const char *target,
int32_t targetLength, int32_t targetLength,
UErrorCode *status); UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Determine if one string is greater than another. * Determine if one string is greater than another.
* This function is equivalent to {@link #ucol_strcoll } == UCOL_GREATER * This function is equivalent to {@link #ucol_strcoll } == UCOL_GREATER
* @param coll The UCollator containing the comparison rules. * @param coll The UCollator containing the comparison rules.
* @param source The source string. * @param source The source string.
* @param sourceLength The length of source, or -1 if null-terminated. * @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target string. * @param target The target string.
* @param targetLength The length of target, or -1 if null-terminated. * @param targetLength The length of target, or -1 if null-terminated.
* @return TRUE if source is greater than target, FALSE otherwise. * @return TRUE if source is greater than target, FALSE otherwise.
skipping to change at line 1087 skipping to change at line 1089
* Gets the UCA version information for a Collator. Version is the * Gets the UCA version information for a Collator. Version is the
* UCA version number (3.1.1, 4.0). * UCA version number (3.1.1, 4.0).
* @param coll The UCollator to query. * @param coll The UCollator to query.
* @param info the version # information, the result will be filled in * @param info the version # information, the result will be filled in
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ucol_getUCAVersion(const UCollator* coll, UVersionInfo info); ucol_getUCAVersion(const UCollator* coll, UVersionInfo info);
/** /**
* Merge two sort keys. The levels are merged with their corresponding coun terparts * Merges two sort keys. The levels are merged with their corresponding cou nterparts
* (primaries with primaries, secondaries with secondaries etc.). Between t he values * (primaries with primaries, secondaries with secondaries etc.). Between t he values
* from the same level a separator is inserted. * from the same level a separator is inserted.
* example (uncompressed): *
* 191B1D 01 050505 01 910505 00 and 1F2123 01 050505 01 910505 00 * This is useful, for example, for combining sort keys from first and last
names
* to sort such pairs.
* It is possible to merge multiple sort keys by consecutively merging
* another one with the intermediate result.
*
* The length of the merge result is the sum of the lengths of the input so
rt keys.
*
* Example (uncompressed):
* <pre>191B1D 01 050505 01 910505 00
* 1F2123 01 050505 01 910505 00</pre>
* will be merged as * will be merged as
* 191B1D 02 1F212301 050505 02 050505 01 910505 02 910505 00 * <pre>191B1D 02 1F2123 01 050505 02 050505 01 910505 02 910505 00</pre>
* This allows for concatenating of first and last names for sorting, among *
other things. * If the destination buffer is not big enough, then its contents are undef
* If the destination buffer is not big enough, the results are undefined. ined.
* If any of source lengths are zero or any of source pointers are NULL/und * If any of source lengths are zero or any of the source pointers are NULL
efined, /undefined,
* result is of size zero. * the result is of size zero.
* @param src1 pointer to the first sortkey *
* @param src1Length length of the first sortkey * @param src1 the first sort key
* @param src2 pointer to the second sortkey * @param src1Length the length of the first sort key, including the zero b
* @param src2Length length of the second sortkey yte at the end;
* @param dest buffer to hold the result * can be -1 if the function is to find the length
* @param destCapacity size of the buffer for the result * @param src2 the second sort key
* @return size of the result. If the buffer is big enough size is always * @param src2Length the length of the second sort key, including the zero
* src1Length+src2Length-1 byte at the end;
* can be -1 if the function is to find the length
* @param dest the buffer where the merged sort key is written,
* can be NULL if destCapacity==0
* @param destCapacity the number of bytes in the dest buffer
* @return the length of the merged sort key, src1Length+src2Length;
* can be larger than destCapacity, or 0 if an error occurs (only f
or illegal arguments),
* in which cases the contents of dest is undefined
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length, ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length,
const uint8_t *src2, int32_t src2Length, const uint8_t *src2, int32_t src2Length,
uint8_t *dest, int32_t destCapacity); uint8_t *dest, int32_t destCapacity);
/** /**
* Universal attribute setter * Universal attribute setter
* @param coll collator which attributes are to be changed * @param coll collator which attributes are to be changed
 End of changes. 6 change blocks. 
19 lines changed or deleted 40 lines changed or added


 uconfig.h   uconfig.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2002-2012, International Business Machines * Copyright (C) 2002-2013, 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
*/ */
skipping to change at line 98 skipping to change at line 98
#ifndef U_DISABLE_RENAMING #ifndef U_DISABLE_RENAMING
#define U_DISABLE_RENAMING 0 #define U_DISABLE_RENAMING 0
#endif #endif
/** /**
* \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS * \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS
* Determines whether utypes.h includes utf.h, utf8.h, utf16.h and utf_old. h. * 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. * 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. * Otherwise, each those headers must be included explicitly when using one of their macros.
* Defaults to 0 for backward compatibility, except inside ICU. * Defaults to 0 for backward compatibility, except inside ICU.
* @draft ICU 49 * @stable ICU 49
*/ */
#ifdef U_NO_DEFAULT_INCLUDE_UTF_HEADERS #ifdef U_NO_DEFAULT_INCLUDE_UTF_HEADERS
/* Use the predefined value. */ /* Use the predefined value. */
#elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION ) || defined(U_I18N_IMPLEMENTATION) || \ #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_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || d efined(U_LAYOUTEX_IMPLEMENTATION) || \
defined(U_TOOLUTIL_IMPLEMENTATION) defined(U_TOOLUTIL_IMPLEMENTATION)
# define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 1 # define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 1
#else #else
# define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 0 # define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 0
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 ucurr.h   ucurr.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (c) 2002-2012, International Business Machines * Copyright (c) 2002-2013, 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 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. * 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 * <p>Note: If the ISO 4217 numeric code is not assigned for the currency o r
* the currency is unknown, this function returns 0. * the currency is unknown, this function returns 0.
* *
* @param currency null-terminated 3-letter ISO 4217 code * @param currency null-terminated 3-letter ISO 4217 code
* @return The ISO 4217 numeric code of the currency * @return The ISO 4217 numeric code of the currency
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucurr_getNumericCode(const UChar* currency); 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. 5 change blocks. 
5 lines changed or deleted 3 lines changed or added


 udat.h   udat.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 1996-2012, International Business Machines * Copyright (C) 1996-2013, 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 171 skipping to change at line 171
UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE, UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE,
UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE, UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE,
UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE, UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE,
/** No style */ /** No style */
UDAT_NONE = -1, UDAT_NONE = -1,
#ifndef U_HIDE_DRAFT_API
/** /**
* Use the pattern given in the parameter to udat_open * Use the pattern given in the parameter to udat_open
* @see udat_open * @see udat_open
* @draft ICU 50 * @draft ICU 50
*/ */
UDAT_PATTERN = -2, UDAT_PATTERN = -2,
/** @internal alias to UDAT_PATTERN */ /** @internal alias to UDAT_PATTERN */
UDAT_IGNORE = UDAT_PATTERN UDAT_IGNORE = UDAT_PATTERN
#endif /* U_HIDE_DRAFT_API */
} UDateFormatStyle; } UDateFormatStyle;
// Skeletons for dates. // Skeletons for dates.
/** /**
* Constant for date skeleton with year. * Constant for date skeleton with year.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_YEAR "y" #define UDAT_YEAR "y"
#ifndef U_HIDE_DRAFT_API
/** /**
* Constant for date skeleton with quarter. * Constant for date skeleton with quarter.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_QUARTER "QQQQ" #define UDAT_QUARTER "QQQQ"
/** /**
* Constant for date skeleton with abbreviated quarter. * Constant for date skeleton with abbreviated quarter.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_ABBR_QUARTER "QQQ" #define UDAT_ABBR_QUARTER "QQQ"
#endif /* U_HIDE_DRAFT_API */
/** /**
* Constant for date skeleton with year and quarter. * Constant for date skeleton with year and quarter.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_YEAR_QUARTER "yQQQQ" #define UDAT_YEAR_QUARTER "yQQQQ"
/** /**
* Constant for date skeleton with year and abbreviated quarter. * Constant for date skeleton with year and abbreviated quarter.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_YEAR_ABBR_QUARTER "yQQQ" #define UDAT_YEAR_ABBR_QUARTER "yQQQ"
skipping to change at line 262 skipping to change at line 266
* Used in combinations date + time, date + time + zone, or time + zone. * Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd" #define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd"
/** /**
* Constant for date skeleton with year, numeric month, and day. * Constant for date skeleton with year, numeric month, and day.
* Used in combinations date + time, date + time + zone, or time + zone. * Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_YEAR_NUM_MONTH_DAY "yMd" #define UDAT_YEAR_NUM_MONTH_DAY "yMd"
#ifndef U_HIDE_DRAFT_API
/** /**
* Constant for date skeleton with weekday. * Constant for date skeleton with weekday.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_WEEKDAY "EEEE" #define UDAT_WEEKDAY "EEEE"
/** /**
* Constant for date skeleton with abbreviated weekday. * Constant for date skeleton with abbreviated weekday.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_ABBR_WEEKDAY "E" #define UDAT_ABBR_WEEKDAY "E"
#endif /* U_HIDE_DRAFT_API */
/** /**
* Constant for date skeleton with year, month, weekday, and day. * Constant for date skeleton with year, month, weekday, and day.
* Used in combinations date + time, date + time + zone, or time + zone. * Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd" #define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd"
/** /**
* Constant for date skeleton with year, abbreviated month, weekday, and da y. * Constant for date skeleton with year, abbreviated month, weekday, and da y.
* Used in combinations date + time, date + time + zone, or time + zone. * Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0 * @stable ICU 4.0
skipping to change at line 334 skipping to change at line 340
*/ */
#define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd" #define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd"
// Skeletons for times. // Skeletons for times.
/** /**
* Constant for date skeleton with hour, with the locale's preferred hour f ormat (12 or 24). * Constant for date skeleton with hour, with the locale's preferred hour f ormat (12 or 24).
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_HOUR "j" #define UDAT_HOUR "j"
#ifndef U_HIDE_DRAFT_API
/** /**
* Constant for date skeleton with hour in 24-hour presentation. * Constant for date skeleton with hour in 24-hour presentation.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_HOUR24 "H" #define UDAT_HOUR24 "H"
/** /**
* Constant for date skeleton with minute. * Constant for date skeleton with minute.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_MINUTE "m" #define UDAT_MINUTE "m"
#endif /* U_HIDE_DRAFT_API */
/** /**
* Constant for date skeleton with hour and minute, with the locale's prefe rred hour format (12 or 24). * Constant for date skeleton with hour and minute, with the locale's prefe rred hour format (12 or 24).
* Used in combinations date + time, date + time + zone, or time + zone. * Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_HOUR_MINUTE "jm" #define UDAT_HOUR_MINUTE "jm"
/** /**
* Constant for date skeleton with hour and minute in 24-hour presentation. * Constant for date skeleton with hour and minute in 24-hour presentation.
* Used in combinations date + time, date + time + zone, or time + zone. * Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_HOUR24_MINUTE "Hm" #define UDAT_HOUR24_MINUTE "Hm"
#ifndef U_HIDE_DRAFT_API
/** /**
* Constant for date skeleton with second. * Constant for date skeleton with second.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_SECOND "s" #define UDAT_SECOND "s"
#endif /* U_HIDE_DRAFT_API */
/** /**
* Constant for date skeleton with hour, minute, and second, * Constant for date skeleton with hour, minute, and second,
* with the locale's preferred hour format (12 or 24). * with the locale's preferred hour format (12 or 24).
* Used in combinations date + time, date + time + zone, or time + zone. * Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_HOUR_MINUTE_SECOND "jms" #define UDAT_HOUR_MINUTE_SECOND "jms"
/** /**
* Constant for date skeleton with hour, minute, and second in * Constant for date skeleton with hour, minute, and second in
* 24-hour presentation. * 24-hour presentation.
skipping to change at line 384 skipping to change at line 394
#define UDAT_HOUR24_MINUTE_SECOND "Hms" #define UDAT_HOUR24_MINUTE_SECOND "Hms"
/** /**
* Constant for date skeleton with minute and second. * Constant for date skeleton with minute and second.
* Used in combinations date + time, date + time + zone, or time + zone. * Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_MINUTE_SECOND "ms" #define UDAT_MINUTE_SECOND "ms"
// Skeletons for time zones. // Skeletons for time zones.
#ifndef U_HIDE_DRAFT_API
/** /**
* Constant for <i>generic location format</i>, such as Los Angeles Time; * Constant for <i>generic location format</i>, such as Los Angeles Time;
* used in combinations date + time + zone, or time + zone. * used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a> * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_LOCATION_TZ "VVVV" #define UDAT_LOCATION_TZ "VVVV"
/** /**
* Constant for <i>generic non-location format</i>, such as Pacific Time; * Constant for <i>generic non-location format</i>, such as Pacific Time;
* used in combinations date + time + zone, or time + zone. * used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a> * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_GENERIC_TZ "vvvv" #define UDAT_GENERIC_TZ "vvvv"
/** /**
* Constant for <i>generic non-location format</i>, abbreviated if possible , such as PT; * Constant for <i>generic non-location format</i>, abbreviated if possible , such as PT;
* used in combinations date + time + zone, or time + zone. * used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a> * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_ABBR_GENERIC_TZ "v" #define UDAT_ABBR_GENERIC_TZ "v"
/** /**
* Constant for <i>specific non-location format</i>, such as Pacific Daylig ht Time; * Constant for <i>specific non-location format</i>, such as Pacific Daylig ht Time;
* used in combinations date + time + zone, or time + zone. * used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a> * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_SPECIFIC_TZ "zzzz" #define UDAT_SPECIFIC_TZ "zzzz"
/** /**
* Constant for <i>specific non-location format</i>, abbreviated if possibl e, such as PDT; * Constant for <i>specific non-location format</i>, abbreviated if possibl e, such as PDT;
* used in combinations date + time + zone, or time + zone. * used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a> * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_ABBR_SPECIFIC_TZ "z" #define UDAT_ABBR_SPECIFIC_TZ "z"
/** /**
* Constant for <i>localized GMT/UTC format</i>, such as GMT+8:00 or HPG-8: 00; * Constant for <i>localized GMT/UTC format</i>, such as GMT+8:00 or HPG-8: 00;
* used in combinations date + time + zone, or time + zone. * used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a> * @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a> * @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
#define UDAT_ABBR_UTC_TZ "ZZZZ" #define UDAT_ABBR_UTC_TZ "ZZZZ"
#endif /* U_HIDE_DRAFT_API */
// deprecated skeleton constants // deprecated skeleton constants
#ifndef U_HIDE_DEPRECATED_API
/** /**
* Constant for date skeleton with standalone month. * Constant for date skeleton with standalone month.
* @deprecated ICU 50 Use UDAT_MONTH instead. * @deprecated ICU 50 Use UDAT_MONTH instead.
*/ */
#define UDAT_STANDALONE_MONTH "LLLL" #define UDAT_STANDALONE_MONTH "LLLL"
/** /**
* Constant for date skeleton with standalone abbreviated month. * Constant for date skeleton with standalone abbreviated month.
* @deprecated ICU 50 Use UDAT_ABBR_MONTH instead. * @deprecated ICU 50 Use UDAT_ABBR_MONTH instead.
*/ */
#define UDAT_ABBR_STANDALONE_MONTH "LLL" #define UDAT_ABBR_STANDALONE_MONTH "LLL"
skipping to change at line 466 skipping to change at line 479
/** /**
* Constant for date skeleton with hour and generic timezone. * Constant for date skeleton with hour and generic timezone.
* @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_GENERIC_TZ or some ot her timezone presentation. * @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_GENERIC_TZ or some ot her timezone presentation.
*/ */
#define UDAT_HOUR_GENERIC_TZ "jv" #define UDAT_HOUR_GENERIC_TZ "jv"
/** /**
* Constant for date skeleton with hour and timezone. * Constant for date skeleton with hour and timezone.
* @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_SPECIFIC_TZ or some o ther timezone presentation. * @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_SPECIFIC_TZ or some o ther timezone presentation.
*/ */
#define UDAT_HOUR_TZ "jz" #define UDAT_HOUR_TZ "jz"
#endif /* U_HIDE_DEPRECATED_API */
/** /**
* FieldPosition and UFieldPosition selectors for format fields * FieldPosition and UFieldPosition selectors for format fields
* defined by DateFormat and UDateFormat. * defined by DateFormat and UDateFormat.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
typedef enum UDateFormatField { typedef enum UDateFormatField {
/** /**
* FieldPosition and UFieldPosition selector for 'G' field alignment, * FieldPosition and UFieldPosition selector for 'G' field alignment,
* corresponding to the UCAL_ERA field. * corresponding to the UCAL_ERA field.
skipping to change at line 711 skipping to change at line 725
* 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, * FieldPosition selector for "U" field alignment,
* corresponding to cyclic year names. This is implemented * corresponding to cyclic year names. This is implemented
* using the {@link #UCAL_YEAR} field. This displays * using the {@link #UCAL_YEAR} field. This displays
* the cyclic year name, if available. * the cyclic year name, if available.
* @draft ICU 49 * @stable ICU 49
*/ */
UDAT_YEAR_NAME_FIELD = 30, UDAT_YEAR_NAME_FIELD = 30,
/** #ifndef U_HIDE_DRAFT_API
/**
* FieldPosition selector for 'O' field alignment,
* corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields.
* This displays the localized GMT format.
* @draft ICU 51
*/
UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD = 31,
/**
* FieldPosition selector for 'X' field alignment,
* corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields.
* This displays the ISO 8601 local time offset format or UTC indicator
("Z").
* @draft ICU 51
*/
UDAT_TIMEZONE_ISO_FIELD = 32,
/**
* FieldPosition selector for 'x' field alignment,
* corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields.
* This displays the ISO 8601 local time offset format.
* @draft ICU 51
*/
UDAT_TIMEZONE_ISO_LOCAL_FIELD = 33,
#endif /* U_HIDE_DRAFT_API */
/**
* 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 = 31 UDAT_FIELD_COUNT = 34
} 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
skipping to change at line 1076 skipping to change at line 1116
* The possible types of date format symbols * The possible types of date format symbols
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
typedef enum UDateFormatSymbolType { typedef enum UDateFormatSymbolType {
/** The era names, for example AD */ /** The era names, for example AD */
UDAT_ERAS, UDAT_ERAS,
/** The month names, for example February */ /** The month names, for example February */
UDAT_MONTHS, UDAT_MONTHS,
/** The short month names, for example Feb. */ /** The short month names, for example Feb. */
UDAT_SHORT_MONTHS, UDAT_SHORT_MONTHS,
/** The weekday names, for example Monday */ /** The CLDR-style format "wide" weekday names, for example Monday */
UDAT_WEEKDAYS, UDAT_WEEKDAYS,
/** The short weekday names, for example Mon. */ /**
* The CLDR-style format "abbreviated" (not "short") weekday names, for
example "Mon."
* For the CLDR-style format "short" weekday names, use UDAT_SHORTER_WE
EKDAYS.
*/
UDAT_SHORT_WEEKDAYS, UDAT_SHORT_WEEKDAYS,
/** The AM/PM names, for example AM */ /** The AM/PM names, for example AM */
UDAT_AM_PMS, UDAT_AM_PMS,
/** The localized characters */ /** The localized characters */
UDAT_LOCALIZED_CHARS, UDAT_LOCALIZED_CHARS,
/** The long era names, for example Anno Domini */ /** The long era names, for example Anno Domini */
UDAT_ERA_NAMES, UDAT_ERA_NAMES,
/** The narrow month names, for example F */ /** The narrow month names, for example F */
UDAT_NARROW_MONTHS, UDAT_NARROW_MONTHS,
/** The narrow weekday names, for example N */ /** The CLDR-style format "narrow" weekday names, for example "M" */
UDAT_NARROW_WEEKDAYS, UDAT_NARROW_WEEKDAYS,
/** Standalone context versions of months */ /** Standalone context versions of months */
UDAT_STANDALONE_MONTHS, UDAT_STANDALONE_MONTHS,
UDAT_STANDALONE_SHORT_MONTHS, UDAT_STANDALONE_SHORT_MONTHS,
UDAT_STANDALONE_NARROW_MONTHS, UDAT_STANDALONE_NARROW_MONTHS,
/** Standalone context versions of weekdays */ /** The CLDR-style stand-alone "wide" weekday names */
UDAT_STANDALONE_WEEKDAYS, UDAT_STANDALONE_WEEKDAYS,
/**
* The CLDR-style stand-alone "abbreviated" (not "short") weekday names
.
* For the CLDR-style stand-alone "short" weekday names, use UDAT_STAND
ALONE_SHORTER_WEEKDAYS.
*/
UDAT_STANDALONE_SHORT_WEEKDAYS, UDAT_STANDALONE_SHORT_WEEKDAYS,
/** The CLDR-style stand-alone "narrow" weekday names */
UDAT_STANDALONE_NARROW_WEEKDAYS, UDAT_STANDALONE_NARROW_WEEKDAYS,
/** The quarters, for example 1st Quarter */ /** The quarters, for example 1st Quarter */
UDAT_QUARTERS, UDAT_QUARTERS,
/** The short quarter names, for example Q1 */ /** The short quarter names, for example Q1 */
UDAT_SHORT_QUARTERS, UDAT_SHORT_QUARTERS,
/** Standalone context versions of quarters */ /** Standalone context versions of quarters */
UDAT_STANDALONE_QUARTERS, UDAT_STANDALONE_QUARTERS,
UDAT_STANDALONE_SHORT_QUARTERS UDAT_STANDALONE_SHORT_QUARTERS,
#ifndef U_HIDE_DRAFT_API
/**
* The CLDR-style short weekday names, e.g. "Su", Mo", etc.
* These are named "SHORTER" to contrast with the constants using _SHOR
T_
* above, which actually get the CLDR-style *abbreviated* versions of t
he
* corresponding names.
* @draft ICU 51
*/
UDAT_SHORTER_WEEKDAYS,
/**
* Standalone version of UDAT_SHORTER_WEEKDAYS.
* @draft ICU 51
*/
UDAT_STANDALONE_SHORTER_WEEKDAYS
#endif /* U_HIDE_DRAFT_API */
} UDateFormatSymbolType; } UDateFormatSymbolType;
struct UDateFormatSymbols; struct UDateFormatSymbols;
/** Date format symbols. /** Date format symbols.
* For usage in C programs. * For usage in C programs.
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
typedef struct UDateFormatSymbols UDateFormatSymbols; typedef struct UDateFormatSymbols UDateFormatSymbols;
/** /**
skipping to change at line 1192 skipping to change at line 1254
* @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_INTERNAL_API #ifndef U_HIDE_DRAFT_API
/** /**
* Set a particular UDisplayContext value in the formatter, such as * Set a particular UDisplayContext value in the formatter, such as
* UDISPCTX_CAPITALIZATION_FOR_STANDALONE. * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
* @param fmt The formatter for which to set a UDisplayContext value. * @param fmt The formatter for which to set a UDisplayContext value.
* @param value The UDisplayContext value to set. * @param value The UDisplayContext value to set.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
U_INTERNAL void U_EXPORT2 U_DRAFT void U_EXPORT2
udat_setContext(UDateFormat* fmt, UDisplayContext value, UErrorCode* status ); udat_setContext(UDateFormat* fmt, UDisplayContext value, UErrorCode* status );
/** /**
* Get the formatter's UDisplayContext value for the specified UDisplayCont extType, * Get the formatter's UDisplayContext value for the specified UDisplayCont extType,
* such as UDISPCTX_TYPE_CAPITALIZATION. * such as UDISPCTX_TYPE_CAPITALIZATION.
* @param fmt The formatter to query. * @param fmt The formatter to query.
* @param type The UDisplayContextType whose value to return * @param type The UDisplayContextType whose value to return
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @return The UDisplayContextValue for the specified type. * @return The UDisplayContextValue for the specified type.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
U_INTERNAL UDisplayContext U_EXPORT2 U_DRAFT UDisplayContext U_EXPORT2
udat_getContext(UDateFormat* fmt, UDisplayContextType type, UErrorCode* sta tus); udat_getContext(UDateFormat* fmt, UDisplayContextType type, UErrorCode* sta tus);
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_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.
skipping to change at line 1272 skipping to change at line 1334
* @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 * @internal
* @see udat_open * @see udat_open
*/ */
typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle time Style, typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle time Style,
UDateFormatStyle dateS tyle, UDateFormatStyle dateS tyle,
const char *loca le, const char *loca le,
const UChar *tzID , const UChar *tzID ,
int32_t tzIDL ength, int32_t tzIDL ength,
skipping to change at line 1300 skipping to change at line 1361
*/ */
U_INTERNAL void U_EXPORT2 U_INTERNAL void U_EXPORT2
udat_registerOpener(UDateFormatOpener opener, UErrorCode *status); udat_registerOpener(UDateFormatOpener opener, UErrorCode *status);
/** /**
* Un-Register a provider factory * Un-Register a provider factory
* @internal ICU 49 * @internal ICU 49
*/ */
U_INTERNAL UDateFormatOpener U_EXPORT2 U_INTERNAL UDateFormatOpener U_EXPORT2
udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status); udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 46 change blocks. 
30 lines changed or deleted 99 lines changed or added


 udisplaycontext.h   udisplaycontext.h 
/* /*
*************************************************************************** ************** *************************************************************************** **************
* Copyright (C) 2012, International Business Machines * Copyright (C) 2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ************** *************************************************************************** **************
*/ */
#ifndef UDISPLAYCONTEXT_H #ifndef UDISPLAYCONTEXT_H
#define UDISPLAYCONTEXT_H #define UDISPLAYCONTEXT_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
/* Dont hide with #ifndef U_HIDE_INTERNAL_API, needed by virtual methods */ /* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
/** /**
* Display context types, for getting values of a particular setting. * Display context types, for getting values of a particular setting.
* Note, the specific numeric values are internal and may change. * Note, the specific numeric values are internal and may change.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
enum UDisplayContextType { enum UDisplayContextType {
#ifndef U_HIDE_DRAFT_API
/** /**
* Type to retrieve the dialect handling setting, e.g. * Type to retrieve the dialect handling setting, e.g.
* UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES. * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_TYPE_DIALECT_HANDLING = 0, UDISPCTX_TYPE_DIALECT_HANDLING = 0,
/** /**
* Type to retrieve the capitalization context setting, e.g. * Type to retrieve the capitalization context setting, e.g.
* UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_ SENTENCE, * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_ SENTENCE,
* UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc. * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_TYPE_CAPITALIZATION = 1 UDISPCTX_TYPE_CAPITALIZATION = 1
#endif /* U_HIDE_DRAFT_API */
}; };
/** /**
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
typedef enum UDisplayContextType UDisplayContextType; typedef enum UDisplayContextType UDisplayContextType;
/* Dont hide with #ifndef U_HIDE_INTERNAL_API, needed by virtual methods */ /* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
/** /**
* Display context settings. * Display context settings.
* Note, the specific numeric values are internal and may change. * Note, the specific numeric values are internal and may change.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
enum UDisplayContext { enum UDisplayContext {
#ifndef U_HIDE_DRAFT_API
/** /**
* ================================ * ================================
* DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
* UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALEC T_HANDLING * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALEC T_HANDLING
* to get the value. * to get the value.
*/ */
/** /**
* A possible setting for DIALECT_HANDLING: * A possible setting for DIALECT_HANDLING:
* use standard names when generating a locale name, * use standard names when generating a locale name,
* e.g. en_GB displays as 'English (United Kingdom)'. * e.g. en_GB displays as 'English (United Kingdom)'.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0, UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
/** /**
* A possible setting for DIALECT_HANDLING: * A possible setting for DIALECT_HANDLING:
* use dialect names, when generating a locale name, * use dialect names, when generating a locale name,
* e.g. en_GB displays as 'British English'. * e.g. en_GB displays as 'British English'.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1, UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
/** /**
* ================================ * ================================
* CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE, * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE,
* UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
* UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
* UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or
* UDISPCTX_CAPITALIZATION_FOR_STANDALONE. * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
* Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the valu e. * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the valu e.
*/ */
/** /**
* The capitalization context to be used is unknown (this is the defaul t value). * The capitalization context to be used is unknown (this is the defaul t value).
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0, UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
/** /**
* The capitalization context if a date, date symbol or display name is to be * The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for the middle of a senten ce. * formatted with capitalization appropriate for the middle of a senten ce.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITAL IZATION<<8) + 1, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITAL IZATION<<8) + 1,
/** /**
* The capitalization context if a date, date symbol or display name is to be * The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for the beginning of a sen tence. * formatted with capitalization appropriate for the beginning of a sen tence.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPI TALIZATION<<8) + 2, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPI TALIZATION<<8) + 2,
/** /**
* The capitalization context if a date, date symbol or display name is to be * The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for a user-interface list or menu item. * formatted with capitalization appropriate for a user-interface list or menu item.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZA TION<<8) + 3, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZA TION<<8) + 3,
/** /**
* The capitalization context if a date, date symbol or display name is to be * The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for stand-alone usage such as an * formatted with capitalization appropriate for stand-alone usage such as an
* isolated name on a calendar page. * isolated name on a calendar page.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION< <8) + 4 UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION< <8) + 4
#endif /* U_HIDE_DRAFT_API */
}; };
/** /**
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
typedef enum UDisplayContext UDisplayContext; typedef enum UDisplayContext UDisplayContext;
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 20 change blocks. 
16 lines changed or deleted 20 lines changed or added


 ugender.h   ugender.h 
/* /*
*************************************************************************** ************** *************************************************************************** **************
* Copyright (C) 2010-2012, International Business Machines * Copyright (C) 2010-2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ************** *************************************************************************** **************
*/ */
#ifndef UGENDER_H #ifndef UGENDER_H
#define UGENDER_H #define UGENDER_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
/** /**
* \file * \file
* \brief C API: The purpose of this API is to compute the gender of a list as a * \brief C API: The purpose of this API is to compute the gender of a list as a
* whole given the gender of each element. * whole given the gender of each element.
* *
*/ */
skipping to change at line 63 skipping to change at line 64
*/ */
struct UGenderInfo; struct UGenderInfo;
typedef struct UGenderInfo UGenderInfo; typedef struct UGenderInfo UGenderInfo;
/** /**
* Opens a new UGenderInfo object given locale. * Opens a new UGenderInfo object given locale.
* @param locale The locale for which the rules are desired. * @param locale The locale for which the rules are desired.
* @return A UGenderInfo for the specified locale, or NULL if an error occu rred. * @return A UGenderInfo for the specified locale, or NULL if an error occu rred.
* @draft ICU 50 * @draft ICU 50
*/ */
U_STABLE const UGenderInfo* U_EXPORT2 U_DRAFT const UGenderInfo* U_EXPORT2
ugender_getInstance(const char *locale, UErrorCode *status); ugender_getInstance(const char *locale, UErrorCode *status);
/** /**
* Given a list, returns the gender of the list as a whole. * Given a list, returns the gender of the list as a whole.
* @param genderInfo pointer that ugender_getInstance returns. * @param genderInfo pointer that ugender_getInstance returns.
* @param genders the gender of each element in the list. * @param genders the gender of each element in the list.
* @param size the size of the list. * @param size the size of the list.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The gender of the list. * @return The gender of the list.
* @draft ICU 50 * @draft ICU 50
*/ */
U_DRAFT UGender U_EXPORT2 U_DRAFT UGender U_EXPORT2
ugender_getListGender(const UGenderInfo* genderinfo, const UGender *genders , int32_t size, UErrorCode *status); ugender_getListGender(const UGenderInfo* genderinfo, const UGender *genders , int32_t size, UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 4 change blocks. 
2 lines changed or deleted 4 lines changed or added


 uidna.h   uidna.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* *
* Copyright (C) 2003-2012, International Business Machines * Copyright (C) 2003-2013, 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 99 skipping to change at line 99
UIDNA_NONTRANSITIONAL_TO_ASCII=0x10, UIDNA_NONTRANSITIONAL_TO_ASCII=0x10,
/** /**
* IDNA option for nontransitional processing in ToUnicode(). * IDNA option for nontransitional processing in ToUnicode().
* For use in static worker and factory methods. * For use in static worker and factory methods.
* <p>By default, ToUnicode() uses transitional processing. * <p>By default, ToUnicode() uses transitional processing.
* <p>This option is ignored by the IDNA2003 implementation. * <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.)
* @stable 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. * IDNA option to check for whether the input conforms to the CONTEXTO rules.
* For use in static worker and factory methods. * For use in static worker and factory methods.
* <p>This option is ignored by the IDNA2003 implementation. * <p>This option is ignored by the IDNA2003 implementation.
* (The CONTEXTO check is new in IDNA2008.) * (The CONTEXTO check is new in IDNA2008.)
* <p>This is for use by registries for IDNA2008 conformance. * <p>This is for use by registries for IDNA2008 conformance.
* UTS #46 does not require the CONTEXTO check. * UTS #46 does not require the CONTEXTO check.
* @draft ICU 49 * @stable ICU 49
*/ */
UIDNA_CHECK_CONTEXTO=0x40 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.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
struct UIDNA; struct UIDNA;
typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @stable ICU 4 .6 */ typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @stable ICU 4 .6 */
/** /**
skipping to change at line 493 skipping to change at line 491
/** /**
* 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).
* @stable 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.
* @stable 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. * A label does not meet the IDNA CONTEXTO requirements for punctuation characters.
* Some punctuation characters "Would otherwise have been DISALLOWED" * Some punctuation characters "Would otherwise have been DISALLOWED"
* but are allowed in certain contexts. (RFC 5892) * but are allowed in certain contexts. (RFC 5892)
* @draft ICU 49 * @stable ICU 49
*/ */
UIDNA_ERROR_CONTEXTO_PUNCTUATION=0x2000, UIDNA_ERROR_CONTEXTO_PUNCTUATION=0x2000,
/** /**
* A label does not meet the IDNA CONTEXTO requirements for digits. * 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). * Arabic-Indic Digits (U+066x) must not be mixed with Extended Arabic- Indic Digits (U+06Fx).
* @draft ICU 49 * @stable ICU 49
*/ */
UIDNA_ERROR_CONTEXTO_DIGITS=0x4000 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. 8 change blocks. 
8 lines changed or deleted 4 lines changed or added


 uldnames.h   uldnames.h 
skipping to change at line 269 skipping to change at line 269
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn, uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
const char *key, const char *key,
const char *value, const char *value,
UChar *result, UChar *result,
int32_t maxResultSize, int32_t maxResultSize,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_DRAFT_API
/** /**
* Returns an instance of LocaleDisplayNames that returns names formatted * Returns an instance of LocaleDisplayNames that returns names formatted
* for the provided locale, using the provided UDisplayContext settings. * for the provided locale, using the provided UDisplayContext settings.
* *
* @param locale The display locale * @param locale The display locale
* @param contexts List of one or more context settings (e.g. for dialect * @param contexts List of one or more context settings (e.g. for dialect
* handling, capitalization, etc. * handling, capitalization, etc.
* @param length Number of items in the contexts list * @param length Number of items in the contexts list
* @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates * @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates
* a failure status, the function will do nothing; otherwise t his will be * a failure status, the function will do nothing; otherwise t his will be
* updated with any new status from the function. * updated with any new status from the function.
* @return a ULocaleDisplayNames instance * @return a ULocaleDisplayNames instance
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
U_INTERNAL ULocaleDisplayNames * U_EXPORT2 U_DRAFT ULocaleDisplayNames * U_EXPORT2
uldn_openForContext(const char * locale, UDisplayContext *contexts, uldn_openForContext(const char * locale, UDisplayContext *contexts,
int32_t length, UErrorCode *pErrorCode); int32_t length, UErrorCode *pErrorCode);
/** /**
* Returns the UDisplayContext value for the specified UDisplayContextType. * Returns the UDisplayContext value for the specified UDisplayContextType.
* @param ldn the ULocaleDisplayNames instance * @param ldn the ULocaleDisplayNames instance
* @param type the UDisplayContextType whose value to return * @param type the UDisplayContextType whose value to return
* @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates * @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates
* a failure status, the function will do nothing; otherwise t his will be * a failure status, the function will do nothing; otherwise t his will be
* updated with any new status from the function. * updated with any new status from the function.
* @return the UDisplayContextValue for the specified type. * @return the UDisplayContextValue for the specified type.
* @internal ICU 50 technology preview * @draft ICU 51
*/ */
U_INTERNAL UDisplayContext U_EXPORT2 U_DRAFT UDisplayContext U_EXPORT2
uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type, uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_DRAFT_API */
#endif /* !UCONFIG_NO_FORMATTING */ #endif /* !UCONFIG_NO_FORMATTING */
#endif /* __ULDNAMES_H__ */ #endif /* __ULDNAMES_H__ */
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added


 uloc.h   uloc.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, 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 752 skipping to change at line 752
/** /**
* Gets the size of the all available locale list. * Gets the size of the all available locale list.
* *
* @return the size of the locale list * @return the size of the locale list
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 uloc_countAvailable(void); U_STABLE int32_t U_EXPORT2 uloc_countAvailable(void);
/** /**
* *
* Gets a list of all available language codes defined in ISO 639. This is * Gets a list of all available 2-letter language codes defined in ISO 639,
a pointer * plus additional 3-letter codes determined to be useful for locale genera
tion as
* defined by Unicode CLDR. This is a pointer
* to an array of pointers to arrays of char. All of these pointers are ow ned * to an array of pointers to arrays of char. All of these pointers are ow ned
* by ICU-- do not delete them, and do not write through them. The array i s * by ICU-- do not delete them, and do not write through them. The array i s
* terminated with a null pointer. * terminated with a null pointer.
* @return a list of all available language codes * @return a list of all available language codes
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE const char* const* U_EXPORT2 U_STABLE const char* const* U_EXPORT2
uloc_getISOLanguages(void); uloc_getISOLanguages(void);
/** /**
 End of changes. 2 change blocks. 
3 lines changed or deleted 5 lines changed or added


 ulocdata.h   ulocdata.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* * * *
* Copyright (C) 2003-2012, International Business Machines * * Copyright (C) 2003-2013, 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 46 skipping to change at line 46
/** 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 @stable ICU 4.8 */ /** Index Character set @stable ICU 4.8 */
ULOCDATA_ES_INDEX=2, ULOCDATA_ES_INDEX=2,
#ifndef U_HIDE_DRAFT_API
/** Punctuation set @draft ICU 51 */
ULOCDATA_ES_PUNCTUATION=3,
#endif /* U_HIDE_DRAFT_API */
/** 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=4
} 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 */
ULOCDATA_QUOTATION_START = 0, ULOCDATA_QUOTATION_START = 0,
/** Quotation end @stable ICU 3.4 */ /** Quotation end @stable ICU 3.4 */
ULOCDATA_QUOTATION_END = 1, ULOCDATA_QUOTATION_END = 1,
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added


 unistr.h   unistr.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1998-2012, International Business Machines * Copyright (C) 1998-2013, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File unistr.h * File unistr.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 09/25/98 stephen Creation. * 09/25/98 stephen Creation.
* 11/11/98 stephen Changed per 11/9 code review. * 11/11/98 stephen Changed per 11/9 code review.
skipping to change at line 57 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_HIDE_INTERNAL_API
/** /**
* \def U_STRING_CASE_MAPPER_DEFINED * \def U_STRING_CASE_MAPPER_DEFINED
* @internal * @internal
*/ */
#ifndef U_STRING_CASE_MAPPER_DEFINED #ifndef U_STRING_CASE_MAPPER_DEFINED
#define U_STRING_CASE_MAPPER_DEFINED #define U_STRING_CASE_MAPPER_DEFINED
/** /**
* Internal string case mapping function type. * Internal string case mapping function type.
* @internal * @internal
*/ */
typedef int32_t U_CALLCONV typedef int32_t U_CALLCONV
UStringCaseMapper(const UCaseMap *csm, UStringCaseMapper(const UCaseMap *csm,
UChar *dest, int32_t destCapacity, UChar *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength, const UChar *src, int32_t srcLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
#endif #endif
#endif /* U_HIDE_INTERNAL_API */
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 */
skipping to change at line 145 skipping to change at line 147
* 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 * \def UNISTR_FROM_CHAR_EXPLICIT
* This can be defined to be empty or "explicit". * This can be defined to be empty or "explicit".
* If explicit, then the UnicodeString(UChar) and UnicodeString(UChar32) * If explicit, then the UnicodeString(UChar) and UnicodeString(UChar32)
* constructors are marked as explicit, preventing their inadvertent use. * constructors are marked as explicit, preventing their inadvertent use.
* @draft ICU 49 * @stable ICU 49
*/ */
#ifndef UNISTR_FROM_CHAR_EXPLICIT #ifndef UNISTR_FROM_CHAR_EXPLICIT
# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) # if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
// Auto-"explicit" in ICU library code. // Auto-"explicit" in ICU library code.
# define UNISTR_FROM_CHAR_EXPLICIT explicit # define UNISTR_FROM_CHAR_EXPLICIT explicit
# else # else
// Empty by default for source code compatibility. // Empty by default for source code compatibility.
# define UNISTR_FROM_CHAR_EXPLICIT # define UNISTR_FROM_CHAR_EXPLICIT
# endif # endif
#endif #endif
/** /**
* \def UNISTR_FROM_STRING_EXPLICIT * \def UNISTR_FROM_STRING_EXPLICIT
* This can be defined to be empty or "explicit". * This can be defined to be empty or "explicit".
* If explicit, then the UnicodeString(const char *) and UnicodeString(cons t UChar *) * If explicit, then the UnicodeString(const char *) and UnicodeString(cons t UChar *)
* constructors are marked as explicit, preventing their inadvertent use. * constructors are marked as explicit, preventing their inadvertent use.
* *
* In particular, this helps prevent accidentally depending on ICU conversi on code * 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. * by passing a string literal into an API with a const UnicodeString & par ameter.
* @draft ICU 49 * @stable ICU 49
*/ */
#ifndef UNISTR_FROM_STRING_EXPLICIT #ifndef UNISTR_FROM_STRING_EXPLICIT
# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) # if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
// Auto-"explicit" in ICU library code. // Auto-"explicit" in ICU library code.
# define UNISTR_FROM_STRING_EXPLICIT explicit # define UNISTR_FROM_STRING_EXPLICIT explicit
# else # else
// Empty by default for source code compatibility. // Empty by default for source code compatibility.
# define UNISTR_FROM_STRING_EXPLICIT # define UNISTR_FROM_STRING_EXPLICIT
# endif # endif
#endif #endif
skipping to change at line 2847 skipping to change at line 2849
*/ */
inline const UChar *getTerminatedBuffer(); inline const UChar *getTerminatedBuffer();
//======================================== //========================================
// Constructors // Constructors
//======================================== //========================================
/** Construct an empty UnicodeString. /** Construct an empty UnicodeString.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString(); inline UnicodeString();
/** /**
* Construct a UnicodeString with capacity to hold <TT>capacity</TT> UCha rs * Construct a UnicodeString with capacity to hold <TT>capacity</TT> UCha rs
* @param capacity the number of UChars this UnicodeString should hold * @param capacity the number of UChars this UnicodeString should hold
* before a resize is necessary; if count is greater than 0 and count * before a resize is necessary; if count is greater than 0 and count
* code points c take up more space than capacity, then capacity is adjus ted * code points c take up more space than capacity, then capacity is adjus ted
* 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
skipping to change at line 3199 skipping to change at line 3201
* @see u_unescapeAt() * @see u_unescapeAt()
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString unescape() const; UnicodeString unescape() const;
/** /**
* Unescape a single escape sequence and return the represented * Unescape a single escape sequence and return the represented
* character. See unescape() for a listing of the recognized escape * character. See unescape() for a listing of the recognized escape
* sequences. The character at offset-1 is assumed (without * sequences. The character at offset-1 is assumed (without
* checking) to be a backslash. If the escape sequence is * checking) to be a backslash. If the escape sequence is
* ill-formed, or the offset is out of range, (UChar32)0xFFFFFFFF is * ill-formed, or the offset is out of range, U_SENTINEL=-1 is
* returned. * returned.
* *
* @param offset an input output parameter. On input, it is the * @param offset an input output parameter. On input, it is the
* offset into this string where the escape sequence is located, * offset into this string where the escape sequence is located,
* after the initial backslash. On output, it is advanced after the * after the initial backslash. On output, it is advanced after the
* last character parsed. On error, it is not advanced at all. * last character parsed. On error, it is not advanced at all.
* @return the character represented by the escape sequence at * @return the character represented by the escape sequence at
* offset, or (UChar32)0xFFFFFFFF on error. * offset, or U_SENTINEL=-1 on error.
* @see UnicodeString#unescape() * @see UnicodeString#unescape()
* @see u_unescape() * @see u_unescape()
* @see u_unescapeAt() * @see u_unescapeAt()
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UChar32 unescapeAt(int32_t &offset) const; UChar32 unescapeAt(int32_t &offset) 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 3598 skipping to change at line 3600
inline UChar* inline UChar*
UnicodeString::getArrayStart() UnicodeString::getArrayStart()
{ return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields. fArray; } { return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields. fArray; }
inline const UChar* inline const UChar*
UnicodeString::getArrayStart() const UnicodeString::getArrayStart() const
{ return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields. fArray; } { return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields. fArray; }
//======================================== //========================================
// Default constructor
//========================================
inline
UnicodeString::UnicodeString()
: fShortLength(0),
fFlags(kShortString)
{}
//========================================
// Read-only implementation methods // Read-only implementation methods
//======================================== //========================================
inline int32_t inline int32_t
UnicodeString::length() const UnicodeString::length() const
{ return fShortLength>=0 ? fShortLength : fUnion.fFields.fLength; } { return fShortLength>=0 ? fShortLength : fUnion.fFields.fLength; }
inline int32_t inline int32_t
UnicodeString::getCapacity() const UnicodeString::getCapacity() const
{ return (fFlags&kUsingStackBuffer) ? US_STACKBUF_SIZE : fUnion.fFields.fCa pacity; } { return (fFlags&kUsingStackBuffer) ? US_STACKBUF_SIZE : fUnion.fFields.fCa pacity; }
 End of changes. 9 change blocks. 
6 lines changed or deleted 18 lines changed or added


 unorm2.h   unorm2.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2009-2012, International Business Machines * Copyright (C) 2009-2013, 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. * Returns a UNormalizer2 instance for Unicode NFC normalization.
* Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFCInstance(UErrorCode *pErrorCode); unorm2_getNFCInstance(UErrorCode *pErrorCode);
/** /**
* Returns a UNormalizer2 instance for Unicode NFD normalization. * Returns a UNormalizer2 instance for Unicode NFD normalization.
* Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFDInstance(UErrorCode *pErrorCode); unorm2_getNFDInstance(UErrorCode *pErrorCode);
/** /**
* Returns a UNormalizer2 instance for Unicode NFKC normalization. * Returns a UNormalizer2 instance for Unicode NFKC normalization.
* Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFKCInstance(UErrorCode *pErrorCode); unorm2_getNFKCInstance(UErrorCode *pErrorCode);
/** /**
* Returns a UNormalizer2 instance for Unicode NFKD normalization. * Returns a UNormalizer2 instance for Unicode NFKD normalization.
* Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFKDInstance(UErrorCode *pErrorCode); unorm2_getNFKDInstance(UErrorCode *pErrorCode);
/** /**
* Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization. * Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization.
* Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @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 requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); 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.
skipping to change at line 358 skipping to change at line 356
* 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
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE 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. * Gets the raw decomposition mapping of c.
* *
* This is similar to the unorm2_getDecomposition() function but returns th e * This is similar to the unorm2_getDecomposition() function but returns th e
* raw decomposition mapping as specified in UnicodeData.txt or * raw decomposition mapping as specified in UnicodeData.txt or
* (for custom data) in the mapping files processed by the gennorm2 tool. * (for custom data) in the mapping files processed by the gennorm2 tool.
* By contrast, unorm2_getDecomposition() returns the processed, * By contrast, unorm2_getDecomposition() returns the processed,
* recursively-decomposed version of this mapping. * recursively-decomposed version of this mapping.
* *
* When used on a standard NFKC Normalizer2 instance, * When used on a standard NFKC Normalizer2 instance,
skipping to change at line 386 skipping to change at line 383
* @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
* raw decomposition mapping, if there is one. * raw 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 raw decomposition, if there is on e; otherwise a negative value * @return the non-negative length of c's raw decomposition, if there is on e; otherwise a negative value
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
unorm2_getRawDecomposition(const UNormalizer2 *norm2, unorm2_getRawDecomposition(const UNormalizer2 *norm2,
UChar32 c, UChar *decomposition, int32_t capacit y, UChar32 c, UChar *decomposition, int32_t capacit y,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Performs pairwise composition of a & b and returns the composite if ther e is one. * 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. * Returns a composite code point c only if c has a two-way mapping to a+b.
* In standard Unicode normalization, this means that * In standard Unicode normalization, this means that
* c has a canonical decomposition to a+b * c has a canonical decomposition to a+b
* and c does not have the Full_Composition_Exclusion property. * and c does not have the Full_Composition_Exclusion property.
* *
* 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 a A (normalization starter) code point. * @param a A (normalization starter) code point.
* @param b Another code point. * @param b Another code point.
* @return The non-negative composite code point if there is one; otherwise a negative value. * @return The non-negative composite code point if there is one; otherwise a negative value.
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT UChar32 U_EXPORT2 U_STABLE UChar32 U_EXPORT2
unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b); unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b);
/** /**
* Gets the combining class of c. * Gets the combining class of c.
* The default implementation returns 0 * The default implementation returns 0
* but all standard implementations return the Unicode Canonical_Combining_ Class value. * but all standard implementations return the Unicode Canonical_Combining_ Class value.
* @param norm2 UNormalizer2 instance * @param norm2 UNormalizer2 instance
* @param c code point * @param c code point
* @return c's combining class * @return c's combining class
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT uint8_t U_EXPORT2 U_STABLE uint8_t U_EXPORT2
unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c); 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
 End of changes. 21 change blocks. 
21 lines changed or deleted 17 lines changed or added


 unum.h   unum.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 1997-2012, International Business Machines Corporation and others. * Copyright (C) 1997-2013, 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 253 skipping to change at line 253
/** 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;
#ifndef U_HIDE_DRAFT_API
/**
* Constants for specifying short or long format.
* @draft ICU 51
*/
typedef enum UNumberCompactStyle {
/** @draft ICU 51 */
UNUM_SHORT,
/** @draft ICU 51 */
UNUM_LONG
/** @draft ICU 51 */
} UNumberCompactStyle;
#endif /* U_HIDE_DRAFT_API */
/** /**
* Constants for specifying currency spacing * Constants for specifying currency spacing
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
enum UCurrencySpacing { enum UCurrencySpacing {
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
UNUM_CURRENCY_MATCH, UNUM_CURRENCY_MATCH,
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
UNUM_CURRENCY_SURROUNDING_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH,
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
skipping to change at line 782 skipping to change at line 796
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UNUM_LENIENT_PARSE, UNUM_LENIENT_PARSE,
#if UCONFIG_HAVE_PARSEALLINPUT #if UCONFIG_HAVE_PARSEALLINPUT
/** Consume all input. (may use fastpath). Set to UNUM_YES (require fastp ath), UNUM_NO (skip fastpath), or UNUM_MAYBE (heuristic). /** Consume all input. (may use fastpath). Set to UNUM_YES (require fastp ath), UNUM_NO (skip fastpath), or UNUM_MAYBE (heuristic).
* This is an internal ICU API. Do not use. * This is an internal ICU API. Do not use.
* @internal * @internal
*/ */
UNUM_PARSE_ALL_INPUT, UNUM_PARSE_ALL_INPUT,
#endif #endif
#ifndef U_HIDE_DRAFT_API
/**
* Scale, which adjusts the position of the
* decimal point when formatting. Amounts will be multiplied by 10 ^ (s
cale)
* before they are formatted. The default value for the scale is 0 ( no
adjustment ).
*
* <p>Example: setting the scale to 3, 123 formats as "123,000"
* <p>Example: setting the scale to -4, 123 formats as "0.0123"
*
* @draft ICU 51 */
UNUM_SCALE = UNUM_LENIENT_PARSE + 2,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/** Count of "regular" numeric attributes. /** Count of "regular" numeric attributes.
* @internal */ * @internal */
UNUM_NUMERIC_ATTRIBUTE_COUNT, UNUM_NUMERIC_ATTRIBUTE_COUNT,
/** One below the first bitfield-boolean item. /** One below the first bitfield-boolean item.
* All items after this one are stored in boolean form. * All items after this one are stored in boolean form.
* @internal */ * @internal */
UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF, UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF,
#endif /* U_HIDE_INTERNAL_API */
#ifndef U_HIDE_DRAFT_API
/** If 1, specifies that if setting the "max integer digits" attribute wo uld truncate a value, set an error status rather than silently truncating. /** If 1, specifies that if setting the "max integer digits" attribute wo uld truncate a value, set an error status rather than silently truncating.
* For example, formatting the value 1234 with 4 max int digits would su cceed, but formatting 12345 would fail. There is no effect on parsing. * For example, formatting the value 1234 with 4 max int digits would su cceed, but formatting 12345 would fail. There is no effect on parsing.
* Default: 0 (not set) * Default: 0 (not set)
* @draft ICU 50 * @draft ICU 50
*/ */
UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS, UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS = 0x1000,
/** /**
* if this attribute is set to 1, specifies that, if the pattern doesn't contain an exponent, the exponent will not be parsed. If the pattern does c ontain an exponent, this attribute has no effect. * if this attribute is set to 1, specifies that, if the pattern doesn't contain an exponent, the exponent will not be parsed. If the pattern does c ontain an exponent, this attribute has no effect.
* Has no effect on formatting. * Has no effect on formatting.
* Default: 0 (unset) * Default: 0 (unset)
* @draft ICU 50 * @draft ICU 50
*/ */
UNUM_PARSE_NO_EXPONENT, UNUM_PARSE_NO_EXPONENT,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/** Limit of boolean attributes. /** Limit of boolean attributes.
* @internal */ * @internal */
UNUM_LIMIT_BOOLEAN_ATTRIBUTE UNUM_LIMIT_BOOLEAN_ATTRIBUTE
#endif /* U_HIDE_INTERNAL_API */
} UNumberFormatAttribute; } UNumberFormatAttribute;
/** /**
* Get a numeric attribute associated with a UNumberFormat. * Get a numeric attribute associated with a UNumberFormat.
* An example of a numeric attribute is the number of integer digits a forma tter will produce. * An example of a numeric attribute is the number of integer digits a forma tter will produce.
* @param fmt The formatter to query. * @param fmt The formatter to query.
* @param attr The attribute to query; one of UNUM_PARSE_INT_ONLY, UNUM_GROU PING_USED, * @param attr The attribute to query; one of UNUM_PARSE_INT_ONLY, UNUM_GROU PING_USED,
* UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGI TS, UNUM_INTEGER_DIGITS, * UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGI TS, UNUM_INTEGER_DIGITS,
* UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER, * UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER,
* UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_P * UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_P
OSITION, UNUM_SECONDARY_GROUPING_SIZE. OSITION, UNUM_SECONDARY_GROUPING_SIZE,
* UNUM_SCALE.
* @return The value of attr. * @return The value of attr.
* @see unum_setAttribute * @see unum_setAttribute
* @see unum_getDoubleAttribute * @see unum_getDoubleAttribute
* @see unum_setDoubleAttribute * @see unum_setDoubleAttribute
* @see unum_getTextAttribute * @see unum_getTextAttribute
* @see unum_setTextAttribute * @see unum_setTextAttribute
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
unum_getAttribute(const UNumberFormat* fmt, unum_getAttribute(const UNumberFormat* fmt,
skipping to change at line 841 skipping to change at line 873
/** /**
* Set a numeric attribute associated with a UNumberFormat. * Set a numeric attribute associated with a UNumberFormat.
* An example of a numeric attribute is the number of integer digits a forma tter will produce. If the * An example of a numeric attribute is the number of integer digits a forma tter will produce. If the
* formatter does not understand the attribute, the call is ignored. Rule-b ased formatters only understand * formatter does not understand the attribute, the call is ignored. Rule-b ased formatters only understand
* the lenient-parse attribute. * the lenient-parse attribute.
* @param fmt The formatter to set. * @param fmt The formatter to set.
* @param attr The attribute to set; one of UNUM_PARSE_INT_ONLY, UNUM_GROUPI NG_USED, * @param attr The attribute to set; one of UNUM_PARSE_INT_ONLY, UNUM_GROUPI NG_USED,
* UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGI TS, UNUM_INTEGER_DIGITS, * UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGI TS, UNUM_INTEGER_DIGITS,
* UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER, * UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER,
* UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_P OSITION, UNUM_SECONDARY_GROUPING_SIZE, * UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_P OSITION, UNUM_SECONDARY_GROUPING_SIZE,
* or UNUM_LENIENT_PARSE. * UNUM_LENIENT_PARSE, or UNUM_SCALE.
* @param newValue The new value of attr. * @param newValue The new value of attr.
* @see unum_getAttribute * @see unum_getAttribute
* @see unum_getDoubleAttribute * @see unum_getDoubleAttribute
* @see unum_setDoubleAttribute * @see unum_setDoubleAttribute
* @see unum_getTextAttribute * @see unum_getTextAttribute
* @see unum_setTextAttribute * @see unum_setTextAttribute
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
unum_setAttribute( UNumberFormat* fmt, unum_setAttribute( UNumberFormat* fmt,
 End of changes. 11 change blocks. 
6 lines changed or deleted 40 lines changed or added


 uobject.h   uobject.h 
skipping to change at line 62 skipping to change at line 62
* UClassID is used to identify classes without using the compiler's RTTI. * UClassID is used to identify classes without using the compiler's RTTI.
* This was used before C++ compilers consistently supported RTTI. * This was used before C++ compilers consistently supported RTTI.
* ICU 4.6 requires compiler RTTI to be turned on. * ICU 4.6 requires compiler RTTI to be turned on.
* *
* Each class hierarchy which needs * Each class hierarchy which needs
* to implement polymorphic clone() or operator==() defines two methods, * to implement polymorphic clone() or operator==() defines two methods,
* described in detail below. UClassID values can be compared using * described in detail below. UClassID values can be compared using
* operator==(). Nothing else should be done with them. * operator==(). Nothing else should be done with them.
* *
* \par * \par
* getDynamicClassID() is declared in the base class of the hierarchy as * In class hierarchies that implement "poor man's RTTI",
* a pure virtual. Each concrete subclass implements it in the same way: * each concrete subclass implements getDynamicClassID() in the same way:
* *
* \code * \code
* class Base {
* public:
* virtual UClassID getDynamicClassID() const = 0;
* }
*
* class Derived { * class Derived {
* public: * public:
* virtual UClassID getDynamicClassID() const * virtual UClassID getDynamicClassID() const
* { return Derived::getStaticClassID(); } * { return Derived::getStaticClassID(); }
* } * }
* \endcode * \endcode
* *
* Each concrete class implements getStaticClassID() as well, which allows * Each concrete class implements getStaticClassID() as well, which allows
* clients to test for a specific type. * clients to test for a specific type.
* *
skipping to change at line 213 skipping to change at line 208
UMemory &UMemory::operator=(const UMemory &); UMemory &UMemory::operator=(const UMemory &);
*/ */
}; };
/** /**
* UObject is the common ICU "boilerplate" class. * UObject is the common ICU "boilerplate" class.
* UObject inherits UMemory (starting with ICU 2.4), * UObject inherits UMemory (starting with ICU 2.4),
* and all other public ICU C++ classes * and all other public ICU C++ classes
* are derived from UObject (starting with ICU 2.2). * are derived from UObject (starting with ICU 2.2).
* *
* UObject contains common virtual functions like for ICU's "poor man's RTT * UObject contains common virtual functions, in particular a virtual destr
I". uctor.
* It does not contain default implementations of virtual methods
* like getDynamicClassID to allow derived classes such as Format
* to declare these as pure virtual.
* *
* The clone() function is not available in UObject because it is not * The clone() function is not available in UObject because it is not
* implemented by all ICU classes. * implemented by all ICU classes.
* Many ICU services provide a clone() function for their class trees, * Many ICU services provide a clone() function for their class trees,
* defined on the service's C++ base class, and all subclasses within that * defined on the service's C++ base class, and all subclasses within that
* service class tree return a pointer to the service base class * service class tree return a pointer to the service base class
* (which itself is a subclass of UObject). * (which itself is a subclass of UObject).
* This is because some compilers do not support covariant (same-as-this) * This is because some compilers do not support covariant (same-as-this)
* return types; cast to the appropriate subclass if necessary. * return types; cast to the appropriate subclass if necessary.
* *
skipping to change at line 240 skipping to change at line 232
public: public:
/** /**
* Destructor. * Destructor.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual ~UObject(); virtual ~UObject();
/** /**
* ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class . * ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class .
* The base class implementation returns a dummy value.
*
* Use compiler RTTI rather than ICU's "poor man's RTTI".
* Since ICU 4.6, new ICU C++ class hierarchies do not implement "poor
man's RTTI".
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual UClassID getDynamicClassID() const = 0; virtual UClassID getDynamicClassID() const;
protected: protected:
// the following functions are protected to prevent instantiation and // the following functions are protected to prevent instantiation and
// direct use of UObject itself // direct use of UObject itself
// default constructor // default constructor
// commented out because UObject is abstract (see getDynamicClassID)
// inline UObject() {} // inline UObject() {}
// copy constructor // copy constructor
// commented out because UObject is abstract (see getDynamicClassID)
// inline UObject(const UObject &other) {} // inline UObject(const UObject &other) {}
#if 0 #if 0
// TODO Sometime in the future. Implement operator==(). // TODO Sometime in the future. Implement operator==().
// (This comment inserted in 2.2) // (This comment inserted in 2.2)
// some or all of the following "boilerplate" functions may be made pub lic // some or all of the following "boilerplate" functions may be made pub lic
// in a future ICU4C release when all subclasses implement them // in a future ICU4C release when all subclasses implement them
// assignment operator // assignment operator
// (not virtual, see "Taligent's Guide to Designing Programs" pp.73..74 ) // (not virtual, see "Taligent's Guide to Designing Programs" pp.73..74 )
skipping to change at line 289 skipping to change at line 283
/* /*
* Assignment operator not declared. The compiler will provide one * Assignment operator not declared. The compiler will provide one
* which does nothing since this class does not contain any data member s. * which does nothing since this class does not contain any data member s.
* API/code coverage may show the assignment operator as present and * API/code coverage may show the assignment operator as present and
* untested - ignore. * untested - ignore.
* Subclasses need this assignment operator if they use compiler-provid ed * Subclasses need this assignment operator if they use compiler-provid ed
* assignment operators of their own. An alternative to not declaring o ne * assignment operators of their own. An alternative to not declaring o ne
* here would be to declare and empty-implement a protected or public o ne. * here would be to declare and empty-implement a protected or public o ne.
UObject &UObject::operator=(const UObject &); UObject &UObject::operator=(const UObject &);
*/ */
// Future implementation for RTTI that support subtyping. [alan]
//
// public:
// /**
// * @internal
// */
// static UClassID getStaticClassID();
//
// /**
// * @internal
// */
// UBool instanceOf(UClassID type) const;
}; };
#ifndef U_HIDE_INTERNAL_API #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
*/ */
skipping to change at line 334 skipping to change at line 315
* *
* @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_ABSTRACT_RTTI_IMPLEMENTATION(myClass) \ #define UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass) \
UClassID U_EXPORT2 myClass::getStaticClassID() { \ UClassID U_EXPORT2 myClass::getStaticClassID() { \
static char classID = 0; \ static char classID = 0; \
return (UClassID)&classID; \ return (UClassID)&classID; \
} }
/**
* This is a simple macro to express that a class and its subclasses do not
offer
* ICU's "poor man's RTTI".
* Beginning with ICU 4.6, ICU requires C++ compiler RTTI.
* This does not go into the header. This should only be used in *.cpp file
s.
* Use this with a private getDynamicClassID() in an immediate subclass of
UObject.
*
* @param myClass The name of the class that needs RTTI defined.
* @internal
*/
#define UOBJECT_DEFINE_NO_RTTI_IMPLEMENTATION(myClass) \
UClassID myClass::getDynamicClassID() const { return NULL; }
// /**
// * This macro adds ICU RTTI to an ICU concrete class implementation.
// * This macro should be invoked in *.cpp files. The corresponding
// * header should declare getDynamicClassID and getStaticClassID.
// *
// * @param myClass The name of the class that needs RTTI defined.
// * @param myParent The name of the myClass's parent.
// * @internal
// */
/*#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass, myParent) \
UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass, myParent) \
UClassID myClass::getDynamicClassID() const { \
return myClass::getStaticClassID(); \
}
*/
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
 End of changes. 9 change blocks. 
59 lines changed or deleted 10 lines changed or added


 upluralrules.h   upluralrules.h 
/* /*
*************************************************************************** ************** *************************************************************************** **************
* Copyright (C) 2010-2012, International Business Machines * Copyright (C) 2010-2013, 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
skipping to change at line 40 skipping to change at line 40
* *
* Keywords: ICU locale data has 6 predefined values - * Keywords: ICU locale data has 6 predefined values -
* '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
*/ */
#ifndef U_HIDE_DRAFT_API
/** /**
* Type of plurals and PluralRules. * Type of plurals and PluralRules.
* @draft ICU 50 * @draft ICU 50
*/ */
enum UPluralType { enum UPluralType {
/** /**
* Plural rules for cardinal numbers: 1 file vs. 2 files. * Plural rules for cardinal numbers: 1 file vs. 2 files.
* @draft ICU 50 * @draft ICU 50
*/ */
UPLURAL_TYPE_CARDINAL, UPLURAL_TYPE_CARDINAL,
skipping to change at line 65 skipping to change at line 66
/** /**
* Number of Plural rules types. * Number of Plural rules types.
* @draft ICU 50 * @draft ICU 50
*/ */
UPLURAL_TYPE_COUNT UPLURAL_TYPE_COUNT
}; };
/** /**
* @draft ICU 50 * @draft ICU 50
*/ */
typedef enum UPluralType UPluralType; typedef enum UPluralType UPluralType;
#endif /* U_HIDE_DRAFT_API */
/** /**
* Opaque UPluralRules object for use in C programs. * Opaque UPluralRules object for use in C programs.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
struct UPluralRules; struct UPluralRules;
typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPlura lRules. @stable ICU 4.8 */ typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPlura lRules. @stable ICU 4.8 */
/** /**
* Opens a new UPluralRules object using the predefined cardinal-number plu ral rules for a * Opens a new UPluralRules object using the predefined cardinal-number plu ral rules for a
* given locale. * given locale.
* Same as uplrules_openForType(locale, UPLURAL_TYPE_CARDINAL, status). * Same as uplrules_openForType(locale, UPLURAL_TYPE_CARDINAL, status).
* @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 NULL if an error occ urred. * @return A UPluralRules for the specified locale, or NULL if an error occ urred.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_STABLE UPluralRules* U_EXPORT2 U_STABLE UPluralRules* U_EXPORT2
uplrules_open(const char *locale, UErrorCode *status); uplrules_open(const char *locale, UErrorCode *status);
#ifndef U_HIDE_DRAFT_API
/** /**
* Opens a new UPluralRules object using the predefined plural rules for a * Opens a new UPluralRules object using the predefined plural rules for a
* given locale and the plural type. * given locale and the plural type.
* @param locale The locale for which the rules are desired. * @param locale The locale for which the rules are desired.
* @param type The plural type (e.g., cardinal or ordinal). * @param type The plural type (e.g., cardinal or ordinal).
* @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 NULL if an error occ urred. * @return A UPluralRules for the specified locale, or NULL if an error occ urred.
* @draft ICU 50 * @draft ICU 50
*/ */
U_DRAFT UPluralRules* U_EXPORT2 U_DRAFT UPluralRules* U_EXPORT2
uplrules_openForType(const char *locale, UPluralType type, UErrorCode *stat us); uplrules_openForType(const char *locale, UPluralType type, UErrorCode *stat us);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Closes a UPluralRules object. Once closed it may no longer be used. * Closes 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.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uplrules_close(UPluralRules *uplrules); uplrules_close(UPluralRules *uplrules);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
 End of changes. 5 change blocks. 
1 lines changed or deleted 5 lines changed or added


 uregex.h   uregex.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2004-2012, International Business Machines * Copyright (C) 2004-2013, 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 53 skipping to change at line 53
* Constants for Regular Expression Match Modes. * Constants for Regular Expression Match Modes.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
typedef enum URegexpFlag{ typedef enum URegexpFlag{
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_DRAFT_API
/** Forces normalization of pattern and strings. /** Forces normalization of pattern and strings.
Not implemented yet, just a placeholder, hence draft. Not implemented yet, just a placeholder, hence draft.
@draft ICU 2.4 */ @draft ICU 2.4 */
UREGEX_CANON_EQ = 128, UREGEX_CANON_EQ = 128,
#endif #endif /* U_HIDE_DRAFT_API */
/** Enable case insensitive matching. @stable ICU 2.4 */ /** Enable case insensitive matching. @stable ICU 2.4 */
UREGEX_CASE_INSENSITIVE = 2, UREGEX_CASE_INSENSITIVE = 2,
/** 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,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 urename.h   urename.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2002-2012, International Business Machines * Copyright (C) 2002-2013, 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 tools/genren.pl written by Vladimir Weinstein * Created by: Perl script tools/genren.pl written by Vladimir Weinstein
* *
skipping to change at line 105 skipping to change at line 105
#define _MBCSData U_ICU_ENTRY_POINT_RENAME(_MBCSData) #define _MBCSData U_ICU_ENTRY_POINT_RENAME(_MBCSData)
#define _SCSUData U_ICU_ENTRY_POINT_RENAME(_SCSUData) #define _SCSUData U_ICU_ENTRY_POINT_RENAME(_SCSUData)
#define _UTF16BEData U_ICU_ENTRY_POINT_RENAME(_UTF16BEData) #define _UTF16BEData U_ICU_ENTRY_POINT_RENAME(_UTF16BEData)
#define _UTF16Data U_ICU_ENTRY_POINT_RENAME(_UTF16Data) #define _UTF16Data U_ICU_ENTRY_POINT_RENAME(_UTF16Data)
#define _UTF16LEData U_ICU_ENTRY_POINT_RENAME(_UTF16LEData) #define _UTF16LEData U_ICU_ENTRY_POINT_RENAME(_UTF16LEData)
#define _UTF32BEData U_ICU_ENTRY_POINT_RENAME(_UTF32BEData) #define _UTF32BEData U_ICU_ENTRY_POINT_RENAME(_UTF32BEData)
#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_empty U_ICU_ENTRY_POINT_RENAME(bms_empty)
#define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData)
#define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open)
#define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search)
#define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString)
#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 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)
skipping to change at line 233 skipping to change at line 227
#define u_countChar32 U_ICU_ENTRY_POINT_RENAME(u_countChar32) #define u_countChar32 U_ICU_ENTRY_POINT_RENAME(u_countChar32)
#define u_digit U_ICU_ENTRY_POINT_RENAME(u_digit) #define u_digit U_ICU_ENTRY_POINT_RENAME(u_digit)
#define u_enumCharNames U_ICU_ENTRY_POINT_RENAME(u_enumCharNames) #define u_enumCharNames U_ICU_ENTRY_POINT_RENAME(u_enumCharNames)
#define u_enumCharTypes U_ICU_ENTRY_POINT_RENAME(u_enumCharTypes) #define u_enumCharTypes U_ICU_ENTRY_POINT_RENAME(u_enumCharTypes)
#define u_errorName U_ICU_ENTRY_POINT_RENAME(u_errorName) #define u_errorName U_ICU_ENTRY_POINT_RENAME(u_errorName)
#define u_fadopt U_ICU_ENTRY_POINT_RENAME(u_fadopt) #define u_fadopt U_ICU_ENTRY_POINT_RENAME(u_fadopt)
#define u_fclose U_ICU_ENTRY_POINT_RENAME(u_fclose) #define u_fclose U_ICU_ENTRY_POINT_RENAME(u_fclose)
#define u_feof U_ICU_ENTRY_POINT_RENAME(u_feof) #define u_feof U_ICU_ENTRY_POINT_RENAME(u_feof)
#define u_fflush U_ICU_ENTRY_POINT_RENAME(u_fflush) #define u_fflush U_ICU_ENTRY_POINT_RENAME(u_fflush)
#define u_fgetConverter U_ICU_ENTRY_POINT_RENAME(u_fgetConverter) #define u_fgetConverter U_ICU_ENTRY_POINT_RENAME(u_fgetConverter)
#define u_fgetNumberFormat U_ICU_ENTRY_POINT_RENAME(u_fgetNumberFormat)
#define u_fgetc U_ICU_ENTRY_POINT_RENAME(u_fgetc) #define u_fgetc U_ICU_ENTRY_POINT_RENAME(u_fgetc)
#define u_fgetcodepage U_ICU_ENTRY_POINT_RENAME(u_fgetcodepage) #define u_fgetcodepage U_ICU_ENTRY_POINT_RENAME(u_fgetcodepage)
#define u_fgetcx U_ICU_ENTRY_POINT_RENAME(u_fgetcx) #define u_fgetcx U_ICU_ENTRY_POINT_RENAME(u_fgetcx)
#define u_fgetfile U_ICU_ENTRY_POINT_RENAME(u_fgetfile) #define u_fgetfile U_ICU_ENTRY_POINT_RENAME(u_fgetfile)
#define u_fgetlocale U_ICU_ENTRY_POINT_RENAME(u_fgetlocale) #define u_fgetlocale U_ICU_ENTRY_POINT_RENAME(u_fgetlocale)
#define u_fgets U_ICU_ENTRY_POINT_RENAME(u_fgets) #define u_fgets U_ICU_ENTRY_POINT_RENAME(u_fgets)
#define u_file_read U_ICU_ENTRY_POINT_RENAME(u_file_read) #define u_file_read U_ICU_ENTRY_POINT_RENAME(u_file_read)
#define u_file_write U_ICU_ENTRY_POINT_RENAME(u_file_write) #define u_file_write U_ICU_ENTRY_POINT_RENAME(u_file_write)
#define u_file_write_flush U_ICU_ENTRY_POINT_RENAME(u_file_write_flush) #define u_file_write_flush U_ICU_ENTRY_POINT_RENAME(u_file_write_flush)
#define u_finit U_ICU_ENTRY_POINT_RENAME(u_finit) #define u_finit U_ICU_ENTRY_POINT_RENAME(u_finit)
skipping to change at line 520 skipping to change at line 515
#define ucal_getDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getDefaultTim eZone) #define ucal_getDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getDefaultTim eZone)
#define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDiffe rence) #define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDiffe rence)
#define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianC hange) #define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianC hange)
#define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKey wordValuesForLocale) #define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKey wordValuesForLocale)
#define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit) #define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit)
#define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType) #define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType)
#define ucal_getMillis U_ICU_ENTRY_POINT_RENAME(ucal_getMillis) #define ucal_getMillis U_ICU_ENTRY_POINT_RENAME(ucal_getMillis)
#define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow) #define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow)
#define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersio n) #define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersio n)
#define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZo neDisplayName) #define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZo neDisplayName)
#define ucal_getTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneID)
#define ucal_getTimeZoneTransitionDate U_ICU_ENTRY_POINT_RENAME(ucal_getTim eZoneTransitionDate) #define ucal_getTimeZoneTransitionDate U_ICU_ENTRY_POINT_RENAME(ucal_getTim eZoneTransitionDate)
#define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType) #define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType)
#define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendT ransition) #define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendT ransition)
#define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime) #define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime)
#define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet) #define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet)
#define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend) #define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend)
#define ucal_open U_ICU_ENTRY_POINT_RENAME(ucal_open) #define ucal_open U_ICU_ENTRY_POINT_RENAME(ucal_open)
#define ucal_openCountryTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openCountry TimeZones) #define ucal_openCountryTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openCountry TimeZones)
#define ucal_openTimeZoneIDEnumeration U_ICU_ENTRY_POINT_RENAME(ucal_openTi meZoneIDEnumeration) #define ucal_openTimeZoneIDEnumeration U_ICU_ENTRY_POINT_RENAME(ucal_openTi meZoneIDEnumeration)
#define ucal_openTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZones) #define ucal_openTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZones)
skipping to change at line 572 skipping to change at line 568
#define ucasemap_mapUTF8 U_ICU_ENTRY_POINT_RENAME(ucasemap_mapUTF8) #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_flushCache U_ICU_ENTRY_POINT_RENAME(ucd_flushCache)
#define ucd_freeCache U_ICU_ENTRY_POINT_RENAME(ucd_freeCache)
#define ucd_getCollator U_ICU_ENTRY_POINT_RENAME(ucd_getCollator)
#define ucd_open U_ICU_ENTRY_POINT_RENAME(ucd_open)
#define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyS tarts) #define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyS tarts)
#define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames) #define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames)
#define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne) #define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne)
#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_re gisterCleanup) #define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_re gisterCleanup)
#define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_regist erCleanup) #define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_regist erCleanup)
#define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCl eanup) #define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCl eanup)
#define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup) #define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup)
#define ucln_mutexedInit U_ICU_ENTRY_POINT_RENAME(ucln_mutexedInit) #define ucln_mutexedInit U_ICU_ENTRY_POINT_RENAME(ucln_mutexedInit)
#define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup) #define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup)
#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32) #define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32)
skipping to change at line 938 skipping to change at line 929
#define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou) #define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou)
#define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64) #define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64)
#define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) #define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop)
#define ugender_getInstance U_ICU_ENTRY_POINT_RENAME(ugender_getInstance) #define ugender_getInstance U_ICU_ENTRY_POINT_RENAME(ugender_getInstance)
#define ugender_getListGender U_ICU_ENTRY_POINT_RENAME(ugender_getListGende r) #define ugender_getListGender U_ICU_ENTRY_POINT_RENAME(ugender_getListGende r)
#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_compareScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_compareScript Set)
#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_deleteScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_deleteScriptSe t)
#define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) #define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals)
#define uhash_equalsScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_equalsScriptSe t)
#define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find) #define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find)
#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_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_hashScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_hashScriptSet)
#define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars) #define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars)
#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)
skipping to change at line 1488 skipping to change at line 1483
#define ures_getVersionNumberInternal U_ICU_ENTRY_POINT_RENAME(ures_getVers ionNumberInternal) #define ures_getVersionNumberInternal U_ICU_ENTRY_POINT_RENAME(ures_getVers ionNumberInternal)
#define ures_hasNext U_ICU_ENTRY_POINT_RENAME(ures_hasNext) #define ures_hasNext U_ICU_ENTRY_POINT_RENAME(ures_hasNext)
#define ures_initStackObject U_ICU_ENTRY_POINT_RENAME(ures_initStackObject) #define ures_initStackObject U_ICU_ENTRY_POINT_RENAME(ures_initStackObject)
#define ures_open U_ICU_ENTRY_POINT_RENAME(ures_open) #define ures_open U_ICU_ENTRY_POINT_RENAME(ures_open)
#define ures_openAvailableLocales U_ICU_ENTRY_POINT_RENAME(ures_openAvailab leLocales) #define ures_openAvailableLocales U_ICU_ENTRY_POINT_RENAME(ures_openAvailab leLocales)
#define ures_openDirect U_ICU_ENTRY_POINT_RENAME(ures_openDirect) #define ures_openDirect U_ICU_ENTRY_POINT_RENAME(ures_openDirect)
#define ures_openFillIn U_ICU_ENTRY_POINT_RENAME(ures_openFillIn) #define ures_openFillIn U_ICU_ENTRY_POINT_RENAME(ures_openFillIn)
#define ures_openU U_ICU_ENTRY_POINT_RENAME(ures_openU) #define ures_openU U_ICU_ENTRY_POINT_RENAME(ures_openU)
#define ures_resetIterator U_ICU_ENTRY_POINT_RENAME(ures_resetIterator) #define ures_resetIterator U_ICU_ENTRY_POINT_RENAME(ures_resetIterator)
#define ures_swap U_ICU_ENTRY_POINT_RENAME(ures_swap) #define ures_swap U_ICU_ENTRY_POINT_RENAME(ures_swap)
#define uscript_breaksBetweenLetters U_ICU_ENTRY_POINT_RENAME(uscript_break sBetweenLetters)
#define uscript_closeRun U_ICU_ENTRY_POINT_RENAME(uscript_closeRun) #define uscript_closeRun U_ICU_ENTRY_POINT_RENAME(uscript_closeRun)
#define uscript_getCode U_ICU_ENTRY_POINT_RENAME(uscript_getCode) #define uscript_getCode U_ICU_ENTRY_POINT_RENAME(uscript_getCode)
#define uscript_getName U_ICU_ENTRY_POINT_RENAME(uscript_getName) #define uscript_getName U_ICU_ENTRY_POINT_RENAME(uscript_getName)
#define uscript_getSampleString U_ICU_ENTRY_POINT_RENAME(uscript_getSampleS
tring)
#define uscript_getSampleUnicodeString U_ICU_ENTRY_POINT_RENAME(uscript_get
SampleUnicodeString)
#define uscript_getScript U_ICU_ENTRY_POINT_RENAME(uscript_getScript) #define uscript_getScript U_ICU_ENTRY_POINT_RENAME(uscript_getScript)
#define uscript_getScriptExtensions U_ICU_ENTRY_POINT_RENAME(uscript_getScr iptExtensions) #define uscript_getScriptExtensions U_ICU_ENTRY_POINT_RENAME(uscript_getScr iptExtensions)
#define uscript_getShortName U_ICU_ENTRY_POINT_RENAME(uscript_getShortName) #define uscript_getShortName U_ICU_ENTRY_POINT_RENAME(uscript_getShortName)
#define uscript_getUsage U_ICU_ENTRY_POINT_RENAME(uscript_getUsage)
#define uscript_hasScript U_ICU_ENTRY_POINT_RENAME(uscript_hasScript) #define uscript_hasScript U_ICU_ENTRY_POINT_RENAME(uscript_hasScript)
#define uscript_isCased U_ICU_ENTRY_POINT_RENAME(uscript_isCased)
#define uscript_isRightToLeft U_ICU_ENTRY_POINT_RENAME(uscript_isRightToLef
t)
#define uscript_nextRun U_ICU_ENTRY_POINT_RENAME(uscript_nextRun) #define uscript_nextRun U_ICU_ENTRY_POINT_RENAME(uscript_nextRun)
#define uscript_openRun U_ICU_ENTRY_POINT_RENAME(uscript_openRun) #define uscript_openRun U_ICU_ENTRY_POINT_RENAME(uscript_openRun)
#define uscript_resetRun U_ICU_ENTRY_POINT_RENAME(uscript_resetRun) #define uscript_resetRun U_ICU_ENTRY_POINT_RENAME(uscript_resetRun)
#define uscript_setRunText U_ICU_ENTRY_POINT_RENAME(uscript_setRunText) #define uscript_setRunText U_ICU_ENTRY_POINT_RENAME(uscript_setRunText)
#define usearch_close U_ICU_ENTRY_POINT_RENAME(usearch_close) #define usearch_close U_ICU_ENTRY_POINT_RENAME(usearch_close)
#define usearch_first U_ICU_ENTRY_POINT_RENAME(usearch_first) #define usearch_first U_ICU_ENTRY_POINT_RENAME(usearch_first)
#define usearch_following U_ICU_ENTRY_POINT_RENAME(usearch_following) #define usearch_following U_ICU_ENTRY_POINT_RENAME(usearch_following)
#define usearch_getAttribute U_ICU_ENTRY_POINT_RENAME(usearch_getAttribute) #define usearch_getAttribute U_ICU_ENTRY_POINT_RENAME(usearch_getAttribute)
#define usearch_getBreakIterator U_ICU_ENTRY_POINT_RENAME(usearch_getBreakI terator) #define usearch_getBreakIterator U_ICU_ENTRY_POINT_RENAME(usearch_getBreakI terator)
#define usearch_getCollator U_ICU_ENTRY_POINT_RENAME(usearch_getCollator) #define usearch_getCollator U_ICU_ENTRY_POINT_RENAME(usearch_getCollator)
skipping to change at line 1598 skipping to change at line 1599
#define uspoof_areConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_a reConfusableUnicodeString) #define uspoof_areConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_a reConfusableUnicodeString)
#define uspoof_check U_ICU_ENTRY_POINT_RENAME(uspoof_check) #define uspoof_check U_ICU_ENTRY_POINT_RENAME(uspoof_check)
#define uspoof_checkUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_checkUTF8) #define uspoof_checkUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_checkUTF8)
#define uspoof_checkUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_checkUnic odeString) #define uspoof_checkUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_checkUnic odeString)
#define uspoof_clone U_ICU_ENTRY_POINT_RENAME(uspoof_clone) #define uspoof_clone U_ICU_ENTRY_POINT_RENAME(uspoof_clone)
#define uspoof_close U_ICU_ENTRY_POINT_RENAME(uspoof_close) #define uspoof_close U_ICU_ENTRY_POINT_RENAME(uspoof_close)
#define uspoof_getAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedCh ars) #define uspoof_getAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedCh ars)
#define uspoof_getAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowed Locales) #define uspoof_getAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowed Locales)
#define uspoof_getAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getAllo wedUnicodeSet) #define uspoof_getAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getAllo wedUnicodeSet)
#define uspoof_getChecks U_ICU_ENTRY_POINT_RENAME(uspoof_getChecks) #define uspoof_getChecks U_ICU_ENTRY_POINT_RENAME(uspoof_getChecks)
#define uspoof_getInclusionSet U_ICU_ENTRY_POINT_RENAME(uspoof_getInclusion
Set)
#define uspoof_getInclusionUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getIn
clusionUnicodeSet)
#define uspoof_getRecommendedSet U_ICU_ENTRY_POINT_RENAME(uspoof_getRecomme
ndedSet)
#define uspoof_getRecommendedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_get
RecommendedUnicodeSet)
#define uspoof_getRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_getRestr
ictionLevel)
#define uspoof_getSkeleton U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeleton) #define uspoof_getSkeleton U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeleton)
#define uspoof_getSkeletonUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeletonU TF8) #define uspoof_getSkeletonUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeletonU TF8)
#define uspoof_getSkeletonUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_get SkeletonUnicodeString) #define uspoof_getSkeletonUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_get SkeletonUnicodeString)
#define uspoof_open U_ICU_ENTRY_POINT_RENAME(uspoof_open) #define uspoof_open U_ICU_ENTRY_POINT_RENAME(uspoof_open)
#define uspoof_openFromSerialized U_ICU_ENTRY_POINT_RENAME(uspoof_openFromS erialized) #define uspoof_openFromSerialized U_ICU_ENTRY_POINT_RENAME(uspoof_openFromS erialized)
#define uspoof_openFromSource U_ICU_ENTRY_POINT_RENAME(uspoof_openFromSourc e) #define uspoof_openFromSource U_ICU_ENTRY_POINT_RENAME(uspoof_openFromSourc e)
#define uspoof_serialize U_ICU_ENTRY_POINT_RENAME(uspoof_serialize) #define uspoof_serialize U_ICU_ENTRY_POINT_RENAME(uspoof_serialize)
#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_setRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_setRestr ictionLevel)
#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_hashCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashCharsN) #define ustr_hashCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashCharsN)
#define ustr_hashICharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashICharsN) #define ustr_hashICharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashICharsN)
#define ustr_hashUCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashUCharsN) #define ustr_hashUCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashUCharsN)
#define ustrcase_internalFold U_ICU_ENTRY_POINT_RENAME(ustrcase_internalFol d) #define ustrcase_internalFold U_ICU_ENTRY_POINT_RENAME(ustrcase_internalFol d)
 End of changes. 15 change blocks. 
12 lines changed or deleted 27 lines changed or added


 uscript.h   uscript.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2012, International Business Machines * Copyright (C) 1997-2013, 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 459 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
/** /**
* Do the Script_Extensions of code point c contain script sc? * Do the Script_Extensions of code point c contain script sc?
* If c does not have explicit Script_Extensions, then this tests whether * If c does not have explicit Script_Extensions, then this tests whether
* c has the Script property value 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 sc is in Script_Extensions(c) * @return TRUE if sc is in Script_Extensions(c)
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT UBool U_EXPORT2 U_STABLE 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 and returns the number of script codes. * to the output scripts array and returns the number of script codes.
* - If c does have Script_Extensions, then the Script property value * - If c does have Script_Extensions, then the Script property value
* (normally Common or Inherited) is not included. * (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 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. * - 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, * In other words, if the return value is 1,
skipping to change at line 507 skipping to change at line 506
* 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, or 1 for the si ngle Script value, * @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 49 * @stable ICU 49
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE 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);
#ifndef U_HIDE_DRAFT_API
/**
* Script usage constants.
* See UAX #31 Unicode Identifier and Pattern Syntax.
* http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Excl
usion_from_Identifiers
*
* @draft ICU 51
*/
typedef enum UScriptUsage {
/** Not encoded in Unicode. @draft ICU 51 */
USCRIPT_USAGE_NOT_ENCODED,
/** Unknown script usage. @draft ICU 51 */
USCRIPT_USAGE_UNKNOWN,
/** Candidate for Exclusion from Identifiers. @draft ICU 51 */
USCRIPT_USAGE_EXCLUDED,
/** Limited Use script. @draft ICU 51 */
USCRIPT_USAGE_LIMITED_USE,
/** Aspirational Use script. @draft ICU 51 */
USCRIPT_USAGE_ASPIRATIONAL,
/** Recommended script. @draft ICU 51 */
USCRIPT_USAGE_RECOMMENDED
} UScriptUsage;
/**
* Writes the script sample character string.
* This string normally consists of one code point but might be longer.
* The string is empty if the script is not encoded.
*
* @param script script code
* @param dest output string array
* @param capacity number of UChars in the dest array
* @param pErrorCode standard ICU in/out error code, must pass U_SUCCESS()
on input
* @return the string length, even if U_BUFFER_OVERFLOW_ERROR
* @draft ICU 51
*/
U_DRAFT int32_t U_EXPORT2
uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity,
UErrorCode *pErrorCode);
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
class UnicodeString;
U_NAMESPACE_END
/**
* Returns the script sample character string.
* This string normally consists of one code point but might be longer.
* The string is empty if the script is not encoded.
*
* @param script script code
* @return the sample character string
* @draft ICU 51
*/
U_COMMON_API icu::UnicodeString U_EXPORT2
uscript_getSampleUnicodeString(UScriptCode script);
#endif
/**
* Returns the script usage according to UAX #31 Unicode Identifier and Pat
tern Syntax.
* Returns USCRIPT_USAGE_NOT_ENCODED if the script is not encoded in Unicod
e.
*
* @param script script code
* @return script usage
* @see UScriptUsage
* @draft ICU 51
*/
U_DRAFT UScriptUsage U_EXPORT2
uscript_getUsage(UScriptCode script);
/**
* Returns TRUE if the script is written right-to-left.
* For example, Arab and Hebr.
*
* @param script script code
* @return TRUE if the script is right-to-left
* @draft ICU 51
*/
U_DRAFT UBool U_EXPORT2
uscript_isRightToLeft(UScriptCode script);
/**
* Returns TRUE if the script allows line breaks between letters (excluding
hyphenation).
* Such a script typically requires dictionary-based line breaking.
* For example, Hani and Thai.
*
* @param script script code
* @return TRUE if the script allows line breaks between letters
* @draft ICU 51
*/
U_DRAFT UBool U_EXPORT2
uscript_breaksBetweenLetters(UScriptCode script);
/**
* Returns TRUE if in modern (or most recent) usage of the script case dist
inctions are customary.
* For example, Latn and Cyrl.
*
* @param script script code
* @return TRUE if the script is cased
* @draft ICU 51
*/
U_DRAFT UBool U_EXPORT2
uscript_isCased(UScriptCode script);
#endif /* U_HIDE_DRAFT_API */ #endif /* U_HIDE_DRAFT_API */
#endif #endif
 End of changes. 7 change blocks. 
6 lines changed or deleted 118 lines changed or added


 uspoof.h   uspoof.h 
/* /*
*************************************************************************** ***************************************************************************
* Copyright (C) 2008-2012, International Business Machines Corporation * Copyright (C) 2008-2013, 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 189 skipping to change at line 189
USPOOF_WHOLE_SCRIPT_CONFUSABLE = 4, USPOOF_WHOLE_SCRIPT_CONFUSABLE = 4,
/** Any Case Modifier for confusable identifier tests. /** Any Case Modifier for confusable identifier tests.
If specified, consider all characters, of any case, when looking fo r confusables. If specified, consider all characters, of any case, when looking fo r confusables.
If USPOOF_ANY_CASE is not specified, identifiers being checked are assumed to have been If USPOOF_ANY_CASE is not specified, identifiers being checked are assumed to have been
case folded. Upper case confusable characters will not be checked. case folded. Upper case confusable characters will not be checked.
Selects between Lower Case Confusable and Selects between Lower Case Confusable and
Any Case Confusable. */ Any Case Confusable. */
USPOOF_ANY_CASE = 8, USPOOF_ANY_CASE = 8,
/**
* Check that an identifier is no looser than the specified Restrictio
nLevel.
* The default if uspoof_setRestrctionLevel() is not called is HIGHLY_
RESTRICTIVE.
*
* If USPOOF_AUX_INFO is enabled the actual restriction level of the
* identifier being tested will also be returned by uspoof_check().
*
* @see URestrictionLevel
* @see uspoof_setRestrictionLevel
* @see USPOOF_AUX_INFO
*
* @stable ICU 51
*/
USPOOF_RESTRICTION_LEVEL = 16,
#ifndef U_HIDE_DEPRECATED_API
/** Check that an identifier contains only characters from a /** Check that an identifier contains only characters from a
* single script (plus chars from the common and inherited scripts.) * single script (plus chars from the common and inherited scripts.)
* Applies to checks of a single identifier check only. * Applies to checks of a single identifier check only.
* @deprecated ICU 51 Use RESTRICTION_LEVEL instead.
*/ */
USPOOF_SINGLE_SCRIPT = 16, USPOOF_SINGLE_SCRIPT = USPOOF_RESTRICTION_LEVEL,
#endif /* U_HIDE_DEPRECATED_API */
/** Check an identifier for the presence of invisible characters, /** Check an identifier for the presence of invisible characters,
* such as zero-width spaces, or character sequences that are * such as zero-width spaces, or character sequences that are
* likely not to display, such as multiple occurrences of the same * likely not to display, such as multiple occurrences of the same
* non-spacing mark. This check does not test the input string as a w hole * non-spacing mark. This check does not test the input string as a w hole
* for conformance to any particular syntax for identifiers. * for conformance to any particular syntax for identifiers.
*/ */
USPOOF_INVISIBLE = 32, USPOOF_INVISIBLE = 32,
/** Check that an identifier contains only characters from a specified set /** Check that an identifier contains only characters from a specified set
* of acceptable characters. See uspoof_setAllowedChars() and * of acceptable characters. See uspoof_setAllowedChars() and
* uspoof_setAllowedLocales(). * uspoof_setAllowedLocales().
*/ */
USPOOF_CHAR_LIMIT = 64, USPOOF_CHAR_LIMIT = 64,
USPOOF_ALL_CHECKS = 0x7f #ifndef U_HIDE_DRAFT_API
/**
* Check that an identifier does not include decimal digits from
* more than one numbering system.
*
* @draft ICU 51
*/
USPOOF_MIXED_NUMBERS = 128,
#endif /* U_HIDE_DRAFT_API */
/**
* Enable all spoof checks.
*
* @stable ICU 4.6
*/
USPOOF_ALL_CHECKS = 0xFFFF,
#ifndef U_HIDE_DRAFT_API
/**
* Enable the return of auxillary (non-error) information in the
* upper bits of the check results value.
*
* If this "check" is not enabled, the results of uspoof_check() will
be zero when an
* identifier passes all of the enabled checks.
*
* If this "check" is enabled, (uspoof_check() & USPOOF_ALL_CHECKS) wi
ll be zero
* when an identifier passes all checks.
*
* @draft ICU 51
*/
USPOOF_AUX_INFO = 0x40000000
#endif /* U_HIDE_DRAFT_API */
} USpoofChecks; } USpoofChecks;
#ifndef U_HIDE_DRAFT_API
/**
* Constants from UAX #39 for use in setRestrictionLevel(), and
* for returned identifier restriction levels in check results.
* @draft ICU 51
*/
typedef enum URestrictionLevel {
/**
* Only ASCII characters: U+0000..U+007F
*
* @draft ICU 51
*/
USPOOF_ASCII = 0x10000000,
/**
* All characters in each identifier must be from a single script,
or from the combinations: Latin + Han +
* Hiragana + Katakana; Latin + Han + Bopomofo; or Latin + Han + Ha
ngul. Note that this level will satisfy the
* vast majority of Latin-script users; also that TR36 has ASCII in
stead of Latin.
*
* @draft ICU 51
*/
USPOOF_HIGHLY_RESTRICTIVE = 0x20000000,
/**
* Allow Latin with other scripts except Cyrillic, Greek, Cherokee
Otherwise, the same as Highly Restrictive
*
* @draft ICU 51
*/
USPOOF_MODERATELY_RESTRICTIVE = 0x30000000,
/**
* Allow arbitrary mixtures of scripts. Otherwise, the same as Mode
rately Restrictive.
*
* @draft ICU 51
*/
USPOOF_MINIMALLY_RESTRICTIVE = 0x40000000,
/**
* Any valid identifiers, including characters outside of the Ident
ifier Profile.
*
* @draft ICU 51
*/
USPOOF_UNRESTRICTIVE = 0x50000000
} URestrictionLevel;
#endif /* U_HIDE_DRAFT_API */
/** /**
* Create a Unicode Spoof Checker, configured to perform all * Create a Unicode Spoof Checker, configured to perform all
* checks except for USPOOF_LOCALE_LIMIT and USPOOF_CHAR_LIMIT. * checks except for USPOOF_LOCALE_LIMIT and USPOOF_CHAR_LIMIT.
* Note that additional checks may be added in the future, * Note that additional checks may be added in the future,
* resulting in the changes to the default checking behavior. * resulting in the changes to the default checking behavior.
* *
* @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 the newly created Spoof Checker * @return the newly created Spoof Checker
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
skipping to change at line 254 skipping to change at line 346
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE USpoofChecker * U_EXPORT2 U_STABLE USpoofChecker * U_EXPORT2
uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActua lLength, uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActua lLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Open a Spoof Checker from the source form of the spoof data. * Open a Spoof Checker from the source form of the spoof data.
* The Three inputs correspond to the Unicode data files confusables.txt * The Three inputs correspond to the Unicode data files confusables.txt
* confusablesWholeScript.txt and xidmdifications.txt as described in * confusablesWholeScript.txt and xidmdifications.txt as described in
* Unicode UAX 39. The syntax of the source data is as described in UAX 3 9 for * Unicode UAX #39. The syntax of the source data is as described in UAX #39 for
* these files, and the content of these files is acceptable input. * these files, and the content of these files is acceptable input.
* *
* The character encoding of the (char *) input text is UTF-8. * The character encoding of the (char *) input text is UTF-8.
* *
* @param confusables a pointer to the confusable characters definitions, * @param confusables a pointer to the confusable characters definitions,
* as found in file confusables.txt from unicode.org. * as found in file confusables.txt from unicode.org.
* @param confusablesLen The length of the confusables text, or -1 if the * @param confusablesLen The length of the confusables text, or -1 if the
* input string is zero terminated. * input string is zero terminated.
* @param confusablesWholeScript * @param confusablesWholeScript
* a pointer to the whole script confusables definition s, * a pointer to the whole script confusables definition s,
skipping to change at line 354 skipping to change at line 446
* @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 The set of checks that this spoof checker will perform. * @return The set of checks that this spoof checker will perform.
* The value is a bit set, obtained by OR-ing together * The value is a bit set, obtained by OR-ing together
* values from enum USpoofChecks. * values from enum USpoofChecks.
* @stable ICU 4.2 * @stable ICU 4.2
* *
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status); uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status);
#ifndef U_HIDE_DRAFT_API
/**
* Set the loosest restriction level allowed. The default if this function
* is not called is HIGHLY_RESTRICTIVE.
* Calling this function also enables the RESTRICTION_LEVEL check.
* @param restrictionLevel The loosest restriction level allowed.
* @see URestrictionLevel
* @draft ICU 51
*/
U_DRAFT void U_EXPORT2
uspoof_setRestrictionLevel(USpoofChecker *sc, URestrictionLevel restriction
Level);
/**
* Get the Restriction Level that will be tested if the checks include RES
TRICTION_LEVEL.
*
* @return The restriction level
* @see URestrictionLevel
* @draft ICU 51
*/
U_DRAFT URestrictionLevel U_EXPORT2
uspoof_getRestrictionLevel(const USpoofChecker *sc);
#endif /* U_HIDE_DRAFT_API */
/** /**
* Limit characters that are acceptable in identifiers being checked to tho se * Limit characters that are acceptable in identifiers being checked to tho se
* normally used with the languages associated with the specified locales. * normally used with the languages associated with the specified locales.
* Any previously specified list of locales is replaced by the new settings . * Any previously specified list of locales is replaced by the new settings .
* *
* A set of languages is determined from the locale(s), and * A set of languages is determined from the locale(s), and
* from those a set of acceptable Unicode scripts is determined. * from those a set of acceptable Unicode scripts is determined.
* Characters from this set of scripts, along with characters from * Characters from this set of scripts, along with characters from
* the "common" and "inherited" Unicode Script categories * the "common" and "inherited" Unicode Script categories
* will be permitted. * will be permitted.
skipping to change at line 482 skipping to change at line 597
* characters that were set with the uspoof_setAllowedLocales() function. * characters that were set with the uspoof_setAllowedLocales() function.
* *
* The USPOOF_CHAR_LIMIT test is automatically enabled for this * The USPOOF_CHAR_LIMIT test is automatically enabled for this
* USoofChecker by this function. * USoofChecker by this function.
* *
* @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 UnicodeSet 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 icu::UnicodeSet *chars , UErrorCode *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
skipping to change at line 519 skipping to change at line 634
U_STABLE const icu::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 id The identifier to be checked for possible security issues ,
* in UTF-16 format. * in UTF-16 format.
* @param length the length of the string to be checked, expressed in * @param length the length of the string to be checked, expressed in
* 16 bit UTF-16 code units, or -1 if the string is * 16 bit UTF-16 code units, or -1 if the string is
* zero terminated. * zero terminated.
* @param position An out parameter that receives the index of the * @param position An out parameter.
* first string position that fails the allowed character * Originally, the index of the first string position that f
* limitation checks. ailed a check.
* This parameter may be null if the position information * Now, always returns zero.
* is not needed. * This parameter may be null.
* If the string passes the requested checks the
* parameter value will not be set.
* @param status The error code, set if an error occurred while attempting to * @param status The error code, set if an error occurred while attempting to
* perform the check. * perform the check.
* Spoofing or security issues detected with the input strin g are * Spoofing or security issues detected with the input strin g are
* 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. (returned_value & USPOOF_ALL_CHECKS)
* are found with the input string. * will be zero if the input string passes all of the
* enabled checks.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uspoof_check(const USpoofChecker *sc, uspoof_check(const USpoofChecker *sc,
const UChar *text, int32_t length, const UChar *id, int32_t length,
int32_t *position, int32_t *position,
UErrorCode *status); UErrorCode *status);
/** /**
* 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 A UTF-8 string to be checked for possible security issues . * @param id A identifier to be checked for possible security issues, in UTF8 format.
* @param length the length of the string to be checked, or -1 if the stri ng is * @param length the length of the string to be checked, or -1 if the stri ng is
* zero terminated. * zero terminated.
* @param position An out parameter that receives the index of the * @param position An out parameter.
* first string position that fails the allowed character * Originally, the index of the first string position that f
* limitation checks. ailed a check.
* This parameter may be null if the position information * Now, always returns zero.
* is not needed. * This parameter may be null.
* If the string passes the requested checks the * @deprecated ICU 51
* parameter value will not be set.
* @param status The error code, set if an error occurred while attempting to * @param status The error code, set if an error occurred while attempting to
* perform the check. * perform the check.
* Spoofing or security issues detected with the input strin g are * Spoofing or security issues detected with the input strin g are
* not reported here, but through the function's return valu e. * not reported here, but through the function's return valu e.
* If the input contains invalid UTF-8 sequences, * If the input contains invalid UTF-8 sequences,
* a status of U_INVALID_CHAR_FOUND will be returned. * a status of U_INVALID_CHAR_FOUND will be returned.
* @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. (returned_value & USPOOF_ALL_CHECKS)
* are found with the input string. * will be zero if the input string passes all of the
* enabled checks.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uspoof_checkUTF8(const USpoofChecker *sc, uspoof_checkUTF8(const USpoofChecker *sc,
const char *text, int32_t length, const char *id, int32_t length,
int32_t *position, int32_t *position,
UErrorCode *status); UErrorCode *status);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
/** /**
* 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 A UnicodeString to be checked for possible security issue * @param id A identifier to be checked for possible security issues.
s. * @param position An out parameter.
* @param position An out parameter that receives the index of the * Originally, the index of the first string position that f
* first string position that fails the allowed character ailed a check.
* limitation checks. * Now, always returns zero.
* This parameter may be null if the position information * This parameter may be null.
* is not needed. * @deprecated ICU 51
* If the string passes the requested checks the
* parameter value will not be set.
* @param status The error code, set if an error occurred while attempting to * @param status The error code, set if an error occurred while attempting to
* perform the check. * perform the check.
* Spoofing or security issues detected with the input strin g are * Spoofing or security issues detected with the input strin g are
* 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. (returned_value & USPOOF_ALL_CHECKS)
* are found with the input string. * will be zero if the input string passes all of the
* enabled checks.
* @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 icu::UnicodeString &text, const icu::UnicodeString &id,
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 634 skipping to change at line 744
* USPOOF_WHOLE_SCRIPT_CONFUSABLE * USPOOF_WHOLE_SCRIPT_CONFUSABLE
* At least one of these tests must be selected. * At least one of these tests must be selected.
* *
* USPOOF_ANY_CASE is a modifier for the tests. Select it if the identifie rs * USPOOF_ANY_CASE is a modifier for the tests. Select it if the identifie rs
* may be of mixed case. * may be of mixed case.
* If identifiers are case folded for comparison and * If identifiers are case folded for comparison and
* display to the user, do not select the USPOOF_ANY_CASE option. * display to the user, do not select the USPOOF_ANY_CASE option.
* *
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param s1 The first of the two strings to be compared for * @param id1 The first of the two identifiers to be compared for
* confusability. The strings are in UTF-16 format. * confusability. The strings are in UTF-16 format.
* @param length1 the length of the first string, expressed in * @param length1 the length of the first identifer, expressed in
* 16 bit UTF-16 code units, or -1 if the string is * 16 bit UTF-16 code units, or -1 if the string is
* zero terminated. * nul terminated.
* @param s2 The second of the two strings to be compared for * @param id2 The second of the two identifiers to be compared for
* confusability. The strings are in UTF-16 format. * confusability. The identifiers are in UTF-16 format.
* @param length2 The length of the second string, expressed in * @param length2 The length of the second identifiers, expressed in
* 16 bit UTF-16 code units, or -1 if the string is * 16 bit UTF-16 code units, or -1 if the string is
* zero terminated. * nul terminated.
* @param status The error code, set if an error occurred while attempting to * @param status The error code, set if an error occurred while attempting to
* perform the check. * perform the check.
* Confusability of the strings is not reported here, * Confusability of the identifiers 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 identifiers
* 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_areConfusable(const USpoofChecker *sc, uspoof_areConfusable(const USpoofChecker *sc,
const UChar *s1, int32_t length1, const UChar *id1, int32_t length1,
const UChar *s2, int32_t length2, const UChar *id2, int32_t length2,
UErrorCode *status); UErrorCode *status);
/** /**
* 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.
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param s1 The first of the two strings to be compared for * @param id1 The first of the two identifiers to be compared for
* confusability. The strings are in UTF-8 format.
* @param length1 the length of the first identifiers, in bytes, or -1
* if the string is nul terminated.
* @param id2 The second of the two identifiers to be compared for
* confusability. The strings are in UTF-8 format. * confusability. The strings are in UTF-8 format.
* @param length1 the length of the first string, in bytes, or -1
* if the string is zero terminated.
* @param s2 The second of the two strings to be compared for
* confusability. The strings are in UTF-18 format.
* @param length2 The length of the second string in bytes, or -1 * @param length2 The length of the second string in bytes, or -1
* if the string is zero terminated. * if the string is nul terminated.
* @param status The error code, set if an error occurred while attempting to * @param status The error code, set if an error occurred while attempting to
* perform the check. * perform the check.
* 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_areConfusableUTF8(const USpoofChecker *sc, uspoof_areConfusableUTF8(const USpoofChecker *sc,
const char *s1, int32_t length1, const char *id1, int32_t length1,
const char *s2, int32_t length2, const char *id2, int32_t length2,
UErrorCode *status); UErrorCode *status);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
/** /**
* 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.
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param s1 The first of the two strings to be compared for * @param id1 The first of the two identifiers to be compared for
* confusability. The strings are in UTF-8 format.
* @param id2 The second of the two identifiers to be compared for
* confusability. The strings are in UTF-8 format. * confusability. The strings are in UTF-8 format.
* @param s2 The second of the two strings to be compared for
* confusability. The strings are in UTF-18 format.
* @param status The error code, set if an error occurred while attempting to * @param status The error code, set if an error occurred while attempting to
* perform the check. * perform the check.
* Confusability of the strings is not reported here, * Confusability of the identifiers 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 identifiers
* 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 icu::UnicodeString &s1, const icu::UnicodeString &s1,
const icu::UnicodeString &s2, const icu::UnicodeString &s2,
UErrorCode *status); UErrorCode *status);
#endif #endif
/** /**
* Get the "skeleton" for an identifier string. * Get the "skeleton" for an identifier.
* Skeletons are a transformation of the input string; * Skeletons are a transformation of the input identifier;
* Two strings are confusable if their skeletons are identical. * Two identifiers 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
* whether an identifier is confusable with any of some large * whether an identifier is confusable with any of some large
* set of existing identifiers, by creating an efficiently * set of existing identifiers, by creating an efficiently
* searchable collection of the skeletons. * searchable collection of the skeletons.
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param type The type of skeleton, corresponding to which * @param type The type of skeleton, corresponding to which
* of the Unicode confusable data tables to use. * of the Unicode confusable data tables to use.
* The default is Mixed-Script, Lowercase. * The default is Mixed-Script, Lowercase.
* Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and * Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and
* USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed. * USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed.
* @param s The input string whose skeleton will be computed. * @param id The input identifier whose skeleton will be computed.
* @param length The length of the input string, expressed in 16 bit * @param length The length of the input identifier, expressed in 16 bit
* UTF-16 code units, or -1 if the string is zero terminate d. * UTF-16 code units, or -1 if the string is zero terminate d.
* @param dest The output buffer, to receive the skeleton string. * @param dest The output buffer, to receive the skeleton string.
* @param destCapacity The length of the output buffer, in 16 bit units. * @param destCapacity The length of the output buffer, in 16 bit units.
* 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 The length of the skeleton string. The returned length * @return The length of the skeleton string. The returned length
* is always that of the complete skeleton, even when the * is always that of the complete skeleton, even when the
* supplied buffer is too small (or of zero length) * supplied buffer is too small (or of zero length)
* *
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uspoof_getSkeleton(const USpoofChecker *sc, uspoof_getSkeleton(const USpoofChecker *sc,
uint32_t type, uint32_t type,
const UChar *s, int32_t length, const UChar *id, int32_t length,
UChar *dest, int32_t destCapacity, UChar *dest, int32_t destCapacity,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the "skeleton" for an identifier string. * Get the "skeleton" for an identifier.
* Skeletons are a transformation of the input string; * Skeletons are a transformation of the input identifier;
* Two strings are confusable if their skeletons are identical. * Two identifiers 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
* whether an identifier is confusable with any of some large * whether an identifier is confusable with any of some large
* set of existing identifiers, by creating an efficiently * set of existing identifiers, by creating an efficiently
* searchable collection of the skeletons. * searchable collection of the skeletons.
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param type The type of skeleton, corresponding to which * @param type The type of skeleton, corresponding to which
* of the Unicode confusable data tables to use. * of the Unicode confusable data tables to use.
* The default is Mixed-Script, Lowercase. * The default is Mixed-Script, Lowercase.
* Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and * Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and
* USPOOF_ANY_CASE. The two flags may be ORed. * USPOOF_ANY_CASE. The two flags may be ORed.
* @param s The UTF-8 format input string whose skeleton will be com puted. * @param id The UTF-8 format identifier whose skeleton will be compu ted.
* @param length The length of the input string, in bytes, * @param length The length of the input string, in bytes,
* or -1 if the string is zero terminated. * or -1 if the string is zero terminated.
* @param dest The output buffer, to receive the skeleton string. * @param dest The output buffer, 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. Possible Errors include U_INVALID_CH AR_FOUND * perform the check. Possible Errors include U_INVALID_CH AR_FOUND
* for invalid UTF-8 sequences, and * for invalid UTF-8 sequences, and
* U_BUFFER_OVERFLOW_ERROR if the destination buffer is too small * U_BUFFER_OVERFLOW_ERROR if the destination buffer is too small
* to hold the complete skeleton. * to hold the complete skeleton.
* @return The length of the skeleton string, in bytes. The return ed length * @return The length of the skeleton string, in bytes. The return ed length
* is always that of the complete skeleton, even when the * is always that of the complete skeleton, even when the
* supplied buffer is too small (or of zero length) * supplied buffer is too small (or of zero length)
* *
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uspoof_getSkeletonUTF8(const USpoofChecker *sc, uspoof_getSkeletonUTF8(const USpoofChecker *sc,
uint32_t type, uint32_t type,
const char *s, int32_t length, const char *id, int32_t length,
char *dest, int32_t destCapacity, char *dest, int32_t destCapacity,
UErrorCode *status); UErrorCode *status);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
/** /**
* Get the "skeleton" for an identifier string. * Get the "skeleton" for an identifier.
* Skeletons are a transformation of the input string; * Skeletons are a transformation of the input identifier;
* Two strings are confusable if their skeletons are identical. * Two identifiers 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
* whether an identifier is confusable with any of some large * whether an identifier is confusable with any of some large
* set of existing identifiers, by creating an efficiently * set of existing identifiers, by creating an efficiently
* searchable collection of the skeletons. * searchable collection of the skeletons.
* *
* @param sc The USpoofChecker. * @param sc The USpoofChecker.
* @param type The type of skeleton, corresponding to which * @param type The type of skeleton, corresponding to which
* of the Unicode confusable data tables to use. * of the Unicode confusable data tables to use.
* The default is Mixed-Script, Lowercase. * The default is Mixed-Script, Lowercase.
* Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and * Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and
* USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed. * USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed.
* @param s The input string whose skeleton will be computed. * @param id The input identifier whose skeleton will be computed.
* @param dest The output string, to receive the skeleton string. * @param dest The output identifier, to receive the skeleton string.
* @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_I18N_API icu::UnicodeString & U_EXPORT2 U_I18N_API icu::UnicodeString & U_EXPORT2
uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
uint32_t type, uint32_t type,
const icu::UnicodeString &s, const icu::UnicodeString &id,
icu::UnicodeString &dest, icu::UnicodeString &dest,
UErrorCode *status); UErrorCode *status);
#endif /* U_SHOW_CPLUSPLUS_API */ #endif /* U_SHOW_CPLUSPLUS_API */
#ifndef U_HIDE_DRAFT_API
/**
* Get the set of Candidate Characters for Inclusion in Identifiers, as de
fined
* in Unicode UAX #31, http://www.unicode.org/reports/tr31/#Table_Candidat
e_Characters_for_Inclusion_in_Identifiers
*
* The returned set is frozen. Ownership of the set remains with the ICU l
ibrary; it must not
* be deleted by the caller.
*
* @param status The error code, set if a problem occurs while creating th
e set.
*
* @draft ICU 51
*/
U_DRAFT const USet * U_EXPORT2
uspoof_getInclusionSet(UErrorCode *status);
/**
* Get the set of characters from Recommended Scripts for Inclusion in Ide
ntifiers, as defined
* in Unicode UAX #31, http://www.unicode.org/reports/tr31/#Table_Recommen
ded_Scripts
*
* The returned set is frozen. Ownership of the set remains with the ICU l
ibrary; it must not
* be deleted by the caller.
*
* @param status The error code, set if a problem occurs while creating th
e set.
*
* @draft ICU 51
*/
U_DRAFT const USet * U_EXPORT2
uspoof_getRecommendedSet(UErrorCode *status);
#if U_SHOW_CPLUSPLUS_API
/**
* Get the set of Candidate Characters for Inclusion in Identifiers, as de
fined
* in Unicode UAX #31, http://www.unicode.org/reports/tr31/#Table_Candidat
e_Characters_for_Inclusion_in_Identifiers
*
* The returned set is frozen. Ownership of the set remains with the ICU l
ibrary; it must not
* be deleted by the caller.
*
* @param status The error code, set if a problem occurs while creating th
e set.
*
* @draft ICU 51
*/
U_DRAFT const icu::UnicodeSet * U_EXPORT2
uspoof_getInclusionUnicodeSet(UErrorCode *status);
/**
* Get the set of characters from Recommended Scripts for Inclusion in Ide
ntifiers, as defined
* in Unicode UAX #31, http://www.unicode.org/reports/tr31/#Table_Recommen
ded_Scripts
*
* The returned set is frozen. Ownership of the set remains with the ICU l
ibrary; it must not
* be deleted by the caller.
*
* @param status The error code, set if a problem occurs while creating th
e set.
*
* @draft ICU 51
*/
U_DRAFT const icu::UnicodeSet * U_EXPORT2
uspoof_getRecommendedUnicodeSet(UErrorCode *status);
#endif /* U_SHOW_CPLUSPLUS_API */
#endif /* U_HIDE_DRAFT_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.
* *
* The serialized spoof checker includes only the data compiled from the
* Unicode data tables by uspoof_openFromSource(); it does not include
* include any other state or configuration that may have been set.
*
* @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,
* can be NULL if capacity==0 * can be NULL if capacity==0
* @param capacity the number of bytes available at data, * @param capacity the number of bytes available at data,
* or 0 for preflighting * or 0 for preflighting
* @param status an in/out ICU UErrorCode; possible errors include: * @param status an in/out ICU UErrorCode; possible errors include:
* - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for ser ialization * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for ser ialization
* - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad
* @return the number of bytes written or needed for the spoof data * @return the number of bytes written or needed for the spoof data
* *
 End of changes. 47 change blocks. 
84 lines changed or deleted 290 lines changed or added


 ustdio.h   ustdio.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1998-2012, International Business Machines * Copyright (C) 1998-2013, 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 32 skipping to change at line 32
#ifndef USTDIO_H #ifndef USTDIO_H
#define USTDIO_H #define USTDIO_H
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/ucnv.h" #include "unicode/ucnv.h"
#include "unicode/utrans.h" #include "unicode/utrans.h"
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
#include "unicode/unum.h"
/* /*
TODO TODO
The following is a small list as to what is currently wrong/suggestions fo r The following is a small list as to what is currently wrong/suggestions fo r
ustdio. ustdio.
* Make sure that * in the scanf format specification works for all formats . * Make sure that * in the scanf format specification works for all formats .
* Each UFILE takes up at least 2KB. * Each UFILE takes up at least 2KB.
Look into adding setvbuf() for configurable buffers. Look into adding setvbuf() for configurable buffers.
* This library does buffering. The OS should do this for us already. Check on * This library does buffering. The OS should do this for us already. Check on
skipping to change at line 366 skipping to change at line 367
* Rewind the file pointer to the beginning of the file. * Rewind the file pointer to the beginning of the file.
* @param file The UFILE to rewind. * @param file The UFILE to rewind.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE void U_STABLE void
u_frewind(UFILE *file); u_frewind(UFILE *file);
/** /**
* Get the FILE* associated with a UFILE. * Get the FILE* associated with a UFILE.
* @param f The UFILE * @param f The UFILE
* @return A FILE*, owned by the UFILE. The FILE <EM>must not</EM> be clos ed. * @return A FILE*, owned by the UFILE. (The FILE <EM>must not</EM> be modi fied or closed)
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE FILE* U_EXPORT2 U_STABLE FILE* U_EXPORT2
u_fgetfile(UFILE *f); u_fgetfile(UFILE *f);
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
/** /**
* Get the locale whose conventions are used to format and parse output. * Get the locale whose conventions are used to format and parse output.
* This is the same locale passed in the preceding call to<TT>u_fsetlocale< /TT> * This is the same locale passed in the preceding call to<TT>u_fsetlocale< /TT>
skipping to change at line 433 skipping to change at line 434
* @see u_frewind * @see u_frewind
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_fsetcodepage(const char *codepage, u_fsetcodepage(const char *codepage,
UFILE *file); UFILE *file);
/** /**
* Returns an alias to the converter being used for this file. * Returns an alias to the converter being used for this file.
* @param f The UFILE to get the value from * @param f The UFILE to get the value from
* @return alias to the converter * @return alias to the converter (The converter <EM>must not</EM> be modif ied or closed)
* @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
#ifndef U_HIDE_DRAFT_API
/**
* Returns an alias to the number formatter being used for this file.
* @param f The UFILE to get the value from
* @return alias to the number formatter (The formatter <EM>must not</EM> b
e modified or closed)
* @draft ICU 51
*/
U_DRAFT const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f);
#endif /* U_HIDE_DRAFT_API */
/* Output functions */ /* Output functions */
/** /**
* Write formatted data to <TT>stdout</TT>. * Write formatted data to <TT>stdout</TT>.
* @param patternSpecification A pattern specifying how <TT>u_printf</TT> w ill * @param patternSpecification A pattern specifying how <TT>u_printf</TT> w ill
* 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>stdout</TT> * @return The number of Unicode characters written to <TT>stdout</TT>
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_printf(const char *patternSpecification, 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
skipping to change at line 488 skipping to change at line 498
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>. * Write formatted data to <TT>stdout</TT>.
* @param patternSpecification A pattern specifying how <TT>u_printf_u</TT> will * @param patternSpecification A pattern specifying how <TT>u_printf_u</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>stdout</TT> * @return The number of Unicode characters written to <TT>stdout</TT>
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_printf_u(const UChar *patternSpecification, u_printf_u(const UChar *patternSpecification,
... ); ... );
/** /**
* Get a UFILE for <TT>stdout</TT>. * Get a UFILE for <TT>stdout</TT>.
* @return UFILE that writes to <TT>stdout</TT> * @return UFILE that writes to <TT>stdout</TT>
* @draft ICU 49 * @stable ICU 49
*/ */
U_DRAFT UFILE * U_EXPORT2 U_STABLE UFILE * U_EXPORT2
u_get_stdout(void); u_get_stdout(void);
/** /**
* 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
*/ */
 End of changes. 11 change blocks. 
9 lines changed or deleted 20 lines changed or added


 utf16.h   utf16.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: 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
skipping to change at line 182 skipping to change at line 182
} }
/** /**
* Get a code point from a string at a random-access offset, * Get a code point from a string at a random-access offset,
* without changing the offset. * without changing the offset.
* "Safe" macro, handles unpaired surrogates and checks for string boundari es. * "Safe" macro, handles unpaired surrogates and checks for string boundari es.
* *
* The offset may point to either the lead or trail surrogate unit * The offset may point to either the lead or trail surrogate unit
* for a supplementary code point, in which case the macro will read * for a supplementary code point, in which case the macro will read
* the adjacent matching surrogate as well. * the adjacent matching surrogate as well.
*
* The length can be negative for a NUL-terminated string.
*
* If the offset points to a single, unpaired surrogate, then that itself * If the offset points to a single, unpaired surrogate, then that itself
* will be returned as the code point. * will be returned as the code point.
* Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16 _NEXT. * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16 _NEXT.
* *
* @param s const UChar * string * @param s const UChar * string
* @param start starting string offset (usually 0) * @param start starting string offset (usually 0)
* @param i string offset, must be start<=i<length * @param i string offset, must be start<=i<length
* @param length string length * @param length string length
* @param c output UChar32 variable * @param c output UChar32 variable
* @see U16_GET_UNSAFE * @see U16_GET_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U16_GET(s, start, i, length, c) { \ #define U16_GET(s, start, i, length, c) { \
(c)=(s)[i]; \ (c)=(s)[i]; \
if(U16_IS_SURROGATE(c)) { \ if(U16_IS_SURROGATE(c)) { \
uint16_t __c2; \ uint16_t __c2; \
if(U16_IS_SURROGATE_LEAD(c)) { \ if(U16_IS_SURROGATE_LEAD(c)) { \
if((i)+1<(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { \ if((i)+1!=(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { \
(c)=U16_GET_SUPPLEMENTARY((c), __c2); \ (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
} \ } \
} else { \ } else { \
if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
(c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
} \ } \
} \ } \
} \ } \
} }
skipping to change at line 244 skipping to change at line 247
(c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)++]); \ (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)++]); \
} \ } \
} }
/** /**
* Get a code point from a string at a code point boundary offset, * Get a code point from a string at a code point boundary offset,
* and advance the offset to the next code point boundary. * and advance the offset to the next code point boundary.
* (Post-incrementing forward iteration.) * (Post-incrementing forward iteration.)
* "Safe" macro, handles unpaired surrogates and checks for string boundari es. * "Safe" macro, handles unpaired surrogates and checks for string boundari es.
* *
* The length can be negative for a NUL-terminated string.
*
* The offset may point to the lead surrogate unit * The offset may point to the lead surrogate unit
* for a supplementary code point, in which case the macro will read * for a supplementary code point, in which case the macro will read
* the following trail surrogate as well. * the following trail surrogate as well.
* If the offset points to a trail surrogate or * If the offset points to a trail surrogate or
* to a single, unpaired lead surrogate, then that itself * to a single, unpaired lead surrogate, then that itself
* will be returned as the code point. * will be returned as the code point.
* *
* @param s const UChar * string * @param s const UChar * string
* @param i string offset, must be i<length * @param i string offset, must be i<length
* @param length string length * @param length string length
* @param c output UChar32 variable * @param c output UChar32 variable
* @see U16_NEXT_UNSAFE * @see U16_NEXT_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U16_NEXT(s, i, length, c) { \ #define U16_NEXT(s, i, length, c) { \
(c)=(s)[(i)++]; \ (c)=(s)[(i)++]; \
if(U16_IS_LEAD(c)) { \ if(U16_IS_LEAD(c)) { \
uint16_t __c2; \ uint16_t __c2; \
if((i)<(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \ if((i)!=(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \
++(i); \ ++(i); \
(c)=U16_GET_SUPPLEMENTARY((c), __c2); \ (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
} \ } \
} \ } \
} }
/** /**
* Append a code point to a string, overwriting 1 or 2 code units. * Append a code point to a string, overwriting 1 or 2 code units.
* The offset points to the current end of the string contents * The offset points to the current end of the string contents
* and is advanced (post-increment). * and is advanced (post-increment).
skipping to change at line 340 skipping to change at line 345
if(U16_IS_LEAD((s)[(i)++])) { \ if(U16_IS_LEAD((s)[(i)++])) { \
++(i); \ ++(i); \
} \ } \
} }
/** /**
* Advance the string offset from one code point boundary to the next. * Advance the string offset from one code point boundary to the next.
* (Post-incrementing iteration.) * (Post-incrementing iteration.)
* "Safe" macro, handles unpaired surrogates and checks for string boundari es. * "Safe" macro, handles unpaired surrogates and checks for string boundari es.
* *
* The length can be negative for a NUL-terminated string.
*
* @param s const UChar * string * @param s const UChar * string
* @param i string offset, must be i<length * @param i string offset, must be i<length
* @param length string length * @param length string length
* @see U16_FWD_1_UNSAFE * @see U16_FWD_1_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U16_FWD_1(s, i, length) { \ #define U16_FWD_1(s, i, length) { \
if(U16_IS_LEAD((s)[(i)++]) && (i)<(length) && U16_IS_TRAIL((s)[i])) { \ if(U16_IS_LEAD((s)[(i)++]) && (i)!=(length) && U16_IS_TRAIL((s)[i])) { \
++(i); \ ++(i); \
} \ } \
} }
/** /**
* Advance the string offset from one code point boundary to the n-th next one, * Advance the string offset from one code point boundary to the n-th next one,
* i.e., move forward by n code points. * i.e., move forward by n code points.
* (Post-incrementing iteration.) * (Post-incrementing iteration.)
* "Unsafe" macro, assumes well-formed UTF-16. * "Unsafe" macro, assumes well-formed UTF-16.
* *
skipping to change at line 378 skipping to change at line 385
--__N; \ --__N; \
} \ } \
} }
/** /**
* Advance the string offset from one code point boundary to the n-th next one, * Advance the string offset from one code point boundary to the n-th next one,
* i.e., move forward by n code points. * i.e., move forward by n code points.
* (Post-incrementing iteration.) * (Post-incrementing iteration.)
* "Safe" macro, handles unpaired surrogates and checks for string boundari es. * "Safe" macro, handles unpaired surrogates and checks for string boundari es.
* *
* The length can be negative for a NUL-terminated string.
*
* @param s const UChar * string * @param s const UChar * string
* @param i string offset, must be i<length * @param i int32_t string offset, must be i<length
* @param length string length * @param length int32_t string length
* @param n number of code points to skip * @param n number of code points to skip
* @see U16_FWD_N_UNSAFE * @see U16_FWD_N_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U16_FWD_N(s, i, length, n) { \ #define U16_FWD_N(s, i, length, n) { \
int32_t __N=(n); \ int32_t __N=(n); \
while(__N>0 && (i)<(length)) { \ while(__N>0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \
U16_FWD_1(s, i, length); \ U16_FWD_1(s, i, length); \
--__N; \ --__N; \
} \ } \
} }
/** /**
* Adjust a random-access offset to a code point boundary * Adjust a random-access offset to a code point boundary
* at the start of a code point. * at the start of a code point.
* If the offset points to the trail surrogate of a surrogate pair, * If the offset points to the trail surrogate of a surrogate pair,
* then the offset is decremented. * then the offset is decremented.
skipping to change at line 598 skipping to change at line 607
} }
/** /**
* Adjust a random-access offset to a code point boundary after a code poin t. * Adjust a random-access offset to a code point boundary after a code poin t.
* If the offset is behind the lead surrogate of a surrogate pair, * If the offset is behind the lead surrogate of a surrogate pair,
* then the offset is incremented. * then the offset is incremented.
* Otherwise, it is not modified. * Otherwise, it is not modified.
* The input offset may be the same as the string length. * The input offset may be the same as the string length.
* "Safe" macro, handles unpaired surrogates and checks for string boundari es. * "Safe" macro, handles unpaired surrogates and checks for string boundari es.
* *
* The length can be negative for a NUL-terminated string.
*
* @param s const UChar * string * @param s const UChar * string
* @param start starting string offset (usually 0) * @param start int32_t starting string offset (usually 0)
* @param i string offset, start<=i<=length * @param i int32_t string offset, start<=i<=length
* @param length string length * @param length int32_t string length
* @see U16_SET_CP_LIMIT_UNSAFE * @see U16_SET_CP_LIMIT_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U16_SET_CP_LIMIT(s, start, i, length) { \ #define U16_SET_CP_LIMIT(s, start, i, length) { \
if((start)<(i) && (i)<(length) && U16_IS_LEAD((s)[(i)-1]) && U16_IS_TRA IL((s)[i])) { \ if((start)<(i) && ((i)<(length) || (length)<0) && U16_IS_LEAD((s)[(i)-1 ]) && U16_IS_TRAIL((s)[i])) { \
++(i); \ ++(i); \
} \ } \
} }
#endif #endif
 End of changes. 13 change blocks. 
11 lines changed or deleted 22 lines changed or added


 utf8.h   utf8.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 1999-2012, International Business Machines * Copyright (C) 1999-2013, 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
skipping to change at line 235 skipping to change at line 235
U8_SET_CP_START_UNSAFE(s, _u8_get_unsafe_index); \ U8_SET_CP_START_UNSAFE(s, _u8_get_unsafe_index); \
U8_NEXT_UNSAFE(s, _u8_get_unsafe_index, c); \ U8_NEXT_UNSAFE(s, _u8_get_unsafe_index, c); \
} }
/** /**
* Get a code point from a string at a random-access offset, * Get a code point from a string at a random-access offset,
* without changing the offset. * without changing the offset.
* The offset may point to either the lead byte or one of the trail bytes * The offset may point to either the lead byte or one of the trail bytes
* for a code point, in which case the macro will read all of the bytes * for a code point, in which case the macro will read all of the bytes
* for the code point. * for the code point.
*
* The length can be negative for a NUL-terminated string.
*
* If the offset points to an illegal UTF-8 byte sequence, then * If the offset points to an illegal UTF-8 byte sequence, then
* c is set to a negative value. * c is set to a negative value.
* Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_N EXT. * Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_N EXT.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param start starting string offset * @param start int32_t starting string offset
* @param i string offset, must be start<=i<length * @param i int32_t string offset, must be start<=i<length
* @param length string length * @param length int32_t string length
* @param c output UChar32 variable, set to <0 in case of an error * @param c output UChar32 variable, set to <0 in case of an error
* @see U8_GET_UNSAFE * @see U8_GET_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_GET(s, start, i, length, c) { \ #define U8_GET(s, start, i, length, c) { \
int32_t _u8_get_index=(int32_t)(i); \ int32_t _u8_get_index=(i); \
U8_SET_CP_START(s, start, _u8_get_index); \ U8_SET_CP_START(s, start, _u8_get_index); \
U8_NEXT(s, _u8_get_index, length, c); \ U8_NEXT(s, _u8_get_index, length, c); \
} }
#ifndef U_HIDE_DRAFT_API
/**
* Get a code point from a string at a random-access offset,
* without changing the offset.
* The offset may point to either the lead byte or one of the trail bytes
* for a code point, in which case the macro will read all of the bytes
* for the code point.
*
* The length can be negative for a NUL-terminated string.
*
* If the offset points to an illegal UTF-8 byte sequence, then
* c is set to U+FFFD.
* Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_N
EXT_OR_FFFD.
*
* This macro does not distinguish between a real U+FFFD in the text
* and U+FFFD returned for an ill-formed sequence.
* Use U8_GET() if that distinction is important.
*
* @param s const uint8_t * string
* @param start int32_t starting string offset
* @param i int32_t string offset, must be start<=i<length
* @param length int32_t string length
* @param c output UChar32 variable, set to U+FFFD in case of an error
* @see U8_GET
* @draft ICU 51
*/
#define U8_GET_OR_FFFD(s, start, i, length, c) { \
int32_t _u8_get_index=(i); \
U8_SET_CP_START(s, start, _u8_get_index); \
U8_NEXT_OR_FFFD(s, _u8_get_index, length, c); \
}
#endif /* U_HIDE_DRAFT_API */
/* definitions with forward iteration ------------------------------------- -- */ /* definitions with forward iteration ------------------------------------- -- */
/** /**
* Get a code point from a string at a code point boundary offset, * Get a code point from a string at a code point boundary offset,
* and advance the offset to the next code point boundary. * and advance the offset to the next code point boundary.
* (Post-incrementing forward iteration.) * (Post-incrementing forward iteration.)
* "Unsafe" macro, assumes well-formed UTF-8. * "Unsafe" macro, assumes well-formed UTF-8.
* *
* The offset may point to the lead byte of a multi-byte sequence, * The offset may point to the lead byte of a multi-byte sequence,
* in which case the macro will read the whole sequence. * in which case the macro will read the whole sequence.
skipping to change at line 294 skipping to change at line 330
} \ } \
} \ } \
} }
/** /**
* Get a code point from a string at a code point boundary offset, * Get a code point from a string at a code point boundary offset,
* and advance the offset to the next code point boundary. * and advance the offset to the next code point boundary.
* (Post-incrementing forward iteration.) * (Post-incrementing forward iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* The length can be negative for a NUL-terminated string.
*
* The offset may point to the lead byte of a multi-byte sequence, * The offset may point to the lead byte of a multi-byte sequence,
* in which case the macro will read the whole sequence. * in which case the macro will read the whole sequence.
* If the offset points to a trail byte or an illegal UTF-8 sequence, then * If the offset points to a trail byte or an illegal UTF-8 sequence, then
* c is set to a negative value. * c is set to a negative value.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param i string offset, must be i<length * @param i int32_t string offset, must be i<length
* @param length string length * @param length int32_t string length
* @param c output UChar32 variable, set to <0 in case of an error * @param c output UChar32 variable, set to <0 in case of an error
* @see U8_NEXT_UNSAFE * @see U8_NEXT_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_NEXT(s, i, length, c) { \ #define U8_NEXT(s, i, length, c) { \
(c)=(uint8_t)(s)[(i)++]; \ (c)=(uint8_t)(s)[(i)++]; \
if((c)>=0x80) { \ if((c)>=0x80) { \
uint8_t __t1, __t2; \ uint8_t __t1, __t2; \
if( /* handle U+1000..U+CFFF inline */ \ if( /* handle U+1000..U+CFFF inline */ \
(0xe0<(c) && (c)<=0xec) && \ (0xe0<(c) && (c)<=0xec) && \
(((i)+1)<(length)) && \ (((i)+1)<(length) || (length)<0) && \
(__t1=(uint8_t)((s)[i]-0x80))<=0x3f && \ (__t1=(uint8_t)((s)[i]-0x80))<=0x3f && \
(__t2=(uint8_t)((s)[(i)+1]-0x80))<= 0x3f \ (__t2=(uint8_t)((s)[(i)+1]-0x80))<= 0x3f \
) { \ ) { \
/* no need for (c&0xf) because the upper bits are truncated aft er <<12 in the cast to (UChar) */ \ /* no need for (c&0xf) because the upper bits are truncated aft er <<12 in the cast to (UChar) */ \
(c)=(UChar)(((c)<<12)|(__t1<<6)|__t2); \ (c)=(UChar)(((c)<<12)|(__t1<<6)|__t2); \
(i)+=2; \ (i)+=2; \
} else if( /* handle U+0080..U+07FF inline */ \ } else if( /* handle U+0080..U+07FF inline */ \
((c)<0xe0 && (c)>=0xc2) && \ ((c)<0xe0 && (c)>=0xc2) && \
((i)<(length)) && \ ((i)!=(length)) && \
(__t1=(uint8_t)((s)[i]-0x80))<=0x3f \ (__t1=(uint8_t)((s)[i]-0x80))<=0x3f \
) { \ ) { \
(c)=(UChar)((((c)&0x1f)<<6)|__t1); \ (c)=(((c)&0x1f)<<6)|__t1; \
++(i); \ ++(i); \
} else if(U8_IS_LEAD(c)) { \ } else { \
/* function call for "complicated" and error cases */ \ /* function call for "complicated" and error cases */ \
(c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (int32_t)(l (c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (length), c
ength), c, -1); \ , -1); \
} \
} \
}
#ifndef U_HIDE_DRAFT_API
/**
* Get a code point from a string at a code point boundary offset,
* and advance the offset to the next code point boundary.
* (Post-incrementing forward iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries.
*
* The length can be negative for a NUL-terminated string.
*
* The offset may point to the lead byte of a multi-byte sequence,
* in which case the macro will read the whole sequence.
* If the offset points to a trail byte or an illegal UTF-8 sequence, then
* c is set to U+FFFD.
*
* This macro does not distinguish between a real U+FFFD in the text
* and U+FFFD returned for an ill-formed sequence.
* Use U8_NEXT() if that distinction is important.
*
* @param s const uint8_t * string
* @param i int32_t string offset, must be i<length
* @param length int32_t string length
* @param c output UChar32 variable, set to U+FFFD in case of an error
* @see U8_NEXT
* @draft ICU 51
*/
#define U8_NEXT_OR_FFFD(s, i, length, c) { \
(c)=(uint8_t)(s)[(i)++]; \
if((c)>=0x80) { \
uint8_t __t1, __t2; \
if( /* handle U+1000..U+CFFF inline */ \
(0xe0<(c) && (c)<=0xec) && \
(((i)+1)<(length) || (length)<0) && \
(__t1=(uint8_t)((s)[i]-0x80))<=0x3f && \
(__t2=(uint8_t)((s)[(i)+1]-0x80))<= 0x3f \
) { \
/* no need for (c&0xf) because the upper bits are truncated aft
er <<12 in the cast to (UChar) */ \
(c)=(UChar)(((c)<<12)|(__t1<<6)|__t2); \
(i)+=2; \
} else if( /* handle U+0080..U+07FF inline */ \
((c)<0xe0 && (c)>=0xc2) && \
((i)!=(length)) && \
(__t1=(uint8_t)((s)[i]-0x80))<=0x3f \
) { \
(c)=(((c)&0x1f)<<6)|__t1; \
++(i); \
} else { \ } else { \
(c)=U_SENTINEL; \ /* function call for "complicated" and error cases */ \
(c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (length), c
, -3); \
} \ } \
} \ } \
} }
#endif /* U_HIDE_DRAFT_API */
/** /**
* Append a code point to a string, overwriting 1 to 4 bytes. * Append a code point to a string, overwriting 1 to 4 bytes.
* The offset points to the current end of the string contents * The offset points to the current end of the string contents
* and is advanced (post-increment). * and is advanced (post-increment).
* "Unsafe" macro, assumes a valid code point and sufficient space in the s tring. * "Unsafe" macro, assumes a valid code point and sufficient space in the s tring.
* Otherwise, the result is undefined. * Otherwise, the result is undefined.
* *
* @param s const uint8_t * string buffer * @param s const uint8_t * string buffer
* @param i string offset * @param i string offset
skipping to change at line 377 skipping to change at line 466
/** /**
* Append a code point to a string, overwriting 1 to 4 bytes. * Append a code point to a string, overwriting 1 to 4 bytes.
* The offset points to the current end of the string contents * The offset points to the current end of the string contents
* and is advanced (post-increment). * and is advanced (post-increment).
* "Safe" macro, checks for a valid code point. * "Safe" macro, checks for a valid code point.
* If a non-ASCII code point is written, checks for sufficient space in the string. * If a non-ASCII code point is written, checks for sufficient space in the string.
* If the code point is not valid or trail bytes do not fit, * If the code point is not valid or trail bytes do not fit,
* then isError is set to TRUE. * then isError is set to TRUE.
* *
* @param s const uint8_t * string buffer * @param s const uint8_t * string buffer
* @param i string offset, must be i<capacity * @param i int32_t string offset, must be i<capacity
* @param capacity size of the string buffer * @param capacity int32_t size of the string buffer
* @param c code point to append * @param c UChar32 code point to append
* @param isError output UBool set to TRUE if an error occurs, otherwise no t modified * @param isError output UBool set to TRUE if an error occurs, otherwise no t modified
* @see U8_APPEND_UNSAFE * @see U8_APPEND_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_APPEND(s, i, capacity, c, isError) { \ #define U8_APPEND(s, i, capacity, c, isError) { \
if((uint32_t)(c)<=0x7f) { \ if((uint32_t)(c)<=0x7f) { \
(s)[(i)++]=(uint8_t)(c); \ (s)[(i)++]=(uint8_t)(c); \
} else if((uint32_t)(c)<=0x7ff && (i)+1<(capacity)) { \ } else if((uint32_t)(c)<=0x7ff && (i)+1<(capacity)) { \
(s)[(i)++]=(uint8_t)(((c)>>6)|0xc0); \ (s)[(i)++]=(uint8_t)(((c)>>6)|0xc0); \
(s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); \ (s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); \
} else if((uint32_t)(c)<=0xd7ff && (i)+2<(capacity)) { \ } else if((uint32_t)(c)<=0xd7ff && (i)+2<(capacity)) { \
(s)[(i)++]=(uint8_t)(((c)>>12)|0xe0); \ (s)[(i)++]=(uint8_t)(((c)>>12)|0xe0); \
(s)[(i)++]=(uint8_t)((((c)>>6)&0x3f)|0x80); \ (s)[(i)++]=(uint8_t)((((c)>>6)&0x3f)|0x80); \
(s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); \ (s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); \
} else { \ } else { \
(i)=utf8_appendCharSafeBody(s, (int32_t)(i), (int32_t)(capacity), c , &(isError)); \ (i)=utf8_appendCharSafeBody(s, (i), (capacity), c, &(isError)); \
} \ } \
} }
/** /**
* Advance the string offset from one code point boundary to the next. * Advance the string offset from one code point boundary to the next.
* (Post-incrementing iteration.) * (Post-incrementing iteration.)
* "Unsafe" macro, assumes well-formed UTF-8. * "Unsafe" macro, assumes well-formed UTF-8.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param i string offset * @param i string offset
skipping to change at line 418 skipping to change at line 507
*/ */
#define U8_FWD_1_UNSAFE(s, i) { \ #define U8_FWD_1_UNSAFE(s, i) { \
(i)+=1+U8_COUNT_TRAIL_BYTES_UNSAFE((uint8_t)(s)[i]); \ (i)+=1+U8_COUNT_TRAIL_BYTES_UNSAFE((uint8_t)(s)[i]); \
} }
/** /**
* Advance the string offset from one code point boundary to the next. * Advance the string offset from one code point boundary to the next.
* (Post-incrementing iteration.) * (Post-incrementing iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* The length can be negative for a NUL-terminated string.
*
* @param s const uint8_t * string * @param s const uint8_t * string
* @param i string offset, must be i<length * @param i int32_t string offset, must be i<length
* @param length string length * @param length int32_t string length
* @see U8_FWD_1_UNSAFE * @see U8_FWD_1_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_FWD_1(s, i, length) { \ #define U8_FWD_1(s, i, length) { \
uint8_t __b=(uint8_t)(s)[(i)++]; \ uint8_t __b=(uint8_t)(s)[(i)++]; \
if(U8_IS_LEAD(__b)) { \ if(U8_IS_LEAD(__b)) { \
uint8_t __count=U8_COUNT_TRAIL_BYTES(__b); \ uint8_t __count=U8_COUNT_TRAIL_BYTES(__b); \
if((i)+__count>(length)) { \ if((i)+__count>(length) && (length)>=0) { \
__count=(uint8_t)((length)-(i)); \ __count=(uint8_t)((length)-(i)); \
} \ } \
while(__count>0 && U8_IS_TRAIL((s)[i])) { \ while(__count>0 && U8_IS_TRAIL((s)[i])) { \
++(i); \ ++(i); \
--__count; \ --__count; \
} \ } \
} \ } \
} }
/** /**
skipping to change at line 464 skipping to change at line 555
--__N; \ --__N; \
} \ } \
} }
/** /**
* Advance the string offset from one code point boundary to the n-th next one, * Advance the string offset from one code point boundary to the n-th next one,
* i.e., move forward by n code points. * i.e., move forward by n code points.
* (Post-incrementing iteration.) * (Post-incrementing iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* The length can be negative for a NUL-terminated string.
*
* @param s const uint8_t * string * @param s const uint8_t * string
* @param i string offset, must be i<length * @param i int32_t string offset, must be i<length
* @param length string length * @param length int32_t string length
* @param n number of code points to skip * @param n number of code points to skip
* @see U8_FWD_N_UNSAFE * @see U8_FWD_N_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_FWD_N(s, i, length, n) { \ #define U8_FWD_N(s, i, length, n) { \
int32_t __N=(n); \ int32_t __N=(n); \
while(__N>0 && (i)<(length)) { \ while(__N>0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \
U8_FWD_1(s, i, length); \ U8_FWD_1(s, i, length); \
--__N; \ --__N; \
} \ } \
} }
/** /**
* Adjust a random-access offset to a code point boundary * Adjust a random-access offset to a code point boundary
* at the start of a code point. * at the start of a code point.
* If the offset points to a UTF-8 trail byte, * If the offset points to a UTF-8 trail byte,
* then the offset is moved backward to the corresponding lead byte. * then the offset is moved backward to the corresponding lead byte.
skipping to change at line 505 skipping to change at line 598
/** /**
* Adjust a random-access offset to a code point boundary * Adjust a random-access offset to a code point boundary
* at the start of a code point. * at the start of a code point.
* If the offset points to a UTF-8 trail byte, * If the offset points to a UTF-8 trail byte,
* then the offset is moved backward to the corresponding lead byte. * then the offset is moved backward to the corresponding lead byte.
* Otherwise, it is not modified. * Otherwise, it is not modified.
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param start starting string offset (usually 0) * @param start int32_t starting string offset (usually 0)
* @param i string offset, must be start<=i * @param i int32_t string offset, must be start<=i
* @see U8_SET_CP_START_UNSAFE * @see U8_SET_CP_START_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_SET_CP_START(s, start, i) { \ #define U8_SET_CP_START(s, start, i) { \
if(U8_IS_TRAIL((s)[(i)])) { \ if(U8_IS_TRAIL((s)[(i)])) { \
(i)=utf8_back1SafeBody(s, start, (int32_t)(i)); \ (i)=utf8_back1SafeBody(s, start, (i)); \
} \ } \
} }
/* definitions with backward iteration ------------------------------------ -- */ /* definitions with backward iteration ------------------------------------ -- */
/** /**
* Move the string offset from one code point boundary to the previous one * Move the string offset from one code point boundary to the previous one
* and get the code point between them. * and get the code point between them.
* (Pre-decrementing backward iteration.) * (Pre-decrementing backward iteration.)
* "Unsafe" macro, assumes well-formed UTF-8. * "Unsafe" macro, assumes well-formed UTF-8.
skipping to change at line 573 skipping to change at line 666
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* The input offset may be the same as the string length. * The input offset may be the same as the string length.
* If the offset is behind a multi-byte sequence, then the macro will read * If the offset is behind a multi-byte sequence, then the macro will read
* the whole sequence. * the whole sequence.
* If the offset is behind a lead byte, then that itself * If the offset is behind a lead byte, then that itself
* will be returned as the code point. * will be returned as the code point.
* If the offset is behind an illegal UTF-8 sequence, then c is set to a ne gative value. * If the offset is behind an illegal UTF-8 sequence, then c is set to a ne gative value.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param start starting string offset (usually 0) * @param start int32_t starting string offset (usually 0)
* @param i string offset, must be start<i * @param i int32_t string offset, must be start<i
* @param c output UChar32 variable, set to <0 in case of an error * @param c output UChar32 variable, set to <0 in case of an error
* @see U8_PREV_UNSAFE * @see U8_PREV_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_PREV(s, start, i, c) { \ #define U8_PREV(s, start, i, c) { \
(c)=(uint8_t)(s)[--(i)]; \ (c)=(uint8_t)(s)[--(i)]; \
if((c)>=0x80) { \ if((c)>=0x80) { \
if((c)<=0xbf) { \ (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -1);
(c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, - \
1); \ } \
} else { \ }
(c)=U_SENTINEL; \
} \ #ifndef U_HIDE_DRAFT_API
/**
* Move the string offset from one code point boundary to the previous one
* and get the code point between them.
* (Pre-decrementing backward iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries.
*
* The input offset may be the same as the string length.
* If the offset is behind a multi-byte sequence, then the macro will read
* the whole sequence.
* If the offset is behind a lead byte, then that itself
* will be returned as the code point.
* If the offset is behind an illegal UTF-8 sequence, then c is set to U+FF
FD.
*
* This macro does not distinguish between a real U+FFFD in the text
* and U+FFFD returned for an ill-formed sequence.
* Use U8_PREV() if that distinction is important.
*
* @param s const uint8_t * string
* @param start int32_t starting string offset (usually 0)
* @param i int32_t string offset, must be start<i
* @param c output UChar32 variable, set to U+FFFD in case of an error
* @see U8_PREV
* @draft ICU 51
*/
#define U8_PREV_OR_FFFD(s, start, i, c) { \
(c)=(uint8_t)(s)[--(i)]; \
if((c)>=0x80) { \
(c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -3);
\
} \ } \
} }
#endif /* U_HIDE_DRAFT_API */
/** /**
* Move the string offset from one code point boundary to the previous one. * Move the string offset from one code point boundary to the previous one.
* (Pre-decrementing backward iteration.) * (Pre-decrementing backward iteration.)
* The input offset may be the same as the string length. * The input offset may be the same as the string length.
* "Unsafe" macro, assumes well-formed UTF-8. * "Unsafe" macro, assumes well-formed UTF-8.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param i string offset * @param i string offset
* @see U8_BACK_1 * @see U8_BACK_1
skipping to change at line 612 skipping to change at line 734
while(U8_IS_TRAIL((s)[--(i)])) {} \ while(U8_IS_TRAIL((s)[--(i)])) {} \
} }
/** /**
* Move the string offset from one code point boundary to the previous one. * Move the string offset from one code point boundary to the previous one.
* (Pre-decrementing backward iteration.) * (Pre-decrementing backward iteration.)
* The input offset may be the same as the string length. * The input offset may be the same as the string length.
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param start starting string offset (usually 0) * @param start int32_t starting string offset (usually 0)
* @param i string offset, must be start<i * @param i int32_t string offset, must be start<i
* @see U8_BACK_1_UNSAFE * @see U8_BACK_1_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_BACK_1(s, start, i) { \ #define U8_BACK_1(s, start, i) { \
if(U8_IS_TRAIL((s)[--(i)])) { \ if(U8_IS_TRAIL((s)[--(i)])) { \
(i)=utf8_back1SafeBody(s, start, (int32_t)(i)); \ (i)=utf8_back1SafeBody(s, start, (i)); \
} \ } \
} }
/** /**
* Move the string offset from one code point boundary to the n-th one befo re it, * Move the string offset from one code point boundary to the n-th one befo re it,
* i.e., move backward by n code points. * i.e., move backward by n code points.
* (Pre-decrementing backward iteration.) * (Pre-decrementing backward iteration.)
* The input offset may be the same as the string length. * The input offset may be the same as the string length.
* "Unsafe" macro, assumes well-formed UTF-8. * "Unsafe" macro, assumes well-formed UTF-8.
* *
skipping to change at line 652 skipping to change at line 774
} }
/** /**
* Move the string offset from one code point boundary to the n-th one befo re it, * Move the string offset from one code point boundary to the n-th one befo re it,
* i.e., move backward by n code points. * i.e., move backward by n code points.
* (Pre-decrementing backward iteration.) * (Pre-decrementing backward iteration.)
* The input offset may be the same as the string length. * The input offset may be the same as the string length.
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param start index of the start of the string * @param start int32_t index of the start of the string
* @param i string offset, must be start<i * @param i int32_t string offset, must be start<i
* @param n number of code points to skip * @param n number of code points to skip
* @see U8_BACK_N_UNSAFE * @see U8_BACK_N_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_BACK_N(s, start, i, n) { \ #define U8_BACK_N(s, start, i, n) { \
int32_t __N=(n); \ int32_t __N=(n); \
while(__N>0 && (i)>(start)) { \ while(__N>0 && (i)>(start)) { \
U8_BACK_1(s, start, i); \ U8_BACK_1(s, start, i); \
--__N; \ --__N; \
} \ } \
skipping to change at line 692 skipping to change at line 814
} }
/** /**
* Adjust a random-access offset to a code point boundary after a code poin t. * Adjust a random-access offset to a code point boundary after a code poin t.
* If the offset is behind a partial multi-byte sequence, * If the offset is behind a partial multi-byte sequence,
* then the offset is incremented to behind the whole sequence. * then the offset is incremented to behind the whole sequence.
* Otherwise, it is not modified. * Otherwise, it is not modified.
* The input offset may be the same as the string length. * The input offset may be the same as the string length.
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* The length can be negative for a NUL-terminated string.
*
* @param s const uint8_t * string * @param s const uint8_t * string
* @param start starting string offset (usually 0) * @param start int32_t starting string offset (usually 0)
* @param i string offset, must be start<=i<=length * @param i int32_t string offset, must be start<=i<=length
* @param length string length * @param length int32_t string length
* @see U8_SET_CP_LIMIT_UNSAFE * @see U8_SET_CP_LIMIT_UNSAFE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_SET_CP_LIMIT(s, start, i, length) { \ #define U8_SET_CP_LIMIT(s, start, i, length) { \
if((start)<(i) && (i)<(length)) { \ if((start)<(i) && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \
U8_BACK_1(s, start, i); \ U8_BACK_1(s, start, i); \
U8_FWD_1(s, i, length); \ U8_FWD_1(s, i, length); \
} \ } \
} }
#endif #endif
 End of changes. 33 change blocks. 
44 lines changed or deleted 173 lines changed or added


 uvernum.h   uvernum.h 
skipping to change at line 60 skipping to change at line 60
* 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) 2012, 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 50 #define U_ICU_VERSION_MAJOR_NUM 51
/** 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 1 #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 2 #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 0 #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 _50 #define U_ICU_VERSION_SUFFIX _51
/** /**
* \def U_DEF2_ICU_ENTRY_POINT_RENAME * \def U_DEF2_ICU_ENTRY_POINT_RENAME
* @internal * @internal
*/ */
/** /**
* \def U_DEF_ICU_ENTRY_POINT_RENAME * \def U_DEF_ICU_ENTRY_POINT_RENAME
* @internal * @internal
*/ */
/** Glued version suffix function for renamers /** Glued version suffix function for renamers
skipping to change at line 121 skipping to change at line 121
#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(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) #define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_IC U_VERSION_SUFFIX)
#endif #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 "50.1.2" #define U_ICU_VERSION "51.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 "50" #define U_ICU_VERSION_SHORT "51"
#ifndef U_HIDE_INTERNAL_API #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 "50.1" #define U_ICU_DATA_VERSION "51.1"
#endif /* U_HIDE_INTERNAL_API */ #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
*========================================================================= == *========================================================================= ==
*/ */
/** /**
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added


 vtzone.h   vtzone.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2012, International Business Machines Corporation and * Copyright (C) 2007-2013, 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
skipping to change at line 163 skipping to change at line 163
void write(UnicodeString& result, UErrorCode& status) const; void write(UnicodeString& result, UErrorCode& status) const;
/** /**
* Writes RFC2445 VTIMEZONE data for this time zone applicalbe * Writes RFC2445 VTIMEZONE data for this time zone applicalbe
* for dates after the specified start time. * for dates after the specified start time.
* @param start The start date. * @param start The start date.
* @param result Output param to filled in with the VTIMEZONE data. * @param result Output param to filled in with the VTIMEZONE data.
* @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.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
void write(UDate start, UnicodeString& result, UErrorCode& status) /*co nst*/; void write(UDate start, UnicodeString& result, UErrorCode& status) cons t;
/** /**
* Writes RFC2445 VTIMEZONE data applicalbe for the specified date. * Writes RFC2445 VTIMEZONE data applicalbe for the specified date.
* Some common iCalendar implementations can only handle a single time * Some common iCalendar implementations can only handle a single time
* zone property or a pair of standard and daylight time properties usi ng * zone property or a pair of standard and daylight time properties usi ng
* BYDAY rule with day of week (such as BYDAY=1SUN). This method produ ce * BYDAY rule with day of week (such as BYDAY=1SUN). This method produ ce
* the VTIMEZONE data which can be handled these implementations. The rules * the VTIMEZONE data which can be handled these implementations. The rules
* produced by this method can be used only for calculating time zone o ffset * produced by this method can be used only for calculating time zone o ffset
* around the specified date. * around the specified date.
* @param time The date used for rule extraction. * @param time The date used for rule extraction.
* @param result Output param to filled in with the VTIMEZONE data. * @param result Output param to filled in with the VTIMEZONE data.
* @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.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
void writeSimple(UDate time, UnicodeString& result, UErrorCode& status) /*const*/; void writeSimple(UDate time, UnicodeString& result, UErrorCode& status) const;
/** /**
* Clones TimeZone objects polymorphically. Clients are responsible for deleting * Clones TimeZone objects polymorphically. Clients are responsible for deleting
* the TimeZone object cloned. * the TimeZone object cloned.
* @return A new copy of this TimeZone object. * @return A new copy of this TimeZone object.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual TimeZone* clone(void) const; virtual TimeZone* clone(void) const;
/** /**
skipping to change at line 322 skipping to change at line 322
virtual UBool hasSameRules(const TimeZone& other) const; virtual UBool hasSameRules(const TimeZone& other) const;
/** /**
* Gets the first time zone transition after the base time. * Gets the first time zone transition after the base time.
* @param base The base time. * @param base The base time.
* @param inclusive Whether the base time is inclusive or not. * @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time. * @param result Receives the first transition after the base time.
* @return TRUE if the transition is found. * @return TRUE if the transition is found.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTr ansition& result) /*const*/; virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTr ansition& result) const;
/** /**
* Gets the most recent time zone transition before the base time. * Gets the most recent time zone transition before the base time.
* @param base The base time. * @param base The base time.
* @param inclusive Whether the base time is inclusive or not. * @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time. * @param result Receives the most recent transition before the base time.
* @return TRUE if the transition is found. * @return TRUE if the transition is found.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZo neTransition& result) /*const*/; virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZo neTransition& result) const;
/** /**
* Returns the number of <code>TimeZoneRule</code>s which represents ti me transitions, * Returns the number of <code>TimeZoneRule</code>s which represents ti me transitions,
* for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except
* <code>InitialTimeZoneRule</code>. The return value range is 0 or an y positive value. * <code>InitialTimeZoneRule</code>. The return value range is 0 or an y positive value.
* @param status Receives error status code. * @param status Receives error status code.
* @return The number of <code>TimeZoneRule</code>s representing time t ransitions. * @return The number of <code>TimeZoneRule</code>s representing time t ransitions.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual int32_t countTransitionRules(UErrorCode& status) /*const*/; virtual int32_t countTransitionRules(UErrorCode& status) const;
/** /**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZ oneRule</code> * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZ oneRule</code>
* which represent time transitions for this time zone. On successful return, * which represent time transitions for this time zone. On successful return,
* the argument initial points to non-NULL <code>InitialTimeZoneRule</c ode> and * the argument initial points to non-NULL <code>InitialTimeZoneRule</c ode> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</ code> * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</ code>
* instances up to the size specified by trscount. The results are ref erencing the * instances up to the size specified by trscount. The results are ref erencing the
* rule instance held by this time zone instance. Therefore, after thi s time zone * rule instance held by this time zone instance. Therefore, after thi s time zone
* is destructed, they are no longer available. * is destructed, they are no longer available.
* @param initial Receives the initial timezone rule * @param initial Receives the initial timezone rule
* @param trsrules Receives the timezone transition rules * @param trsrules Receives the timezone transition rules
* @param trscount On input, specify the size of the array 'transi tions' receiving * @param trscount On input, specify the size of the array 'transi tions' receiving
* the timezone transition rules. On output, actu al number of * the timezone transition rules. On output, actu al number of
* rules filled in the array will be set. * rules filled in the array will be set.
* @param status Receives error status code. * @param status Receives error status code.
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial, virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& stat us) /*const*/; const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& stat us) const;
private: private:
enum { DEFAULT_VTIMEZONE_LINES = 100 }; enum { DEFAULT_VTIMEZONE_LINES = 100 };
/** /**
* Default constructor. * Default constructor.
*/ */
VTimeZone(); VTimeZone();
static VTimeZone* createVTimeZone(VTZReader* reader); static VTimeZone* createVTimeZone(VTZReader* reader);
void write(VTZWriter& writer, UErrorCode& status) const; void write(VTZWriter& writer, UErrorCode& status) const;
void write(UDate start, VTZWriter& writer, UErrorCode& status) /*const* void write(UDate start, VTZWriter& writer, UErrorCode& status) const;
/; void writeSimple(UDate time, VTZWriter& writer, UErrorCode& status) con
void writeSimple(UDate time, VTZWriter& writer, UErrorCode& status) /*c st;
onst*/;
void load(VTZReader& reader, UErrorCode& status); void load(VTZReader& reader, UErrorCode& status);
void parse(UErrorCode& status); void parse(UErrorCode& status);
void writeZone(VTZWriter& w, BasicTimeZone& basictz, UVector* customPro ps, void writeZone(VTZWriter& w, BasicTimeZone& basictz, UVector* customPro ps,
UErrorCode& status) const; UErrorCode& status) const;
void writeHeaders(VTZWriter& w, UErrorCode& status) const; void writeHeaders(VTZWriter& w, UErrorCode& status) const;
void writeFooter(VTZWriter& writer, UErrorCode& status) const; void writeFooter(VTZWriter& writer, UErrorCode& status) const;
void writeZonePropsByTime(VTZWriter& writer, UBool isDst, const Unicode String& zonename, void writeZonePropsByTime(VTZWriter& writer, UBool isDst, const Unicode String& zonename,
 End of changes. 8 change blocks. 
11 lines changed or deleted 10 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/