LayoutEngine.h   LayoutEngine.h 
/* /*
* * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
* (C) Copyright IBM Corp. 1998-2008 - 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 68 skipping to change at line 65
* the method can allocate and free the storage as needed. All storage allo cated * the method can allocate and free the storage as needed. All storage allo cated
* in this way is owned by the object which created it, and will be freed w hen it * in this way is owned by the object which created it, and will be freed w hen it
* is no longer needed, or when the object's destructor is invoked. * is no longer needed, or when the object's destructor is invoked.
* *
* @see LEFontInstance * @see LEFontInstance
* @see ScriptAndLanguageTags.h * @see ScriptAndLanguageTags.h
* *
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
class U_LAYOUT_API LayoutEngine : public UObject { class U_LAYOUT_API LayoutEngine : public UObject {
public:
/** @internal Flag to request kerning. */
static const le_int32 kTypoFlagKern;
/** @internal Flag to request ligatures. */
static const le_int32 kTypoFlagLiga;
protected: protected:
/** /**
* The object which holds the glyph storage * The object which holds the glyph storage
* *
* @internal * @internal
*/ */
LEGlyphStorage *fGlyphStorage; LEGlyphStorage *fGlyphStorage;
/** /**
* The font instance for the text font. * The font instance for the text font.
skipping to change at line 125 skipping to change at line 128
*/ */
le_bool fFilterZeroWidth; le_bool fFilterZeroWidth;
/** /**
* This constructs an instance for a given font, script and language. S ubclass constructors * This constructs an instance for a given font, script and language. S ubclass constructors
* must call this constructor. * must call this constructor.
* *
* @param fontInstance - the font for the text * @param fontInstance - the font for the text
* @param scriptCode - the script for the text * @param scriptCode - the script for the text
* @param languageCode - the language for the text * @param languageCode - the language for the text
* @param typoFlags - the typographic control flags for the text. Set * @param typoFlags - the typographic control flags for the text (a bit
bit 1 if kerning field). Use kTypoFlagKern
* is desired, set bit 2 if ligature formation is desired. Others are * if kerning is desired, kTypoFlagLiga if ligature formation is desire
reserved. d. Others are reserved.
* @param success - set to an error code if the operation fails * @param success - set to an error code if the operation fails
* *
* @see LEFontInstance * @see LEFontInstance
* @see ScriptAndLanguageTags.h * @see ScriptAndLanguageTags.h
* *
* @internal * @internal
*/ */
LayoutEngine(const LEFontInstance *fontInstance, LayoutEngine(const LEFontInstance *fontInstance,
le_int32 scriptCode, le_int32 scriptCode,
le_int32 languageCode, le_int32 languageCode,
 End of changes. 4 change blocks. 
8 lines changed or deleted 11 lines changed or added


 calendar.h   calendar.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File 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 1931 skipping to change at line 1931
int32_t getLocalDOW(); int32_t getLocalDOW();
private: private:
/** /**
* The next available value for fStamp[] * The next available value for fStamp[]
*/ */
int32_t fNextStamp;// = MINIMUM_USER_STAMP; int32_t fNextStamp;// = MINIMUM_USER_STAMP;
/** /**
* Recalculates the time stamp array (fStamp).
* Resets fNextStamp to lowest next stamp value.
*/
void recalculateStamp();
/**
* The current time set for the calendar. * The current time set for the calendar.
*/ */
UDate fTime; UDate fTime;
/** /**
* @see #setLenient * @see #setLenient
*/ */
UBool fLenient; UBool fLenient;
/** /**
skipping to change at line 2071 skipping to change at line 2077
* @see #isLenient * @see #isLenient
* @see #validateField(int, int&) * @see #validateField(int, int&)
* @internal * @internal
*/ */
void validateFields(UErrorCode &status); void validateFields(UErrorCode &status);
/** /**
* Validate a single field of this calendar. Subclasses should * Validate a single field of this calendar. Subclasses should
* override this method to validate any calendar-specific fields. * override this method to validate any calendar-specific fields.
* Generic fields can be handled by * Generic fields can be handled by
* <code>Calendar.validateField()</code>. * <code>Calendar::validateField()</code>.
* @see #validateField(int, int, int, int&) * @see #validateField(int, int, int, int&)
* @internal * @internal
*/ */
virtual void validateField(UCalendarDateFields field, UErrorCode &statu s); virtual void validateField(UCalendarDateFields field, UErrorCode &statu s);
/** /**
* Validate a single field of this calendar given its minimum and * Validate a single field of this calendar given its minimum and
* maximum allowed value. If the field is out of range, * maximum allowed value. If the field is out of range,
* <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may * <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may
* use this method in their implementation of {@link * use this method in their implementation of {@link
 End of changes. 3 change blocks. 
2 lines changed or deleted 8 lines changed or added


 choicfmt.h   choicfmt.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File CHOICFMT.H * File CHOICFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 03/20/97 helena Finished first cut of implementation and got ri d * 03/20/97 helena Finished first cut of implementation and got ri d
skipping to change at line 34 skipping to change at line 34
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: Choice Format. * \brief C++ API: Choice Format.
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/unistr.h"
#include "unicode/numfmt.h"
#include "unicode/fieldpos.h" #include "unicode/fieldpos.h"
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/messagepattern.h"
#include "unicode/numfmt.h"
#include "unicode/unistr.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class MessageFormat; class MessageFormat;
/** /**
* ChoiceFormat converts between ranges of numeric values * ChoiceFormat converts between ranges of numeric values and strings for t
* and string names for those ranges. A <code>ChoiceFormat</code> splits hose ranges.
* the real number line <code>-Inf</code> to <code>+Inf</code> into two * The strings must conform to the MessageFormat pattern syntax.
*
* <p><em><code>ChoiceFormat</code> is probably not what you need.
* Please use <code>MessageFormat</code>
* with <code>plural</code> arguments for proper plural selection,
* and <code>select</code> arguments for simple selection among a fixed set
of choices!</em></p>
*
* <p>A <code>ChoiceFormat</code> splits
* the real number line \htmlonly<code>-&#x221E;</code> to
* <code>+&#x221E;</code>\endhtmlonly into two
* or more contiguous ranges. Each range is mapped to a * or more contiguous ranges. Each range is mapped to a
* string. <code>ChoiceFormat</code> is generally used in a * string.</p>
* <code>MessageFormat</code> for displaying grammatically correct *
* plurals such as &quot;There are 2 files.&quot;</p> * <p><code>ChoiceFormat</code> was originally intended
* for displaying grammatically correct
* plurals such as &quot;There is one file.&quot; vs. &quot;There are 2 fil
es.&quot;
* <em>However,</em> plural rules for many languages
* are too complex for the capabilities of ChoiceFormat,
* and its requirement of specifying the precise rules for each message
* is unmanageable for translators.</p>
* *
* <p>There are two methods of defining a <code>ChoiceFormat</code>; both * <p>There are two methods of defining a <code>ChoiceFormat</code>; both
* are equivalent. The first is by using a string pattern. This is the * are equivalent. The first is by using a string pattern. This is the
* preferred method in most cases. The second method is through direct * preferred method in most cases. The second method is through direct
* specification of the arrays that make up the * specification of the arrays that logically make up the
* <code>ChoiceFormat</code>.</p> * <code>ChoiceFormat</code>.</p>
* *
* <p><strong>Patterns</strong></p> * <p>Note: Typically, choice formatting is done (if done at all) via <code
* >MessageFormat</code>
* <p>In most cases, the preferred way to define a * with a <code>choice</code> argument type,
* <code>ChoiceFormat</code> is with a pattern. Here is an example of a * rather than using a stand-alone <code>ChoiceFormat</code>.</p>
* <code>ChoiceFormat</code> pattern:</p>
*
* \htmlonly<pre> 0&#x2264;are no files|1&#x2264;is one file|1&lt;are ma
ny files</pre>\endhtmlonly
*
* <p>or equivalently,</p>
*
* \htmlonly<pre> 0#are no files|1#is one file|1&lt;are many files</pre>
\endhtmlonly
*
* <p>The pattern consists of a number or <em>range specifiers</em>
* separated by vertical bars '|' (U+007C). There is no
* vertical bar after the last range. Each range specifier is of the
* form:</p>
*
* \htmlonly<blockquote><em>Number Separator String</em></blockquote>\endht
mlonly
*
* <p><em>Number</em> is a floating point number that can be parsed by a
* default <code>NumberFormat</code> for the US locale. It gives the
* lower limit of this range. The lower limit is either inclusive or
* exclusive, depending on the <em>separator</em>. The upper limit is
* given by the lower limit of the next range. The Unicode infinity
* sign \htmlonly&#x221E \endhtmlonly (U+221E) is recognized for positive i
nfinity. It may be preceded by
* '-' (U+002D) to indicate negative infinity.</p>
*
* <p><em>String</em> is the format string for this range, with special
* characters enclosed in single quotes (<code>'The #
* sign'</code>). Single quotes themselves are indicated by two single
* quotes in a row (<code>'o''clock'</code>).</p>
*
* <p><em>Separator</em> is one of the following single characters:
*
* <ul>
* <li>\htmlonly'&#x2264;' \endhtmlonly (U+2264) or '#' (U+0023)
* indicates that the lower limit given by <em>Number</em> is
* inclusive. (The two characters are equivalent to ChoiceFormat.)
* This means that the limit value <em>Number</em> belongs to this
* range. Another way of saying this is that the corresponding
* closure is <code>FALSE</code>.</li>
*
* <li>'<' (U+003C) indicates that the lower limit given by
* <em>Number</em> is exclusive. This means that the value
* <em>Number</em> belongs to the prior range.</li> Another way of
* saying this is that the corresponding closure is
* <code>TRUE</code>.
* </ul>
*
* <p>See below for more information about closures.</p>
*
* <p><strong>Arrays</strong></p>
*
* <p>A <code>ChoiceFormat</code> defining <code>n</code> intervals
* (<code>n</code> &gt;= 2) is specified by three arrays of
* <code>n</code> items:
*
* <ul>
* <li><code>double limits[]</code> gives the start of each
* interval. This must be a non-decreasing list of values, none of
* which may be <code>NaN</code>.</li>
* <li><code>UBool closures[]</code> determines whether each limit
* value is contained in the interval below it or in the interval
* above it. If <code>closures[i]</code> is <code>FALSE</code>, then
* <code>limits[i]</code> is a member of interval
* <code>i</code>. Otherwise it is a member of interval
* <code>i+1</code>. If no closures array is specified, this is
* equivalent to having all closures be <code>FALSE</code>. Closures
* allow one to specify half-open, open, or closed intervals.</li>
* <li><code>UnicodeString formats[]</code> gives the string label
* associated with each interval.</li>
* </ul>
*
* <p><strong>Formatting and Parsing</strong></p>
*
* <p>During formatting, a number is converted to a
* string. <code>ChoiceFormat</code> accomplishes this by mapping the
* number to an interval using the following rule. Given a number
* <code>X</code> and and index value <code>j</code> in the range
* <code>0..n-1</code>, where <code>n</code> is the number of ranges:</p>
* *
* \htmlonly<blockquote>\endhtmlonly<code>X</code> matches <code>j</code> i * <h5>Patterns and Their Interpretation</h5>
f and only if
* <code>limit[j] &lt;= X &lt; limit[j+1]</code>
* \htmlonly</blockquote>\endhtmlonly
* *
* <p>(This assumes that all closures are <code>FALSE</code>. If some * <p>The pattern string defines the range boundaries and the strings for e
* closures are <code>TRUE</code> then the relations must be changed to ach number range.
* <code>&lt;=</code> or <code>&lt;</code> as appropriate.) If there is * Syntax:
* no match, then either the first or last index is used, depending on * <pre>
* whether the number is too low or too high. Once a number is mapped to * choiceStyle = number separator message ('|' number separator message)*
* an interval <code>j</code>, the string <code>formats[j]</code> is * number = normal_number | ['-'] \htmlonly&#x221E;\endhtmlonly (U+221E, in
* output.</p> finity)
* normal_number = double value (unlocalized ASCII string)
* separator = less_than | less_than_or_equal
* less_than = '<'
* less_than_or_equal = '#' | \htmlonly&#x2264;\endhtmlonly (U+2264)
* message: see {@link MessageFormat}
* </pre>
* Pattern_White_Space between syntax elements is ignored, except
* around each range's sub-message.</p>
* *
* <p>During parsing, a string is converted to a * <p>Each numeric sub-range extends from the current range's number
* number. <code>ChoiceFormat</code> finds the element * to the next range's number.
* <code>formats[j]</code> equal to the string, and returns * The number itself is included in its range if a <code>less_than_or_equal
* <code>limits[j]</code> as the parsed value.</p> </code> sign is used,
* and excluded from its range (and instead included in the previous range)
* if a <code>less_than</code> sign is used.</p>
* *
* <p><strong>Notes</strong></p> * <p>When a <code>ChoiceFormat</code> is constructed from
* arrays of numbers, closure flags and strings,
* they are interpreted just like
* the sequence of <code>(number separator string)</code> in an equivalent
pattern string.
* <code>closure[i]==TRUE</code> corresponds to a <code>less_than</code> se
parator sign.
* The equivalent pattern string will be constructed automatically.</p>
* *
* <p>The first limit value does not define a range boundary. For * <p>During formatting, a number is mapped to the first range
* example, in the pattern \htmlonly&quot;<code>1.0#a|2.0#b</code>&quot;\en * where the number is not greater than the range's upper limit.
dhtmlonly, the * That range's message string is returned. A NaN maps to the very first ra
* intervals are [-Inf, 2.0) and [2.0, +Inf]. It appears that the first nge.</p>
* interval should be [1.0, 2.0). However, since all values that are too
* small are mapped to range zero, the first interval is effectively
* [-Inf, 2.0). However, the first limit value <em>is</em> used during
* formatting. In this example, <code>parse(&quot;a&quot;)</code> returns
* 1.0.</p>
* *
* <p>There are no gaps between intervals and the entire number line is * <p>During parsing, a range is selected for the longest match of
* covered. A <code>ChoiceFormat</code> maps <em>all</em> possible * any range's message. That range's number is returned, ignoring the separ
* double values to a finite set of intervals.</p> ator/closure.
* Only a simple string match is performed, without parsing of arguments th
at
* might be specified in the message strings.</p>
* *
* <p>The non-number <code>NaN</code> is mapped to interval zero during * <p>Note that the first range's number is ignored in formatting
* formatting.</p> * but may be returned from parsing.</p>
* *
* <p><strong>Examples</strong></p> * <h5>Examples</h5>
* *
* <p>Here is an example of two arrays that map the number * <p>Here is an example of two arrays that map the number
* <code>1..7</code> to the English day of the week abbreviations * <code>1..7</code> to the English day of the week abbreviations
* <code>Sun..Sat</code>. No closures array is given; this is the same as * <code>Sun..Sat</code>. No closures array is given; this is the same as
* specifying all closures to be <code>FALSE</code>.</p> * specifying all closures to be <code>FALSE</code>.</p>
* *
* <pre> {1,2,3,4,5,6,7}, * <pre> {1,2,3,4,5,6,7},
* {&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&qu ot;Thur&quot;,&quot;Fri&quot;,&quot;Sat&quot;}</pre> * {&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&qu ot;Thur&quot;,&quot;Fri&quot;,&quot;Sat&quot;}</pre>
* *
* <p>Here is an example that maps the ranges [-Inf, 1), [1, 1], and (1, * <p>Here is an example that maps the ranges [-Inf, 1), [1, 1], and (1,
* +Inf] to three strings. That is, the number line is split into three * +Inf] to three strings. That is, the number line is split into three
* ranges: x &lt; 1.0, x = 1.0, and x &gt; 1.0.</p> * ranges: x &lt; 1.0, x = 1.0, and x &gt; 1.0.
* (The round parentheses in the notation above indicate an exclusive bound
ary,
* like the turned bracket in European notation: [-Inf, 1) == [-Inf, 1[ )<
/p>
* *
* <pre> {0, 1, 1}, * <pre> {0, 1, 1},
* {FALSE, FALSE, TRUE}, * {FALSE, FALSE, TRUE},
* {&quot;no files&quot;, &quot;one file&quot;, &quot;many files&quot;} </pre> * {&quot;no files&quot;, &quot;one file&quot;, &quot;many files&quot;} </pre>
* *
* <p>Here is a simple example that shows formatting and parsing: </p> * <p>Here is an example that shows formatting and parsing: </p>
* *
* \code * \code
* #include <unicode/choicfmt.h> * #include <unicode/choicfmt.h>
* #include <unicode/unistr.h> * #include <unicode/unistr.h>
* #include <iostream.h> * #include <iostream.h>
* *
* int main(int argc, char *argv[]) { * int main(int argc, char *argv[]) {
* double limits[] = {1,2,3,4,5,6,7}; * double limits[] = {1,2,3,4,5,6,7};
* UnicodeString monthNames[] = { * UnicodeString monthNames[] = {
* "Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; * "Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
skipping to change at line 218 skipping to change at line 164
* str.extract(0, str.length(), buf, 256, ""); * str.extract(0, str.length(), buf, 256, "");
* str.truncate(0); * str.truncate(0);
* cout << x << " -> " * cout << x << " -> "
* << buf << endl; * << buf << endl;
* } * }
* cout << endl; * cout << endl;
* return 0; * return 0;
* } * }
* \endcode * \endcode
* *
* <p>Here is a more complex example using a <code>ChoiceFormat</code>
* constructed from a pattern together with a
* <code>MessageFormat</code>.</p>
*
* \code
* #include <unicode/choicfmt.h>
* #include <unicode/msgfmt.h>
* #include <unicode/unistr.h>
* #include <iostream.h>
*
* int main(int argc, char *argv[]) {
* UErrorCode status = U_ZERO_ERROR;
* double filelimits[] = {0,1,2};
* UnicodeString filepart[] =
* {"are no files","is one file","are {0} files"};
* ChoiceFormat* fileform = new ChoiceFormat(filelimits, filepart, 3
);
* Format* testFormats[] =
* {fileform, NULL, NumberFormat::createInstance(status)};
* MessageFormat pattform("There {0} on {1}", status );
* pattform.adoptFormats(testFormats, 3);
* Formattable testArgs[] = {0L, "Disk A"};
* FieldPosition fp(0);
* UnicodeString str;
* char buf[256];
* for (int32_t i = 0; i < 4; ++i) {
* Formattable fInt(i);
* testArgs[0] = fInt;
* pattform.format(testArgs, 2, str, fp, status );
* str.extract(0, str.length(), buf, "");
* str.truncate(0);
* cout << "Output for i=" << i << " : " << buf << endl;
* }
* cout << endl;
* return 0;
* }
* \endcode
*
* <p><em>User subclasses are not supported.</em> While clients may write * <p><em>User subclasses are not supported.</em> While clients may write
* subclasses, such code will not necessarily work and will not be * subclasses, such code will not necessarily work and will not be
* guaranteed to work stably from release to release. * guaranteed to work stably from release to release.
*/ */
class U_I18N_API ChoiceFormat: public NumberFormat { class U_I18N_API ChoiceFormat: public NumberFormat {
public: public:
/** /**
* Construct a new ChoiceFormat with the limits and the corresponding f * Constructs a new ChoiceFormat from the pattern string.
ormats
* based on the pattern.
* *
* @param pattern Pattern used to construct object. * @param pattern Pattern used to construct object.
* @param status Output param to receive success code. If the * @param status Output param to receive success code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
ChoiceFormat(const UnicodeString& pattern, ChoiceFormat(const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
/** /**
* Construct a new ChoiceFormat with the given limits and formats. Cop * Constructs a new ChoiceFormat with the given limits and message stri
y ngs.
* the limits and formats instead of adopting them. * All closure flags default to <code>FALSE</code>,
* equivalent to <code>less_than_or_equal</code> separators.
*
* Copies the limits and formats instead of adopting them.
* *
* @param limits Array of limit values. * @param limits Array of limit values.
* @param formats Array of formats. * @param formats Array of formats.
* @param count Size of 'limits' and 'formats' arrays. * @param count Size of 'limits' and 'formats' arrays.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
ChoiceFormat(const double* limits, ChoiceFormat(const double* limits,
const UnicodeString* formats, const UnicodeString* formats,
int32_t count ); int32_t count );
/** /**
* Construct a new ChoiceFormat with the given limits and formats. * Constructs a new ChoiceFormat with the given limits, closure flags a
* Copy the limits and formats (instead of adopting them). By nd message strings.
* default, each limit in the array specifies the inclusive lower *
* bound of its range, and the exclusive upper bound of the previous * Copies the limits and formats instead of adopting them.
* range. However, if the isLimitOpen element corresponding to a *
* limit is TRUE, then the limit is the exclusive lower bound of its
* range, and the inclusive upper bound of the previous range.
* @param limits Array of limit values * @param limits Array of limit values
* @param closures Array of booleans specifying whether each * @param closures Array of booleans specifying whether each
* element of 'limits' is open or closed. If FALSE, then the * element of 'limits' is open or closed. If FALSE, then the
* corresponding limit is a member of the range above it. If TRUE, * corresponding limit number is a member of its range.
* then the limit belongs to the range below it. * If TRUE, then the limit number belongs to the previous range it.
* @param formats Array of formats * @param formats Array of formats
* @param count Size of 'limits', 'closures', and 'formats' arrays * @param count Size of 'limits', 'closures', and 'formats' arrays
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
ChoiceFormat(const double* limits, ChoiceFormat(const double* limits,
const UBool* closures, const UBool* closures,
const UnicodeString* formats, const UnicodeString* formats,
int32_t count); int32_t count);
/** /**
skipping to change at line 332 skipping to change at line 239
*/ */
const ChoiceFormat& operator=(const ChoiceFormat& that); const ChoiceFormat& operator=(const ChoiceFormat& that);
/** /**
* Destructor. * Destructor.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual ~ChoiceFormat(); virtual ~ChoiceFormat();
/** /**
* Clone this Format object polymorphically. The caller owns the * Clones this Format object. The caller owns the
* result and should delete it when done. * result and must delete it when done.
* *
* @return a copy of this object * @return a copy of this object
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual Format* clone(void) const; virtual Format* clone(void) const;
/** /**
* Return true if the given Format objects are semantically equal. * Returns true if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal. * Objects of different subclasses are considered unequal.
* *
* @param other ChoiceFormat object to be compared * @param other ChoiceFormat object to be compared
* @return true if other is the same as this. * @return true if other is the same as this.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UBool operator==(const Format& other) const; virtual UBool operator==(const Format& other) const;
/** /**
* Sets the pattern. * Sets the pattern.
skipping to change at line 364 skipping to change at line 271
* exit. If the pattern is invalid, this will be * exit. If the pattern is invalid, this will be
* set to a failure result. * set to a failure result.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void applyPattern(const UnicodeString& pattern, virtual void applyPattern(const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
/** /**
* Sets the pattern. * Sets the pattern.
* @param pattern The pattern to be applied. * @param pattern The pattern to be applied.
* @param parseError Struct to recieve information on position * @param parseError Struct to receive information on position
* of error if an error is encountered * of error if an error is encountered
* @param status Output param set to success/failure code on * @param status Output param set to success/failure code on
* exit. If the pattern is invalid, this will be * exit. If the pattern is invalid, this will be
* set to a failure result. * set to a failure result.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void applyPattern(const UnicodeString& pattern, virtual void applyPattern(const UnicodeString& pattern,
UParseError& parseError, UParseError& parseError,
UErrorCode& status); UErrorCode& status);
/** /**
* Gets the pattern. * Gets the pattern.
* *
* @param pattern Output param which will recieve the pattern * @param pattern Output param which will receive the pattern
* Previous contents are deleted. * Previous contents are deleted.
* @return A reference to 'pattern' * @return A reference to 'pattern'
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UnicodeString& toPattern(UnicodeString &pattern) const; virtual UnicodeString& toPattern(UnicodeString &pattern) const;
/** /**
* Set the choices to be used in formatting. * Sets the choices to be used in formatting.
* For details see the constructor with the same parameter list.
* *
* @param limitsToCopy Contains the top value that you want * @param limitsToCopy Contains the top value that you want
* parsed with that format,and should be in * parsed with that format,and should be in
* ascending sorted order. When formatting X, * ascending sorted order. When formatting X,
* the choice will be the i, where limit[i] * the choice will be the i, where limit[i]
* &lt;= X &lt; limit[i+1]. * &lt;= X &lt; limit[i+1].
* @param formatsToCopy The format strings you want to use for each limit. * @param formatsToCopy The format strings you want to use for each limit.
* @param count The size of the above arrays. * @param count The size of the above arrays.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void setChoices(const double* limitsToCopy, virtual void setChoices(const double* limitsToCopy,
const UnicodeString* formatsToCopy, const UnicodeString* formatsToCopy,
int32_t count ); int32_t count );
/** /**
* Set the choices to be used in formatting. See class description * Sets the choices to be used in formatting.
* for documenatation of the limits, closures, and formats arrays. * For details see the constructor with the same parameter list.
*
* @param limits Array of limits * @param limits Array of limits
* @param closures Array of limit booleans * @param closures Array of limit booleans
* @param formats Array of format string * @param formats Array of format string
* @param count The size of the above arrays * @param count The size of the above arrays
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
virtual void setChoices(const double* limits, virtual void setChoices(const double* limits,
const UBool* closures, const UBool* closures,
const UnicodeString* formats, const UnicodeString* formats,
int32_t count); int32_t count);
/** /**
* Get the limits passed in the constructor. * Returns NULL and 0.
* Before ICU 4.8, this used to return the choice limits array.
* *
* @param count The size of the limits arrays * @param count Will be set to 0.
* @return the limits. * @return NULL
* @stable ICU 2.0 * @deprecated ICU 4.8 Use the MessagePattern class to analyze a Choice
Format pattern.
*/ */
virtual const double* getLimits(int32_t& count) const; virtual const double* getLimits(int32_t& count) const;
/** /**
* Get the limit booleans passed in the constructor. The caller * Returns NULL and 0.
* must not delete the result. * Before ICU 4.8, this used to return the limit booleans array.
* *
* @param count The size of the arrays * @param count Will be set to 0.
* @return the closures * @return NULL
* @stable ICU 2.4 * @deprecated ICU 4.8 Use the MessagePattern class to analyze a Choice
Format pattern.
*/ */
virtual const UBool* getClosures(int32_t& count) const; virtual const UBool* getClosures(int32_t& count) const;
/** /**
* Get the formats passed in the constructor. * Returns NULL and 0.
* Before ICU 4.8, this used to return the array of choice strings.
* *
* @param count The size of the arrays * @param count Will be set to 0.
* @return the formats. * @return NULL
* @stable ICU 2.0 * @deprecated ICU 4.8 Use the MessagePattern class to analyze a Choice
Format pattern.
*/ */
virtual const UnicodeString* getFormats(int32_t& count) const; virtual const UnicodeString* getFormats(int32_t& count) const;
using NumberFormat::format; using NumberFormat::format;
/** /**
* Format a double or long number using this object's choices. * Formats a double number using this object's choices.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UnicodeString& format(double number, virtual UnicodeString& format(double number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Format a int_32t number using this object's choices. * Formats an int32_t number using this object's choices.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UnicodeString& format(int32_t number, virtual UnicodeString& format(int32_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Format an int64_t number using this object's choices. * Formats an int64_t number using this object's choices.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
virtual UnicodeString& format(int64_t number, virtual UnicodeString& format(int64_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Format an array of objects using this object's choices. * Formats an array of objects using this object's choices.
* *
* @param objs The array of objects to be formatted. * @param objs The array of objects to be formatted.
* @param cnt The size of objs. * @param cnt The size of objs.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @param success Output param set to success/failure code on * @param success Output param set to success/failure code on
* exit. * exit.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UnicodeString& format(const Formattable* objs, virtual UnicodeString& format(const Formattable* objs,
int32_t cnt, int32_t cnt,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos, FieldPosition& pos,
UErrorCode& success) const; UErrorCode& success) const;
/** /**
* Format an object using this object's choices. * Formats an object using this object's choices.
* *
* *
* @param obj The object to be formatted. * @param obj The object to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos On input: an alignment field, if desired. * @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field. * On output: the offsets of the alignment field.
* @param status Output param set to success/failure code on * @param status Output param set to success/failure code on
* exit. * exit.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
skipping to change at line 543 skipping to change at line 454
* exit. * exit.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString& format(const Formattable& obj, UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Redeclared NumberFormat method. * Redeclared NumberFormat method.
* Format a double number. These methods call the NumberFormat * Formats a double number. These methods call the NumberFormat
* pure virtual format() methods with the default FieldPosition. * pure virtual format() methods with the default FieldPosition.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString& format( double number, UnicodeString& format( double number,
UnicodeString& appendTo) const; UnicodeString& appendTo) const;
/** /**
* Redeclared NumberFormat method. * Redeclared NumberFormat method.
* Format a long number. These methods call the NumberFormat * Formats an int32_t number. These methods call the NumberFormat
* pure virtual format() methods with the default FieldPosition. * pure virtual format() methods with the default FieldPosition.
* *
* @param number The value to be formatted. * @param number The value to be formatted.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString& format( int32_t number, UnicodeString& format( int32_t number,
UnicodeString& appendTo) const; UnicodeString& appendTo) const;
/** /**
* Return a long if possible (e.g. within range LONG_MAX, * Looks for the longest match of any message string on the input text a
* LONG_MAX], and with no decimals), otherwise a double. If nd,
* IntegerOnly is set, will stop at a decimal point (or equivalent; * if there is a match, sets the result object to the corresponding rang
* e.g. for rational numbers "1 2/3", will stop after the 1). e's number.
* <P> *
* If no object can be parsed, parsePosition is unchanged, and NULL is * If no string matches, then the parsePosition is unchanged.
* returned.
* *
* @param text The text to be parsed. * @param text The text to be parsed.
* @param result Formattable to be set to the parse result. * @param result Formattable to be set to the parse result.
* If parse fails, return contents are undefined. * If parse fails, return contents are undefined.
* @param parsePosition The position to start parsing at on input. * @param parsePosition The position to start parsing at on input.
* On output, moved to after the last successfully * On output, moved to after the last successfully
* parse character. On parse failure, does not cha nge. * parse character. On parse failure, does not cha nge.
* @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,
ParsePosition& parsePosition) const; ParsePosition& parsePosition) const;
/** /**
* Return a long if possible (e.g. within range LONG_MAX, * Looks for the longest match of any message string on the input text
* LONG_MAX], and with no decimals), otherwise a double. If and,
* IntegerOnly is set, will stop at a decimal point (or equivalent; * if there is a match, sets the result object to the corresponding ran
* e.g. for rational numbers "1 2/3", will stop after the 1). ge's number.
* <P> *
* If no object can be parsed, parsePosition is unchanged, and NULL is * If no string matches, then the UErrorCode is set to U_INVALID_FORMAT
* returned. _ERROR.
* *
* @param text The text to be parsed. * @param text The text to be parsed.
* @param result Formattable to be set to the parse result. * @param result Formattable to be set to the parse result.
* If parse fails, return contents are undefined. * If parse fails, return contents are undefined.
* @param status Output param with the formatted string. * @param status Output param with the formatted string.
* @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;
public:
/** /**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. * Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's
* This method is to implement a simple version of RTTI, since not all RTTI".
* C++ compilers support genuine RTTI. Polymorphic operator==() and
* clone() methods call this method.
* *
* @return The class ID for this object. All objects of a * @return The class ID for this object. All objects of a
* given class have the same class ID. Objects of * given class have the same class ID. Objects of
* other classes have different class IDs. * other classes have different class IDs.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UClassID getDynamicClassID(void) const; virtual UClassID getDynamicClassID(void) const;
/** /**
* Return the class ID for this class. This is useful only for * Returns the class ID for this class. This is useful only for
* comparing to a return value from getDynamicClassID(). For example: * comparing to a return value from getDynamicClassID(). For example:
* <pre> * <pre>
* . Base* polymorphic_pointer = createPolymorphicObject(); * . Base* polymorphic_pointer = createPolymorphicObject();
* . if (polymorphic_pointer->getDynamicClassID() == * . if (polymorphic_pointer->getDynamicClassID() ==
* . Derived::getStaticClassID()) ... * . Derived::getStaticClassID()) ...
* </pre> * </pre>
* @return The class ID for all objects of this class. * @return The class ID for all objects of this class.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
private: private:
// static cache management (thread-safe)
// static NumberFormat* getNumberFormat(UErrorCode &status); // call thi
s function to 'check out' a numberformat from the cache.
// static void releaseNumberFormat(NumberFormat *adopt); // cal
l this function to 'return' the number format to the cache.
/**
* Converts a string to a double value using a default NumberFormat obj
ect
* which is static (shared by all ChoiceFormat instances).
* @param string the string to be converted with.
* @return the converted double number.
*/
static double stod(const UnicodeString& string);
/** /**
* Converts a double value to a string using a default NumberFormat obj * Converts a double value to a string.
ect * @param value the double number to be converted.
* which is static (shared by all ChoiceFormat instances).
* @param value the double number to be converted with.
* @param string the result string. * @param string the result string.
* @return the converted string. * @return the converted string.
*/ */
static UnicodeString& dtos(double value, UnicodeString& string); static UnicodeString& dtos(double value, UnicodeString& string);
ChoiceFormat(); // default constructor not implemented ChoiceFormat(); // default constructor not implemented
/** /**
* Construct a new ChoiceFormat with the limits and the corresponding f ormats * Construct a new ChoiceFormat with the limits and the corresponding f ormats
* based on the pattern. * based on the pattern.
* *
* @param newPattern Pattern used to construct object. * @param newPattern Pattern used to construct object.
* @param parseError Struct to recieve information on position * @param parseError Struct to receive information on position
* of error if an error is encountered. * of error if an error is encountered.
* @param status Output param to receive success code. If the * @param status Output param to receive success code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
ChoiceFormat(const UnicodeString& newPattern, ChoiceFormat(const UnicodeString& newPattern,
UParseError& parseError, UParseError& parseError,
UErrorCode& status); UErrorCode& status);
friend class MessageFormat; friend class MessageFormat;
virtual void setChoices(const double* limits,
const UBool* closures,
const UnicodeString* formats,
int32_t count,
UErrorCode &errorCode);
/** /**
* Finds the ChoiceFormat sub-message for the given number.
* @param pattern A MessagePattern.
* @param partIndex the index of the first ChoiceFormat argument style
part.
* @param number a number to be mapped to one of the ChoiceFormat argum
ent's intervals
* @return the sub-message start part index.
*/
static int32_t findSubMessage(const MessagePattern &pattern, int32_t pa
rtIndex, double number);
static double parseArgument(
const MessagePattern &pattern, int32_t partIndex,
const UnicodeString &source, ParsePosition &pos);
/**
* Matches the pattern string from the end of the partIndex to
* the beginning of the limitPartIndex,
* including all syntax except SKIP_SYNTAX,
* against the source string starting at sourceOffset.
* If they match, returns the length of the source string match.
* Otherwise returns -1.
*/
static int32_t matchStringUntilLimitPart(
const MessagePattern &pattern, int32_t partIndex, int32_t limit
PartIndex,
const UnicodeString &source, int32_t sourceOffset);
/**
* Some of the ChoiceFormat constructors do not have a UErrorCode param
ater.
* We need _some_ way to provide one for the MessagePattern constructor
.
* Alternatively, the MessagePattern could be a pointer field, but that
is
* not nice either.
*/
UErrorCode constructorErrorCode;
/**
* The MessagePattern which contains the parsed structure of the patter
n string.
*
* Starting with ICU 4.8, the MessagePattern contains a sequence of
* numeric/selector/message parts corresponding to the parsed pattern.
* For details see the MessagePattern class API docs.
*/
MessagePattern msgPattern;
/**
* Docs & fields from before ICU 4.8, before MessagePattern was used.
* Commented out, and left only for explanation of semantics.
* --------
* Each ChoiceFormat divides the range -Inf..+Inf into fCount * Each ChoiceFormat divides the range -Inf..+Inf into fCount
* intervals. The intervals are: * intervals. The intervals are:
* *
* 0: fChoiceLimits[0]..fChoiceLimits[1] * 0: fChoiceLimits[0]..fChoiceLimits[1]
* 1: fChoiceLimits[1]..fChoiceLimits[2] * 1: fChoiceLimits[1]..fChoiceLimits[2]
* ... * ...
* fCount-2: fChoiceLimits[fCount-2]..fChoiceLimits[fCount-1] * fCount-2: fChoiceLimits[fCount-2]..fChoiceLimits[fCount-1]
* fCount-1: fChoiceLimits[fCount-1]..+Inf * fCount-1: fChoiceLimits[fCount-1]..+Inf
* *
* Interval 0 is special; during formatting (mapping numbers to * Interval 0 is special; during formatting (mapping numbers to
skipping to change at line 713 skipping to change at line 651
* i: fChoiceLimits[i] <= x ... * i: fChoiceLimits[i] <= x ...
* *
* If fClosures[i] is TRUE, then the value fChoiceLimits[i] is * If fClosures[i] is TRUE, then the value fChoiceLimits[i] is
* in interval i-1. That is, intervals i-1 and i are: * in interval i-1. That is, intervals i-1 and i are:
* *
* i-1: ... x <= fChoiceLimits[i] * i-1: ... x <= fChoiceLimits[i]
* i: fChoiceLimits[i] < x ... * i: fChoiceLimits[i] < x ...
* *
* Because of the nature of interval 0, fClosures[0] has no * Because of the nature of interval 0, fClosures[0] has no
* effect. * effect.
*/ */
double* fChoiceLimits; // double* fChoiceLimits;
UBool* fClosures; // UBool* fClosures;
UnicodeString* fChoiceFormats; // UnicodeString* fChoiceFormats;
int32_t fCount; // int32_t fCount;
}; };
inline UnicodeString& inline UnicodeString&
ChoiceFormat::format(const Formattable& obj, ChoiceFormat::format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
UErrorCode& status) const { UErrorCode& status) const {
// Don't use Format:: - use immediate base class only, // Don't use Format:: - use immediate base class only,
// in case immediate base modifies behavior later. // in case immediate base modifies behavior later.
return NumberFormat::format(obj, appendTo, status); return NumberFormat::format(obj, appendTo, status);
} }
 End of changes. 55 change blocks. 
263 lines changed or deleted 220 lines changed or added


 coll.h   coll.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 1996-2010, International Business Machines * * Copyright (C) 1996-2011, International Business Machines *
* Corporation and others. All Rights Reserved. * * Corporation and others. All Rights Reserved. *
*************************************************************************** *** *************************************************************************** ***
*/ */
/** /**
* \file * \file
* \brief C++ API: Collation Service. * \brief C++ API: Collation Service.
*/ */
/** /**
skipping to change at line 601 skipping to change at line 601
* Collator::ComparisonResult result = myCollation->compare("abc", "AB C"); * Collator::ComparisonResult result = myCollation->compare("abc", "AB C");
* \endcode * \endcode
* </pre> * </pre>
* @see Collator#getStrength * @see Collator#getStrength
* @param newStrength the new comparison level. * @param newStrength the new comparison level.
* @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead * @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead
*/ */
virtual void setStrength(ECollationStrength newStrength) = 0; virtual void setStrength(ECollationStrength newStrength) = 0;
/** /**
* Get the current reordering of scripts (if one has been set). * Retrieves the reordering codes for this collator.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
* @param destCapacity The length of dest. If it is 0, then dest may be * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the function will only return the length of the result without wr NULL and the function
iting any of the result string (pre-flighting). * will only return the length of the result without writing any of th
* @param pErrorCode Must be a valid pointer to an error code value, wh e result string (pre-flighting).
ich must not indicate a failure before the function call. * @param status A reference to an error code value, which must not ind
* @return The length of the array of the script ordering. icate
* @see ucol_getReorderCodes * a failure before the function call.
* @internal * @return The length of the script ordering array.
* @see ucol_setReorderCodes
* @see Collator#getEquivalentReorderCodes
* @see Collator#setReorderCodes
* @draft ICU 4.8
*/ */
virtual int32_t getReorderCodes(int32_t *dest, virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Set the ordering of scripts for this collator. * Sets the ordering of scripts for this collator.
* @param reorderCodes An array of reorder codes in the new order. * @param reorderCodes An array of script codes in the new order. This
can be NULL if the
* length is also set to 0. An empty array will clear any reordering co
des on the collator.
* @param reorderCodesLength The length of reorderCodes. * @param reorderCodesLength The length of reorderCodes.
* @see ucol_setReorderCodes * @see Collator#getReorderCodes
* @internal * @see Collator#getEquivalentReorderCodes
* @param status error code
* @draft ICU 4.8
*/ */
virtual void setReorderCodes(const int32_t* reorderCodes, virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength, int32_t reorderCodesLength,
UErrorCode& status) ; UErrorCode& status) ;
/** /**
* Retrieves the reorder codes that are grouped with the given reorder
code. Some reorder
* codes will be grouped and must reorder together.
* @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script equivalene reordering
codes.
* @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the
* function will only return the length of the result without writing a
ny of the result
* string (pre-flighting).
* @param status A reference to an error code value, which must not ind
icate
* a failure before the function call.
* @return The length of the of the reordering code equivalence array.
* @see ucol_setReorderCodes
* @see Collator#getReorderCodes
* @see Collator#setReorderCodes
* @draft ICU 4.8
*/
static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
int32_t* dest,
int32_t destCapacity,
UErrorCode& status);
/**
* Get name of the object for the desired Locale, in the desired langau ge * Get name of the object for the desired Locale, in the desired langau ge
* @param objectLocale must be from getAvailableLocales * @param objectLocale must be from getAvailableLocales
* @param displayLocale specifies the desired locale for output * @param displayLocale specifies the desired locale for output
* @param name the fill-in parameter of the return value * @param name the fill-in parameter of the return value
* @return display-able name of the object for the object locale in the * @return display-able name of the object for the object locale in the
* desired language * desired language
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLoca le, static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLoca le,
const Locale& displayLocale, const Locale& displayLocale,
 End of changes. 8 change blocks. 
16 lines changed or deleted 51 lines changed or added


 currpinf.h   currpinf.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 2009-2010, International Business Machines Corporation and * * Copyright (C) 2009-2011, International Business Machines Corporation and *
* others. All Rights Reserved. * * others. All Rights Reserved. *
************************************************************************** ***** ************************************************************************** *****
*/ */
#ifndef CURRPINF_H #ifndef CURRPINF_H
#define CURRPINF_H #define CURRPINF_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
skipping to change at line 215 skipping to change at line 215
* @param status output param set to success/failure code on exit * @param status output param set to success/failure code on exit
* @return hash table initialized * @return hash table initialized
*/ */
Hashtable* initHash(UErrorCode& status); Hashtable* initHash(UErrorCode& status);
/** /**
* copy hash table * copy hash table
* *
* @param source the source to copy from * @param source the source to copy from
* @param target the target to copy to * @param target the target to copy to
* @param status error code
*/ */
void copyHash(const Hashtable* source, Hashtable* target, UErrorCode& s tatus); void copyHash(const Hashtable* source, Hashtable* target, UErrorCode& s tatus);
//-------------------- private data member --------------------- //-------------------- private data member ---------------------
// map from plural count to currency plural pattern, for example // map from plural count to currency plural pattern, for example
// a plural pattern defined in "CurrencyUnitPatterns" is // a plural pattern defined in "CurrencyUnitPatterns" is
// "one{{0} {1}}", in which "one" is a plural count // "one{{0} {1}}", in which "one" is a plural count
// and "{0} {1}" is a currency plural pattern". // and "{0} {1}" is a currency plural pattern".
// The currency plural pattern saved in this mapping is the pattern // The currency plural pattern saved in this mapping is the pattern
// defined in "CurrencyUnitPattern" by replacing // defined in "CurrencyUnitPattern" by replacing
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 datefmt.h   datefmt.h 
/* /*
************************************************************************** ****** ************************************************************************** ******
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
************************************************************************** ****** ************************************************************************** ******
* *
* File DATEFMT.H * File DATEFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 04/01/97 aliu Added support for centuries. * 04/01/97 aliu Added support for centuries.
skipping to change at line 678 skipping to change at line 678
private: private:
/** /**
* Gets the date/time formatter with the given formatting styles for th e * Gets the date/time formatter with the given formatting styles for th e
* given locale. * given locale.
* @param dateStyle the given date formatting style. * @param dateStyle the given date formatting style.
* @param timeStyle the given time formatting style. * @param timeStyle the given time formatting style.
* @param inLocale the given locale. * @param inLocale the given locale.
* @return a date/time formatter, or 0 on failure. * @return a date/time formatter, or 0 on failure.
*/ */
static DateFormat* U_EXPORT2 create(EStyle timeStyle, EStyle dateStyle, const Locale&); static DateFormat* U_EXPORT2 create(EStyle timeStyle, EStyle dateStyle, const Locale& inLocale);
public: public:
/** /**
* Field selector for FieldPosition for DateFormat fields. * Field selector for FieldPosition for DateFormat fields.
* @obsolete ICU 3.4 use UDateFormatField instead, since this API will be * @obsolete ICU 3.4 use UDateFormatField instead, since this API will be
* removed in that release * removed in that release
*/ */
enum EField enum EField
{ {
// Obsolete; use UDateFormatField instead // Obsolete; use UDateFormatField instead
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 dcfmtsym.h   dcfmtsym.h 
skipping to change at line 35 skipping to change at line 35
#ifndef DCFMTSYM_H #ifndef DCFMTSYM_H
#define DCFMTSYM_H #define DCFMTSYM_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uchar.h" #include "unicode/uchar.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/uobject.h" #include "unicode/uobject.h"
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unum.h"
/** /**
* \file * \file
* \brief C++ API: Symbols for formatting numbers. * \brief C++ API: Symbols for formatting numbers.
*/ */
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* This class represents the set of symbols needed by DecimalFormat * This class represents the set of symbols needed by DecimalFormat
skipping to change at line 169 skipping to change at line 170
kEightDigitSymbol, kEightDigitSymbol,
/** Nine /** Nine
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
kNineDigitSymbol, kNineDigitSymbol,
/** count symbol constants */ /** count symbol constants */
kFormatSymbolCount kFormatSymbolCount
}; };
/** /**
* Constants for specifying currency spacing
* @draft ICU 4.2
*/
enum ECurrencySpacing {
kCurrencyMatch,
kSurroundingMatch,
kInsert,
kCurrencySpacingCount
};
/**
* Create a DecimalFormatSymbols object for the given locale. * Create a DecimalFormatSymbols object for the given locale.
* *
* @param locale The locale to get symbols for. * @param locale The locale to get symbols for.
* @param status Input/output parameter, set to success or * @param status Input/output parameter, set to success or
* failure code upon return. * failure code upon return.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
DecimalFormatSymbols(const Locale& locale, UErrorCode& status); DecimalFormatSymbols(const Locale& locale, UErrorCode& status);
/** /**
skipping to change at line 281 skipping to change at line 271
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
/** /**
* Get pattern string for 'CurrencySpacing' that can be applied to * Get pattern string for 'CurrencySpacing' that can be applied to
* currency format. * currency format.
* This API gets the CurrencySpacing data from ResourceBundle. The pat tern can * This API gets the CurrencySpacing data from ResourceBundle. The pat tern can
* be empty if there is no data from current locale and its parent loc ales. * be empty if there is no data from current locale and its parent loc ales.
* *
* @param type : kCurrencyMatch, kSurroundingMatch or kInsert. * @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT.
* @param beforeCurrency : true if the pattern is for before currency symbol. * @param beforeCurrency : true if the pattern is for before currency symbol.
* false if the pattern is for after currency symbol. * false if the pattern is for after currency symbol.
* @param status: Input/output parameter, set to success or * @param status: Input/output parameter, set to success or
* failure code upon return. * failure code upon return.
* @return pattern string for currencyMatch, surroundingMatch or space Insert. * @return pattern string for currencyMatch, surroundingMatch or space Insert.
* Return empty string if there is no data for this locale and its parent * Return empty string if there is no data for this locale and its parent
* locales. * locales.
* @draft ICU 4.2 * @draft ICU 4.8
*/ */
const UnicodeString& getPatternForCurrencySpacing(ECurrencySpacing typ e, const UnicodeString& getPatternForCurrencySpacing(UCurrencySpacing typ e,
UBool beforeCurrency, UBool beforeCurrency,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Set pattern string for 'CurrencySpacing' that can be applied to * Set pattern string for 'CurrencySpacing' that can be applied to
* currency format. * currency format.
* *
* @param type : kCurrencyMatch, kSurroundingMatch or kInsert. * @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT.
* @param beforeCurrency : true if the pattern is for before currency symbol. * @param beforeCurrency : true if the pattern is for before currency symbol.
* false if the pattern is for after currency symbol. * false if the pattern is for after currency symbol.
* @param pattern : pattern string to override current setting. * @param pattern : pattern string to override current setting.
* @draft ICU 4.2 * @draft ICU 4.8
*/ */
void setPatternForCurrencySpacing(ECurrencySpacing type, void setPatternForCurrencySpacing(UCurrencySpacing type,
UBool beforeCurrency, UBool beforeCurrency,
const UnicodeString& pattern); const UnicodeString& pattern);
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
skipping to change at line 394 skipping to change at line 384
* @internal * @internal
*/ */
UnicodeString fNoSymbol; UnicodeString fNoSymbol;
Locale locale; Locale locale;
char actualLocale[ULOC_FULLNAME_CAPACITY]; char actualLocale[ULOC_FULLNAME_CAPACITY];
char validLocale[ULOC_FULLNAME_CAPACITY]; char validLocale[ULOC_FULLNAME_CAPACITY];
const UChar* currPattern; const UChar* currPattern;
UnicodeString currencySpcBeforeSym[kCurrencySpacingCount]; UnicodeString currencySpcBeforeSym[UNUM_CURRENCY_SPACING_COUNT];
UnicodeString currencySpcAfterSym[kCurrencySpacingCount]; UnicodeString currencySpcAfterSym[UNUM_CURRENCY_SPACING_COUNT];
}; };
// ------------------------------------- // -------------------------------------
inline UnicodeString inline UnicodeString
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 {
 End of changes. 9 change blocks. 
19 lines changed or deleted 9 lines changed or added


 decimfmt.h   decimfmt.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File DECIMFMT.H * File DECIMFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 03/20/97 clhuang Updated per C++ implementation. * 03/20/97 clhuang Updated per C++ implementation.
skipping to change at line 49 skipping to change at line 49
#include "unicode/stringpiece.h" #include "unicode/stringpiece.h"
union UHashTok; union UHashTok;
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class DigitList; class DigitList;
class ChoiceFormat; class ChoiceFormat;
class CurrencyPluralInfo; class CurrencyPluralInfo;
class Hashtable; class Hashtable;
class UnicodeSet;
class FieldPositionHandler; class FieldPositionHandler;
/** /**
* DecimalFormat is a concrete subclass of NumberFormat that formats decima l * DecimalFormat is a concrete subclass of NumberFormat that formats decima l
* numbers. It has a variety of features designed to make it possible to pa rse * numbers. It has a variety of features designed to make it possible to pa rse
* and format numbers in any locale, including support for Western, Arabic, or * and format numbers in any locale, including support for Western, Arabic, or
* Indic digits. It also supports different flavors of numbers, including * Indic digits. It also supports different flavors of numbers, including
* integers ("123"), fixed-point numbers ("123.4"), scientific notation * integers ("123"), fixed-point numbers ("123.4"), scientific notation
* ("1.23E4"), percentages ("12%"), and currency amounts ("$123", "USD123", * ("1.23E4"), percentages ("12%"), and currency amounts ("$123", "USD123",
* "123 US dollars"). All of these flavors can be easily localized. * "123 US dollars"). All of these flavors can be easily localized.
skipping to change at line 353 skipping to change at line 354
* *
* <p><strong>Parsing</strong> * <p><strong>Parsing</strong>
* *
* <p>DecimalFormat parses all Unicode characters that represent * <p>DecimalFormat parses all Unicode characters that represent
* decimal digits, as defined by u_charDigitValue(). In addition, * decimal digits, as defined by u_charDigitValue(). In addition,
* DecimalFormat also recognizes as digits the ten consecutive * DecimalFormat also recognizes as digits the ten consecutive
* characters starting with the localized zero digit defined in the * characters starting with the localized zero digit defined in the
* DecimalFormatSymbols object. During formatting, the * DecimalFormatSymbols object. During formatting, the
* DecimalFormatSymbols-based digits are output. * DecimalFormatSymbols-based digits are output.
* *
* <p>During parsing, grouping separators are ignored. * <p>During parsing, grouping separators are ignored if in lenient mode;
* otherwise, if present, they must be in appropriate positions.
* *
* <p>For currency parsing, the formatter is able to parse every currency * <p>For currency parsing, the formatter is able to parse every currency
* style formats no matter which style the formatter is constructed with. * style formats no matter which style the formatter is constructed with.
* For example, a formatter instance gotten from * For example, a formatter instance gotten from
* NumberFormat.getInstance(ULocale, NumberFormat.CURRENCYSTYLE) can parse * NumberFormat.getInstance(ULocale, NumberFormat.CURRENCYSTYLE) can parse
* formats such as "USD1.00" and "3.00 US dollars". * formats such as "USD1.00" and "3.00 US dollars".
* *
* <p>If parse(UnicodeString&,Formattable&,ParsePosition&) * <p>If parse(UnicodeString&,Formattable&,ParsePosition&)
* fails to parse a string, it leaves the parse position unchanged. * fails to parse a string, it leaves the parse position unchanged.
* The convenience method parse(UnicodeString&,Formattable&,UErrorCode&) * The convenience method parse(UnicodeString&,Formattable&,UErrorCode&)
skipping to change at line 658 skipping to change at line 660
*/ */
enum ERoundingMode { enum ERoundingMode {
kRoundCeiling, /**< Round towards positive infinity */ kRoundCeiling, /**< Round towards positive infinity */
kRoundFloor, /**< Round towards negative infinity */ kRoundFloor, /**< Round towards negative infinity */
kRoundDown, /**< Round towards zero */ kRoundDown, /**< Round towards zero */
kRoundUp, /**< Round away from zero */ kRoundUp, /**< Round away from zero */
kRoundHalfEven, /**< Round towards the nearest integer, or kRoundHalfEven, /**< Round towards the nearest integer, or
towards the nearest even integer if equidistan t */ towards the nearest even integer if equidistan t */
kRoundHalfDown, /**< Round towards the nearest integer, or kRoundHalfDown, /**< Round towards the nearest integer, or
towards zero if equidistant */ towards zero if equidistant */
kRoundHalfUp /**< Round towards the nearest integer, or kRoundHalfUp, /**< Round towards the nearest integer, or
away from zero if equidistant */ away from zero if equidistant */
// We don't support ROUND_UNNECESSARY /**
* Return U_FORMAT_INEXACT_ERROR if number does not format exactl
y.
* @draft ICU 4.8
*/
kRoundUnnecessary
}; };
/** /**
* Pad position. * Pad position.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
enum EPadPosition { enum EPadPosition {
kPadBeforePrefix, kPadBeforePrefix,
kPadAfterPrefix, kPadAfterPrefix,
kPadBeforeSuffix, kPadBeforeSuffix,
skipping to change at line 735 skipping to change at line 741
DecimalFormatSymbols* symbolsToAdopt, DecimalFormatSymbols* symbolsToAdopt,
UErrorCode& status); UErrorCode& status);
/** /**
* 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, kNumberStyle etc. * @param style style of decimal format
* @param status Output param set to success/failure code. I f the * @param status Output param set to success/failure code. I f the
* pattern is invalid this will be set to a fa ilure code. * pattern is invalid this will be set to a fa ilure code.
* @internal ICU 4.2 * @internal ICU 4.2
*/ */
DecimalFormat( const UnicodeString& pattern, DecimalFormat( const UnicodeString& pattern,
DecimalFormatSymbols* symbolsToAdopt, DecimalFormatSymbols* symbolsToAdopt,
NumberFormat::EStyles style, UNumberFormatStyle style,
UErrorCode& status); UErrorCode& status);
/** /**
* 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
skipping to change at line 1972 skipping to change at line 1978
int32_t pos, int32_t pos,
UBool isNegative, UBool isNegative,
UBool isPrefix, UBool isPrefix,
const UnicodeString* affixPat, const UnicodeString* affixPat,
UBool currencyParsing, UBool currencyParsing,
int8_t type, int8_t type,
UChar* currency) const; UChar* currency) const;
static int32_t compareSimpleAffix(const UnicodeString& affix, static int32_t compareSimpleAffix(const UnicodeString& affix,
const UnicodeString& input, const UnicodeString& input,
int32_t pos); int32_t pos,
UBool lenient);
static int32_t skipRuleWhiteSpace(const UnicodeString& text, int32_t po s); static int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos);
static int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos); static int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos);
int32_t compareComplexAffix(const UnicodeString& affixPat, int32_t compareComplexAffix(const UnicodeString& affixPat,
const UnicodeString& input, const UnicodeString& input,
int32_t pos, int32_t pos,
int8_t type, int8_t type,
UChar* currency) const; UChar* currency) const;
static int32_t match(const UnicodeString& text, int32_t pos, UChar32 ch ); static int32_t match(const UnicodeString& text, int32_t pos, UChar32 ch );
static int32_t match(const UnicodeString& text, int32_t pos, const Unic odeString& str); static int32_t match(const UnicodeString& text, int32_t pos, const Unic odeString& str);
static UBool matchSymbol(const UnicodeString &text, int32_t position, i
nt32_t length, const UnicodeString &symbol,
UnicodeSet *sset, UChar32 schar);
/** /**
* Get a decimal format symbol. * Get a decimal format symbol.
* Returns a const reference to the symbol string. * Returns a const reference to the symbol string.
* @internal * @internal
*/ */
inline const UnicodeString &getConstSymbol(DecimalFormatSymbols::ENumbe rFormatSymbol symbol) const; inline const UnicodeString &getConstSymbol(DecimalFormatSymbols::ENumbe rFormatSymbol symbol) const;
int32_t appendAffix(UnicodeString& buf, int32_t appendAffix(UnicodeString& buf,
double number, double number,
FieldPositionHandler& handler, FieldPositionHandler& handler,
 End of changes. 10 change blocks. 
8 lines changed or deleted 20 lines changed or added


 docmain.h   docmain.h 
/******************************************************************** /********************************************************************
* COPYRIGHT: * COPYRIGHT:
* Copyright (c) 1997-2010, International Business Machines Corporation and * Copyright (c) 1997-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
* *
* FILE NAME: DOCMAIN.h * FILE NAME: DOCMAIN.h
* *
* Date Name Description * Date Name Description
* 12/11/2000 Ram Creation. * 12/11/2000 Ram Creation.
*/ */
/* This file contains documentation for Doxygen and doesnot have /* This file contains documentation for Doxygen and doesnot have
* any significance with respect to C or C++ API * any significance with respect to C or C++ API
skipping to change at line 44 skipping to change at line 44
* then find "ubrk.h" and click on it. You will find descriptions of Define s, * then find "ubrk.h" and click on it. You will find descriptions of Define s,
* Typedefs, Enumerations, and Functions, with detailed descriptions below. * Typedefs, Enumerations, and Functions, with detailed descriptions below.
* If you want to find a specific function, such as ubrk_next(), then click * If you want to find a specific function, such as ubrk_next(), then click
* first on <a href="globals.html"> File Members</a>, then use your browser * first on <a href="globals.html"> File Members</a>, then use your browser
* Find dialog to search for "ubrk_next()".</p> * Find dialog to search for "ubrk_next()".</p>
* *
* *
* <h3>API References for Previous Releases</h3> * <h3>API References for Previous Releases</h3>
* <p>The API References for each release of ICU are also available as * <p>The API References for each release of ICU are also available as
* a zip file from the ICU * a zip file from the ICU
* <a href="http://icu-project.org/download/">download page</a>.</p> * <a href="http://site.icu-project.org/download">download page</a>.</p>
* *
* <hr> * <hr>
* *
* <h2>Architecture (User's Guide)</h2> * <h2>Architecture (User's Guide)</h2>
* <ul> * <ul>
* <li><a href="http://icu-project.org/userguide/">Introduction</a></li> * <li><a href="http://userguide.icu-project.org/">Introduction</a></li>
* <li><a href="http://icu-project.org/userguide/i18n.html">International * <li><a href="http://userguide.icu-project.org/i18n">Internationalizati
ization</a></li> on</a></li>
* <li><a href="http://icu-project.org/userguide/design.html">Locale Mode * <li><a href="http://userguide.icu-project.org/design">Locale Model, Mu
l</a></li> ltithreading, Error Handling, etc.</a></li>
* <li><a href="http://icu-project.org/userguide/design.html">Multithread * <li><a href="http://userguide.icu-project.org/conversion">Conversion</
ing</a></li> a></li>
* <li><a href="http://icu-project.org/userguide/conversion.html">Convers
ion</a></li>
* <li><a href="http://icu-project.org/userguide/design.html">Error Handl
ing</a></li>
* </ul> * </ul>
* *
* <hr> * <hr>
*\htmlonly <h2><a NAME="Module">Module List</a></h2> \endhtmlonly *\htmlonly <h2><a NAME="Module">Module List</a></h2> \endhtmlonly
* <table border="1" cols="3" align="center"> * <table border="1" cols="3" align="center">
* <tr> * <tr>
* <td><strong>Module Name</strong></td> * <td><strong>Module Name</strong></td>
* <td><strong>C</strong></td> * <td><strong>C</strong></td>
* <td><strong>C++</strong></td> * <td><strong>C++</strong></td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Basic Types and Constants</td> * <td>Basic Types and Constants</td>
* <td>utypes.h</td> * <td>utypes.h</td>
* <td>utypes.h</td> * <td>utypes.h</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Strings and Character Iteration</td> * <td>Strings and Character Iteration</td>
* <td>ustring.h, utf.h</td> * <td>ustring.h, utf8.h, utf16.h, UText, UCharIterator</td>
* <td>UnicodeString, CharacterIterator</td> * <td>UnicodeString, CharacterIterator, Appendable, StringPiece, ByteS
ink</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Unicode Character<br>Properties and Names</td> * <td>Unicode Character<br>Properties and Names</td>
* <td>uchar.h</td> * <td>uchar.h, uscript.h</td>
* <td>uchar.h C API</td> * <td>C API</td>
* </tr>
* <tr>
* <td>Sets of Unicode Code Points and Strings</td>
* <td>uset.h</td>
* <td>UnicodeSet</td>
* </tr>
* <tr>
* <td>Maps from Strings to Integer Values</td>
* <td>(no C API)</td>
* <td>BytesTrie, UCharsTrie</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Codepage Conversion</td> * <td>Codepage Conversion</td>
* <td>ucnv.h</td> * <td>ucnv.h, ucnvsel.hb</td>
* <td>ucnv.h C API</td> * <td>C API</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Unicode Text Compression</td> * <td>Unicode Text Compression</td>
* <td>ucnv.h <br> (encoding name "SCSU" or "BOCU-1")</td> * <td>ucnv.h<br>(encoding name "SCSU" or "BOCU-1")</td>
* <td>ucnv.h C API</td> * <td>C API</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Locales </td> * <td>Locales </td>
* <td>uloc.h</a></td> * <td>uloc.h</a></td>
* <td>Locale</td> * <td>Locale</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Resource Bundles</td> * <td>Resource Bundles</td>
* <td>ures.h</td> * <td>ures.h</td>
* <td>ResourceBundle</td> * <td>ResourceBundle</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Normalization</td> * <td>Normalization</td>
* <td>unorm.h</td> * <td>unorm2.h</td>
* <td>Normalizer</td> * <td>Normalizer2</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Calendars</td> * <td>Calendars</td>
* <td>ucal.h</td> * <td>ucal.h</td>
* <td>Calendar</td> * <td>Calendar</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Date and Time Formatting</td> * <td>Date and Time Formatting</td>
* <td>udat.h</td> * <td>udat.h</td>
* <td>DateFormat</td> * <td>DateFormat</td>
skipping to change at line 127 skipping to change at line 135
* <td>Message Formatting</td> * <td>Message Formatting</td>
* <td>umsg.h</td> * <td>umsg.h</td>
* <td>MessageFormat</td> * <td>MessageFormat</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Number Formatting</td> * <td>Number Formatting</td>
* <td>unum.h</td> * <td>unum.h</td>
* <td>NumberFormat</td> * <td>NumberFormat</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Number Spellout <br> (Rule Based Number Formatting)</td> * <td>Number Spellout<br>(Rule Based Number Formatting)</td>
* <td>unum.h <br> (use UNUM_SPELLOUT)</td> * <td>unum.h<br>(use UNUM_SPELLOUT)</td>
* <td>RuleBasedNumberFormat</td> * <td>RuleBasedNumberFormat</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Text Transformation <br> (Transliteration)</td> * <td>Text Transformation<br>(Transliteration)</td>
* <td>utrans.h</td> * <td>utrans.h</td>
* <td>Transliterator</td> * <td>Transliterator</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Bidirectional Algorithm</td> * <td>Bidirectional Algorithm</td>
* <td>ubidi.h</td> * <td>ubidi.h</td>
* <td>ubidi.h C API</td> * <td>C API</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Arabic Shaping</td> * <td>Arabic Shaping</td>
* <td>ushape.h</td> * <td>ushape.h</td>
* <td>ushape.h C API</td> * <td>C API</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Collation</td> * <td>Collation</td>
* <td>ucol.h</td> * <td>ucol.h</td>
* <td>Collator</td> * <td>Collator</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>String Searching</td> * <td>String Searching</td>
* <td>usearch.h</td> * <td>usearch.h</td>
* <td>StringSearch</td> * <td>StringSearch</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Text Boundary Analysis <br> (Break Iteration)</td> * <td>Index Characters/<br>Bucketing for Sorted Lists</td>
* <td>ubrk.h</td> * <td>(no C API)</td>
* <td>BreakIterator</td> * <td>AlphabeticIndex</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Unicode Set</td> * <td>Text Boundary Analysis<br>(Break Iteration)</td>
* <td>uset.h</td> * <td>ubrk.h</td>
* <td>UnicodeSet</td> * <td>BreakIterator</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Regular Expressions</td> * <td>Regular Expressions</td>
* <td>uregex.h</td> * <td>uregex.h</td>
* <td>RegexPattern, RegexMatcher</td> * <td>RegexPattern, RegexMatcher</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>StringPrep</td> * <td>StringPrep</td>
* <td>usprep.h</td> * <td>usprep.h</td>
* <td>usprep.h C API</td> * <td>C API</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>International Domain Names in Applications</td> * <td>International Domain Names in Applications:<br>
* UTS #46 in C/C++, IDNA2003 only via C API</td>
* <td>uidna.h</td> * <td>uidna.h</td>
* <td>uidna.h C API</td> * <td>idna.h</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Identifier Spoofing & Confusability</td> * <td>Identifier Spoofing & Confusability</td>
* <td>uspoof.h</td> * <td>uspoof.h</td>
* <td>uspoof.h C API</td> * <td>C API</td>
* <tr> * <tr>
* <td>Universal Time Scale</td> * <td>Universal Time Scale</td>
* <td>utmscale.h</td> * <td>utmscale.h</td>
* <td>utmscale.h C API</td> * <td>C API</td>
* </tr>
* <tr>
* <td>Basic Layout Engine Types and Constants</td>
* <td>(no C API)</td>
* <td>LETypes.h</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Complex Text Layout</td> * <td>Layout Engine/Complex Text Layout</td>
* <td>(no C API)</td> * <td>loengine.h</td>
* <td>LayoutEngine, ParagraphLayout</td> * <td>LayoutEngine, ParagraphLayout</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>ICU I/O</td> * <td>ICU I/O</td>
* <td>ustdio.h</td> * <td>ustdio.h</td>
* <td>ustream.h</td> * <td>ustream.h</td>
* </tr> * </tr>
* </table> * </table>
* <i>This main page is generated from docmain.h</i> * <i>This main page is generated from docmain.h</i>
*/ */
 End of changes. 20 change blocks. 
46 lines changed or deleted 49 lines changed or added


 dtfmtsym.h   dtfmtsym.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File 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 40 skipping to change at line 40
/** /**
* \file * \file
* \brief C++ API: Symbols for formatting dates. * \brief C++ API: Symbols for formatting dates.
*/ */
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/* forward declaration */ /* forward declaration */
class SimpleDateFormat; class SimpleDateFormat;
class Hashtable; class Hashtable;
class ZoneStringFormat;
class SafeZoneStringFormatPtr;
/** /**
* DateFormatSymbols is a public class for encapsulating localizable date-t ime * DateFormatSymbols is a public class for encapsulating localizable date-t ime
* formatting data -- including timezone data. DateFormatSymbols is used by * formatting data -- including timezone data. DateFormatSymbols is used by
* DateFormat and SimpleDateFormat. * DateFormat and SimpleDateFormat.
* <P> * <P>
* Rather than first creating a DateFormatSymbols to get a date-time format ter * Rather than first creating a DateFormatSymbols to get a date-time format ter
* by using a SimpleDateFormat constructor, clients are encouraged to creat e a * by using a SimpleDateFormat constructor, clients are encouraged to creat e a
* date-time formatter using the getTimeInstance(), getDateInstance(), or * date-time formatter using the getTimeInstance(), getDateInstance(), or
* getDateTimeInstance() method in DateFormat. Each of these methods can re turn a * getDateTimeInstance() method in DateFormat. Each of these methods can re turn a
skipping to change at line 411 skipping to change at line 409
* Gets timezone strings. These strings are stored in a 2-dimensional a rray. * Gets timezone strings. These strings are stored in a 2-dimensional a rray.
* @param rowCount Output param to receive number of rows. * @param rowCount Output param to receive number of rows.
* @param columnCount Output param to receive number of columns. * @param columnCount Output param to receive number of columns.
* @return The timezone strings as a 2-d array. (DateForma tSymbols retains ownership.) * @return The timezone strings as a 2-d array. (DateForma tSymbols retains ownership.)
* @deprecated ICU 3.6 * @deprecated ICU 3.6
*/ */
const UnicodeString** getZoneStrings(int32_t& rowCount, int32_t& column Count) const; const UnicodeString** getZoneStrings(int32_t& rowCount, int32_t& column Count) const;
/** /**
* Sets timezone strings. These strings are stored in a 2-dimensional a rray. * Sets timezone strings. These strings are stored in a 2-dimensional a rray.
* <p><b>Note:</b> SimpleDateFormat no longer use the zone strings stor
ed in
* a DateFormatSymbols. Therefore, the time zone strings set by this mt
hod
* have no effects in an instance of SimpleDateFormat for formatting ti
me
* zones.
* @param strings The timezone strings as a 2-d array to be copie d. (not adopted; caller retains ownership) * @param strings The timezone strings as a 2-d array to be copie d. (not adopted; caller retains ownership)
* @param rowCount The number of rows (count of first index). * @param rowCount The number of rows (count of first index).
* @param columnCount The number of columns (count of second index). * @param columnCount The number of columns (count of second index).
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
void setZoneStrings(const UnicodeString* const* strings, int32_t rowCou nt, int32_t columnCount); void setZoneStrings(const UnicodeString* const* strings, int32_t rowCou nt, int32_t columnCount);
/** /**
* Get the non-localized date-time pattern characters. * Get the non-localized date-time pattern characters.
* @return the non-localized date-time pattern characters * @return the non-localized date-time pattern characters
skipping to change at line 633 skipping to change at line 635
* localized names and its historic changes. Since ICU 3.8.1, localize d * localized names and its historic changes. Since ICU 3.8.1, localize d
* zone names extracted from ICU locale data is stored in a ZoneStringF ormat * zone names extracted from ICU locale data is stored in a ZoneStringF ormat
* instance. But we still need to support the old way of customizing * instance. But we still need to support the old way of customizing
* localized zone names, so we keep this field for the purpose. * localized zone names, so we keep this field for the purpose.
*/ */
UnicodeString **fZoneStrings; // Zone string array set by set ZoneStrings UnicodeString **fZoneStrings; // Zone string array set by set ZoneStrings
UnicodeString **fLocaleZoneStrings; // Zone string array created by the locale UnicodeString **fLocaleZoneStrings; // Zone string array created by the locale
int32_t fZoneStringsRowCount; int32_t fZoneStringsRowCount;
int32_t fZoneStringsColCount; int32_t fZoneStringsColCount;
const ZoneStringFormat *fZoneStringFormat;
ZoneStringFormat *fZSFLocal; // Local ZoneStringFormat i
nstance
SafeZoneStringFormatPtr *fZSFCachePtr; // Cached ZoneStringFormat
Locale fZSFLocale; // Locale used for getting ZoneStringFormat Locale fZSFLocale; // Locale used for getting ZoneStringFormat
/** /**
* String used for localized GMT. For example, "GMT"
*/
UnicodeString fGmtZero;
/**
* Pattern string used for localized time zone GMT format. For example , "GMT{0}" * Pattern string used for localized time zone GMT format. For example , "GMT{0}"
*/ */
UnicodeString fGmtFormat; UnicodeString fGmtFormat;
/** /**
* Pattern strings used for formatting zone offset in a localized time zone GMT string. * Pattern strings used for formatting zone offset in a localized time zone GMT string.
*/ */
UnicodeString *fGmtHourFormats; UnicodeString *fGmtHourFormats;
int32_t fGmtHourFormatsCount; int32_t fGmtHourFormatsCount;
skipping to change at line 680 skipping to change at line 684
/** /**
* Called by the constructors to actually load data from the resources * Called by the constructors to actually load data from the resources
* *
* @param locale The locale to get symbols for. * @param locale The locale to get symbols for.
* @param type Calendar Type (as from Calendar::getType ()) * @param type Calendar Type (as from Calendar::getType ())
* @param status Input/output parameter, set to success o r * @param status Input/output parameter, set to success o r
* failure code upon return. * failure code upon return.
* @param useLastResortData determine if use last resort data * @param useLastResortData determine if use last resort data
*/ */
void initializeData(const Locale&, const char *type, UErrorCode& status , UBool useLastResortData = FALSE); void initializeData(const Locale& locale, const char *type, UErrorCode& status, UBool useLastResortData = FALSE);
/** /**
* Copy or alias an array in another object, as appropriate. * Copy or alias an array in another object, as appropriate.
* *
* @param dstArray the copy destination array. * @param dstArray the copy destination array.
* @param dstCount fill in with the lenth of 'dstArray'. * @param dstCount fill in with the lenth of 'dstArray'.
* @param srcArray the source array to be copied. * @param srcArray the source array to be copied.
* @param srcCount the length of items to be copied from the 'srcArr ay'. * @param srcCount the length of items to be copied from the 'srcArr ay'.
*/ */
static void assignArray(UnicodeString*& dstArray, static void assignArray(UnicodeString*& dstArray,
skipping to change at line 728 skipping to change at line 732
*/ */
void dispose(void); void dispose(void);
/** /**
* Copy all of the other's data to this. * Copy all of the other's data to this.
* @param other the object to be copied. * @param other the object to be copied.
*/ */
void copyData(const DateFormatSymbols& other); void copyData(const DateFormatSymbols& other);
/** /**
* Returns a ZoneStringFormat, used only by SimpleDateFormat for now.
*/
const ZoneStringFormat* getZoneStringFormat(void) const;
/**
* Create a ZoneStringFormat by locale if not yet availble
*/
void initZoneStringFormat(void);
/**
* Create zone strings array by locale if not yet available * Create zone strings array by locale if not yet available
*/ */
void initZoneStringsArray(void); void initZoneStringsArray(void);
/** /**
* Delete just the zone strings. * Delete just the zone strings.
*/ */
void disposeZoneStrings(void); void disposeZoneStrings(void);
}; };
 End of changes. 7 change blocks. 
18 lines changed or deleted 14 lines changed or added


 dtitvfmt.h   dtitvfmt.h 
/************************************************************************** ****** /************************************************************************** ******
* Copyright (C) 2008-2010, International Business Machines Corporation and * Copyright (C) 2008-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* File DTITVFMT.H * File DTITVFMT.H
* *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef __DTITVFMT_H__ #ifndef __DTITVFMT_H__
#define __DTITVFMT_H__ #define __DTITVFMT_H__
skipping to change at line 257 skipping to change at line 257
* For example: * For example:
* DateIntervalFormat::createInstance(UDAT_MONTH_DAY, status) * DateIntervalFormat::createInstance(UDAT_MONTH_DAY, status)
* *
* The given Locale provides the interval patterns. * The given Locale provides the interval patterns.
* For example, for en_GB, if skeleton is UDAT_YEAR_ABBR_MONTH_WEEKDAY_ DAY, * For example, for en_GB, if skeleton is UDAT_YEAR_ABBR_MONTH_WEEKDAY_ DAY,
* which is "yMMMEEEd", * which is "yMMMEEEd",
* the interval patterns defined in resource file to above skeleton are : * the interval patterns defined in resource file to above skeleton are :
* "EEE, d MMM, yyyy - EEE, d MMM, yyyy" for year differs, * "EEE, d MMM, yyyy - EEE, d MMM, yyyy" for year differs,
* "EEE, d MMM - EEE, d MMM, yyyy" for month differs, * "EEE, d MMM - EEE, d MMM, yyyy" for month differs,
* "EEE, d - EEE, d MMM, yyyy" for day differs, * "EEE, d - EEE, d MMM, yyyy" for day differs,
* @param skeleton the skeleton on which interval format based. * @param skeleton the skeleton on which the interval format is based.
* @param locale the given locale * @param locale the given locale
* @param status output param set to success/failure code on exit * @param status output param set to success/failure code on exit
* @return a date time interval formatter which the caller own s. * @return a date time interval formatter which the caller own s.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
static DateIntervalFormat* U_EXPORT2 createInstance( static DateIntervalFormat* U_EXPORT2 createInstance(
const UnicodeString& skeleto n, const UnicodeString& skeleto n,
const Locale& locale, const Locale& locale,
UErrorCode& status); UErrorCode& status);
skipping to change at line 483 skipping to change at line 483
UErrorCode& status); UErrorCode& status);
/** /**
* Gets the date formatter * Gets the date formatter
* @return the date formatter associated with this date interval format ter. * @return the date formatter associated with this date interval format ter.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
const DateFormat* getDateFormat(void) const; const DateFormat* getDateFormat(void) const;
/** /**
* Returns a reference to the TimeZone used by this DateIntervalFormat'
s calendar.
* @return the time zone associated with the calendar of DateIntervalFo
rmat.
* @draft ICU 4.8
*/
virtual const TimeZone& getTimeZone(void) const;
/**
* Sets the time zone for the calendar used by this DateIntervalFormat
object. The
* caller no longer owns the TimeZone object and should not delete it a
fter this call.
* @param zoneToAdopt the TimeZone to be adopted.
* @draft ICU 4.8
*/
virtual void adoptTimeZone(TimeZone* zoneToAdopt);
/**
* Sets the time zone for the calendar used by this DateIntervalFormat
object.
* @param zone the new time zone.
* @draft ICU 4.8
*/
virtual void setTimeZone(const TimeZone& zone);
/**
* Return the class ID for this class. This is useful only for comparin g to * Return the class ID for this class. This is useful only for comparin g to
* a return value from getDynamicClassID(). For example: * a return value from getDynamicClassID(). For example:
* <pre> * <pre>
* . Base* polymorphic_pointer = createPolymorphicObject(); * . Base* polymorphic_pointer = createPolymorphicObject();
* . if (polymorphic_pointer->getDynamicClassID() == * . if (polymorphic_pointer->getDynamicClassID() ==
* . erived::getStaticClassID()) ... * . erived::getStaticClassID()) ...
* </pre> * </pre>
* @return The class ID for all objects of this class. * @return The class ID for all objects of this class.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
skipping to change at line 577 skipping to change at line 599
* full pattern, and date format symbols information. * full pattern, and date format symbols information.
* It should be a SimpleDateFormat object which * It should be a SimpleDateFormat object which
* has a pattern in it. * has a pattern in it.
* the DateIntervalInfo provides the interval patterns. * the DateIntervalInfo provides the interval patterns.
* *
* Note: the DateIntervalFormat takes ownership of both * Note: the DateIntervalFormat takes ownership of both
* DateFormat and DateIntervalInfo objects. * DateFormat and DateIntervalInfo objects.
* Caller should not delete them. * Caller should not delete them.
* *
* @param locale the locale of this date interval formatter. * @param locale the locale of this date interval formatter.
* @param dtitvinf the DateIntervalInfo object to be adopted. * @param dtItvInfo the DateIntervalInfo object to be adopted.
* @param skeleton the skeleton of the date formatter * @param skeleton the skeleton of the date formatter
* @param status output param set to success/failure code on exit * @param status output param set to success/failure code on exit
* @internal ICU 4.0 * @internal ICU 4.0
*/ */
DateIntervalFormat(const Locale& locale, DateIntervalInfo* dtItvInfo, DateIntervalFormat(const Locale& locale, DateIntervalInfo* dtItvInfo,
const UnicodeString* skeleton, UErrorCode& status); const UnicodeString* skeleton, UErrorCode& status);
/** /**
* Construct a DateIntervalFormat from DateFormat * Construct a DateIntervalFormat from DateFormat
* and a DateIntervalInfo. * and a DateIntervalInfo.
skipping to change at line 810 skipping to change at line 832
* 3.4 do not adjust 'd', 'h', or 'm' if h presents * 3.4 do not adjust 'd', 'h', or 'm' if h presents
* 3.5 do not adjust 'M' if it is numeric(?) * 3.5 do not adjust 'M' if it is numeric(?)
* *
* Since date interval format is well-formed format, * Since date interval format is well-formed format,
* date and time skeletons are normalized previously, * date and time skeletons are normalized previously,
* till this stage, the adjust here is only "adjust strings, such as MM M * till this stage, the adjust here is only "adjust strings, such as MM M
* and MMMM, EEE and EEEE. * and MMMM, EEE and EEEE.
* *
* @param inputSkeleton the input skeleton * @param inputSkeleton the input skeleton
* @param bestMatchSkeleton the best match skeleton * @param bestMatchSkeleton the best match skeleton
* @param bestMatchIntervalpattern the best match interval pattern * @param bestMatchIntervalPattern the best match interval pattern
* @param differenceInfo the difference between 2 skeletons * @param differenceInfo the difference between 2 skeletons
* 1 means only field width differs * 1 means only field width differs
* 2 means v/z exchange * 2 means v/z exchange
* @param adjustedIntervalPattern adjusted interval pattern * @param adjustedIntervalPattern adjusted interval pattern
* @internal ICU 4.0 * @internal ICU 4.0
*/ */
static void U_EXPORT2 adjustFieldWidth( static void U_EXPORT2 adjustFieldWidth(
const UnicodeString& inputSkeleton, const UnicodeString& inputSkeleton,
const UnicodeString& bestMatchSkeleton, const UnicodeString& bestMatchSkeleton,
const UnicodeString& bestMatchIntervalPattern, const UnicodeString& bestMatchIntervalPattern,
skipping to change at line 893 skipping to change at line 915
* *
* @param field calendar field * @param field calendar field
* @param firstPart the first part in interval pattern * @param firstPart the first part in interval pattern
* @param secondPart the second part in interval pattern * @param secondPart the second part in interval pattern
* @param laterDateFirst whether the first date in intervalPattern * @param laterDateFirst whether the first date in intervalPattern
* is earlier date or later date * is earlier date or later date
* @internal ICU 4.0 * @internal ICU 4.0
*/ */
void setPatternInfo(UCalendarDateFields field, void setPatternInfo(UCalendarDateFields field,
const UnicodeString* firstPart, const UnicodeString* firstPart,
const UnicodeString* secondpart, const UnicodeString* secondPart,
UBool laterDateFirst); UBool laterDateFirst);
// from calendar field to pattern letter // from calendar field to pattern letter
static const UChar fgCalendarFieldToPatternLetter[]; static const UChar fgCalendarFieldToPatternLetter[];
/** /**
* The interval patterns for this locale. * The interval patterns for this locale.
*/ */
DateIntervalInfo* fInfo; DateIntervalInfo* fInfo;
 End of changes. 6 change blocks. 
5 lines changed or deleted 32 lines changed or added


 gregocal.h   gregocal.h 
/* /*
* Copyright (C) 1997-2009, International Business Machines Corporation and others. * Copyright (C) 1997-2011, 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 475 skipping to change at line 475
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
/** /**
* Get the calendar type, "gregorian", for use in DateFormatSymbols. * Get the calendar type, "gregorian", for use in DateFormatSymbols.
* *
* @return calendar type * @return calendar type
* @internal * @internal
*/ */
virtual const char * getType() const; virtual const char * getType() const;
protected:
/**
* (Overrides Calendar) Converts GMT as milliseconds to time field valu
es.
* @param status Fill-in parameter which receives the status of this op
eration.
* @stable ICU 2.0
*/
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.
* @return the ERA. * @return the ERA.
* @internal * @internal
*/ */
 End of changes. 2 change blocks. 
11 lines changed or deleted 1 lines changed or added


 locdspnm.h   locdspnm.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 2010, International Business Machines Corporation and * * Copyright (C) 2010-2011, International Business Machines Corporation and *
* others. All Rights Reserved. * * others. All Rights Reserved. *
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef LOCDSPNM_H #ifndef LOCDSPNM_H
#define LOCDSPNM_H #define LOCDSPNM_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
skipping to change at line 66 skipping to change at line 66
* @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 dia lectHandling); UDialectHandling dia lectHandling);
// 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 #getInstance}. * 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;
/** /**
* 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
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 locid.h   locid.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1996-2010, International Business Machines * Copyright (C) 1996-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* File locid.h * File locid.h
* *
* Created by: Helena Shih * Created by: Helena Shih
* *
* Modification History: * Modification History:
* *
skipping to change at line 463 skipping to change at line 463
* that keyword does not exist. * that keyword does not exist.
* @param status Returns any error information while performing this op eration. * @param status Returns any error information while performing this op eration.
* *
* @internal * @internal
*/ */
void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status); void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status);
/** /**
* 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 NULL * @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;
/** /**
* Fills in "name" with the locale's three-letter ISO-3166 country code . * Fills in "name" with the locale's three-letter ISO-3166 country code .
* @return An alias to the code, or NULL * @return An alias to the code, or an empty string
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
const char * getISO3Country() const; const char * getISO3Country() const;
/** /**
* Returns the Windows LCID value corresponding to this locale. * Returns the Windows LCID value corresponding to this locale.
* This value is stored in the resource data for the locale as a one-to -four-digit * This value is stored in the resource data for the locale as a one-to -four-digit
* hexadecimal number. If the resource is missing, in the wrong format , or * hexadecimal number. If the resource is missing, in the wrong format , or
* there is no Windows LCID value that corresponds to this locale, retu rns 0. * there is no Windows LCID value that corresponds to this locale, retu rns 0.
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 695 skipping to change at line 695
* @internal * @internal
*/ */
void setFromPOSIXID(const char *posixID); void setFromPOSIXID(const char *posixID);
private: private:
/** /**
* Initialize the locale object with a new name. * Initialize the locale object with a new name.
* Was deprecated - used in implementation - moved internal * Was deprecated - used in implementation - moved internal
* *
* @param cLocaleID The new locale name. * @param cLocaleID The new locale name.
* @param canonicalize whether to call uloc_canonicalize on cLocaleID
*/ */
Locale& init(const char* cLocaleID, UBool canonicalize); Locale& init(const char* cLocaleID, UBool canonicalize);
/* /*
* Internal constructor to allow construction of a locale object with * Internal constructor to allow construction of a locale object with
* NO side effects. (Default constructor tries to get * NO side effects. (Default constructor tries to get
* the default locale.) * the default locale.)
*/ */
enum ELocaleType { enum ELocaleType {
eBOGUS eBOGUS
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added


 msgfmt.h   msgfmt.h 
/* /*
* Copyright (C) 2007-2010, International Business Machines Corporation and * Copyright (C) 2007-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File MSGFMT.H * File MSGFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/19/97 aliu Converted from java. * 02/19/97 aliu Converted from java.
* 03/20/97 helena Finished first cut of implementation. * 03/20/97 helena Finished first cut of implementation.
skipping to change at line 31 skipping to change at line 31
/** /**
* \file * \file
* \brief C++ API: Formats messages in a language-neutral way. * \brief C++ API: Formats messages in a language-neutral way.
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/messagepattern.h"
#include "unicode/parseerr.h" #include "unicode/parseerr.h"
#include "unicode/uchar.h" #include "unicode/plurfmt.h"
#include "unicode/plurrule.h"
U_CDECL_BEGIN
// Forward declaration.
struct UHashtable;
typedef struct UHashtable UHashtable;
U_CDECL_END
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class NumberFormat; class AppendableWrapper;
class DateFormat; class DateFormat;
class NumberFormat;
/** /**
* <p>MessageFormat prepares strings for display to users,
* with optional arguments (variables/placeholders).
* The arguments can occur in any order, which is necessary for translation
* into languages with different grammars.
* *
* MessageFormat produces concatenated messages in a language-neutral * <p>A MessageFormat is constructed from a <em>pattern</em> string
* way. Use this whenever concatenating strings that are displayed to * with arguments in {curly braces} which will be replaced by formatted val
* end users. ues.
* *
* <P>A MessageFormat contains an array of <EM>subformats</EM> arranged * <p><code>MessageFormat</code> differs from the other <code>Format</code>
* within a <EM>template string</EM>. Together, the subformats and * classes in that you create a <code>MessageFormat</code> object with one
* template string determine how the MessageFormat will operate during * of its constructors (not with a <code>createInstance</code> style factor
* formatting and parsing. y
* method). Factory methods aren't necessary because <code>MessageFormat</c
ode>
* itself doesn't implement locale-specific behavior. Any locale-specific
* behavior is defined by the pattern that you provide and the
* subformats used for inserted arguments.
* *
* <P>Typically, both the subformats and the template string are * <p>Arguments can be named (using identifiers) or numbered (using small A
* specified at once in a <EM>pattern</EM>. By using different SCII-digit integers).
* patterns for different locales, messages may be localized. * Some of the API methods work only with argument numbers and throw an exc
eption
* if the pattern has named arguments (see {@link #usesNamedArguments()}).
* *
* <P>When formatting, MessageFormat takes an array of arguments * <p>An argument might not specify any format type. In this case,
* and produces a user-readable string. Each argument is a * a Number value is formatted with a default (for the locale) NumberFormat
* Formattable object; they may be passed in in an array, or as a ,
* single Formattable object which itself contains an array. Each * a Date value is formatted with a default (for the locale) DateFormat,
* argument is matched up with its corresponding subformat, which then * and for any other value its toString() value is used.
* formats it into a string. The resulting strings are then assembled
* within the string template of the MessageFormat to produce the
* final output string.
* *
* <p><strong>Note:</strong> * <p>An argument might specify a "simple" type for which the specified
* In ICU 4.0 MessageFormat supports named arguments. If a named argument * Format object is created, cached and used.
* is used, all arguments must be named. Names start with a character in
* <code>UCHAR_ID_START</code> and continue with characters in
* <code>UCHARID_CONTINUE</code>, in particular they do not start with a di
git.
* If named arguments are used, {@link #usesNamedArguments()} will return t
rue.
* *
* <p>The other new methods supporting named arguments are * <p>An argument might have a "complex" type with nested MessageFormat sub
* {@link #getFormatNames(UErrorCode& status)}, -patterns.
* {@link #getFormat(const UnicodeString& formatName, UErrorCode& status)} * During formatting, one of these sub-messages is selected according to th
* {@link #setFormat(const UnicodeString& formatName, const Format& format, e argument value
UErrorCode& status)}, * and recursively formatted.
* {@link #adoptFormat(const UnicodeString& formatName, Format* formatToAdo
pt, UErrorCode& status)},
* {@link #format(const UnicodeString* argumentNames, const Formattable* ar
guments,
* int32_t count, UnicodeString& appendTo,UErrorCode& status)}.
* These methods are all compatible with patterns that do not used named ar
guments--
* in these cases the keys in the input or output use <code>UnicodeString</
code>s
* that name the argument indices, e.g. "0", "1", "2"... etc.
* *
* <p>If this format uses named arguments, certain methods that take or * <p>After construction, a custom Format object can be set for
* return arrays do not perform any action, since it is not possible to * a top-level argument, overriding the default formatting and parsing beha
* identify positions in an array using a name. Of these methods, vior
* UErrorCode is set to U_ILLEGAL_ARGUMENT_ERROR by format, and to * for that argument.
* U_ARGUMENT_TYPE_MISMATCH by parse. * However, custom formatting can be achieved more simply by writing
* These methods are * a typeless argument in the pattern string
* {@link #adoptFormats(Format** formatsToAdopt, int32_t count)}, * and supplying it with a preformatted string value.
* {@link #setFormats(const Format** newFormats,int32_t count)},
* {@link #adoptFormat(int32_t n, Format *newFormat)},
* {@link #setFormat(int32_t n, Format& newFormat)},
* {@link #format(const Formattable* source, int32_t count, UnicodeString&
appendTo, FieldPosition& ignore, UErrorCode& success)},
* {@link #format(const UnicodeString& pattern,const Formattable* arguments
,int32_t cnt,UnicodeString& appendTo,UErrorCode& success)},
* {@link #format(const Formattable& source, UnicodeString& appendTo, Field
Position& ignore, UErrorCode& success)},
* {@link #format(const Formattable* arguments, int32_t cnt, UnicodeString&
appendTo, FieldPosition& status, int32_t recursionProtection,UErrorCode& s
uccess)},
* {@link #parse(const UnicodeString& source, ParsePosition& pos, int32_t&
count)},
* {@link #parse(const UnicodeString& source, int32_t& cnt, UErrorCode& sta
tus)}
* *
* <P> * <p>When formatting, MessageFormat takes a collection of argument values
* During parsing, an input string is matched against the string * and writes an output string.
* template of the MessageFormat to produce an array of Formattable * The argument values may be passed as an array
* objects. Plain text of the template string is matched directly * (when the pattern contains only numbered arguments)
* against input text. At each position in the template string where * or as an array of names and and an array of arguments (which works for b
* a subformat is located, the subformat is called to parse the oth named
* corresponding segment of input text to produce an output argument. * and numbered arguments).
* In this way, an array of arguments is created which together *
* constitute the parse result. * <p>Each argument is matched with one of the input values by array index
* <P> or argument name
* Parsing may fail or produce unexpected results in a number of * and formatted according to its pattern specification
* circumstances. * (or using a custom Format object if one was set).
* <UL> * A numbered pattern argument is matched with an argument name that contai
* <LI>If one of the arguments does not occur in the pattern, it ns that number
* will be returned as a default Formattable. * as an ASCII-decimal-digit string (without leading zero).
* <LI>If the format of an argument loses information, such as with *
* a choice format where a large number formats to "many", then the * <h4><a name="patterns">Patterns and Their Interpretation</a></h4>
* parse may not correspond to the originally formatted argument. *
* <LI>MessageFormat does not handle ChoiceFormat recursion during * <code>MessageFormat</code> uses patterns of the following form:
* parsing; such parses will fail. * <pre>
* <LI>Parsing will not always find a match (or the correct match) if * message = messageText (argument messageText)*
* some part of the parse is ambiguous. For example, if the pattern * argument = noneArg | simpleArg | complexArg
* "{1},{2}" is used with the string arguments {"a,b", "c"}, it will * complexArg = choiceArg | pluralArg | selectArg
* format as "a,b,c". When the result is parsed, it will return {"a", *
* "b,c"}. * noneArg = '{' argNameOrNumber '}'
* <LI>If a single argument is formatted more than once in the string, * simpleArg = '{' argNameOrNumber ',' argType [',' argStyle] '}'
* then the rightmost subformat in the pattern string will produce the * choiceArg = '{' argNameOrNumber ',' "choice" ',' choiceStyle '}'
* parse result; prior subformats with the same argument index will * pluralArg = '{' argNameOrNumber ',' "plural" ',' pluralStyle '}'
* have no effect. * selectArg = '{' argNameOrNumber ',' "select" ',' selectStyle '}'
* </UL> *
* Here are some examples of usage: * choiceStyle: see {@link ChoiceFormat}
* <P> * pluralStyle: see {@link PluralFormat}
* selectStyle: see {@link SelectFormat}
*
* argNameOrNumber = argName | argNumber
* argName = [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+
* argNumber = '0' | ('1'..'9' ('0'..'9')*)
*
* argType = "number" | "date" | "time" | "spellout" | "ordinal" | "duratio
n"
* argStyle = "short" | "medium" | "long" | "full" | "integer" | "currency"
| "percent" | argStyleText
* </pre>
*
* <ul>
* <li>messageText can contain quoted literal strings including syntax ch
aracters.
* A quoted literal string begins with an ASCII apostrophe and a synt
ax character
* (usually a {curly brace}) and continues until the next single apos
trophe.
* A double ASCII apostrohpe inside or outside of a quoted string rep
resents
* one literal apostrophe.
* <li>Quotable syntax characters are the {curly braces} in all messageTe
xt parts,
* plus the '#' sign in a messageText immediately inside a pluralStyl
e,
* and the '|' symbol in a messageText immediately inside a choiceSty
le.
* <li>See also {@link #UMessagePatternApostropheMode}
* <li>In argStyleText, every single ASCII apostrophe begins and ends quo
ted literal text,
* and unquoted {curly braces} must occur in matched pairs.
* </ul>
*
* <p>Recommendation: Use the real apostrophe (single quote) character
* \htmlonly&#x2019;\endhtmlonly (U+2019) for
* human-readable text, and use the ASCII apostrophe ' (U+0027)
* only in program syntax, like quoting in MessageFormat.
* See the annotations for U+0027 Apostrophe in The Unicode Standard.
*
* <p>The <code>argType</code> and <code>argStyle</code> values are used to
create
* a <code>Format</code> instance for the format element. The following
* table shows how the values map to Format instances. Combinations not
* shown in the table are illegal. Any <code>argStyleText</code> must
* be a valid pattern string for the Format subclass used.
*
* <p><table border=1>
* <tr>
* <th>argType
* <th>argStyle
* <th>resulting Format object
* <tr>
* <td colspan=2><i>(none)</i>
* <td><code>null</code>
* <tr>
* <td rowspan=5><code>number</code>
* <td><i>(none)</i>
* <td><code>NumberFormat.createInstance(getLocale(), status)</code>
* <tr>
* <td><code>integer</code>
* <td><code>NumberFormat.createInstance(getLocale(), kNumberStyle, s
tatus)</code>
* <tr>
* <td><code>currency</code>
* <td><code>NumberFormat.createCurrencyInstance(getLocale(), status)
</code>
* <tr>
* <td><code>percent</code>
* <td><code>NumberFormat.createPercentInstance(getLocale(), status)<
/code>
* <tr>
* <td><i>argStyleText</i>
* <td><code>new DecimalFormat(argStyleText, new DecimalFormatSymbols
(getLocale(), status), status)</code>
* <tr>
* <td rowspan=6><code>date</code>
* <td><i>(none)</i>
* <td><code>DateFormat.createDateInstance(kDefault, getLocale(), sta
tus)</code>
* <tr>
* <td><code>short</code>
* <td><code>DateFormat.createDateInstance(kShort, getLocale(), statu
s)</code>
* <tr>
* <td><code>medium</code>
* <td><code>DateFormat.createDateInstance(kDefault, getLocale(), sta
tus)</code>
* <tr>
* <td><code>long</code>
* <td><code>DateFormat.createDateInstance(kLong, getLocale(), status
)</code>
* <tr>
* <td><code>full</code>
* <td><code>DateFormat.createDateInstance(kFull, getLocale(), status
)</code>
* <tr>
* <td><i>argStyleText</i>
* <td><code>new SimpleDateFormat(argStyleText, getLocale(), status)
* <tr>
* <td rowspan=6><code>time</code>
* <td><i>(none)</i>
* <td><code>DateFormat.createTimeInstance(kDefault, getLocale(), sta
tus)</code>
* <tr>
* <td><code>short</code>
* <td><code>DateFormat.createTimeInstance(kShort, getLocale(), statu
s)</code>
* <tr>
* <td><code>medium</code>
* <td><code>DateFormat.createTimeInstance(kDefault, getLocale(), sta
tus)</code>
* <tr>
* <td><code>long</code>
* <td><code>DateFormat.createTimeInstance(kLong, getLocale(), status
)</code>
* <tr>
* <td><code>full</code>
* <td><code>DateFormat.createTimeInstance(kFull, getLocale(), status
)</code>
* <tr>
* <td><i>argStyleText</i>
* <td><code>new SimpleDateFormat(argStyleText, getLocale(), status)
* <tr>
* <td><code>spellout</code>
* <td><i>argStyleText (optional)</i>
* <td><code>new RuleBasedNumberFormat(URBNF_SPELLOUT, getLocale(), s
tatus)
* <br/>&nbsp;&nbsp;&nbsp;&nbsp;.setDefaultRuleset(argStyleText,
status);</code>
* <tr>
* <td><code>ordinal</code>
* <td><i>argStyleText (optional)</i>
* <td><code>new RuleBasedNumberFormat(URBNF_ORDINAL, getLocale(), st
atus)
* <br/>&nbsp;&nbsp;&nbsp;&nbsp;.setDefaultRuleset(argStyleText,
status);</code>
* <tr>
* <td><code>duration</code>
* <td><i>argStyleText (optional)</i>
* <td><code>new RuleBasedNumberFormat(URBNF_DURATION, getLocale(), s
tatus)
* <br/>&nbsp;&nbsp;&nbsp;&nbsp;.setDefaultRuleset(argStyleText,
status);</code>
* </table>
* <p>
*
* <h4>Usage Information</h4>
*
* <p>Here are some examples of usage:
* Example 1: * Example 1:
*
* <pre> * <pre>
* \code * \code
* UErrorCode success = U_ZERO_ERROR; * UErrorCode success = U_ZERO_ERROR;
* GregorianCalendar cal(success); * GregorianCalendar cal(success);
* Formattable arguments[] = { * Formattable arguments[] = {
* 7L, * 7L,
* Formattable( (Date) cal.getTime(success), Formattable::kIsDate), * Formattable( (Date) cal.getTime(success), Formattable::kIsDate),
* "a disturbance in the Force" * "a disturbance in the Force"
* }; * };
* *
* UnicodeString result; * UnicodeString result;
* MessageFormat::format( * MessageFormat::format(
* "At {1,time} on {1,date}, there was {2} on planet {0,number}.", * "At {1,time} on {1,date}, there was {2} on planet {0,number}.",
* arguments, 3, result, success ); * arguments, 3, result, success );
* *
* cout << "result: " << result << endl; * cout << "result: " << result << endl;
* //<output>: At 4:34:20 PM on 23-Mar-98, there was a disturbance * //<output>: At 4:34:20 PM on 23-Mar-98, there was a disturbance
* // in the Force on planet 7. * // in the Force on planet 7.
* \endcode * \endcode
* </pre> * </pre>
*
* Typically, the message format will come from resources, and the * Typically, the message format will come from resources, and the
* arguments will be dynamically set at runtime. * arguments will be dynamically set at runtime.
* <P> *
* Example 2: * <p>Example 2:
*
* <pre> * <pre>
* \code * \code
* success = U_ZERO_ERROR; * success = U_ZERO_ERROR;
* Formattable testArgs[] = {3L, "MyDisk"}; * Formattable testArgs[] = {3L, "MyDisk"};
* *
* MessageFormat form( * MessageFormat form(
* "The disk \"{1}\" contains {0} file(s).", success ); * "The disk \"{1}\" contains {0} file(s).", success );
* *
* UnicodeString string; * UnicodeString string;
* FieldPosition fpos = 0; * FieldPosition fpos = 0;
* cout << "format: " << form.format(testArgs, 2, string, fpos, success ) << endl; * cout << "format: " << form.format(testArgs, 2, string, fpos, success ) << endl;
* *
* // output, with different testArgs: * // output, with different testArgs:
* // output: The disk "MyDisk" contains 0 file(s). * // output: The disk "MyDisk" contains 0 file(s).
* // output: The disk "MyDisk" contains 1 file(s). * // output: The disk "MyDisk" contains 1 file(s).
* // output: The disk "MyDisk" contains 1,273 file(s). * // output: The disk "MyDisk" contains 1,273 file(s).
* \endcode * \endcode
* </pre> * </pre>
* *
* The pattern is of the following form. Legend:
* <pre>
* \code
* {optional item}
* (group that may be repeated)*
* \endcode
* </pre>
* Do not confuse optional items with items inside quoted braces, such
* as this: "{". Quoted braces are literals.
* <pre>
* \code
* messageFormatPattern := string ( "{" messageFormatElement "}" stri
ng )*
*
* messageFormatElement := argumentIndex | argumentName { "," element
Format }
*
* elementFormat := "time" { "," datetimeStyle }
* | "date" { "," datetimeStyle }
* | "number" { "," numberStyle }
* | "choice" "," choiceStyle
* | "spellout" { "," spelloutStyle }
* | "ordinal" { "," spelloutStyle }
* | "duration" { "," spelloutStyle }
* | "plural" "," pluralStyle
* | "select" "," selectStyle
*
* datetimeStyle := "short"
* | "medium"
* | "long"
* | "full"
* | dateFormatPattern
*
* numberStyle := "currency"
* | "percent"
* | "integer"
* | numberFormatPattern
*
* choiceStyle := choiceFormatPattern
* *
* pluralStyle := pluralFormatPattern * <p>For messages that include plural forms, you can use a plural argument
* :
* selectStyle := selectFormatPattern
*
* spelloutStyle := ruleSetName
* \endcode
* </pre>
* If there is no elementFormat, then the argument must be a string,
* which is substituted. If there is no dateTimeStyle or numberStyle,
* then the default format is used (e.g. NumberFormat::createInstance(),
* DateFormat::createTimeInstance(DateFormat::kDefault, ...) or
* DateFormat::createDateInstance(DateFormat::kDefault, ...). For
* a RuleBasedNumberFormat, if there is no ruleSetName, the default
* rule set is used. For a ChoiceFormat or PluralFormat or SelectFormat, th
e pattern
* must always be specified, since there is no default.
* <P>
* In strings, single quotes can be used to quote syntax characters.
* A literal single quote is represented by '', both within and outside
* of single-quoted segments. Inside a
* messageFormatElement, quotes are <EM>not</EM> removed. For example,
* {1,number,$'#',##} will produce a number format with the pound-sign
* quoted, with a result such as: "$#31,45".
* <P>
* If a pattern is used, then unquoted braces in the pattern, if any,
* must match: that is, "ab {0} de" and "ab '}' de" are ok, but "ab
* {0'}' de" and "ab } de" are not.
* <p>
* <dl><dt><b>Warning:</b><dd>The rules for using quotes within message
* format patterns unfortunately have shown to be somewhat confusing.
* In particular, it isn't always obvious to localizers whether single
* quotes need to be doubled or not. Make sure to inform localizers about
* the rules, and tell them (for example, by using comments in resource
* bundle source files) which strings will be processed by MessageFormat.
* Note that localizers may need to use single quotes in translated
* strings where the original version doesn't have them.
* <br>Note also that the simplest way to avoid the problem is to
* use the real apostrophe (single quote) character U+2019 (') for
* human-readable text, and to use the ASCII apostrophe (U+0027 ' )
* only in program syntax, like quoting in MessageFormat.
* See the annotations for U+0027 Apostrophe in The Unicode Standard.</p>
* </dl>
* <P>
* The argumentIndex is a non-negative integer, which corresponds to the
* index of the arguments presented in an array to be formatted. The
* first argument has argumentIndex 0.
* <P>
* It is acceptable to have unused arguments in the array. With missing
* arguments, or arguments that are not of the right class for the
* specified format, a failing UErrorCode result is set.
* <P>
* <strong>Creating internationalized messages that include plural forms, y
ou
* can use a PluralFormat:</strong>
* <pre> * <pre>
* \code * \code
* UErrorCode err = U_ZERO_ERROR; * success = U_ZERO_ERROR;
* UnicodeString t1("{0, plural, one{C''est # fichier} other{Ce sont # fic * MessageFormat msgFmt(
hiers}} dans la liste."); * "{num_files, plural, "
* MessageFormat* msgFmt = new MessageFormat(t1, Locale("fr"), err); * "=0{There are no files on disk \"{disk_name}\".}"
* if (U_FAILURE(err)) { * "=1{There is one file on disk \"{disk_name}\".}"
* return err; * "other{There are # files on disk \"{disk_name}\".}}",
* } * Locale("en"),
* * success);
* Formattable args1[] = {(int32_t)0}; * FieldPosition fpos = 0;
* Formattable args2[] = {(int32_t)3}; * Formattable testArgs[] = {0L, "MyDisk"};
* FieldPosition ignore(FieldPosition::DONT_CARE); * UnicodeString testArgsNames[] = {"num_files", "disk_name"};
* UnicodeString result; * UnicodeString result;
* msgFmt->format(args1, 1, result, ignore, status); * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, succ
* cout << result << endl; ess);
* result.remove(); * testArgs[0] = 3L;
* msgFmt->format(args2, 1, result, ignore, status); * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, succ
* cout << result << endl; ess);
*
* // output, with different args
* // output: C'est 0,0 fichier dans la liste.
* // output: Ce sont 3 fichiers dans la liste."
* \endcode * \endcode
* <em>output</em>:
* There are no files on disk "MyDisk".
* There are 3 files on "MyDisk".
* </pre> * </pre>
* Please check PluralFormat and PluralRules for details. * See {@link PluralFormat} and {@link PluralRules} for details.
* </P> *
* <h4><a name="synchronization">Synchronization</a></h4>
*
* <p>MessageFormats are not synchronized.
* It is recommended to create separate format instances for each thread.
* If multiple threads access a format concurrently, it must be synchronize
d
* externally.
*
* @stable ICU 2.0
*/ */
class U_I18N_API MessageFormat : public Format { class U_I18N_API MessageFormat : public Format {
public: public:
/** /**
* Enum type for kMaxFormat. * Enum type for kMaxFormat.
* @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6, * @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6,
* rendering this enum type obsolete. * rendering this enum type obsolete.
*/ */
enum EFormatNumber { enum EFormatNumber {
/** /**
skipping to change at line 334 skipping to change at line 361
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
MessageFormat(const UnicodeString& pattern, MessageFormat(const UnicodeString& pattern,
const Locale& newLocale, const Locale& newLocale,
UErrorCode& status); UErrorCode& status);
/** /**
* Constructs a new MessageFormat using the given pattern and locale. * Constructs a new MessageFormat using the given pattern and locale.
* @param pattern Pattern used to construct object. * @param pattern Pattern used to construct object.
* @param newLocale The locale to use for formatting dates and numbers. * @param newLocale The locale to use for formatting dates and numbers.
* @param parseError Struct to recieve information on position * @param parseError Struct to receive information on the position
* of error within the pattern. * of an error within the pattern.
* @param status Input/output error code. If the * @param status Input/output error code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
MessageFormat(const UnicodeString& pattern, MessageFormat(const UnicodeString& pattern,
const Locale& newLocale, const Locale& newLocale,
UParseError& parseError, UParseError& parseError,
UErrorCode& status); UErrorCode& status);
/** /**
* Constructs a new MessageFormat from an existing one. * Constructs a new MessageFormat from an existing one.
skipping to change at line 379 skipping to change at line 406
/** /**
* Returns true if the given Format objects are semantically equal. * Returns true if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal. * Objects of different subclasses are considered unequal.
* @param other the object to be compared with. * @param other the object to be compared with.
* @return true if the given Format objects are semantically equa l. * @return true if the given Format objects are semantically equa l.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UBool operator==(const Format& other) const; virtual UBool operator==(const Format& other) const;
/** /**
* Sets the locale. This locale is used for fetching default number or * Sets the locale to be used for creating argument Format objects.
date
* format information.
* @param theLocale the new locale value to be set. * @param theLocale the new locale value to be set.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void setLocale(const Locale& theLocale); virtual void setLocale(const Locale& theLocale);
/** /**
* Gets the locale. This locale is used for fetching default number or date * Gets the locale used for creating argument Format objects.
* format information. * format information.
* @return the locale of the object. * @return the locale of the object.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual const Locale& getLocale(void) const; virtual const Locale& getLocale(void) const;
/** /**
* Applies the given pattern string to this message format. * Applies the given pattern string to this message format.
* *
* @param pattern The pattern to be applied. * @param pattern The pattern to be applied.
* @param status Input/output error code. If the * @param status Input/output error code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void applyPattern(const UnicodeString& pattern, virtual void applyPattern(const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
/** /**
* Applies the given pattern string to this message format. * Applies the given pattern string to this message format.
* *
* @param pattern The pattern to be applied. * @param pattern The pattern to be applied.
* @param parseError Struct to recieve information on position * @param parseError Struct to receive information on the position
* of error within pattern. * of an error within the pattern.
* @param status Input/output error code. If the * @param status Input/output error code. If the
* pattern cannot be parsed, set to failure code. * pattern cannot be parsed, set to failure code.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void applyPattern(const UnicodeString& pattern, virtual void applyPattern(const UnicodeString& pattern,
UParseError& parseError, UParseError& parseError,
UErrorCode& status); UErrorCode& status);
/** /**
* Sets the UMessagePatternApostropheMode and the pattern used by this
message format.
* Parses the pattern and caches Format objects for simple argument typ
es.
* Patterns and their interpretation are specified in the
* <a href="#patterns">class description</a>.
* <p>
* This method is best used only once on a given object to avoid confus
ion about the mode,
* and after constructing the object with an empty pattern string to mi
nimize overhead.
*
* @param pattern The pattern to be applied.
* @param aposMode The new apostrophe mode.
* @param parseError Struct to receive information on the position
* of an error within the pattern.
* Can be NULL.
* @param status Input/output error code. If the
* pattern cannot be parsed, set to failure code.
* @draft ICU 4.8
*/
virtual void applyPattern(const UnicodeString& pattern,
UMessagePatternApostropheMode aposMode,
UParseError* parseError,
UErrorCode& status);
/**
* @return this instance's UMessagePatternApostropheMode.
* @draft ICU 4.8
*/
UMessagePatternApostropheMode getApostropheMode() const {
return msgPattern.getApostropheMode();
}
/**
* Returns a pattern that can be used to recreate this object. * Returns a pattern that can be used to recreate this object.
* *
* @param appendTo Output parameter to receive the pattern. * @param appendTo Output parameter to receive the pattern.
* Result is appended to existing contents. * Result is appended to existing contents.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UnicodeString& toPattern(UnicodeString& appendTo) const; virtual UnicodeString& toPattern(UnicodeString& appendTo) const;
/** /**
skipping to change at line 492 skipping to change at line 549
* the item will be ignored. * the item will be ignored.
* @param formatNumber index of the subformat. * @param formatNumber index of the subformat.
* @param format the format to be set. * @param format the format to be set.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void setFormat(int32_t formatNumber, const Format& format); virtual void setFormat(int32_t formatNumber, const Format& format);
/** /**
* Gets format names. This function returns formatNames in StringEnumer ations * Gets format names. This function returns formatNames in StringEnumer ations
* which can be used with getFormat() and setFormat() to export formatt able * which can be used with getFormat() and setFormat() to export formatt able
* array from current MessageFormat to another. It is caller's resposi bility * array from current MessageFormat to another. It is the caller's res ponsibility
* to delete the returned formatNames. * to delete the returned formatNames.
* @param status output param set to success/failure code. * @param status output param set to success/failure code.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual StringEnumeration* getFormatNames(UErrorCode& status); virtual StringEnumeration* getFormatNames(UErrorCode& status);
/** /**
* Gets subformat pointer for given format name. * Gets subformat pointer for given format name.
* This function supports both named and numbered * This function supports both named and numbered
* arguments-- if numbered, the formatName is the * arguments. If numbered, the formatName is the
* corresponding UnicodeStrings (e.g. "0", "1", "2"...). * corresponding UnicodeStrings (e.g. "0", "1", "2"...).
* The returned Format object should not be deleted by the caller, * The returned Format object should not be deleted by the caller,
* nor should the ponter of other object . The pointer and its * nor should the ponter of other object . The pointer and its
* contents remain valid only until the next call to any method * contents remain valid only until the next call to any method
* of this class is made with this object. * of this class is made with this object.
* @param formatName the name or number specifying a format * @param formatName the name or number specifying a format
* @param status output param set to success/failure code. * @param status output param set to success/failure code.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual Format* getFormat(const UnicodeString& formatName, UErrorCode& status); virtual Format* getFormat(const UnicodeString& formatName, UErrorCode& status);
skipping to change at line 794 skipping to change at line 851
* <pre> * <pre>
* . Base* polymorphic_pointer = createPolymorphicObject(); * . Base* polymorphic_pointer = createPolymorphicObject();
* . if (polymorphic_pointer->getDynamicClassID() == * . if (polymorphic_pointer->getDynamicClassID() ==
* . Derived::getStaticClassID()) ... * . Derived::getStaticClassID()) ...
* </pre> * </pre>
* @return The class ID for all objects of this class. * @return The class ID for all objects of this class.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
/**
* Compares two Format objects. This is used for constructing the hash
* tables.
*
* @param left pointer to a Format object. Must not be NULL.
* @param right pointer to a Format object. Must not be NULL.
*
* @return whether the two objects are the same
* @internal
*/
static UBool equalFormats(const void* left, const void* right);
private: private:
Locale fLocale; Locale fLocale;
UnicodeString fPattern; MessagePattern msgPattern;
Format** formatAliases; // see getFormats Format** formatAliases; // see getFormats
int32_t formatAliasesCapacity; int32_t formatAliasesCapacity;
UProperty idStart;
UProperty idContinue;
MessageFormat(); // default constructor not implemented MessageFormat(); // default constructor not implemented
/* /**
* A structure representing one subformat of this MessageFormat. * This provider helps defer instantiation of a PluralRules object
* Each subformat has a Format object, an offset into the plain * until we actually need to select a keyword.
* pattern text fPattern, and an argument number. The argument * For example, if the number matches an explicit-value selector like
* number corresponds to the array of arguments to be formatted. "=1"
* @internal * we do not need any PluralRules.
*/ */
class Subformat; class U_I18N_API PluralSelectorProvider : public PluralFormat::PluralSe
lector {
public:
PluralSelectorProvider(const Locale* loc);
virtual ~PluralSelectorProvider();
virtual UnicodeString select(double number, UErrorCode& ec) const;
/** void reset(const Locale* loc);
* A MessageFormat contains an array of subformats. This array private:
* needs to grow dynamically if the MessageFormat is modified. const Locale* locale;
*/ PluralRules* rules;
Subformat* subformats; };
int32_t subformatCount;
int32_t subformatCapacity;
/** /**
* A MessageFormat formats an array of arguments. Each argument * A MessageFormat formats an array of arguments. Each argument
* has an expected type, based on the pattern. For example, if * has an expected type, based on the pattern. For example, if
* the pattern contains the subformat "{3,number,integer}", then * the pattern contains the subformat "{3,number,integer}", then
* we expect argument 3 to have type Formattable::kLong. This * we expect argument 3 to have type Formattable::kLong. This
* array needs to grow dynamically if the MessageFormat is * array needs to grow dynamically if the MessageFormat is
* modified. * modified.
*/ */
Formattable::Type* argTypes; Formattable::Type* argTypes;
int32_t argTypeCount; int32_t argTypeCount;
int32_t argTypeCapacity; int32_t argTypeCapacity;
/** /**
* Is true iff all argument names are non-negative numbers. * TRUE if there are different argTypes for the same argument.
* * This only matters when the MessageFormat is used in the plain C (ums
*/ g_xxx) API
UBool isArgNumeric; * where the pattern argTypes determine how the va_arg list is read.
*/
UBool hasArgTypeConflicts;
// Variable-size array management // Variable-size array management
UBool allocateSubformats(int32_t capacity); UBool allocateArgTypes(int32_t capacity, UErrorCode& status);
UBool allocateArgTypes(int32_t capacity);
/** /**
* Default Format objects used when no format is specified and a * Default Format objects used when no format is specified and a
* numeric or date argument is formatted. These are volatile * numeric or date argument is formatted. These are volatile
* cache objects maintained only for performance. They do not * cache objects maintained only for performance. They do not
* participate in operator=(), copy constructor(), nor * participate in operator=(), copy constructor(), nor
* operator==(). * operator==().
*/ */
NumberFormat* defaultNumberFormat; NumberFormat* defaultNumberFormat;
DateFormat* defaultDateFormat; DateFormat* defaultDateFormat;
UHashtable* cachedFormatters;
UHashtable* customFormatArgStarts;
PluralSelectorProvider pluralProvider;
/** /**
* Method to retrieve default formats (or NULL on failure). * Method to retrieve default formats (or NULL on failure).
* These are semantically const, but may modify *this. * These are semantically const, but may modify *this.
*/ */
const NumberFormat* getDefaultNumberFormat(UErrorCode&) const; const NumberFormat* getDefaultNumberFormat(UErrorCode&) const;
const DateFormat* getDefaultDateFormat(UErrorCode&) const; const DateFormat* getDefaultDateFormat(UErrorCode&) const;
/** /**
* Finds the word s, in the keyword list and returns the located index. * Finds the word s, in the keyword list and returns the located index.
* @param s the keyword to be searched for. * @param s the keyword to be searched for.
* @param list the list of keywords to be searched with. * @param list the list of keywords to be searched with.
* @return the index of the list which matches the keyword s. * @return the index of the list which matches the keyword s.
*/ */
static int32_t findKeyword( const UnicodeString& s, static int32_t findKeyword( const UnicodeString& s,
const UChar * const *list); const UChar * const *list);
/** /**
* Formats the array of arguments and copies the result into the * Thin wrapper around the format(... AppendableWrapper ...) variant.
* result buffer, updates the field position. * Wraps the destination UnicodeString into an AppendableWrapper and
* supplies default values for some other parameters.
*/
UnicodeString& format(const Formattable* arguments,
const UnicodeString *argumentNames,
int32_t cnt,
UnicodeString& appendTo,
FieldPosition* pos,
UErrorCode& status) const;
/**
* Formats the arguments and writes the result into the
* AppendableWrapper, updates the field position.
* *
* @param arguments The formattable objects array. * @param msgStart Index to msgPattern part to start formatting fr
* @param cnt The array count. om.
* @param appendTo Output parameter to receive result. * @param pluralNumber Zero except when formatting a plural argument s
* Result is appended to existing contents. ub-message
* @param status Field position status. * where a '#' is replaced by the format string fo
* @param recursionProtection r this number.
* Initially zero. Bits 0..9 are used to indicate * @param arguments The formattable objects array. (Must not be NUL
* that a parameter has already been seen, to L.)
* avoid recursion. Currently unused. * @param argumentNames NULL if numbered values are used. Otherwise the
* @param success The error code status. same
* @return Reference to 'appendTo' parameter. * length as "arguments", and each entry is the na
me of the
* corresponding argument in "arguments".
* @param cnt The length of arguments (and of argumentNames i
f that is not NULL).
* @param appendTo Output parameter to receive the result.
* The result string is appended to existing conte
nts.
* @param pos Field position status.
* @param success The error code status.
*/ */
UnicodeString& format( const Formattable* arguments, void format(int32_t msgStart,
int32_t cnt, double pluralNumber,
UnicodeString& appendTo, const Formattable* arguments,
FieldPosition& status, const UnicodeString *argumentNames,
int32_t recursionProtection, int32_t cnt,
UErrorCode& success) const; AppendableWrapper& appendTo,
FieldPosition* pos,
UErrorCode& success) const;
UnicodeString& format( const Formattable* arguments, UnicodeString getArgName(int32_t partIndex);
const UnicodeString *argumentNames,
int32_t cnt,
UnicodeString& appendTo,
FieldPosition& status,
int32_t recursionProtection,
UErrorCode& success) const;
void makeFormat(int32_t offsetNumber, void setArgStartFormat(int32_t argStart, Format* formatter, UErrorCode&
UnicodeString* segments, status);
UParseError& parseError,
UErrorCode& success); void setCustomArgStartFormat(int32_t argStart, Format* formatter, UErro
rCode& status);
int32_t nextTopLevelArgStart(int32_t partIndex) const;
bool argNameMatches(int32_t partIndex, const UnicodeString& argName, in
t32_t argNumber);
void cacheExplicitFormats(UErrorCode& status);
Format* createAppropriateFormat(UnicodeString& type,
UnicodeString& style,
Formattable::Type& formattableType,
UParseError& parseError,
UErrorCode& ec);
const Formattable* getArgFromListByName(const Formattable* arguments,
const UnicodeString *argumentNa
mes,
int32_t cnt, UnicodeString& nam
e) const;
Formattable* parse(int32_t msgStart,
const UnicodeString& source,
ParsePosition& pos,
int32_t& count,
UErrorCode& ec) const;
FieldPosition* updateMetaData(AppendableWrapper& dest, int32_t prevLeng
th,
FieldPosition* fp, const Formattable* arg
Id) const;
Format* getCachedFormatter(int32_t argumentNumber) const;
UnicodeString getLiteralStringUntilNextArgument(int32_t from) const;
void copyObjects(const MessageFormat& that, UErrorCode& ec);
void formatComplexSubMessage(int32_t msgStart,
double pluralNumber,
const Formattable* arguments,
const UnicodeString *argumentNames,
int32_t cnt,
AppendableWrapper& appendTo,
UErrorCode& success) const;
/** /**
* Convenience method that ought to be in NumberFormat * Convenience method that ought to be in NumberFormat
*/ */
NumberFormat* createIntegerFormat(const Locale& locale, UErrorCode& sta tus) const; NumberFormat* createIntegerFormat(const Locale& locale, UErrorCode& sta tus) const;
/** /**
* Checks the range of the source text to quote the special
* characters, { and ' and copy to target buffer.
* @param source
* @param start the text offset to start the process of in the source s
tring
* @param end the text offset to end the process of in the source strin
g
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
*/
static void copyAndFixQuotes(const UnicodeString& appendTo, int32_t sta
rt, int32_t end, UnicodeString& target);
/**
* Returns array of argument types in the parsed pattern * Returns array of argument types in the parsed pattern
* for use in C API. Only for the use of umsg_vformat(). Not * for use in C API. Only for the use of umsg_vformat(). Not
* for public consumption. * for public consumption.
* @param listCount Output parameter to receive the size of array * @param listCount Output parameter to receive the size of array
* @return The array of formattable types in the pattern * @return The array of formattable types in the pattern
* @internal * @internal
*/ */
const Formattable::Type* getArgTypeList(int32_t& listCount) const { const Formattable::Type* getArgTypeList(int32_t& listCount) const {
listCount = argTypeCount; listCount = argTypeCount;
return argTypes; return argTypes;
} }
/** /**
* Returns FALSE if the argument name is not legal. * Resets the internal MessagePattern, and other associated caches.
* @param argName argument name.
* @return TRUE if the argument name is legal, otherwise return FALSE.
*/ */
UBool isLegalArgName(const UnicodeString& argName) const; void resetPattern();
/**
* A DummyFormatter that we use solely to store a NULL value. UHash doe
s
* not support storing NULL values.
* @internal
*/
class U_I18N_API DummyFormat : public Format {
public:
virtual UBool operator==(const Format&) const;
virtual Format* clone() const;
virtual UnicodeString& format(const Formattable&,
UnicodeString& appendTo,
FieldPosition&,
UErrorCode& status) const;
virtual void parseObject(const UnicodeString&,
Formattable&,
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. 46 change blocks. 
298 lines changed or deleted 471 lines changed or added


 normalizer2.h   normalizer2.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2009-2010, International Business Machines * Copyright (C) 2009-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: 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 178 skipping to change at line 178
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return first * @return first
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString & virtual UnicodeString &
append(UnicodeString &first, append(UnicodeString &first,
const UnicodeString &second, const UnicodeString &second,
UErrorCode &errorCode) const = 0; UErrorCode &errorCode) const = 0;
/** /**
* Gets the decomposition mapping of c. Equivalent to normalize(Unicode * Gets the decomposition mapping of c.
String(c)) * Roughly equivalent to normalizing the String form of c
* on a UNORM2_DECOMPOSE Normalizer2 instance, but much faster. * on a UNORM2_DECOMPOSE Normalizer2 instance, but much faster, and exc
ept that this function
* returns FALSE and does not write a string
* if c does not have a decomposition mapping in this instance's data.
* This function is independent of the mode of the Normalizer2. * This function is independent of the mode of the Normalizer2.
* @param c code point * @param c code point
* @param decomposition String object which will be set to c's * @param decomposition String object which will be set to c's
* decomposition mapping, if there is one. * decomposition mapping, if there is one.
* @return TRUE if c has a decomposition, otherwise FALSE * @return TRUE if c has a decomposition, otherwise FALSE
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
virtual UBool virtual UBool
getDecomposition(UChar32 c, UnicodeString &decomposition) const = 0; getDecomposition(UChar32 c, UnicodeString &decomposition) const = 0;
 End of changes. 2 change blocks. 
4 lines changed or deleted 7 lines changed or added


 normlzr.h   normlzr.h 
/* /*
******************************************************************** ********************************************************************
* COPYRIGHT: * COPYRIGHT:
* Copyright (c) 1996-2010, International Business Machines Corporation and * Copyright (c) 1996-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
******************************************************************** ********************************************************************
*/ */
#ifndef NORMLZR_H #ifndef NORMLZR_H
#define NORMLZR_H #define NORMLZR_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
skipping to change at line 370 skipping to change at line 370
* @return result * @return result
* *
* @see unorm_concatenate * @see unorm_concatenate
* @see normalize * @see normalize
* @see unorm_next * @see unorm_next
* @see unorm_previous * @see unorm_previous
* *
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
static UnicodeString & static UnicodeString &
U_EXPORT2 concatenate(UnicodeString &left, UnicodeString &right, U_EXPORT2 concatenate(const UnicodeString &left, const UnicodeString &rig ht,
UnicodeString &result, UnicodeString &result,
UNormalizationMode mode, int32_t options, UNormalizationMode mode, int32_t options,
UErrorCode &errorCode); UErrorCode &errorCode);
/** /**
* Compare two strings for canonical equivalence. * Compare two strings for canonical equivalence.
* Further options include case-insensitive comparison and * Further options include case-insensitive comparison and
* code point order (as opposed to code unit order). * code point order (as opposed to code unit order).
* *
* Canonical equivalence between two strings is defined as their normaliz ed * Canonical equivalence between two strings is defined as their normaliz ed
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 numfmt.h   numfmt.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2010, International Business Machines Corporation and others. * Copyright (C) 1997-2011, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File 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 39 skipping to change at line 39
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/unistr.h" #include "unicode/unistr.h"
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/unum.h" // UNumberFormatStyle #include "unicode/unum.h" // UNumberFormatStyle
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/stringpiece.h" #include "unicode/stringpiece.h"
class NumberFormatTest;
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
#if !UCONFIG_NO_SERVICE #if !UCONFIG_NO_SERVICE
class NumberFormatFactory; class NumberFormatFactory;
class StringEnumeration; class StringEnumeration;
#endif #endif
/** /**
* *
* Abstract base class for all number formats. Provides interface for * Abstract base class for all number formats. Provides interface for
skipping to change at line 164 skipping to change at line 166
* the end, e.g. with parentheses in negative numbers: "(12)" for -12. * the end, e.g. with parentheses in negative numbers: "(12)" for -12.
* <p> * <p>
* <em>User subclasses are not supported.</em> While clients may write * <em>User subclasses are not supported.</em> While clients may write
* subclasses, such code will not necessarily work and will not be * subclasses, such code will not necessarily work and will not be
* guaranteed to work stably from release to release. * guaranteed to work stably from release to release.
* *
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
class U_I18N_API NumberFormat : public Format { class U_I18N_API NumberFormat : public Format {
public: public:
/**
* Constants for various number format styles.
* kNumberStyle specifies a normal number style of format.
* kCurrencyStyle specifies a currency format using currency symbol nam
e,
* such as in "$1.00".
* kPercentStyle specifies a style of format to display percent.
* kScientificStyle specifies a style of format to display scientific n
umber.
* kISOCurrencyStyle specifies a currency format using ISO currency cod
e,
* such as in "USD1.00".
* kPluralCurrencyStyle specifies a currency format using currency plur
al
* names, such as in "1.00 US dollar" and "3.00 US dollars".
* @draft ICU 4.2
*/
enum EStyles {
kNumberStyle,
kCurrencyStyle,
kPercentStyle,
kScientificStyle,
kIsoCurrencyStyle,
kPluralCurrencyStyle,
kStyleCount // ALWAYS LAST ENUM: number of styles
};
/** /**
* Alignment Field constants used to construct a FieldPosition object. * Alignment Field constants used to construct a FieldPosition object.
* Signifies that the position of the integer part or fraction part of * Signifies that the position of the integer part or fraction part of
* a formatted number should be returned. * a formatted number should be returned.
* *
* Note: as of ICU 4.4, the values in this enum have been extended to * Note: as of ICU 4.4, the values in this enum have been extended to
* support identification of all number format fields, not just those * support identification of all number format fields, not just those
* pertaining to alignment. * pertaining to alignment.
* *
* @see FieldPosition * @see FieldPosition
skipping to change at line 623 skipping to change at line 601
/** /**
* Sets whether or not numbers should be parsed as integers only. * Sets whether or not numbers should be parsed as integers only.
* @param value set True, this format will parse numbers as integers * @param value set True, this format will parse numbers as integers
* only. * only.
* @see isParseIntegerOnly * @see isParseIntegerOnly
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void setParseIntegerOnly(UBool value); virtual void setParseIntegerOnly(UBool value);
/** /**
* Sets whether lenient parsing should be enabled (it is off by default
).
*
* @param enable <code>TRUE</code> if lenient parsing should be used,
* <code>FALSE</code> otherwise.
* @draft ICU 4.8
*/
virtual void setLenient(UBool enable);
/**
* Returns whether lenient parsing is enabled (it is off by default).
*
* @return <code>TRUE</code> if lenient parsing is enabled,
* <code>FALSE</code> otherwise.
* @see #setLenient
* @draft ICU 4.8
*/
virtual UBool isLenient(void) const;
/**
* Returns the default number format for the current default * Returns the default number format for the current default
* locale. The default format is one of the styles provided by * locale. The default format is one of the styles provided by
* the other factory methods: getNumberInstance, * the other factory methods: getNumberInstance,
* getCurrencyInstance or getPercentInstance. Exactly which one * getCurrencyInstance or getPercentInstance. Exactly which one
* is locale dependant. * is locale dependant.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static NumberFormat* U_EXPORT2 createInstance(UErrorCode&); static NumberFormat* U_EXPORT2 createInstance(UErrorCode&);
/** /**
skipping to change at line 646 skipping to change at line 643
* getPercentInstance. Exactly which one is locale dependant. * getPercentInstance. Exactly which one is locale dependant.
* @param inLocale the given locale. * @param inLocale the given locale.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static NumberFormat* U_EXPORT2 createInstance(const Locale& inLocale, static NumberFormat* U_EXPORT2 createInstance(const Locale& inLocale,
UErrorCode&); UErrorCode&);
/** /**
* Creates the specified decimal format style of the desired locale. * Creates the specified decimal format style of the desired locale.
* @param desiredLocale the given locale. * @param desiredLocale the given locale.
* @param choice the given style. * @param style the given style.
* @param success Output param filled with success/failure sta * @param errorCode Output param filled with success/failure sta
tus. tus.
* @return A new NumberFormat instance. * @return A new NumberFormat instance.
* @draft ICU 4.2 * @draft ICU 4.8
*/ */
static NumberFormat* U_EXPORT2 createInstance(const Locale& desiredLoca static NumberFormat* U_EXPORT2 createInstance(const Locale& desiredLoca
le, EStyles choice, UErrorCode& success); le,
UNumberFormatStyle style,
UErrorCode& errorCode);
/** /**
* Returns a currency format for the current default locale. * Returns a currency format for the current default locale.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static NumberFormat* U_EXPORT2 createCurrencyInstance(UErrorCode&); static NumberFormat* U_EXPORT2 createCurrencyInstance(UErrorCode&);
/** /**
* Returns a currency format for the specified locale. * Returns a currency format for the specified locale.
* @param inLocale the given locale. * @param inLocale the given locale.
skipping to change at line 921 skipping to change at line 920
* 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;
private: private:
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 choice the given style. * @param style the given style.
* @param success Output param filled with success/failure sta * @param errorCode Output param filled with success/failure sta
tus. tus.
* @return A new NumberFormat instance. * @return A new NumberFormat instance.
*/ */
static NumberFormat* makeInstance(const Locale& desiredLocale, EStyles static NumberFormat* makeInstance(const Locale& desiredLocale,
choice, UErrorCode& success); UNumberFormatStyle style,
UErrorCode& errorCode);
UBool fGroupingUsed; UBool fGroupingUsed;
int32_t fMaxIntegerDigits; int32_t fMaxIntegerDigits;
int32_t fMinIntegerDigits; int32_t fMinIntegerDigits;
int32_t fMaxFractionDigits; int32_t fMaxFractionDigits;
int32_t fMinFractionDigits; int32_t fMinFractionDigits;
UBool fParseIntegerOnly; UBool fParseIntegerOnly;
UBool fLenient; // TRUE => lenient parse is enabled
// ISO currency code // ISO currency code
UChar fCurrency[4]; UChar fCurrency[4];
friend class ICUNumberFormatFactory; // access to makeInstance, EStyles friend class ICUNumberFormatFactory; // access to makeInstance
friend class ICUNumberFormatService; friend class ICUNumberFormatService;
friend class ::NumberFormatTest; // access to isStyleSupported()
}; };
#if !UCONFIG_NO_SERVICE #if !UCONFIG_NO_SERVICE
/** /**
* A NumberFormatFactory is used to register new number formats. The facto ry * A NumberFormatFactory is used to register new number formats. The facto ry
* should be able to create any of the predefined formats for each locale i t * should be able to create any of the predefined formats for each locale i t
* supports. When registered, the locales it supports extend or override t he * supports. When registered, the locales it supports extend or override t he
* locale already supported by ICU. * locale already supported by ICU.
* *
* @stable ICU 2.6 * @stable ICU 2.6
skipping to change at line 1036 skipping to change at line 1041
#endif /* #if !UCONFIG_NO_SERVICE */ #endif /* #if !UCONFIG_NO_SERVICE */
// ------------------------------------- // -------------------------------------
inline UBool inline UBool
NumberFormat::isParseIntegerOnly() const NumberFormat::isParseIntegerOnly() const
{ {
return fParseIntegerOnly; return fParseIntegerOnly;
} }
inline UBool
NumberFormat::isLenient() const
{
return fLenient;
}
inline UnicodeString& inline UnicodeString&
NumberFormat::format(const Formattable& obj, NumberFormat::format(const Formattable& obj,
UnicodeString& appendTo, UnicodeString& appendTo,
UErrorCode& status) const { UErrorCode& status) const {
return Format::format(obj, appendTo, status); return Format::format(obj, appendTo, status);
} }
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
 End of changes. 14 change blocks. 
41 lines changed or deleted 48 lines changed or added


 platform.h   platform.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* Note: autoconf creates platform.h from platform.h.in at configure time. * Note: autoconf creates platform.h from platform.h.in at configure time.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* FILE NAME : platform.h * FILE NAME : platform.h
* *
skipping to change at line 44 skipping to change at line 44
#endif #endif
/** /**
* Determine wheter to enable auto cleanup of libraries. * Determine wheter to enable auto cleanup of libraries.
* @internal * @internal
*/ */
#ifndef UCLN_NO_AUTO_CLEANUP #ifndef UCLN_NO_AUTO_CLEANUP
#define UCLN_NO_AUTO_CLEANUP 1 #define UCLN_NO_AUTO_CLEANUP 1
#endif #endif
#if 0
#define CYGWINMSVC
#endif
/* Need platform.h when using CYGWINMSVC to get definitions above. Ignore e verything else. */ /* Need platform.h when using CYGWINMSVC to get definitions above. Ignore e verything else. */
#ifndef CYGWINMSVC #ifndef CYGWINMSVC
/** Define the platform we're on. */ /** Define the platform we're on. */
#ifndef U_LINUX #ifndef U_LINUX
#define U_LINUX #define U_LINUX
#endif #endif
/** /**
* \def U_HAVE_DIRENT_H * \def U_HAVE_DIRENT_H
skipping to change at line 154 skipping to change at line 158
#define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) #define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN)
#else #else
#define U_IS_BIG_ENDIAN 0 #define U_IS_BIG_ENDIAN 0
#endif #endif
/* 1 or 0 to enable or disable threads. If undefined, default is: enable t hreads. */ /* 1 or 0 to enable or disable threads. If undefined, default is: enable t hreads. */
#ifndef ICU_USE_THREADS #ifndef ICU_USE_THREADS
#define ICU_USE_THREADS 1 #define ICU_USE_THREADS 1
#endif #endif
/* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick doubl
e check lock. */
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define UMTX_STRONG_MEMORY_MODEL 1
#endif
#ifndef U_DEBUG #ifndef U_DEBUG
#define U_DEBUG 0 #define U_DEBUG 0
#endif #endif
#ifndef U_RELEASE #ifndef U_RELEASE
#define U_RELEASE 1 #define U_RELEASE 1
#endif #endif
/* Determine whether to disable renaming or not. This overrides the /* Determine whether to disable renaming or not. This overrides the
setting in umachine.h which is for all platforms. */ setting in umachine.h which is for all platforms. */
skipping to change at line 300 skipping to change at line 299
#define U_HAVE_MMAP 1 #define U_HAVE_MMAP 1
#define U_HAVE_POPEN 1 #define U_HAVE_POPEN 1
/** @} */ /** @} */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** @{ Symbol import-export control */ /** @{ Symbol import-export control */
/*========================================================================= ==*/ /*========================================================================= ==*/
#if 1 #ifdef U_STATIC_IMPLEMENTATION
#define U_EXPORT
#elif 1
#define U_EXPORT __attribute__((visibility("default"))) #define U_EXPORT __attribute__((visibility("default")))
#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \
|| (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550)
#define U_EXPORT __global #define U_EXPORT __global
/*#elif defined(__HP_aCC) || defined(__HP_cc) /*#elif defined(__HP_aCC) || defined(__HP_cc)
#define U_EXPORT __declspec(dllexport)*/ #define U_EXPORT __declspec(dllexport)*/
#else #else
#define U_EXPORT #define U_EXPORT
#endif #endif
skipping to change at line 394 skipping to change at line 395
# define U_LIB_SUFFIX_C_NAME_STRING "" # define U_LIB_SUFFIX_C_NAME_STRING ""
/** /**
* 1 if a custom library suffix is set * 1 if a custom library suffix is set
* @internal * @internal
*/ */
# define U_HAVE_LIB_SUFFIX 0 # define U_HAVE_LIB_SUFFIX 0
#if U_HAVE_LIB_SUFFIX #if U_HAVE_LIB_SUFFIX
# ifndef U_ICU_ENTRY_POINT_RENAME # ifndef U_ICU_ENTRY_POINT_RENAME
/* Renaming pattern: u_strcpy_41_suffix */ /* Renaming pattern: u_strcpy_41_suffix */
# define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## 46 ## # define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## 48 ##
# define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt####major##minor##_d at # define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt####major##minor##_d at
# endif # endif
#endif #endif
#endif #endif
 End of changes. 5 change blocks. 
9 lines changed or deleted 9 lines changed or added


 plurfmt.h   plurfmt.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2007-2010, International Business Machines Corporation and * Copyright (C) 2007-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* File PLURFMT.H * File PLURFMT.H
* *
* Modification History:* * Modification History:*
* Date Name Description * Date Name Description
* *
*************************************************************************** ***** *************************************************************************** *****
skipping to change at line 28 skipping to change at line 28
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: PluralFormat object * \brief C++ API: PluralFormat object
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/messagepattern.h"
#include "unicode/numfmt.h" #include "unicode/numfmt.h"
#include "unicode/plurrule.h" #include "unicode/plurrule.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class Hashtable; class Hashtable;
/** /**
* <p> * <p>
* <code>PluralFormat</code> supports the creation of internationalized * <code>PluralFormat</code> supports the creation of internationalized
* messages with plural inflection. It is based on <i>plural * messages with plural inflection. It is based on <i>plural
* selection</i>, i.e. the caller specifies messages for each * selection</i>, i.e. the caller specifies messages for each
* plural case that can appear in the users language and the * plural case that can appear in the user's language and the
* <code>PluralFormat</code> selects the appropriate message based on * <code>PluralFormat</code> selects the appropriate message based on
* the number. * the number.
* </p> * </p>
* <h4>The Problem of Plural Forms in Internationalized Messages</h4> * <h4>The Problem of Plural Forms in Internationalized Messages</h4>
* <p> * <p>
* Different languages have different ways to inflect * Different languages have different ways to inflect
* plurals. Creating internationalized messages that include plural * plurals. Creating internationalized messages that include plural
* forms is only feasible when the framework is able to handle plural * forms is only feasible when the framework is able to handle plural
* forms of <i>all</i> languages correctly. <code>ChoiceFormat</code> * forms of <i>all</i> languages correctly. <code>ChoiceFormat</code>
* doesn't handle this well, because it attaches a number interval to * doesn't handle this well, because it attaches a number interval to
* each message and selects the message whose interval contains a * each message and selects the message whose interval contains a
* given number. This can only handle a finite number of * given number. This can only handle a finite number of
* intervals. But in some languages, like Polish, one plural case * intervals. But in some languages, like Polish, one plural case
* applies to infinitely many intervals (e.g., paucal applies to * applies to infinitely many intervals (e.g., the plural case applies to
* numbers ending with 2, 3, or 4 except those ending with 12, 13, or * numbers ending with 2, 3, or 4 except those ending with 12, 13, or
* 14). Thus <code>ChoiceFormat</code> is not adequate. * 14). Thus <code>ChoiceFormat</code> is not adequate.
* </p><p> * </p><p>
* <code>PluralFormat</code> deals with this by breaking the problem * <code>PluralFormat</code> deals with this by breaking the problem
* into two parts: * into two parts:
* <ul> * <ul>
* <li>It uses <code>PluralRules</code> that can define more complex * <li>It uses <code>PluralRules</code> that can define more complex
* conditions for a plural case than just a single interval. These plur al * conditions for a plural case than just a single interval. These plur al
* rules define both what plural cases exist in a language, and to * rules define both what plural cases exist in a language, and to
* which numbers these cases apply. * which numbers these cases apply.
* <li>It provides predefined plural rules for many locales. Thus, the prog * <li>It provides predefined plural rules for many languages. Thus, the pr
rammer ogrammer
* need not worry about the plural cases of a language. On the flip sid * need not worry about the plural cases of a language and
e, * does not have to define the plural cases; they can simply
* the localizer does not have to specify the plural cases; he can simp
ly
* use the predefined keywords. The whole plural formatting of messages can * use the predefined keywords. The whole plural formatting of messages can
* be done using localized patterns from resource bundles. For predefin ed plural * be done using localized patterns from resource bundles. For predefin ed plural
* rules, see CLDR <i>Language Plural Rules</i> page at * rules, see the CLDR <i>Language Plural Rules</i> page at
* http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_pl ural_rules.html * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_pl ural_rules.html
* </ul> * </ul>
* </p> * </p>
* <h4>Usage of <code>PluralFormat</code></h4> * <h4>Usage of <code>PluralFormat</code></h4>
* <p> * <p>Note: Typically, plural formatting is done via <code>MessageFormat</c
ode>
* with a <code>plural</code> argument type,
* rather than using a stand-alone <code>PluralFormat</code>.
* </p><p>
* This discussion assumes that you use <code>PluralFormat</code> with * This discussion assumes that you use <code>PluralFormat</code> with
* a predefined set of plural rules. You can create one using one of * a predefined set of plural rules. You can create one using one of
* the constructors that takes a <code>locale</code> object. To * the constructors that takes a <code>locale</code> object. To
* specify the message pattern, you can either pass it to the * specify the message pattern, you can either pass it to the
* constructor or set it explicitly using the * constructor or set it explicitly using the
* <code>applyPattern()</code> method. The <code>format()</code> * <code>applyPattern()</code> method. The <code>format()</code>
* method takes a number object and selects the message of the * method takes a number object and selects the message of the
* matching plural case. This message will be returned. * matching plural case. This message will be returned.
* </p> * </p>
* <h5>Patterns and Their Interpretation</h5> * <h5>Patterns and Their Interpretation</h5>
* <p> * <p>
* The pattern text defines the message output for each plural case of the * The pattern text defines the message output for each plural case of the
* used locale. The pattern is a sequence of * specified locale. Syntax:
* <code><i>caseKeyword</i>{<i>message</i>}</code> clauses, separated by wh * <pre>
ite * pluralStyle = [offsetValue] (selector '{' message '}')+
* space characters. Each clause assigns the message <code><i>message</i></ * offsetValue = "offset:" number
code> * selector = explicitValue | keyword
* to the plural case identified by <code><i>caseKeyword</i></code>. * explicitValue = '=' number // adjacent, no white space in between
* keyword = [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+
* message: see {@link MessageFormat}
* </pre>
* Pattern_White_Space between syntax elements is ignored, except
* between the {curly braces} and their sub-message,
* and between the '=' and the number of an explicitValue.
*
* </p><p> * </p><p>
* There are 6 predefined casekeyword in ICU - 'zero', 'one', 'two', 'few', 'many' and * There are 6 predefined casekeyword in CLDR/ICU - 'zero', 'one', 'two', ' few', 'many' and
* 'other'. You always have to define a message text for the default plural case * 'other'. You always have to define a message text for the default plural case
* "<code>other</code>" which is contained in every rule set. If the plural * <code>other</code> which is contained in every rule set.
* rules of the <code>PluralFormat</code> object do not contain a plural ca
se
* identified by <code><i>caseKeyword</i></code>, U_DEFAULT_KEYWORD_MISSING
* will be set to status.
* If you do not specify a message text for a particular plural case, the * If you do not specify a message text for a particular plural case, the
* message text of the plural case "<code>other</code>" gets assigned to th * message text of the plural case <code>other</code> gets assigned to this
is * plural case.
* plural case. If you specify more than one message for the same plural ca
se,
* U_DUPLICATE_KEYWORD will be set to status.
* <br>
* Spaces between <code><i>caseKeyword</i></code> and
* <code><i>message</i></code> will be ignored; spaces within
* <code><i>message</i></code> will be preserved.
* </p><p> * </p><p>
* The message text for a particular plural case may contain other message * When formatting, the input number is first matched against the explicitV
* format patterns. <code>PluralFormat</code> preserves these so that you alue clauses.
* can use the strings produced by <code>PluralFormat</code> with other * If there is no exact-number match, then a keyword is selected by calling
* formatters. If you are using <code>PluralFormat</code> inside a * the <code>PluralRules</code> with the input number <em>minus the offset<
* <code>MessageFormat</code> pattern, <code>MessageFormat</code> will /em>.
* automatically evaluate the resulting format pattern.<br> * (The offset defaults to 0 if it is omitted from the pattern string.)
* Thus, curly braces (<code>{</code>, <code>}</code>) are <i>only</i> allo * If there is no clause with that keyword, then the "other" clauses is ret
wed urned.
* in message texts to define a nested format pattern.<br> * </p><p>
* The pound sign (<code>#</code>) will be interpreted as the number placeh * An unquoted pound sign (<code>#</code>) in the selected sub-message
older * itself (i.e., outside of arguments nested in the sub-message)
* in the message text, if it is not contained in curly braces (to preserve * is replaced by the input number minus the offset.
* <code>NumberFormat</code> patterns). <code>PluralFormat</code> will * The number-minus-offset value is formatted using a
* replace each of those pound signs by the number passed to the
* <code>format()</code> method. It will be formatted using a
* <code>NumberFormat</code> for the <code>PluralFormat</code>'s locale. If you * <code>NumberFormat</code> for the <code>PluralFormat</code>'s locale. If you
* need special number formatting, you have to explicitly specify a * need special number formatting, you have to use a <code>MessageFormat</c
* <code>NumberFormat</code> for the <code>PluralFormat</code> to use. ode>
* </p> * and explicitly specify a <code>NumberFormat</code> argument.
* Example * <strong>Note:</strong> That argument is formatting without subtracting t
* <pre> he offset!
* \code * If you need a custom format and have a non-zero offset, then you need to
* UErrorCode status = U_ZERO_ERROR; pass the
* MessageFormat* msgFmt = new MessageFormat(UnicodeString("{0, plural, * number-minus-offset value as a separate parameter.
* one{{0, number, C''est #,##0.0# fichier}} other {Ce sont # fichiers}}
dans la liste."),
* Locale("fr"), status);
* if (U_FAILURE(status)) {
* return;
* }
* Formattable args1[] = {(int32_t)0};
* Formattable args2[] = {(int32_t)3};
* FieldPosition ignore(FieldPosition::DONT_CARE);
* UnicodeString result;
* msgFmt->format(args1, 1, result, ignore, status);
* cout << result << endl;
* result.remove();
* msgFmt->format(args2, 1, result, ignore, status);
* cout << result << endl;
* \endcode
* </pre>
* Produces the output:<br>
* <code>C'est 0,0 fichier dans la liste.</code><br>
* <code>Ce sont 3 fichiers dans la liste.</code>
* <p>
* <strong>Note:</strong><br>
* Currently <code>PluralFormat</code>
* does not make use of quotes like <code>MessageFormat</code>.
* If you use plural format strings with <code>MessageFormat</code> and w
ant
* to use a quote sign <code>'</code>, you have to write <code>''</code>.
* <code>MessageFormat</code> unquotes this pattern and passes the unquo
ted
* pattern to <code>PluralFormat</code>. It's a bit trickier if you use
* nested formats that do quoting. In the example above, we wanted to ins
ert
* <code>'</code> in the number format pattern. Since
* <code>NumberFormat</code> supports quotes, we had to insert
* <code>''</code>. But since <code>MessageFormat</code> unquotes the
* pattern before it gets passed to <code>PluralFormat</code>, we have to
* double these quotes, i.e. write <code>''''</code>.
* </p> * </p>
* For a usage example, see the {@link MessageFormat} class documentation.
*
* <h4>Defining Custom Plural Rules</h4> * <h4>Defining Custom Plural Rules</h4>
* <p>If you need to use <code>PluralFormat</code> with custom rules, you c an * <p>If you need to use <code>PluralFormat</code> with custom rules, you c an
* create a <code>PluralRules</code> object and pass it to * create a <code>PluralRules</code> object and pass it to
* <code>PluralFormat</code>'s constructor. If you also specify a locale in this * <code>PluralFormat</code>'s constructor. If you also specify a locale in this
* constructor, this locale will be used to format the number in the messag e * constructor, this locale will be used to format the number in the messag e
* texts. * texts.
* </p><p> * </p><p>
* For more information about <code>PluralRules</code>, see * For more information about <code>PluralRules</code>, see
* {@link PluralRules}. * {@link PluralRules}.
* </p> * </p>
skipping to change at line 513 skipping to change at line 481
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
private: private:
typedef enum fmtToken {
none, /**
tLetter, * @internal
tNumber, */
tSpace, class PluralSelector : public UMemory {
tNumberSign, public:
tLeftBrace, /**
tRightBrace * Given a number, returns the appropriate PluralFormat keyword.
}fmtToken; *
* @param number The number to be plural-formatted.
* @param ec Error code.
* @return The selected PluralFormat keyword.
*/
virtual UnicodeString select(double number, UErrorCode& ec) const =
0;
};
/**
* @internal
*/
class U_I18N_API PluralSelectorAdapter : public PluralSelector {
public:
PluralSelectorAdapter() : pluralRules(NULL) {
}
virtual ~PluralSelectorAdapter();
virtual UnicodeString select(double number, UErrorCode& /*ec*/) con
st;
void reset();
PluralRules* pluralRules;
};
Locale locale; Locale locale;
PluralRules* pluralRules; MessagePattern msgPattern;
UnicodeString pattern;
Hashtable *fParsedValuesHash;
NumberFormat* numberFormat; NumberFormat* numberFormat;
NumberFormat* replacedNumberFormat; double offset;
PluralSelectorAdapter pluralRulesWrapper;
PluralFormat(); // default constructor not implemented PluralFormat(); // default constructor not implemented
void init(const PluralRules* rules, const Locale& curlocale, UErrorCode void init(const PluralRules* rules, UErrorCode& status);
& status); /**
UBool inRange(UChar ch, fmtToken& type); * Copies dynamically allocated values (pointer fields).
UBool checkSufficientDefinition(); * Others are copied using their copy constructors and assignment opera
void parsingFailure(); tors.
UnicodeString insertFormattedNumber(double number, */
UnicodeString& message, void copyObjects(const PluralFormat& other);
UnicodeString& appendTo,
FieldPosition& pos) const; /**
void copyHashtable(Hashtable *other, UErrorCode& status); * Finds the PluralFormat sub-message for the given number, or the "oth
er" sub-message.
* @param pattern A MessagePattern.
* @param partIndex the index of the first PluralFormat argument style
part.
* @param selector the PluralSelector for mapping the number (minus off
set) to a keyword.
* @param number a number to be matched to one of the PluralFormat argu
ment's explicit values,
* or mapped via the PluralSelector.
* @param ec ICU error code.
* @return the sub-message start part index.
*/
static int32_t findSubMessage(
const MessagePattern& pattern, int32_t partIndex,
const PluralSelector& selector, double number, UErrorCode& ec);
friend class MessageFormat;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _PLURFMT #endif // _PLURFMT
//eof //eof
 End of changes. 18 change blocks. 
116 lines changed or deleted 119 lines changed or added


 plurrule.h   plurrule.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2008-2010, International Business Machines Corporation and * Copyright (C) 2008-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* *
* File PLURRULE.H * File PLURRULE.H
* *
* Modification History:* * Modification History:*
* Date Name Description * Date Name Description
* *
*************************************************************************** ***** *************************************************************************** *****
skipping to change at line 30 skipping to change at line 30
/** /**
* \file * \file
* \brief C++ API: PluralRules object * \brief C++ API: PluralRules object
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/format.h" #include "unicode/format.h"
/**
* Value returned by PluralRules::getUniqueKeywordValue() when there is no
* unique value to return.
* @draft ICU 4.8
*/
#define UPLRULES_NO_UNIQUE_VALUE ((double)-0.00123456777)
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class Hashtable; class Hashtable;
class RuleChain; class RuleChain;
class RuleParser; class RuleParser;
class PluralKeywordEnumeration;
/** /**
* Defines rules for mapping positive long values onto a small set of * Defines rules for mapping non-negative numeric values onto a small set o f
* keywords. Rules are constructed from a text description, consisting * keywords. Rules are constructed from a text description, consisting
* of a series of keywords and conditions. The {@link #select} method * of a series of keywords and conditions. The {@link #select} method
* examines each condition in order and returns the keyword for the * examines each condition in order and returns the keyword for the
* first condition that matches the number. If none match, * first condition that matches the number. If none match,
* default rule(other) is returned. * default rule(other) is returned.
* *
* For more information, details, and tips for writing rules, see the
* LDML spec, C.11 Language Plural Rules:
* http://www.unicode.org/draft/reports/tr35/tr35.html#Language_Plural_Rule
s
*
* Examples:<pre> * Examples:<pre>
* "one: n is 1; few: n in 2..4"</pre> * "one: n is 1; few: n in 2..4"</pre>
* This defines two rules, for 'one' and 'few'. The condition for * This defines two rules, for 'one' and 'few'. The condition for
* 'one' is "n is 1" which means that the number must be equal to * 'one' is "n is 1" which means that the number must be equal to
* 1 for this condition to pass. The condition for 'few' is * 1 for this condition to pass. The condition for 'few' is
* "n in 2..4" which means that the number must be between 2 and * "n in 2..4" which means that the number must be between 2 and
* 4 inclusive for this condition to pass. All other numbers * 4 inclusive for this condition to pass. All other numbers
* are assigned the keyword "other" by the default rule. * are assigned the keyword "other" by the default rule.
* </p><pre> * </p><pre>
* "zero: n is 0; one: n is 1; zero: n mod 100 in 1..19"</pre> * "zero: n is 0; one: n is 1; zero: n mod 100 in 1..19"</pre>
skipping to change at line 77 skipping to change at line 89
* <p> * <p>
* Syntax:<pre> * Syntax:<pre>
* \code * \code
* rules = rule (';' rule)* * rules = rule (';' rule)*
* rule = keyword ':' condition * rule = keyword ':' condition
* keyword = <identifier> * keyword = <identifier>
* condition = and_condition ('or' and_condition)* * condition = and_condition ('or' and_condition)*
* and_condition = relation ('and' relation)* * and_condition = relation ('and' relation)*
* relation = is_relation | in_relation | within_relation | 'n' <EOL> * relation = is_relation | in_relation | within_relation | 'n' <EOL>
* is_relation = expr 'is' ('not')? value * is_relation = expr 'is' ('not')? value
* in_relation = expr ('not')? 'in' range * in_relation = expr ('not')? 'in' range_list
* within_relation = expr ('not')? 'within' range * within_relation = expr ('not')? 'within' range
* expr = 'n' ('mod' value)? * expr = 'n' ('mod' value)?
* range_list = (range | value) (',' range_list)*
* value = digit+ * value = digit+
* digit = 0|1|2|3|4|5|6|7|8|9 * digit = 0|1|2|3|4|5|6|7|8|9
* range = value'..'value * range = value'..'value
* \endcode * \endcode
* </pre></p> * </pre></p>
* <p> * <p>
* The difference between 'in' and 'within' is that 'in' only includes * An "identifier" is a sequence of characters that do not have the
* integers in the specified range, while 'within' includes all values.</p * Unicode Pattern_Syntax or Pattern_White_Space properties.
> * <p>
* <p> * The difference between 'in' and 'within' is that 'in' only includes
* Keywords * integers in the specified range, while 'within' includes all values.</p>
* could be defined by users or from ICU locale data. There are 6 * <p>
* predefined values in ICU - 'zero', 'one', 'two', 'few', 'many' and * Keywords
* 'other'. Callers need to check the value of keyword returned by * could be defined by users or from ICU locale data. There are 6
* {@link #select} method. * predefined values in ICU - 'zero', 'one', 'two', 'few', 'many' and
* </p> * 'other'. Callers need to check the value of keyword returned by
* {@link #select} method.
* </p>
* *
* Examples:<pre> * Examples:<pre>
* UnicodeString keyword = pl->select(number); * UnicodeString keyword = pl->select(number);
* if (keyword== UnicodeString("one") { * if (keyword== UnicodeString("one") {
* ... * ...
* } * }
* else if ( ... ) * else if ( ... )
* </pre> * </pre>
* <strong>Note:</strong><br> * <strong>Note:</strong><br>
* <p> * <p>
skipping to change at line 148 skipping to change at line 164
PluralRules* clone() const; PluralRules* clone() const;
/** /**
* Assignment operator. * Assignment operator.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralRules& operator=(const PluralRules&); PluralRules& operator=(const PluralRules&);
/** /**
* Creates a PluralRules from a description if it is parsable, otherwis e * Creates a PluralRules from a description if it is parsable, otherwis e
* returns null. * returns NULL.
* *
* @param description rule description * @param description rule description
* @param status Output param set to success/failure code on exit, which * @param status Output param set to success/failure code on exit, which
* must not indicate a failure before the function c all. * must not indicate a failure before the function c all.
* @return new PluralRules pointer. NULL if there is an erro r. * @return new PluralRules pointer. NULL if there is an erro r.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
static PluralRules* U_EXPORT2 createRules(const UnicodeString& descript ion, static PluralRules* U_EXPORT2 createRules(const UnicodeString& descript ion,
UErrorCode& status); UErrorCode& status);
skipping to change at line 221 skipping to change at line 237
* *
* @param status Output param set to success/failure code on exit, whic h * @param status Output param set to success/failure code on exit, whic h
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @return StringEnumeration with the keywords. * @return StringEnumeration with the keywords.
* The caller must delete the object. * The caller must delete the object.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
StringEnumeration* getKeywords(UErrorCode& status) const; StringEnumeration* getKeywords(UErrorCode& status) const;
/** /**
* Returns a unique value for this keyword if it exists, else the const
ant
* UPLRULES_NO_UNIQUE_VALUE.
*
* @param keyword The keyword.
* @return The unique value that generates the keyword, or
* UPLRULES_NO_UNIQUE_VALUE if the keyword is undefined
or there is no
* unique value that generates this keyword.
* @draft ICU 4.8
*/
double getUniqueKeywordValue(const UnicodeString& keyword);
/**
* Returns all the values for which select() would return the keyword.
If
* the keyword is unknown, returns no values, but this is not an error.
If
* the number of values is unlimited, returns no values and -1 as the
* count.
*
* The number of returned values is typically small.
*
* @param keyword The keyword.
* @param dest Array into which to put the returned values. Ma
y
* be NULL if destCapacity is 0.
* @param destCapacity The capacity of the array, must be at least 0.
* @param status The error code.
* @return The count of values available, or -1. This coun
t
* can be larger than destCapacity, but no more tha
n
* destCapacity values will be written.
* @draft ICU 4.8
*/
int32_t getAllKeywordValues(const UnicodeString &keyword,
double *dest, int32_t destCapacity,
UErrorCode& status);
/**
* Returns sample values for which select() would return the keyword.
If
* the keyword is unknown, returns no values, but this is not an error.
*
* The number of returned values is typically small.
*
* @param keyword The keyword.
* @param dest Array into which to put the returned values. Ma
y
* be NULL if destCapacity is 0.
* @param destCapacity The capacity of the array, must be at least 0.
* @param status The error code.
* @return The count of values written.
* If more than destCapacity samples are available,
then
* only destCapacity are written, and destCapacity
is returned as the count,
* rather than setting a U_BUFFER_OVERFLOW_ERROR.
* (The actual number of keyword values could be un
limited.)
* @draft ICU 4.8
*/
int32_t getSamples(const UnicodeString &keyword,
double *dest, int32_t destCapacity,
UErrorCode& status);
/**
* Returns TRUE if the given keyword is defined in this * Returns TRUE if the given keyword is defined in this
* <code>PluralRules</code> object. * <code>PluralRules</code> object.
* *
* @param keyword the input keyword. * @param keyword the input keyword.
* @return TRUE if the input keyword is defined. * @return TRUE if the input keyword is defined.
* Otherwise, return FALSE. * Otherwise, return FALSE.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UBool isKeyword(const UnicodeString& keyword) const; UBool isKeyword(const UnicodeString& keyword) const;
skipping to change at line 276 skipping to change at line 348
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* *
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
private: private:
Hashtable *fLocaleStringsHash; RuleChain *mRules;
UnicodeString mLocaleName; RuleParser *mParser;
RuleChain *mRules; double *mSamples;
RuleParser *mParser; int32_t *mSampleInfo;
int32_t mSampleInfoCount;
PluralRules(); // default constructor not implemented PluralRules(); // default constructor not implemented
int32_t getRepeatLimit() const; int32_t getRepeatLimit() const;
void parseDescription(UnicodeString& ruleData, RuleChain& rules, UError Code &status); void parseDescription(UnicodeString& ruleData, RuleChain& rules, UError Code &status);
void getNextLocale(const UnicodeString& localeData, int32_t* curIndex, UnicodeString& localeName); void getNextLocale(const UnicodeString& localeData, int32_t* curIndex, UnicodeString& localeName);
void addRules(RuleChain& rules); void addRules(RuleChain& rules);
int32_t getNumberValue(const UnicodeString& token) const; int32_t getNumberValue(const UnicodeString& token) const;
UnicodeString getRuleFromResource(const Locale& locale, UErrorCode& sta tus); UnicodeString getRuleFromResource(const Locale& locale, UErrorCode& sta tus);
static const int32_t MAX_SAMPLES = 3;
int32_t getSamplesInternal(const UnicodeString &keyword, double *dest,
int32_t destCapacity, UBool includeUnlimited
,
UErrorCode& status);
int32_t getKeywordIndex(const UnicodeString& keyword,
UErrorCode& status) const;
void initSamples(UErrorCode& status);
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _PLURRULE #endif // _PLURRULE
//eof //eof
 End of changes. 12 change blocks. 
18 lines changed or deleted 113 lines changed or added


 pwin32.h   pwin32.h 
/* /*
************************************************************************** **** ************************************************************************** ****
* *
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
************************************************************************** **** ************************************************************************** ****
* *
* FILE NAME : platform.h * FILE NAME : platform.h
* *
* Date Name Description * Date Name Description
* 05/13/98 nos Creation (content moved here from ptypes.h). * 05/13/98 nos Creation (content moved here from ptypes.h).
* 03/02/99 stephen Added AS400 support. * 03/02/99 stephen Added AS400 support.
* 03/30/99 stephen Added Linux support. * 03/30/99 stephen Added Linux support.
skipping to change at line 193 skipping to change at line 193
/** 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */ /** 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */
#ifndef ICU_USE_THREADS #ifndef ICU_USE_THREADS
#define ICU_USE_THREADS 1 #define ICU_USE_THREADS 1
#endif #endif
/** 0 or 1 to enable or disable auto cleanup of libraries. If undefined, de fault is: disabled. */ /** 0 or 1 to enable or disable auto cleanup of libraries. If undefined, de fault is: disabled. */
#ifndef UCLN_NO_AUTO_CLEANUP #ifndef UCLN_NO_AUTO_CLEANUP
#define UCLN_NO_AUTO_CLEANUP 1 #define UCLN_NO_AUTO_CLEANUP 1
#endif #endif
/* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick doubl
e check mutex lock. */
/**
Microsoft can define _M_IX86, _M_AMD64 (before Visual Studio 8) or _M_X64 (
starting in Visual Studio 8).
Intel can define _M_IX86 or _M_X64
*/
#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || (defined(__
GNUC__) && (defined(__i386__) || defined(__x86_64__)))
#define UMTX_STRONG_MEMORY_MODEL 1
#endif
/** Enable or disable debugging options **/ /** Enable or disable debugging options **/
#ifndef U_DEBUG #ifndef U_DEBUG
#ifdef _DEBUG #ifdef _DEBUG
#define U_DEBUG 1 #define U_DEBUG 1
#else #else
#define U_DEBUG 0 #define U_DEBUG 0
#endif #endif
#endif #endif
/** Enable or disable release options **/ /** Enable or disable release options **/
 End of changes. 2 change blocks. 
13 lines changed or deleted 1 lines changed or added


 rbbi.h   rbbi.h 
/* /*
*************************************************************************** ***************************************************************************
* Copyright (C) 1999-2008 International Business Machines Corporation * * Copyright (C) 1999-2011 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 236 skipping to change at line 236
* @param parseError In the event of a syntax error in the rules, prov ides the location * @param parseError In the event of a syntax error in the rules, prov ides the location
* within the rules of the problem. * within the rules of the problem.
* @param status Information on any errors encountered. * @param status Information on any errors encountered.
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
RuleBasedBreakIterator( const UnicodeString &rules, RuleBasedBreakIterator( const UnicodeString &rules,
UParseError &parseError, UParseError &parseError,
UErrorCode &status); UErrorCode &status);
/** /**
* Contruct a RuleBasedBreakIterator from a set of precompiled binary r
ules.
* Binary rules are obtained from RulesBasedBreakIterator::getBinaryRul
es().
* Construction of a break iterator in this way is substantially faster
than
* constuction from source rules.
*
* Ownership of the storage containing the compiled rules remains with
the
* caller of this function. The compiled rules must not be modified o
r
* deleted during the life of the break iterator.
*
* The compiled rules are not compatible across different major version
s of ICU.
* The compiled rules are comaptible only between machines with the sam
e
* byte ordering (little or big endian) and the same base character set
family
* (ASCII or EBCDIC).
*
* @see #getBinaryRules
* @param compiledRules A pointer to the compiled break rules to be use
d.
* @param ruleLength The length of the compiled break rules, in bytes.
This
* corresponds to the length value produced by getBinaryRules().
* @param status Information on any errors encountered, including inval
id
* binary rules.
* @draft ICU 4.8
*/
RuleBasedBreakIterator(const uint8_t *compiledRules,
uint32_t ruleLength,
UErrorCode &status);
/**
* This constructor uses the udata interface to create a BreakIterator * This constructor uses the udata interface to create a BreakIterator
* whose internal tables live in a memory-mapped file. "image" is an * whose internal tables live in a memory-mapped file. "image" is an
* ICU UDataMemory handle for the pre-compiled break iterator tables. * ICU UDataMemory handle for the pre-compiled break iterator tables.
* @param image handle to the memory image for the break iterator data. * @param image handle to the memory image for the break iterator data.
* Ownership of the UDataMemory handle passes to the Break Itera tor, * Ownership of the UDataMemory handle passes to the Break Itera tor,
* which will be responsible for closing it when it is no longer needed. * which will be responsible for closing it when it is no longer needed.
* @param status Information on any errors encountered. * @param status Information on any errors encountered.
* @see udata_open * @see udata_open
* @see #getBinaryRules * @see #getBinaryRules
* @stable ICU 2.8 * @stable ICU 2.8
skipping to change at line 591 skipping to change at line 618
* break rules. * break rules.
* *
* The binary data can only be used with the same version of ICU * The binary data can only be used with the same version of ICU
* and on the same platform type (processor endian-ness) * and on the same platform type (processor endian-ness)
* *
* @param length Returns the length of the binary data. (Out paramter. ) * @param length Returns the length of the binary data. (Out paramter. )
* *
* @return A pointer to the binary (compiled) rule data. The storage * @return A pointer to the binary (compiled) rule data. The storage
* belongs to the RulesBasedBreakIterator object, not the * belongs to the RulesBasedBreakIterator object, not the
* caller, and must not be modified or deleted. * caller, and must not be modified or deleted.
* @internal * @draft ICU 4.8
*/ */
virtual const uint8_t *getBinaryRules(uint32_t &length); virtual const uint8_t *getBinaryRules(uint32_t &length);
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. 3 change blocks. 
2 lines changed or deleted 40 lines changed or added


 search.h   search.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2001-2008 IBM and others. All rights reserved. * Copyright (C) 2001-2011 IBM and others. All rights reserved.
********************************************************************** **********************************************************************
* Date Name Description * Date Name Description
* 03/22/2000 helena Creation. * 03/22/2000 helena Creation.
********************************************************************** **********************************************************************
*/ */
#ifndef SEARCH_H #ifndef SEARCH_H
#define SEARCH_H #define SEARCH_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
skipping to change at line 309 skipping to change at line 309
* the iterator will be adjusted to the index USEARCH_DONE * the iterator will be adjusted to the index USEARCH_DONE
* @param status for errors if it occurs * @param status for errors if it occurs
* @return The character index of the first match, or * @return The character index of the first match, or
* <tt>USEARCH_DONE</tt> if there are no matches. * <tt>USEARCH_DONE</tt> if there are no matches.
* @see #getOffset * @see #getOffset
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
int32_t first(UErrorCode &status); int32_t first(UErrorCode &status);
/** /**
* Returns the first index greater than <tt>position</tt> at which the * Returns the first index equal or greater than <tt>position</tt> at w hich the
* string text matches the search pattern. The iterator is adjusted so * string text matches the search pattern. The iterator is adjusted so
* that its current index (as returned by <tt>getOffset</tt>) is the * that its current index (as returned by <tt>getOffset</tt>) is the
* match position if one was found. If a match is not found, * match position if one was found.
* <tt>USEARCH_DONE</tt> will be returned and the iterator will be * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
* adjusted to the index USEARCH_DONE the
* iterator will be adjusted to the index <tt>USEARCH_DONE</tt>.
* @param position where search if to start from. If position is less * @param position where search if to start from. If position is less
* than or greater than the text range for searching, * than or greater than the text range for searching,
* an U_INDEX_OUTOFBOUNDS_ERROR will be returned * an U_INDEX_OUTOFBOUNDS_ERROR will be returned
* @param status for errors if it occurs * @param status for errors if it occurs
* @return The character index of the first match following * @return The character index of the first match following
* <tt>position</tt>, or <tt>USEARCH_DONE</tt> if there are no * <tt>position</tt>, or <tt>USEARCH_DONE</tt> if there are no
* matches. * matches.
* @see #getOffset * @see #getOffset
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 349 skipping to change at line 349
*/ */
int32_t last(UErrorCode &status); int32_t last(UErrorCode &status);
/** /**
* Returns the first index less than <tt>position</tt> at which the str ing * Returns the first index less than <tt>position</tt> at which the str ing
* text matches the search pattern. The iterator is adjusted so that it s * text matches the search pattern. The iterator is adjusted so that it s
* current index (as returned by <tt>getOffset</tt>) is the match * current index (as returned by <tt>getOffset</tt>) is the match
* position if one was found. If a match is not found, * position if one was found. If a match is not found,
* <tt>USEARCH_DONE</tt> will be returned and the iterator will be * <tt>USEARCH_DONE</tt> will be returned and the iterator will be
* adjusted to the index USEARCH_DONE * adjusted to the index USEARCH_DONE
* <p>
* When <tt>USEARCH_OVERLAP</tt> option is off, the last index of the
* result match is always less than <tt>position</tt>.
* When <tt>USERARCH_OVERLAP</tt> is on, the result match may span acro
ss
* <tt>position</tt>.
*
* @param position where search is to start from. If position is less * @param position where search is to start from. If position is less
* than or greater than the text range for searching, * than or greater than the text range for searching,
* an U_INDEX_OUTOFBOUNDS_ERROR will be returned * an U_INDEX_OUTOFBOUNDS_ERROR will be returned
* @param status for errors if it occurs * @param status for errors if it occurs
* @return The character index of the first match preceding * @return The character index of the first match preceding
* <tt>position</tt>, or <tt>USEARCH_DONE</tt> if there are * <tt>position</tt>, or <tt>USEARCH_DONE</tt> if there are
* no matches. * no matches.
* @see #getOffset * @see #getOffset
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
 End of changes. 4 change blocks. 
5 lines changed or deleted 13 lines changed or added


 selfmt.h   selfmt.h 
/******************************************************************** /********************************************************************
* COPYRIGHT: * COPYRIGHT:
* Copyright (c) 1997-2010, International Business Machines Corporation and * Copyright (c) 1997-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
* Copyright (C) 2010 , Yahoo! Inc. * Copyright (C) 2010 , Yahoo! Inc.
******************************************************************** ********************************************************************
* *
* File SELFMT.H * File SELFMT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 11/11/09 kirtig Finished first cut of implementation. * 11/11/09 kirtig Finished first cut of implementation.
********************************************************************/ ********************************************************************/
#ifndef SELFMT #ifndef SELFMT
#define SELFMT #define SELFMT
#include "unicode/utypes.h" #include "unicode/messagepattern.h"
#include "unicode/numfmt.h" #include "unicode/numfmt.h"
#include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: SelectFormat object * \brief C++ API: SelectFormat object
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class Hashtable; class MessageFormat;
/** /**
* <p><code>SelectFormat</code> supports the creation of internationalize d * <p><code>SelectFormat</code> supports the creation of internationalize d
* messages by selecting phrases based on keywords. The pattern specifies * messages by selecting phrases based on keywords. The pattern specifies
* how to map keywords to phrases and provides a default phrase. The * how to map keywords to phrases and provides a default phrase. The
* object provided to the format method is a string that's matched * object provided to the format method is a string that's matched
* against the keywords. If there is a match, the corresponding phrase * against the keywords. If there is a match, the corresponding phrase
* is selected; otherwise, the default phrase is used.</p> * is selected; otherwise, the default phrase is used.</p>
* *
* <h4>Using <code>SelectFormat</code> for Gender Agreement</h4> * <h4>Using <code>SelectFormat</code> for Gender Agreement</h4>
* *
* <p>Note: Typically, select formatting is done via <code>MessageFormat</
code>
* with a <code>select</code> argument type,
* rather than using a stand-alone <code>SelectFormat</code>.</p>
*
* <p>The main use case for the select format is gender based inflection. * <p>The main use case for the select format is gender based inflection.
* When names or nouns are inserted into sentences, their gender can affe ct pronouns, * When names or nouns are inserted into sentences, their gender can affe ct pronouns,
* verb forms, articles, and adjectives. Special care needs to be * verb forms, articles, and adjectives. Special care needs to be
* taken for the case where the gender cannot be determined. * taken for the case where the gender cannot be determined.
* The impact varies between languages:</p> * The impact varies between languages:</p>
* \htmlonly * \htmlonly
* <ul> * <ul>
* <li>English has three genders, and unknown gender is handled as a spec ial * <li>English has three genders, and unknown gender is handled as a spec ial
* case. Names use the gender of the named person (if known), nouns refer ring * case. Names use the gender of the named person (if known), nouns refer ring
* to people use natural gender, and inanimate objects are usually neutra l. * to people use natural gender, and inanimate objects are usually neutra l.
skipping to change at line 76 skipping to change at line 81
* *
* <li>Polish distinguishes five genders (or noun classes), * <li>Polish distinguishes five genders (or noun classes),
* human masculine, animate non-human masculine, inanimate masculine, * human masculine, animate non-human masculine, inanimate masculine,
* feminine, and neuter. * feminine, and neuter.
* </ul> * </ul>
* \endhtmlonly * \endhtmlonly
* <p>Some other languages have noun classes that are not related to gend er, * <p>Some other languages have noun classes that are not related to gend er,
* but similar in grammatical use. * but similar in grammatical use.
* Some African languages have around 20 noun classes.</p> * Some African languages have around 20 noun classes.</p>
* *
* <p><b>Note:</b>For the gender of a <i>person</i> in a given sentence,
* we usually need to distinguish only between female, male and other/unkn
own.</p>
*
* <p>To enable localizers to create sentence patterns that take their * <p>To enable localizers to create sentence patterns that take their
* language's gender dependencies into consideration, software has to pro vide * language's gender dependencies into consideration, software has to pro vide
* information about the gender associated with a noun or name to * information about the gender associated with a noun or name to
* <code>MessageFormat</code>. * <code>MessageFormat</code>.
* Two main cases can be distinguished:</p> * Two main cases can be distinguished:</p>
* *
* <ul> * <ul>
* <li>For people, natural gender information should be maintained for ea ch person. * <li>For people, natural gender information should be maintained for ea ch person.
* The keywords "male", "female", "mixed" (for groups of people) * Keywords like "male", "female", "mixed" (for groups of people)
* and "unknown" are used. * and "unknown" could be used.
* *
* <li>For nouns, grammatical gender information should be maintained for * <li>For nouns, grammatical gender information should be maintained for
* each noun and per language, e.g., in resource bundles. * each noun and per language, e.g., in resource bundles.
* The keywords "masculine", "feminine", and "neuter" are commonly used, * The keywords "masculine", "feminine", and "neuter" are commonly used,
* but some languages may require other keywords. * but some languages may require other keywords.
* </ul> * </ul>
* *
* <p>The resulting keyword is provided to <code>MessageFormat</code> as a * <p>The resulting keyword is provided to <code>MessageFormat</code> as a
* parameter separate from the name or noun it's associated with. For exa mple, * parameter separate from the name or noun it's associated with. For exa mple,
* to generate a message such as "Jean went to Paris", three separate arg uments * to generate a message such as "Jean went to Paris", three separate arg uments
* would be provided: The name of the person as argument 0, the gender of * would be provided: The name of the person as argument 0, the gender of
* the person as argument 1, and the name of the city as argument 2. * the person as argument 1, and the name of the city as argument 2.
* The sentence pattern for English, where the gender of the person has * The sentence pattern for English, where the gender of the person has
* no impact on this simple sentence, would not refer to argument 1 at al l:</p> * no impact on this simple sentence, would not refer to argument 1 at al l:</p>
* *
* <pre>{0} went to {2}.</pre> * <pre>{0} went to {2}.</pre>
* *
* <p><b>Note:</b> The entire sentence should be included (and partially r
epeated)
* inside each phrase. Otherwise translators would have to be trained on h
ow to
* move bits of the sentence in and out of the select argument of a messag
e.
* (The examples below do not follow this recommendation!)</p>
*
* <p>The sentence pattern for French, where the gender of the person affe cts * <p>The sentence pattern for French, where the gender of the person affe cts
* the form of the participle, uses a select format based on argument 1:</ p> * the form of the participle, uses a select format based on argument 1:</ p>
* *
* \htmlonly<pre>{0} est {1, select, female {all&#x00E9;e} other {all&#x00 E9;}} &#x00E0; {2}.</pre>\endhtmlonly * \htmlonly<pre>{0} est {1, select, female {all&#x00E9;e} other {all&#x00 E9;}} &#x00E0; {2}.</pre>\endhtmlonly
* *
* <p>Patterns can be nested, so that it's possible to handle interaction s of * <p>Patterns can be nested, so that it's possible to handle interaction s of
* number and gender where necessary. For example, if the above sentence should * number and gender where necessary. For example, if the above sentence should
* allow for the names of several people to be inserted, the following se ntence * allow for the names of several people to be inserted, the following se ntence
* pattern can be used (with argument 0 the list of people's names, * pattern can be used (with argument 0 the list of people's names,
* argument 1 the number of people, argument 2 their combined gender, and * argument 1 the number of people, argument 2 their combined gender, and
skipping to change at line 124 skipping to change at line 137
* *
* \htmlonly * \htmlonly
* <pre>{0} {1, plural, * <pre>{0} {1, plural,
* one {est {2, select, female {all&#x00E9;e} other {all& #x00E9;}}} * one {est {2, select, female {all&#x00E9;e} other {all& #x00E9;}}}
* other {sont {2, select, female {all&#x00E9;es} other {a ll&#x00E9;s}}} * other {sont {2, select, female {all&#x00E9;es} other {a ll&#x00E9;s}}}
* }&#x00E0; {3}.</pre> * }&#x00E0; {3}.</pre>
* \endhtmlonly * \endhtmlonly
* *
* <h4>Patterns and Their Interpretation</h4> * <h4>Patterns and Their Interpretation</h4>
* *
* <p>The <code>SelectFormat</code> pattern text defines the phrase outpu t * <p>The <code>SelectFormat</code> pattern string defines the phrase outp ut
* for each user-defined keyword. * for each user-defined keyword.
* The pattern is a sequence of <code><i>keyword</i>{<i>phrase</i>}</code> * The pattern is a sequence of (keyword, message) pairs.
* clauses. * A keyword is a "pattern identifier": [^[[:Pattern_Syntax:][:Pattern_Whi
* Each clause assigns the phrase <code><i>phrase</i></code> te_Space:]]]+</p>
* to the user-defined <code><i>keyword</i></code>.</p>
* *
* <p>Keywords must match the pattern [a-zA-Z][a-zA-Z0-9_-]*; keywords * <p>Each message is a MessageFormat pattern string enclosed in {curly br
* that don't match this pattern result in the error code aces}.</p>
* <code>U_ILLEGAL_CHARACTER</code>. *
* You always have to define a phrase for the default keyword * <p>You always have to define a phrase for the default keyword
* <code>other</code>; this phrase is returned when the keyword * <code>other</code>; this phrase is returned when the keyword
* provided to * provided to
* the <code>format</code> method matches no other keyword. * the <code>format</code> method matches no other keyword.
* If a pattern does not provide a phrase for <code>other</code>, the met hod * If a pattern does not provide a phrase for <code>other</code>, the met hod
* it's provided to returns the error <code>U_DEFAULT_KEYWORD_MISSING</co de>. * it's provided to returns the error <code>U_DEFAULT_KEYWORD_MISSING</co de>.
* If a pattern provides more than one phrase for the same keyword, the
* error <code>U_DUPLICATE_KEYWORD</code> is returned.
* <br> * <br>
* Spaces between <code><i>keyword</i></code> and * Pattern_White_Space between keywords and messages is ignored.
* <code>{<i>phrase</i>}</code> will be ignored; spaces within * Pattern_White_Space within a message is preserved and output.</p>
* <code>{<i>phrase</i>}</code> will be preserved.<p>
*
* <p>The phrase for a particular select case may contain other message
* format patterns. <code>SelectFormat</code> preserves these so that you
* can use the strings produced by <code>SelectFormat</code> with other
* formatters. If you are using <code>SelectFormat</code> inside a
* <code>MessageFormat</code> pattern, <code>MessageFormat</code> will
* automatically evaluate the resulting format pattern.
* Thus, curly braces (<code>{</code>, <code>}</code>) are <i>only</i> all
owed
* in phrases to define a nested format pattern.</p>
* *
* <p>Example: * <p><pre>Example:
* \htmlonly * \htmlonly
* *
* UErrorCode status = U_ZERO_ERROR; * UErrorCode status = U_ZERO_ERROR;
* MessageFormat *msgFmt = new MessageFormat(UnicodeString("{0} est {1, s elect, female {all&#x00E9;e} other {all&#x00E9;}} &#x00E0; Paris."), Locale ("fr"), status); * MessageFormat *msgFmt = new MessageFormat(UnicodeString("{0} est {1, s elect, female {all&#x00E9;e} other {all&#x00E9;}} &#x00E0; Paris."), Locale ("fr"), status);
* if (U_FAILURE(status)) { * if (U_FAILURE(status)) {
* return; * return;
* } * }
* FieldPosition ignore(FieldPosition::DONT_CARE); * FieldPosition ignore(FieldPosition::DONT_CARE);
* UnicodeString result; * UnicodeString result;
* *
* char* str1= "Kirti,female"; * char* str1= "Kirti,female";
* Formattable args1[] = {"Kirti","female"}; * Formattable args1[] = {"Kirti","female"};
* msgFmt->format(args1, 2, result, ignore, status); * msgFmt->format(args1, 2, result, ignore, status);
* cout << "Input is " << str1 << " and result is: " << result << endl; * cout << "Input is " << str1 << " and result is: " << result << endl;
* delete msgFmt; * delete msgFmt;
* *
* \endhtmlonly * \endhtmlonly
* </pre>
* </p> * </p>
* *
* Produces the output:<br> * Produces the output:<br>
* \htmlonly * \htmlonly
* <code>Kirti est all&#x00E9;e &#x00E0; Paris.</code> * <code>Kirti est all&#x00E9;e &#x00E0; Paris.</code>
* \endhtmlonly * \endhtmlonly
* *
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
skipping to change at line 344 skipping to change at line 343
*/ */
static UClassID U_EXPORT2 getStaticClassID(void); static UClassID U_EXPORT2 getStaticClassID(void);
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
private: private:
typedef enum classesForSelectFormat{ friend class MessageFormat;
tStartKeyword,
tContinueKeyword,
tLeftBrace,
tRightBrace,
tSpace,
tOther
}CharacterClass;
UnicodeString pattern;
//Hash to store the keyword, phrase pairs.
Hashtable *parsedValuesHash;
SelectFormat(); // default constructor not implemented. SelectFormat(); // default constructor not implemented.
void initHashTable(UErrorCode &status);
void cleanHashTable();
//For the applyPattern , classifies char.s in one of the characterClass /**
. * Finds the SelectFormat sub-message for the given keyword, or the "ot
CharacterClass classifyCharacter(UChar ch) const; her" sub-message.
//Checks if the "other" keyword is present in pattern. * @param pattern A MessagePattern.
UBool checkSufficientDefinition(); * @param partIndex the index of the first SelectFormat argument style
//Checks if the keyword passed is valid. part.
UBool checkValidKeyword(const UnicodeString& argKeyword) const; * @param keyword a keyword to be matched to one of the SelectFormat ar
void parsingFailure(); gument's keywords.
void copyHashtable(Hashtable *other, UErrorCode& status); * @param ec Error code.
* @return the sub-message start part index.
*/
static int32_t findSubMessage(const MessagePattern& pattern, int32_t pa
rtIndex,
const UnicodeString& keyword, UErrorCode&
ec);
MessagePattern msgPattern;
}; };
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _SELFMT #endif // _SELFMT
//eof //eof
 End of changes. 18 change blocks. 
53 lines changed or deleted 53 lines changed or added


 simpletz.h   simpletz.h 
/* /*
************************************************************************** ****** ************************************************************************** ******
* Copyright (C) 1997-2009, International Business Machines * * Copyright (C) 1997-2011, International Business Machines *
* Corporation and others. All Rights Reserved. * * Corporation and others. All Rights Reserved. *
************************************************************************** ****** ************************************************************************** ******
* *
* File 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 809 skipping to change at line 809
* @param startDayOfWeek the DOW DST starts * @param startDayOfWeek the DOW DST starts
* @param startTime the time DST starts * @param startTime the time DST starts
* @param startTimeMode Whether the start time is local wall time, lo cal * @param startTimeMode Whether the start time is local wall time, lo cal
* standard time, or UTC time. Default is local wall time. * standard time, or UTC time. Default is local wall time.
* @param endMonth the month DST ends * @param endMonth the month DST ends
* @param endDay the day DST ends * @param endDay the day DST ends
* @param endDayOfWeek the DOW DST ends * @param endDayOfWeek the DOW DST ends
* @param endTime the time DST ends * @param endTime the time DST ends
* @param endTimeMode Whether the end time is local wall time, loca l * @param endTimeMode Whether the end time is local wall time, loca l
* standard time, or UTC time. Default is local wall time. * standard time, or UTC time. Default is local wall time.
* @param savingsDST The number of milliseconds added to standard time * @param dstSavings The number of milliseconds added to standard time
* to get DST time. Default is one hour. * to get DST time. Default is one hour.
* @param status An UErrorCode to receive the status. * @param status An UErrorCode to receive the status.
*/ */
void construct(int32_t rawOffsetGMT, void construct(int32_t rawOffsetGMT,
int8_t startMonth, int8_t startDay, int8_t startDayOfWee k, int8_t startMonth, int8_t startDay, int8_t startDayOfWee k,
int32_t startTime, TimeMode startTimeMode, int32_t startTime, TimeMode startTimeMode,
int8_t endMonth, int8_t endDay, int8_t endDayOfWeek, int8_t endMonth, int8_t endDay, int8_t endDayOfWeek,
int32_t endTime, TimeMode endTimeMode, int32_t endTime, TimeMode endTimeMode,
int32_t dstSavings, UErrorCode& status); int32_t dstSavings, UErrorCode& status);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 smpdtfmt.h   smpdtfmt.h 
/* /*
* Copyright (C) 1997-2010, International Business Machines Corporation and * Copyright (C) 1997-2011, 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 44 skipping to change at line 44
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/datefmt.h" #include "unicode/datefmt.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class DateFormatSymbols; class DateFormatSymbols;
class DateFormat; class DateFormat;
class MessageFormat; class MessageFormat;
class FieldPositionHandler; class FieldPositionHandler;
class TimeZoneFormat;
/** /**
* *
* SimpleDateFormat is a concrete class for formatting and parsing dates in a * SimpleDateFormat is a concrete class for formatting and parsing dates in a
* language-independent manner. It allows for formatting (millis -> text), * language-independent manner. It allows for formatting (millis -> text),
* parsing (text -> millis), and normalization. Formats/Parses a date or ti me, * parsing (text -> millis), and normalization. Formats/Parses a date or ti me,
* 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
skipping to change at line 807 skipping to change at line 808
/** /**
* Called by format() to format a single field. * Called by format() to format a single field.
* *
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param ch The format character we encountered in the pattern. * @param ch The format character we encountered in the pattern.
* @param count Number of characters in the current pattern symbol (e.g., * @param count Number of characters in the current pattern symbol (e.g.,
* "yyyy" in the pattern would result in a call to thi s function * "yyyy" in the pattern would result in a call to thi s function
* with ch equal to 'y' and count equal to 4) * with ch equal to 'y' and count equal to 4)
* @param handler Records information about field positions. * @param handler Records information about field positions.
* @param cal Calendar to use
* @param status Receives a status code, which will be U_ZERO_ERROR if the operation * @param status Receives a status code, which will be U_ZERO_ERROR if the operation
* succeeds. * succeeds.
*/ */
void subFormat(UnicodeString &appendTo, void subFormat(UnicodeString &appendTo,
UChar ch, UChar ch,
int32_t count, int32_t count,
FieldPositionHandler& handler, FieldPositionHandler& handler,
Calendar& cal, Calendar& cal,
UErrorCode& status) const; // in case of illegal argumen t UErrorCode& status) const; // in case of illegal argumen t
/** /**
* Used by subFormat() to format a numeric value. * Used by subFormat() to format a numeric value.
* Appends to toAppendTo a string representation of "value" * Appends to toAppendTo a string representation of "value"
* having a number of digits between "minDigits" and * having a number of digits between "minDigits" and
* "maxDigits". Uses the DateFormat's NumberFormat. * "maxDigits". Uses the DateFormat's NumberFormat.
* *
* @param currentNumberFormat
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Formatted number is appended to existing contents. * Formatted number is appended to existing contents.
* @param value Value to format. * @param value Value to format.
* @param minDigits Minimum number of digits the result should have * @param minDigits Minimum number of digits the result should have
* @param maxDigits Maximum number of digits the result should have * @param maxDigits Maximum number of digits the result should have
*/ */
void zeroPaddingNumber(NumberFormat *currentNumberFormat, void zeroPaddingNumber(NumberFormat *currentNumberFormat,
UnicodeString &appendTo, UnicodeString &appendTo,
int32_t value, int32_t value,
int32_t minDigits, int32_t minDigits,
skipping to change at line 873 skipping to change at line 876
* @param locale The locale to load the patterns from. * @param locale The locale to load the patterns from.
* @param status Filled in with an error code if loading the dat a from the * @param status Filled in with an error code if loading the dat a from the
* resources fails. * resources fails.
*/ */
void construct(EStyle timeStyle, EStyle dateStyle, const Locale& locale , UErrorCode& status); void construct(EStyle timeStyle, EStyle dateStyle, const Locale& locale , UErrorCode& status);
/** /**
* Called by construct() and the various constructors to set up the Sim pleDateFormat's * Called by construct() and the various constructors to set up the Sim pleDateFormat's
* Calendar and NumberFormat objects. * Calendar and NumberFormat objects.
* @param locale The locale for which we want a Calendar and a Numbe rFormat. * @param locale The locale for which we want a Calendar and a Numbe rFormat.
* @param statuc Filled in with an error code if creating either sub object fails. * @param status Filled in with an error code if creating either sub object fails.
*/ */
void initialize(const Locale& locale, UErrorCode& status); void initialize(const Locale& locale, UErrorCode& status);
/** /**
* Private code-size reduction function used by subParse. * Private code-size reduction function used by subParse.
* @param text the time text being parsed. * @param text the time text being parsed.
* @param start where to start parsing. * @param start where to start parsing.
* @param field the date field being parsed. * @param field the date field being parsed.
* @param stringArray the string array to parsed. * @param stringArray the string array to parsed.
* @param stringArrayCount the size of the array. * @param stringArrayCount the size of the array.
skipping to change at line 908 skipping to change at line 911
* @param stringArrayCount the size of the array. * @param stringArrayCount the size of the array.
* @param cal a Calendar set to the date and time to be formatted * @param cal a Calendar set to the date and time to be formatted
* into a date/time string. * into a date/time string.
* @return the new start position if matching succeeded; a negative num ber * @return the new start position if matching succeeded; a negative num ber
* indicating matching failure, otherwise. * indicating matching failure, otherwise.
*/ */
int32_t matchQuarterString(const UnicodeString& text, int32_t start, UC alendarDateFields field, int32_t matchQuarterString(const UnicodeString& text, int32_t start, UC alendarDateFields field,
const UnicodeString* stringArray, int32_t st ringArrayCount, Calendar& cal) const; const UnicodeString* stringArray, int32_t st ringArrayCount, Calendar& cal) const;
/** /**
* Private function used by subParse to match literal pattern text.
*
* @param pattern the pattern string
* @param patternOffset the starting offset into the pattern text. On
* outupt will be set the offset of the first non-literal charac
ter in the pattern
* @param text the text being parsed
* @param textOffset the starting offset into the text. On output
* will be set to the offset of the character after t
he match
* @param lenient <code>TRUE</code> if the parse is lenient, <code>FALS
E</code> otherwise.
*
* @return <code>TRUE</code> if the literal text could be matched, <cod
e>FALSE</code> otherwise.
*/
static UBool matchLiterals(const UnicodeString &pattern, int32_t &patte
rnOffset,
const UnicodeString &text, int32_t &textOffs
et, UBool lenient);
/**
* Private member function that converts the parsed date strings into * Private member function that converts the parsed date strings into
* timeFields. Returns -start (for ParsePosition) if failed. * timeFields. Returns -start (for ParsePosition) if failed.
* @param text the time text to be parsed. * @param text the time text to be parsed.
* @param start where to start parsing. * @param start where to start parsing.
* @param ch the pattern character for the date field text to be parsed . * @param ch the pattern character for the date field text to be parsed .
* @param count the count of a pattern character. * @param count the count of a pattern character.
* @param obeyCount if true then the count is strictly obeyed. * @param obeyCount if true then the count is strictly obeyed.
* @param allowNegative
* @param ambiguousYear If true then the two-digit year == the default start year. * @param ambiguousYear If true then the two-digit year == the default start year.
* @param saveHebrewMonth Used to hang onto month until year is known. * @param saveHebrewMonth Used to hang onto month until year is known.
* @param cal a Calendar set to the date and time to be formatted * @param cal a Calendar set to the date and time to be formatted
* into a date/time string. * into a date/time string.
* @param patLoc
* @return the new start position if matching succeeded; a negative num ber * @return the new start position if matching succeeded; a negative num ber
* indicating matching failure, otherwise. * indicating matching failure, otherwise.
*/ */
int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, i nt32_t count, int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, i nt32_t count,
UBool obeyCount, UBool allowNegative, UBool ambiguousY ear[], int32_t& saveHebrewMonth, Calendar& cal, UBool obeyCount, UBool allowNegative, UBool ambiguousY ear[], int32_t& saveHebrewMonth, Calendar& cal,
int32_t patLoc) const; int32_t patLoc) const;
void parseInt(const UnicodeString& text, void parseInt(const UnicodeString& text,
Formattable& number, Formattable& number,
ParsePosition& pos, ParsePosition& pos,
skipping to change at line 983 skipping to change at line 1004
* @param affix pattern string, taken as a literal * @param affix pattern string, taken as a literal
* @param input input text * @param input input text
* @param pos offset into input at which to begin matching * @param pos offset into input at which to begin matching
* @return length of input that matches, or -1 if match failure * @return length of input that matches, or -1 if match failure
*/ */
int32_t compareSimpleAffix(const UnicodeString& affix, int32_t compareSimpleAffix(const UnicodeString& affix,
const UnicodeString& input, const UnicodeString& input,
int32_t pos) const; int32_t pos) const;
/** /**
* Skip over a run of zero or more isRuleWhiteSpace() characters at * Skip over a run of zero or more Pattern_White_Space characters at
* pos in text. * pos in text.
*/ */
int32_t skipRuleWhiteSpace(const UnicodeString& text, int32_t pos) cons t; int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) c onst;
/** /**
* Skip over a run of zero or more isUWhiteSpace() characters at pos * Skip over a run of zero or more isUWhiteSpace() characters at pos
* in text. * in text.
*/ */
int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const; int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const;
/** /**
* Private methods for formatting/parsing GMT string * Private methods for formatting/parsing GMT string
*/ */
skipping to change at line 1036 skipping to change at line 1057
* Used to map pattern characters to Calendar field identifiers. * Used to map pattern characters to Calendar field identifiers.
*/ */
static const UCalendarDateFields fgPatternIndexToCalendarField[]; static const UCalendarDateFields fgPatternIndexToCalendarField[];
/** /**
* Map index into pattern character string to DateFormat field number * Map index into pattern character string to DateFormat field number
*/ */
static const UDateFormatField fgPatternIndexToDateFormatField[]; static const UDateFormatField fgPatternIndexToDateFormatField[];
/** /**
* Lazy TimeZoneFormat instantiation, semantically const
*/
TimeZoneFormat *tzFormat() const;
/**
* Used to map Calendar field to field level. * Used to map Calendar field to field level.
* The larger the level, the smaller the field unit. * The larger the level, the smaller the field unit.
* For example, UCAL_ERA level is 0, UCAL_YEAR level is 10, * For example, UCAL_ERA level is 0, UCAL_YEAR level is 10,
* UCAL_MONTH level is 20. * UCAL_MONTH level is 20.
*/ */
static const int32_t fgCalendarFieldToLevel[]; static const int32_t fgCalendarFieldToLevel[];
static const int32_t fgPatternCharToLevel[]; static const int32_t fgPatternCharToLevel[];
/** /**
* The formatting pattern for this formatter. * The formatting pattern for this formatter.
skipping to change at line 1071 skipping to change at line 1097
*/ */
Locale fLocale; Locale fLocale;
/** /**
* A pointer to an object containing the strings to use in formatting ( e.g., * A pointer to an object containing the strings to use in formatting ( e.g.,
* month and day names, AM and PM strings, time zone names, etc.) * month and day names, AM and PM strings, time zone names, etc.)
*/ */
DateFormatSymbols* fSymbols; // Owned DateFormatSymbols* fSymbols; // Owned
/** /**
* The time zone formatter
*/
TimeZoneFormat* fTimeZoneFormat;
/**
* If dates have ambiguous years, we map them into the century starting * If dates have ambiguous years, we map them into the century starting
* at defaultCenturyStart, which may be any date. If defaultCenturySta rt is * at defaultCenturyStart, which may be any date. If defaultCenturySta rt is
* set to SYSTEM_DEFAULT_CENTURY, which it is by default, then the syst em * set to SYSTEM_DEFAULT_CENTURY, which it is by default, then the syst em
* values are used. The instance values defaultCenturyStart and * values are used. The instance values defaultCenturyStart and
* defaultCenturyStartYear are only used if explicitly set by the user * defaultCenturyStartYear are only used if explicitly set by the user
* through the API method parseAmbiguousDatesAsAfter(). * through the API method parseAmbiguousDatesAsAfter().
*/ */
UDate fDefaultCenturyStart; UDate fDefaultCenturyStart;
/** /**
 End of changes. 12 change blocks. 
4 lines changed or deleted 41 lines changed or added


 sortkey.h   sortkey.h 
/* /*
************************************************************************** *** ************************************************************************** ***
* Copyright (C) 1996-2006, International Business Machines Corporation and others. * Copyright (C) 1996-2011, 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 244 skipping to change at line 244
* ICU "poor man's RTTI", returns a UClassID for this class. * ICU "poor man's RTTI", returns a UClassID for this class.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @deprecated ICU 2.8 Use Collator::getSortKey(...) instead
*/ */
static UClassID U_EXPORT2 getStaticClassID(); static UClassID U_EXPORT2 getStaticClassID();
private: private:
/** /**
* Returns an array of the collation key values as 16-bit integers. * Returns an array of the collation key values as 16-bit integers.
* The caller owns the storage and must delete it. * The caller owns the storage and must delete it.
* @param values Output param of the collation key values. * @param values Output param of the collation key values.
* @param capacity Size of the values array.
* @param count output parameter of the number of collation key values * @param count output parameter of the number of collation key values
* @return a pointer to an array of 16-bit collation key values. * @return a pointer to an array of 16-bit collation key values.
*/ */
void adopt(uint8_t *values, int32_t count); void adopt(uint8_t *values, int32_t capacity, int32_t count);
/**
* Set a new length for a new sort key in the existing fBytes.
*/
void setLength(int32_t newLength);
/* /*
* Creates a collation key with a string. * Creates a collation key with a string.
*/ */
/** /**
* If this CollationKey has capacity less than newSize, * If this CollationKey has capacity less than newSize,
* its internal capacity will be increased to newSize. * its internal capacity will be increased to newSize.
* @param newSize minimum size this CollationKey has to have * @param newSize minimum size this CollationKey has to have
* @return this CollationKey * @return this CollationKey
 End of changes. 3 change blocks. 
2 lines changed or deleted 7 lines changed or added


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


 tblcoll.h   tblcoll.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 1996-2010, International Business Machines Corporation and * Copyright (C) 1996-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** *** *************************************************************************** ***
*/ */
/** /**
* \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 666 skipping to change at line 666
/** /**
* Sets the minimum strength to be used in comparison or transformation. * Sets the minimum strength to be used in comparison or transformation.
* @see RuleBasedCollator#getStrength * @see RuleBasedCollator#getStrength
* @param newStrength the new comparison level. * @param newStrength the new comparison level.
* @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead * @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead
*/ */
virtual void setStrength(ECollationStrength newStrength); virtual void setStrength(ECollationStrength newStrength);
/** /**
* Get the current reordering of scripts (if one has been set). * Retrieves the reordering codes for this collator.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
* @param destCapacity The length of dest. If it is 0, then dest may be * @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the function will only return the length of the result without wr NULL and the function
iting any of the result string (pre-flighting). * will only return the length of the result without writing any of th
* @param pErrorCode Must be a valid pointer to an error code value, wh e result string (pre-flighting).
ich must not indicate a failure before the function call. * @param status A reference to an error code value, which must not ind
* @return The length of the array of the script ordering. icate
* @see ucol_getReorderCodes * a failure before the function call.
* @internal * @return The length of the script ordering array.
* @see ucol_setReorderCodes
* @see Collator#getEquivalentReorderCodes
* @see Collator#setReorderCodes
* @draft ICU 4.8
*/ */
virtual int32_t getReorderCodes(int32_t* dest, virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Set the ordering of scripts for this collator. * Sets the ordering of scripts for this collator.
* @param reorderCodes An array of script codes in the new order. * @param reorderCodes An array of script codes in the new order. This
can be NULL if the
* length is also set to 0. An empty array will clear any reordering co
des on the collator.
* @param reorderCodesLength The length of reorderCodes. * @param reorderCodesLength The length of reorderCodes.
* @param status error code
* @see Collator#getReorderCodes
* @see Collator#getEquivalentReorderCodes
* @draft ICU 4.8
*/
virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength,
UErrorCode& status) ;
/**
* Retrieves the reorder codes that are grouped with the given reorder
code. Some reorder
* codes will be grouped and must reorder together.
* @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script equivalene reordering
codes.
* @param destCapacity The length of dest. If it is 0, then dest may be
NULL and the
* function will only return the length of the result without writing a
ny of the result
* string (pre-flighting).
* @param status A reference to an error code value, which must not ind
icate
* a failure before the function call.
* @return The length of the of the reordering code equivalence array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @internal * @see Collator#getReorderCodes
* @see Collator#setReorderCodes
* @draft ICU 4.8
*/ */
virtual void setReorderCodes(const int32_t* reorderCodes, static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
int32_t reorderCodesLength, int32_t* dest,
UErrorCode& status); int32_t destCapacity,
UErrorCode& status);
private: private:
// private static constants ------------------------------------------- ---- // private static constants ------------------------------------------- ----
enum { enum {
/* need look up in .commit() */ /* need look up in .commit() */
CHARINDEX = 0x70000000, CHARINDEX = 0x70000000,
/* Expand index follows */ /* Expand index follows */
EXPANDCHARINDEX = 0x7E000000, EXPANDCHARINDEX = 0x7E000000,
skipping to change at line 825 skipping to change at line 853
* @param locale desired locale name * @param locale desired locale name
* @param status error status * @param status error status
*/ */
void setUCollator(const char* locale, UErrorCode& status); void setUCollator(const char* locale, UErrorCode& status);
/** /**
* Creates the c struct for ucollator. This used internally by StringSea rch. * Creates the c struct for ucollator. This used internally by StringSea rch.
* Hence the responsibility of cleaning up the ucollator is not done by * Hence the responsibility of cleaning up the ucollator is not done by
* this RuleBasedCollator. The isDataOwned flag is set to FALSE. * this RuleBasedCollator. The isDataOwned flag is set to FALSE.
* @param collator new ucollator data * @param collator new ucollator data
* @param rules corresponding collation rules
*/ */
void setUCollator(UCollator *collator); void setUCollator(UCollator *collator);
public: public:
/** /**
* Get UCollator data struct. Used only by StringSearch & intltest. * Get UCollator data struct. Used only by StringSearch & intltest.
* @return UCollator data struct * @return UCollator data struct
* @internal * @internal
*/ */
const UCollator * getUCollator(); const UCollator * getUCollator();
 End of changes. 9 change blocks. 
18 lines changed or deleted 52 lines changed or added


 timezone.h   timezone.h 
/************************************************************************* /*************************************************************************
* Copyright (c) 1997-2010, International Business Machines Corporation * Copyright (c) 1997-2011, 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 42 skipping to change at line 42
/** /**
* \file * \file
* \brief C++ API: TimeZone object * \brief C++ API: TimeZone object
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/uobject.h" #include "unicode/uobject.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
#include "unicode/ures.h" #include "unicode/ures.h"
#include "unicode/ucal.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class StringEnumeration; class StringEnumeration;
/** /**
* *
* <code>TimeZone</code> represents a time zone offset, and also figures ou t daylight * <code>TimeZone</code> represents a time zone offset, and also figures ou t daylight
* savings. * savings.
* *
skipping to change at line 150 skipping to change at line 151
* or a custom ID such as "GMT-8:00". * or a custom ID such as "GMT-8:00".
* @return the specified <code>TimeZone</code>, or the GMT zone if the given ID * @return the specified <code>TimeZone</code>, or the GMT zone if the given ID
* cannot be understood. Return result guaranteed to be non-null. If you * cannot be understood. Return result guaranteed to be non-null. If you
* require that the specific zone asked for be returned, check the ID o f the * require that the specific zone asked for be returned, check the ID o f the
* return result. * return result.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static TimeZone* U_EXPORT2 createTimeZone(const UnicodeString& ID); static TimeZone* U_EXPORT2 createTimeZone(const UnicodeString& ID);
/** /**
* Returns an enumeration over system time zone IDs with the given
* filter conditions.
* @param zoneType The system time zone type.
* @param region The ISO 3166 two-letter country code or UN M.49
* three-digit area code. When NULL, no filtering
* done by region.
* @param rawOffset An offset from GMT in milliseconds, ignoring
* the effect of daylight savings time, if any.
* When NULL, no filtering done by zone offset.
* @param ec Output param to filled in with a success or
* an error.
* @return an enumeration object, owned by the caller.
* @draft ICU 4.8
*/
static StringEnumeration* U_EXPORT2 createTimeZoneIDEnumeration(
USystemTimeZoneType zoneType,
const char* region,
const int32_t* rawOffset,
UErrorCode& ec);
/**
* Returns an enumeration over all recognized time zone IDs. (i.e., * Returns an enumeration over all recognized time zone IDs. (i.e.,
* all strings that createTimeZone() accepts) * all strings that createTimeZone() accepts)
* *
* @return an enumeration object, owned by the caller. * @return an enumeration object, owned by the caller.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
static StringEnumeration* U_EXPORT2 createEnumeration(); static StringEnumeration* U_EXPORT2 createEnumeration();
/** /**
* Returns an enumeration over time zone IDs with a given raw * Returns an enumeration over time zone IDs with a given raw
skipping to change at line 557 skipping to change at line 579
* or in the default locale if the given locale is not re cognized. * or in the default locale if the given locale is not re cognized.
* @return A refence to 'result'. * @return A refence to 'result'.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString& getDisplayName(UBool daylight, EDisplayType style, const Locale& locale, UnicodeString& result) const; UnicodeString& getDisplayName(UBool daylight, EDisplayType style, const Locale& locale, UnicodeString& result) const;
/** /**
* Queries if this time zone uses daylight savings time. * Queries if this time zone uses daylight savings time.
* @return true if this time zone uses daylight savings time, * @return true if this time zone uses daylight savings time,
* false, otherwise. * false, otherwise.
* <p><strong>Note:</strong>The default implementation of
* ICU TimeZone uses the tz database, which supports historic
* rule changes, for system time zones. With the implementation,
* there are time zones that used daylight savings time in the
* past, but no longer used currently. For example, Asia/Tokyo has
* never used daylight savings time since 1951. Most clients would
* expect that this method to return <code>FALSE</code> for such case.
* The default implementation of this method returns <code>TRUE</code>
* when the time zone uses daylight savings time in the current
* (Gregorian) calendar year.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UBool useDaylightTime(void) const = 0; virtual UBool useDaylightTime(void) const = 0;
/** /**
* Queries if the given date is in daylight savings time in * Queries if the given date is in daylight savings time in
* this time zone. * this time zone.
* This method is wasteful since it creates a new GregorianCalendar and * This method is wasteful since it creates a new GregorianCalendar and
* deletes it each time it is called. This is a deprecated method * deletes it each time it is called. This is a deprecated method
* and provided only for Java compatibility. * and provided only for Java compatibility.
skipping to change at line 633 skipping to change at line 665
* <p> * <p>
* If an underlying TimeZone implementation subclass supports * If an underlying TimeZone implementation subclass supports
* historical Daylight Saving Time changes, this method returns * historical Daylight Saving Time changes, this method returns
* the known latest daylight saving value. * the known latest daylight saving value.
* *
* @return the amount of saving time in milliseconds * @return the amount of saving time in milliseconds
* @stable ICU 3.6 * @stable ICU 3.6
*/ */
virtual int32_t getDSTSavings() const; virtual int32_t getDSTSavings() const;
/**
* Gets the region code associated with the given
* system time zone ID. The region code is either ISO 3166
* 2-letter country code or UN M.49 3-digit area code.
* When the time zone is not associated with a specific location,
* for example - "Etc/UTC", "EST5EDT", then this method returns
* "001" (UN M.49 area code for World).
*
* @param id The system time zone ID.
* @param region Output buffer for receiving the region code.
* @param capacity The size of the output buffer.
* @param status Receives the status. When the given time zone
ID
* is not a known system time zone ID,
* U_ILLEGAL_ARGUMENT_ERROR is set.
* @return The length of the output region code.
* @draft ICU 4.8
*/
static int32_t U_EXPORT2 getRegion(const UnicodeString& id,
char *region, int32_t capacity, UErrorCode& status);
protected: protected:
/** /**
* Default constructor. ID is initialized to the empty string. * Default constructor. ID is initialized to the empty string.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
TimeZone(); TimeZone();
/** /**
* Construct a TimeZone with a given ID. * Construct a TimeZone with a given ID.
skipping to change at line 679 skipping to change at line 731
* @internal * @internal
*/ */
static UResourceBundle* loadRule(const UResourceBundle* top, const Unic odeString& ruleid, UResourceBundle* oldbundle, UErrorCode&status); static UResourceBundle* loadRule(const UResourceBundle* top, const Unic odeString& ruleid, UResourceBundle* oldbundle, UErrorCode&status);
private: private:
friend class ZoneMeta; friend class ZoneMeta;
static TimeZone* createCustomTimeZone(const UnicodeString&); // Creates a time zone based on the string. static TimeZone* createCustomTimeZone(const UnicodeString&); // Creates a time zone based on the string.
/** /**
* Finds the given ID in the Olson tzdata. If the given ID is found in
the tzdata,
* returns the pointer to the ID resource. This method is exposed throu
gh ZoneMeta class
* for ICU internal implementation and useful for building hashtable us
ing a time zone
* ID as a key.
* @param id zone id string
* @return the pointer of the ID resource, or NULL.
*/
static const UChar* findID(const UnicodeString& id);
/**
* Resolve a link in Olson tzdata. When the given id is known and it's not a link, * Resolve a link in Olson tzdata. When the given id is known and it's not a link,
* the id itself is returned. When the given id is known and it is a l ink, then * the id itself is returned. When the given id is known and it is a l ink, then
* dereferenced zone id is returned. When the given id is unknown, the n it returns * dereferenced zone id is returned. When the given id is unknown, the n it returns
* NULL. * NULL.
* @param id zone id string * @param id zone id string
* @return the dereferenced zone or NULL * @return the dereferenced zone or NULL
*/ */
static const UChar* dereferOlsonLink(const UnicodeString& id); static const UChar* dereferOlsonLink(const UnicodeString& id);
/** /**
* Returns the region code associated with the given zone. * Returns the region code associated with the given zone,
* or NULL if the zone is not known.
* @param id zone id string * @param id zone id string
* @return the region associated with the given zone * @return the region associated with the given zone
*/ */
static const UChar* getRegion(const UnicodeString& id); static const UChar* getRegion(const UnicodeString& id);
/** /**
* Returns the region code associated with the given zone,
* or NULL if the zone is not known.
* @param id zone id string
* @param status Status parameter
* @return the region associated with the given zone
*/
static const UChar* getRegion(const UnicodeString& id, UErrorCode& stat
us);
/**
* Parses the given custom time zone identifier * Parses the given custom time zone identifier
* @param id id A string of the form GMT[+-]hh:mm, GMT[+-]hhmm, or * @param id id A string of the form GMT[+-]hh:mm, GMT[+-]hhmm, or
* GMT[+-]hh. * GMT[+-]hh.
* @param sign Receves parsed sign, 1 for positive, -1 for negative. * @param sign Receves parsed sign, 1 for positive, -1 for negative.
* @param hour Receives parsed hour field * @param hour Receives parsed hour field
* @param minute Receives parsed minute field * @param minute Receives parsed minute field
* @param second Receives parsed second field * @param second Receives parsed second field
* @return Returns TRUE when the given custom id is valid. * @return Returns TRUE when the given custom id is valid.
*/ */
static UBool parseCustomID(const UnicodeString& id, int32_t& sign, int3 2_t& hour, static UBool parseCustomID(const UnicodeString& id, int32_t& sign, int3 2_t& hour,
int32_t& min, int32_t& sec); int32_t& minute, int32_t& second);
/** /**
* Parse a custom time zone identifier and return the normalized * Parse a custom time zone identifier and return the normalized
* custom time zone identifier for the given custom id string. * custom time zone identifier for the given custom id string.
* @param id a string of the form GMT[+-]hh:mm, GMT[+-]hhmm, or * @param id a string of the form GMT[+-]hh:mm, GMT[+-]hhmm, or
* GMT[+-]hh. * GMT[+-]hh.
* @param normalized Receives the normalized custom ID * @param normalized Receives the normalized custom ID
* @param status Receives the status. When the input ID string is inva lid, * @param status Receives the status. When the input ID string is inva lid,
* U_ILLEGAL_ARGUMENT_ERROR is set. * U_ILLEGAL_ARGUMENT_ERROR is set.
* @return The normalized custom id string. * @return The normalized custom id string.
*/ */
static UnicodeString& getCustomID(const UnicodeString& id, UnicodeStrin g& normalized, static UnicodeString& getCustomID(const UnicodeString& id, UnicodeStrin g& normalized,
UErrorCode& status); UErrorCode& status);
/** /**
* Returns the normalized custome time zone ID for the given offset fie lds. * Returns the normalized custome time zone ID for the given offset fie lds.
* @param hour offset hours * @param hour offset hours
* @param min offset minutes * @param min offset minutes
* @param sec offset seconds * @param sec offset seconds
* @param netative sign of the offset, TRUE for negative offset. * @param negative sign of the offset, TRUE for negative offset.
* @param id Receves the format result (normalized custom ID) * @param id Receves the format result (normalized custom ID)
* @return The reference to id * @return The reference to id
*/ */
static UnicodeString& formatCustomID(int32_t hour, int32_t min, int32_t sec, static UnicodeString& formatCustomID(int32_t hour, int32_t min, int32_t sec,
UBool negative, UnicodeString& id); UBool negative, UnicodeString& id);
/** /**
* Responsible for setting up DEFAULT_ZONE. Uses routines in TPlatform Utilities * Responsible for setting up DEFAULT_ZONE. Uses routines in TPlatform Utilities
* (i.e., platform-specific calls) to get the current system time zone. Failing * (i.e., platform-specific calls) to get the current system time zone. Failing
* that, uses the platform-specific default time zone. Failing that, u ses GMT. * that, uses the platform-specific default time zone. Failing that, u ses GMT.
skipping to change at line 749 skipping to change at line 821
// See source file for documentation // See source file for documentation
/** /**
* Lookup the given name in our system zone table. If found, * Lookup the given name in our system zone table. If found,
* instantiate a new zone of that name and return it. If not * instantiate a new zone of that name and return it. If not
* found, return 0. * found, return 0.
* @param name tthe given name of a system time zone. * @param name tthe given name of a system time zone.
* @return the TimeZone indicated by the 'name'. * @return the TimeZone indicated by the 'name'.
*/ */
static TimeZone* createSystemTimeZone(const UnicodeString& name) ; static TimeZone* createSystemTimeZone(const UnicodeString& name) ;
static TimeZone* createSystemTimeZone(const UnicodeString& name, UErrorCode& ec);
UnicodeString fID; // this time zone's ID UnicodeString fID; // this time zone's ID
friend class TZEnumeration;
}; };
// ------------------------------------- // -------------------------------------
inline UnicodeString& inline UnicodeString&
TimeZone::getID(UnicodeString& ID) const TimeZone::getID(UnicodeString& ID) const
{ {
ID = fID; ID = fID;
return ID; return ID;
} }
 End of changes. 12 change blocks. 
4 lines changed or deleted 83 lines changed or added


 tmutfmt.h   tmutfmt.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 2010, Google, International Business Machines Corporation * Copyright (C) 2008-2011, Google, International Business Machines Corpora
and * tion
* others. All Rights Reserved. * and others. All Rights Reserved.
*
************************************************************************** ***** ************************************************************************** *****
*/ */
#ifndef __TMUTFMT_H__ #ifndef __TMUTFMT_H__
#define __TMUTFMT_H__ #define __TMUTFMT_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
skipping to change at line 33 skipping to change at line 33
#include "unicode/measfmt.h" #include "unicode/measfmt.h"
#include "unicode/numfmt.h" #include "unicode/numfmt.h"
#include "unicode/plurrule.h" #include "unicode/plurrule.h"
/** /**
* @internal ICU 4.2 * @internal ICU 4.2
*/ */
union UHashTok; union UHashTok;
/**
* Constants for various styles.
* There are 2 styles: full name and abbreviated name.
* For example, for English, the full name for hour duration is "3 hours",
* and the abbreviated name is "3 hrs".
* @draft ICU 4.8
*/
enum UTimeUnitFormatStyle {
/** @draft ICU 4.8 */
UTMUTFMT_FULL_STYLE,
/** @draft ICU 4.8 */
UTMUTFMT_ABBREVIATED_STYLE,
/** @draft ICU 4.8 */
UTMUTFMT_FORMAT_STYLE_COUNT
};
typedef enum UTimeUnitFormatStyle UTimeUnitFormatStyle; /**< @draft ICU 4.8
*/
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class Hashtable; class Hashtable;
/** /**
* Format or parse a TimeUnitAmount, using plural rules for the units where available. * Format or parse a TimeUnitAmount, using plural rules for the units where available.
* *
* <P> * <P>
* Code Sample: * Code Sample:
* <pre> * <pre>
skipping to change at line 71 skipping to change at line 88
* *
* <P> * <P>
* @see TimeUnitAmount * @see TimeUnitAmount
* @see TimeUnitFormat * @see TimeUnitFormat
* @draft ICU 4.2 * @draft ICU 4.2
*/ */
class U_I18N_API TimeUnitFormat: public MeasureFormat { class U_I18N_API TimeUnitFormat: public MeasureFormat {
public: public:
/** /**
* Constants for various styles.
* There are 2 styles: full name and abbreviated name.
* For example, for English, the full name for hour duration is "3 hour
s",
* and the abbreviated name is "3 hrs".
* @draft ICU 4.2
*/
enum EStyle {
kFull = 0,
kAbbreviate = 1,
kTotal = kAbbreviate + 1
};
/**
* Create TimeUnitFormat with default locale, and full name style. * Create TimeUnitFormat with default locale, and full name style.
* Use setLocale and/or setFormat to modify. * Use setLocale and/or setFormat to modify.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
TimeUnitFormat(UErrorCode& status); TimeUnitFormat(UErrorCode& status);
/** /**
* Create TimeUnitFormat given locale, and full name style. * Create TimeUnitFormat given locale, and full name style.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
TimeUnitFormat(const Locale& locale, UErrorCode& status); TimeUnitFormat(const Locale& locale, UErrorCode& status);
/** /**
* Create TimeUnitFormat given locale and style. * Create TimeUnitFormat given locale and style.
* @draft ICU 4.2 * @draft ICU 4.8
*/ */
TimeUnitFormat(const Locale& locale, EStyle style, UErrorCode& status); TimeUnitFormat(const Locale& locale, UTimeUnitFormatStyle style, UError Code& status);
/** /**
* Copy constructor. * Copy constructor.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
TimeUnitFormat(const TimeUnitFormat&); TimeUnitFormat(const TimeUnitFormat&);
/** /**
* deconstructor * deconstructor
* @stable ICU 4.2 * @stable ICU 4.2
skipping to change at line 217 skipping to change at line 221
* other classes have different class IDs. * other classes have different class IDs.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
virtual UClassID getDynamicClassID(void) const; virtual UClassID getDynamicClassID(void) const;
private: private:
NumberFormat* fNumberFormat; NumberFormat* fNumberFormat;
Locale fLocale; Locale fLocale;
Hashtable* fTimeUnitToCountToPatterns[TimeUnit::UTIMEUNIT_FIELD_COUN T]; Hashtable* fTimeUnitToCountToPatterns[TimeUnit::UTIMEUNIT_FIELD_COUN T];
PluralRules* fPluralRules; PluralRules* fPluralRules;
EStyle fStyle; UTimeUnitFormatStyle fStyle;
void create(const Locale& locale, EStyle style, UErrorCode& status); void create(const Locale& locale, UTimeUnitFormatStyle style, UErrorCod e& status);
// it might actually be simpler to make them Decimal Formats later. // it might actually be simpler to make them Decimal Formats later.
// initialize all private data members // initialize all private data members
void setup(UErrorCode& status); void setup(UErrorCode& status);
// initialize data member without fill in data for fTimeUnitToCountToPa ttern // initialize data member without fill in data for fTimeUnitToCountToPa ttern
void initDataMembers(UErrorCode& status); void initDataMembers(UErrorCode& status);
// initialize fTimeUnitToCountToPatterns from current locale's resource . // initialize fTimeUnitToCountToPatterns from current locale's resource .
void readFromCurrentLocale(EStyle style, const char* key, UErrorCode& s tatus); void readFromCurrentLocale(UTimeUnitFormatStyle style, const char* key, UErrorCode& status);
// check completeness of fTimeUnitToCountToPatterns against all time un its, // check completeness of fTimeUnitToCountToPatterns against all time un its,
// and all plural rules, fill in fallback as necessary. // and all plural rules, fill in fallback as necessary.
void checkConsistency(EStyle style, const char* key, UErrorCode& status ); void checkConsistency(UTimeUnitFormatStyle style, const char* key, UErr orCode& status);
// fill in fTimeUnitToCountToPatterns from locale fall-back chain // fill in fTimeUnitToCountToPatterns from locale fall-back chain
void searchInLocaleChain(EStyle style, const char* key, const char* loc aleName, void searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, c onst char* localeName,
TimeUnit::UTimeUnitFields field, const char*, TimeUnit::UTimeUnitFields field, const char*,
const char*, Hashtable*, UErrorCode&); const char*, Hashtable*, UErrorCode&);
// initialize hash table // initialize hash table
Hashtable* initHash(UErrorCode& status); Hashtable* initHash(UErrorCode& status);
// delete hash table // delete hash table
void deleteHash(Hashtable* htable); void deleteHash(Hashtable* htable);
// copy hash table // copy hash table
 End of changes. 10 change blocks. 
25 lines changed or deleted 28 lines changed or added


 translit.h   translit.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1999-2008, International Business Machines * Copyright (C) 1999-2011, 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 655 skipping to change at line 655
/** /**
* Top-level transliteration method, handling filtering, incremental an d * Top-level transliteration method, handling filtering, incremental an d
* non-incremental transliteration, and rollback. All transliteration * non-incremental transliteration, and rollback. All transliteration
* public API methods eventually call this method with a rollback argum ent * public API methods eventually call this method with a rollback argum ent
* of TRUE. Other entities may call this method but rollback should be * of TRUE. Other entities may call this method but rollback should be
* FALSE. * FALSE.
* *
* <p>If this transliterator has a filter, break up the input text into runs * <p>If this transliterator has a filter, break up the input text into runs
* of unfiltered characters. Pass each run to * of unfiltered characters. Pass each run to
* <subclass>.handleTransliterate(). * subclass.handleTransliterate().
* *
* <p>In incremental mode, if rollback is TRUE, perform a special * <p>In incremental mode, if rollback is TRUE, perform a special
* incremental procedure in which several passes are made over the inpu t * incremental procedure in which several passes are made over the inpu t
* text, adding one character at a time, and committing successful * text, adding one character at a time, and committing successful
* transliterations as they occur. Unsuccessful transliterations are r olled * transliterations as they occur. Unsuccessful transliterations are r olled
* back and retried with additional characters to give correct results. * back and retried with additional characters to give correct results.
* *
* @param text the text to be transliterated * @param text the text to be transliterated
* @param index the position indices * @param index the position indices
* @param incremental if TRUE, then assume more characters may be inser ted * @param incremental if TRUE, then assume more characters may be inser ted
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 ucal.h   ucal.h 
/* /*
************************************************************************** ***** ************************************************************************** *****
* Copyright (C) 1996-2010, International Business Machines Corporation and * Copyright (C) 1996-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
************************************************************************** ***** ************************************************************************** *****
*/ */
#ifndef 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 143 skipping to change at line 143
* *
* <p> * <p>
* <code>Calendar</code> also provides a date arithmetic function for * <code>Calendar</code> also provides a date arithmetic function for
* adding the specified (signed) amount of time to a particular time field. * adding the specified (signed) amount of time to a particular time field.
* For example, subtracting 5 days from the date <code>September 12, 1996</ code> * For example, subtracting 5 days from the date <code>September 12, 1996</ code>
* results in <code>September 7, 1996</code>. * results in <code>September 7, 1996</code>.
* *
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
/**
* The time zone ID reserved for unknown time zone.
* @draft ICU 4.8
*/
#define UCAL_UNKNOWN_ZONE_ID "Etc/Unknown"
/** A calendar. /** A calendar.
* For usage in C programs. * For usage in C programs.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef void* UCalendar; typedef void* UCalendar;
/** Possible types of UCalendars /** Possible types of UCalendars
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
enum UCalendarType { enum UCalendarType {
skipping to change at line 519 skipping to change at line 525
/** AM */ /** AM */
UCAL_AM, UCAL_AM,
/** PM */ /** PM */
UCAL_PM UCAL_PM
}; };
/** @stable ICU 2.0 */ /** @stable ICU 2.0 */
typedef enum UCalendarAMPMs UCalendarAMPMs; typedef enum UCalendarAMPMs UCalendarAMPMs;
/** /**
* System time zone type constants used by filtering zones
* in ucal_openTimeZoneIDEnumeration.
* @see ucal_openTimeZoneIDEnumeration
* @draft ICU 4.8
*/
enum USystemTimeZoneType {
/**
* Any system zones.
* @draft ICU 4.8
*/
UCAL_ZONE_TYPE_ANY,
/**
* Canonical system zones.
* @draft ICU 4.8
*/
UCAL_ZONE_TYPE_CANONICAL,
/**
* Canonical system zones associated with actual locations.
* @draft ICU 4.8
*/
UCAL_ZONE_TYPE_CANONICAL_LOCATION
};
/** @draft ICU 4.8 */
typedef enum USystemTimeZoneType USystemTimeZoneType;
/**
* Create an enumeration over system time zone IDs with the given
* filter conditions.
* @param zoneType The system time zone type.
* @param region The ISO 3166 two-letter country code or UN M.49
* three-digit area code. When NULL, no filtering
* done by region.
* @param rawOffset An offset from GMT in milliseconds, ignoring the
* effect of daylight savings time, if any. When NULL,
* no filtering done by zone offset.
* @param ec A pointer to an UErrorCode to receive any errors
* @return an enumeration object that the caller must dispose of
* using enum_close(), or NULL upon failure. In case of failure,
* *ec will indicate the error.
* @draft ICU 4.8
*/
U_DRAFT UEnumeration* U_EXPORT2
ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* re
gion,
const int32_t* rawOffset, UErrorCode* ec);
/**
* Create an enumeration over all time zones. * Create an enumeration over all time zones.
* *
* @param ec input/output error code * @param ec input/output error code
* *
* @return an enumeration object that the caller must dispose of using * @return an enumeration object that the caller must dispose of using
* uenum_close(), or NULL upon failure. In case of failure *ec will * uenum_close(), or NULL upon failure. In case of failure *ec will
* indicate the error. * indicate the error.
* *
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
skipping to change at line 1281 skipping to change at line 1334
* @param cal The UCalendar to query. * @param cal The UCalendar to query.
* @param date The UDate in question. * @param date The UDate in question.
* @param status The error code for the operation. * @param status The error code for the operation.
* @return TRUE if the given UDate is in the weekend in * @return TRUE if the given UDate is in the weekend in
* this calendar system, FALSE otherwise. * this calendar system, FALSE otherwise.
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
U_STABLE UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status); ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
/**
* Return the difference between the target time and the time this calendar
object is currently set to.
* If the target time is after the current calendar setting, the the return
ed value will be positive.
* The field parameter specifies the units of the return value. For example
, if field is UCAL_MONTH
* and ucal_getFieldDifference returns 3, then the target time is 3 to less
than 4 months after the
* current calendar setting.
*
* As a side effect of this call, this calendar is advanced toward target b
y the given amount. That is,
* calling this function has the side effect of calling ucal_add on this ca
lendar with the specified
* field and an amount equal to the return value from this function.
*
* A typical way of using this function is to call it first with the larges
t field of interest, then
* with progressively smaller fields.
*
* @param cal The UCalendar to compare and update.
* @param target The target date to compare to the current calendar setting
.
* @param field The field to compare; one of UCAL_ERA, UCAL_YEAR, UCAL_MONT
H,
* UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL
_DAY_OF_WEEK,
* UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL
_MINUTE, UCAL_SECOND,
* UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET.
* @param status A pointer to an UErrorCode to receive any errors
* @return The date difference for the specified field.
* @draft ICU 4.8
*/
U_DRAFT int32_t U_EXPORT2
ucal_getFieldDifference(UCalendar* cal,
UDate target,
UCalendarDateFields field,
UErrorCode* status);
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 96 lines changed or added


 ucnv.h   ucnv.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1999-2010, International Business Machines * Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* ucnv.h: * ucnv.h:
* External APIs for the ICU's codeset conversion library * External APIs for the ICU's codeset conversion library
* Bertrand A. Damiba * Bertrand A. Damiba
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/04/99 helena Fixed internal header inclusion. * 04/04/99 helena Fixed internal header inclusion.
skipping to change at line 91 skipping to change at line 91
#define UCNV_SI 0x0F #define UCNV_SI 0x0F
/** Shift out for EBDCDIC_STATEFUL and iso2022 states @stable ICU 2.0 */ /** Shift out for EBDCDIC_STATEFUL and iso2022 states @stable ICU 2.0 */
#define UCNV_SO 0x0E #define UCNV_SO 0x0E
/** /**
* Enum for specifying basic types of converters * Enum for specifying basic types of converters
* @see ucnv_getType * @see ucnv_getType
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum { typedef enum {
/** @stable ICU 2.0 */
UCNV_UNSUPPORTED_CONVERTER = -1, UCNV_UNSUPPORTED_CONVERTER = -1,
/** @stable ICU 2.0 */
UCNV_SBCS = 0, UCNV_SBCS = 0,
/** @stable ICU 2.0 */
UCNV_DBCS = 1, UCNV_DBCS = 1,
/** @stable ICU 2.0 */
UCNV_MBCS = 2, UCNV_MBCS = 2,
/** @stable ICU 2.0 */
UCNV_LATIN_1 = 3, UCNV_LATIN_1 = 3,
/** @stable ICU 2.0 */
UCNV_UTF8 = 4, UCNV_UTF8 = 4,
/** @stable ICU 2.0 */
UCNV_UTF16_BigEndian = 5, UCNV_UTF16_BigEndian = 5,
/** @stable ICU 2.0 */
UCNV_UTF16_LittleEndian = 6, UCNV_UTF16_LittleEndian = 6,
/** @stable ICU 2.0 */
UCNV_UTF32_BigEndian = 7, UCNV_UTF32_BigEndian = 7,
/** @stable ICU 2.0 */
UCNV_UTF32_LittleEndian = 8, UCNV_UTF32_LittleEndian = 8,
/** @stable ICU 2.0 */
UCNV_EBCDIC_STATEFUL = 9, UCNV_EBCDIC_STATEFUL = 9,
/** @stable ICU 2.0 */
UCNV_ISO_2022 = 10, UCNV_ISO_2022 = 10,
/** @stable ICU 2.0 */
UCNV_LMBCS_1 = 11, UCNV_LMBCS_1 = 11,
/** @stable ICU 2.0 */
UCNV_LMBCS_2, UCNV_LMBCS_2,
/** @stable ICU 2.0 */
UCNV_LMBCS_3, UCNV_LMBCS_3,
/** @stable ICU 2.0 */
UCNV_LMBCS_4, UCNV_LMBCS_4,
/** @stable ICU 2.0 */
UCNV_LMBCS_5, UCNV_LMBCS_5,
/** @stable ICU 2.0 */
UCNV_LMBCS_6, UCNV_LMBCS_6,
/** @stable ICU 2.0 */
UCNV_LMBCS_8, UCNV_LMBCS_8,
/** @stable ICU 2.0 */
UCNV_LMBCS_11, UCNV_LMBCS_11,
/** @stable ICU 2.0 */
UCNV_LMBCS_16, UCNV_LMBCS_16,
/** @stable ICU 2.0 */
UCNV_LMBCS_17, UCNV_LMBCS_17,
/** @stable ICU 2.0 */
UCNV_LMBCS_18, UCNV_LMBCS_18,
/** @stable ICU 2.0 */
UCNV_LMBCS_19, UCNV_LMBCS_19,
/** @stable ICU 2.0 */
UCNV_LMBCS_LAST = UCNV_LMBCS_19, UCNV_LMBCS_LAST = UCNV_LMBCS_19,
/** @stable ICU 2.0 */
UCNV_HZ, UCNV_HZ,
/** @stable ICU 2.0 */
UCNV_SCSU, UCNV_SCSU,
/** @stable ICU 2.0 */
UCNV_ISCII, UCNV_ISCII,
/** @stable ICU 2.0 */
UCNV_US_ASCII, UCNV_US_ASCII,
/** @stable ICU 2.0 */
UCNV_UTF7, UCNV_UTF7,
/** @stable ICU 2.2 */
UCNV_BOCU1, UCNV_BOCU1,
/** @stable ICU 2.2 */
UCNV_UTF16, UCNV_UTF16,
/** @stable ICU 2.2 */
UCNV_UTF32, UCNV_UTF32,
/** @stable ICU 2.2 */
UCNV_CESU8, UCNV_CESU8,
/** @stable ICU 2.4 */
UCNV_IMAP_MAILBOX, UCNV_IMAP_MAILBOX,
/** @draft ICU 4.8 */
UCNV_COMPOUND_TEXT,
/* Number of converter types for which we have conversion routines. */ /* Number of converter types for which we have conversion routines. */
UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES
} UConverterType; } UConverterType;
/** /**
* Enum for specifying which platform a converter ID refers to. * Enum for specifying which platform a converter ID refers to.
* The use of platform/CCSID is not recommended. See ucnv_openCCSID(). * The use of platform/CCSID is not recommended. See ucnv_openCCSID().
* *
* @see ucnv_getPlatform * @see ucnv_getPlatform
* @see ucnv_openCCSID * @see ucnv_openCCSID
* @see ucnv_getCCSID * @see ucnv_getCCSID
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 1990 skipping to change at line 2026
* and this information is not needed for normal conversion. * and this information is not needed for normal conversion.
* @param cnv The converter in which the input is held as internal st ate * @param cnv The converter in which the input is held as internal st ate
* @param status ICU error code in/out parameter. * @param status ICU error code in/out parameter.
* Must fulfill U_SUCCESS before the function call. * Must fulfill U_SUCCESS before the function call.
* @return The number of chars in the state. -1 if an error is encountered. * @return The number of chars in the state. -1 if an error is encountered.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status); ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status);
/**
* Returns whether or not the charset of the converter has a fixed number o
f bytes
* per charset character.
* An example of this are converters that are of the type UCNV_SBCS or UCNV
_DBCS.
* Another example is UTF-32 which is always 4 bytes per character.
* A Unicode code point may be represented by more than one UTF-8 or UTF-16
code unit
* but a UTF-32 converter encodes each code point with 4 bytes.
* Note: This method is not intended to be used to determine whether the ch
arset has a
* fixed ratio of bytes to Unicode codes <i>units</i> for any particular Un
icode encoding form.
* FALSE is returned with the UErrorCode if error occurs or cnv is NULL.
* @param cnv The converter to be tested
* @param status ICU error code in/out paramter
* @return TRUE if the converter is fixed-width
* @draft ICU 4.8
*/
U_DRAFT UBool U_EXPORT2
ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status);
#endif #endif
#endif #endif
/*_UCNV*/ /*_UCNV*/
 End of changes. 39 change blocks. 
2 lines changed or deleted 61 lines changed or added


 uconfig.h   uconfig.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2002-2009, International Business Machines * Copyright (C) 2002-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* file name: 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 178 skipping to change at line 178
/** /**
* \def UCONFIG_NO_IDNA * \def UCONFIG_NO_IDNA
* This switch turns off IDNA. * This switch turns off IDNA.
* *
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#ifndef UCONFIG_NO_IDNA #ifndef UCONFIG_NO_IDNA
# define UCONFIG_NO_IDNA 0 # define UCONFIG_NO_IDNA 0
#endif #endif
/**
* \def UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
* Determines the default UMessagePatternApostropheMode.
* See the documentation for that enum.
*
* @draft ICU 4.8
*/
#ifndef UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
# define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE UMSGPAT_APOS_DOUBLE_OPTIO
NAL
#endif
/* i18n library switches -------------------------------------------------- -- */ /* i18n library switches -------------------------------------------------- -- */
/** /**
* \def UCONFIG_NO_COLLATION * \def UCONFIG_NO_COLLATION
* This switch turns off collation and collation-based string search. * This switch turns off collation and collation-based string search.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#ifndef UCONFIG_NO_COLLATION #ifndef UCONFIG_NO_COLLATION
# define UCONFIG_NO_COLLATION 0 # define UCONFIG_NO_COLLATION 0
 End of changes. 2 change blocks. 
1 lines changed or deleted 13 lines changed or added


 ucurr.h   ucurr.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (c) 2002-2010, International Business Machines * Copyright (c) 2002-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
*/ */
#ifndef _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 247 skipping to change at line 247
* variable. You can also | (or) them together to get a specific list of * variable. You can also | (or) them together to get a specific list of
* currencies. Most people will want to use the (UCURR_CURRENCY|UCURR_ NON_DEPRECATED) value to * currencies. Most people will want to use the (UCURR_CURRENCY|UCURR_ NON_DEPRECATED) value to
* get a list of current currencies. * get a list of current currencies.
* @param pErrorCode Error code * @param pErrorCode Error code
* @stable ICU 3.2 * @stable ICU 3.2
*/ */
U_STABLE UEnumeration * U_EXPORT2 U_STABLE UEnumeration * U_EXPORT2
ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode); ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
/** /**
* Queries if the given ISO 4217 3-letter code is available on the specifi
ed date range.
*
* Note: For checking availability of a currency on a specific date, speci
fy the date on both 'from' and 'to'
*
* When 'from' is U_DATE_MIN and 'to' is U_DATE_MAX, this method checks if
the specified currency is available any time.
* If 'from' and 'to' are same UDate value, this method checks if the spec
ified currency is available on that date.
*
* @param isoCode
* The ISO 4217 3-letter code.
*
* @param from
* The lower bound of the date range, inclusive. When 'from' is
U_DATE_MIN, check the availability
* of the currency any date before 'to'
*
* @param to
* The upper bound of the date range, inclusive. When 'to' is U
_DATE_MAX, check the availability of
* the currency any date after 'from'
*
* @param errorCode
* ICU error code
*
* @return TRUE if the given ISO 4217 3-letter code is supported on the sp
ecified date range.
*
* @draft ICU 4.8
*/
U_DRAFT UBool U_EXPORT2
ucurr_isAvailable(const UChar* isoCode,
UDate from,
UDate to,
UErrorCode* errorCode);
/**
* Finds the number of valid currency codes for the * Finds the number of valid currency codes for the
* given locale and date. * given locale and date.
* @param locale the locale for which to retrieve the * @param locale the locale for which to retrieve the
* currency count. * currency count.
* @param date the date for which to retrieve the * @param date the date for which to retrieve the
* currency count for the given locale. * currency count for the given locale.
* @param ec error code * @param ec error code
* @return the number of currency codes for the * @return the number of currency codes for the
* given locale and date. If 0, currency * given locale and date. If 0, currency
* codes couldn't be found for the input * codes couldn't be found for the input
 End of changes. 2 change blocks. 
1 lines changed or deleted 40 lines changed or added


 udeprctd.h   udeprctd.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2004-2010, International Business Machines * Copyright (C) 2004-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: udeprctd.h * file name: udeprctd.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: genheaders.pl, a perl script written by Ram Viswanadha * Created by: genheaders.pl, a perl script written by Ram Viswanadha
* *
skipping to change at line 34 skipping to change at line 34
#ifdef U_HIDE_DEPRECATED_API #ifdef U_HIDE_DEPRECATED_API
# if U_DISABLE_RENAMING # if U_DISABLE_RENAMING
# define ucol_getContractions ucol_getContractions_DEPRECATED_API_DO _NOT_USE # define ucol_getContractions ucol_getContractions_DEPRECATED_API_DO _NOT_USE
# define ucol_getLocale ucol_getLocale_DEPRECATED_API_DO_NOT_USE # define ucol_getLocale ucol_getLocale_DEPRECATED_API_DO_NOT_USE
# define ures_countArrayItems ures_countArrayItems_DEPRECATED_API_DO _NOT_USE # define ures_countArrayItems ures_countArrayItems_DEPRECATED_API_DO _NOT_USE
# define ures_getLocale ures_getLocale_DEPRECATED_API_DO_NOT_USE # define ures_getLocale ures_getLocale_DEPRECATED_API_DO_NOT_USE
# define ures_getVersionNumber ures_getVersionNumber_DEPRECATED_API_ DO_NOT_USE # define ures_getVersionNumber ures_getVersionNumber_DEPRECATED_API_ DO_NOT_USE
# define utrans_getAvailableID utrans_getAvailableID_DEPRECATED_API_ DO_NOT_USE # define utrans_getAvailableID utrans_getAvailableID_DEPRECATED_API_ DO_NOT_USE
# define utrans_getID utrans_getID_DEPRECATED_API_DO_NOT_USE # define utrans_getID utrans_getID_DEPRECATED_API_DO_NOT_USE
# define utrans_open utrans_open_DEPRECATED_API_DO_NOT_USE
# define utrans_unregister utrans_unregister_DEPRECATED_API_DO_NOT_U SE # define utrans_unregister utrans_unregister_DEPRECATED_API_DO_NOT_U SE
# else # else
# define ucol_getContractions_4_6 ucol_getContractions_DEPRECATED_AP # define ucol_getContractions_48 ucol_getContractions_DEPRECATED_API
I_DO_NOT_USE _DO_NOT_USE
# define ucol_getLocale_4_6 ucol_getLocale_DEPRECATED_API_DO_NOT_USE # define ucol_getLocale_48 ucol_getLocale_DEPRECATED_API_DO_NOT_USE
# define ures_countArrayItems_4_6 ures_countArrayItems_DEPRECATED_AP # define ures_countArrayItems_48 ures_countArrayItems_DEPRECATED_API
I_DO_NOT_USE _DO_NOT_USE
# define ures_getLocale_4_6 ures_getLocale_DEPRECATED_API_DO_NOT_USE # define ures_getLocale_48 ures_getLocale_DEPRECATED_API_DO_NOT_USE
# define ures_getVersionNumber_4_6 ures_getVersionNumber_DEPRECATED_ # define ures_getVersionNumber_48 ures_getVersionNumber_DEPRECATED_A
API_DO_NOT_USE PI_DO_NOT_USE
# define utrans_getAvailableID_4_6 utrans_getAvailableID_DEPRECATED_ # define utrans_getAvailableID_48 utrans_getAvailableID_DEPRECATED_A
API_DO_NOT_USE PI_DO_NOT_USE
# define utrans_getID_4_6 utrans_getID_DEPRECATED_API_DO_NOT_USE # define utrans_getID_48 utrans_getID_DEPRECATED_API_DO_NOT_USE
# define utrans_open_4_6 utrans_open_DEPRECATED_API_DO_NOT_USE # define utrans_unregister_48 utrans_unregister_DEPRECATED_API_DO_NO
# define utrans_unregister_4_6 utrans_unregister_DEPRECATED_API_DO_N T_USE
OT_USE
# endif /* U_DISABLE_RENAMING */ # endif /* U_DISABLE_RENAMING */
#endif /* U_HIDE_DEPRECATED_API */ #endif /* U_HIDE_DEPRECATED_API */
#endif /* UDEPRCTD_H */ #endif /* UDEPRCTD_H */
 End of changes. 3 change blocks. 
16 lines changed or deleted 14 lines changed or added


 udraft.h   udraft.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2004-2010, International Business Machines * Copyright (C) 2004-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: udraft.h * file name: udraft.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: genheaders.pl, a perl script written by Ram Viswanadha * Created by: genheaders.pl, a perl script written by Ram Viswanadha
* *
skipping to change at line 27 skipping to change at line 27
* THIS FILE IS MACHINE-GENERATED, DON'T PLAY WITH IT IF YOU DON'T KNOW WHA T * THIS FILE IS MACHINE-GENERATED, DON'T PLAY WITH IT IF YOU DON'T KNOW WHA T
* YOU ARE DOING, OTHERWISE VERY BAD THINGS WILL HAPPEN! * YOU ARE DOING, OTHERWISE VERY BAD THINGS WILL HAPPEN!
*/ */
#ifndef UDRAFT_H #ifndef UDRAFT_H
#define UDRAFT_H #define UDRAFT_H
#ifdef U_HIDE_DRAFT_API #ifdef U_HIDE_DRAFT_API
# if U_DISABLE_RENAMING # if U_DISABLE_RENAMING
# define StringPiece StringPiece_DRAFT_API_DO_NOT_USE
# define ubidi_getBaseDirection ubidi_getBaseDirection_DRAFT_API_DO_ NOT_USE # define ubidi_getBaseDirection ubidi_getBaseDirection_DRAFT_API_DO_ NOT_USE
# define ubidi_setContext ubidi_setContext_DRAFT_API_DO_NOT_USE
# define ucal_getFieldDifference ucal_getFieldDifference_DRAFT_API_D
O_NOT_USE
# define ucal_openTimeZoneIDEnumeration ucal_openTimeZoneIDEnumerati
on_DRAFT_API_DO_NOT_USE
# define ucnv_isFixedWidth ucnv_isFixedWidth_DRAFT_API_DO_NOT_USE
# define ucol_getEquivalentReorderCodes ucol_getEquivalentReorderCod
es_DRAFT_API_DO_NOT_USE
# define ucol_getReorderCodes ucol_getReorderCodes_DRAFT_API_DO_NOT_
USE
# define ucol_setReorderCodes ucol_setReorderCodes_DRAFT_API_DO_NOT_
USE
# define ucurr_isAvailable ucurr_isAvailable_DRAFT_API_DO_NOT_USE
# define uidna_close uidna_close_DRAFT_API_DO_NOT_USE # define uidna_close uidna_close_DRAFT_API_DO_NOT_USE
# define uidna_labelToASCII uidna_labelToASCII_DRAFT_API_DO_NOT_USE
# define uidna_labelToASCII_UTF8 uidna_labelToASCII_UTF8_DRAFT_API_D
O_NOT_USE
# define uidna_labelToUnicode uidna_labelToUnicode_DRAFT_API_DO_NOT_
USE
# define uidna_labelToUnicodeUTF8 uidna_labelToUnicodeUTF8_DRAFT_API
_DO_NOT_USE
# define uidna_nameToASCII uidna_nameToASCII_DRAFT_API_DO_NOT_USE
# define uidna_nameToASCII_UTF8 uidna_nameToASCII_UTF8_DRAFT_API_DO_
NOT_USE
# define uidna_nameToUnicode uidna_nameToUnicode_DRAFT_API_DO_NOT_US
E
# define uidna_nameToUnicodeUTF8 uidna_nameToUnicodeUTF8_DRAFT_API_D
O_NOT_USE
# define uidna_openUTS46 uidna_openUTS46_DRAFT_API_DO_NOT_USE # define uidna_openUTS46 uidna_openUTS46_DRAFT_API_DO_NOT_USE
# define uloc_forLanguageTag uloc_forLanguageTag_DRAFT_API_DO_NOT_US E # define uloc_forLanguageTag uloc_forLanguageTag_DRAFT_API_DO_NOT_US E
# define uloc_toLanguageTag uloc_toLanguageTag_DRAFT_API_DO_NOT_USE # define uloc_toLanguageTag uloc_toLanguageTag_DRAFT_API_DO_NOT_USE
# define unorm2_getDecomposition unorm2_getDecomposition_DRAFT_API_D O_NOT_USE # define unorm2_getDecomposition unorm2_getDecomposition_DRAFT_API_D O_NOT_USE
# define uregex_end64 uregex_end64_DRAFT_API_DO_NOT_USE # define uregex_end64 uregex_end64_DRAFT_API_DO_NOT_USE
# define uregex_find64 uregex_find64_DRAFT_API_DO_NOT_USE # define uregex_find64 uregex_find64_DRAFT_API_DO_NOT_USE
# define uregex_getFindProgressCallback uregex_getFindProgressCallba ck_DRAFT_API_DO_NOT_USE # define uregex_getFindProgressCallback uregex_getFindProgressCallba ck_DRAFT_API_DO_NOT_USE
# define uregex_lookingAt64 uregex_lookingAt64_DRAFT_API_DO_NOT_USE # define uregex_lookingAt64 uregex_lookingAt64_DRAFT_API_DO_NOT_USE
# define uregex_matches64 uregex_matches64_DRAFT_API_DO_NOT_USE # define uregex_matches64 uregex_matches64_DRAFT_API_DO_NOT_USE
# define uregex_patternUText uregex_patternUText_DRAFT_API_DO_NOT_US E # define uregex_patternUText uregex_patternUText_DRAFT_API_DO_NOT_US E
# define uregex_regionEnd64 uregex_regionEnd64_DRAFT_API_DO_NOT_USE # define uregex_regionEnd64 uregex_regionEnd64_DRAFT_API_DO_NOT_USE
# define uregex_regionStart64 uregex_regionStart64_DRAFT_API_DO_NOT_ USE # define uregex_regionStart64 uregex_regionStart64_DRAFT_API_DO_NOT_ USE
# define uregex_reset64 uregex_reset64_DRAFT_API_DO_NOT_USE # define uregex_reset64 uregex_reset64_DRAFT_API_DO_NOT_USE
# define uregex_setFindProgressCallback uregex_setFindProgressCallba ck_DRAFT_API_DO_NOT_USE # define uregex_setFindProgressCallback uregex_setFindProgressCallba ck_DRAFT_API_DO_NOT_USE
# define uregex_setRegion64 uregex_setRegion64_DRAFT_API_DO_NOT_USE # define uregex_setRegion64 uregex_setRegion64_DRAFT_API_DO_NOT_USE
# define uregex_setRegionAndStart uregex_setRegionAndStart_DRAFT_API _DO_NOT_USE # define uregex_setRegionAndStart uregex_setRegionAndStart_DRAFT_API _DO_NOT_USE
# define uregex_start64 uregex_start64_DRAFT_API_DO_NOT_USE # define uregex_start64 uregex_start64_DRAFT_API_DO_NOT_USE
# define uscript_getScriptExtensions uscript_getScriptExtensions_DRA FT_API_DO_NOT_USE # define uscript_getScriptExtensions uscript_getScriptExtensions_DRA FT_API_DO_NOT_USE
# define uscript_hasScript uscript_hasScript_DRAFT_API_DO_NOT_USE # define uscript_hasScript uscript_hasScript_DRAFT_API_DO_NOT_USE
# else # else
# define ubidi_getBaseDirection_4_6 ubidi_getBaseDirection_DRAFT_API # define StringPiece_48 StringPiece_DRAFT_API_DO_NOT_USE
_DO_NOT_USE # define ubidi_getBaseDirection_48 ubidi_getBaseDirection_DRAFT_API_
# define uidna_close_4_6 uidna_close_DRAFT_API_DO_NOT_USE DO_NOT_USE
# define uidna_labelToASCII_4_6 uidna_labelToASCII_DRAFT_API_DO_NOT_ # define ubidi_setContext_48 ubidi_setContext_DRAFT_API_DO_NOT_USE
USE # define ucal_getFieldDifference_48 ucal_getFieldDifference_DRAFT_AP
# define uidna_labelToASCII_UTF8_4_6 uidna_labelToASCII_UTF8_DRAFT_A I_DO_NOT_USE
PI_DO_NOT_USE # define ucal_openTimeZoneIDEnumeration_48 ucal_openTimeZoneIDEnumer
# define uidna_labelToUnicodeUTF8_4_6 uidna_labelToUnicodeUTF8_DRAFT ation_DRAFT_API_DO_NOT_USE
_API_DO_NOT_USE # define ucnv_isFixedWidth_48 ucnv_isFixedWidth_DRAFT_API_DO_NOT_USE
# define uidna_labelToUnicode_4_6 uidna_labelToUnicode_DRAFT_API_DO_ # define ucol_getEquivalentReorderCodes_48 ucol_getEquivalentReorder
NOT_USE Codes_DRAFT_API_DO_NOT_USE
# define uidna_nameToASCII_4_6 uidna_nameToASCII_DRAFT_API_DO_NOT_US # define ucol_getReorderCodes_48 ucol_getReorderCodes_DRAFT_API_DO_N
E OT_USE
# define uidna_nameToASCII_UTF8_4_6 uidna_nameToASCII_UTF8_DRAFT_API # define ucol_setReorderCodes_48 ucol_setReorderCodes_DRAFT_API_DO_N
_DO_NOT_USE OT_USE
# define uidna_nameToUnicodeUTF8_4_6 uidna_nameToUnicodeUTF8_DRAFT_A # define ucurr_isAvailable_48 ucurr_isAvailable_DRAFT_API_DO_NOT_USE
PI_DO_NOT_USE # define uidna_close_48 uidna_close_DRAFT_API_DO_NOT_USE
# define uidna_nameToUnicode_4_6 uidna_nameToUnicode_DRAFT_API_DO_NO # define uidna_openUTS46_48 uidna_openUTS46_DRAFT_API_DO_NOT_USE
T_USE # define uloc_forLanguageTag_48 uloc_forLanguageTag_DRAFT_API_DO_NOT
# define uidna_openUTS46_4_6 uidna_openUTS46_DRAFT_API_DO_NOT_USE _USE
# define uloc_forLanguageTag_4_6 uloc_forLanguageTag_DRAFT_API_DO_NO # define uloc_toLanguageTag_48 uloc_toLanguageTag_DRAFT_API_DO_NOT_U
T_USE SE
# define uloc_toLanguageTag_4_6 uloc_toLanguageTag_DRAFT_API_DO_NOT_ # define unorm2_getDecomposition_48 unorm2_getDecomposition_DRAFT_AP
USE I_DO_NOT_USE
# define unorm2_getDecomposition_4_6 unorm2_getDecomposition_DRAFT_A # define uregex_end64_48 uregex_end64_DRAFT_API_DO_NOT_USE
PI_DO_NOT_USE # define uregex_find64_48 uregex_find64_DRAFT_API_DO_NOT_USE
# define uregex_end64_4_6 uregex_end64_DRAFT_API_DO_NOT_USE # define uregex_getFindProgressCallback_48 uregex_getFindProgressCal
# define uregex_find64_4_6 uregex_find64_DRAFT_API_DO_NOT_USE lback_DRAFT_API_DO_NOT_USE
# define uregex_getFindProgressCallback_4_6 uregex_getFindProgressCa # define uregex_lookingAt64_48 uregex_lookingAt64_DRAFT_API_DO_NOT_U
llback_DRAFT_API_DO_NOT_USE SE
# define uregex_lookingAt64_4_6 uregex_lookingAt64_DRAFT_API_DO_NOT_ # define uregex_matches64_48 uregex_matches64_DRAFT_API_DO_NOT_USE
USE # define uregex_patternUText_48 uregex_patternUText_DRAFT_API_DO_NOT
# define uregex_matches64_4_6 uregex_matches64_DRAFT_API_DO_NOT_USE _USE
# define uregex_patternUText_4_6 uregex_patternUText_DRAFT_API_DO_NO # define uregex_regionEnd64_48 uregex_regionEnd64_DRAFT_API_DO_NOT_U
T_USE SE
# define uregex_regionEnd64_4_6 uregex_regionEnd64_DRAFT_API_DO_NOT_ # define uregex_regionStart64_48 uregex_regionStart64_DRAFT_API_DO_N
USE OT_USE
# define uregex_regionStart64_4_6 uregex_regionStart64_DRAFT_API_DO_ # define uregex_reset64_48 uregex_reset64_DRAFT_API_DO_NOT_USE
NOT_USE # define uregex_setFindProgressCallback_48 uregex_setFindProgressCal
# define uregex_reset64_4_6 uregex_reset64_DRAFT_API_DO_NOT_USE lback_DRAFT_API_DO_NOT_USE
# define uregex_setFindProgressCallback_4_6 uregex_setFindProgressCa # define uregex_setRegion64_48 uregex_setRegion64_DRAFT_API_DO_NOT_U
llback_DRAFT_API_DO_NOT_USE SE
# define uregex_setRegion64_4_6 uregex_setRegion64_DRAFT_API_DO_NOT_ # define uregex_setRegionAndStart_48 uregex_setRegionAndStart_DRAFT_
USE API_DO_NOT_USE
# define uregex_setRegionAndStart_4_6 uregex_setRegionAndStart_DRAFT # define uregex_start64_48 uregex_start64_DRAFT_API_DO_NOT_USE
_API_DO_NOT_USE # define uscript_getScriptExtensions_48 uscript_getScriptExtensions_
# define uregex_start64_4_6 uregex_start64_DRAFT_API_DO_NOT_USE DRAFT_API_DO_NOT_USE
# define uscript_getScriptExtensions_4_6 uscript_getScriptExtensions # define uscript_hasScript_48 uscript_hasScript_DRAFT_API_DO_NOT_USE
_DRAFT_API_DO_NOT_USE
# define uscript_hasScript_4_6 uscript_hasScript_DRAFT_API_DO_NOT_US
E
# endif /* U_DISABLE_RENAMING */ # endif /* U_DISABLE_RENAMING */
#endif /* U_HIDE_DRAFT_API */ #endif /* U_HIDE_DRAFT_API */
#endif /* UDRAFT_H */ #endif /* UDRAFT_H */
 End of changes. 5 change blocks. 
66 lines changed or deleted 63 lines changed or added


 uintrnal.h   uintrnal.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2004-2010, International Business Machines * Copyright (C) 2004-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: uintrnal.h * file name: uintrnal.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: genheaders.pl, a perl script written by Ram Viswanadha * Created by: genheaders.pl, a perl script written by Ram Viswanadha
* *
skipping to change at line 97 skipping to change at line 97
# define pl_visualRun pl_visualRun_INTERNAL_API_DO_NOT_USE # define pl_visualRun pl_visualRun_INTERNAL_API_DO_NOT_USE
# define ucd_close ucd_close_INTERNAL_API_DO_NOT_USE # define ucd_close ucd_close_INTERNAL_API_DO_NOT_USE
# define ucd_flushCache ucd_flushCache_INTERNAL_API_DO_NOT_USE # define ucd_flushCache ucd_flushCache_INTERNAL_API_DO_NOT_USE
# define ucd_freeCache ucd_freeCache_INTERNAL_API_DO_NOT_USE # define ucd_freeCache ucd_freeCache_INTERNAL_API_DO_NOT_USE
# define ucd_getCollator ucd_getCollator_INTERNAL_API_DO_NOT_USE # define ucd_getCollator ucd_getCollator_INTERNAL_API_DO_NOT_USE
# define ucd_open ucd_open_INTERNAL_API_DO_NOT_USE # define ucd_open ucd_open_INTERNAL_API_DO_NOT_USE
# define ucol_equals ucol_equals_INTERNAL_API_DO_NOT_USE # define ucol_equals ucol_equals_INTERNAL_API_DO_NOT_USE
# define ucol_forceHanImplicit ucol_forceHanImplicit_INTERNAL_API_DO _NOT_USE # define ucol_forceHanImplicit ucol_forceHanImplicit_INTERNAL_API_DO _NOT_USE
# define ucol_forgetUCA ucol_forgetUCA_INTERNAL_API_DO_NOT_USE # define ucol_forgetUCA ucol_forgetUCA_INTERNAL_API_DO_NOT_USE
# define ucol_getAttributeOrDefault ucol_getAttributeOrDefault_INTER NAL_API_DO_NOT_USE # define ucol_getAttributeOrDefault ucol_getAttributeOrDefault_INTER NAL_API_DO_NOT_USE
# define ucol_getReorderCodes ucol_getReorderCodes_INTERNAL_API_DO_N OT_USE
# define ucol_getUnsafeSet ucol_getUnsafeSet_INTERNAL_API_DO_NOT_USE # define ucol_getUnsafeSet ucol_getUnsafeSet_INTERNAL_API_DO_NOT_USE
# define ucol_nextProcessed ucol_nextProcessed_INTERNAL_API_DO_NOT_U SE # define ucol_nextProcessed ucol_nextProcessed_INTERNAL_API_DO_NOT_U SE
# define ucol_prepareShortStringOpen ucol_prepareShortStringOpen_INT ERNAL_API_DO_NOT_USE
# define ucol_previousProcessed ucol_previousProcessed_INTERNAL_API_ DO_NOT_USE # define ucol_previousProcessed ucol_previousProcessed_INTERNAL_API_ DO_NOT_USE
# define ucol_setReorderCodes ucol_setReorderCodes_INTERNAL_API_DO_N OT_USE
# define udat_applyPatternRelative udat_applyPatternRelative_INTERNA L_API_DO_NOT_USE # define udat_applyPatternRelative udat_applyPatternRelative_INTERNA L_API_DO_NOT_USE
# define udat_toPatternRelativeDate udat_toPatternRelativeDate_INTER NAL_API_DO_NOT_USE # define udat_toPatternRelativeDate udat_toPatternRelativeDate_INTER NAL_API_DO_NOT_USE
# define udat_toPatternRelativeTime udat_toPatternRelativeTime_INTER NAL_API_DO_NOT_USE # define udat_toPatternRelativeTime udat_toPatternRelativeTime_INTER NAL_API_DO_NOT_USE
# define uplug_getConfiguration uplug_getConfiguration_INTERNAL_API_ DO_NOT_USE # define uplug_getConfiguration uplug_getConfiguration_INTERNAL_API_ DO_NOT_USE
# define uplug_getContext uplug_getContext_INTERNAL_API_DO_NOT_USE # define uplug_getContext uplug_getContext_INTERNAL_API_DO_NOT_USE
# define uplug_getCurrentLevel uplug_getCurrentLevel_INTERNAL_API_DO _NOT_USE # define uplug_getCurrentLevel uplug_getCurrentLevel_INTERNAL_API_DO _NOT_USE
# define uplug_getLibrary uplug_getLibrary_INTERNAL_API_DO_NOT_USE # define uplug_getLibrary uplug_getLibrary_INTERNAL_API_DO_NOT_USE
# define uplug_getLibraryName uplug_getLibraryName_INTERNAL_API_DO_N OT_USE # define uplug_getLibraryName uplug_getLibraryName_INTERNAL_API_DO_N OT_USE
# define uplug_getPlugLevel uplug_getPlugLevel_INTERNAL_API_DO_NOT_U SE # define uplug_getPlugLevel uplug_getPlugLevel_INTERNAL_API_DO_NOT_U SE
# define uplug_getPlugLoadStatus uplug_getPlugLoadStatus_INTERNAL_AP I_DO_NOT_USE # define uplug_getPlugLoadStatus uplug_getPlugLoadStatus_INTERNAL_AP I_DO_NOT_USE
skipping to change at line 128 skipping to change at line 125
# define uplug_removePlug uplug_removePlug_INTERNAL_API_DO_NOT_USE # define uplug_removePlug uplug_removePlug_INTERNAL_API_DO_NOT_USE
# define uplug_setContext uplug_setContext_INTERNAL_API_DO_NOT_USE # define uplug_setContext uplug_setContext_INTERNAL_API_DO_NOT_USE
# define uplug_setPlugLevel uplug_setPlugLevel_INTERNAL_API_DO_NOT_U SE # define uplug_setPlugLevel uplug_setPlugLevel_INTERNAL_API_DO_NOT_U SE
# define uplug_setPlugName uplug_setPlugName_INTERNAL_API_DO_NOT_USE # define uplug_setPlugName uplug_setPlugName_INTERNAL_API_DO_NOT_USE
# define uplug_setPlugNoUnload uplug_setPlugNoUnload_INTERNAL_API_DO _NOT_USE # define uplug_setPlugNoUnload uplug_setPlugNoUnload_INTERNAL_API_DO _NOT_USE
# define uprv_getDefaultCodepage uprv_getDefaultCodepage_INTERNAL_AP I_DO_NOT_USE # define uprv_getDefaultCodepage uprv_getDefaultCodepage_INTERNAL_AP I_DO_NOT_USE
# define uprv_getDefaultLocaleID uprv_getDefaultLocaleID_INTERNAL_AP I_DO_NOT_USE # define uprv_getDefaultLocaleID uprv_getDefaultLocaleID_INTERNAL_AP I_DO_NOT_USE
# define ures_openFillIn ures_openFillIn_INTERNAL_API_DO_NOT_USE # define ures_openFillIn ures_openFillIn_INTERNAL_API_DO_NOT_USE
# define usearch_search usearch_search_INTERNAL_API_DO_NOT_USE # define usearch_search usearch_search_INTERNAL_API_DO_NOT_USE
# define usearch_searchBackwards usearch_searchBackwards_INTERNAL_AP I_DO_NOT_USE # define usearch_searchBackwards usearch_searchBackwards_INTERNAL_AP I_DO_NOT_USE
# define utext_caseCompare utext_caseCompare_INTERNAL_API_DO_NOT_USE
# define utext_caseCompareNativeLimit utext_caseCompareNativeLimit_I
NTERNAL_API_DO_NOT_USE
# define utext_compare utext_compare_INTERNAL_API_DO_NOT_USE
# define utext_compareNativeLimit utext_compareNativeLimit_INTERNAL_
API_DO_NOT_USE
# define utf8_appendCharSafeBody utf8_appendCharSafeBody_INTERNAL_AP I_DO_NOT_USE # define utf8_appendCharSafeBody utf8_appendCharSafeBody_INTERNAL_AP I_DO_NOT_USE
# define utf8_back1SafeBody utf8_back1SafeBody_INTERNAL_API_DO_NOT_U SE # define utf8_back1SafeBody utf8_back1SafeBody_INTERNAL_API_DO_NOT_U SE
# define utf8_countTrailBytes utf8_countTrailBytes_INTERNAL_API_DO_N OT_USE # define utf8_countTrailBytes utf8_countTrailBytes_INTERNAL_API_DO_N OT_USE
# define utf8_nextCharSafeBody utf8_nextCharSafeBody_INTERNAL_API_DO _NOT_USE # define utf8_nextCharSafeBody utf8_nextCharSafeBody_INTERNAL_API_DO _NOT_USE
# define utf8_prevCharSafeBody utf8_prevCharSafeBody_INTERNAL_API_DO _NOT_USE # define utf8_prevCharSafeBody utf8_prevCharSafeBody_INTERNAL_API_DO _NOT_USE
# else # else
# define RegexPatternDump_4_6 RegexPatternDump_INTERNAL_API_DO_NOT_U # define RegexPatternDump_48 RegexPatternDump_INTERNAL_API_DO_NOT_US
SE E
# define bms_close_4_6 bms_close_INTERNAL_API_DO_NOT_USE # define bms_close_48 bms_close_INTERNAL_API_DO_NOT_USE
# define bms_empty_4_6 bms_empty_INTERNAL_API_DO_NOT_USE # define bms_empty_48 bms_empty_INTERNAL_API_DO_NOT_USE
# define bms_getData_4_6 bms_getData_INTERNAL_API_DO_NOT_USE # define bms_getData_48 bms_getData_INTERNAL_API_DO_NOT_USE
# define bms_open_4_6 bms_open_INTERNAL_API_DO_NOT_USE # define bms_open_48 bms_open_INTERNAL_API_DO_NOT_USE
# define bms_search_4_6 bms_search_INTERNAL_API_DO_NOT_USE # define bms_search_48 bms_search_INTERNAL_API_DO_NOT_USE
# define bms_setTargetString_4_6 bms_setTargetString_INTERNAL_API_DO # define bms_setTargetString_48 bms_setTargetString_INTERNAL_API_DO_
_NOT_USE NOT_USE
# define pl_addFontRun_4_6 pl_addFontRun_INTERNAL_API_DO_NOT_USE # define pl_addFontRun_48 pl_addFontRun_INTERNAL_API_DO_NOT_USE
# define pl_addLocaleRun_4_6 pl_addLocaleRun_INTERNAL_API_DO_NOT_USE # define pl_addLocaleRun_48 pl_addLocaleRun_INTERNAL_API_DO_NOT_USE
# define pl_addValueRun_4_6 pl_addValueRun_INTERNAL_API_DO_NOT_USE # define pl_addValueRun_48 pl_addValueRun_INTERNAL_API_DO_NOT_USE
# define pl_close_4_6 pl_close_INTERNAL_API_DO_NOT_USE # define pl_closeFontRuns_48 pl_closeFontRuns_INTERNAL_API_DO_NOT_US
# define pl_closeFontRuns_4_6 pl_closeFontRuns_INTERNAL_API_DO_NOT_U E
SE # define pl_closeLine_48 pl_closeLine_INTERNAL_API_DO_NOT_USE
# define pl_closeLine_4_6 pl_closeLine_INTERNAL_API_DO_NOT_USE # define pl_closeLocaleRuns_48 pl_closeLocaleRuns_INTERNAL_API_DO_NO
# define pl_closeLocaleRuns_4_6 pl_closeLocaleRuns_INTERNAL_API_DO_N T_USE
OT_USE # define pl_closeValueRuns_48 pl_closeValueRuns_INTERNAL_API_DO_NOT_
# define pl_closeValueRuns_4_6 pl_closeValueRuns_INTERNAL_API_DO_NOT USE
_USE # define pl_close_48 pl_close_INTERNAL_API_DO_NOT_USE
# define pl_countLineRuns_4_6 pl_countLineRuns_INTERNAL_API_DO_NOT_U # define pl_countLineRuns_48 pl_countLineRuns_INTERNAL_API_DO_NOT_US
SE E
# define pl_getAscent_4_6 pl_getAscent_INTERNAL_API_DO_NOT_USE # define pl_getAscent_48 pl_getAscent_INTERNAL_API_DO_NOT_USE
# define pl_getDescent_4_6 pl_getDescent_INTERNAL_API_DO_NOT_USE # define pl_getDescent_48 pl_getDescent_INTERNAL_API_DO_NOT_USE
# define pl_getFontRunCount_4_6 pl_getFontRunCount_INTERNAL_API_DO_N # define pl_getFontRunCount_48 pl_getFontRunCount_INTERNAL_API_DO_NO
OT_USE T_USE
# define pl_getFontRunFont_4_6 pl_getFontRunFont_INTERNAL_API_DO_NOT # define pl_getFontRunFont_48 pl_getFontRunFont_INTERNAL_API_DO_NOT_
_USE USE
# define pl_getFontRunLastLimit_4_6 pl_getFontRunLastLimit_INTERNAL_ # define pl_getFontRunLastLimit_48 pl_getFontRunLastLimit_INTERNAL_A
API_DO_NOT_USE PI_DO_NOT_USE
# define pl_getFontRunLimit_4_6 pl_getFontRunLimit_INTERNAL_API_DO_N # define pl_getFontRunLimit_48 pl_getFontRunLimit_INTERNAL_API_DO_NO
OT_USE T_USE
# define pl_getLeading_4_6 pl_getLeading_INTERNAL_API_DO_NOT_USE # define pl_getLeading_48 pl_getLeading_INTERNAL_API_DO_NOT_USE
# define pl_getLineAscent_4_6 pl_getLineAscent_INTERNAL_API_DO_NOT_U # define pl_getLineAscent_48 pl_getLineAscent_INTERNAL_API_DO_NOT_US
SE E
# define pl_getLineDescent_4_6 pl_getLineDescent_INTERNAL_API_DO_NOT # define pl_getLineDescent_48 pl_getLineDescent_INTERNAL_API_DO_NOT_
_USE USE
# define pl_getLineLeading_4_6 pl_getLineLeading_INTERNAL_API_DO_NOT # define pl_getLineLeading_48 pl_getLineLeading_INTERNAL_API_DO_NOT_
_USE USE
# define pl_getLineVisualRun_4_6 pl_getLineVisualRun_INTERNAL_API_DO # define pl_getLineVisualRun_48 pl_getLineVisualRun_INTERNAL_API_DO_
_NOT_USE NOT_USE
# define pl_getLineWidth_4_6 pl_getLineWidth_INTERNAL_API_DO_NOT_USE # define pl_getLineWidth_48 pl_getLineWidth_INTERNAL_API_DO_NOT_USE
# define pl_getLocaleRunCount_4_6 pl_getLocaleRunCount_INTERNAL_API_ # define pl_getLocaleRunCount_48 pl_getLocaleRunCount_INTERNAL_API_D
DO_NOT_USE O_NOT_USE
# define pl_getLocaleRunLastLimit_4_6 pl_getLocaleRunLastLimit_INTER # define pl_getLocaleRunLastLimit_48 pl_getLocaleRunLastLimit_INTERN
NAL_API_DO_NOT_USE AL_API_DO_NOT_USE
# define pl_getLocaleRunLimit_4_6 pl_getLocaleRunLimit_INTERNAL_API_ # define pl_getLocaleRunLimit_48 pl_getLocaleRunLimit_INTERNAL_API_D
DO_NOT_USE O_NOT_USE
# define pl_getLocaleRunLocale_4_6 pl_getLocaleRunLocale_INTERNAL_AP # define pl_getLocaleRunLocale_48 pl_getLocaleRunLocale_INTERNAL_API
I_DO_NOT_USE _DO_NOT_USE
# define pl_getParagraphLevel_4_6 pl_getParagraphLevel_INTERNAL_API_ # define pl_getParagraphLevel_48 pl_getParagraphLevel_INTERNAL_API_D
DO_NOT_USE O_NOT_USE
# define pl_getTextDirection_4_6 pl_getTextDirection_INTERNAL_API_DO # define pl_getTextDirection_48 pl_getTextDirection_INTERNAL_API_DO_
_NOT_USE NOT_USE
# define pl_getValueRunCount_4_6 pl_getValueRunCount_INTERNAL_API_DO # define pl_getValueRunCount_48 pl_getValueRunCount_INTERNAL_API_DO_
_NOT_USE NOT_USE
# define pl_getValueRunLastLimit_4_6 pl_getValueRunLastLimit_INTERNA # define pl_getValueRunLastLimit_48 pl_getValueRunLastLimit_INTERNAL
L_API_DO_NOT_USE _API_DO_NOT_USE
# define pl_getValueRunLimit_4_6 pl_getValueRunLimit_INTERNAL_API_DO # define pl_getValueRunLimit_48 pl_getValueRunLimit_INTERNAL_API_DO_
_NOT_USE NOT_USE
# define pl_getValueRunValue_4_6 pl_getValueRunValue_INTERNAL_API_DO # define pl_getValueRunValue_48 pl_getValueRunValue_INTERNAL_API_DO_
_NOT_USE NOT_USE
# define pl_getVisualRunAscent_4_6 pl_getVisualRunAscent_INTERNAL_AP # define pl_getVisualRunAscent_48 pl_getVisualRunAscent_INTERNAL_API
I_DO_NOT_USE _DO_NOT_USE
# define pl_getVisualRunDescent_4_6 pl_getVisualRunDescent_INTERNAL_ # define pl_getVisualRunDescent_48 pl_getVisualRunDescent_INTERNAL_A
API_DO_NOT_USE PI_DO_NOT_USE
# define pl_getVisualRunDirection_4_6 pl_getVisualRunDirection_INTER # define pl_getVisualRunDirection_48 pl_getVisualRunDirection_INTERN
NAL_API_DO_NOT_USE AL_API_DO_NOT_USE
# define pl_getVisualRunFont_4_6 pl_getVisualRunFont_INTERNAL_API_DO # define pl_getVisualRunFont_48 pl_getVisualRunFont_INTERNAL_API_DO_
_NOT_USE NOT_USE
# define pl_getVisualRunGlyphCount_4_6 pl_getVisualRunGlyphCount_INT # define pl_getVisualRunGlyphCount_48 pl_getVisualRunGlyphCount_INTE
ERNAL_API_DO_NOT_USE RNAL_API_DO_NOT_USE
# define pl_getVisualRunGlyphToCharMap_4_6 pl_getVisualRunGlyphToCha # define pl_getVisualRunGlyphToCharMap_48 pl_getVisualRunGlyphToChar
rMap_INTERNAL_API_DO_NOT_USE Map_INTERNAL_API_DO_NOT_USE
# define pl_getVisualRunGlyphs_4_6 pl_getVisualRunGlyphs_INTERNAL_AP # define pl_getVisualRunGlyphs_48 pl_getVisualRunGlyphs_INTERNAL_API
I_DO_NOT_USE _DO_NOT_USE
# define pl_getVisualRunLeading_4_6 pl_getVisualRunLeading_INTERNAL_ # define pl_getVisualRunLeading_48 pl_getVisualRunLeading_INTERNAL_A
API_DO_NOT_USE PI_DO_NOT_USE
# define pl_getVisualRunPositions_4_6 pl_getVisualRunPositions_INTER # define pl_getVisualRunPositions_48 pl_getVisualRunPositions_INTERN
NAL_API_DO_NOT_USE AL_API_DO_NOT_USE
# define pl_line_4_6 pl_line_INTERNAL_API_DO_NOT_USE # define pl_line_48 pl_line_INTERNAL_API_DO_NOT_USE
# define pl_nextLine_4_6 pl_nextLine_INTERNAL_API_DO_NOT_USE # define pl_nextLine_48 pl_nextLine_INTERNAL_API_DO_NOT_USE
# define pl_openEmptyFontRuns_4_6 pl_openEmptyFontRuns_INTERNAL_API_ # define pl_openEmptyFontRuns_48 pl_openEmptyFontRuns_INTERNAL_API_D
DO_NOT_USE O_NOT_USE
# define pl_openEmptyLocaleRuns_4_6 pl_openEmptyLocaleRuns_INTERNAL_ # define pl_openEmptyLocaleRuns_48 pl_openEmptyLocaleRuns_INTERNAL_A
API_DO_NOT_USE PI_DO_NOT_USE
# define pl_openEmptyValueRuns_4_6 pl_openEmptyValueRuns_INTERNAL_AP # define pl_openEmptyValueRuns_48 pl_openEmptyValueRuns_INTERNAL_API
I_DO_NOT_USE _DO_NOT_USE
# define pl_openFontRuns_4_6 pl_openFontRuns_INTERNAL_API_DO_NOT_USE # define pl_openFontRuns_48 pl_openFontRuns_INTERNAL_API_DO_NOT_USE
# define pl_openLocaleRuns_4_6 pl_openLocaleRuns_INTERNAL_API_DO_NOT # define pl_openLocaleRuns_48 pl_openLocaleRuns_INTERNAL_API_DO_NOT_
_USE USE
# define pl_openValueRuns_4_6 pl_openValueRuns_INTERNAL_API_DO_NOT_U # define pl_openValueRuns_48 pl_openValueRuns_INTERNAL_API_DO_NOT_US
SE E
# define pl_paragraph_4_6 pl_paragraph_INTERNAL_API_DO_NOT_USE # define pl_paragraph_48 pl_paragraph_INTERNAL_API_DO_NOT_USE
# define pl_reflow_4_6 pl_reflow_INTERNAL_API_DO_NOT_USE # define pl_reflow_48 pl_reflow_INTERNAL_API_DO_NOT_USE
# define pl_resetFontRuns_4_6 pl_resetFontRuns_INTERNAL_API_DO_NOT_U # define pl_resetFontRuns_48 pl_resetFontRuns_INTERNAL_API_DO_NOT_US
SE E
# define pl_resetLocaleRuns_4_6 pl_resetLocaleRuns_INTERNAL_API_DO_N # define pl_resetLocaleRuns_48 pl_resetLocaleRuns_INTERNAL_API_DO_NO
OT_USE T_USE
# define pl_resetValueRuns_4_6 pl_resetValueRuns_INTERNAL_API_DO_NOT # define pl_resetValueRuns_48 pl_resetValueRuns_INTERNAL_API_DO_NOT_
_USE USE
# define pl_visualRun_4_6 pl_visualRun_INTERNAL_API_DO_NOT_USE # define pl_visualRun_48 pl_visualRun_INTERNAL_API_DO_NOT_USE
# define ucd_close_4_6 ucd_close_INTERNAL_API_DO_NOT_USE # define ucd_close_48 ucd_close_INTERNAL_API_DO_NOT_USE
# define ucd_flushCache_4_6 ucd_flushCache_INTERNAL_API_DO_NOT_USE # define ucd_flushCache_48 ucd_flushCache_INTERNAL_API_DO_NOT_USE
# define ucd_freeCache_4_6 ucd_freeCache_INTERNAL_API_DO_NOT_USE # define ucd_freeCache_48 ucd_freeCache_INTERNAL_API_DO_NOT_USE
# define ucd_getCollator_4_6 ucd_getCollator_INTERNAL_API_DO_NOT_USE # define ucd_getCollator_48 ucd_getCollator_INTERNAL_API_DO_NOT_USE
# define ucd_open_4_6 ucd_open_INTERNAL_API_DO_NOT_USE # define ucd_open_48 ucd_open_INTERNAL_API_DO_NOT_USE
# define ucol_equals_4_6 ucol_equals_INTERNAL_API_DO_NOT_USE # define ucol_equals_48 ucol_equals_INTERNAL_API_DO_NOT_USE
# define ucol_forceHanImplicit_4_6 ucol_forceHanImplicit_INTERNAL_AP # define ucol_forceHanImplicit_48 ucol_forceHanImplicit_INTERNAL_API
I_DO_NOT_USE _DO_NOT_USE
# define ucol_forgetUCA_4_6 ucol_forgetUCA_INTERNAL_API_DO_NOT_USE # define ucol_forgetUCA_48 ucol_forgetUCA_INTERNAL_API_DO_NOT_USE
# define ucol_getAttributeOrDefault_4_6 ucol_getAttributeOrDefault_I # define ucol_getAttributeOrDefault_48 ucol_getAttributeOrDefault_IN
NTERNAL_API_DO_NOT_USE TERNAL_API_DO_NOT_USE
# define ucol_getReorderCodes_4_6 ucol_getReorderCodes_INTERNAL_API_ # define ucol_getUnsafeSet_48 ucol_getUnsafeSet_INTERNAL_API_DO_NOT_
DO_NOT_USE USE
# define ucol_getUnsafeSet_4_6 ucol_getUnsafeSet_INTERNAL_API_DO_NOT # define ucol_nextProcessed_48 ucol_nextProcessed_INTERNAL_API_DO_NO
_USE T_USE
# define ucol_nextProcessed_4_6 ucol_nextProcessed_INTERNAL_API_DO_N # define ucol_previousProcessed_48 ucol_previousProcessed_INTERNAL_A
OT_USE PI_DO_NOT_USE
# define ucol_prepareShortStringOpen_4_6 ucol_prepareShortStringOpen # define udat_applyPatternRelative_48 udat_applyPatternRelative_INTE
_INTERNAL_API_DO_NOT_USE RNAL_API_DO_NOT_USE
# define ucol_previousProcessed_4_6 ucol_previousProcessed_INTERNAL_ # define udat_toPatternRelativeDate_48 udat_toPatternRelativeDate_IN
API_DO_NOT_USE TERNAL_API_DO_NOT_USE
# define ucol_setReorderCodes_4_6 ucol_setReorderCodes_INTERNAL_API_ # define udat_toPatternRelativeTime_48 udat_toPatternRelativeTime_IN
DO_NOT_USE TERNAL_API_DO_NOT_USE
# define udat_applyPatternRelative_4_6 udat_applyPatternRelative_INT # define uplug_getConfiguration_48 uplug_getConfiguration_INTERNAL_A
ERNAL_API_DO_NOT_USE PI_DO_NOT_USE
# define udat_toPatternRelativeDate_4_6 udat_toPatternRelativeDate_I # define uplug_getContext_48 uplug_getContext_INTERNAL_API_DO_NOT_US
NTERNAL_API_DO_NOT_USE E
# define udat_toPatternRelativeTime_4_6 udat_toPatternRelativeTime_I # define uplug_getCurrentLevel_48 uplug_getCurrentLevel_INTERNAL_API
NTERNAL_API_DO_NOT_USE _DO_NOT_USE
# define uplug_getConfiguration_4_6 uplug_getConfiguration_INTERNAL_ # define uplug_getLibraryName_48 uplug_getLibraryName_INTERNAL_API_D
API_DO_NOT_USE O_NOT_USE
# define uplug_getContext_4_6 uplug_getContext_INTERNAL_API_DO_NOT_U # define uplug_getLibrary_48 uplug_getLibrary_INTERNAL_API_DO_NOT_US
SE E
# define uplug_getCurrentLevel_4_6 uplug_getCurrentLevel_INTERNAL_AP # define uplug_getPlugLevel_48 uplug_getPlugLevel_INTERNAL_API_DO_NO
I_DO_NOT_USE T_USE
# define uplug_getLibrary_4_6 uplug_getLibrary_INTERNAL_API_DO_NOT_U # define uplug_getPlugLoadStatus_48 uplug_getPlugLoadStatus_INTERNAL
SE _API_DO_NOT_USE
# define uplug_getLibraryName_4_6 uplug_getLibraryName_INTERNAL_API_ # define uplug_getPlugName_48 uplug_getPlugName_INTERNAL_API_DO_NOT_
DO_NOT_USE USE
# define uplug_getPlugLevel_4_6 uplug_getPlugLevel_INTERNAL_API_DO_N # define uplug_getSymbolName_48 uplug_getSymbolName_INTERNAL_API_DO_
OT_USE NOT_USE
# define uplug_getPlugLoadStatus_4_6 uplug_getPlugLoadStatus_INTERNA # define uplug_loadPlugFromEntrypoint_48 uplug_loadPlugFromEntrypoin
L_API_DO_NOT_USE t_INTERNAL_API_DO_NOT_USE
# define uplug_getPlugName_4_6 uplug_getPlugName_INTERNAL_API_DO_NOT # define uplug_loadPlugFromLibrary_48 uplug_loadPlugFromLibrary_INTE
_USE RNAL_API_DO_NOT_USE
# define uplug_getSymbolName_4_6 uplug_getSymbolName_INTERNAL_API_DO # define uplug_nextPlug_48 uplug_nextPlug_INTERNAL_API_DO_NOT_USE
_NOT_USE # define uplug_removePlug_48 uplug_removePlug_INTERNAL_API_DO_NOT_US
# define uplug_loadPlugFromEntrypoint_4_6 uplug_loadPlugFromEntrypoi E
nt_INTERNAL_API_DO_NOT_USE # define uplug_setContext_48 uplug_setContext_INTERNAL_API_DO_NOT_US
# define uplug_loadPlugFromLibrary_4_6 uplug_loadPlugFromLibrary_INT E
ERNAL_API_DO_NOT_USE # define uplug_setPlugLevel_48 uplug_setPlugLevel_INTERNAL_API_DO_NO
# define uplug_nextPlug_4_6 uplug_nextPlug_INTERNAL_API_DO_NOT_USE T_USE
# define uplug_removePlug_4_6 uplug_removePlug_INTERNAL_API_DO_NOT_U # define uplug_setPlugName_48 uplug_setPlugName_INTERNAL_API_DO_NOT_
SE USE
# define uplug_setContext_4_6 uplug_setContext_INTERNAL_API_DO_NOT_U # define uplug_setPlugNoUnload_48 uplug_setPlugNoUnload_INTERNAL_API
SE _DO_NOT_USE
# define uplug_setPlugLevel_4_6 uplug_setPlugLevel_INTERNAL_API_DO_N # define uprv_getDefaultCodepage_48 uprv_getDefaultCodepage_INTERNAL
OT_USE _API_DO_NOT_USE
# define uplug_setPlugName_4_6 uplug_setPlugName_INTERNAL_API_DO_NOT # define uprv_getDefaultLocaleID_48 uprv_getDefaultLocaleID_INTERNAL
_USE _API_DO_NOT_USE
# define uplug_setPlugNoUnload_4_6 uplug_setPlugNoUnload_INTERNAL_AP # define ures_openFillIn_48 ures_openFillIn_INTERNAL_API_DO_NOT_USE
I_DO_NOT_USE # define usearch_searchBackwards_48 usearch_searchBackwards_INTERNAL
# define uprv_getDefaultCodepage_4_6 uprv_getDefaultCodepage_INTERNA _API_DO_NOT_USE
L_API_DO_NOT_USE # define usearch_search_48 usearch_search_INTERNAL_API_DO_NOT_USE
# define uprv_getDefaultLocaleID_4_6 uprv_getDefaultLocaleID_INTERNA # define utf8_appendCharSafeBody_48 utf8_appendCharSafeBody_INTERNAL
L_API_DO_NOT_USE _API_DO_NOT_USE
# define ures_openFillIn_4_6 ures_openFillIn_INTERNAL_API_DO_NOT_USE # define utf8_back1SafeBody_48 utf8_back1SafeBody_INTERNAL_API_DO_NO
# define usearch_search_4_6 usearch_search_INTERNAL_API_DO_NOT_USE T_USE
# define usearch_searchBackwards_4_6 usearch_searchBackwards_INTERNA # define utf8_countTrailBytes_48 utf8_countTrailBytes_INTERNAL_API_D
L_API_DO_NOT_USE O_NOT_USE
# define utext_caseCompareNativeLimit_4_6 utext_caseCompareNativeLim # define utf8_nextCharSafeBody_48 utf8_nextCharSafeBody_INTERNAL_API
it_INTERNAL_API_DO_NOT_USE _DO_NOT_USE
# define utext_caseCompare_4_6 utext_caseCompare_INTERNAL_API_DO_NOT # define utf8_prevCharSafeBody_48 utf8_prevCharSafeBody_INTERNAL_API
_USE _DO_NOT_USE
# define utext_compareNativeLimit_4_6 utext_compareNativeLimit_INTER
NAL_API_DO_NOT_USE
# define utext_compare_4_6 utext_compare_INTERNAL_API_DO_NOT_USE
# define utf8_appendCharSafeBody_4_6 utf8_appendCharSafeBody_INTERNA
L_API_DO_NOT_USE
# define utf8_back1SafeBody_4_6 utf8_back1SafeBody_INTERNAL_API_DO_N
OT_USE
# define utf8_countTrailBytes_4_6 utf8_countTrailBytes_INTERNAL_API_
DO_NOT_USE
# define utf8_nextCharSafeBody_4_6 utf8_nextCharSafeBody_INTERNAL_AP
I_DO_NOT_USE
# define utf8_prevCharSafeBody_4_6 utf8_prevCharSafeBody_INTERNAL_AP
I_DO_NOT_USE
# endif /* U_DISABLE_RENAMING */ # endif /* U_DISABLE_RENAMING */
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
#endif /* UINTRNAL_H */ #endif /* UINTRNAL_H */
 End of changes. 6 change blocks. 
199 lines changed or deleted 177 lines changed or added


 ulocdata.h   ulocdata.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* * * *
* Copyright (C) 2003-2010, International Business Machines * * Copyright (C) 2003-2011, 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 40 skipping to change at line 40
/** Forward declaration of the ULocaleData structure. @stable ICU 3.6 */ /** Forward declaration of the ULocaleData structure. @stable ICU 3.6 */
struct ULocaleData; struct ULocaleData;
/** A locale data object. @stable ICU 3.6 */ /** A locale data object. @stable ICU 3.6 */
typedef struct ULocaleData ULocaleData; typedef struct ULocaleData ULocaleData;
/** The possible types of exemplar character sets. /** The possible types of exemplar character sets.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum ULocaleDataExemplarSetType { typedef enum ULocaleDataExemplarSetType {
ULOCDATA_ES_STANDARD=0, /* Basic set */ /** Basic set @stable ICU 3.4 */
ULOCDATA_ES_AUXILIARY=1, /* Auxiliary set */ ULOCDATA_ES_STANDARD=0,
ULOCDATA_ES_COUNT=2 /** Auxiliary set @stable ICU 3.4 */
ULOCDATA_ES_AUXILIARY=1,
/** Index Character set @draft ICU 4.8 */
ULOCDATA_ES_INDEX=2,
/** One higher than the last valid type @stable ICU 3.4 */
ULOCDATA_ES_COUNT=3
} ULocaleDataExemplarSetType; } ULocaleDataExemplarSetType;
/** The possible types of delimiters. /** The possible types of delimiters.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum ULocaleDataDelimiterType { typedef enum ULocaleDataDelimiterType {
ULOCDATA_QUOTATION_START = 0, /* Quotation start */ /** Quotation start @stable ICU 3.4 */
ULOCDATA_QUOTATION_END = 1, /* Quotation end */ ULOCDATA_QUOTATION_START = 0,
ULOCDATA_ALT_QUOTATION_START = 2, /* Alternate quotation start */ /** Quotation end @stable ICU 3.4 */
ULOCDATA_ALT_QUOTATION_END = 3, /* Alternate quotation end */ ULOCDATA_QUOTATION_END = 1,
ULOCDATA_DELIMITER_COUNT = 4 /** Alternate quotation start @stable ICU 3.4 */
ULOCDATA_ALT_QUOTATION_START = 2,
/** Alternate quotation end @stable ICU 3.4 */
ULOCDATA_ALT_QUOTATION_END = 3,
/** One higher than the last valid type @stable ICU 3.4 */
ULOCDATA_DELIMITER_COUNT = 4
} ULocaleDataDelimiterType; } ULocaleDataDelimiterType;
/** /**
* Opens a locale data object for the given locale * Opens a locale data object for the given locale
* *
* @param localeID Specifies the locale associated with this locale * @param localeID Specifies the locale associated with this locale
* data object. * data object.
* @param status Pointer to error status code. * @param status Pointer to error status code.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
skipping to change at line 143 skipping to change at line 153
* uset_close.</em> * uset_close.</em>
* @param options Bitmask for options to apply to the exemplar pattern. * @param options Bitmask for options to apply to the exemplar pattern.
* Specify zero to retrieve the exemplar set as it is * Specify zero to retrieve the exemplar set as it is
* defined in the locale data. Specify * defined in the locale data. Specify
* USET_CASE_INSENSITIVE to retrieve a case-folded * USET_CASE_INSENSITIVE to retrieve a case-folded
* exemplar set. See uset_applyPattern for a complete * exemplar set. See uset_applyPattern for a complete
* list of valid options. The USET_IGNORE_SPACE bit is * list of valid options. The USET_IGNORE_SPACE bit is
* always set, regardless of the value of 'options'. * always set, regardless of the value of 'options'.
* @param extype Specifies the type of exemplar set to be retrieved. * @param extype Specifies the type of exemplar set to be retrieved.
* @param status Pointer to an input-output error code value; * @param status Pointer to an input-output error code value;
* must not be NULL. * must not be NULL. Will be set to U_MISSING_RESOURCE_ER
ROR
* if the requested data is not available.
* @return USet* Either fillIn, or if fillIn is NULL, a pointer to * @return USet* Either fillIn, or if fillIn is NULL, a pointer to
* a newly-allocated USet that the user must close. * a newly-allocated USet that the user must close.
* In case of error, NULL is returned.
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE USet* U_EXPORT2 U_STABLE USet* U_EXPORT2
ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn, ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn,
uint32_t options, ULocaleDataExemplarSetType extype , UErrorCode *status); uint32_t options, ULocaleDataExemplarSetType extype , UErrorCode *status);
/** /**
* Returns one of the delimiter strings associated with a locale. * Returns one of the delimiter strings associated with a locale.
* *
* @param uld Pointer to the locale data object from which the * @param uld Pointer to the locale data object from which the
 End of changes. 5 change blocks. 
10 lines changed or deleted 23 lines changed or added


 umachine.h   umachine.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1999-2010, International Business Machines * Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* file name: umachine.h * file name: umachine.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 1999sep13 * created on: 1999sep13
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 45 skipping to change at line 45
* the UTF-handling macros made this unmaintainable. * the UTF-handling macros made this unmaintainable.
* *
*/ */
/*========================================================================= =*/ /*========================================================================= =*/
/* Include platform-dependent definitions */ /* Include platform-dependent definitions */
/* which are contained in the platform-specific file platform.h */ /* which are contained in the platform-specific file platform.h */
/*========================================================================= =*/ /*========================================================================= =*/
#if defined(U_PALMOS) #if defined(U_PALMOS)
# include "unicode/ppalmos.h" # include "unicode/ppalmos.h"
#elif !defined(__MINGW32__) && (defined(WIN32) || defined(_WIN32) || define #elif /*!defined(__MINGW32__) && */(defined(WIN32) || defined(_WIN32) || de
d(WIN64) || defined(_WIN64)) fined(WIN64) || defined(_WIN64))
#ifdef CYGWINMSVC /*
* platform.h is now also generated by MSVC Solution/Project files
* from platform.win and should always be included unless you are
* building stubdata which is built before the platform.h file is
* generated.
*/
#ifndef STUBDATA_BUILD
# include "unicode/platform.h" # include "unicode/platform.h"
#endif #endif
# include "unicode/pwin32.h" # include "unicode/pwin32.h"
#else #else
# include "unicode/ptypes.h" /* platform.h is included in ptypes.h */ # include "unicode/ptypes.h" /* platform.h is included in ptypes.h */
#endif #endif
/* /*
* ANSI C headers: * ANSI C headers:
* stddef.h defines wchar_t * stddef.h defines wchar_t
skipping to change at line 360 skipping to change at line 366
*/ */
#ifndef U_ALIGN_CODE #ifndef U_ALIGN_CODE
# define U_ALIGN_CODE(n) # define U_ALIGN_CODE(n)
#endif #endif
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
/** /**
* \def U_INLINE * \def U_INLINE
* This is used to request inlining of a function, on platforms and languag es which support it. * This is used to request inlining of a function, on platforms and languag es which support it.
* @internal
*/ */
#ifndef U_INLINE #ifndef U_INLINE
# ifdef XP_CPLUSPLUS # ifdef XP_CPLUSPLUS
# define U_INLINE inline # define U_INLINE inline
# else # else
# define U_INLINE # define U_INLINE
# endif # endif
#endif #endif
 End of changes. 3 change blocks. 
4 lines changed or deleted 11 lines changed or added


 umsg.h   umsg.h 
/******************************************************************** /********************************************************************
* COPYRIGHT: * COPYRIGHT:
* Copyright (c) 1997-2010, International Business Machines Corporation and * Copyright (c) 1997-2011, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
* Copyright (C) 2010 , Yahoo! Inc. * Copyright (C) 2010 , Yahoo! Inc.
******************************************************************** ********************************************************************
* *
* file name: umsg.h * file name: umsg.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Change history: * Change history:
* *
* 08/5/2001 Ram Added C wrappers for C++ API. * 08/5/2001 Ram Added C wrappers for C++ API.
*
********************************************************************/ ********************************************************************/
#ifndef UMSG_H #ifndef UMSG_H
#define UMSG_H #define UMSG_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
skipping to change at line 30 skipping to change at line 29
#define UMSG_H #define UMSG_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "unicode/parseerr.h" #include "unicode/parseerr.h"
#include <stdarg.h> #include <stdarg.h>
/** /**
* \file * \file
* \brief C API: MessageFormat * \brief C API: MessageFormat
* *
* <h2>Message Format C API </h2> * <h2>MessageFormat C API </h2>
* *
* Provides means to produce concatenated messages in language-neutral way. * <p>MessageFormat prepares strings for display to users,
* Use this for all concatenations that show up to end users. * with optional arguments (variables/placeholders).
* <P> * The arguments can occur in any order, which is necessary for translation
* Takes a set of objects, formats them, then inserts the formatted * into languages with different grammars.
* strings into the pattern at the appropriate places. *
* <P> * <p>The opaque UMessageFormat type is a thin C wrapper around
* Here are some examples of usage: * a C++ MessageFormat. It is constructed from a <em>pattern</em> string
* with arguments in {curly braces} which will be replaced by formatted val
ues.
*
* <p>Currently, the C API supports only numbered arguments.
*
* <p>For details about the pattern syntax and behavior,
* especially about the ASCII apostrophe vs. the
* real apostrophe (single quote) character \htmlonly&#x2019;\endhtmlonly (
U+2019),
* see the C++ MessageFormat class documentation.
*
* <p>Here are some examples of C API usage:
* Example 1: * Example 1:
* <pre> * <pre>
* \code * \code
* UChar *result, *tzID, *str; * UChar *result, *tzID, *str;
* UChar pattern[100]; * UChar pattern[100];
* int32_t resultLengthOut, resultlength; * int32_t resultLengthOut, resultlength;
* UCalendar *cal; * UCalendar *cal;
* UDate d1; * UDate d1;
* UDateFormat *def1; * UDateFormat *def1;
* UErrorCode status = U_ZERO_ERROR; * UErrorCode status = U_ZERO_ERROR;
skipping to change at line 146 skipping to change at line 156
* if(u_strcmp(result, expected)==0) * if(u_strcmp(result, expected)==0)
* log_verbose("PASS: MessagFormat successful on Select test#1\n") ; * log_verbose("PASS: MessagFormat successful on Select test#1\n") ;
* else{ * else{
* log_err("FAIL: Error in MessageFormat on Select test#1\n GOT %s EXPECTED %s\n", austrdup(result), * log_err("FAIL: Error in MessageFormat on Select test#1\n GOT %s EXPECTED %s\n", austrdup(result),
* austrdup(expected) ); * austrdup(expected) );
* } * }
* free(result); * free(result);
* } * }
* \endcode * \endcode
* </pre> * </pre>
*
* The pattern is of the following form. Legend:
* <pre>
* \code
* {optional item}
* (group that may be repeated)*
* \endcode
* </pre>
* Do not confuse optional items with items inside quotes braces, such
* as this: "{". Quoted braces are literals.
* <pre>
* \code
* messageFormatPattern := string ( "{" messageFormatElement "}" stri
ng )*
*
* messageFormatElement := argument { "," elementFormat }
*
* elementFormat := "time" { "," datetimeStyle }
* | "date" { "," datetimeStyle }
* | "number" { "," numberStyle }
* | "choice" "," choiceStyle
* | "select" "," selectStyle
*
* datetimeStyle := "short"
* | "medium"
* | "long"
* | "full"
* | dateFormatPattern
*
* numberStyle := "currency"
* | "percent"
* | "integer"
* | numberFormatPattern
*
* choiceStyle := choiceFormatPattern
*
* selectStyle := selectFormatPattern
* \endcode
* </pre>
* If there is no elementFormat, then the argument must be a string,
* which is substituted. If there is no dateTimeStyle or numberStyle,
* then the default format is used (e.g. NumberFormat.getInstance(),
* DateFormat.getDefaultTime() or DateFormat.getDefaultDate(). For
* a ChoiceFormat, the pattern must always be specified, since there
* is no default.
* <P>
* In strings, single quotes can be used to quote the "{" sign if
* necessary. A real single quote is represented by ''. Inside a
* messageFormatElement, quotes are [not] removed. For example,
* {1,number,$'#',##} will produce a number format with the pound-sign
* quoted, with a result such as: "$#31,45".
* <P>
* If a pattern is used, then unquoted braces in the pattern, if any,
* must match: that is, "ab {0} de" and "ab '}' de" are ok, but "ab
* {0'}' de" and "ab } de" are not.
* <p>
* <dl><dt><b>Warning:</b><dd>The rules for using quotes within message
* format patterns unfortunately have shown to be somewhat confusing.
* In particular, it isn't always obvious to localizers whether single
* quotes need to be doubled or not. Make sure to inform localizers about
* the rules, and tell them (for example, by using comments in resource
* bundle source files) which strings will be processed by MessageFormat.
* Note that localizers may need to use single quotes in translated
* strings where the original version doesn't have them.
* <br>Note also that the simplest way to avoid the problem is to
* use the real apostrophe (single quote) character U+2019 (') for
* human-readable text, and to use the ASCII apostrophe (U+0027 ' )
* only in program syntax, like quoting in MessageFormat.
* See the annotations for U+0027 Apostrophe in The Unicode Standard.</p>
* </dl>
* <P>
* The argument is a number from 0 to 9, which corresponds to the
* arguments presented in an array to be formatted.
* <P>
* It is ok to have unused arguments in the array. With missing
* arguments or arguments that are not of the right class for the
* specified format, a failing UErrorCode result is set.
* <P>
* <P>
* [Note:] As we see above, the string produced by a choice Format in
* MessageFormat is treated specially; occurances of '{' are used to
* indicated subformats.
* <P>
* [Note:] Formats are numbered by order of variable in the string.
* This is [not] the same as the argument numbering!
* <pre>
* \code
* For example: with "abc{2}def{3}ghi{0}...",
*
* format0 affects the first variable {2}
* format1 affects the second variable {3}
* format2 affects the second variable {0}
* \endcode
* </pre>
* and so on.
*/ */
/** /**
* Format a message for a locale. * Format a message for a locale.
* This function may perform re-ordering of the arguments depending on the * This function may perform re-ordering of the arguments depending on the
* locale. For all numeric arguments, double is assumed unless the type is * locale. For all numeric arguments, double is assumed unless the type is
* explicitly integer. All choice format arguments must be of type double. * explicitly integer. All choice format arguments must be of type double.
* @param locale The locale for which the message will be formatted * @param locale The locale for which the message will be formatted
* @param pattern The pattern specifying the message's format * @param pattern The pattern specifying the message's format
* @param patternLength The length of pattern * @param patternLength The length of pattern
 End of changes. 6 change blocks. 
107 lines changed or deleted 22 lines changed or added


 uniset.h   uniset.h 
/* /*
*************************************************************************** ***************************************************************************
* Copyright (C) 1999-2010, International Business Machines Corporation * Copyright (C) 1999-2011, International Business Machines Corporation
* and others. All Rights Reserved. * and others. All Rights Reserved.
*************************************************************************** ***************************************************************************
* Date Name Description * Date Name Description
* 10/20/99 alan Creation. * 10/20/99 alan Creation.
*************************************************************************** ***************************************************************************
*/ */
#ifndef UNICODESET_H #ifndef UNICODESET_H
#define UNICODESET_H #define UNICODESET_H
skipping to change at line 576 skipping to change at line 576
/** /**
* Return true if the given position, in the given pattern, appears * Return true if the given position, in the given pattern, appears
* to be the start of a UnicodeSet pattern. * to be the start of a UnicodeSet pattern.
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
static UBool resemblesPattern(const UnicodeString& pattern, static UBool resemblesPattern(const UnicodeString& pattern,
int32_t pos); int32_t pos);
/** /**
* Modifies this set to represent the set specified by the given * Modifies this set to represent the set specified by the given
* pattern, optionally ignoring white space. See the class * pattern, ignoring Unicode Pattern_White_Space characters.
* description for the syntax of the pattern language. * See the class description for the syntax of the pattern language.
* A frozen set will not be modified. * A frozen set will not be modified.
* @param pattern a string specifying what characters are in the set * @param pattern a string specifying what characters are in the set
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern
* contains a syntax error. * contains a syntax error.
* <em> Empties the set passed before applying the pattern.</em> * <em> Empties the set passed before applying the pattern.</em>
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeSet& applyPattern(const UnicodeString& pattern, UnicodeSet& applyPattern(const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
/** /**
* Modifies this set to represent the set specified by the given * Modifies this set to represent the set specified by the given
* pattern, optionally ignoring white space. See the class * pattern, optionally ignoring Unicode Pattern_White_Space characters.
* description for the syntax of the pattern language. * See the class description for the syntax of the pattern language.
* A frozen set will not be modified. * A frozen set will not be modified.
* @param pattern a string specifying what characters are in the set * @param pattern a string specifying what characters are in the set
* @param options bitmask for options to apply to the pattern. * @param options bitmask for options to apply to the pattern.
* Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
* @param symbols a symbol table mapping variable names to * @param symbols a symbol table mapping variable names to
* values and stand-ins to UnicodeSets; may be NULL * values and stand-ins to UnicodeSets; may be NULL
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the p attern
* contains a syntax error. * contains a syntax error.
*<em> Empties the set passed before applying the pattern.</em> *<em> Empties the set passed before applying the pattern.</em>
* @return a reference to this * @return a reference to this
skipping to change at line 975 skipping to change at line 975
* first character, text.charAt(start), matches s, so it does not * first character, text.charAt(start), matches s, so it does not
* check it. * check it.
* @param text the text to match * @param text the text to match
* @param start the first character to match. In the forward * @param start the first character to match. In the forward
* direction, text.charAt(start) is matched against s.charAt(0). * direction, text.charAt(start) is matched against s.charAt(0).
* In the reverse direction, it is matched against * In the reverse direction, it is matched against
* s.charAt(s.length()-1). * s.charAt(s.length()-1).
* @param limit the limit offset for matching, either last+1 in * @param limit the limit offset for matching, either last+1 in
* the forward direction, or last-1 in the reverse direction, * the forward direction, or last-1 in the reverse direction,
* where last is the index of the last character to match. * where last is the index of the last character to match.
* @param s
* @return If part of s matches up to the limit, return |limit - * @return If part of s matches up to the limit, return |limit -
* start|. If all of s matches before reaching the limit, return * start|. If all of s matches before reaching the limit, return
* s.length(). If there is a mismatch between s and text, return * s.length(). If there is a mismatch between s and text, return
* 0 * 0
*/ */
static int32_t matchRest(const Replaceable& text, static int32_t matchRest(const Replaceable& text,
int32_t start, int32_t limit, int32_t start, int32_t limit,
const UnicodeString& s); const UnicodeString& s);
/** /**
skipping to change at line 1539 skipping to change at line 1540
* The original design document is out of date, but still useful. * The original design document is out of date, but still useful.
* Ignore the property and value names: * Ignore the property and value names:
* http://source.icu-project.org/repos/icu/icuhtml/trunk/design/unicode set_properties.html * http://source.icu-project.org/repos/icu/icuhtml/trunk/design/unicode set_properties.html
* *
* Recognized syntax: * Recognized syntax:
* *
* [:foo:] [:^foo:] - white space not allowed within "[:" or ":]" * [:foo:] [:^foo:] - white space not allowed within "[:" or ":]"
* \\p{foo} \\P{foo} - white space not allowed within "\\p" or "\\P" * \\p{foo} \\P{foo} - white space not allowed within "\\p" or "\\P"
* \\N{name} - white space not allowed within "\\N" * \\N{name} - white space not allowed within "\\N"
* *
* Other than the above restrictions, white space is ignored. Case * Other than the above restrictions, Unicode Pattern_White_Space chara
* is ignored except in "\\p" and "\\P" and "\\N". In 'name' leading cters are ignored.
* Case is ignored except in "\\p" and "\\P" and "\\N". In 'name' lead
ing
* and trailing space is deleted, and internal runs of whitespace * and trailing space is deleted, and internal runs of whitespace
* are collapsed to a single space. * are collapsed to a single space.
* *
* We support binary properties, enumerated properties, and the * We support binary properties, enumerated properties, and the
* following non-enumerated properties: * following non-enumerated properties:
* *
* Numeric_Value * Numeric_Value
* Name * Name
* Unicode_1_Name * Unicode_1_Name
* *
* @param pattern the pattern string * @param pattern the pattern string
* @param ppos on entry, the position at which to begin parsing. * @param ppos on entry, the position at which to begin parsing.
* This should be one of the locations marked '^': * This should be one of the locations marked '^':
* *
* [:blah:] \\p{blah} \\P{blah} \\N{name} * [:blah:] \\p{blah} \\P{blah} \\N{name}
* ^ % ^ % ^ % ^ % * ^ % ^ % ^ % ^ %
* *
* On return, the position after the last character parsed, that is, * On return, the position after the last character parsed, that is,
* the locations marked '%'. If the parse fails, ppos is returned * the locations marked '%'. If the parse fails, ppos is returned
* unchanged. * unchanged.
* @param ec status
* @return a reference to this. * @return a reference to this.
*/ */
UnicodeSet& applyPropertyPattern(const UnicodeString& pattern, UnicodeSet& applyPropertyPattern(const UnicodeString& pattern,
ParsePosition& ppos, ParsePosition& ppos,
UErrorCode &ec); UErrorCode &ec);
void applyPropertyPattern(RuleCharacterIterator& chars, void applyPropertyPattern(RuleCharacterIterator& chars,
UnicodeString& rebuiltPat, UnicodeString& rebuiltPat,
UErrorCode& ec); UErrorCode& ec);
 End of changes. 6 change blocks. 
7 lines changed or deleted 11 lines changed or added


 unistr.h   unistr.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1998-2010, International Business Machines * Copyright (C) 1998-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File 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 58 skipping to change at line 58
#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
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class BreakIterator; // unicode/brkiter.h
class Locale; // unicode/locid.h class Locale; // unicode/locid.h
class StringCharacterIterator; class StringCharacterIterator;
class BreakIterator; // unicode/brkiter.h class UnicodeStringAppendable; // unicode/appendable.h
/* The <iostream> include has been moved to unicode/ustream.h */ /* The <iostream> include has been moved to unicode/ustream.h */
/** /**
* Constant to be used in the UnicodeString(char *, int32_t, EInvariant) co nstructor * Constant to be used in the UnicodeString(char *, int32_t, EInvariant) co nstructor
* which constructs a Unicode string from an invariant-character char * str ing. * which constructs a Unicode string from an invariant-character char * str ing.
* About invariant characters see utypes.h. * About invariant characters see utypes.h.
* This constructor has no runtime dependency on conversion code and is * This constructor has no runtime dependency on conversion code and is
* therefore recommended over ones taking a charset name string * therefore recommended over ones taking a charset name string
* (where the empty string "" indicates invariant-character conversion). * (where the empty string "" indicates invariant-character conversion).
skipping to change at line 1990 skipping to change at line 1991
* Append operator. Append the code point <TT>ch</TT> to the UnicodeStrin g * Append operator. Append the code point <TT>ch</TT> to the UnicodeStrin g
* object. * object.
* @param ch the code point to be appended * @param ch the code point to be appended
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& operator+= (UChar32 ch); inline UnicodeString& operator+= (UChar32 ch);
/** /**
* Append operator. Append the characters in <TT>srcText</TT> to the * Append operator. Append the characters in <TT>srcText</TT> to the
* UnicodeString object at offset <TT>start</TT>. <TT>srcText</TT> is * UnicodeString object. <TT>srcText</TT> is not modified.
* not modified.
* @param srcText the source for the new characters * @param srcText the source for the new characters
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& operator+= (const UnicodeString& srcText); inline UnicodeString& operator+= (const UnicodeString& srcText);
/** /**
* Append the characters * Append the characters
* in <TT>srcText</TT> in the range * in <TT>srcText</TT> in the range
* [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) to the * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) to the
skipping to change at line 2017 skipping to change at line 2017
* @param srcLength the number of characters in <TT>srcText</TT> in * @param srcLength the number of characters in <TT>srcText</TT> in
* the append string * the append string
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& append(const UnicodeString& srcText, inline UnicodeString& append(const UnicodeString& srcText,
int32_t srcStart, int32_t srcStart,
int32_t srcLength); int32_t srcLength);
/** /**
* Append the characters in <TT>srcText</TT> to the UnicodeString object * Append the characters in <TT>srcText</TT> to the UnicodeString object.
at * <TT>srcText</TT> is not modified.
* offset <TT>start</TT>. <TT>srcText</TT> is not modified.
* @param srcText the source for the new characters * @param srcText the source for the new characters
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& append(const UnicodeString& srcText); inline UnicodeString& append(const UnicodeString& srcText);
/** /**
* Append the characters in <TT>srcChars</TT> in the range * Append the characters in <TT>srcChars</TT> in the range
* [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) to the UnicodeStrin g * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) to the UnicodeStrin g
* object at offset * object at offset
* <TT>start</TT>. <TT>srcChars</TT> is not modified. * <TT>start</TT>. <TT>srcChars</TT> is not modified.
* @param srcChars the source for the new characters * @param srcChars the source for the new characters
* @param srcStart the offset into <TT>srcChars</TT> where new characters * @param srcStart the offset into <TT>srcChars</TT> where new characters
* will be obtained * will be obtained
* @param srcLength the number of characters in <TT>srcChars</TT> in * @param srcLength the number of characters in <TT>srcChars</TT> in
* the append string * the append string; can be -1 if <TT>srcChars</TT> is NUL-terminated
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& append(const UChar *srcChars, inline UnicodeString& append(const UChar *srcChars,
int32_t srcStart, int32_t srcStart,
int32_t srcLength); int32_t srcLength);
/** /**
* Append the characters in <TT>srcChars</TT> to the UnicodeString object * Append the characters in <TT>srcChars</TT> to the UnicodeString object
* at offset <TT>start</TT>. <TT>srcChars</TT> is not modified. * at offset <TT>start</TT>. <TT>srcChars</TT> is not modified.
* @param srcChars the source for the new characters * @param srcChars the source for the new characters
* @param srcLength the number of Unicode characters in <TT>srcChars</TT> * @param srcLength the number of Unicode characters in <TT>srcChars</TT>
;
* can be -1 if <TT>srcChars</TT> is NUL-terminated
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString& append(const UChar *srcChars, inline UnicodeString& append(const UChar *srcChars,
int32_t srcLength); int32_t srcLength);
/** /**
* Append the code unit <TT>srcChar</TT> to the UnicodeString object. * Append the code unit <TT>srcChar</TT> to the UnicodeString object.
* @param srcChar the code unit to append * @param srcChar the code unit to append
* @return a reference to this * @return a reference to this
skipping to change at line 3361 skipping to change at line 3362
uint32_t options, uint32_t options,
int32_t toWhichCase); int32_t toWhichCase);
// ref counting // ref counting
void addRef(void); void addRef(void);
int32_t removeRef(void); int32_t removeRef(void);
int32_t refCount(void) const; int32_t refCount(void) const;
// constants // constants
enum { enum {
// Set the stack buffer size so that sizeof(UnicodeString) is a multipl // Set the stack buffer size so that sizeof(UnicodeString) is,
e of sizeof(pointer): // naturally (without padding), a multiple of sizeof(pointer).
// 32-bit pointers: 4+1+1+13*2 = 32 bytes US_STACKBUF_SIZE= sizeof(void *)==4 ? 13 : 15, // Size of stack buffer
// 64-bit pointers: 8+1+1+15*2 = 40 bytes for short strings
US_STACKBUF_SIZE= sizeof(void *)==4 ? 13 : 15, // Size of stack buffer
for small strings
kInvalidUChar=0xffff, // invalid UChar index kInvalidUChar=0xffff, // invalid UChar index
kGrowSize=128, // grow size for this buffer kGrowSize=128, // grow size for this buffer
kInvalidHashCode=0, // invalid hash code kInvalidHashCode=0, // invalid hash code
kEmptyHashCode=1, // hash code for empty string kEmptyHashCode=1, // hash code for empty string
// bit flag values for fFlags // bit flag values for fFlags
kIsBogus=1, // this string is bogus, i.e., not valid or NULL kIsBogus=1, // this string is bogus, i.e., not valid or NULL
kUsingStackBuffer=2,// fArray==fStackBuffer kUsingStackBuffer=2,// using fUnion.fStackBuffer instead of fUnion.fFie lds
kRefCounted=4, // there is a refCount field before the characters in fArray kRefCounted=4, // there is a refCount field before the characters in fArray
kBufferIsReadonly=8,// do not write to this buffer kBufferIsReadonly=8,// do not write to this buffer
kOpenGetBuffer=16, // getBuffer(minCapacity) was called (is "open"), kOpenGetBuffer=16, // getBuffer(minCapacity) was called (is "open"),
// and releaseBuffer(newLength) must be called // and releaseBuffer(newLength) must be called
// combined values for convenience // combined values for convenience
kShortString=kUsingStackBuffer, kShortString=kUsingStackBuffer,
kLongString=kRefCounted, kLongString=kRefCounted,
kReadonlyAlias=kBufferIsReadonly, kReadonlyAlias=kBufferIsReadonly,
kWritableAlias=0 kWritableAlias=0
}; };
friend class StringThreadTest; friend class StringThreadTest;
friend class UnicodeStringAppendable;
union StackBufferOrFields; // forward declaration necessary before friend declaration union StackBufferOrFields; // forward declaration necessary before friend declaration
friend union StackBufferOrFields; // make US_STACKBUF_SIZE visible inside fUnion friend union StackBufferOrFields; // make US_STACKBUF_SIZE visible inside fUnion
/* /*
* The following are all the class fields that are stored * The following are all the class fields that are stored
* in each UnicodeString object. * in each UnicodeString object.
* Note that UnicodeString has virtual functions, * Note that UnicodeString has virtual functions,
* therefore there is an implicit vtable pointer * therefore there is an implicit vtable pointer
* as the first real field. * as the first real field.
* The fields should be aligned such that no padding is * The fields should be aligned such that no padding is necessary.
* necessary, mostly by having larger types first.
* On 32-bit machines, the size should be 32 bytes, * On 32-bit machines, the size should be 32 bytes,
* on 64-bit machines (8-byte pointers), it should be 40 bytes. * on 64-bit machines (8-byte pointers), it should be 40 bytes.
*
* We use a hack to achieve this.
*
* With at least some compilers, each of the following is forced to
* a multiple of sizeof(pointer) [the largest field base unit here is a d
ata pointer],
* rounded up with additional padding if the fields do not already fit th
at requirement:
* - sizeof(class UnicodeString)
* - offsetof(UnicodeString, fUnion)
* - sizeof(fUnion)
* - sizeof(fFields)
*
* In order to avoid padding, we make sizeof(fStackBuffer)=16 (=8 UChars)
* which is at least as large as sizeof(fFields) on 32-bit and 64-bit mac
hines.
* (Padding at the end of fFields is ok:
* As long as there is no padding after fStackBuffer, it is not wasted sp
ace.)
*
* We further assume that the compiler does not reorder the fields,
* so that fRestOfStackBuffer (which holds a few more UChars) immediately
follows after fUnion,
* with at most some padding (but no other field) in between.
* (Padding there would be wasted space, but functionally harmless.)
*
* We use a few more sizeof(pointer)'s chunks of space with
* fRestOfStackBuffer, fShortLength and fFlags,
* to get up exactly to the intended sizeof(UnicodeString).
*/ */
// (implicit) *vtable; // (implicit) *vtable;
int8_t fShortLength; // 0..127: length <0: real length is in fUnion
.fFields.fLength
uint8_t fFlags; // bit flags: see constants above
union StackBufferOrFields { union StackBufferOrFields {
// fStackBuffer is used iff (fFlags&kUsingStackBuffer) // fStackBuffer is used iff (fFlags&kUsingStackBuffer)
// else fFields is used // else fFields is used
UChar fStackBuffer [US_STACKBUF_SIZE]; // buffer for small strings UChar fStackBuffer[8]; // buffer for short strings, together with fRes tOfStackBuffer
struct { struct {
uint16_t fPadding; // align the following field at 8B (32b pointer UChar *fArray; // the Unicode data
s) or 12B (64b) int32_t fCapacity; // capacity of fArray (in UChars)
int32_t fLength; // number of characters in fArray if >127; else int32_t fLength; // number of characters in fArray if >127; else u
undefined ndefined
UChar *fArray; // the Unicode data (aligned at 12B (32b pointe
rs) or 16B (64b))
int32_t fCapacity; // sizeof fArray
} fFields; } fFields;
} fUnion; } fUnion;
UChar fRestOfStackBuffer[US_STACKBUF_SIZE-8];
int8_t fShortLength; // 0..127: length <0: real length is in fUnion.fFi
elds.fLength
uint8_t fFlags; // bit flags: see constants above
}; };
/** /**
* Create a new UnicodeString with the concatenation of two others. * Create a new UnicodeString with the concatenation of two others.
* *
* @param s1 The first string to be copied to the new one. * @param s1 The first string to be copied to the new one.
* @param s2 The second string to be copied to the new one, after s1. * @param s2 The second string to be copied to the new one, after s1.
* @return UnicodeString(s1).append(s2) * @return UnicodeString(s1).append(s2)
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
skipping to change at line 4079 skipping to change at line 4103
#if !UCONFIG_NO_CONVERSION #if !UCONFIG_NO_CONVERSION
inline int32_t inline int32_t
UnicodeString::extract(int32_t start, UnicodeString::extract(int32_t start,
int32_t _length, int32_t _length,
char *dst, char *dst,
const char *codepage) const const char *codepage) const
{ {
// This dstSize value will be checked explicitly // This dstSize value will be checked explicitly
#if defined(__GNUC__)
// Ticket #7039: Clip length to the maximum valid length to the end of ad
dressable memory given the starting address
// This is only an issue when using GCC and certain optimizations are tur
ned on.
return extract(start, _length, dst, dst!=0 ? ((dst >= (char*)((size_t)-1)
- UINT32_MAX) ? (((char*)UINT32_MAX) - dst) : UINT32_MAX) : 0, codepage);
#else
return extract(start, _length, dst, dst!=0 ? 0xffffffff : 0, codepage); return extract(start, _length, dst, dst!=0 ? 0xffffffff : 0, codepage);
#endif
} }
#endif #endif
inline void inline void
UnicodeString::extractBetween(int32_t start, UnicodeString::extractBetween(int32_t start,
int32_t limit, int32_t limit,
UChar *dst, UChar *dst,
int32_t dstStart) const { int32_t dstStart) const {
pinIndex(start); pinIndex(start);
skipping to change at line 4262 skipping to change at line 4280
int32_t srcStart) int32_t srcStart)
{ {
unBogus(); unBogus();
srcText.pinIndex(srcStart); srcText.pinIndex(srcStart);
return doReplace(0, length(), srcText, srcStart, srcText.length() - srcSt art); return doReplace(0, length(), srcText, srcStart, srcText.length() - srcSt art);
} }
inline UnicodeString& inline UnicodeString&
UnicodeString::setTo(const UnicodeString& srcText) UnicodeString::setTo(const UnicodeString& srcText)
{ {
unBogus(); return copyFrom(srcText);
return doReplace(0, length(), srcText, 0, srcText.length());
} }
inline UnicodeString& inline UnicodeString&
UnicodeString::setTo(const UChar *srcChars, UnicodeString::setTo(const UChar *srcChars,
int32_t srcLength) int32_t srcLength)
{ {
unBogus(); unBogus();
return doReplace(0, length(), srcChars, 0, srcLength); return doReplace(0, length(), srcChars, 0, srcLength);
} }
 End of changes. 19 change blocks. 
40 lines changed or deleted 56 lines changed or added


 unum.h   unum.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 1997-2010, International Business Machines Corporation and others. * Copyright (C) 1997-2011, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
* 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 137 skipping to change at line 137
* For usage in C programs. * For usage in C programs.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef void* UNumberFormat; typedef void* UNumberFormat;
/** The possible number format styles. /** The possible number format styles.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UNumberFormatStyle { typedef enum UNumberFormatStyle {
/** /**
* Decimal format defined by pattern * Decimal format defined by a pattern string.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UNUM_PATTERN_DECIMAL=0, UNUM_PATTERN_DECIMAL=0,
/** Decimal format */ /**
* Decimal format ("normal" style).
* @stable ICU 2.0
*/
UNUM_DECIMAL=1, UNUM_DECIMAL=1,
/** Currency format */ /**
* Currency format with a currency symbol, e.g., "$1.00".
* @stable ICU 2.0
*/
UNUM_CURRENCY, UNUM_CURRENCY,
/** Percent format */ /**
* Percent format
* @stable ICU 2.0
*/
UNUM_PERCENT, UNUM_PERCENT,
/** Scientific format */ /**
* Scientific format
* @stable ICU 2.1
*/
UNUM_SCIENTIFIC, UNUM_SCIENTIFIC,
/** Spellout rule-based format */ /**
* Spellout rule-based format
* @stable ICU 2.0
*/
UNUM_SPELLOUT, UNUM_SPELLOUT,
/** /**
* Ordinal rule-based format * Ordinal rule-based format
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UNUM_ORDINAL, UNUM_ORDINAL,
/** /**
* Duration rule-based format * Duration rule-based format
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UNUM_DURATION, UNUM_DURATION,
/** /**
* Numbering system rule-based format * Numbering system rule-based format
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
UNUM_NUMBERING_SYSTEM, UNUM_NUMBERING_SYSTEM,
/** /**
* Rule-based format defined by pattern * Rule-based format defined by a pattern string.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UNUM_PATTERN_RULEBASED, UNUM_PATTERN_RULEBASED,
/** Default format */ /**
* Currency format with an ISO currency code, e.g., "USD1.00".
* @draft ICU 4.8
*/
UNUM_CURRENCY_ISO,
/**
* Currency format with a pluralized currency name,
* e.g., "1.00 US dollar" and "3.00 US dollars".
* @draft ICU 4.8
*/
UNUM_CURRENCY_PLURAL,
/**
* One more than the highest number format style constant.
* @draft ICU 4.8
*/
UNUM_FORMAT_STYLE_COUNT,
/**
* Default format
* @stable ICU 2.0
*/
UNUM_DEFAULT = UNUM_DECIMAL, UNUM_DEFAULT = UNUM_DECIMAL,
/** (Alias for UNUM_PATTERN_DECIMAL) */ /**
* Alias for UNUM_PATTERN_DECIMAL
* @stable ICU 3.0
*/
UNUM_IGNORE = UNUM_PATTERN_DECIMAL UNUM_IGNORE = UNUM_PATTERN_DECIMAL
} UNumberFormatStyle; } UNumberFormatStyle;
/** The possible number format rounding modes. /** The possible number format rounding modes.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UNumberFormatRoundingMode { typedef enum UNumberFormatRoundingMode {
UNUM_ROUND_CEILING, UNUM_ROUND_CEILING,
UNUM_ROUND_FLOOR, UNUM_ROUND_FLOOR,
UNUM_ROUND_DOWN, UNUM_ROUND_DOWN,
UNUM_ROUND_UP, UNUM_ROUND_UP,
/** /**
* Half-even rounding, misspelled name * Half-even rounding, misspelled name
* @deprecated, ICU 3.8 * @deprecated, ICU 3.8
*/ */
UNUM_FOUND_HALFEVEN, UNUM_FOUND_HALFEVEN,
UNUM_ROUND_HALFDOWN, UNUM_ROUND_HALFDOWN,
UNUM_ROUND_HALFUP, UNUM_ROUND_HALFUP,
/** /**
* ROUND_UNNECESSARY reports an error if formatted result is not exact
.
* @draft ICU 4.8
*/
UNUM_ROUND_UNNECESSARY,
/**
* Half-even rounding * Half-even rounding
* @stable, ICU 3.8 * @stable, ICU 3.8
*/ */
UNUM_ROUND_HALFEVEN = UNUM_FOUND_HALFEVEN UNUM_ROUND_HALFEVEN = UNUM_FOUND_HALFEVEN
} UNumberFormatRoundingMode; } UNumberFormatRoundingMode;
/** The possible number format pad positions. /** The possible number format pad positions.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UNumberFormatPadPosition { typedef enum UNumberFormatPadPosition {
UNUM_PAD_BEFORE_PREFIX, UNUM_PAD_BEFORE_PREFIX,
UNUM_PAD_AFTER_PREFIX, UNUM_PAD_AFTER_PREFIX,
UNUM_PAD_BEFORE_SUFFIX, UNUM_PAD_BEFORE_SUFFIX,
UNUM_PAD_AFTER_SUFFIX UNUM_PAD_AFTER_SUFFIX
} UNumberFormatPadPosition; } UNumberFormatPadPosition;
/** /**
* Constants for specifying currency spacing
* @draft ICU 4.8
*/
enum UCurrencySpacing {
UNUM_CURRENCY_MATCH,
UNUM_CURRENCY_SURROUNDING_MATCH,
UNUM_CURRENCY_INSERT,
UNUM_CURRENCY_SPACING_COUNT
};
typedef enum UCurrencySpacing UCurrencySpacing; /**< @draft ICU 4.8 */
/**
* Create and return a new UNumberFormat for formatting and parsing * Create and return a new UNumberFormat for formatting and parsing
* numbers. A UNumberFormat may be used to format numbers by calling * numbers. A UNumberFormat may be used to format numbers by calling
* {@link #unum_format }, and to parse numbers by calling {@link #unum_pars e }. * {@link #unum_format }, and to parse numbers by calling {@link #unum_pars e }.
* The caller must call {@link #unum_close } when done to release resources * The caller must call {@link #unum_close } when done to release resources
* used by this object. * used by this object.
* @param style The type of number format to open: one of * @param style The type of number format to open: one of
* UNUM_DECIMAL, UNUM_CURRENCY, UNUM_PERCENT, UNUM_SCIENTIFIC, UNUM_SPELLOU T, * UNUM_DECIMAL, UNUM_CURRENCY, UNUM_PERCENT, UNUM_SCIENTIFIC, UNUM_SPELLOU T,
* UNUM_PATTERN_DECIMAL, UNUM_PATTERN_RULEBASED, or UNUM_DEFAULT. * UNUM_PATTERN_DECIMAL, UNUM_PATTERN_RULEBASED, or UNUM_DEFAULT.
* If UNUM_PATTERN_DECIMAL or UNUM_PATTERN_RULEBASED is passed then the * If UNUM_PATTERN_DECIMAL or UNUM_PATTERN_RULEBASED is passed then the
* number format is opened using the given pattern, which must conform * number format is opened using the given pattern, which must conform
 End of changes. 12 change blocks. 
10 lines changed or deleted 65 lines changed or added


 uobslete.h   uobslete.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2004-2010, International Business Machines * Copyright (C) 2004-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: uobslete.h * file name: uobslete.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: genheaders.pl, a perl script written by Ram Viswanadha * Created by: genheaders.pl, a perl script written by Ram Viswanadha
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 uregex.h   uregex.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2004-2010, International Business Machines * Copyright (C) 2004-2011, 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 36 skipping to change at line 36
#include "unicode/utext.h" #include "unicode/utext.h"
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_REGULAR_EXPRESSIONS #if !UCONFIG_NO_REGULAR_EXPRESSIONS
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
#include "unicode/parseerr.h" #include "unicode/parseerr.h"
struct URegularExpression; struct URegularExpression;
/** /**
* Structure representing a compiled regular rexpression, plus the results * Structure representing a compiled regular expression, plus the results
* of a match operation. * of a match operation.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
typedef struct URegularExpression URegularExpression; typedef struct URegularExpression URegularExpression;
/** /**
* 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{
skipping to change at line 101 skipping to change at line 101
* If set, \b uses the Unicode TR 29 definition of word boundaries . * If set, \b uses the Unicode TR 29 definition of word boundaries .
* Warning: Unicode word boundaries are quite different from * Warning: Unicode word boundaries are quite different from
* traditional regular expression word boundaries. See * traditional regular expression word boundaries. See
* http://unicode.org/reports/tr29/#Word_Boundaries * http://unicode.org/reports/tr29/#Word_Boundaries
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
UREGEX_UWORD = 256, UREGEX_UWORD = 256,
/** Error on Unrecognized backslash escapes. /** Error on Unrecognized backslash escapes.
* If set, fail with an error on patterns that contain * If set, fail with an error on patterns that contain
* backslash-escaped ASCII letters without a known specail * backslash-escaped ASCII letters without a known special
* meaning. If this flag is not set, these * meaning. If this flag is not set, these
* escaped letters represent themselves. * escaped letters represent themselves.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UREGEX_ERROR_ON_UNKNOWN_ESCAPES = 512 UREGEX_ERROR_ON_UNKNOWN_ESCAPES = 512
} URegexpFlag; } URegexpFlag;
/** /**
* Open (compile) an ICU regular expression. Compiles the regular expres sion in * Open (compile) an ICU regular expression. Compiles the regular expres sion in
* string form into an internal representation using the specified match mode flags. * string form into an internal representation using the specified match mode flags.
* The resulting regular expression handle can then be used to perform va rious * The resulting regular expression handle can then be used to perform va rious
* matching operations. * matching operations.
* *
* *
* @param pattern The Regular Expression pattern to be compiled. * @param pattern The Regular Expression pattern to be compiled.
* @param patternLength The length of the pattern, or -1 if the pattern i s * @param patternLength The length of the pattern, or -1 if the pattern i s
* NUL termintated. * NUL terminated.
* @param flags Flags that alter the default matching behavior fo r * @param flags Flags that alter the default matching behavior fo r
* the regular expression, UREGEX_CASE_INSENSITIVE, for * the regular expression, UREGEX_CASE_INSENSITIVE, for
* example. For default behavior, set this paramete r to zero. * example. For default behavior, set this paramete r to zero.
* See <code>enum URegexpFlag</code>. All desired f lags * See <code>enum URegexpFlag</code>. All desired f lags
* are bitwise-ORed together. * are bitwise-ORed together.
* @param pe Receives the position (line and column nubers) of any syntax * @param pe Receives the position (line and column numbers) o f any syntax
* error within the source regular expression string . If this * error within the source regular expression string . If this
* information is not wanted, pass NULL for this par ameter. * information is not wanted, pass NULL for this par ameter.
* @param status Receives error detected by this function. * @param status Receives error detected by this function.
* @stable ICU 3.0 * @stable ICU 3.0
* *
*/ */
U_STABLE URegularExpression * U_EXPORT2 U_STABLE URegularExpression * U_EXPORT2
uregex_open( const UChar *pattern, uregex_open( const UChar *pattern,
int32_t patternLength, int32_t patternLength,
uint32_t flags, uint32_t flags,
skipping to change at line 155 skipping to change at line 155
* The contents of the pattern UText will be extracted and saved. Ownersh ip of the * The contents of the pattern UText will be extracted and saved. Ownersh ip of the
* UText struct itself remains with the caller. This is to match the beh avior of * UText struct itself remains with the caller. This is to match the beh avior of
* uregex_open(). * uregex_open().
* *
* @param pattern The Regular Expression pattern to be compiled. * @param pattern The Regular Expression pattern to be compiled.
* @param flags Flags that alter the default matching behavior fo r * @param flags Flags that alter the default matching behavior fo r
* the regular expression, UREGEX_CASE_INSENSITIVE, for * the regular expression, UREGEX_CASE_INSENSITIVE, for
* example. For default behavior, set this paramete r to zero. * example. For default behavior, set this paramete r to zero.
* See <code>enum URegexpFlag</code>. All desired f lags * See <code>enum URegexpFlag</code>. All desired f lags
* are bitwise-ORed together. * are bitwise-ORed together.
* @param pe Receives the position (line and column nubers) of any syntax * @param pe Receives the position (line and column numbers) o f any syntax
* error within the source regular expression string . If this * error within the source regular expression string . If this
* information is not wanted, pass NULL for this par ameter. * information is not wanted, pass NULL for this par ameter.
* @param status Receives error detected by this function. * @param status Receives error detected by this function.
* *
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT URegularExpression * U_EXPORT2 U_DRAFT URegularExpression * U_EXPORT2
uregex_openUText(UText *pattern, uregex_openUText(UText *pattern,
uint32_t flags, uint32_t flags,
UParseError *pe, UParseError *pe,
UErrorCode *status); UErrorCode *status);
/** /**
* Open (compile) an ICU regular expression. The resulting regular expre ssion * Open (compile) an ICU regular expression. The resulting regular expre ssion
* handle can then be used to perform various matching operations. * handle can then be used to perform various matching operations.
* <p> * <p>
* This function is the same as uregex_open, except that the pattern * This function is the same as uregex_open, except that the pattern
* is supplied as an 8 bit char * string in the default code page. * is supplied as an 8 bit char * string in the default code page.
* *
* @param pattern The Regular Expression pattern to be compiled, * @param pattern The Regular Expression pattern to be compiled,
* NUL termintated. * NUL terminated.
* @param flags Flags that alter the default matching behavior fo r * @param flags Flags that alter the default matching behavior fo r
* the regular expression, UREGEX_CASE_INSENSITIVE, for * the regular expression, UREGEX_CASE_INSENSITIVE, for
* example. For default behavior, set this paramete r to zero. * example. For default behavior, set this paramete r to zero.
* See <code>enum URegexpFlag</code>. All desired f lags * See <code>enum URegexpFlag</code>. All desired f lags
* are bitwise-ORed together. * are bitwise-ORed together.
* @param pe Receives the position (line and column nubers) of any syntax * @param pe Receives the position (line and column numbers) o f any syntax
* error within the source regular expression string . If this * error within the source regular expression string . If this
* information is not wanted, pass NULL for this par ameter. * information is not wanted, pass NULL for this par ameter.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @return The URegularExpression object representing the co mpiled * @return The URegularExpression object representing the co mpiled
* pattern. * pattern.
* *
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
#if !UCONFIG_NO_CONVERSION #if !UCONFIG_NO_CONVERSION
U_STABLE URegularExpression * U_EXPORT2 U_STABLE URegularExpression * U_EXPORT2
skipping to change at line 234 skipping to change at line 234
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
/** /**
* Make a copy of a compiled regular expression. Cloning a regular * Make a copy of a compiled regular expression. Cloning a regular
* expression is faster than opening a second instance from the source * expression is faster than opening a second instance from the source
* form of the expression, and requires less memory. * form of the expression, and requires less memory.
* <p> * <p>
* Note that the current input string and the position of any matched text * Note that the current input string and the position of any matched text
* within it are not cloned; only the pattern itself and and the * within it are not cloned; only the pattern itself and the
* match mode flags are copied. * match mode flags are copied.
* <p> * <p>
* Cloning can be particularly useful to threaded applications that perform * Cloning can be particularly useful to threaded applications that perform
* multiple match operations in parallel. Each concurrent RE * multiple match operations in parallel. Each concurrent RE
* operation requires its own instance of a URegularExpression. * operation requires its own instance of a URegularExpression.
* *
* @param regexp The compiled regular expression to be cloned. * @param regexp The compiled regular expression to be cloned.
* @param status Receives indication of any errors encountered * @param status Receives indication of any errors encountered
* @return the cloned copy of the compiled regular expression. * @return the cloned copy of the compiled regular expression.
* @stable ICU 3.0 * @stable ICU 3.0
skipping to change at line 392 skipping to change at line 392
* If a pre-allocated UText was provided, it will alway s be used and returned. * If a pre-allocated UText was provided, it will alway s be used and returned.
* *
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_DRAFT UText * U_EXPORT2
uregex_getUText(URegularExpression *regexp, uregex_getUText(URegularExpression *regexp,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Set the subject text string upon which the regular expression is looki
ng for matches
* without changing any other aspect of the matching state.
* The new and previous text strings must have the same content.
*
* This function is intended for use in environments where ICU is operati
ng on
* strings that may move around in memory. It provides a mechanism for n
otifying
* ICU that the string has been relocated, and providing a new UText to a
ccess the
* string in its new position.
*
* Note that the regular expression implementation never copies the under
lying text
* of a string being matched, but always operates directly on the origina
l text
* provided by the user. Refreshing simply drops the references to the ol
d text
* and replaces them with references to the new.
*
* Caution: this function is normally used only by very specialized
* system-level code. One example use case is with garbage co
llection
* that moves the text in memory.
*
* @param regexp The compiled regular expression.
* @param text The new (moved) text string.
* @param status Receives errors detected by this function.
*
* @draft ICU 4.8
*/
U_DRAFT void U_EXPORT2
uregex_refreshUText(URegularExpression *regexp,
UText *text,
UErrorCode *status);
/**
* Attempts to match the input string against the pattern. * Attempts to match the input string against the pattern.
* To succeed, the match must extend to the end of the string, * To succeed, the match must extend to the end of the string,
* or cover the complete match region. * or cover the complete match region.
* *
* If startIndex >= zero the match operation starts at the specified * If startIndex >= zero the match operation starts at the specified
* index and must extend to the end of the input string. Any region * index and must extend to the end of the input string. Any region
* that has been specified is reset. * that has been specified is reset.
* *
* If startIndex == -1 the match must cover the input region, or the ent ire * If startIndex == -1 the match must cover the input region, or the ent ire
* input string if no region has been set. This directly corresponds to * input string if no region has been set. This directly corresponds to
skipping to change at line 418 skipping to change at line 448
* @return TRUE if there is a match * @return TRUE if there is a match
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
uregex_matches(URegularExpression *regexp, uregex_matches(URegularExpression *regexp,
int32_t startIndex, int32_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_matches. * 64bit version of uregex_matches.
* Attempts to match the input string against the pattern.
* To succeed, the match must extend to the end of the string,
* or cover the complete match region.
*
* If startIndex >= zero the match operation starts at the specified
* index and must extend to the end of the input string. Any region
* that has been specified is reset.
*
* If startIndex == -1 the match must cover the input region, or the ent
ire
* input string if no region has been set. This directly corresponds to
* Matcher.matches() in Java
*
* @param regexp The compiled regular expression.
* @param startIndex The input string (native) index at which to begi
n matching, or -1
* to match the input Region.
* @param status Receives errors detected by this function.
* @return TRUE if there is a match
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
uregex_matches64(URegularExpression *regexp, uregex_matches64(URegularExpression *regexp,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Attempts to match the input string, starting from the specified index , against the pattern. * Attempts to match the input string, starting from the specified index , against the pattern.
* The match may be of any length, and is not required to extend to the end * The match may be of any length, and is not required to extend to the end
skipping to change at line 455 skipping to change at line 502
* @return TRUE if there is a match. * @return TRUE if there is a match.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
uregex_lookingAt(URegularExpression *regexp, uregex_lookingAt(URegularExpression *regexp,
int32_t startIndex, int32_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_lookingAt. * 64bit version of uregex_lookingAt.
* @draft ICU 4.6 * Attempts to match the input string, starting from the specified index
, against the pattern.
* The match may be of any length, and is not required to extend to the
end
* of the input string. Contrast with uregex_matches().
*
* <p>If startIndex is >= 0 any input region that was set for this
* URegularExpression is reset before the operation begins.
*
* <p>If the specified starting index == -1 the match begins at the star
t of the input
* region, or at the start of the full string if no region has been spec
ified.
* This corresponds directly with Matcher.lookingAt() in Java.
*
* <p>If the match succeeds then more information can be obtained via th
e
* <code>uregexp_start()</code>, <code>uregexp_end()</code>,
* and <code>uregexp_group()</code> functions.</p>
*
* @param regexp The compiled regular expression.
* @param startIndex The input string (native) index at which to beg
in matching, or
* -1 to match the Input Region
* @param status A reference to a UErrorCode to receive any erro
rs.
* @return TRUE if there is a match.
* @draft ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
uregex_lookingAt64(URegularExpression *regexp, uregex_lookingAt64(URegularExpression *regexp,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Find the first matching substring of the input string that matches th e pattern. * Find the first matching substring of the input string that matches th e pattern.
* If startIndex is >= zero the search for a match begins at the specifi ed index, * If startIndex is >= zero the search for a match begins at the specifi ed index,
* and any match region is reset. This corresponds directly with * and any match region is reset. This corresponds directly with
skipping to change at line 488 skipping to change at line 555
* @return TRUE if a match is found. * @return TRUE if a match is found.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
uregex_find(URegularExpression *regexp, uregex_find(URegularExpression *regexp,
int32_t startIndex, int32_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_find. * 64bit version of uregex_find.
* Find the first matching substring of the input string that matches th
e pattern.
* If startIndex is >= zero the search for a match begins at the specifi
ed index,
* and any match region is reset. This corresponds directly with
* Matcher.find(startIndex) in Java.
*
* If startIndex == -1 the search begins at the start of the input regio
n,
* or at the start of the full string if no region has been spec
ified.
*
* If a match is found, <code>uregex_start(), uregex_end()</code>, and
* <code>uregex_group()</code> will provide more information regarding t
he match.
*
* @param regexp The compiled regular expression.
* @param startIndex The position (native) in the input string to beg
in the search, or
* -1 to search within the Input Region.
* @param status A reference to a UErrorCode to receive any error
s.
* @return TRUE if a match is found.
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_DRAFT UBool U_EXPORT2
uregex_find64(URegularExpression *regexp, uregex_find64(URegularExpression *regexp,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Find the next pattern match in the input string. Begin searching * Find the next pattern match in the input string. Begin searching
* the input at the location following the end of he previous match, * the input at the location following the end of he previous match,
skipping to change at line 619 skipping to change at line 702
* by the specified group. * by the specified group.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uregex_start(URegularExpression *regexp, uregex_start(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_start. * 64bit version of uregex_start.
* Returns the index in the input string of the start of the text matche
d by the
* specified capture group during the previous match operation. Return
-1 if
* the capture group was not part of the last match.
* Group #0 refers to the complete range of matched text.
* Group #1 refers to the text matched by the first set of capturing par
entheses.
*
* @param regexp The compiled regular expression.
* @param groupNum The capture group number
* @param status A reference to a UErrorCode to receive any erro
rs.
* @return the starting (native) position in the input of
the text matched
* by the specified group.
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_DRAFT int64_t U_EXPORT2
uregex_start64(URegularExpression *regexp, uregex_start64(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UErrorCode *status); UErrorCode *status);
/** /**
* Returns the index in the input string of the position following the e nd * Returns the index in the input string of the position following the e nd
* of the text matched by the specified capture group. * of the text matched by the specified capture group.
skipping to change at line 646 skipping to change at line 740
* @return the (native) index of the position following th e last matched character. * @return the (native) index of the position following th e last matched character.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uregex_end(URegularExpression *regexp, uregex_end(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_end. * 64bit version of uregex_end.
* Returns the index in the input string of the position following the e
nd
* of the text matched by the specified capture group.
* Return -1 if the capture group was not part of the last match.
* Group #0 refers to the complete range of matched text.
* Group #1 refers to the text matched by the first set of capturing par
entheses.
*
* @param regexp The compiled regular expression.
* @param groupNum The capture group number
* @param status A reference to a UErrorCode to receive any erro
rs.
* @return the (native) index of the position following th
e last matched character.
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_DRAFT int64_t U_EXPORT2
uregex_end64(URegularExpression *regexp, uregex_end64(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UErrorCode *status); UErrorCode *status);
/** /**
* Reset any saved state from the previous match. Has the effect of * Reset any saved state from the previous match. Has the effect of
* causing uregex_findNext to begin at the specified index, and causing * causing uregex_findNext to begin at the specified index, and causing
skipping to change at line 672 skipping to change at line 776
* uregex_findNext() should begin searching. * uregex_findNext() should begin searching.
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_reset(URegularExpression *regexp, uregex_reset(URegularExpression *regexp,
int32_t index, int32_t index,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_reset. * 64bit version of uregex_reset.
* @draft ICU 4.6 * Reset any saved state from the previous match. Has the effect of
* causing uregex_findNext to begin at the specified index, and causing
* uregex_start(), uregex_end() and uregex_group() to return an error
* indicating that there is no match information available. Clears any
* match region that may have been set.
*
* @param regexp The compiled regular expression.
* @param index The position (native) in the text at which a
* uregex_findNext() should begin searching.
* @param status A reference to a UErrorCode to receive any erro
rs.
* @draft ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_reset64(URegularExpression *regexp, uregex_reset64(URegularExpression *regexp,
int64_t index, int64_t index,
UErrorCode *status); UErrorCode *status);
/** Sets the limits of the matching region for this URegularExpression. /**
* Sets the limits of the matching region for this URegularExpression.
* The region is the part of the input string that will be considered when matching. * The region is the part of the input string that will be considered when matching.
* Invoking this method resets any saved state from the previous match, * Invoking this method resets any saved state from the previous match,
* then sets the region to start at the index specified by the start param eter * then sets the region to start at the index specified by the start param eter
* and end at the index specified by the end parameter. * and end at the index specified by the end parameter.
* *
* Depending on the transparency and anchoring being used (see useTranspar entBounds * Depending on the transparency and anchoring being used (see useTranspar entBounds
* and useAnchoringBounds), certain constructs such as anchors may behave differently * and useAnchoringBounds), certain constructs such as anchors may behave differently
* at or around the boundaries of the region * at or around the boundaries of the region
* *
* The function will fail if start is greater than limit, or if either ind ex * The function will fail if start is greater than limit, or if either ind ex
skipping to change at line 706 skipping to change at line 821
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_setRegion(URegularExpression *regexp, uregex_setRegion(URegularExpression *regexp,
int32_t regionStart, int32_t regionStart,
int32_t regionLimit, int32_t regionLimit,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_setRegion. * 64bit version of uregex_setRegion.
* @draft ICU 4.6 * Sets the limits of the matching region for this URegularExpression.
* The region is the part of the input string that will be considered when
matching.
* Invoking this method resets any saved state from the previous match,
* then sets the region to start at the index specified by the start param
eter
* and end at the index specified by the end parameter.
*
* Depending on the transparency and anchoring being used (see useTranspar
entBounds
* and useAnchoringBounds), certain constructs such as anchors may behave
differently
* at or around the boundaries of the region
*
* The function will fail if start is greater than limit, or if either ind
ex
* is less than zero or greater than the length of the string being match
ed.
*
* @param regexp The compiled regular expression.
* @param regionStart The (native) index to begin searches at.
* @param regionLimit The (native) index to end searches at (exclusive).
* @param status A pointer to a UErrorCode to receive any errors.
* @draft ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_setRegion64(URegularExpression *regexp, uregex_setRegion64(URegularExpression *regexp,
int64_t regionStart, int64_t regionStart,
int64_t regionLimit, int64_t regionLimit,
UErrorCode *status); UErrorCode *status);
/** /**
* Variation on uregex_setRegion to set the region without resetting the * Set the matching region and the starting index for subsequent matches
start index * in a single operation.
* without resetting the position for subsequent matches. * This is useful because the usual function for setting the starting
* @draft ICU 4.6 * index, urgex_reset(), also resets any region limits.
*
* @param regexp The compiled regular expression.
* @param regionStart The (native) index to begin searches at.
* @param regionLimit The (native) index to end searches at (exclusive).
* @param startIndex The index in the input text at which the next
* match operation should begin.
* @param status A pointer to a UErrorCode to receive any errors.
* @draft ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_setRegionAndStart(URegularExpression *regexp, uregex_setRegionAndStart(URegularExpression *regexp,
int64_t regionStart, int64_t regionStart,
int64_t regionLimit, int64_t regionLimit,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Reports the start index of the matching region. Any matches found are l imited to * Reports the start index of the matching region. Any matches found are l imited to
skipping to change at line 741 skipping to change at line 882
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The starting (native) index of this matcher's region. * @return The starting (native) index of this matcher's region.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uregex_regionStart(const URegularExpression *regexp, uregex_regionStart(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_regionStart. * 64bit version of uregex_regionStart.
* @draft ICU 4.6 * Reports the start index of the matching region. Any matches found are l
imited to
* to the region bounded by regionStart (inclusive) and regionEnd (exclusi
ve).
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
* @return The starting (native) index of this matcher's region.
* @draft ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_DRAFT int64_t U_EXPORT2
uregex_regionStart64(const URegularExpression *regexp, uregex_regionStart64(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* Reports the end index (exclusive) of the matching region for this URegu larExpression. * Reports the end index (exclusive) of the matching region for this URegu larExpression.
* Any matches found are limited to to the region bounded by regionStart ( inclusive) * Any matches found are limited to to the region bounded by regionStart ( inclusive)
* and regionEnd (exclusive). * and regionEnd (exclusive).
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The ending point (native) of this matcher's region. * @return The ending point (native) of this matcher's region.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uregex_regionEnd(const URegularExpression *regexp, uregex_regionEnd(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* 64bit version of uregex_regionEnd. * 64bit version of uregex_regionEnd.
* @draft ICU 4.6 * Reports the end index (exclusive) of the matching region for this URegu
larExpression.
* Any matches found are limited to to the region bounded by regionStart (
inclusive)
* and regionEnd (exclusive).
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
* @return The ending point (native) of this matcher's region.
* @draft ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_DRAFT int64_t U_EXPORT2
uregex_regionEnd64(const URegularExpression *regexp, uregex_regionEnd64(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* Queries the transparency of region bounds for this URegularExpression. * Queries the transparency of region bounds for this URegularExpression.
* See useTransparentBounds for a description of transparent and opaque bo unds. * See useTransparentBounds for a description of transparent and opaque bo unds.
* By default, matching boundaries are opaque. * By default, matching boundaries are opaque.
* *
skipping to change at line 884 skipping to change at line 1038
* Input that is not part of any match is copied unchanged to the * Input that is not part of any match is copied unchanged to the
* destination buffer. Matched regions are replaced in the output * destination buffer. Matched regions are replaced in the output
* buffer by the replacement string. The replacement string may conta in * buffer by the replacement string. The replacement string may conta in
* references to capture groups; these take the form of $1, $2, etc. * references to capture groups; these take the form of $1, $2, etc.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param replacementText A string containing the replacement text . * @param replacementText A string containing the replacement text .
* @param replacementLength The length of the replacement string, or * @param replacementLength The length of the replacement string, or
* -1 if it is NUL terminated. * -1 if it is NUL terminated.
* @param destBuf A (UChar *) buffer that will receive the result. * @param destBuf A (UChar *) buffer that will receive the result.
* @param destCapacity The capacity of the desitnation buffer. * @param destCapacity The capacity of the destination buffer.
* @param status A reference to a UErrorCode to receive a ny errors. * @param status A reference to a UErrorCode to receive a ny errors.
* @return The length of the string resulting from the find * @return The length of the string resulting from the find
* and replace operation. In the event tha t the * and replace operation. In the event tha t the
* destination capacity is inadequate, the return value * destination capacity is inadequate, the return value
* is still the full length of the untrunca ted string. * is still the full length of the untrunca ted string.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uregex_replaceAll(URegularExpression *regexp, uregex_replaceAll(URegularExpression *regexp,
const UChar *replacementText, const UChar *replacementText,
skipping to change at line 943 skipping to change at line 1097
* All input that is not part of the match is copied unchanged to the * All input that is not part of the match is copied unchanged to the
* destination buffer. The matched region is replaced in the output * destination buffer. The matched region is replaced in the output
* buffer by the replacement string. The replacement string may conta in * buffer by the replacement string. The replacement string may conta in
* references to capture groups; these take the form of $1, $2, etc. * references to capture groups; these take the form of $1, $2, etc.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param replacementText A string containing the replacement text . * @param replacementText A string containing the replacement text .
* @param replacementLength The length of the replacement string, or * @param replacementLength The length of the replacement string, or
* -1 if it is NUL terminated. * -1 if it is NUL terminated.
* @param destBuf A (UChar *) buffer that will receive the result. * @param destBuf A (UChar *) buffer that will receive the result.
* @param destCapacity The capacity of the desitnation buffer. * @param destCapacity The capacity of the destination buffer.
* @param status a reference to a UErrorCode to receive a ny errors. * @param status a reference to a UErrorCode to receive a ny errors.
* @return The length of the string resulting from the find * @return The length of the string resulting from the find
* and replace operation. In the event tha t the * and replace operation. In the event tha t the
* destination capacity is inadequate, the return value * destination capacity is inadequate, the return value
* is still the full length of the untrunca ted string. * is still the full length of the untrunca ted string.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uregex_replaceFirst(URegularExpression *regexp, uregex_replaceFirst(URegularExpression *regexp,
const UChar *replacementText, const UChar *replacementText,
skipping to change at line 1109 skipping to change at line 1263
* As the final step in a find-and-replace operation, append the remainder * As the final step in a find-and-replace operation, append the remainder
* of the input string, starting at the position following the last match, * of the input string, starting at the position following the last match,
* to the destination string. <code>uregex_appendTailUText()</code> is int ended * to the destination string. <code>uregex_appendTailUText()</code> is int ended
* to be invoked after one or more invocations of the * to be invoked after one or more invocations of the
* <code>uregex_appendReplacementUText()</code> function. * <code>uregex_appendReplacementUText()</code> function.
* *
* @param regexp The regular expression object. This is needed t o * @param regexp The regular expression object. This is needed t o
* obtain the input string and with the position * obtain the input string and with the position
* of the last match within it. * of the last match within it.
* @param dest A mutable UText that will receive the result. Mu st not be NULL. * @param dest A mutable UText that will receive the result. Mu st not be NULL.
*
* @param status Error code
*
* @return The destination UText. * @return The destination UText.
* *
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_DRAFT UText * U_EXPORT2
uregex_appendTailUText(URegularExpression *regexp, uregex_appendTailUText(URegularExpression *regexp,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Split a string into fields. Somewhat like split() from Perl. * Split a string into fields. Somewhat like split() from Perl.
* The pattern matches identify delimiters that separate the input * The pattern matches identify delimiters that separate the input
* into fields. The input data between the matches becomes the * into fields. The input data between the matches becomes the
* fields themselves. * fields themselves.
* <p> *
* Each of the fields is copied from the input string to the destination * Each of the fields is copied from the input string to the destination
* buffer, and NUL terminated. The position of each field within * buffer, and NUL terminated. The position of each field within
* the destination buffer is returned in the destFields array. * the destination buffer is returned in the destFields array.
* *
* Note: another choice for the design of this function would be to not * If the delimiter pattern includes capture groups, the captured text w
* copy the resulting fields at all, but to return indexes and ill
* lengths within the source text. * also appear in the destination array of output strings, interspersed
* Advantages would be * with the fields. This is similar to Perl, but differs from Java,
* o Faster. No Copying. * which ignores the presence of capture groups in the pattern.
* o Nothing extra needed when field data may contain embedd *
ed NUL chars. * Trailing empty fields will always be returned, assuming sufficient
* o Less memory needed if working on large data. * destination capacity. This differs from the default behavior for Jav
* Disadvantages a
* o Less consistent with C++ split, which copies into an * and Perl where trailing empty fields are not returned.
* array of UnicodeStrings. *
* o No NUL termination, extracted fields would be less conv * The number of strings produced by the split operation is returned.
enient * This count includes the strings from capture groups in the delimiter
* to use in most cases. pattern.
* o Possible problems in the future, when support Unicode N * This behavior differs from Java, which ignores capture groups.
ormalization
* could cause the fields to not correspond exactly to
* a range of the source text.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param destBuf A (UChar *) buffer to receive the fields that * @param destBuf A (UChar *) buffer to receive the fields that
* are extracted from the input string. These * are extracted from the input string. These
* field pointers will refer to positions within the * field pointers will refer to positions within the
* destination buffer supplied by the caller. An y * destination buffer supplied by the caller. An y
* extra positions within the destFields array wi ll be * extra positions within the destFields array wi ll be
* set to NULL. * set to NULL.
* @param destCapacity The capacity of the destBuf. * @param destCapacity The capacity of the destBuf.
* @param requiredCapacity The actual capacity required of the dest Buf. * @param requiredCapacity The actual capacity required of the dest Buf.
skipping to change at line 1254 skipping to change at line 1408
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return the maximum allowed time for a match, in units of processing ste ps. * @return the maximum allowed time for a match, in units of processing ste ps.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uregex_getTimeLimit(const URegularExpression *regexp, uregex_getTimeLimit(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* Set the amount of heap storage avaliable for use by the match backtracki ng stack. * Set the amount of heap storage available for use by the match backtracki ng stack.
* <p> * <p>
* ICU uses a backtracking regular expression engine, with the backtrack st ack * ICU uses a backtracking regular expression engine, with the backtrack st ack
* maintained on the heap. This function sets the limit to the amount of m emory * maintained on the heap. This function sets the limit to the amount of m emory
* that can be used for this purpose. A backtracking stack overflow will * that can be used for this purpose. A backtracking stack overflow will
* result in an error from the match operation that caused it. * result in an error from the match operation that caused it.
* <p> * <p>
* A limit is desirable because a malicious or poorly designed pattern can use * A limit is desirable because a malicious or poorly designed pattern can use
* excessive memory, potentially crashing the process. A limit is enabled * excessive memory, potentially crashing the process. A limit is enabled
* by default. * by default.
* <p> * <p>
skipping to change at line 1337 skipping to change at line 1491
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_setMatchCallback(URegularExpression *regexp, uregex_setMatchCallback(URegularExpression *regexp,
URegexMatchCallback *callback, URegexMatchCallback *callback,
const void *context, const void *context,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the callback function for this URegularExpression. * Get the callback function for this URegularExpression.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param callback Out paramater, receives a pointer to the user-suppl ied * @param callback Out parameter, receives a pointer to the user-suppl ied
* callback function. * callback function.
* @param context Out parameter, receives the user context pointer th at * @param context Out parameter, receives the user context pointer th at
* was set when uregex_setMatchCallback() was called. * was set when uregex_setMatchCallback() was called.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_getMatchCallback(const URegularExpression *regexp, uregex_getMatchCallback(const URegularExpression *regexp,
URegexMatchCallback **callback, URegexMatchCallback **callback,
const void **context, const void **context,
skipping to change at line 1407 skipping to change at line 1561
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_setFindProgressCallback(URegularExpression *regexp, uregex_setFindProgressCallback(URegularExpression *regexp,
URegexFindProgressCallback *callback, URegexFindProgressCallback *callback,
const void *context, const void *context,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the find progress callback function for this URegularExpression. * Get the find progress callback function for this URegularExpression.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param callback Out paramater, receives a pointer to the user-suppl ied * @param callback Out parameter, receives a pointer to the user-suppl ied
* callback function. * callback function.
* @param context Out parameter, receives the user context pointer th at * @param context Out parameter, receives the user context pointer th at
* was set when uregex_setFindProgressCallback() was c alled. * was set when uregex_setFindProgressCallback() was c alled.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_DRAFT void U_EXPORT2
uregex_getFindProgressCallback(const URegularExpression *regexp, uregex_getFindProgressCallback(const URegularExpression *regexp,
URegexFindProgressCallback **callbac k, URegexFindProgressCallback **callbac k,
const void **context , const void **context ,
 End of changes. 29 change blocks. 
47 lines changed or deleted 244 lines changed or added


 uscript.h   uscript.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2010, International Business Machines * Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File USCRIPT.H * File USCRIPT.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 07/06/2001 Ram Creation. * 07/06/2001 Ram Creation.
************************************************************************** **** ************************************************************************** ****
skipping to change at line 47 skipping to change at line 47
* *
* For example, there are no characters that have a UCD script code of * For example, there are no characters that have a UCD script code of
* Hans or Hant. All Han ideographs have the Hani script code. * Hans or Hant. All Han ideographs have the Hani script code.
* The Hans and Hant script codes are used with CLDR data. * The Hans and Hant script codes are used with CLDR data.
* *
* ISO 15924 script codes are included for use with CLDR and similar. * ISO 15924 script codes are included for use with CLDR and similar.
* *
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum UScriptCode { typedef enum UScriptCode {
/** @stable ICU 2.2 */
USCRIPT_INVALID_CODE = -1, USCRIPT_INVALID_CODE = -1,
/** @stable ICU 2.2 */
USCRIPT_COMMON = 0, /* Zyyy */ USCRIPT_COMMON = 0, /* Zyyy */
/** @stable ICU 2.2 */
USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script" , for non-spacing combining marks; also Qaai */ USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script" , for non-spacing combining marks; also Qaai */
/** @stable ICU 2.2 */
USCRIPT_ARABIC = 2, /* Arab */ USCRIPT_ARABIC = 2, /* Arab */
/** @stable ICU 2.2 */
USCRIPT_ARMENIAN = 3, /* Armn */ USCRIPT_ARMENIAN = 3, /* Armn */
/** @stable ICU 2.2 */
USCRIPT_BENGALI = 4, /* Beng */ USCRIPT_BENGALI = 4, /* Beng */
/** @stable ICU 2.2 */
USCRIPT_BOPOMOFO = 5, /* Bopo */ USCRIPT_BOPOMOFO = 5, /* Bopo */
/** @stable ICU 2.2 */
USCRIPT_CHEROKEE = 6, /* Cher */ USCRIPT_CHEROKEE = 6, /* Cher */
/** @stable ICU 2.2 */
USCRIPT_COPTIC = 7, /* Copt */ USCRIPT_COPTIC = 7, /* Copt */
/** @stable ICU 2.2 */
USCRIPT_CYRILLIC = 8, /* Cyrl */ USCRIPT_CYRILLIC = 8, /* Cyrl */
/** @stable ICU 2.2 */
USCRIPT_DESERET = 9, /* Dsrt */ USCRIPT_DESERET = 9, /* Dsrt */
/** @stable ICU 2.2 */
USCRIPT_DEVANAGARI = 10, /* Deva */ USCRIPT_DEVANAGARI = 10, /* Deva */
/** @stable ICU 2.2 */
USCRIPT_ETHIOPIC = 11, /* Ethi */ USCRIPT_ETHIOPIC = 11, /* Ethi */
/** @stable ICU 2.2 */
USCRIPT_GEORGIAN = 12, /* Geor */ USCRIPT_GEORGIAN = 12, /* Geor */
/** @stable ICU 2.2 */
USCRIPT_GOTHIC = 13, /* Goth */ USCRIPT_GOTHIC = 13, /* Goth */
/** @stable ICU 2.2 */
USCRIPT_GREEK = 14, /* Grek */ USCRIPT_GREEK = 14, /* Grek */
/** @stable ICU 2.2 */
USCRIPT_GUJARATI = 15, /* Gujr */ USCRIPT_GUJARATI = 15, /* Gujr */
/** @stable ICU 2.2 */
USCRIPT_GURMUKHI = 16, /* Guru */ USCRIPT_GURMUKHI = 16, /* Guru */
/** @stable ICU 2.2 */
USCRIPT_HAN = 17, /* Hani */ USCRIPT_HAN = 17, /* Hani */
/** @stable ICU 2.2 */
USCRIPT_HANGUL = 18, /* Hang */ USCRIPT_HANGUL = 18, /* Hang */
/** @stable ICU 2.2 */
USCRIPT_HEBREW = 19, /* Hebr */ USCRIPT_HEBREW = 19, /* Hebr */
/** @stable ICU 2.2 */
USCRIPT_HIRAGANA = 20, /* Hira */ USCRIPT_HIRAGANA = 20, /* Hira */
/** @stable ICU 2.2 */
USCRIPT_KANNADA = 21, /* Knda */ USCRIPT_KANNADA = 21, /* Knda */
/** @stable ICU 2.2 */
USCRIPT_KATAKANA = 22, /* Kana */ USCRIPT_KATAKANA = 22, /* Kana */
/** @stable ICU 2.2 */
USCRIPT_KHMER = 23, /* Khmr */ USCRIPT_KHMER = 23, /* Khmr */
/** @stable ICU 2.2 */
USCRIPT_LAO = 24, /* Laoo */ USCRIPT_LAO = 24, /* Laoo */
/** @stable ICU 2.2 */
USCRIPT_LATIN = 25, /* Latn */ USCRIPT_LATIN = 25, /* Latn */
/** @stable ICU 2.2 */
USCRIPT_MALAYALAM = 26, /* Mlym */ USCRIPT_MALAYALAM = 26, /* Mlym */
/** @stable ICU 2.2 */
USCRIPT_MONGOLIAN = 27, /* Mong */ USCRIPT_MONGOLIAN = 27, /* Mong */
/** @stable ICU 2.2 */
USCRIPT_MYANMAR = 28, /* Mymr */ USCRIPT_MYANMAR = 28, /* Mymr */
/** @stable ICU 2.2 */
USCRIPT_OGHAM = 29, /* Ogam */ USCRIPT_OGHAM = 29, /* Ogam */
/** @stable ICU 2.2 */
USCRIPT_OLD_ITALIC = 30, /* Ital */ USCRIPT_OLD_ITALIC = 30, /* Ital */
/** @stable ICU 2.2 */
USCRIPT_ORIYA = 31, /* Orya */ USCRIPT_ORIYA = 31, /* Orya */
/** @stable ICU 2.2 */
USCRIPT_RUNIC = 32, /* Runr */ USCRIPT_RUNIC = 32, /* Runr */
/** @stable ICU 2.2 */
USCRIPT_SINHALA = 33, /* Sinh */ USCRIPT_SINHALA = 33, /* Sinh */
/** @stable ICU 2.2 */
USCRIPT_SYRIAC = 34, /* Syrc */ USCRIPT_SYRIAC = 34, /* Syrc */
/** @stable ICU 2.2 */
USCRIPT_TAMIL = 35, /* Taml */ USCRIPT_TAMIL = 35, /* Taml */
/** @stable ICU 2.2 */
USCRIPT_TELUGU = 36, /* Telu */ USCRIPT_TELUGU = 36, /* Telu */
/** @stable ICU 2.2 */
USCRIPT_THAANA = 37, /* Thaa */ USCRIPT_THAANA = 37, /* Thaa */
/** @stable ICU 2.2 */
USCRIPT_THAI = 38, /* Thai */ USCRIPT_THAI = 38, /* Thai */
/** @stable ICU 2.2 */
USCRIPT_TIBETAN = 39, /* Tibt */ USCRIPT_TIBETAN = 39, /* Tibt */
/** Canadian_Aboriginal script. @stable ICU 2.6 */ /** Canadian_Aboriginal script. @stable ICU 2.6 */
USCRIPT_CANADIAN_ABORIGINAL = 40, /* Cans */ USCRIPT_CANADIAN_ABORIGINAL = 40, /* Cans */
/** Canadian_Aboriginal script (alias). @stable ICU 2.2 */ /** Canadian_Aboriginal script (alias). @stable ICU 2.2 */
USCRIPT_UCAS = USCRIPT_CANADIAN_ABORIGINAL, USCRIPT_UCAS = USCRIPT_CANADIAN_ABORIGINAL,
/** @stable ICU 2.2 */
USCRIPT_YI = 41, /* Yiii */ USCRIPT_YI = 41, /* Yiii */
/* New scripts in Unicode 3.2 */
/** @stable ICU 2.2 */
USCRIPT_TAGALOG = 42, /* Tglg */ USCRIPT_TAGALOG = 42, /* Tglg */
/** @stable ICU 2.2 */
USCRIPT_HANUNOO = 43, /* Hano */ USCRIPT_HANUNOO = 43, /* Hano */
/** @stable ICU 2.2 */
USCRIPT_BUHID = 44, /* Buhd */ USCRIPT_BUHID = 44, /* Buhd */
/** @stable ICU 2.2 */
USCRIPT_TAGBANWA = 45, /* Tagb */ USCRIPT_TAGBANWA = 45, /* Tagb */
/* New scripts in Unicode 4 @stable ICU 2.6 */ /* New scripts in Unicode 4 */
/** @stable ICU 2.6 */
USCRIPT_BRAILLE = 46, /* Brai */ USCRIPT_BRAILLE = 46, /* Brai */
/** @stable ICU 2.6 */
USCRIPT_CYPRIOT = 47, /* Cprt */ USCRIPT_CYPRIOT = 47, /* Cprt */
/** @stable ICU 2.6 */
USCRIPT_LIMBU = 48, /* Limb */ USCRIPT_LIMBU = 48, /* Limb */
/** @stable ICU 2.6 */
USCRIPT_LINEAR_B = 49, /* Linb */ USCRIPT_LINEAR_B = 49, /* Linb */
/** @stable ICU 2.6 */
USCRIPT_OSMANYA = 50, /* Osma */ USCRIPT_OSMANYA = 50, /* Osma */
/** @stable ICU 2.6 */
USCRIPT_SHAVIAN = 51, /* Shaw */ USCRIPT_SHAVIAN = 51, /* Shaw */
/** @stable ICU 2.6 */
USCRIPT_TAI_LE = 52, /* Tale */ USCRIPT_TAI_LE = 52, /* Tale */
/** @stable ICU 2.6 */
USCRIPT_UGARITIC = 53, /* Ugar */ USCRIPT_UGARITIC = 53, /* Ugar */
/** New script code in Unicode 4.0.1 @stable ICU 3.0 */ /** New script code in Unicode 4.0.1 @stable ICU 3.0 */
USCRIPT_KATAKANA_OR_HIRAGANA = 54,/*Hrkt */ USCRIPT_KATAKANA_OR_HIRAGANA = 54,/*Hrkt */
/* New scripts in Unicode 4.1 @stable ICU 3.4 */ /* New scripts in Unicode 4.1 */
/** @stable ICU 3.4 */
USCRIPT_BUGINESE = 55, /* Bugi */ USCRIPT_BUGINESE = 55, /* Bugi */
/** @stable ICU 3.4 */
USCRIPT_GLAGOLITIC = 56, /* Glag */ USCRIPT_GLAGOLITIC = 56, /* Glag */
/** @stable ICU 3.4 */
USCRIPT_KHAROSHTHI = 57, /* Khar */ USCRIPT_KHAROSHTHI = 57, /* Khar */
/** @stable ICU 3.4 */
USCRIPT_SYLOTI_NAGRI = 58, /* Sylo */ USCRIPT_SYLOTI_NAGRI = 58, /* Sylo */
/** @stable ICU 3.4 */
USCRIPT_NEW_TAI_LUE = 59, /* Talu */ USCRIPT_NEW_TAI_LUE = 59, /* Talu */
/** @stable ICU 3.4 */
USCRIPT_TIFINAGH = 60, /* Tfng */ USCRIPT_TIFINAGH = 60, /* Tfng */
/** @stable ICU 3.4 */
USCRIPT_OLD_PERSIAN = 61, /* Xpeo */ USCRIPT_OLD_PERSIAN = 61, /* Xpeo */
/* New script codes from ISO 15924 @stable ICU 3.6 */ /* New script codes from ISO 15924 */
/** @stable ICU 3.6 */
USCRIPT_BALINESE = 62, /* Bali */ USCRIPT_BALINESE = 62, /* Bali */
/** @stable ICU 3.6 */
USCRIPT_BATAK = 63, /* Batk */ USCRIPT_BATAK = 63, /* Batk */
/** @stable ICU 3.6 */
USCRIPT_BLISSYMBOLS = 64, /* Blis */ USCRIPT_BLISSYMBOLS = 64, /* Blis */
/** @stable ICU 3.6 */
USCRIPT_BRAHMI = 65, /* Brah */ USCRIPT_BRAHMI = 65, /* Brah */
/** @stable ICU 3.6 */
USCRIPT_CHAM = 66, /* Cham */ USCRIPT_CHAM = 66, /* Cham */
/** @stable ICU 3.6 */
USCRIPT_CIRTH = 67, /* Cirt */ USCRIPT_CIRTH = 67, /* Cirt */
/** @stable ICU 3.6 */
USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC = 68, /* Cyrs */ USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC = 68, /* Cyrs */
/** @stable ICU 3.6 */
USCRIPT_DEMOTIC_EGYPTIAN = 69, /* Egyd */ USCRIPT_DEMOTIC_EGYPTIAN = 69, /* Egyd */
/** @stable ICU 3.6 */
USCRIPT_HIERATIC_EGYPTIAN = 70, /* Egyh */ USCRIPT_HIERATIC_EGYPTIAN = 70, /* Egyh */
/** @stable ICU 3.6 */
USCRIPT_EGYPTIAN_HIEROGLYPHS = 71, /* Egyp */ USCRIPT_EGYPTIAN_HIEROGLYPHS = 71, /* Egyp */
/** @stable ICU 3.6 */
USCRIPT_KHUTSURI = 72, /* Geok */ USCRIPT_KHUTSURI = 72, /* Geok */
/** @stable ICU 3.6 */
USCRIPT_SIMPLIFIED_HAN = 73, /* Hans */ USCRIPT_SIMPLIFIED_HAN = 73, /* Hans */
/** @stable ICU 3.6 */
USCRIPT_TRADITIONAL_HAN = 74, /* Hant */ USCRIPT_TRADITIONAL_HAN = 74, /* Hant */
/** @stable ICU 3.6 */
USCRIPT_PAHAWH_HMONG = 75, /* Hmng */ USCRIPT_PAHAWH_HMONG = 75, /* Hmng */
/** @stable ICU 3.6 */
USCRIPT_OLD_HUNGARIAN = 76, /* Hung */ USCRIPT_OLD_HUNGARIAN = 76, /* Hung */
/** @stable ICU 3.6 */
USCRIPT_HARAPPAN_INDUS = 77, /* Inds */ USCRIPT_HARAPPAN_INDUS = 77, /* Inds */
/** @stable ICU 3.6 */
USCRIPT_JAVANESE = 78, /* Java */ USCRIPT_JAVANESE = 78, /* Java */
/** @stable ICU 3.6 */
USCRIPT_KAYAH_LI = 79, /* Kali */ USCRIPT_KAYAH_LI = 79, /* Kali */
/** @stable ICU 3.6 */
USCRIPT_LATIN_FRAKTUR = 80, /* Latf */ USCRIPT_LATIN_FRAKTUR = 80, /* Latf */
/** @stable ICU 3.6 */
USCRIPT_LATIN_GAELIC = 81, /* Latg */ USCRIPT_LATIN_GAELIC = 81, /* Latg */
/** @stable ICU 3.6 */
USCRIPT_LEPCHA = 82, /* Lepc */ USCRIPT_LEPCHA = 82, /* Lepc */
/** @stable ICU 3.6 */
USCRIPT_LINEAR_A = 83, /* Lina */ USCRIPT_LINEAR_A = 83, /* Lina */
/** @stable ICU 4.6 */ /** @stable ICU 4.6 */
USCRIPT_MANDAIC = 84, /* Mand */ USCRIPT_MANDAIC = 84, /* Mand */
/** @stable ICU 3.6 */ /** @stable ICU 3.6 */
USCRIPT_MANDAEAN = USCRIPT_MANDAIC, USCRIPT_MANDAEAN = USCRIPT_MANDAIC,
/** @stable ICU 3.6 */
USCRIPT_MAYAN_HIEROGLYPHS = 85, /* Maya */ USCRIPT_MAYAN_HIEROGLYPHS = 85, /* Maya */
/** @stable ICU 4.6 */ /** @stable ICU 4.6 */
USCRIPT_MEROITIC_HIEROGLYPHS = 86, /* Mero */ USCRIPT_MEROITIC_HIEROGLYPHS = 86, /* Mero */
/** @stable ICU 3.6 */ /** @stable ICU 3.6 */
USCRIPT_MEROITIC = USCRIPT_MEROITIC_HIEROGLYPHS, USCRIPT_MEROITIC = USCRIPT_MEROITIC_HIEROGLYPHS,
/** @stable ICU 3.6 */
USCRIPT_NKO = 87, /* Nkoo */ USCRIPT_NKO = 87, /* Nkoo */
/** @stable ICU 3.6 */
USCRIPT_ORKHON = 88, /* Orkh */ USCRIPT_ORKHON = 88, /* Orkh */
/** @stable ICU 3.6 */
USCRIPT_OLD_PERMIC = 89, /* Perm */ USCRIPT_OLD_PERMIC = 89, /* Perm */
/** @stable ICU 3.6 */
USCRIPT_PHAGS_PA = 90, /* Phag */ USCRIPT_PHAGS_PA = 90, /* Phag */
/** @stable ICU 3.6 */
USCRIPT_PHOENICIAN = 91, /* Phnx */ USCRIPT_PHOENICIAN = 91, /* Phnx */
/** @stable ICU 3.6 */
USCRIPT_PHONETIC_POLLARD = 92, /* Plrd */ USCRIPT_PHONETIC_POLLARD = 92, /* Plrd */
/** @stable ICU 3.6 */
USCRIPT_RONGORONGO = 93, /* Roro */ USCRIPT_RONGORONGO = 93, /* Roro */
/** @stable ICU 3.6 */
USCRIPT_SARATI = 94, /* Sara */ USCRIPT_SARATI = 94, /* Sara */
/** @stable ICU 3.6 */
USCRIPT_ESTRANGELO_SYRIAC = 95, /* Syre */ USCRIPT_ESTRANGELO_SYRIAC = 95, /* Syre */
/** @stable ICU 3.6 */
USCRIPT_WESTERN_SYRIAC = 96, /* Syrj */ USCRIPT_WESTERN_SYRIAC = 96, /* Syrj */
/** @stable ICU 3.6 */
USCRIPT_EASTERN_SYRIAC = 97, /* Syrn */ USCRIPT_EASTERN_SYRIAC = 97, /* Syrn */
/** @stable ICU 3.6 */
USCRIPT_TENGWAR = 98, /* Teng */ USCRIPT_TENGWAR = 98, /* Teng */
/** @stable ICU 3.6 */
USCRIPT_VAI = 99, /* Vaii */ USCRIPT_VAI = 99, /* Vaii */
/** @stable ICU 3.6 */
USCRIPT_VISIBLE_SPEECH = 100,/* Visp */ USCRIPT_VISIBLE_SPEECH = 100,/* Visp */
/** @stable ICU 3.6 */
USCRIPT_CUNEIFORM = 101,/* Xsux */ USCRIPT_CUNEIFORM = 101,/* Xsux */
/** @stable ICU 3.6 */
USCRIPT_UNWRITTEN_LANGUAGES = 102,/* Zxxx */ USCRIPT_UNWRITTEN_LANGUAGES = 102,/* Zxxx */
/** @stable ICU 3.6 */
USCRIPT_UNKNOWN = 103,/* Zzzz */ /* Unknown="Co de for uncoded script", for unassigned code points */ USCRIPT_UNKNOWN = 103,/* Zzzz */ /* Unknown="Co de for uncoded script", for unassigned code points */
/* New script codes from ISO 15924 @stable ICU 3.8 */ /* New script codes from ISO 15924 */
/** @stable ICU 3.8 */
USCRIPT_CARIAN = 104,/* Cari */ USCRIPT_CARIAN = 104,/* Cari */
/** @stable ICU 3.8 */
USCRIPT_JAPANESE = 105,/* Jpan */ USCRIPT_JAPANESE = 105,/* Jpan */
/** @stable ICU 3.8 */
USCRIPT_LANNA = 106,/* Lana */ USCRIPT_LANNA = 106,/* Lana */
/** @stable ICU 3.8 */
USCRIPT_LYCIAN = 107,/* Lyci */ USCRIPT_LYCIAN = 107,/* Lyci */
/** @stable ICU 3.8 */
USCRIPT_LYDIAN = 108,/* Lydi */ USCRIPT_LYDIAN = 108,/* Lydi */
/** @stable ICU 3.8 */
USCRIPT_OL_CHIKI = 109,/* Olck */ USCRIPT_OL_CHIKI = 109,/* Olck */
/** @stable ICU 3.8 */
USCRIPT_REJANG = 110,/* Rjng */ USCRIPT_REJANG = 110,/* Rjng */
/** @stable ICU 3.8 */
USCRIPT_SAURASHTRA = 111,/* Saur */ USCRIPT_SAURASHTRA = 111,/* Saur */
/** @stable ICU 3.8 */
USCRIPT_SIGN_WRITING = 112,/* Sgnw */ USCRIPT_SIGN_WRITING = 112,/* Sgnw */
/** @stable ICU 3.8 */
USCRIPT_SUNDANESE = 113,/* Sund */ USCRIPT_SUNDANESE = 113,/* Sund */
/** @stable ICU 3.8 */
USCRIPT_MOON = 114,/* Moon */ USCRIPT_MOON = 114,/* Moon */
/** @stable ICU 3.8 */
USCRIPT_MEITEI_MAYEK = 115,/* Mtei */ USCRIPT_MEITEI_MAYEK = 115,/* Mtei */
/* New script codes from ISO 15924 @stable ICU 4.0 */ /* New script codes from ISO 15924 */
/** @stable ICU 4.0 */
USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */ USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */
/** @stable ICU 4.0 */
USCRIPT_AVESTAN = 117,/* Avst */ USCRIPT_AVESTAN = 117,/* Avst */
/** @stable ICU 4.0 */
USCRIPT_CHAKMA = 118,/* Cakm */ USCRIPT_CHAKMA = 118,/* Cakm */
/** @stable ICU 4.0 */
USCRIPT_KOREAN = 119,/* Kore */ USCRIPT_KOREAN = 119,/* Kore */
/** @stable ICU 4.0 */
USCRIPT_KAITHI = 120,/* Kthi */ USCRIPT_KAITHI = 120,/* Kthi */
/** @stable ICU 4.0 */
USCRIPT_MANICHAEAN = 121,/* Mani */ USCRIPT_MANICHAEAN = 121,/* Mani */
/** @stable ICU 4.0 */
USCRIPT_INSCRIPTIONAL_PAHLAVI = 122,/* Phli */ USCRIPT_INSCRIPTIONAL_PAHLAVI = 122,/* Phli */
/** @stable ICU 4.0 */
USCRIPT_PSALTER_PAHLAVI = 123,/* Phlp */ USCRIPT_PSALTER_PAHLAVI = 123,/* Phlp */
/** @stable ICU 4.0 */
USCRIPT_BOOK_PAHLAVI = 124,/* Phlv */ USCRIPT_BOOK_PAHLAVI = 124,/* Phlv */
/** @stable ICU 4.0 */
USCRIPT_INSCRIPTIONAL_PARTHIAN = 125,/* Prti */ USCRIPT_INSCRIPTIONAL_PARTHIAN = 125,/* Prti */
/** @stable ICU 4.0 */
USCRIPT_SAMARITAN = 126,/* Samr */ USCRIPT_SAMARITAN = 126,/* Samr */
/** @stable ICU 4.0 */
USCRIPT_TAI_VIET = 127,/* Tavt */ USCRIPT_TAI_VIET = 127,/* Tavt */
/** @stable ICU 4.0 */
USCRIPT_MATHEMATICAL_NOTATION = 128,/* Zmth */ USCRIPT_MATHEMATICAL_NOTATION = 128,/* Zmth */
/** @stable ICU 4.0 */
USCRIPT_SYMBOLS = 129,/* Zsym */ USCRIPT_SYMBOLS = 129,/* Zsym */
/* New script codes from ISO 15924 @stable ICU 4.4 */ /* New script codes from ISO 15924 */
/** @stable ICU 4.4 */
USCRIPT_BAMUM = 130,/* Bamu */ USCRIPT_BAMUM = 130,/* Bamu */
/** @stable ICU 4.4 */
USCRIPT_LISU = 131,/* Lisu */ USCRIPT_LISU = 131,/* Lisu */
/** @stable ICU 4.4 */
USCRIPT_NAKHI_GEBA = 132,/* Nkgb */ USCRIPT_NAKHI_GEBA = 132,/* Nkgb */
/** @stable ICU 4.4 */
USCRIPT_OLD_SOUTH_ARABIAN = 133,/* Sarb */ USCRIPT_OLD_SOUTH_ARABIAN = 133,/* Sarb */
/* New script codes from ISO 15924 @stable ICU 4.6 */ /* New script codes from ISO 15924 */
/** @stable ICU 4.6 */
USCRIPT_BASSA_VAH = 134,/* Bass */ USCRIPT_BASSA_VAH = 134,/* Bass */
/** @stable ICU 4.6 */
USCRIPT_DUPLOYAN_SHORTAND = 135,/* Dupl */ USCRIPT_DUPLOYAN_SHORTAND = 135,/* Dupl */
/** @stable ICU 4.6 */
USCRIPT_ELBASAN = 136,/* Elba */ USCRIPT_ELBASAN = 136,/* Elba */
/** @stable ICU 4.6 */
USCRIPT_GRANTHA = 137,/* Gran */ USCRIPT_GRANTHA = 137,/* Gran */
/** @stable ICU 4.6 */
USCRIPT_KPELLE = 138,/* Kpel */ USCRIPT_KPELLE = 138,/* Kpel */
/** @stable ICU 4.6 */
USCRIPT_LOMA = 139,/* Loma */ USCRIPT_LOMA = 139,/* Loma */
/** @stable ICU 4.6 */
USCRIPT_MENDE = 140,/* Mend */ USCRIPT_MENDE = 140,/* Mend */
/** @stable ICU 4.6 */
USCRIPT_MEROITIC_CURSIVE = 141,/* Merc */ USCRIPT_MEROITIC_CURSIVE = 141,/* Merc */
/** @stable ICU 4.6 */
USCRIPT_OLD_NORTH_ARABIAN = 142,/* Narb */ USCRIPT_OLD_NORTH_ARABIAN = 142,/* Narb */
/** @stable ICU 4.6 */
USCRIPT_NABATAEAN = 143,/* Nbat */ USCRIPT_NABATAEAN = 143,/* Nbat */
/** @stable ICU 4.6 */
USCRIPT_PALMYRENE = 144,/* Palm */ USCRIPT_PALMYRENE = 144,/* Palm */
/** @stable ICU 4.6 */
USCRIPT_SINDHI = 145,/* Sind */ USCRIPT_SINDHI = 145,/* Sind */
/** @stable ICU 4.6 */
USCRIPT_WARANG_CITI = 146,/* Wara */ USCRIPT_WARANG_CITI = 146,/* Wara */
/** @stable ICU 4.8 */
USCRIPT_AFAKA = 147,/* Afak */
/** @stable ICU 4.8 */
USCRIPT_JURCHEN = 148,/* Jurc */
/** @stable ICU 4.8 */
USCRIPT_MRO = 149,/* Mroo */
/** @stable ICU 4.8 */
USCRIPT_NUSHU = 150,/* Nshu */
/** @stable ICU 4.8 */
USCRIPT_SHARADA = 151,/* Shrd */
/** @stable ICU 4.8 */
USCRIPT_SORA_SOMPENG = 152,/* Sora */
/** @stable ICU 4.8 */
USCRIPT_TAKRI = 153,/* Takr */
/** @stable ICU 4.8 */
USCRIPT_TANGUT = 154,/* Tang */
/** @stable ICU 4.8 */
USCRIPT_WOLEAI = 155,/* Wole */
/* Private use codes from Qaaa - Qabx are not supported */ /* Private use codes from Qaaa - Qabx are not supported */
USCRIPT_CODE_LIMIT = 147
/** @stable ICU 2.2 */
USCRIPT_CODE_LIMIT = 156
} UScriptCode; } UScriptCode;
/** /**
* Gets script codes associated with the given locale or ISO 15924 abbrevia tion or name. * Gets script codes associated with the given locale or ISO 15924 abbrevia tion or name.
* Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym". * Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym".
* Fills in USCRIPT_LATIN given "en" OR "en_US" * Fills in USCRIPT_LATIN given "en" OR "en_US"
* If required capacity is greater than capacity of the destination buffer then the error code * If required capacity is greater than capacity of the destination buffer then the error code
* is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned * is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned
* *
* <p>Note: To search by short or long script alias only, use * <p>Note: To search by short or long script alias only, use
skipping to change at line 324 skipping to change at line 490
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return number of script codes in c's Script_Extensions, * @return number of script codes in c's Script_Extensions,
* written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insu fficient capacity * written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insu fficient capacity
* @draft ICU 4.6 * @draft ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
uscript_getScriptExtensions(UChar32 c, uscript_getScriptExtensions(UChar32 c,
UScriptCode *scripts, int32_t capacity, UScriptCode *scripts, int32_t capacity,
UErrorCode *pErrorCode); UErrorCode *errorCode);
#endif #endif
 End of changes. 148 change blocks. 
10 lines changed or deleted 176 lines changed or added


 usearch.h   usearch.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2001-2010 IBM and others. All rights reserved. * Copyright (C) 2001-2011 IBM and others. All rights reserved.
********************************************************************** **********************************************************************
* Date Name Description * Date Name Description
* 06/28/2001 synwee Creation. * 06/28/2001 synwee Creation.
********************************************************************** **********************************************************************
*/ */
#ifndef USEARCH_H #ifndef USEARCH_H
#define USEARCH_H #define USEARCH_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
skipping to change at line 589 skipping to change at line 589
* @return The character index of the first match, or * @return The character index of the first match, or
* <tt>USEARCH_DONE</tt> if there are no matches. * <tt>USEARCH_DONE</tt> if there are no matches.
* @see #usearch_getOffset * @see #usearch_getOffset
* @see #USEARCH_DONE * @see #USEARCH_DONE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
U_STABLE int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch, U_STABLE int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch,
UErrorCode *status); UErrorCode *status);
/** /**
* Returns the first index greater than <tt>position</tt> at which the strin * Returns the first index equal or greater than <tt>position</tt> at which
g * the string text
* text
* matches the search pattern. The iterator is adjusted so that its current * matches the search pattern. The iterator is adjusted so that its current
* index (as returned by <tt>usearch_getOffset</tt>) is the match position i f * index (as returned by <tt>usearch_getOffset</tt>) is the match position i f
* one was found. * one was found.
* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt> * the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>
* <p> * <p>
* Search positions that may render incorrect results are highlighted in the * Search positions that may render incorrect results are highlighted in the
* header comments. If position is less than or greater than the text range * header comments. If position is less than or greater than the text range
* for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned * for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned
* @param strsrch search iterator data struct * @param strsrch search iterator data struct
skipping to change at line 641 skipping to change at line 641
/** /**
* Returns the first index less than <tt>position</tt> at which the string t ext * Returns the first index less than <tt>position</tt> at which the string t ext
* matches the search pattern. The iterator is adjusted so that its current * matches the search pattern. The iterator is adjusted so that its current
* index (as returned by <tt>usearch_getOffset</tt>) is the match position i f * index (as returned by <tt>usearch_getOffset</tt>) is the match position i f
* one was found. * one was found.
* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and * If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt> * the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>
* <p> * <p>
* Search positions that may render incorrect results are highlighted in the * Search positions that may render incorrect results are highlighted in the
* header comments. If position is less than or greater than the text range * header comments. If position is less than or greater than the text range
* for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned * for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned.
* <p>
* When <tt>USEARCH_OVERLAP</tt> option is off, the last index of the
* result match is always less than <tt>position</tt>.
* When <tt>USERARCH_OVERLAP</tt> is on, the result match may span across
* <tt>position</tt>.
* @param strsrch search iterator data struct * @param strsrch search iterator data struct
* @param position index position the search is to begin at * @param position index position the search is to begin at
* @param status for errors if it occurs * @param status for errors if it occurs
* @return The character index of the first match preceding <tt>pos</tt>, * @return The character index of the first match preceding <tt>pos</tt>,
* or <tt>USEARCH_DONE</tt> if there are no matches. * or <tt>USEARCH_DONE</tt> if there are no matches.
* @see #usearch_getOffset * @see #usearch_getOffset
* @see #USEARCH_DONE * @see #USEARCH_DONE
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
U_STABLE int32_t U_EXPORT2 usearch_preceding(UStringSearch *strsrch, U_STABLE int32_t U_EXPORT2 usearch_preceding(UStringSearch *strsrch,
 End of changes. 3 change blocks. 
5 lines changed or deleted 9 lines changed or added


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


 ustream.h   ustream.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 2001-2010 International Business Machines * Copyright (C) 2001-2011 International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* FILE NAME : ustream.h * FILE NAME : ustream.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 06/25/2001 grhoten Move iostream from unistr.h * 06/25/2001 grhoten Move iostream from unistr.h
*************************************************************************** *** *************************************************************************** ***
*/ */
skipping to change at line 62 skipping to change at line 62
* @stable 3.0 * @stable 3.0
*/ */
U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeS tring& s); U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeS tring& s);
U_NAMESPACE_END U_NAMESPACE_END
#elif U_IOSTREAM_SOURCE >= 198506 #elif U_IOSTREAM_SOURCE >= 198506
/* <istream.h> and <ostream.h> don't exist. */ /* <istream.h> and <ostream.h> don't exist. */
#include <iostream.h> #include <iostream.h>
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/**
* Write the contents of a UnicodeString to a C++ ostream. This functions w
rites
* the characters in a UnicodeString to an ostream. The UChars in the
* UnicodeString are converted to the char based ostream with the default
* converter.
* @stable 3.0
*/
U_IO_API ostream & U_EXPORT2 operator<<(ostream& stream, const UnicodeStrin g& s); U_IO_API ostream & U_EXPORT2 operator<<(ostream& stream, const UnicodeStrin g& s);
/**
* Write the contents from a C++ istream to a UnicodeString. The UChars in
the
* UnicodeString are converted from the char based istream with the default
* converter.
* @stable 3.0
*/
U_IO_API istream & U_EXPORT2 operator>>(istream& stream, UnicodeString& s); U_IO_API istream & U_EXPORT2 operator>>(istream& stream, UnicodeString& s);
U_NAMESPACE_END U_NAMESPACE_END
#endif #endif
/* No operator for UChar because it can conflict with wchar_t */ /* No operator for UChar because it can conflict with wchar_t */
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 16 lines changed or added


 usystem.h   usystem.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2004-2010, International Business Machines * Copyright (C) 2004-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: usystem.h * file name: usystem.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: genheaders.pl, a perl script written by Ram Viswanadha * Created by: genheaders.pl, a perl script written by Ram Viswanadha
* *
skipping to change at line 35 skipping to change at line 35
# if U_DISABLE_RENAMING # if U_DISABLE_RENAMING
# define u_cleanup u_cleanup_SYSTEM_API_DO_NOT_USE # define u_cleanup u_cleanup_SYSTEM_API_DO_NOT_USE
# define u_setAtomicIncDecFunctions u_setAtomicIncDecFunctions_SYSTE M_API_DO_NOT_USE # define u_setAtomicIncDecFunctions u_setAtomicIncDecFunctions_SYSTE M_API_DO_NOT_USE
# define u_setMemoryFunctions u_setMemoryFunctions_SYSTEM_API_DO_NOT _USE # define u_setMemoryFunctions u_setMemoryFunctions_SYSTEM_API_DO_NOT _USE
# define u_setMutexFunctions u_setMutexFunctions_SYSTEM_API_DO_NOT_U SE # define u_setMutexFunctions u_setMutexFunctions_SYSTEM_API_DO_NOT_U SE
# define ucnv_setDefaultName ucnv_setDefaultName_SYSTEM_API_DO_NOT_U SE # define ucnv_setDefaultName ucnv_setDefaultName_SYSTEM_API_DO_NOT_U SE
# define uloc_getDefault uloc_getDefault_SYSTEM_API_DO_NOT_USE # define uloc_getDefault uloc_getDefault_SYSTEM_API_DO_NOT_USE
# define uloc_setDefault uloc_setDefault_SYSTEM_API_DO_NOT_USE # define uloc_setDefault uloc_setDefault_SYSTEM_API_DO_NOT_USE
# else # else
# define u_cleanup_4_6 u_cleanup_SYSTEM_API_DO_NOT_USE # define u_cleanup_48 u_cleanup_SYSTEM_API_DO_NOT_USE
# define u_setAtomicIncDecFunctions_4_6 u_setAtomicIncDecFunctions_S # define u_setAtomicIncDecFunctions_48 u_setAtomicIncDecFunctions_SY
YSTEM_API_DO_NOT_USE STEM_API_DO_NOT_USE
# define u_setMemoryFunctions_4_6 u_setMemoryFunctions_SYSTEM_API_DO # define u_setMemoryFunctions_48 u_setMemoryFunctions_SYSTEM_API_DO_
_NOT_USE NOT_USE
# define u_setMutexFunctions_4_6 u_setMutexFunctions_SYSTEM_API_DO_N # define u_setMutexFunctions_48 u_setMutexFunctions_SYSTEM_API_DO_NO
OT_USE T_USE
# define ucnv_setDefaultName_4_6 ucnv_setDefaultName_SYSTEM_API_DO_N # define ucnv_setDefaultName_48 ucnv_setDefaultName_SYSTEM_API_DO_NO
OT_USE T_USE
# define uloc_getDefault_4_6 uloc_getDefault_SYSTEM_API_DO_NOT_USE # define uloc_getDefault_48 uloc_getDefault_SYSTEM_API_DO_NOT_USE
# define uloc_setDefault_4_6 uloc_setDefault_SYSTEM_API_DO_NOT_USE # define uloc_setDefault_48 uloc_setDefault_SYSTEM_API_DO_NOT_USE
# endif /* U_DISABLE_RENAMING */ # endif /* U_DISABLE_RENAMING */
#endif /* U_HIDE_SYSTEM_API */ #endif /* U_HIDE_SYSTEM_API */
#endif /* USYSTEM_H */ #endif /* USYSTEM_H */
 End of changes. 2 change blocks. 
12 lines changed or deleted 12 lines changed or added


 utypes.h   utypes.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1996-2010, International Business Machines * Copyright (C) 1996-2011, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* FILE NAME : UTYPES.H (formerly ptypes.h) * FILE NAME : UTYPES.H (formerly ptypes.h)
* *
* Date Name Description * Date Name Description
* 12/11/96 helena Creation. * 12/11/96 helena Creation.
* 02/27/97 aliu Added typedefs for UClassID, int8, int16, int32 , * 02/27/97 aliu Added typedefs for UClassID, int8, int16, int32 ,
* uint8, uint16, and uint32. * uint8, uint16, and uint32.
* 04/01/97 aliu Added XP_CPLUSPLUS and modified to work under C as * 04/01/97 aliu Added XP_CPLUSPLUS and modified to work under C as
skipping to change at line 39 skipping to change at line 39
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef UTYPES_H #ifndef UTYPES_H
#define UTYPES_H #define UTYPES_H
#include "unicode/umachine.h" #include "unicode/umachine.h"
#include "unicode/utf.h" #include "unicode/utf.h"
#include "unicode/uversion.h" #include "unicode/uversion.h"
#include "unicode/uconfig.h" #include "unicode/uconfig.h"
#include "float.h"
/*! /*!
* \file * \file
* \brief Basic definitions for ICU, for both C and C++ APIs * \brief Basic definitions for ICU, for both C and C++ APIs
* *
* This file defines basic types, constants, and enumerations directly or * This file defines basic types, constants, and enumerations directly or
* indirectly by including other header files, especially utf.h for the * indirectly by including other header files, especially utf.h for the
* basic character and string definitions and umachine.h for consistent * basic character and string definitions and umachine.h for consistent
* integer and other types. * integer and other types.
*/ */
skipping to change at line 68 skipping to change at line 69
#else #else
# undef U_SHOW_CPLUSPLUS_API # undef U_SHOW_CPLUSPLUS_API
# define U_SHOW_CPLUSPLUS_API 0 # define U_SHOW_CPLUSPLUS_API 0
#endif #endif
/** @{ API visibility control */ /** @{ API visibility control */
/** /**
* \def U_HIDE_DRAFT_API * \def U_HIDE_DRAFT_API
* Define this to 1 to request that draft API be "hidden" * Define this to 1 to request that draft API be "hidden"
* @internal
*/
/**
* \def U_HIDE_INTERNAL_API
* Define this to 1 to request that internal API be "hidden"
* @internal
*/ */
#if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API) #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API)
#define U_HIDE_DRAFT_API 1 #define U_HIDE_DRAFT_API 1
#endif #endif
#if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API) #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API)
#define U_HIDE_INTERNAL_API 1 #define U_HIDE_INTERNAL_API 1
#endif #endif
#ifdef U_HIDE_DRAFT_API #ifdef U_HIDE_DRAFT_API
#include "unicode/udraft.h" #include "unicode/udraft.h"
skipping to change at line 315 skipping to change at line 322
/** The number of milliseconds per second @stable ICU 2.0 */ /** The number of milliseconds per second @stable ICU 2.0 */
#define U_MILLIS_PER_SECOND (1000) #define U_MILLIS_PER_SECOND (1000)
/** The number of milliseconds per minute @stable ICU 2.0 */ /** The number of milliseconds per minute @stable ICU 2.0 */
#define U_MILLIS_PER_MINUTE (60000) #define U_MILLIS_PER_MINUTE (60000)
/** The number of milliseconds per hour @stable ICU 2.0 */ /** The number of milliseconds per hour @stable ICU 2.0 */
#define U_MILLIS_PER_HOUR (3600000) #define U_MILLIS_PER_HOUR (3600000)
/** The number of milliseconds per day @stable ICU 2.0 */ /** The number of milliseconds per day @stable ICU 2.0 */
#define U_MILLIS_PER_DAY (86400000) #define U_MILLIS_PER_DAY (86400000)
/**
* Maximum UDate value
* @draft ICU 4.8
*/
#define U_DATE_MAX DBL_MAX
/**
* Minimum UDate value
* @draft ICU 4.8
*/
#define U_DATE_MIN -U_DATE_MAX
/*========================================================================= ==*/ /*========================================================================= ==*/
/* UClassID-based RTTI */ /* UClassID-based RTTI */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** /**
* UClassID is used to identify classes without using RTTI, since RTTI * UClassID is used to identify classes without using RTTI, since RTTI
* is not yet supported by all C++ compilers. Each class hierarchy which n eeds * is not yet supported by all C++ compilers. Each class hierarchy which n eeds
* 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.
skipping to change at line 740 skipping to change at line 759
U_PATTERN_SYNTAX_ERROR, /**< Syntax error in format pattern * / U_PATTERN_SYNTAX_ERROR, /**< Syntax error in format pattern * /
U_ILLEGAL_PAD_POSITION, /**< Pad symbol misplaced in number p attern */ U_ILLEGAL_PAD_POSITION, /**< Pad symbol misplaced in number p attern */
U_UNMATCHED_BRACES, /**< Braces do not match in message p attern */ U_UNMATCHED_BRACES, /**< Braces do not match in message p attern */
U_UNSUPPORTED_PROPERTY, /**< UNUSED as of ICU 2.4 */ U_UNSUPPORTED_PROPERTY, /**< UNUSED as of ICU 2.4 */
U_UNSUPPORTED_ATTRIBUTE, /**< UNUSED as of ICU 2.4 */ U_UNSUPPORTED_ATTRIBUTE, /**< UNUSED as of ICU 2.4 */
U_ARGUMENT_TYPE_MISMATCH, /**< Argument name and argument index mismatch in MessageFormat functions */ U_ARGUMENT_TYPE_MISMATCH, /**< Argument name and argument index mismatch in MessageFormat functions */
U_DUPLICATE_KEYWORD, /**< Duplicate keyword in PluralForma t */ U_DUPLICATE_KEYWORD, /**< Duplicate keyword in PluralForma t */
U_UNDEFINED_KEYWORD, /**< Undefined Plural keyword */ U_UNDEFINED_KEYWORD, /**< Undefined Plural keyword */
U_DEFAULT_KEYWORD_MISSING, /**< Missing DEFAULT rule in plural r ules */ U_DEFAULT_KEYWORD_MISSING, /**< Missing DEFAULT rule in plural r ules */
U_DECIMAL_NUMBER_SYNTAX_ERROR, /**< Decimal number syntax error */ U_DECIMAL_NUMBER_SYNTAX_ERROR, /**< Decimal number syntax error */
U_FORMAT_INEXACT_ERROR, /**< Cannot format a number exactly a nd rounding mode is ROUND_UNNECESSARY @draft ICU 4.8 */
U_FMT_PARSE_ERROR_LIMIT, /**< The limit for format library err ors */ U_FMT_PARSE_ERROR_LIMIT, /**< The limit for format library err ors */
/* /*
* the error code range 0x10200 0x102ff are reserved for Break Iterator related error * the error code range 0x10200 0x102ff are reserved for Break Iterator related error
*/ */
U_BRK_INTERNAL_ERROR=0x10200, /**< An internal error (bug) was detected. */ U_BRK_INTERNAL_ERROR=0x10200, /**< An internal error (bug) was detected. */
U_BRK_ERROR_START=0x10200, /**< Start of codes indicating B reak Iterator failures */ U_BRK_ERROR_START=0x10200, /**< Start of codes indicating B reak Iterator failures */
U_BRK_HEX_DIGITS_EXPECTED, /**< Hex digits expected as part of a escaped char in a rule. */ U_BRK_HEX_DIGITS_EXPECTED, /**< Hex digits expected as part of a escaped char in a rule. */
U_BRK_SEMICOLON_EXPECTED, /**< Missing ';' at the end of a RBBI rule. */ U_BRK_SEMICOLON_EXPECTED, /**< Missing ';' at the end of a RBBI rule. */
U_BRK_RULE_SYNTAX, /**< Syntax error in RBBI rule. */ U_BRK_RULE_SYNTAX, /**< Syntax error in RBBI rule. */
 End of changes. 5 change blocks. 
1 lines changed or deleted 21 lines changed or added


 uvernum.h   uvernum.h 
skipping to change at line 45 skipping to change at line 45
*/ */
#ifndef UVERNUM_H #ifndef UVERNUM_H
#define UVERNUM_H #define UVERNUM_H
/** The standard copyright notice that gets compiled into each library. /** The standard copyright notice that gets compiled into each library.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_COPYRIGHT_STRING \ #define U_COPYRIGHT_STRING \
" Copyright (C) 2011, International Business Machines Corporation and oth ers. All Rights Reserved. " " Copyright (C) 2010, International Business Machines Corporation and oth ers. All Rights Reserved. "
/** The current ICU major version as an integer. /** The current ICU major version as an integer.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION_MAJOR_NUM 4 #define U_ICU_VERSION_MAJOR_NUM 4
/** 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 6 #define U_ICU_VERSION_MINOR_NUM 8
/** The current ICU patchlevel version as an integer. /** The current ICU patchlevel version as an integer.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION_PATCHLEVEL_NUM 1 #define U_ICU_VERSION_PATCHLEVEL_NUM 0
/** The current ICU build level version as an integer. /** The current ICU build level version as an integer.
* This value is for use by ICU clients. It defaults to 0. * This value is for use by ICU clients. It defaults to 0.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#ifndef U_ICU_VERSION_BUILDLEVEL_NUM #ifndef U_ICU_VERSION_BUILDLEVEL_NUM
#define U_ICU_VERSION_BUILDLEVEL_NUM 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 _46 #define U_ICU_VERSION_SUFFIX _48
/** Glued version suffix function for renamers /** Glued version suffix function for renamers
* This value will change in the subsequent releases of ICU. * This value will change in the subsequent releases of ICU.
* If a custom suffix (such as matching library suffixes) is desired, this can be modified. * If a custom suffix (such as matching library suffixes) is desired, this can be modified.
* Note that if present, platform.h may contain an earlier definition of t his macro. * Note that if present, platform.h may contain an earlier definition of t his macro.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
#ifndef U_ICU_ENTRY_POINT_RENAME #ifndef U_ICU_ENTRY_POINT_RENAME
#define U_ICU_ENTRY_POINT_RENAME(x) x ## _46 #define U_ICU_ENTRY_POINT_RENAME(x) x ## _48
#endif #endif
/** The current ICU library version as a dotted-decimal string. The patchle vel /** The current ICU library version as a dotted-decimal string. The patchle vel
* only appears in this string if it non-zero. * only appears in this string if it non-zero.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION "4.6.1" #define U_ICU_VERSION "4.8"
/** 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 "46" #define U_ICU_VERSION_SHORT "48"
/** Data version in ICU4C. /** Data version in ICU4C.
* @internal ICU 4.4 Internal Use Only * @internal ICU 4.4 Internal Use Only
**/ **/
#define U_ICU_DATA_VERSION "4.6" #define U_ICU_DATA_VERSION "4.8"
/*========================================================================= == /*========================================================================= ==
* ICU collation framework version information * ICU collation framework version information
* Version info that can be obtained from a collator is affected by these * Version info that can be obtained from a collator is affected by these
* numbers in a secret and magic way. Please use collator version as whole * numbers in a secret and magic way. Please use collator version as whole
*========================================================================= == *========================================================================= ==
*/ */
/** /**
* Collation runtime version (sort key generator, strcoll). * Collation runtime version (sort key generator, strcoll).
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 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/