bms.h   bms.h 
/* /*
* Copyright (C) 1996-2011, International Business Machines Corporation and Others. * Copyright (C) 1996-2012, International Business Machines Corporation and Others.
* All rights reserved. * All rights reserved.
*/ */
/** /**
* \file * \file
* \brief C API: Boyer-Moore StringSearch prototype. * \brief C API: Boyer-Moore StringSearch prototype.
* \internal * \internal
*/ */
#ifndef _BMS_H #ifndef _BMS_H
skipping to change at line 55 skipping to change at line 55
* @param status - will be set if any errors occur. * @param status - will be set if any errors occur.
* *
* @return the <code>UCD</code> object. You must call * @return the <code>UCD</code> object. You must call
* <code>ucd_close</code> when you are done using the object. * <code>ucd_close</code> when you are done using the object.
* *
* Note: if on return status is set to an error, the only safe * Note: if on return status is set to an error, the only safe
* thing to do with the returned object is to call <code>ucd_close</code>. * thing to do with the returned object is to call <code>ucd_close</code>.
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI UCD * U_EXPORT2 U_INTERNAL UCD * U_EXPORT2
ucd_open(UCollator *coll, UErrorCode *status); ucd_open(UCollator *coll, UErrorCode *status);
/** /**
* Release a <code>UCD</code> object. * Release a <code>UCD</code> object.
* *
* @param ucd - the object * @param ucd - the object
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
ucd_close(UCD *ucd); ucd_close(UCD *ucd);
/** /**
* Get the <code>UCollator</code> object used to create a <code>UCD</code> object. * Get the <code>UCollator</code> object used to create a <code>UCD</code> object.
* The <code>UCollator</code> object returned may not be the exact * The <code>UCollator</code> object returned may not be the exact
* object that was used to create this object, but it will have the * object that was used to create this object, but it will have the
* same behavior. * same behavior.
* *
* @param ucd - the <code>UCD</code> object * @param ucd - the <code>UCD</code> object
* *
* @return the <code>UCollator</code> used to create the given * @return the <code>UCollator</code> used to create the given
* <code>UCD</code> object. * <code>UCD</code> object.
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI UCollator * U_EXPORT2 U_INTERNAL UCollator * U_EXPORT2
ucd_getCollator(UCD *ucd); ucd_getCollator(UCD *ucd);
/** /**
* <code>UCD</code> objects are expensive to compute, and so * <code>UCD</code> objects are expensive to compute, and so
* may be cached. This routine will free the cached objects and delete * may be cached. This routine will free the cached objects and delete
* the cache. * the cache.
* *
* WARNING: Don't call this until you are have called <code>close</code> * WARNING: Don't call this until you are have called <code>close</code>
* for each <code>UCD</code> object that you have used. also, * for each <code>UCD</code> object that you have used. also,
* DO NOT call this if another thread may be calling <code>ucd_flushCache</ code> * DO NOT call this if another thread may be calling <code>ucd_flushCache</ code>
* at the same time. * at the same time.
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
ucd_freeCache(); ucd_freeCache();
/** /**
* <code>UCD</code> objects are expensive to compute, and so * <code>UCD</code> objects are expensive to compute, and so
* may be cached. This routine will remove any unused <code>UCD</code> * may be cached. This routine will remove any unused <code>UCD</code>
* objects from the cache. * objects from the cache.
* *
* @internal 4.0.1 technology preview * @internal 4.0.1 technology preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
ucd_flushCache(); ucd_flushCache();
/** /**
* BMS * BMS
* *
* This object holds the information needed to do a Collation sensitive Boy er-Moore search. It encapulates * This object holds the information needed to do a Collation sensitive Boy er-Moore search. It encapulates
* the pattern, the "bad character" and "good suffix" tables, the Collator- based data needed to compute them, * the pattern, the "bad character" and "good suffix" tables, the Collator- based data needed to compute them,
* and a reference to the text being searched. * and a reference to the text being searched.
* *
* To do a search, you first need to get a <code>UCD</code> object by calli ng <code>ucd_open</code>. * To do a search, you first need to get a <code>UCD</code> object by calli ng <code>ucd_open</code>.
skipping to change at line 207 skipping to change at line 207
* @param status - will be set if any errors occur. * @param status - will be set if any errors occur.
* *
* @return the <code>BMS</code> object. * @return the <code>BMS</code> object.
* *
* Note: if on return status is set to an error, the only safe * Note: if on return status is set to an error, the only safe
* thing to do with the returned object is to call * thing to do with the returned object is to call
* <code>bms_close</code>. * <code>bms_close</code>.
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI BMS * U_EXPORT2 U_INTERNAL BMS * U_EXPORT2
bms_open(UCD *ucd, bms_open(UCD *ucd,
const UChar *pattern, int32_t patternLength, const UChar *pattern, int32_t patternLength,
const UChar *target, int32_t targetLength, const UChar *target, int32_t targetLength,
UErrorCode *status); UErrorCode *status);
/** /**
* Close a <code>BMS</code> object and release all the * Close a <code>BMS</code> object and release all the
* storage associated with it. * storage associated with it.
* *
* @param bms - the <code>BMS</code> object to close. * @param bms - the <code>BMS</code> object to close.
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
bms_close(BMS *bms); bms_close(BMS *bms);
/** /**
* Test the pattern to see if it generates any CEs. * Test the pattern to see if it generates any CEs.
* *
* @param bms - the <code>BMS</code> object * @param bms - the <code>BMS</code> object
* @return <code>TRUE</code> if the pattern string did not generate any CEs * @return <code>TRUE</code> if the pattern string did not generate any CEs
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI UBool U_EXPORT2 U_INTERNAL UBool U_EXPORT2
bms_empty(BMS *bms); bms_empty(BMS *bms);
/** /**
* Get the <code>UCD</code> object used to create * Get the <code>UCD</code> object used to create
* a given <code>BMS</code> object. * a given <code>BMS</code> object.
* *
* @param bms - the <code>BMS</code> object * @param bms - the <code>BMS</code> object
* *
* @return - the <code>UCD</code> object used to create * @return - the <code>UCD</code> object used to create
* the given <code>BMS</code> object. * the given <code>BMS</code> object.
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI UCD * U_EXPORT2 U_INTERNAL UCD * U_EXPORT2
bms_getData(BMS *bms); bms_getData(BMS *bms);
/** /**
* Search for the pattern string in the target string. * Search for the pattern string in the target string.
* *
* @param bms - the <code>BMS</code> object * @param bms - the <code>BMS</code> object
* @param offset - the offset in the target string at which to begin the se arch * @param offset - the offset in the target string at which to begin the se arch
* @param start - will be set to the starting offset of the match, or -1 if there's no match * @param start - will be set to the starting offset of the match, or -1 if there's no match
* @param end - will be set to the ending offset of the match, or -1 if the re's no match * @param end - will be set to the ending offset of the match, or -1 if the re's no match
* *
* @return <code>TRUE</code> if the match succeeds, <code>FALSE</code> othe rwise. * @return <code>TRUE</code> if the match succeeds, <code>FALSE</code> othe rwise.
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI UBool U_EXPORT2 U_INTERNAL UBool U_EXPORT2
bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end); bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end);
/** /**
* Set the target string for the match. * Set the target string for the match.
* *
* @param bms - the <code>BMS</code> object * @param bms - the <code>BMS</code> object
* @param target - the new target string * @param target - the new target string
* @param targetLength - the length of the new target string * @param targetLength - the length of the new target string
* @param status - will be set if any errors occur. * @param status - will be set if any errors occur.
* *
* @internal ICU 4.0.1 technology preview * @internal ICU 4.0.1 technology preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UE rrorCode *status); bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UE rrorCode *status);
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
#endif #endif
#endif /* _BMS_H */ #endif /* _BMS_H */
 End of changes. 12 change blocks. 
12 lines changed or deleted 12 lines changed or added


 brkiter.h   brkiter.h 
/* /*
*************************************************************************** ***** *************************************************************************** *****
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** ***** *************************************************************************** *****
* *
* File brkiter.h * File brkiter.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 02/18/97 aliu Added typedef for TextCount. Made DONE const. * 02/18/97 aliu Added typedef for TextCount. Made DONE const.
* 05/07/97 aliu Fixed DLL declaration. * 05/07/97 aliu Fixed DLL declaration.
skipping to change at line 210 skipping to change at line 210
enum { enum {
/** /**
* DONE is returned by previous() and next() after all valid * DONE is returned by previous() and next() after all valid
* boundaries have been returned. * boundaries have been returned.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
DONE = (int32_t)-1 DONE = (int32_t)-1
}; };
/** /**
* Return the index of the first character in the text being scanned. * Set the iterator position to the index of the first character in the
text being scanned.
* @return The index of the first character in the text being scanned.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t first(void) = 0; virtual int32_t first(void) = 0;
/** /**
* Return the index immediately BEYOND the last character in the text b * Set the iterator position to the index immediately BEYOND the last c
eing scanned. haracter in the text being scanned.
* @return The index immediately BEYOND the last character in the text
being scanned.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t last(void) = 0; virtual int32_t last(void) = 0;
/** /**
* Return the boundary preceding the current boundary. * Set the iterator position to the boundary preceding the current boun dary.
* @return The character index of the previous text boundary or DONE if all * @return The character index of the previous text boundary or DONE if all
* boundaries have been returned. * boundaries have been returned.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t previous(void) = 0; virtual int32_t previous(void) = 0;
/** /**
* Return the boundary following the current boundary. * Advance the iterator to the boundary following the current boundary.
* @return The character index of the next text boundary or DONE if all * @return The character index of the next text boundary or DONE if all
* boundaries have been returned. * boundaries have been returned.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t next(void) = 0; virtual int32_t next(void) = 0;
/** /**
* Return character index of the current interator position within the text. * Return character index of the current interator position within the text.
* @return The boundary most recently returned. * @return The boundary most recently returned.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t current(void) const = 0; virtual int32_t current(void) const = 0;
/** /**
* Return the first boundary following the specified offset. * Advance the iterator to the first boundary following the specified o ffset.
* The value returned is always greater than the offset or * The value returned is always greater than the offset or
* the value BreakIterator.DONE * the value BreakIterator.DONE
* @param offset the offset to begin scanning. * @param offset the offset to begin scanning.
* @return The first boundary after the specified offset. * @return The first boundary after the specified offset.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t following(int32_t offset) = 0; virtual int32_t following(int32_t offset) = 0;
/** /**
* Return the first boundary preceding the specified offset. * Set the iterator position to the first boundary preceding the specif ied offset.
* The value returned is always smaller than the offset or * The value returned is always smaller than the offset or
* the value BreakIterator.DONE * the value BreakIterator.DONE
* @param offset the offset to begin scanning. * @param offset the offset to begin scanning.
* @return The first boundary before the specified offset. * @return The first boundary before the specified offset.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t preceding(int32_t offset) = 0; virtual int32_t preceding(int32_t offset) = 0;
/** /**
* Return true if the specfied position is a boundary position. * Return true if the specfied position is a boundary position.
* As a side effect, the current position of the iterator is set * As a side effect, the current position of the iterator is set
* to the first boundary position at or following the specified offset. * to the first boundary position at or following the specified offset.
* @param offset the offset to check. * @param offset the offset to check.
* @return True if "offset" is a boundary position. * @return True if "offset" is a boundary position.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UBool isBoundary(int32_t offset) = 0; virtual UBool isBoundary(int32_t offset) = 0;
/** /**
* Return the nth boundary from the current boundary * Set the iterator position to the nth boundary from the current bound
* @param n which boundary to return. A value of 0 ary
* @param n the number of boundaries to move by. A value of 0
* does nothing. Negative values move to previous boundaries * does nothing. Negative values move to previous boundaries
* and positive values move to later boundaries. * and positive values move to later boundaries.
* @return The index of the nth boundary from the current position, or * @return The new iterator position, or
* DONE if there are fewer than |n| boundaries in the specfied directio n. * DONE if there are fewer than |n| boundaries in the specfied directio n.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t next(int32_t n) = 0; virtual int32_t next(int32_t n) = 0;
/** /**
* Create BreakIterator for word-breaks using the given locale. * Create BreakIterator for word-breaks using the given locale.
* Returns an instance of a BreakIterator implementing word breaks. * Returns an instance of a BreakIterator implementing word breaks.
* WordBreak is useful for word selection (ex. double click) * WordBreak is useful for word selection (ex. double click)
* @param where the locale. * @param where the locale.
 End of changes. 9 change blocks. 
11 lines changed or deleted 16 lines changed or added


 bytestrie.h   bytestrie.h 
skipping to change at line 65 skipping to change at line 65
* The BytesTrie object will not read more bytes than * The BytesTrie object will not read more bytes than
* the BytesTrieBuilder generated in the corresponding build() call. * the BytesTrieBuilder generated in the corresponding build() call.
* *
* The array is not copied/cloned and must not be modified while * The array is not copied/cloned and must not be modified while
* the BytesTrie object is in use. * the BytesTrie object is in use.
* *
* @param trieBytes The byte array that contains the serialized trie. * @param trieBytes The byte array that contains the serialized trie.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
BytesTrie(const void *trieBytes) BytesTrie(const void *trieBytes)
: ownedArray_(NULL), bytes_(reinterpret_cast<const uint8_t *>(t rieBytes)), : ownedArray_(NULL), bytes_(static_cast<const uint8_t *>(trieBy tes)),
pos_(bytes_), remainingMatchLength_(-1) {} pos_(bytes_), remainingMatchLength_(-1) {}
/** /**
* Destructor. * Destructor.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
~BytesTrie(); ~BytesTrie();
/** /**
* Copy constructor, copies the other trie reader object and its state, * Copy constructor, copies the other trie reader object and its state,
skipping to change at line 352 skipping to change at line 352
private: private:
friend class BytesTrieBuilder; friend class BytesTrieBuilder;
/** /**
* Constructs a BytesTrie reader instance. * Constructs a BytesTrie reader instance.
* Unlike the public constructor which just aliases an array, * Unlike the public constructor which just aliases an array,
* this constructor adopts the builder's array. * this constructor adopts the builder's array.
* This constructor is only called by the builder. * This constructor is only called by the builder.
*/ */
BytesTrie(void *adoptBytes, const void *trieBytes) BytesTrie(void *adoptBytes, const void *trieBytes)
: ownedArray_(reinterpret_cast<uint8_t *>(adoptBytes)), : ownedArray_(static_cast<uint8_t *>(adoptBytes)),
bytes_(reinterpret_cast<const uint8_t *>(trieBytes)), bytes_(static_cast<const uint8_t *>(trieBytes)),
pos_(bytes_), remainingMatchLength_(-1) {} pos_(bytes_), remainingMatchLength_(-1) {}
// No assignment operator. // No assignment operator.
BytesTrie &operator=(const BytesTrie &other); BytesTrie &operator=(const BytesTrie &other);
inline void stop() { inline void stop() {
pos_=NULL; pos_=NULL;
} }
// Reads a compact 32-bit integer. // Reads a compact 32-bit integer.
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 bytestriebuilder.h   bytestriebuilder.h 
skipping to change at line 15 skipping to change at line 15
*************************************************************************** **** *************************************************************************** ****
* file name: bytestriebuilder.h * file name: bytestriebuilder.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2010sep25 * created on: 2010sep25
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
/**
* \file
* \brief C++ API: Builder for icu::BytesTrie
*/
#ifndef __BYTESTRIEBUILDER_H__ #ifndef __BYTESTRIEBUILDER_H__
#define __BYTESTRIEBUILDER_H__ #define __BYTESTRIEBUILDER_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/bytestrie.h" #include "unicode/bytestrie.h"
#include "unicode/stringpiece.h" #include "unicode/stringpiece.h"
#include "unicode/stringtriebuilder.h" #include "unicode/stringtriebuilder.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 calendar.h   calendar.h 
skipping to change at line 89 skipping to change at line 89
* Calendar *rightNow = Calendar::createInstance(errCode); * Calendar *rightNow = Calendar::createInstance(errCode);
* </pre> * </pre>
* \htmlonly</blockquote>\endhtmlonly * \htmlonly</blockquote>\endhtmlonly
* *
* <p> * <p>
* A <code>Calendar</code> object can produce all the time field values * A <code>Calendar</code> object can produce all the time field values
* needed to implement the date-time formatting for a particular language * needed to implement the date-time formatting for a particular language
* and calendar style (for example, Japanese-Gregorian, Japanese-Traditiona l). * and calendar style (for example, Japanese-Gregorian, Japanese-Traditiona l).
* *
* <p> * <p>
* When computing a <code>UDate</code> from time fields, two special circum stances * When computing a <code>UDate</code> from time fields, some special circu mstances
* may arise: there may be insufficient information to compute the * may arise: there may be insufficient information to compute the
* <code>UDate</code> (such as only year and month but no day in the month) , * <code>UDate</code> (such as only year and month but no day in the month) ,
* or there may be inconsistent information (such as "Tuesday, July 15, 199 * there may be inconsistent information (such as "Tuesday, July 15, 1996"
6" * -- July 15, 1996 is actually a Monday), or the input time might be ambig
* -- July 15, 1996 is actually a Monday). uous
* because of time zone transition.
* *
* <p> * <p>
* <strong>Insufficient information.</strong> The calendar will use default * <strong>Insufficient information.</strong> The calendar will use default
* information to specify the missing fields. This may vary by calendar; fo r * information to specify the missing fields. This may vary by calendar; fo r
* the Gregorian calendar, the default for a field is the same as that of t he * the Gregorian calendar, the default for a field is the same as that of t he
* start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc. * start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc.
* *
* <p> * <p>
* <strong>Inconsistent information.</strong> If fields conflict, the calen dar * <strong>Inconsistent information.</strong> If fields conflict, the calen dar
* will give preference to fields set more recently. For example, when * will give preference to fields set more recently. For example, when
skipping to change at line 128 skipping to change at line 129
* For the time of day: * For the time of day:
* *
* \htmlonly<blockquote>\endhtmlonly * \htmlonly<blockquote>\endhtmlonly
* <pre> * <pre>
* HOUR_OF_DAY * HOUR_OF_DAY
* AM_PM + HOUR * AM_PM + HOUR
* </pre> * </pre>
* \htmlonly</blockquote>\endhtmlonly * \htmlonly</blockquote>\endhtmlonly
* *
* <p> * <p>
* <strong>Ambiguous Wall Clock Time.</strong> When time offset from UTC ha
s
* changed, it produces ambiguous time slot around the transition. For exam
ple,
* many US locations observe daylight saving time. On the date switching to
daylight
* saving time in US, wall clock time jumps from 1:00 AM (standard) to 2:00
AM
* (daylight). Therefore, wall clock time from 1:00 AM to 1:59 AM do not ex
ist on
* the date. When the input wall time fall into this missing time slot, the
ICU
* Calendar resolves the time using the UTC offset before the transition by
default.
* In this example, 1:30 AM is interpreted as 1:30 AM standard time (non-ex
ist),
* so the final result will be 2:30 AM daylight time.
*
* <p>On the date switching back to standard time, wall clock time is moved
back one
* hour at 2:00 AM. So wall clock time from 1:00 AM to 1:59 AM occur twice.
In this
* case, the ICU Calendar resolves the time using the UTC offset after the
transition
* by default. For example, 1:30 AM on the date is resolved as 1:30 AM stan
dard time.
*
* <p>Ambiguous wall clock time resolution behaviors can be customized by C
alendar APIs
* {@link #setRepeatedWallTimeOption} and {@link #setSkippedWallTimeOption}
.
* These methods are available in ICU 49 or later versions.
*
* <p>
* <strong>Note:</strong> for some non-Gregorian calendars, different * <strong>Note:</strong> for some non-Gregorian calendars, different
* fields may be necessary for complete disambiguation. For example, a full * fields may be necessary for complete disambiguation. For example, a full
* specification of the historial Arabic astronomical calendar requires yea r, * specification of the historial Arabic astronomical calendar requires yea r,
* month, day-of-month <em>and</em> day-of-week in some cases. * month, day-of-month <em>and</em> day-of-week in some cases.
* *
* <p> * <p>
* <strong>Note:</strong> There are certain possible ambiguities in * <strong>Note:</strong> There are certain possible ambiguities in
* interpretation of certain singular times, which are resolved in the * interpretation of certain singular times, which are resolved in the
* following ways: * following ways:
* <ol> * <ol>
skipping to change at line 164 skipping to change at line 185
* can be incremented or decremented, but wrap around. For example, rolling the * can be incremented or decremented, but wrap around. For example, rolling the
* month up in the date <code>December 12, <b>1996</b></code> results in * month up in the date <code>December 12, <b>1996</b></code> results in
* <code>January 12, <b>1996</b></code>. * <code>January 12, <b>1996</b></code>.
* *
* <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>.
* *
* <p><big><b>Supported range</b></big>
*
* <p>The allowable range of <code>Calendar</code> has been
* narrowed. <code>GregorianCalendar</code> used to attempt to support
* the range of dates with millisecond values from
* <code>Long.MIN_VALUE</code> to <code>Long.MAX_VALUE</code>.
* The new <code>Calendar</code> protocol specifies the
* maximum range of supportable dates as those having Julian day numbers
* of <code>-0x7F000000</code> to <code>+0x7F000000</code>. This
* corresponds to years from ~5,800,000 BCE to ~5,800,000 CE. Programmers
* should use the protected constants in <code>Calendar</code> to
* specify an extremely early or extremely late date.</p>
*
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
class U_I18N_API Calendar : public UObject { class U_I18N_API Calendar : public UObject {
public: public:
/** /**
* Field IDs for date and time. Used to specify date/time fields. ERA i s calendar * Field IDs for date and time. Used to specify date/time fields. ERA i s calendar
* specific. Example ranges given are for illustration only; see specif ic Calendar * specific. Example ranges given are for illustration only; see specif ic Calendar
* subclasses for actual ranges. * subclasses for actual ranges.
* @deprecated ICU 2.6. Use C enum UCalendarDateFields defined in ucal. h * @deprecated ICU 2.6. Use C enum UCalendarDateFields defined in ucal. h
skipping to change at line 344 skipping to change at line 378
* otherwise. * otherwise.
* @return A Calendar if created successfully. NULL otherwi se. * @return A Calendar if created successfully. NULL otherwi se.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, const Locale& aLocale, UErrorCode& success); static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, const Locale& aLocale, UErrorCode& success);
/** /**
* Gets a Calendar using the given timezone and given locale. The Time Zone * Gets a Calendar using the given timezone and given locale. The Time Zone
* is _not_ adopted; the client is still responsible for deleting it. * is _not_ adopted; the client is still responsible for deleting it.
* *
* @param zoneToAdopt The given timezone to be adopted. * @param zone The given timezone.
* @param aLocale The given locale. * @param aLocale The given locale.
* @param success Indicates the success/failure of Calendar creati on. Filled in * @param success Indicates the success/failure of Calendar creati on. Filled in
* with U_ZERO_ERROR if created successfully, set t o a failure result * with U_ZERO_ERROR if created successfully, set t o a failure result
* otherwise. * otherwise.
* @return A Calendar if created successfully. NULL otherwi se. * @return A Calendar if created successfully. NULL otherwi se.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
static Calendar* U_EXPORT2 createInstance(const TimeZone& zoneToAdopt, const Locale& aLocale, UErrorCode& success); static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, const L ocale& aLocale, UErrorCode& success);
/** /**
* Returns a list of the locales for which Calendars are installed. * Returns a list of the locales for which Calendars are installed.
* *
* @param count Number of locales returned. * @param count Number of locales returned.
* @return An array of Locale objects representing the set of loc ales for which * @return An array of Locale objects representing the set of loc ales for which
* Calendars are installed. The system retains ownership of this list; * Calendars are installed. The system retains ownership of this list;
* the caller must NOT delete it. Does not include user-r egistered Calendars. * the caller must NOT delete it. Does not include user-r egistered Calendars.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 508 skipping to change at line 542
*/ */
UBool after(const Calendar& when, UErrorCode& status) const; UBool after(const Calendar& when, UErrorCode& status) const;
/** /**
* UDate Arithmetic function. Adds the specified (signed) amount of tim e to the given * UDate Arithmetic function. Adds the specified (signed) amount of tim e to the given
* time field, based on the calendar's rules. For example, to subtract 5 days from * time field, based on the calendar's rules. For example, to subtract 5 days from
* the current time of the calendar, call add(Calendar::DATE, -5). When adding on * the current time of the calendar, call add(Calendar::DATE, -5). When adding on
* the month or Calendar::MONTH field, other fields like date might con flict and * the month or Calendar::MONTH field, other fields like date might con flict and
* need to be changed. For instance, adding 1 month on the date 01/31/9 6 will result * need to be changed. For instance, adding 1 month on the date 01/31/9 6 will result
* in 02/29/96. * in 02/29/96.
* Adding a positive value always means moving forward in time, so for
the Gregorian calendar,
* starting with 100 BC and adding +1 to year results in 99 BC (even th
ough this actually reduces
* the numeric value of the field itself).
* *
* @param field Specifies which date field to modify. * @param field Specifies which date field to modify.
* @param amount The amount of time to be added to the field, in the n atural unit * @param amount The amount of time to be added to the field, in the n atural unit
* for that field (e.g., days for the day fields, hours for the hour * for that field (e.g., days for the day fields, hours for the hour
* field.) * field.)
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid or restri cted by * previously set in the time field is invalid or restri cted by
* leniency, this will be set to an error status. * leniency, this will be set to an error status.
* @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amou nt, UErrorCode& status) instead. * @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amou nt, UErrorCode& status) instead.
*/ */
virtual void add(EDateFields field, int32_t amount, UErrorCode& status) ; virtual void add(EDateFields field, int32_t amount, UErrorCode& status) ;
/** /**
* UDate Arithmetic function. Adds the specified (signed) amount of tim e to the given * UDate Arithmetic function. Adds the specified (signed) amount of tim e to the given
* time field, based on the calendar's rules. For example, to subtract 5 days from * time field, based on the calendar's rules. For example, to subtract 5 days from
* the current time of the calendar, call add(Calendar::DATE, -5). When adding on * the current time of the calendar, call add(Calendar::DATE, -5). When adding on
* the month or Calendar::MONTH field, other fields like date might con flict and * the month or Calendar::MONTH field, other fields like date might con flict and
* need to be changed. For instance, adding 1 month on the date 01/31/9 6 will result * need to be changed. For instance, adding 1 month on the date 01/31/9 6 will result
* in 02/29/96. * in 02/29/96.
* Adding a positive value always means moving forward in time, so for
the Gregorian calendar,
* starting with 100 BC and adding +1 to year results in 99 BC (even th
ough this actually reduces
* the numeric value of the field itself).
* *
* @param field Specifies which date field to modify. * @param field Specifies which date field to modify.
* @param amount The amount of time to be added to the field, in the n atural unit * @param amount The amount of time to be added to the field, in the n atural unit
* for that field (e.g., days for the day fields, hours for the hour * for that field (e.g., days for the day fields, hours for the hour
* field.) * field.)
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid or restri cted by * previously set in the time field is invalid or restri cted by
* leniency, this will be set to an error status. * leniency, this will be set to an error status.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
skipping to change at line 548 skipping to change at line 588
#ifndef U_HIDE_DEPRECATED_API #ifndef U_HIDE_DEPRECATED_API
/** /**
* Time Field Rolling function. Rolls (up/down) a single unit of time o n the given * Time Field Rolling function. Rolls (up/down) a single unit of time o n the given
* time field. For example, to roll the current date up by one day, cal l * time field. For example, to roll the current date up by one day, cal l
* roll(Calendar::DATE, true). When rolling on the year or Calendar::YE AR field, it * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE AR field, it
* will roll the year value in the range between getMinimum(Calendar::Y EAR) and the * will roll the year value in the range between getMinimum(Calendar::Y EAR) and the
* value returned by getMaximum(Calendar::YEAR). When rolling on the mo nth or * value returned by getMaximum(Calendar::YEAR). When rolling on the mo nth or
* Calendar::MONTH field, other fields like date might conflict and, ne ed to be * Calendar::MONTH field, other fields like date might conflict and, ne ed to be
* changed. For instance, rolling the month up on the date 01/31/96 wil l result in * changed. For instance, rolling the month up on the date 01/31/96 wil l result in
* 02/29/96. Rolling up always means rolling forward in time; e.g., rol * 02/29/96. Rolling up always means rolling forward in time (unless th
ling the year e limit of the
* up on "100 BC" will result in "99 BC", for Gregorian calendar. When * field is reached, in which case it may pin or wrap), so for Gregoria
rolling on the n calendar,
* hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the hour va * starting with 100 BC and rolling the year up results in 99 BC.
lue in the range * When eras have a definite beginning and end (as in the Chinese calen
* between 0 and 23, which is zero-based. dar, or as in
* most eras in the Japanese calendar) then rolling the year past eithe
r limit of the
* era will cause the year to wrap around. When eras only have a limit
at one end,
* then attempting to roll the year past that limit will result in pinn
ing the year
* at that limit. Note that for most calendars in which era 0 years mov
e forward in
* time (such as Buddhist, Hebrew, or Islamic), it is possible for add
or roll to
* result in negative years for era 0 (that is the only way to represen
t years before
* the calendar epoch).
* When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it w
ill roll the
* hour value in the range between 0 and 23, which is zero-based.
* <P> * <P>
* NOTE: Do not use this method -- use roll(EDateFields, int, UErrorCod e&) instead. * NOTE: Do not use this method -- use roll(EDateFields, int, UErrorCod e&) instead.
* *
* @param field The time field. * @param field The time field.
* @param up Indicates if the value of the specified time field is to be rolled * @param up Indicates if the value of the specified time field is to be rolled
* up or rolled down. Use true if rolling up, false othe rwise. * up or rolled down. Use true if rolling up, false othe rwise.
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid or restri cted by * previously set in the time field is invalid or restri cted by
* leniency, this will be set to an error status. * leniency, this will be set to an error status.
* @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, U ErrorCode& status) instead. * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, U ErrorCode& status) instead.
skipping to change at line 574 skipping to change at line 623
#endif /* U_HIDE_DEPRECATED_API */ #endif /* U_HIDE_DEPRECATED_API */
/** /**
* Time Field Rolling function. Rolls (up/down) a single unit of time o n the given * Time Field Rolling function. Rolls (up/down) a single unit of time o n the given
* time field. For example, to roll the current date up by one day, cal l * time field. For example, to roll the current date up by one day, cal l
* roll(Calendar::DATE, true). When rolling on the year or Calendar::YE AR field, it * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE AR field, it
* will roll the year value in the range between getMinimum(Calendar::Y EAR) and the * will roll the year value in the range between getMinimum(Calendar::Y EAR) and the
* value returned by getMaximum(Calendar::YEAR). When rolling on the mo nth or * value returned by getMaximum(Calendar::YEAR). When rolling on the mo nth or
* Calendar::MONTH field, other fields like date might conflict and, ne ed to be * Calendar::MONTH field, other fields like date might conflict and, ne ed to be
* changed. For instance, rolling the month up on the date 01/31/96 wil l result in * changed. For instance, rolling the month up on the date 01/31/96 wil l result in
* 02/29/96. Rolling up always means rolling forward in time; e.g., rol * 02/29/96. Rolling up always means rolling forward in time (unless th
ling the year e limit of the
* up on "100 BC" will result in "99 BC", for Gregorian calendar. When * field is reached, in which case it may pin or wrap), so for Gregoria
rolling on the n calendar,
* hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the hour va * starting with 100 BC and rolling the year up results in 99 BC.
lue in the range * When eras have a definite beginning and end (as in the Chinese calen
* between 0 and 23, which is zero-based. dar, or as in
* most eras in the Japanese calendar) then rolling the year past eithe
r limit of the
* era will cause the year to wrap around. When eras only have a limit
at one end,
* then attempting to roll the year past that limit will result in pinn
ing the year
* at that limit. Note that for most calendars in which era 0 years mov
e forward in
* time (such as Buddhist, Hebrew, or Islamic), it is possible for add
or roll to
* result in negative years for era 0 (that is the only way to represen
t years before
* the calendar epoch).
* When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it w
ill roll the
* hour value in the range between 0 and 23, which is zero-based.
* <P> * <P>
* NOTE: Do not use this method -- use roll(UCalendarDateFields, int, U ErrorCode&) instead. * NOTE: Do not use this method -- use roll(UCalendarDateFields, int, U ErrorCode&) instead.
* *
* @param field The time field. * @param field The time field.
* @param up Indicates if the value of the specified time field is to be rolled * @param up Indicates if the value of the specified time field is to be rolled
* up or rolled down. Use true if rolling up, false othe rwise. * up or rolled down. Use true if rolling up, false othe rwise.
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid or restri cted by * previously set in the time field is invalid or restri cted by
* leniency, this will be set to an error status. * leniency, this will be set to an error status.
* @stable ICU 2.6. * @stable ICU 2.6.
*/ */
inline void roll(UCalendarDateFields field, UBool up, UErrorCode& statu s); inline void roll(UCalendarDateFields field, UBool up, UErrorCode& statu s);
/** /**
* Time Field Rolling function. Rolls by the given amount on the given * Time Field Rolling function. Rolls by the given amount on the given
* time field. For example, to roll the current date up by one day, cal l * time field. For example, to roll the current date up by one day, cal l
* roll(Calendar::DATE, +1, status). When rolling on the month or * roll(Calendar::DATE, +1, status). When rolling on the month or
* Calendar::MONTH field, other fields like date might conflict and, ne ed to be * Calendar::MONTH field, other fields like date might conflict and, ne ed to be
* changed. For instance, rolling the month up on the date 01/31/96 wil l result in * changed. For instance, rolling the month up on the date 01/31/96 wil l result in
* 02/29/96. Rolling by a positive value always means rolling forward * 02/29/96. Rolling by a positive value always means rolling forward i
in time; n time (unless
* e.g., rolling the year by +1 on "100 BC" will result in "99 BC", for * the limit of the field is reached, in which case it may pin or wrap)
Gregorian , so for
* calendar. When rolling on the hour-in-day or Calendar::HOUR_OF_DAY f * Gregorian calendar, starting with 100 BC and rolling the year by + 1
ield, it will results in 99 BC.
* roll the hour value in the range between 0 and 23, which is zero-bas * When eras have a definite beginning and end (as in the Chinese calen
ed. dar, or as in
* most eras in the Japanese calendar) then rolling the year past eithe
r limit of the
* era will cause the year to wrap around. When eras only have a limit
at one end,
* then attempting to roll the year past that limit will result in pinn
ing the year
* at that limit. Note that for most calendars in which era 0 years mov
e forward in
* time (such as Buddhist, Hebrew, or Islamic), it is possible for add
or roll to
* result in negative years for era 0 (that is the only way to represen
t years before
* the calendar epoch).
* When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it w
ill roll the
* hour value in the range between 0 and 23, which is zero-based.
* <P> * <P>
* The only difference between roll() and add() is that roll() does not change * The only difference between roll() and add() is that roll() does not change
* the value of more significant fields when it reaches the minimum or maximum * the value of more significant fields when it reaches the minimum or maximum
* of its range, whereas add() does. * of its range, whereas add() does.
* *
* @param field The time field. * @param field The time field.
* @param amount Indicates amount to roll. * @param amount Indicates amount to roll.
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid, this wil l be set to * previously set in the time field is invalid, this wil l be set to
* an error status. * an error status.
* @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amo unt, UErrorCode& status) instead. * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amo unt, UErrorCode& status) instead.
*/ */
virtual void roll(EDateFields field, int32_t amount, UErrorCode& status ); virtual void roll(EDateFields field, int32_t amount, UErrorCode& status );
/** /**
* Time Field Rolling function. Rolls by the given amount on the given * Time Field Rolling function. Rolls by the given amount on the given
* time field. For example, to roll the current date up by one day, cal l * time field. For example, to roll the current date up by one day, cal l
* roll(Calendar::DATE, +1, status). When rolling on the month or * roll(Calendar::DATE, +1, status). When rolling on the month or
* Calendar::MONTH field, other fields like date might conflict and, ne ed to be * Calendar::MONTH field, other fields like date might conflict and, ne ed to be
* changed. For instance, rolling the month up on the date 01/31/96 wil l result in * changed. For instance, rolling the month up on the date 01/31/96 wil l result in
* 02/29/96. Rolling by a positive value always means rolling forward * 02/29/96. Rolling by a positive value always means rolling forward i
in time; n time (unless
* e.g., rolling the year by +1 on "100 BC" will result in "99 BC", for * the limit of the field is reached, in which case it may pin or wrap)
Gregorian , so for
* calendar. When rolling on the hour-in-day or Calendar::HOUR_OF_DAY f * Gregorian calendar, starting with 100 BC and rolling the year by + 1
ield, it will results in 99 BC.
* roll the hour value in the range between 0 and 23, which is zero-bas * When eras have a definite beginning and end (as in the Chinese calen
ed. dar, or as in
* most eras in the Japanese calendar) then rolling the year past eithe
r limit of the
* era will cause the year to wrap around. When eras only have a limit
at one end,
* then attempting to roll the year past that limit will result in pinn
ing the year
* at that limit. Note that for most calendars in which era 0 years mov
e forward in
* time (such as Buddhist, Hebrew, or Islamic), it is possible for add
or roll to
* result in negative years for era 0 (that is the only way to represen
t years before
* the calendar epoch).
* When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it w
ill roll the
* hour value in the range between 0 and 23, which is zero-based.
* <P> * <P>
* The only difference between roll() and add() is that roll() does not change * The only difference between roll() and add() is that roll() does not change
* the value of more significant fields when it reaches the minimum or maximum * the value of more significant fields when it reaches the minimum or maximum
* of its range, whereas add() does. * of its range, whereas add() does.
* *
* @param field The time field. * @param field The time field.
* @param amount Indicates amount to roll. * @param amount Indicates amount to roll.
* @param status Output param set to success/failure code on exit. If any value * @param status Output param set to success/failure code on exit. If any value
* previously set in the time field is invalid, this wil l be set to * previously set in the time field is invalid, this wil l be set to
* an error status. * an error status.
 End of changes. 12 change blocks. 
36 lines changed or deleted 158 lines changed or added


 coll.h   coll.h 
skipping to change at line 209 skipping to change at line 209
* Two characters are considered "identical" when they have the same un icode * Two characters are considered "identical" when they have the same un icode
* spellings.<br> * spellings.<br>
* For example, "&auml;" == "&auml;". * For example, "&auml;" == "&auml;".
* *
* UCollationStrength is also used to determine the strength of sort ke ys * UCollationStrength is also used to determine the strength of sort ke ys
* generated from Collator objects. * generated from Collator objects.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
enum ECollationStrength enum ECollationStrength
{ {
PRIMARY = 0, PRIMARY = UCOL_PRIMARY, // 0
SECONDARY = 1, SECONDARY = UCOL_SECONDARY, // 1
TERTIARY = 2, TERTIARY = UCOL_TERTIARY, // 2
QUATERNARY = 3, QUATERNARY = UCOL_QUATERNARY, // 3
IDENTICAL = 15 IDENTICAL = UCOL_IDENTICAL // 15
}; };
/** /**
* LESS is returned if source string is compared to be less than target * LESS is returned if source string is compared to be less than target
* string in the compare() method. * string in the compare() method.
* EQUAL is returned if source string is compared to be equal to target * EQUAL is returned if source string is compared to be equal to target
* string in the compare() method. * string in the compare() method.
* GREATER is returned if source string is compared to be greater than * GREATER is returned if source string is compared to be greater than
* target string in the compare() method. * target string in the compare() method.
* @see Collator#compare * @see Collator#compare
* @deprecated ICU 2.6. Use C enum UCollationResult defined in ucol.h * @deprecated ICU 2.6. Use C enum UCollationResult defined in ucol.h
*/ */
enum EComparisonResult enum EComparisonResult
{ {
LESS = -1, LESS = UCOL_LESS, // -1
EQUAL = 0, EQUAL = UCOL_EQUAL, // 0
GREATER = 1 GREATER = UCOL_GREATER // 1
}; };
// Collator public destructor ----------------------------------------- // Collator public destructor -----------------------------------------
/** /**
* Destructor * Destructor
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual ~Collator(); virtual ~Collator();
// Collator public methods -------------------------------------------- // Collator public methods --------------------------------------------
/** /**
* Returns true if "other" is the same as "this" * Returns TRUE if "other" is the same as "this".
*
* The base class implementation returns TRUE if "other" has the same t
ype/class as "this":
* <code>typeid(*this) == typeid(other)</code>.
*
* Subclass implementations should do something like the following:
* <pre>
* if (this == &other) { return TRUE; }
* if (!Collator::operator==(other)) { return FALSE; } // not the sa
me class
*
* const MyCollator &o = (const MyCollator&)other;
* (compare this vs. o's subclass fields)
* </pre>
* @param other Collator object to be compared * @param other Collator 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 Collator& other) const; virtual UBool operator==(const Collator& other) const;
/** /**
* Returns true if "other" is not the same as "this". * Returns true if "other" is not the same as "this".
* Calls ! operator==(const Collator&) const which works for all subcla sses.
* @param other Collator object to be compared * @param other Collator object to be compared
* @return true if other is not the same as this. * @return TRUE if other is not the same as this.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UBool operator!=(const Collator& other) const; virtual UBool operator!=(const Collator& other) const;
/** /**
* Makes a shallow copy of the current object. * Makes a copy of this object.
* @return a copy of this object * @return a copy of this object, owned by the caller
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual Collator* clone(void) const = 0; virtual Collator* clone(void) const = 0;
/** /**
* Creates the Collator object for the current default locale. * Creates the Collator object for the current default locale.
* The default locale is determined by Locale::getDefault. * The default locale is determined by Locale::getDefault.
* The UErrorCode& err parameter is used to return status information t o the user. * The UErrorCode& err parameter is used to return status information t o the user.
* To check whether the construction succeeded or not, you should check the * To check whether the construction succeeded or not, you should check the
* value of U_SUCCESS(err). If you wish more detailed information, you can * value of U_SUCCESS(err). If you wish more detailed information, you can
skipping to change at line 407 skipping to change at line 420
*/ */
virtual UCollationResult compare(const UnicodeString& source, virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target, const UnicodeString& target,
int32_t length, int32_t length,
UErrorCode &status) const = 0; UErrorCode &status) const = 0;
/** /**
* The comparison function compares the character data stored in two * The comparison function compares the character data stored in two
* different string arrays. Returns information about whether a string array * different string arrays. Returns information about whether a string array
* is less than, greater than or equal to another string array. * is less than, greater than or equal to another string array.
* <p>Example of use:
* <pre>
* . UChar ABC[] = {0x41, 0x42, 0x43, 0}; // = "ABC"
* . UChar abc[] = {0x61, 0x62, 0x63, 0}; // = "abc"
* . UErrorCode status = U_ZERO_ERROR;
* . Collator *myCollation =
* . Collator::createInstance(Locale::US, statu
s);
* . if (U_FAILURE(status)) return;
* . myCollation->setStrength(Collator::PRIMARY);
* . // result would be Collator::EQUAL ("abc" == "ABC")
* . // (no primary difference between "abc" and "ABC")
* . Collator::EComparisonResult result =
* . myCollation->compare(abc, 3, ABC, 3);
* . myCollation->setStrength(Collator::TERTIARY);
* . // result would be Collator::LESS ("abc" &lt;&lt;&lt; "ABC")
* . // (with tertiary difference between "abc" and "ABC")
* . result = myCollation->compare(abc, 3, ABC, 3);
* </pre>
* @param source the source string array to be compared with. * @param source the source string array to be compared with.
* @param sourceLength the length of the source string array. If this value * @param sourceLength the length of the source string array. If this value
* is equal to -1, the string array is null-terminated. * is equal to -1, the string array is null-terminated.
* @param target the string that is to be compared with the source stri ng. * @param target the string that is to be compared with the source stri ng.
* @param targetLength the length of the target string array. If this value * @param targetLength the length of the target string array. If this value
* is equal to -1, the string array is null-terminated. * is equal to -1, the string array is null-terminated.
* @return Returns a byte value. GREATER if source is greater than targ et; * @return Returns a byte value. GREATER if source is greater than targ et;
* EQUAL if source is equal to target; LESS if source is less t han * EQUAL if source is equal to target; LESS if source is less t han
* target * target
* @deprecated ICU 2.6 use the overload with UErrorCode & * @deprecated ICU 2.6 use the overload with UErrorCode &
skipping to change at line 487 skipping to change at line 518
* string from the chars in the sort key. The generated sort key handl es * string from the chars in the sort key. The generated sort key handl es
* only a limited number of ignorable characters. * only a limited number of ignorable characters.
* <p>Use CollationKey::equals or CollationKey::compare to compare the * <p>Use CollationKey::equals or CollationKey::compare to compare the
* generated sort keys. * generated sort keys.
* If the source string is null, a null collation key will be returned. * If the source string is null, a null collation key will be returned.
* @param source the source string to be transformed into a sort key. * @param source the source string to be transformed into a sort key.
* @param key the collation key to be filled in * @param key the collation key to be filled in
* @param status the error code status. * @param status the error code status.
* @return the collation key of the string based on the collation rules . * @return the collation key of the string based on the collation rules .
* @see CollationKey#compare * @see CollationKey#compare
* @deprecated ICU 2.8 Use getSortKey(...) instead * @stable ICU 2.0
*/ */
virtual CollationKey& getCollationKey(const UnicodeString& source, virtual CollationKey& getCollationKey(const UnicodeString& source,
CollationKey& key, CollationKey& key,
UErrorCode& status) const = 0; UErrorCode& status) const = 0;
/** /**
* Transforms the string into a series of characters that can be compar ed * Transforms the string into a series of characters that can be compar ed
* with CollationKey::compareTo. It is not possible to restore the orig inal * with CollationKey::compareTo. It is not possible to restore the orig inal
* string from the chars in the sort key. The generated sort key handl es * string from the chars in the sort key. The generated sort key handl es
* only a limited number of ignorable characters. * only a limited number of ignorable characters.
* <p>Use CollationKey::equals or CollationKey::compare to compare the * <p>Use CollationKey::equals or CollationKey::compare to compare the
* generated sort keys. * generated sort keys.
* <p>If the source string is null, a null collation key will be return ed. * <p>If the source string is null, a null collation key will be return ed.
* @param source the source string to be transformed into a sort key. * @param source the source string to be transformed into a sort key.
* @param sourceLength length of the collation key * @param sourceLength length of the collation key
* @param key the collation key to be filled in * @param key the collation key to be filled in
* @param status the error code status. * @param status the error code status.
* @return the collation key of the string based on the collation rules . * @return the collation key of the string based on the collation rules .
* @see CollationKey#compare * @see CollationKey#compare
* @deprecated ICU 2.8 Use getSortKey(...) instead * @stable ICU 2.0
*/ */
virtual CollationKey& getCollationKey(const UChar*source, virtual CollationKey& getCollationKey(const UChar*source,
int32_t sourceLength, int32_t sourceLength,
CollationKey& key, CollationKey& key,
UErrorCode& status) const = 0; UErrorCode& status) const = 0;
/** /**
* Generates the hash code for the collation object * Generates the hash code for the collation object
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t hashCode(void) const = 0; virtual int32_t hashCode(void) const = 0;
skipping to change at line 531 skipping to change at line 562
* *
* @param type can be either requested, valid or actual locale. For mor e * @param type can be either requested, valid or actual locale. For mor e
* information see the definition of ULocDataLocaleType in * information see the definition of ULocDataLocaleType in
* uloc.h * uloc.h
* @param status the error code status. * @param status the error code status.
* @return locale where the collation data lives. If the collator * @return locale where the collation data lives. If the collator
* was instantiated from rules, locale is empty. * was instantiated from rules, locale is empty.
* @deprecated ICU 2.8 This API is under consideration for revision * @deprecated ICU 2.8 This API is under consideration for revision
* in ICU 3.0. * in ICU 3.0.
*/ */
virtual const Locale getLocale(ULocDataLocaleType type, UErrorCode& sta tus) const = 0; virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) c onst = 0;
/** /**
* Convenience method for comparing two strings based on the collation rules. * Convenience method for comparing two strings based on the collation rules.
* @param source the source string to be compared with. * @param source the source string to be compared with.
* @param target the target string to be compared with. * @param target the target string to be compared with.
* @return true if the first string is greater than the second one, * @return true if the first string is greater than the second one,
* according to the collation rules. false, otherwise. * according to the collation rules. false, otherwise.
* @see Collator#compare * @see Collator#compare
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 569 skipping to change at line 600
* @param source the source string to be compared with. * @param source the source string to be compared with.
* @param target the target string to be compared with. * @param target the target string to be compared with.
* @return true if the strings are equal according to the collation rul es. * @return true if the strings are equal according to the collation rul es.
* false, otherwise. * false, otherwise.
* @see Collator#compare * @see Collator#compare
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UBool equals(const UnicodeString& source, const UnicodeString& target) const; UBool equals(const UnicodeString& source, const UnicodeString& target) const;
/** /**
* Determines the minimum strength that will be use in comparison or * Determines the minimum strength that will be used in comparison or
* transformation. * transformation.
* <p>E.g. with strength == SECONDARY, the tertiary difference is ignor ed * <p>E.g. with strength == SECONDARY, the tertiary difference is ignor ed
* <p>E.g. with strength == PRIMARY, the secondary and tertiary differe nce * <p>E.g. with strength == PRIMARY, the secondary and tertiary differe nce
* are ignored. * are ignored.
* @return the current comparison level. * @return the current comparison level.
* @see Collator#setStrength * @see Collator#setStrength
* @deprecated ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead * @deprecated ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead
*/ */
virtual ECollationStrength getStrength(void) const = 0; virtual ECollationStrength getStrength(void) const;
/** /**
* Sets the minimum strength to be used in comparison or transformation . * Sets the minimum strength to be used in comparison or transformation .
* <p>Example of use: * <p>Example of use:
* <pre> * <pre>
* \code * \code
* UErrorCode status = U_ZERO_ERROR; * UErrorCode status = U_ZERO_ERROR;
* Collator*myCollation = Collator::createInstance(Locale::US, status) ; * Collator*myCollation = Collator::createInstance(Locale::US, status) ;
* if (U_FAILURE(status)) return; * if (U_FAILURE(status)) return;
* myCollation->setStrength(Collator::PRIMARY); * myCollation->setStrength(Collator::PRIMARY);
* // result will be "abc" == "ABC" * // result will be "abc" == "ABC"
* // tertiary differences will be ignored * // tertiary differences will be ignored
* 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);
/** /**
* Retrieves the reordering codes for this collator. * Retrieves the reordering codes for this collator.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
* will only return the length of the result without writing any of th e result string (pre-flighting). * will only return the length of the result without writing any of th e result string (pre-flighting).
* @param status A reference to an error code value, which must not ind icate * @param status A reference to an error code value, which must not ind icate
* a failure before the function call. * a failure before the function call.
* @return The length of the script ordering array. * @return The length of the script ordering array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see Collator#getEquivalentReorderCodes * @see Collator#getEquivalentReorderCodes
* @see Collator#setReorderCodes * @see Collator#setReorderCodes
* @see UScriptCode * @see UScriptCode
* @see UColReorderCode * @see UColReorderCode
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest, virtual int32_t getReorderCodes(int32_t *dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Sets the ordering of scripts for this collator. * Sets the ordering of scripts for this collator.
* *
* <p>The reordering codes are a combination of script codes and reorde r codes. * <p>The reordering codes are a combination of script codes and reorde r codes.
* @param reorderCodes An array of script codes in the new order. This can be NULL if the * @param reorderCodes An array of script codes in the new order. This can be NULL if the
* length is also set to 0. An empty array will clear any reordering co des on the collator. * length is also set to 0. An empty array will clear any reordering co des on the collator.
* @param reorderCodesLength The length of reorderCodes. * @param reorderCodesLength The length of reorderCodes.
* @param status error code * @param status error code
* @see Collator#getReorderCodes * @see Collator#getReorderCodes
* @see Collator#getEquivalentReorderCodes * @see Collator#getEquivalentReorderCodes
* @see UScriptCode * @see UScriptCode
* @see UColReorderCode * @see UColReorderCode
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes, virtual void setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength, int32_t reorderCodesLength,
UErrorCode& status) ; UErrorCode& status) ;
/** /**
* Retrieves the reorder codes that are grouped with the given reorder code. Some reorder * Retrieves the reorder codes that are grouped with the given reorder code. Some reorder
* codes will be grouped and must reorder together. * codes will be grouped and must reorder together.
* @param reorderCode The reorder code to determine equivalence for. * @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script equivalene reordering codes. * @param dest The array to fill with the script equivalene reordering codes.
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the
* function will only return the length of the result without writing a ny of the result * function will only return the length of the result without writing a ny of the result
* string (pre-flighting). * string (pre-flighting).
* @param status A reference to an error code value, which must not ind icate * @param status A reference to an error code value, which must not ind icate
skipping to change at line 852 skipping to change at line 883
/** /**
* Universal attribute getter * Universal attribute getter
* @param attr attribute type * @param attr attribute type
* @param status to indicate whether the operation went on smoothly or * @param status to indicate whether the operation went on smoothly or
* there were errors * there were errors
* @return attribute value * @return attribute value
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual UColAttributeValue getAttribute(UColAttribute attr, virtual UColAttributeValue getAttribute(UColAttribute attr,
UErrorCode &status) = 0; UErrorCode &status) const = 0;
/** /**
* Sets the variable top to a collation element value of a string suppl ied. * Sets the variable top to a collation element value of a string suppl ied.
* @param varTop one or more (if contraction) UChars to which the varia ble top should be set * @param varTop one or more (if contraction) UChars to which the varia ble top should be set
* @param len length of variable top string. If -1 it is considered to be zero terminated. * @param len length of variable top string. If -1 it is considered to be zero terminated.
* @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br> * @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br>
* U_CE_NOT_FOUND_ERROR if more than one character was passed and th ere is no such a contraction<br> * U_CE_NOT_FOUND_ERROR if more than one character was passed and th ere is no such a contraction<br>
* U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes
* @return a 32 bit value containing the value of the variable top in u pper 16 bits. Lower 16 bits are undefined * @return a 32 bit value containing the value of the variable top in u pper 16 bits. Lower 16 bits are undefined
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 875 skipping to change at line 906
/** /**
* Sets the variable top to a collation element value of a string suppl ied. * Sets the variable top to a collation element value of a string suppl ied.
* @param varTop an UnicodeString size 1 or more (if contraction) of UC hars to which the variable top should be set * @param varTop an UnicodeString size 1 or more (if contraction) of UC hars to which the variable top should be set
* @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br> * @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br>
* U_CE_NOT_FOUND_ERROR if more than one character was passed and th ere is no such a contraction<br> * U_CE_NOT_FOUND_ERROR if more than one character was passed and th ere is no such a contraction<br>
* U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes
* @return a 32 bit value containing the value of the variable top in u pper 16 bits. Lower 16 bits are undefined * @return a 32 bit value containing the value of the variable top in u pper 16 bits. Lower 16 bits are undefined
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual uint32_t setVariableTop(const UnicodeString varTop, UErrorCode &status) = 0; virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode &status) = 0;
/** /**
* Sets the variable top to a collation element value supplied. Variabl e top is set to the upper 16 bits. * Sets the variable top to a collation element value supplied. Variabl e top is set to the upper 16 bits.
* Lower 16 bits are ignored. * Lower 16 bits are ignored.
* @param varTop CE value, as returned by setVariableTop or ucol)getVar iableTop * @param varTop CE value, as returned by setVariableTop or ucol)getVar iableTop
* @param status error code (not changed by function) * @param status error code (not changed by function)
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void setVariableTop(const uint32_t varTop, UErrorCode &status) = 0; virtual void setVariableTop(uint32_t varTop, UErrorCode &status) = 0;
/** /**
* Gets the variable top value of a Collator. * Gets the variable top value of a Collator.
* Lower 16 bits are undefined and should be ignored. * Lower 16 bits are undefined and should be ignored.
* @param status error code (not changed by function). If error code is set, the return value is undefined. * @param status error code (not changed by function). If error code is set, the return value is undefined.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual uint32_t getVariableTop(UErrorCode &status) const = 0; virtual uint32_t getVariableTop(UErrorCode &status) const = 0;
/** /**
skipping to change at line 906 skipping to change at line 937
* tailored in this collator. * tailored in this collator.
* @param status error code of the operation * @param status error code of the operation
* @return a pointer to a UnicodeSet object containing all the * @return a pointer to a UnicodeSet object containing all the
* code points and sequences that may sort differently than * code points and sequences that may sort differently than
* in the UCA. The object must be disposed of by using delete * in the UCA. The object must be disposed of by using delete
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
virtual UnicodeSet *getTailoredSet(UErrorCode &status) const; virtual UnicodeSet *getTailoredSet(UErrorCode &status) const;
/** /**
* Thread safe cloning operation * Same as clone().
* @return pointer to the new clone, user should remove it. * The base class implementation simply calls clone().
* @stable ICU 2.2 * @return a copy of this object, owned by the caller
* @see clone()
* @deprecated ICU 50 no need to have two methods for cloning
*/ */
virtual Collator* safeClone(void) = 0; virtual Collator* safeClone(void) const;
/** /**
* Get the sort key as an array of bytes from an UnicodeString. * Get the sort key as an array of bytes from an UnicodeString.
* Sort key byte arrays are zero-terminated and can be compared using * Sort key byte arrays are zero-terminated and can be compared using
* strcmp(). * strcmp().
* @param source string to be processed. * @param source string to be processed.
* @param result buffer to store result in. If NULL, number of bytes ne eded * @param result buffer to store result in. If NULL, number of bytes ne eded
* will be returned. * will be returned.
* @param resultLength length of the result buffer. If if not enough th e * @param resultLength length of the result buffer. If if not enough th e
* buffer will be filled to capacity. * buffer will be filled to capacity.
 End of changes. 21 change blocks. 
32 lines changed or deleted 68 lines changed or added


 colldata.h   colldata.h 
/* /*
************************************************************************** **** ************************************************************************** ****
* Copyright (C) 1996-2011, International Business Machines * * Copyright (C) 1996-2012, International Business Machines *
* Corporation and others. All Rights Reserved. * * Corporation and others. All Rights Reserved. *
************************************************************************** **** ************************************************************************** ****
*/ */
/** /**
* \file * \file
* \brief C++ API: Collation data used to compute minLengthInChars. * \brief C++ API: Collation data used to compute minLengthInChars.
* \internal * \internal
*/ */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 datefmt.h   datefmt.h 
skipping to change at line 506 skipping to change at line 506
* See Format::parseObject() for more. * See Format::parseObject() for more.
* *
* @param source The string to be parsed into an object. * @param source The string to be parsed into an object.
* @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 parse_pos The position to start parsing at. Upon return * @param parse_pos The position to start parsing at. Upon return
* this param is set to the position after the * this param is set to the position after the
* last character successfully parsed. If the * last character successfully parsed. If the
* source is not parsed successfully, this param * source is not parsed successfully, this param
* will remain unchanged. * will remain unchanged.
* @return A newly created Formattable* object, or NULL
* on failure. The caller owns this and should
* delete it when done.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void parseObject(const UnicodeString& source, virtual void parseObject(const UnicodeString& source,
Formattable& result, Formattable& result,
ParsePosition& parse_pos) const; ParsePosition& parse_pos) const;
/** /**
* Create a default date/time formatter that uses the SHORT style for b oth * Create a default date/time formatter that uses the SHORT style for b oth
* the date and the time. * the date and the time.
* *
 End of changes. 1 change blocks. 
3 lines changed or deleted 0 lines changed or added


 decimfmt.h   decimfmt.h 
skipping to change at line 43 skipping to change at line 43
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/dcfmtsym.h" #include "unicode/dcfmtsym.h"
#include "unicode/numfmt.h" #include "unicode/numfmt.h"
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/fpositer.h" #include "unicode/fpositer.h"
#include "unicode/stringpiece.h" #include "unicode/stringpiece.h"
#include "unicode/curramt.h" #include "unicode/curramt.h"
/** /**
* \def UNUM_DECIMFORMAT_INTERNAL_SIZE * \def UNUM_DECIMALFORMAT_INTERNAL_SIZE
* @internal * @internal
*/ */
#if UCONFIG_FORMAT_FASTPATHS_49 #if UCONFIG_FORMAT_FASTPATHS_49
#define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16 #define UNUM_DECIMALFORMAT_INTERNAL_SIZE 16
#endif #endif
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class DigitList; class DigitList;
class ChoiceFormat; class ChoiceFormat;
class CurrencyPluralInfo; class CurrencyPluralInfo;
class Hashtable; class Hashtable;
class UnicodeSet; class UnicodeSet;
class FieldPositionHandler; class FieldPositionHandler;
/** /**
* enum bitset for boolean fields. Similar to Java EnumSet<>.
* Needs to range check. Not specific to decimal format.
* @internal
*/
template<typename T, uint32_t minValue, uint32_t limitValue>
class EnumSet {
public:
EnumSet() : fBools(0) {}
EnumSet(const EnumSet<T,minValue,limitValue>& other) : fBools(other.fBo
ols) {}
~EnumSet() {}
void clear() { fBools=0; }
void add(T toAdd) { set(toAdd, 1); }
void remove(T toRemove) { set(toRemove, 0); }
int32_t contains(T toCheck) const { return get(toCheck); }
void set(T toSet, int32_t v) { fBools=(fBools&(~flag(toSet)))|(v?(flag(
toSet)):0); }
int32_t get(T toCheck) const { return (fBools & flag(toCheck))?1:0; }
UBool isValidEnum(T toCheck) const { return (toCheck>=minValue&&toChec
k<limitValue); }
UBool isValidValue(int32_t v) const { return (v==0||v==1); }
const EnumSet<T,minValue,limitValue>& operator=(const EnumSet<T,minValu
e,limitValue>& other) {
fBools = other.fBools;
return *this;
}
uint32_t getAll() const {
return fBools;
}
private:
uint32_t flag(T toCheck) const { return (1<<(toCheck-minValue)); }
private:
uint32_t fBools;
};
/**
* 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.
* *
* <p>To obtain a NumberFormat for a specific locale (including the default * <p>To obtain a NumberFormat for a specific locale (including the default
* locale) call one of NumberFormat's factory methods such as * locale) call one of NumberFormat's factory methods such as
skipping to change at line 759 skipping to change at line 793
* @param style style of decimal format * @param style style of decimal format
* @param status Output param set to success/failure code. I f the * @param status Output param set to success/failure code. I f the
* pattern is invalid this will be set to a fa ilure code. * pattern is invalid this will be set to a fa ilure code.
* @internal ICU 4.2 * @internal ICU 4.2
*/ */
DecimalFormat( const UnicodeString& pattern, DecimalFormat( const UnicodeString& pattern,
DecimalFormatSymbols* symbolsToAdopt, DecimalFormatSymbols* symbolsToAdopt,
UNumberFormatStyle style, UNumberFormatStyle style,
UErrorCode& status); UErrorCode& status);
/**
* Set an integer attribute on this DecimalFormat.
* May return U_UNSUPPORTED_ERROR if this instance does not support
* the specified attribute.
* @param attr the attribute to set
* @param newvalue new value
* @param status the error type
* @return *this - for chaining
* @internal ICU 50
*/
virtual DecimalFormat& setAttribute( UNumberFormatAttribute attr,
int32_t newvalue,
UErrorCode &status);
/**
* Get an integer
* May return U_UNSUPPORTED_ERROR if this instance does not support
* the specified attribute.
* @param attr the attribute to set
* @param status the error type
* @return the attribute value. Undefined if there is an error.
* @internal ICU 50
*/
virtual int32_t getAttribute( UNumberFormatAttribute attr,
UErrorCode &status) const;
#if UCONFIG_HAVE_PARSEALLINPUT #if UCONFIG_HAVE_PARSEALLINPUT
/** /**
* @internal * @internal
*/ */
void setParseAllInput(UNumberFormatAttributeValue value); void setParseAllInput(UNumberFormatAttributeValue value);
#endif #endif
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
/** /**
skipping to change at line 876 skipping to change at line 936
virtual UnicodeString& format(double number, virtual UnicodeString& format(double number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Format a double or long number using base-10 representation. * Format a double or long number using base-10 representation.
* *
* @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.
* On output: the offsets of the alignment field.
* @param status
* @return Reference to 'appendTo' parameter.
* @internal
*/
virtual UnicodeString& format(double number,
UnicodeString& appendTo,
FieldPosition& pos,
UErrorCode &status) const;
/**
* Format a double or long number using base-10 representation.
*
* @param number The value to be formatted.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions * @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. * of fields generated by this format call.
* Can be NULL. * Can be NULL.
* @param status Output param filled with success/failure status. * @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable 4.4 * @stable 4.4
*/ */
virtual UnicodeString& format(double number, virtual UnicodeString& format(double number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPositionIterator* posIter, FieldPositionIterator* posIter,
skipping to change at line 909 skipping to change at line 986
virtual UnicodeString& format(int32_t number, virtual UnicodeString& format(int32_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Format a long number using base-10 representation. * Format a long number using base-10 representation.
* *
* @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.
* On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter.
* @internal
*/
virtual UnicodeString& format(int32_t number,
UnicodeString& appendTo,
FieldPosition& pos,
UErrorCode &status) const;
/**
* Format a long number using base-10 representation.
*
* @param number The value to be formatted.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions * @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. * of fields generated by this format call.
* Can be NULL. * Can be NULL.
* @param status Output param filled with success/failure status. * @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable 4.4 * @stable 4.4
*/ */
virtual UnicodeString& format(int32_t number, virtual UnicodeString& format(int32_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPositionIterator* posIter, FieldPositionIterator* posIter,
skipping to change at line 942 skipping to change at line 1035
virtual UnicodeString& format(int64_t number, virtual UnicodeString& format(int64_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/** /**
* Format an int64 number using base-10 representation. * Format an int64 number using base-10 representation.
* *
* @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.
* On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter.
* @internal
*/
virtual UnicodeString& format(int64_t number,
UnicodeString& appendTo,
FieldPosition& pos,
UErrorCode &status) const;
/**
* Format an int64 number using base-10 representation.
*
* @param number The value to be formatted.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions * @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. * of fields generated by this format call.
* Can be NULL. * Can be NULL.
* @param status Output param filled with success/failure status. * @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable 4.4 * @stable 4.4
*/ */
virtual UnicodeString& format(int64_t number, virtual UnicodeString& format(int64_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPositionIterator* posIter, FieldPositionIterator* posIter,
skipping to change at line 1948 skipping to change at line 2057
* @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 handler Records information about field positions. * @param handler Records information about field positions.
* @param digits the digits to be formatted. * @param digits the digits to be formatted.
* @param isInteger if TRUE format the digits as Integer. * @param isInteger if TRUE format the digits as Integer.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
*/ */
UnicodeString& subformat(UnicodeString& appendTo, UnicodeString& subformat(UnicodeString& appendTo,
FieldPositionHandler& handler, FieldPositionHandler& handler,
DigitList& digits, DigitList& digits,
UBool isInteger) const; UBool isInteger,
UErrorCode &status) const;
void parse(const UnicodeString& text, void parse(const UnicodeString& text,
Formattable& result, Formattable& result,
ParsePosition& pos, ParsePosition& pos,
UChar* currency) const; UChar* currency) const;
enum { enum {
fgStatusInfinite, fgStatusInfinite,
fgStatusLength // Leave last in list. fgStatusLength // Leave last in list.
} StatusFlags; } StatusFlags;
skipping to change at line 2102 skipping to change at line 2212
void deleteHashForAffixPattern(); void deleteHashForAffixPattern();
void deleteHashForAffix(Hashtable*& table); void deleteHashForAffix(Hashtable*& table);
void copyHashForAffixPattern(const Hashtable* source, void copyHashForAffixPattern(const Hashtable* source,
Hashtable* target, UErrorCode& status); Hashtable* target, UErrorCode& status);
void copyHashForAffix(const Hashtable* source, void copyHashForAffix(const Hashtable* source,
Hashtable* target, UErrorCode& status); Hashtable* target, UErrorCode& status);
UnicodeString& _format(int64_t number, UnicodeString& _format(int64_t number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPositionHandler& handler) const; FieldPositionHandler& handler,
UErrorCode &status) const;
UnicodeString& _format(double number, UnicodeString& _format(double number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPositionHandler& handler) const; FieldPositionHandler& handler,
UErrorCode &status) const;
UnicodeString& _format(const DigitList &number, UnicodeString& _format(const DigitList &number,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPositionHandler& handler, FieldPositionHandler& handler,
UErrorCode &status) const; UErrorCode &status) const;
// currency sign count // currency sign count
enum { enum {
fgCurrencySignCountZero, fgCurrencySignCountZero,
fgCurrencySignCountInSymbolFormat, fgCurrencySignCountInSymbolFormat,
fgCurrencySignCountInISOFormat, fgCurrencySignCountInISOFormat,
skipping to change at line 2153 skipping to change at line 2265
DecimalFormatSymbols* fSymbols; DecimalFormatSymbols* fSymbols;
UBool fUseSignificantDigits; UBool fUseSignificantDigits;
int32_t fMinSignificantDigits; int32_t fMinSignificantDigits;
int32_t fMaxSignificantDigits; int32_t fMaxSignificantDigits;
UBool fUseExponentialNotation; UBool fUseExponentialNotation;
int8_t fMinExponentDigits; int8_t fMinExponentDigits;
UBool fExponentSignAlwaysShown; UBool fExponentSignAlwaysShown;
EnumSet<UNumberFormatAttribute,
UNUM_MAX_NONBOOLEAN_ATTRIBUTE+1,
UNUM_LIMIT_BOOLEAN_ATTRIBUTE>
fBoolFlags;
DigitList* fRoundingIncrement; // NULL if no rounding inc rement specified. DigitList* fRoundingIncrement; // NULL if no rounding inc rement specified.
ERoundingMode fRoundingMode; ERoundingMode fRoundingMode;
UChar32 fPad; UChar32 fPad;
int32_t fFormatWidth; int32_t fFormatWidth;
EPadPosition fPadPosition; EPadPosition fPadPosition;
/* /*
* Following are used for currency format * Following are used for currency format
*/ */
skipping to change at line 2350 skipping to change at line 2467
UnicodeString& appendTo) const { UnicodeString& appendTo) const {
FieldPosition pos(0); FieldPosition pos(0);
return format((int64_t)number, appendTo, pos); return format((int64_t)number, appendTo, pos);
} }
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
inline const UnicodeString & inline const UnicodeString &
DecimalFormat::getConstSymbol(DecimalFormatSymbols::ENumberFormatSymbol sym bol) const { DecimalFormat::getConstSymbol(DecimalFormatSymbols::ENumberFormatSymbol sym bol) const {
return fSymbols->getConstSymbol(symbol); return fSymbols->getConstSymbol(symbol);
} }
#endif #endif
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif // _DECIMFMT #endif // _DECIMFMT
//eof //eof
 End of changes. 11 change blocks. 
4 lines changed or deleted 126 lines changed or added


 docmain.h   docmain.h 
/******************************************************************** /********************************************************************
* COPYRIGHT: * COPYRIGHT:
* Copyright (c) 1997-2011, International Business Machines Corporation and * Copyright (c) 1997-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
* *
* FILE 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 /**
* \file
* \brief (Non API- contains Doxygen definitions)
*
* 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
*/ */
/*! \mainpage /*! \mainpage
* *
* \section API API Reference Usage * \section API API Reference Usage
* *
* <h3>C++ Programmers:</h3> * <h3>C++ Programmers:</h3>
* <p>Use <a href="hierarchy.html">Class Hierarchy</a> or <a href="classes. html"> Alphabetical List </a> * <p>Use <a href="hierarchy.html">Class Hierarchy</a> or <a href="classes. html"> Alphabetical List </a>
* or <a href="annotated.html"> Compound List</a> * or <a href="annotated.html"> Compound List</a>
skipping to change at line 72 skipping to change at line 76
* <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, utf8.h, utf16.h, UText, UCharIterator</td> * <td>ustring.h, utf8.h, utf16.h, UText, UCharIterator</td>
* <td>UnicodeString, CharacterIterator, Appendable, StringPiece, ByteS ink</td> * <td>icu::UnicodeString, icu::CharacterIterator, icu::Appendable, icu ::StringPiece,icu::ByteSink</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Unicode Character<br>Properties and Names</td> * <td>Unicode Character<br/>Properties and Names</td>
* <td>uchar.h, uscript.h</td> * <td>uchar.h, uscript.h</td>
* <td>C API</td> * <td>C API</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Sets of Unicode Code Points and Strings</td> * <td>Sets of Unicode Code Points and Strings</td>
* <td>uset.h</td> * <td>uset.h</td>
* <td>UnicodeSet</td> * <td>icu::UnicodeSet</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Maps from Strings to Integer Values</td> * <td>Maps from Strings to Integer Values</td>
* <td>(no C API)</td> * <td>(no C API)</td>
* <td>BytesTrie, UCharsTrie</td> * <td>icu::BytesTrie, icu::UCharsTrie</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Codepage Conversion</td> * <td>Codepage Conversion</td>
* <td>ucnv.h, ucnvsel.hb</td> * <td>ucnv.h, ucnvsel.hb</td>
* <td>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>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>icu::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>icu::ResourceBundle</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Normalization</td> * <td>Normalization</td>
* <td>unorm2.h</td> * <td>unorm2.h</td>
* <td>Normalizer2</td> * <td>icu::Normalizer2</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Calendars</td> * <td>Calendars</td>
* <td>ucal.h</td> * <td>ucal.h</td>
* <td>Calendar</td> * <td>icu::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>icu::DateFormat</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Message Formatting</td> * <td>Message Formatting</td>
* <td>umsg.h</td> * <td>umsg.h</td>
* <td>MessageFormat</td> * <td>icu::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>icu::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>icu::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>icu::Transliterator</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Bidirectional Algorithm</td> * <td>Bidirectional Algorithm</td>
* <td>ubidi.h</td> * <td>ubidi.h</td>
* <td>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>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>icu::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>icu::StringSearch</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Index Characters/<br>Bucketing for Sorted Lists</td> * <td>Index Characters/<br/>Bucketing for Sorted Lists</td>
* <td>(no C API)</td> * <td>(no C API)</td>
* <td>AlphabeticIndex</td> * <td>icu::AlphabeticIndex</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Text Boundary Analysis<br>(Break Iteration)</td> * <td>Text Boundary Analysis<br/>(Break Iteration)</td>
* <td>ubrk.h</td> * <td>ubrk.h</td>
* <td>BreakIterator</td> * <td>icu::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>icu::RegexPattern, icu::RegexMatcher</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>StringPrep</td> * <td>StringPrep</td>
* <td>usprep.h</td> * <td>usprep.h</td>
* <td>C API</td> * <td>C API</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>International Domain Names in Applications:<br> * <td>International Domain Names in Applications:<br/>
* UTS #46 in C/C++, IDNA2003 only via C API</td> * UTS #46 in C/C++, IDNA2003 only via C API</td>
* <td>uidna.h</td> * <td>uidna.h</td>
* <td>idna.h</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>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>C API</td> * <td>C API</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Layout Engine/Complex Text Layout</td> * <td>Layout Engine/Complex Text Layout</td>
* <td>loengine.h</td> * <td>loengine.h</td>
* <td>LayoutEngine, ParagraphLayout</td> * <td>icu::LayoutEngine,icu::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. 26 change blocks. 
28 lines changed or deleted 32 lines changed or added


 fmtable.h   fmtable.h 
skipping to change at line 608 skipping to change at line 608
/** /**
* Internal function, do not use. * Internal function, do not use.
* TODO: figure out how to make this be non-public. * TODO: figure out how to make this be non-public.
* NumberFormat::format(Formattable, ... * NumberFormat::format(Formattable, ...
* needs to get at the DigitList, if it exists, for * needs to get at the DigitList, if it exists, for
* big decimal formatting. * big decimal formatting.
* @internal * @internal
*/ */
DigitList *getDigitList() const { return fDecimalNum;} DigitList *getDigitList() const { return fDecimalNum;}
#if UCONFIG_INTERNAL_DIGITLIST
/** /**
* @internal * @internal
*/ */
DigitList *getInternalDigitList(); DigitList *getInternalDigitList();
#endif
/** /**
* Adopt, and set value from, a DigitList * Adopt, and set value from, a DigitList
* Internal Function, do not use. * Internal Function, do not use.
* @param dl the Digit List to be adopted * @param dl the Digit List to be adopted
* @internal * @internal
*/ */
void adoptDigitList(DigitList *dl); void adoptDigitList(DigitList *dl);
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
skipping to change at line 654 skipping to change at line 652
struct { struct {
Formattable* fArray; Formattable* fArray;
int32_t fCount; int32_t fCount;
} fArrayAndCount; } fArrayAndCount;
} fValue; } fValue;
CharString *fDecimalStr; CharString *fDecimalStr;
DigitList *fDecimalNum; DigitList *fDecimalNum;
#if UCONFIG_INTERNAL_DIGITLIST
char fStackData[128]; // must be big enough for DigitLis t char fStackData[128]; // must be big enough for DigitLis t
#endif
Type fType; Type fType;
UnicodeString fBogus; // Bogus string when it's needed. UnicodeString fBogus; // Bogus string when it's needed.
}; };
inline UDate Formattable::getDate(UErrorCode& status) const { inline UDate Formattable::getDate(UErrorCode& status) const {
if (fType != kDate) { if (fType != kDate) {
if (U_SUCCESS(status)) { if (U_SUCCESS(status)) {
status = U_INVALID_FORMAT_ERROR; status = U_INVALID_FORMAT_ERROR;
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 0 lines changed or added


 icudataver.h   icudataver.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 2009-2012, International Business Machines * Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
*/ */
/**
* \file
* \brief C API: access to ICU Data Version number
*/
#ifndef __ICU_DATA_VER_H__ #ifndef __ICU_DATA_VER_H__
#define __ICU_DATA_VER_H__ #define __ICU_DATA_VER_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_DRAFT_API
/** /**
* @draft ICU 49 * @draft ICU 49
*/ */
#define U_ICU_VERSION_BUNDLE "icuver" #define U_ICU_VERSION_BUNDLE "icuver"
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 icuplug.h   icuplug.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 2009-2011, International Business Machines * Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* FILE NAME : icuplug.h * FILE NAME : icuplug.h
* *
* Date Name Description * Date Name Description
* 10/29/2009 sl New. * 10/29/2009 sl New.
*************************************************************************** *** *************************************************************************** ***
*/ */
skipping to change at line 193 skipping to change at line 193
/* === Needed for Implementing === */ /* === Needed for Implementing === */
/** /**
* Request that this plugin not be unloaded at cleanup time. * Request that this plugin not be unloaded at cleanup time.
* This is appropriate for plugins which cannot be cleaned up. * This is appropriate for plugins which cannot be cleaned up.
* @see u_cleanup() * @see u_cleanup()
* @param plug plugin * @param plug plugin
* @param dontUnload set true if this plugin can't be unloaded * @param dontUnload set true if this plugin can't be unloaded
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload); uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload);
/** /**
* Set the level of this plugin. * Set the level of this plugin.
* @param plug plugin data handle * @param plug plugin data handle
* @param level the level of this plugin * @param level the level of this plugin
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
uplug_setPlugLevel(UPlugData *plug, UPlugLevel level); uplug_setPlugLevel(UPlugData *plug, UPlugLevel level);
/** /**
* Get the level of this plugin. * Get the level of this plugin.
* @param plug plugin data handle * @param plug plugin data handle
* @return the level of this plugin * @return the level of this plugin
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI UPlugLevel U_EXPORT2 U_INTERNAL UPlugLevel U_EXPORT2
uplug_getPlugLevel(UPlugData *plug); uplug_getPlugLevel(UPlugData *plug);
/** /**
* Get the lowest level of plug which can currently load. * Get the lowest level of plug which can currently load.
* For example, if UPLUG_LEVEL_LOW is returned, then low level plugins may load * For example, if UPLUG_LEVEL_LOW is returned, then low level plugins may load
* if UPLUG_LEVEL_HIGH is returned, then only high level plugins may load. * if UPLUG_LEVEL_HIGH is returned, then only high level plugins may load.
* @return the lowest level of plug which can currently load * @return the lowest level of plug which can currently load
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI UPlugLevel U_EXPORT2 U_INTERNAL UPlugLevel U_EXPORT2
uplug_getCurrentLevel(void); uplug_getCurrentLevel(void);
/** /**
* Get plug load status * Get plug load status
* @return The error code of this plugin's load attempt. * @return The error code of this plugin's load attempt.
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI UErrorCode U_EXPORT2 U_INTERNAL UErrorCode U_EXPORT2
uplug_getPlugLoadStatus(UPlugData *plug); uplug_getPlugLoadStatus(UPlugData *plug);
/** /**
* Set the human-readable name of this plugin. * Set the human-readable name of this plugin.
* @param plug plugin data handle * @param plug plugin data handle
* @param name the name of this plugin. The first UPLUG_NAME_MAX characters willi be copied into a new buffer. * @param name the name of this plugin. The first UPLUG_NAME_MAX characters willi be copied into a new buffer.
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
uplug_setPlugName(UPlugData *plug, const char *name); uplug_setPlugName(UPlugData *plug, const char *name);
/** /**
* Get the human-readable name of this plugin. * Get the human-readable name of this plugin.
* @param plug plugin data handle * @param plug plugin data handle
* @return the name of this plugin * @return the name of this plugin
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI const char * U_EXPORT2 U_INTERNAL const char * U_EXPORT2
uplug_getPlugName(UPlugData *plug); uplug_getPlugName(UPlugData *plug);
/** /**
* Return the symbol name for this plugin, if known. * Return the symbol name for this plugin, if known.
* @param plug plugin data handle * @param plug plugin data handle
* @return the symbol name, or NULL * @return the symbol name, or NULL
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI const char * U_EXPORT2 U_INTERNAL const char * U_EXPORT2
uplug_getSymbolName(UPlugData *plug); uplug_getSymbolName(UPlugData *plug);
/** /**
* Return the library name for this plugin, if known. * Return the library name for this plugin, if known.
* @param plug plugin data handle * @param plug plugin data handle
* @param status error code * @param status error code
* @return the library name, or NULL * @return the library name, or NULL
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI const char * U_EXPORT2 U_INTERNAL const char * U_EXPORT2
uplug_getLibraryName(UPlugData *plug, UErrorCode *status); uplug_getLibraryName(UPlugData *plug, UErrorCode *status);
/** /**
* Return the library used for this plugin, if known. * Return the library used for this plugin, if known.
* Plugins could use this to load data out of their * Plugins could use this to load data out of their
* @param plug plugin data handle * @param plug plugin data handle
* @return the library, or NULL * @return the library, or NULL
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI void * U_EXPORT2 U_INTERNAL void * U_EXPORT2
uplug_getLibrary(UPlugData *plug); uplug_getLibrary(UPlugData *plug);
/** /**
* Return the plugin-specific context data. * Return the plugin-specific context data.
* @param plug plugin data handle * @param plug plugin data handle
* @return the context, or NULL if not set * @return the context, or NULL if not set
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI void * U_EXPORT2 U_INTERNAL void * U_EXPORT2
uplug_getContext(UPlugData *plug); uplug_getContext(UPlugData *plug);
/** /**
* Set the plugin-specific context data. * Set the plugin-specific context data.
* @param plug plugin data handle * @param plug plugin data handle
* @param context new context to set * @param context new context to set
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
uplug_setContext(UPlugData *plug, void *context); uplug_setContext(UPlugData *plug, void *context);
/** /**
* Get the configuration string, if available. * Get the configuration string, if available.
* The string is in the platform default codepage. * The string is in the platform default codepage.
* @param plug plugin data handle * @param plug plugin data handle
* @return configuration string, or else null. * @return configuration string, or else null.
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI const char * U_EXPORT2 U_INTERNAL const char * U_EXPORT2
uplug_getConfiguration(UPlugData *plug); uplug_getConfiguration(UPlugData *plug);
/** /**
* Return all currently installed plugins, from newest to oldest * Return all currently installed plugins, from newest to oldest
* Usage Example: * Usage Example:
* \code * \code
* UPlugData *plug = NULL; * UPlugData *plug = NULL;
* while(plug=uplug_nextPlug(plug)) { * while(plug=uplug_nextPlug(plug)) {
* ... do something with 'plug' ... * ... do something with 'plug' ...
* } * }
* \endcode * \endcode
* Not thread safe- do not call while plugs are added or removed. * Not thread safe- do not call while plugs are added or removed.
* @param prior pass in 'NULL' to get the first (most recent) plug, * @param prior pass in 'NULL' to get the first (most recent) plug,
* otherwise pass the value returned on a prior call to uplug_nextPlug * otherwise pass the value returned on a prior call to uplug_nextPlug
* @return the next oldest plugin, or NULL if no more. * @return the next oldest plugin, or NULL if no more.
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI UPlugData* U_EXPORT2 U_INTERNAL UPlugData* U_EXPORT2
uplug_nextPlug(UPlugData *prior); uplug_nextPlug(UPlugData *prior);
/** /**
* Inject a plugin as if it were loaded from a library. * Inject a plugin as if it were loaded from a library.
* This is useful for testing plugins. * This is useful for testing plugins.
* Note that it will have a 'NULL' library pointer associated * Note that it will have a 'NULL' library pointer associated
* with it, and therefore no llibrary will be closed at cleanup time. * with it, and therefore no llibrary will be closed at cleanup time.
* Low level plugins may not be able to load, as ordering can't be enforced . * Low level plugins may not be able to load, as ordering can't be enforced .
* @param entrypoint entrypoint to install * @param entrypoint entrypoint to install
* @param config user specified configuration string, if available, or NULL . * @param config user specified configuration string, if available, or NULL .
* @param status error result * @param status error result
* @return the new UPlugData associated with this plugin, or NULL if error. * @return the new UPlugData associated with this plugin, or NULL if error.
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI UPlugData* U_EXPORT2 U_INTERNAL UPlugData* U_EXPORT2
uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *confi g, UErrorCode *status); uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *confi g, UErrorCode *status);
/** /**
* Inject a plugin from a library, as if the information came from a config file. * Inject a plugin from a library, as if the information came from a config file.
* Low level plugins may not be able to load, and ordering can't be enforce d. * Low level plugins may not be able to load, and ordering can't be enforce d.
* @param libName DLL name to load * @param libName DLL name to load
* @param sym symbol of plugin (UPlugEntrypoint function) * @param sym symbol of plugin (UPlugEntrypoint function)
* @param config configuration string, or NULL * @param config configuration string, or NULL
* @param status error result * @param status error result
* @return the new UPlugData associated with this plugin, or NULL if error. * @return the new UPlugData associated with this plugin, or NULL if error.
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI UPlugData* U_EXPORT2 U_INTERNAL UPlugData* U_EXPORT2
uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char *config, UErrorCode *status); uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char *config, UErrorCode *status);
/** /**
* Remove a plugin. * Remove a plugin.
* Will request the plugin to be unloaded, and close the library if needed * Will request the plugin to be unloaded, and close the library if needed
* @param plug plugin handle to close * @param plug plugin handle to close
* @param status error result * @param status error result
* @internal ICU 4.4 Technology Preview * @internal ICU 4.4 Technology Preview
*/ */
U_CAPI void U_EXPORT2 U_INTERNAL void U_EXPORT2
uplug_removePlug(UPlugData *plug, UErrorCode *status); uplug_removePlug(UPlugData *plug, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
#endif #endif
 End of changes. 18 change blocks. 
18 lines changed or deleted 18 lines changed or added


 idna.h   idna.h 
skipping to change at line 34 skipping to change at line 34
#if !UCONFIG_NO_IDNA #if !UCONFIG_NO_IDNA
#include "unicode/bytestream.h" #include "unicode/bytestream.h"
#include "unicode/stringpiece.h" #include "unicode/stringpiece.h"
#include "unicode/uidna.h" #include "unicode/uidna.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class U_COMMON_API IDNAInfo; class IDNAInfo;
/** /**
* Abstract base class for IDNA processing. * Abstract base class for IDNA processing.
* See http://www.unicode.org/reports/tr46/ * See http://www.unicode.org/reports/tr46/
* and http://www.ietf.org/rfc/rfc3490.txt * and http://www.ietf.org/rfc/rfc3490.txt
* *
* The IDNA class is not intended for public subclassing. * The IDNA class is not intended for public subclassing.
* *
* This C++ API currently only implements UTS #46. * This C++ API currently only implements UTS #46.
* The uidna.h C API implements both UTS #46 (functions using UIDNA service object) * The uidna.h C API implements both UTS #46 (functions using UIDNA service object)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 localpointer.h   localpointer.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2009-2010, International Business Machines * Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: localpointer.h * file name: localpointer.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2009nov13 * created on: 2009nov13
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 147 skipping to change at line 147
* and adopts (takes ownership of) the one passed in. * and adopts (takes ownership of) the one passed in.
* Subclass must override: Base class does not delete the object. * Subclass must override: Base class does not delete the object.
* @param p simple pointer to an object that is adopted * @param p simple pointer to an object that is adopted
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
void adoptInstead(T *p) { void adoptInstead(T *p) {
// delete ptr; // delete ptr;
ptr=p; ptr=p;
} }
protected: protected:
/**
* Actual pointer.
* @internal
*/
T *ptr; T *ptr;
private: private:
// No comparison operators with other LocalPointerBases. // No comparison operators with other LocalPointerBases.
bool operator==(const LocalPointerBase &other); bool operator==(const LocalPointerBase &other);
bool operator!=(const LocalPointerBase &other); bool operator!=(const LocalPointerBase &other);
// No ownership transfer: No copy constructor, no assignment operator. // No ownership transfer: No copy constructor, no assignment operator.
LocalPointerBase(const LocalPointerBase &other); LocalPointerBase(const LocalPointerBase &other);
void operator=(const LocalPointerBase &other); void operator=(const LocalPointerBase &other);
// No heap allocation. Use only on the stack. // No heap allocation. Use only on the stack.
static void * U_EXPORT2 operator new(size_t size); static void * U_EXPORT2 operator new(size_t size);
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added


 locdspnm.h   locdspnm.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 2010-2011, International Business Machines Corporation and * Copyright (C) 2010-2012, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef LOCDSPNM_H #ifndef LOCDSPNM_H
#define LOCDSPNM_H #define LOCDSPNM_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: Provides display names of Locale and its components. * \brief C++ API: Provides display names of Locale and its components.
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/uscript.h" #include "unicode/uscript.h"
#include "unicode/uldnames.h" #include "unicode/uldnames.h"
#include "unicode/udisplaycontext.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* Returns display names of Locales and components of Locales. For * Returns display names of Locales and components of Locales. For
* more information on language, script, region, variant, key, and * more information on language, script, region, variant, key, and
* values, see Locale. * values, see Locale.
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
class U_I18N_API LocaleDisplayNames : public UObject { class U_I18N_API LocaleDisplayNames : public UObject {
skipping to change at line 61 skipping to change at line 62
* Returns an instance of LocaleDisplayNames that returns names * Returns an instance of LocaleDisplayNames that returns names
* formatted for the provided locale, using the provided * formatted for the provided locale, using the provided
* dialectHandling. * dialectHandling.
* *
* @param locale the display locale * @param locale the display locale
* @param dialectHandling how to select names for locales * @param dialectHandling how to select names for locales
* @return a LocaleDisplayNames instance * @return a LocaleDisplayNames instance
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local e, static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local e,
UDialectHandling dia UDialectHandling dialectHandling);
lectHandling);
#ifndef U_HIDE_INTERNAL_API
/**
* Returns an instance of LocaleDisplayNames that returns names formatt
ed
* for the provided locale, using the provided UDisplayContext settings
.
*
* @param locale the display locale
* @param contexts List of one or more context settings (e.g. for diale
ct
* handling, capitalization, etc.
* @param length Number of items in the contexts list
* @return a LocaleDisplayNames instance
* @internal ICU 50 technology preview
*/
static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& local
e,
UDisplayContext *contexts, int32_t length);
#endif /* U_HIDE_INTERNAL_API */
// getters for state // getters for state
/** /**
* Returns the locale used to determine the display names. This is * Returns the locale used to determine the display names. This is
* not necessarily the same locale passed to {@link #createInstance}. * not necessarily the same locale passed to {@link #createInstance}.
* @return the display locale * @return the display locale
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual const Locale& getLocale() const = 0; virtual const Locale& getLocale() const = 0;
/** /**
* Returns the dialect handling used in the display names. * Returns the dialect handling used in the display names.
* @return the dialect handling enum * @return the dialect handling enum
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UDialectHandling getDialectHandling() const = 0; virtual UDialectHandling getDialectHandling() const = 0;
/**
* Returns the UDisplayContext value for the specified UDisplayContextT
ype.
* @param type the UDisplayContextType whose value to return
* @return the UDisplayContext for the specified type.
* @internal ICU 50 technology preview
*/
virtual UDisplayContext getContext(UDisplayContextType type) const = 0;
// names for entire locales // names for entire locales
/** /**
* Returns the display name of the provided locale. * Returns the display name of the provided locale.
* @param locale the locale whose display name to return * @param locale the locale whose display name to return
* @param result receives the locale's display name * @param result receives the locale's display name
* @return the display name of the provided locale * @return the display name of the provided locale
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& localeDisplayName(const Locale& locale, virtual UnicodeString& localeDisplayName(const Locale& locale,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
/** /**
* Returns the display name of the provided locale id. * Returns the display name of the provided locale id.
* @param localeId the id of the locale whose display name to return * @param localeId the id of the locale whose display name to return
* @param result receives the locale's display name * @param result receives the locale's display name
* @return the display name of the provided locale * @return the display name of the provided locale
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& localeDisplayName(const char* localeId, virtual UnicodeString& localeDisplayName(const char* localeId,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
// names for components of a locale id // names for components of a locale id
/** /**
* Returns the display name of the provided language code. * Returns the display name of the provided language code.
* @param lang the language code * @param lang the language code
* @param result receives the language code's display name * @param result receives the language code's display name
* @return the display name of the provided language code * @return the display name of the provided language code
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& languageDisplayName(const char* lang, virtual UnicodeString& languageDisplayName(const char* lang,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
/** /**
* Returns the display name of the provided script code. * Returns the display name of the provided script code.
* @param script the script code * @param script the script code
* @param result receives the script code's display name * @param result receives the script code's display name
* @return the display name of the provided script code * @return the display name of the provided script code
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& scriptDisplayName(const char* script, virtual UnicodeString& scriptDisplayName(const char* script,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
/** /**
* Returns the display name of the provided script code. * Returns the display name of the provided script code.
* @param scriptCode the script code number * @param scriptCode the script code number
* @param result receives the script code's display name * @param result receives the script code's display name
* @return the display name of the provided script code * @return the display name of the provided script code
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& scriptDisplayName(UScriptCode scriptCode, virtual UnicodeString& scriptDisplayName(UScriptCode scriptCode,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
/** /**
* Returns the display name of the provided region code. * Returns the display name of the provided region code.
* @param region the region code * @param region the region code
* @param result receives the region code's display name * @param result receives the region code's display name
* @return the display name of the provided region code * @return the display name of the provided region code
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& regionDisplayName(const char* region, virtual UnicodeString& regionDisplayName(const char* region,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
/** /**
* Returns the display name of the provided variant. * Returns the display name of the provided variant.
* @param variant the variant string * @param variant the variant string
* @param result receives the variant's display name * @param result receives the variant's display name
* @return the display name of the provided variant * @return the display name of the provided variant
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& variantDisplayName(const char* variant, virtual UnicodeString& variantDisplayName(const char* variant,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
/** /**
* Returns the display name of the provided locale key. * Returns the display name of the provided locale key.
* @param key the locale key name * @param key the locale key name
* @param result receives the locale key's display name * @param result receives the locale key's display name
* @return the display name of the provided locale key * @return the display name of the provided locale key
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& keyDisplayName(const char* key, virtual UnicodeString& keyDisplayName(const char* key,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
/** /**
* Returns the display name of the provided value (used with the provid ed key). * Returns the display name of the provided value (used with the provid ed key).
* @param key the locale key name * @param key the locale key name
* @param value the locale key's value * @param value the locale key's value
* @param result receives the value's display name * @param result receives the value's display name
* @return the display name of the provided value * @return the display name of the provided value
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
virtual UnicodeString& keyValueDisplayName(const char* key, const char* value, virtual UnicodeString& keyValueDisplayName(const char* key, const char* value,
UnicodeString& result) const = 0; UnicodeString& result) const = 0;
private: private:
// No ICU "poor man's RTTI" for this class nor its subclasses. // No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
}; };
inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& locale) { inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& locale) {
return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES); return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES);
} }
 End of changes. 13 change blocks. 
12 lines changed or deleted 41 lines changed or added


 locid.h   locid.h 
skipping to change at line 44 skipping to change at line 44
#include "unicode/unistr.h" #include "unicode/unistr.h"
#include "unicode/putil.h" #include "unicode/putil.h"
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "unicode/strenum.h" #include "unicode/strenum.h"
/** /**
* \file * \file
* \brief C++ API: Locale ID object. * \brief C++ API: Locale ID object.
*/ */
U_NAMESPACE_BEGIN
/** /**
* A <code>Locale</code> object represents a specific geographical, politic al, * A <code>Locale</code> object represents a specific geographical, politic al,
* or cultural region. An operation that requires a <code>Locale</code> to perform * or cultural region. An operation that requires a <code>Locale</code> to perform
* its task is called <em>locale-sensitive</em> and uses the <code>Locale</ code> * its task is called <em>locale-sensitive</em> and uses the <code>Locale</ code>
* to tailor information for the user. For example, displaying a number * to tailor information for the user. For example, displaying a number
* is a locale-sensitive operation--the number should be formatted * is a locale-sensitive operation--the number should be formatted
* according to the customs/conventions of the user's native country, * according to the customs/conventions of the user's native country,
* region, or culture. * region, or culture.
* *
* The Locale class is not suitable for subclassing. * The Locale class is not suitable for subclassing.
skipping to change at line 180 skipping to change at line 182
* const Locale& displayLocale, * const Locale& displayLocale,
* UnicodeString& displayName) * UnicodeString& displayName)
* static UnicodeString& getDisplayName(const Locale& objectLocale, * static UnicodeString& getDisplayName(const Locale& objectLocale,
* UnicodeString& displayName) * UnicodeString& displayName)
* </pre> * </pre>
* \htmlonly</blockquote>\endhtmlonly * \htmlonly</blockquote>\endhtmlonly
* *
* @stable ICU 2.0 * @stable ICU 2.0
* @see ResourceBundle * @see ResourceBundle
*/ */
U_NAMESPACE_BEGIN
class U_COMMON_API Locale : public UObject { class U_COMMON_API Locale : public UObject {
public: public:
/** Useful constant for the Root locale. @stable ICU 4.4 */ /** Useful constant for the Root locale. @stable ICU 4.4 */
static const Locale &U_EXPORT2 getRoot(void); static const Locale &U_EXPORT2 getRoot(void);
/** Useful constant for this language. @stable ICU 2.0 */ /** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getEnglish(void); static const Locale &U_EXPORT2 getEnglish(void);
/** Useful constant for this language. @stable ICU 2.0 */ /** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getFrench(void); static const Locale &U_EXPORT2 getFrench(void);
/** Useful constant for this language. @stable ICU 2.0 */ /** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getGerman(void); static const Locale &U_EXPORT2 getGerman(void);
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 messagepattern.h   messagepattern.h 
skipping to change at line 236 skipping to change at line 236
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_SIMPLE, UMSGPAT_ARG_TYPE_SIMPLE,
/** /**
* The argument is a ChoiceFormat with one or more * The argument is a ChoiceFormat with one or more
* ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples. * ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_CHOICE, UMSGPAT_ARG_TYPE_CHOICE,
/** /**
* The argument is a PluralFormat with an optional ARG_INT or ARG_DOUBL E offset * The argument is a cardinal-number PluralFormat with an optional ARG_ INT or ARG_DOUBLE offset
* (e.g., offset:1) * (e.g., offset:1)
* and one or more (ARG_SELECTOR [explicit-value] message) tuples. * and one or more (ARG_SELECTOR [explicit-value] message) tuples.
* If the selector has an explicit value (e.g., =2), then * If the selector has an explicit value (e.g., =2), then
* that value is provided by the ARG_INT or ARG_DOUBLE part preceding t he message. * that value is provided by the ARG_INT or ARG_DOUBLE part preceding t he message.
* Otherwise the message immediately follows the ARG_SELECTOR. * Otherwise the message immediately follows the ARG_SELECTOR.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_PLURAL, UMSGPAT_ARG_TYPE_PLURAL,
/** /**
* The argument is a SelectFormat with one or more (ARG_SELECTOR, messa ge) pairs. * The argument is a SelectFormat with one or more (ARG_SELECTOR, messa ge) pairs.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_TYPE_SELECT UMSGPAT_ARG_TYPE_SELECT,
/**
* The argument is an ordinal-number PluralFormat
* with the same style parts sequence and semantics as UMSGPAT_ARG_TYPE
_PLURAL.
* @draft ICU 50
*/
UMSGPAT_ARG_TYPE_SELECTORDINAL
}; };
/** /**
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
typedef enum UMessagePatternArgType UMessagePatternArgType; typedef enum UMessagePatternArgType UMessagePatternArgType;
/**
* Returns TRUE if the argument type has a plural style part sequence and s
emantics,
* for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL.
* @draft ICU 50
*/
#define UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) \
((argType)==UMSGPAT_ARG_TYPE_PLURAL || (argType)==UMSGPAT_ARG_TYPE_SELE
CTORDINAL)
enum { enum {
/** /**
* Return value from MessagePattern.validateArgumentName() for when * Return value from MessagePattern.validateArgumentName() for when
* the string is a valid "pattern identifier" but not a number. * the string is a valid "pattern identifier" but not a number.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
UMSGPAT_ARG_NAME_NOT_NUMBER=-1, UMSGPAT_ARG_NAME_NOT_NUMBER=-1,
/** /**
* Return value from MessagePattern.validateArgumentName() for when * Return value from MessagePattern.validateArgumentName() for when
skipping to change at line 881 skipping to change at line 895
int32_t skipDouble(int32_t index); int32_t skipDouble(int32_t index);
static UBool isArgTypeChar(UChar32 c); static UBool isArgTypeChar(UChar32 c);
UBool isChoice(int32_t index); UBool isChoice(int32_t index);
UBool isPlural(int32_t index); UBool isPlural(int32_t index);
UBool isSelect(int32_t index); UBool isSelect(int32_t index);
UBool isOrdinal(int32_t index);
/** /**
* @return TRUE if we are inside a MessageFormat (sub-)pattern, * @return TRUE if we are inside a MessageFormat (sub-)pattern,
* as opposed to inside a top-level choice/plural/select patter n. * as opposed to inside a top-level choice/plural/select patter n.
*/ */
UBool inMessageFormatPattern(int32_t nestingLevel); UBool inMessageFormatPattern(int32_t nestingLevel);
/** /**
* @return TRUE if we are in a MessageFormat sub-pattern * @return TRUE if we are in a MessageFormat sub-pattern
* of a top-level ChoiceFormat pattern. * of a top-level ChoiceFormat pattern.
*/ */
 End of changes. 4 change blocks. 
2 lines changed or deleted 21 lines changed or added


 msgfmt.h   msgfmt.h 
skipping to change at line 107 skipping to change at line 107
* (or using a custom Format object if one was set). * (or using a custom Format object if one was set).
* A numbered pattern argument is matched with an argument name that contai ns that number * A numbered pattern argument is matched with an argument name that contai ns that number
* as an ASCII-decimal-digit string (without leading zero). * as an ASCII-decimal-digit string (without leading zero).
* *
* <h4><a name="patterns">Patterns and Their Interpretation</a></h4> * <h4><a name="patterns">Patterns and Their Interpretation</a></h4>
* *
* <code>MessageFormat</code> uses patterns of the following form: * <code>MessageFormat</code> uses patterns of the following form:
* <pre> * <pre>
* message = messageText (argument messageText)* * message = messageText (argument messageText)*
* argument = noneArg | simpleArg | complexArg * argument = noneArg | simpleArg | complexArg
* complexArg = choiceArg | pluralArg | selectArg * complexArg = choiceArg | pluralArg | selectArg | selectordinalArg
* *
* noneArg = '{' argNameOrNumber '}' * noneArg = '{' argNameOrNumber '}'
* simpleArg = '{' argNameOrNumber ',' argType [',' argStyle] '}' * simpleArg = '{' argNameOrNumber ',' argType [',' argStyle] '}'
* choiceArg = '{' argNameOrNumber ',' "choice" ',' choiceStyle '}' * choiceArg = '{' argNameOrNumber ',' "choice" ',' choiceStyle '}'
* pluralArg = '{' argNameOrNumber ',' "plural" ',' pluralStyle '}' * pluralArg = '{' argNameOrNumber ',' "plural" ',' pluralStyle '}'
* selectArg = '{' argNameOrNumber ',' "select" ',' selectStyle '}' * selectArg = '{' argNameOrNumber ',' "select" ',' selectStyle '}'
* selectordinalArg = '{' argNameOrNumber ',' "selectordinal" ',' pluralSty le '}'
* *
* choiceStyle: see {@link ChoiceFormat} * choiceStyle: see {@link ChoiceFormat}
* pluralStyle: see {@link PluralFormat} * pluralStyle: see {@link PluralFormat}
* selectStyle: see {@link SelectFormat} * selectStyle: see {@link SelectFormat}
* *
* argNameOrNumber = argName | argNumber * argNameOrNumber = argName | argNumber
* argName = [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+ * argName = [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+
* argNumber = '0' | ('1'..'9' ('0'..'9')*) * argNumber = '0' | ('1'..'9' ('0'..'9')*)
* *
* argType = "number" | "date" | "time" | "spellout" | "ordinal" | "duratio n" * argType = "number" | "date" | "time" | "spellout" | "ordinal" | "duratio n"
skipping to change at line 890 skipping to change at line 891
MessageFormat(); // default constructor not implemented MessageFormat(); // default constructor not implemented
/** /**
* This provider helps defer instantiation of a PluralRules object * This provider helps defer instantiation of a PluralRules object
* until we actually need to select a keyword. * until we actually need to select a keyword.
* For example, if the number matches an explicit-value selector like "=1" * For example, if the number matches an explicit-value selector like "=1"
* we do not need any PluralRules. * we do not need any PluralRules.
*/ */
class U_I18N_API PluralSelectorProvider : public PluralFormat::PluralSe lector { class U_I18N_API PluralSelectorProvider : public PluralFormat::PluralSe lector {
public: public:
PluralSelectorProvider(const Locale* loc); PluralSelectorProvider(const Locale* loc, UPluralType type);
virtual ~PluralSelectorProvider(); virtual ~PluralSelectorProvider();
virtual UnicodeString select(double number, UErrorCode& ec) const; virtual UnicodeString select(double number, UErrorCode& ec) const;
void reset(const Locale* loc); void reset(const Locale* loc);
private: private:
const Locale* locale; const Locale* locale;
PluralRules* rules; PluralRules* rules;
UPluralType type;
}; };
/** /**
* 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.
*/ */
skipping to change at line 936 skipping to change at line 938
* 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* cachedFormatters;
UHashtable* customFormatArgStarts; UHashtable* customFormatArgStarts;
PluralSelectorProvider pluralProvider; PluralSelectorProvider pluralProvider;
PluralSelectorProvider ordinalProvider;
/** /**
* 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.
skipping to change at line 1068 skipping to change at line 1071
/** /**
* A DummyFormatter that we use solely to store a NULL value. UHash doe s * A DummyFormatter that we use solely to store a NULL value. UHash doe s
* not support storing NULL values. * not support storing NULL values.
* @internal * @internal
*/ */
class U_I18N_API DummyFormat : public Format { class U_I18N_API DummyFormat : public Format {
public: public:
virtual UBool operator==(const Format&) const; virtual UBool operator==(const Format&) const;
virtual Format* clone() const; virtual Format* clone() const;
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
UErrorCode& status) const;
virtual UnicodeString& format(const Formattable&, virtual UnicodeString& format(const Formattable&,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition&, FieldPosition&,
UErrorCode& status) const; UErrorCode& status) const;
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPositionIterator* posIter,
UErrorCode& status) const;
virtual void parseObject(const UnicodeString&, virtual void parseObject(const UnicodeString&,
Formattable&, Formattable&,
ParsePosition&) const; ParsePosition&) const;
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
}; };
friend class MessageFormatAdapter; // getFormatTypeList() access friend class MessageFormatAdapter; // getFormatTypeList() access
}; };
inline UnicodeString& inline UnicodeString&
 End of changes. 7 change blocks. 
2 lines changed or deleted 12 lines changed or added


 numfmt.h   numfmt.h 
skipping to change at line 360 skipping to change at line 360
* 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 = 0; FieldPosition& pos) const = 0;
/** /**
* Format a double number. By default, the parent function simply
* calls the base class and does not return an error status.
* Therefore, the status may be ignored in some subclasses.
*
* @param number The value to be formatted.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
* @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field.
* @param status error status
* @return Reference to 'appendTo' parameter.
* @internal
*/
virtual UnicodeString& format(double number,
UnicodeString& appendTo,
FieldPosition& pos,
UErrorCode &status) const;
/**
* Format a double number. Subclasses must implement * Format a double number. Subclasses must implement
* this method. * this method.
* *
* @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 posIter On return, can be used to iterate over positions * @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. * of fields generated by this format call.
* Can be NULL. * Can be NULL.
* @param status Output param filled with success/failure status. * @param status Output param filled with success/failure status.
skipping to change at line 394 skipping to change at line 412
* @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 = 0; FieldPosition& pos) const = 0;
/** /**
* Format a long number. Concrete subclasses may override
* this function to provide status return.
*
* @param number The value to be formatted.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
* @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field.
* @param status the output status.
* @return Reference to 'appendTo' parameter.
* @internal
*/
virtual UnicodeString& format(int32_t number,
UnicodeString& appendTo,
FieldPosition& pos,
UErrorCode &status) const;
/**
* Format an int32 number. Subclasses must implement * Format an int32 number. Subclasses must implement
* this method. * this method.
* *
* @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 posIter On return, can be used to iterate over positions * @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. * of fields generated by this format call.
* Can be NULL. * Can be NULL.
* @param status Output param filled with success/failure status. * @param status Output param filled with success/failure status.
skipping to change at line 427 skipping to change at line 463
* @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 int64 number. (Not abstract to retain compatibility
* with earlier releases, however subclasses should override this
* method as it just delegates to format(int32_t number...);
*
* @param number The value to be formatted.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
* @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter.
* @internal
*/
virtual UnicodeString& format(int64_t number,
UnicodeString& appendTo,
FieldPosition& pos,
UErrorCode& status) const;
/** /**
* Format an int64 number. Subclasses must implement * Format an int64 number. Subclasses must implement
* this method. * this method.
* *
* @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 posIter On return, can be used to iterate over positions * @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. * of fields generated by this format call.
* Can be NULL. * Can be NULL.
skipping to change at line 544 skipping to change at line 598
* returned. * returned.
* <P> * <P>
* This is a pure virtual which concrete subclasses must implement. * This is a pure virtual which concrete subclasses must implement.
* *
* @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.
* @return A Formattable object of numeric type. The call
er
* owns this an must delete it. NULL on failure.
* @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 = 0; ParsePosition& parsePosition) const = 0;
/** /**
* Parse a string as a numeric value, and return a Formattable * Parse a string as a numeric value, and return a Formattable
* numeric object. This method parses integers only if IntegerOnly * numeric object. This method parses integers only if IntegerOnly
* is set. * is set.
* *
* @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 parameter set to a failure error code * @param status Output parameter set to a failure error code
* when a failure occurs. * when a failure occurs.
* @return A Formattable object of numeric type. The call
er
* owns this an must delete it. NULL on failure.
* @see NumberFormat::isParseIntegerOnly * @see NumberFormat::isParseIntegerOnly
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void parse( const UnicodeString& text, virtual void parse(const UnicodeString& text,
Formattable& result, Formattable& result,
UErrorCode& status) const; UErrorCode& status) const;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */ /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/** /**
* Parses text from the given string as a currency amount. Unlike * Parses text from the given string as a currency amount. Unlike
* the parse() method, this method will attempt to parse a generic * the parse() method, this method will attempt to parse a generic
* currency name, searching for a match of this object's locale's * currency name, searching for a match of this object's locale's
* currency display names, or for a 3-letter ISO currency code. * currency display names, or for a 3-letter ISO currency code.
* This method will fail if this format is not a currency format, * This method will fail if this format is not a currency format,
* that is, if it does not contain the currency pattern symbol * that is, if it does not contain the currency pattern symbol
* (U+00A4) in its prefix or suffix. * (U+00A4) in its prefix or suffix.
 End of changes. 6 change blocks. 
9 lines changed or deleted 57 lines changed or added


 platform.h   platform.h 
skipping to change at line 39 skipping to change at line 39
* This file used to be generated by autoconf/configure. * This file used to be generated by autoconf/configure.
* Starting with ICU 49, platform.h is a normal source file, * Starting with ICU 49, platform.h is a normal source file,
* to simplify cross-compiling and working with non-autoconf/make build sys tems. * to simplify cross-compiling and working with non-autoconf/make build sys tems.
* *
* When a value in this file does not work on a platform, then please * When a value in this file does not work on a platform, then please
* try to derive it from the U_PLATFORM value * try to derive it from the U_PLATFORM value
* (for which we might need a new value constant in rare cases) * (for which we might need a new value constant in rare cases)
* and/or from other macros that are predefined by the compiler * and/or from other macros that are predefined by the compiler
* or defined in standard (POSIX or platform or compiler) headers. * or defined in standard (POSIX or platform or compiler) headers.
* *
* As a temporary workaround, you can add an explicit #define for some macr os * As a temporary workaround, you can add an explicit <code>#define</code> for some macros
* before it is first tested, or add an equivalent -D macro definition * before it is first tested, or add an equivalent -D macro definition
* to the compiler's command line. * to the compiler's command line.
* *
* Note: Some compilers provide ways to show the predefined macros. * Note: Some compilers provide ways to show the predefined macros.
* For example, with gcc you can compile an empty .c file and have the comp iler * For example, with gcc you can compile an empty .c file and have the comp iler
* print the predefined macros with * print the predefined macros with
* \code * \code
* gcc -E -dM -x c /dev/null | sort * gcc -E -dM -x c /dev/null | sort
* \endcode * \endcode
* (You can provide an actual empty .c file rather than /dev/null. * (You can provide an actual empty .c file rather than /dev/null.
* <code>-x c++</code> is for C++.) * <code>-x c++</code> is for C++.)
*/ */
/** /**
* Define some things so that they can be documented.
* @internal
*/
#ifdef U_IN_DOXYGEN
/*
* Problem: "platform.h:335: warning: documentation for unknown define U_HA
VE_STD_STRING found." means that U_HAVE_STD_STRING is not documented.
* Solution: #define any defines for non @internal API here, so that they a
re visible in the docs. If you just set PREDEFINED in Doxyfile.in, they w
on't be documented.
*/
/* None for now. */
#endif
/**
* \def U_PLATFORM * \def U_PLATFORM
* The U_PLATFORM macro defines the platform we're on. * The U_PLATFORM macro defines the platform we're on.
* *
* We used to define one different, value-less macro per platform. * We used to define one different, value-less macro per platform.
* That made it hard to know the set of relevant platforms and macros, * That made it hard to know the set of relevant platforms and macros,
* and hard to deal with variants of platforms. * and hard to deal with variants of platforms.
* *
* Starting with ICU 49, we define platforms as numeric macros, * Starting with ICU 49, we define platforms as numeric macros,
* with ranges of values for related platforms and their variants. * with ranges of values for related platforms and their variants.
* The U_PLATFORM macro is set to one of these values. * The U_PLATFORM macro is set to one of these values.
skipping to change at line 134 skipping to change at line 147
#elif defined(__CYGWIN__) #elif defined(__CYGWIN__)
# define U_PLATFORM U_PF_CYGWIN # define U_PLATFORM U_PF_CYGWIN
#elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64 ) #elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64 )
# define U_PLATFORM U_PF_WINDOWS # define U_PLATFORM U_PF_WINDOWS
#elif defined(__ANDROID__) #elif defined(__ANDROID__)
# define U_PLATFORM U_PF_ANDROID # define U_PLATFORM U_PF_ANDROID
/* Android wchar_t support depends on the API level. */ /* Android wchar_t support depends on the API level. */
# include <android/api-level.h> # include <android/api-level.h>
#elif defined(linux) || defined(__linux__) || defined(__linux) #elif defined(linux) || defined(__linux__) || defined(__linux)
# define U_PLATFORM U_PF_LINUX # define U_PLATFORM U_PF_LINUX
#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | | defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)
# define U_PLATFORM U_PF_BSD # define U_PLATFORM U_PF_BSD
#elif defined(sun) || defined(__sun) #elif defined(sun) || defined(__sun)
/* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris fr om SunOS? */ /* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris fr om SunOS? */
# define U_PLATFORM U_PF_SOLARIS # define U_PLATFORM U_PF_SOLARIS
# if defined(__GNUC__) # if defined(__GNUC__)
/* Solaris/GCC needs this header file to get the proper endianness. Normally, this /* Solaris/GCC needs this header file to get the proper endianness. Normally, this
* header file is included with stddef.h but on Solairs/GCC, the GC C version of stddef.h * header file is included with stddef.h but on Solairs/GCC, the GC C version of stddef.h
* is included which does not include this header file. * is included which does not include this header file.
*/ */
# include <sys/isa_defs.h> # include <sys/isa_defs.h>
skipping to change at line 271 skipping to change at line 284
#elif U_PLATFORM_USES_ONLY_WIN32_API #elif U_PLATFORM_USES_ONLY_WIN32_API
# if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER>=1600) # if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER>=1600)
/* Windows Visual Studio 9 and below do not have stdint.h & inttype s.h, but VS 2010 adds them. */ /* Windows Visual Studio 9 and below do not have stdint.h & inttype s.h, but VS 2010 adds them. */
# define U_HAVE_STDINT_H 1 # define U_HAVE_STDINT_H 1
# else # else
# define U_HAVE_STDINT_H 0 # define U_HAVE_STDINT_H 0
# endif # endif
#elif U_PLATFORM == U_PF_SOLARIS #elif U_PLATFORM == U_PF_SOLARIS
/* Solaris has inttypes.h but not stdint.h. */ /* Solaris has inttypes.h but not stdint.h. */
# define U_HAVE_STDINT_H 0 # define U_HAVE_STDINT_H 0
#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER)
/* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */
# define U_HAVE_STDINT_H 0
#else #else
# define U_HAVE_STDINT_H 1 # define U_HAVE_STDINT_H 1
#endif #endif
/** /**
* \def U_HAVE_INTTYPES_H * \def U_HAVE_INTTYPES_H
* Defines whether inttypes.h is available. It is a C99 standard header. * Defines whether inttypes.h is available. It is a C99 standard header.
* We include inttypes.h where it is available but stdint.h is not. * We include inttypes.h where it is available but stdint.h is not.
* @internal * @internal
*/ */
#ifdef U_HAVE_INTTYPES_H #ifdef U_HAVE_INTTYPES_H
/* Use the predefined value. */ /* Use the predefined value. */
#elif U_PLATFORM == U_PF_SOLARIS #elif U_PLATFORM == U_PF_SOLARIS
/* Solaris has inttypes.h but not stdint.h. */ /* Solaris has inttypes.h but not stdint.h. */
# define U_HAVE_INTTYPES_H 1 # define U_HAVE_INTTYPES_H 1
#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER)
/* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */
# define U_HAVE_INTTYPES_H 1
#else #else
/* Most platforms have both inttypes.h and stdint.h, or neither. */ /* Most platforms have both inttypes.h and stdint.h, or neither. */
# define U_HAVE_INTTYPES_H U_HAVE_STDINT_H # define U_HAVE_INTTYPES_H U_HAVE_STDINT_H
#endif #endif
/** /**
* \def U_IOSTREAM_SOURCE * \def U_IOSTREAM_SOURCE
* Defines what support for C++ streams is available. * Defines what support for C++ streams is available.
* *
* If U_IOSTREAM_SOURCE is set to 199711, then &lt;iostream&gt; is availabl e * If U_IOSTREAM_SOURCE is set to 199711, then &lt;iostream&gt; is availabl e
skipping to change at line 334 skipping to change at line 353
# define U_HAVE_STD_STRING 0 # define U_HAVE_STD_STRING 0
#else #else
# define U_HAVE_STD_STRING 1 # define U_HAVE_STD_STRING 1
#endif #endif
/*========================================================================= ==*/ /*========================================================================= ==*/
/** @{ Compiler and environment features */ /** @{ Compiler and environment features */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** /**
* \def U_GCC_MAJOR_MINOR
* Indicates whether the compiler is gcc (test for != 0),
* and if so, contains its major (times 100) and minor version numbers.
* If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.
*
* For example, for testing for whether we have gcc, and whether it's 4.6 o
r higher,
* use "#if U_GCC_MAJOR_MINOR >= 406".
* @internal
*/
#ifdef __GNUC__
# define U_GCC_MAJOR_MINOR (__GNUC__ * 100 + __GNUC_MINOR__)
#else
# define U_GCC_MAJOR_MINOR 0
#endif
/**
* \def U_IS_BIG_ENDIAN * \def U_IS_BIG_ENDIAN
* Determines the endianness of the platform. * Determines the endianness of the platform.
* @internal * @internal
*/ */
#ifdef U_IS_BIG_ENDIAN #ifdef U_IS_BIG_ENDIAN
/* Use the predefined value. */ /* Use the predefined value. */
#elif defined(BYTE_ORDER) && defined(BIG_ENDIAN) #elif defined(BYTE_ORDER) && defined(BIG_ENDIAN)
# define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) # define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN)
#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
/* gcc */ /* gcc */
skipping to change at line 355 skipping to change at line 390
#elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN) #elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN)
# define U_IS_BIG_ENDIAN 1 # define U_IS_BIG_ENDIAN 1
#elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN) #elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN)
# define U_IS_BIG_ENDIAN 0 # define U_IS_BIG_ENDIAN 0
#elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 || defined(__s39 0__) || defined(__s390x__) #elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 || defined(__s39 0__) || defined(__s390x__)
/* These platforms do not appear to predefine any endianness macros. */ /* These platforms do not appear to predefine any endianness macros. */
# define U_IS_BIG_ENDIAN 1 # define U_IS_BIG_ENDIAN 1
#elif defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) #elif defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0)
/* HPPA do not appear to predefine any endianness macros. */ /* HPPA do not appear to predefine any endianness macros. */
# define U_IS_BIG_ENDIAN 1 # define U_IS_BIG_ENDIAN 1
#elif defined(sparc) || defined(__sparc) || defined(__sparc__)
/* Some sparc based systems (e.g. Linux) do not predefine any endiannes
s macros. */
# define U_IS_BIG_ENDIAN 1
#else #else
# define U_IS_BIG_ENDIAN 0 # define U_IS_BIG_ENDIAN 0
#endif #endif
/** /**
* \def U_HAVE_PLACEMENT_NEW * \def U_HAVE_PLACEMENT_NEW
* Determines whether to override placement new and delete for STL. * Determines whether to override placement new and delete for STL.
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#ifdef U_HAVE_PLACEMENT_NEW #ifdef U_HAVE_PLACEMENT_NEW
skipping to change at line 386 skipping to change at line 424
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
#ifdef U_HAVE_DEBUG_LOCATION_NEW #ifdef U_HAVE_DEBUG_LOCATION_NEW
/* Use the predefined value. */ /* Use the predefined value. */
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
# define U_HAVE_DEBUG_LOCATION_NEW 1 # define U_HAVE_DEBUG_LOCATION_NEW 1
#else #else
# define U_HAVE_DEBUG_LOCATION_NEW 0 # define U_HAVE_DEBUG_LOCATION_NEW 0
#endif #endif
/* Compatibility with non clang compilers */
#ifndef __has_attribute
# define __has_attribute(x) 0
#endif
/**
* \def U_MALLOC_ATTR
* Attribute to mark functions as malloc-like
* @internal
*/
#if defined(__GNUC__) && __GNUC__>=3
# define U_MALLOC_ATTR __attribute__ ((__malloc__))
#else
# define U_MALLOC_ATTR
#endif
/**
* \def U_ALLOC_SIZE_ATTR
* Attribute to specify the size of the allocated buffer for malloc-like fu
nctions
* @internal
*/
#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__
>= 3))) || __has_attribute(alloc_size)
# define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X)))
# define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y)))
#else
# define U_ALLOC_SIZE_ATTR(X)
# define U_ALLOC_SIZE_ATTR2(X,Y)
#endif
/** @} */ /** @} */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** @{ Character data types */ /** @{ Character data types */
/*========================================================================= ==*/ /*========================================================================= ==*/
/** /**
* U_CHARSET_FAMILY is equal to this value when the platform is an ASCII ba sed platform. * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII ba sed platform.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 600 skipping to change at line 667
*/ */
#ifdef U_HAVE_CHAR16_T #ifdef U_HAVE_CHAR16_T
/* Use the predefined value. */ /* Use the predefined value. */
#else #else
/* /*
* Notes: * Notes:
* Visual Studio 10 (_MSC_VER>=1600) defines char16_t but * Visual Studio 10 (_MSC_VER>=1600) defines char16_t but
* does not support u"abc" string literals. * does not support u"abc" string literals.
* gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but
* does not support u"abc" string literals. * does not support u"abc" string literals.
* C++11 requires support for UTF-16 literals
*/ */
# define U_HAVE_CHAR16_T 0 # if (defined(__cplusplus) && __cplusplus >= 201103L)
# define U_HAVE_CHAR16_T 1
# else
# define U_HAVE_CHAR16_T 0
# endif
#endif #endif
/** /**
* @{ * @{
* \def U_DECLARE_UTF16 * \def U_DECLARE_UTF16
* Do not use this macro because it is not defined on all platforms. * Do not use this macro because it is not defined on all platforms.
* Use the UNICODE_STRING or U_STRING_DECL macros instead. * Use the UNICODE_STRING or U_STRING_DECL macros instead.
* @internal * @internal
*/ */
#ifdef U_DECLARE_UTF16 #ifdef U_DECLARE_UTF16
/* Use the predefined value. */ /* Use the predefined value. */
#elif (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T ! #elif U_HAVE_CHAR16_T \
= 2) \ || (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T
!= 2) \
|| (defined(__HP_aCC) && __HP_aCC >= 035000) \ || (defined(__HP_aCC) && __HP_aCC >= 035000) \
|| (defined(__HP_cc) && __HP_cc >= 111106) \ || (defined(__HP_cc) && __HP_cc >= 111106)
|| U_HAVE_CHAR16_T
# define U_DECLARE_UTF16(string) u ## string # define U_DECLARE_UTF16(string) u ## string
#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550)
/* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */
/* Sun's C compiler has issues with this notation, and it's unreliable. */
# define U_DECLARE_UTF16(string) U ## string
#elif U_SIZEOF_WCHAR_T == 2 \ #elif U_SIZEOF_WCHAR_T == 2 \
&& (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400 && defined(__UCS2__))) && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400 && defined(__UCS2__)))
# define U_DECLARE_UTF16(string) L ## string # define U_DECLARE_UTF16(string) L ## string
#else #else
/* Leave U_DECLARE_UTF16 undefined. See unistr.h. */ /* Leave U_DECLARE_UTF16 undefined. See unistr.h. */
#endif #endif
/** @} */ /** @} */
/*========================================================================= ==*/ /*========================================================================= ==*/
 End of changes. 13 change blocks. 
11 lines changed or deleted 86 lines changed or added


 plurfmt.h   plurfmt.h 
skipping to change at line 151 skipping to change at line 151
* </p> * </p>
* *
* ported from Java * ported from Java
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
class U_I18N_API PluralFormat : public Format { class U_I18N_API PluralFormat : public Format {
public: public:
/** /**
* Creates a new <code>PluralFormat</code> for the default locale. * Creates a new cardinal-number <code>PluralFormat</code> for the defa ult locale.
* This locale will be used to get the set of plural rules and for stan dard * This locale will be used to get the set of plural rules and for stan dard
* number formatting. * number formatting.
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(UErrorCode& status); PluralFormat(UErrorCode& status);
/** /**
* Creates a new <code>PluralFormat</code> for a given locale. * Creates a new cardinal-number <code>PluralFormat</code> for a given locale.
* @param locale the <code>PluralFormat</code> will be configured with * @param locale the <code>PluralFormat</code> will be configured with
* rules for this locale. This locale will also be used f or * rules for this locale. This locale will also be used f or
* standard number formatting. * standard number formatting.
* @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.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(const Locale& locale, UErrorCode& status); PluralFormat(const Locale& locale, UErrorCode& status);
/** /**
skipping to change at line 196 skipping to change at line 196
* locale. * locale.
* @param rules defines the behavior of the <code>PluralFormat</code> * @param rules defines the behavior of the <code>PluralFormat</code>
* object. * object.
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode & status); PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode & status);
/** /**
* Creates a new <code>PluralFormat</code> for a given pattern string. * Creates a new <code>PluralFormat</code> for the plural type.
* The standard number formatting will be done using the given locale.
* @param locale the default number formatting will be done using this
* locale.
* @param type The plural type (e.g., cardinal or ordinal).
* @param status output param set to success/failure code on exit, whi
ch
* must not indicate a failure before the function call.
* @draft ICU 50
*/
PluralFormat(const Locale& locale, UPluralType type, UErrorCode& status
);
/**
* Creates a new cardinal-number <code>PluralFormat</code> for a given
pattern string.
* The default locale will be used to get the set of plural rules and f or * The default locale will be used to get the set of plural rules and f or
* standard number formatting. * standard number formatting.
* @param pattern the pattern for this <code>PluralFormat</code>. * @param pattern the pattern for this <code>PluralFormat</code>.
* errors are returned to status if the pattern is inva lid. * errors are returned to status if the pattern is inva lid.
* @param status output param set to success/failure code on exit, wh ich * @param status output param set to success/failure code on exit, wh ich
* must not indicate a failure before the function call . * must not indicate a failure before the function call .
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(const UnicodeString& pattern, UErrorCode& status); PluralFormat(const UnicodeString& pattern, UErrorCode& status);
/** /**
* Creates a new <code>PluralFormat</code> for a given pattern string a nd * Creates a new cardinal-number <code>PluralFormat</code> for a given pattern string and
* locale. * locale.
* The locale will be used to get the set of plural rules and for * The locale will be used to get the set of plural rules and for
* standard number formatting. * standard number formatting.
* @param locale the <code>PluralFormat</code> will be configured wit h * @param locale the <code>PluralFormat</code> will be configured wit h
* rules for this locale. This locale will also be used for * rules for this locale. This locale will also be used for
* standard number formatting. * standard number formatting.
* @param pattern the pattern for this <code>PluralFormat</code>. * @param pattern the pattern for this <code>PluralFormat</code>.
* errors are returned to status if the pattern is inva lid. * errors are returned to status if the pattern is inva lid.
* @param status output param set to success/failure code on exit, wh ich * @param status output param set to success/failure code on exit, wh ich
* must not indicate a failure before the function call . * must not indicate a failure before the function call .
skipping to change at line 258 skipping to change at line 270
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(const Locale& locale, PluralFormat(const Locale& locale,
const PluralRules& rules, const PluralRules& rules,
const UnicodeString& pattern, const UnicodeString& pattern,
UErrorCode& status); UErrorCode& status);
/** /**
* Creates a new <code>PluralFormat</code> for a plural type, a
* pattern and a locale.
* @param locale the <code>PluralFormat</code> will be configured with
* rules for this locale. This locale will also be used
for
* standard number formatting.
* @param type The plural type (e.g., cardinal or ordinal).
* @param pattern the pattern for this <code>PluralFormat</code>.
* errors are returned to status if the pattern is inval
id.
* @param status output param set to success/failure code on exit, whi
ch
* must not indicate a failure before the function call.
* @draft ICU 50
*/
PluralFormat(const Locale& locale,
UPluralType type,
const UnicodeString& pattern,
UErrorCode& status);
/**
* copy constructor. * copy constructor.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
PluralFormat(const PluralFormat& other); PluralFormat(const PluralFormat& other);
/** /**
* Destructor. * Destructor.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
virtual ~PluralFormat(); virtual ~PluralFormat();
skipping to change at line 361 skipping to change at line 391
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos, FieldPosition& pos,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Sets the locale used by this <code>PluraFormat</code> object. * Sets the locale used by this <code>PluraFormat</code> object.
* Note: Calling this method resets this <code>PluraFormat</code> objec t, * Note: Calling this method resets this <code>PluraFormat</code> objec t,
* i.e., a pattern that was applied previously will be removed, * i.e., a pattern that was applied previously will be removed,
* and the NumberFormat is set to the default number format for * and the NumberFormat is set to the default number format for
* the locale. The resulting format behaves the same as one * the locale. The resulting format behaves the same as one
* constructed from {@link #PluralFormat(const Locale& locale, UErr * constructed from {@link #PluralFormat(const Locale& locale, UPlu
orCode& status)}. ralType type, UErrorCode& status)}
* with UPLURAL_TYPE_CARDINAL.
* @param locale the <code>locale</code> to use to configure the forma tter. * @param locale the <code>locale</code> to use to configure the forma tter.
* @param status output param set to success/failure code on exit, whi ch * @param status output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @stable ICU 4.0 * @deprecated ICU 50 This method clears the pattern and might create
* a different kind of PluralRules instance;
* use one of the constructors to create a new instance ins
tead.
*/ */
void setLocale(const Locale& locale, UErrorCode& status); void setLocale(const Locale& locale, UErrorCode& status);
/** /**
* Sets the number format used by this formatter. You only need to * Sets the number format used by this formatter. You only need to
* call this if you want a different number format than the default * call this if you want a different number format than the default
* formatter for the locale. * formatter for the locale.
* @param format the number format to use. * @param format the number format to use.
* @param status output param set to success/failure code on exit, wh ich * @param status output param set to success/failure code on exit, wh ich
* must not indicate a failure before the function call . * must not indicate a failure before the function call .
skipping to change at line 481 skipping to change at line 514
*/ */
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;
#if defined(__xlC__) || (U_PLATFORM == U_PF_OS390) || (U_PLATFORM ==U_PF_OS 400) #if (defined(__xlC__) && (__xlC__ < 0x0C00)) || (U_PLATFORM == U_PF_OS390) || (U_PLATFORM ==U_PF_OS400)
// Work around a compiler bug on xlC 11.1 on AIX 7.1 that would // Work around a compiler bug on xlC 11.1 on AIX 7.1 that would
// prevent PluralSelectorAdapter from implementing private PluralSelector. // prevent PluralSelectorAdapter from implementing private PluralSelector.
// xlC error message: // xlC error message:
// 1540-0300 (S) The "private" member "class icu_49::PluralFormat::PluralSe lector" cannot be accessed. // 1540-0300 (S) The "private" member "class icu_49::PluralFormat::PluralSe lector" cannot be accessed.
public: public:
#else #else
private: private:
#endif #endif
/** /**
* @internal * @internal
skipping to change at line 534 skipping to change at line 567
// End of xlC bug workaround, keep remaining definitions private. // End of xlC bug workaround, keep remaining definitions private.
private: private:
#endif #endif
Locale locale; Locale locale;
MessagePattern msgPattern; MessagePattern msgPattern;
NumberFormat* numberFormat; NumberFormat* numberFormat;
double offset; double offset;
PluralSelectorAdapter pluralRulesWrapper; PluralSelectorAdapter pluralRulesWrapper;
PluralFormat(); // default constructor not implemented PluralFormat(); // default constructor not implemented
void init(const PluralRules* rules, UErrorCode& status); void init(const PluralRules* rules, UPluralType type, UErrorCode& statu s);
/** /**
* Copies dynamically allocated values (pointer fields). * Copies dynamically allocated values (pointer fields).
* Others are copied using their copy constructors and assignment opera tors. * Others are copied using their copy constructors and assignment opera tors.
*/ */
void copyObjects(const PluralFormat& other); void copyObjects(const PluralFormat& other);
/** /**
* Finds the PluralFormat sub-message for the given number, or the "oth er" sub-message. * Finds the PluralFormat sub-message for the given number, or the "oth er" sub-message.
* @param pattern A MessagePattern. * @param pattern A MessagePattern.
* @param partIndex the index of the first PluralFormat argument style part. * @param partIndex the index of the first PluralFormat argument style part.
 End of changes. 9 change blocks. 
9 lines changed or deleted 49 lines changed or added


 plurrule.h   plurrule.h 
skipping to change at line 29 skipping to change at line 29
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \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"
#include "unicode/upluralrules.h"
/** /**
* Value returned by PluralRules::getUniqueKeywordValue() when there is no * Value returned by PluralRules::getUniqueKeywordValue() when there is no
* unique value to return. * unique value to return.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
#define UPLRULES_NO_UNIQUE_VALUE ((double)-0.00123456777) #define UPLRULES_NO_UNIQUE_VALUE ((double)-0.00123456777)
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
skipping to change at line 186 skipping to change at line 187
* The default rules that accept any number. * The default rules that accept any number.
* *
* @param status Output param set to success/failure code on exit, whi ch * @param status Output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @return new PluralRules pointer. NULL if there is an error. * @return new PluralRules pointer. NULL if there is an error.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status); static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status);
/** /**
* Provides access to the predefined <code>PluralRules</code> for a giv en * Provides access to the predefined cardinal-number <code>PluralRules< /code> for a given
* locale. * locale.
* Same as forLocale(locale, UPLURAL_TYPE_CARDINAL, status).
* *
* @param locale The locale for which a <code>PluralRules</code> objec t is * @param locale The locale for which a <code>PluralRules</code> objec t is
* returned. * returned.
* @param status Output param set to success/failure code on exit, whi ch * @param status Output param set to success/failure code on exit, whi ch
* must not indicate a failure before the function call. * must not indicate a failure before the function call.
* @return The predefined <code>PluralRules</code> object pointe r for * @return The predefined <code>PluralRules</code> object pointe r for
* this locale. If there's no predefined rules for this locale, * this locale. If there's no predefined rules for this locale,
* the rules for the closest parent in the locale hierar chy * the rules for the closest parent in the locale hierar chy
* that has one will be returned. The final fallback a lways * that has one will be returned. The final fallback a lways
* returns the default 'other' rules. * returns the default 'other' rules.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCod e& status); static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCod e& status);
/** /**
* Provides access to the predefined <code>PluralRules</code> for a giv
en
* locale and the plural type.
*
* @param locale The locale for which a <code>PluralRules</code> objec
t is
* returned.
* @param type The plural type (e.g., cardinal or ordinal).
* @param status Output param set to success/failure code on exit, whi
ch
* must not indicate a failure before the function call.
* @return The predefined <code>PluralRules</code> object pointe
r for
* this locale. If there's no predefined rules for this
locale,
* the rules for the closest parent in the locale hierar
chy
* that has one will be returned. The final fallback a
lways
* returns the default 'other' rules.
* @draft ICU 50
*/
static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralTy
pe type, UErrorCode& status);
/**
* Given a number, returns the keyword of the first rule that applies t o * Given a number, returns the keyword of the first rule that applies t o
* the number. This function can be used with isKeyword* functions to * the number. This function can be used with isKeyword* functions to
* determine the keyword for default plural rules. * determine the keyword for default plural rules.
* *
* @param number The number for which the rule has to be determined. * @param number The number for which the rule has to be determined.
* @return The keyword of the selected rule. * @return The keyword of the selected rule.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
UnicodeString select(int32_t number) const; UnicodeString select(int32_t number) const;
skipping to change at line 359 skipping to change at line 379
double *mSamples; double *mSamples;
int32_t *mSampleInfo; int32_t *mSampleInfo;
int32_t mSampleInfoCount; 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, UPluralType typ e, UErrorCode& status);
static const int32_t MAX_SAMPLES = 3; static const int32_t MAX_SAMPLES = 3;
int32_t getSamplesInternal(const UnicodeString &keyword, double *dest, int32_t getSamplesInternal(const UnicodeString &keyword, double *dest,
int32_t destCapacity, UBool includeUnlimited , int32_t destCapacity, UBool includeUnlimited ,
UErrorCode& status); UErrorCode& status);
int32_t getKeywordIndex(const UnicodeString& keyword, int32_t getKeywordIndex(const UnicodeString& keyword,
UErrorCode& status) const; UErrorCode& status) const;
void initSamples(UErrorCode& status); void initSamples(UErrorCode& status);
 End of changes. 5 change blocks. 
2 lines changed or deleted 30 lines changed or added


 ptypes.h   ptypes.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* FILE NAME : ptypes.h * FILE NAME : ptypes.h
* *
* Date Name Description * Date Name Description
* 05/13/98 nos Creation (content moved here from ptypes.h). * 05/13/98 nos Creation (content moved here from ptypes.h).
* 03/02/99 stephen Added AS400 support. * 03/02/99 stephen Added AS400 support.
* 03/30/99 stephen Added Linux support. * 03/30/99 stephen Added Linux support.
* 04/13/99 stephen Reworked for autoconf. * 04/13/99 stephen Reworked for autoconf.
* 09/18/08 srl Moved basic types back to ptypes.h from platfor m.h * 09/18/08 srl Moved basic types back to ptypes.h from platfor m.h
*************************************************************************** *** *************************************************************************** ***
*/ */
/**
* \file
* \brief C API: Definitions of integer types of various widths
*/
#ifndef _PTYPES_H #ifndef _PTYPES_H
#define _PTYPES_H #define _PTYPES_H
/** /**
* \def __STDC_LIMIT_MACROS * \def __STDC_LIMIT_MACROS
* According to the Linux stdint.h, the ISO C99 standard specifies that in C++ implementations * According to the Linux stdint.h, the ISO C99 standard specifies that in C++ implementations
* macros like INT32_MIN and UINTPTR_MAX should only be defined if explicit ly requested. * macros like INT32_MIN and UINTPTR_MAX should only be defined if explicit ly requested.
* We need to define __STDC_LIMIT_MACROS before including stdint.h in C++ c ode * We need to define __STDC_LIMIT_MACROS before including stdint.h in C++ c ode
* that uses such limit macros. * that uses such limit macros.
* @internal * @internal
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added


 smpdtfmt.h   smpdtfmt.h 
skipping to change at line 37 skipping to change at line 37
#include "unicode/utypes.h" #include "unicode/utypes.h"
/** /**
* \file * \file
* \brief C++ API: Format and parse dates in a language-independent manner. * \brief C++ API: Format and parse dates in a language-independent manner.
*/ */
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/datefmt.h" #include "unicode/datefmt.h"
#include "unicode/udisplaycontext.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; class TimeZoneFormat;
/** /**
skipping to change at line 84 skipping to change at line 85
* u extended year (Number) 4601 * u extended year (Number) 4601
* U cyclic year name (Text,NumFallback) ren-chen (29) * U cyclic year name (Text,NumFallback) ren-chen (29)
* Q Quarter (Text & Number) Q2 & 02 * Q Quarter (Text & Number) Q2 & 02
* M month in year (Text & Number) July & 07 * M month in year (Text & Number) July & 07
* d day in month (Number) 10 * d day in month (Number) 10
* h hour in am/pm (1~12) (Number) 12 * h hour in am/pm (1~12) (Number) 12
* H hour in day (0~23) (Number) 0 * H hour in day (0~23) (Number) 0
* m minute in hour (Number) 30 * m minute in hour (Number) 30
* s second in minute (Number) 55 * s second in minute (Number) 55
* S fractional second (Number) 978 * S fractional second (Number) 978
* (maximum resolution of SSS; truncated if shorter, zero-padded i f longer)
* E day of week (Text) Tuesday * E day of week (Text) Tuesday
* e day of week (local 1~7) (Text & Number) Tues & 2 * e day of week (local 1~7) (Text & Number) Tues & 2
* D day in year (Number) 189 * D day in year (Number) 189
* F day of week in month (Number) 2 (2nd Wed in July) * F day of week in month (Number) 2 (2nd Wed in July)
* w week in year (Number) 27 * w week in year (Number) 27
* W week in month (Number) 2 * W week in month (Number) 2
* a am/pm marker (Text) PM * a am/pm marker (Text) PM
* k hour in day (1~24) (Number) 24 * k hour in day (1~24) (Number) 24
* K hour in am/pm (0~11) (Number) 0 * K hour in am/pm (0~11) (Number) 0
* z time zone (Text) PST * z time zone (Text) PST
skipping to change at line 402 skipping to change at line 404
* Result is appended to existing contents. * Result is appended to existing contents.
* @param pos The formatting position. On input: an alignment fie ld, * @param pos The formatting position. On input: an alignment fie ld,
* if desired. On output: the offsets of the alignment field. * if desired. On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
virtual UnicodeString& format( Calendar& cal, virtual UnicodeString& format( Calendar& cal,
UnicodeString& appendTo, UnicodeString& appendTo,
FieldPosition& pos) const; FieldPosition& pos) const;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since
it is virtual */
/**
* Format a date or time, which is the standard millis since 24:00 GMT,
Jan
* 1, 1970. Overrides DateFormat pure virtual method.
* <P>
* Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
* 1996.07.10 AD at 15:08:56 PDT
*
* @param cal Calendar set to the date and time to be formatted
* into a date/time string.
* @param types Array of UDateFormatContextTypes for which the corr
esponding
* value specified in the next parameter should overri
de the
* formatter's default value for this call (this does
not
* change the default value).
* @param values Array of UDateFormatContextValues corresponding 1-1
to the
* UDateFormatContextTypes in the previous parameter.
* @param typesAndValuesCount Number of elements in the types and value
s
* arrays.
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
* @param pos The formatting position. On input: an alignment fie
ld,
* if desired. On output: the offsets of the alignment
field.
* @return Reference to 'appendTo' parameter.
* @draft ICU 49
*/
virtual UnicodeString& format( Calendar& cal,
const UDateFormatContextType* types,
const UDateFormatContextValue* values,
int32_t typesAndValuesCount,
UnicodeString& appendTo,
FieldPosition& pos) const;
/** /**
* Format a date or time, which is the standard millis since 24:00 GMT, Jan * Format a date or time, which is the standard millis since 24:00 GMT, Jan
* 1, 1970. Overrides DateFormat pure virtual method. * 1, 1970. Overrides DateFormat pure virtual method.
* <P> * <P>
* Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->>
* 1996.07.10 AD at 15:08:56 PDT * 1996.07.10 AD at 15:08:56 PDT
* *
* @param cal Calendar set to the date and time to be formatted * @param cal Calendar set to the date and time to be formatted
* into a date/time string. * into a date/time string.
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
skipping to change at line 584 skipping to change at line 554
* on output to the parsed date/time. When the calendar ty pe is * on output to the parsed date/time. When the calendar ty pe is
* different from the internal calendar held by this Simpl eDateFormat * different from the internal calendar held by this Simpl eDateFormat
* instance, the internal calendar will be cloned to a wor k * instance, the internal calendar will be cloned to a wor k
* calendar set to the same milliseconds and time zone as the * calendar set to the same milliseconds and time zone as the
* cal parameter, field values will be parsed based on the work * cal parameter, field values will be parsed based on the work
* calendar, then the result (milliseconds and time zone) will * calendar, then the result (milliseconds and time zone) will
* be set in this calendar. * be set in this calendar.
* @param pos On input, the position at which to start parsing; on * @param pos On input, the position at which to start parsing; on
* output, the position at which parsing terminated, or th e * output, the position at which parsing terminated, or th e
* start position if the parse failed. * start position if the parse failed.
* @return A valid UDate if the input could be parsed.
* @stable ICU 2.1 * @stable ICU 2.1
*/ */
virtual void parse( const UnicodeString& text, virtual void parse( const UnicodeString& text,
Calendar& cal, Calendar& cal,
ParsePosition& pos) const; ParsePosition& pos) const;
/** /**
* Parse a date/time string starting at the given parse position. For * Parse a date/time string starting at the given parse position. For
* example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da te
* that is equivalent to Date(837039928046). * that is equivalent to Date(837039928046).
skipping to change at line 807 skipping to change at line 776
* Set the calendar to be used by this date format. Initially, the defa ult * Set the calendar to be used by this date format. Initially, the defa ult
* calendar for the specified or default locale is used. The caller sh ould * calendar for the specified or default locale is used. The caller sh ould
* not delete the Calendar object after it is adopted by this call. * not delete the Calendar object after it is adopted by this call.
* Adopting a new calendar will change to the default symbols. * Adopting a new calendar will change to the default symbols.
* *
* @param calendarToAdopt Calendar object to be adopted. * @param calendarToAdopt Calendar object to be adopted.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void adoptCalendar(Calendar* calendarToAdopt); virtual void adoptCalendar(Calendar* calendarToAdopt);
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */ /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following draft metho d since it is virtual */
/** /**
* Set the formatter's default value for a particular context type, * Set a particular UDisplayContext value in the formatter, such as
* such as UDAT_CAPITALIZATION. * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
* @param type The context type for which the default value should be s * @param value The UDisplayContext value to set.
et.
* @param value The default value to set for the specified context type
.
* @param status Input/output status. If at entry this indicates a fail ure * @param status Input/output status. If at entry this indicates a fail ure
* status, the function will do nothing; otherwise this w ill be * status, the function will do nothing; otherwise this w ill be
* updated with any new status from the function. * updated with any new status from the function.
* @draft ICU 49 * @internal ICU 50 technology preview
*/ */
virtual void setDefaultContext(UDateFormatContextType type, UDateFormat virtual void setContext(UDisplayContext value, UErrorCode& status);
ContextValue value,
UErrorCode& status);
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */ /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following draft metho d since it is virtual */
/** /**
* Get the formatter's default value for a particular context type, * Get the formatter's UDisplayContext value for the specified UDisplay
* such as UDAT_CAPITALIZATION. ContextType,
* @param type The context type for which the default value should be o * such as UDISPCTX_TYPE_CAPITALIZATION.
btained. * @param type The UDisplayContextType whose value to return
* @param status Input/output status. If at entry this indicates a fail ure * @param status Input/output status. If at entry this indicates a fail ure
* status, the function will do nothing; otherwise this w ill be * status, the function will do nothing; otherwise this w ill be
* updated with any new status from the function. * updated with any new status from the function.
* @return The current default value for the specified context type. * @return The UDisplayContextValue for the specified type.
* @draft ICU 49 * @internal ICU 50 technology preview
*/ */
virtual int32_t getDefaultContext(UDateFormatContextType type, UErrorCo de& status) const; virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode & status) const;
#ifndef U_HIDE_INTERNAL_API /* Cannot use #ifndef U_HIDE_INTERNAL_API for the following methods sin ce they are virtual */
/** /**
* Sets the TimeZoneFormat to be used by this date/time formatter. * Sets the TimeZoneFormat to be used by this date/time formatter.
* The caller should not delete the TimeZoneFormat object after * The caller should not delete the TimeZoneFormat object after
* it is adopted by this call. * it is adopted by this call.
* @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted . * @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted .
* @internal ICU 49 technology preview * @internal ICU 49 technology preview
*/ */
virtual void adoptTimeZoneFormat(TimeZoneFormat* timeZoneFormatToAdopt) ; virtual void adoptTimeZoneFormat(TimeZoneFormat* timeZoneFormatToAdopt) ;
/** /**
skipping to change at line 857 skipping to change at line 824
* @internal ICU 49 technology preview * @internal ICU 49 technology preview
*/ */
virtual void setTimeZoneFormat(const TimeZoneFormat& newTimeZoneFormat) ; virtual void setTimeZoneFormat(const TimeZoneFormat& newTimeZoneFormat) ;
/** /**
* Gets the time zone format object associated with this date/time form atter. * Gets the time zone format object associated with this date/time form atter.
* @return the time zone format associated with this date/time formatte r. * @return the time zone format associated with this date/time formatte r.
* @internal ICU 49 technology preview * @internal ICU 49 technology preview
*/ */
virtual const TimeZoneFormat* getTimeZoneFormat(void) const; virtual const TimeZoneFormat* getTimeZoneFormat(void) const;
#endif /* U_HIDE_INTERNAL_API */
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
/** /**
* This is for ICU internal use only. Please do not use. * This is for ICU internal use only. Please do not use.
* Check whether the 'field' is smaller than all the fields covered in * Check whether the 'field' is smaller than all the fields covered in
* pattern, return TRUE if it is. The sequence of calendar field, * pattern, return TRUE if it is. The sequence of calendar field,
* from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE, ... * from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE, ...
* @param field the calendar field need to check against * @param field the calendar field need to check against
* @return TRUE if the 'field' is smaller than all the fields * @return TRUE if the 'field' is smaller than all the fields
* covered in pattern. FALSE otherwise. * covered in pattern. FALSE otherwise.
skipping to change at line 927 skipping to change at line 893
* This is an internal method, called by DateFormat. It should never f ail. * This is an internal method, called by DateFormat. It should never f ail.
* @param locale the given locale. * @param locale the given locale.
* @param status Output param set to success/failure code on * @param status Output param set to success/failure code on
* exit. * exit.
*/ */
SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use defa ult pattern SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use defa ult pattern
/** /**
* Hook called by format(... FieldPosition& ...) and format(...FieldPos itionIterator&...) * Hook called by format(... FieldPosition& ...) and format(...FieldPos itionIterator&...)
*/ */
UnicodeString& _format(Calendar& cal, UDateFormatContextValue capitaliz UnicodeString& _format(Calendar& cal, UnicodeString& appendTo, FieldPos
ationContext, itionHandler& handler, UErrorCode& status) const;
UnicodeString& appendTo, FieldPositionHandler& h
andler, UErrorCode& status) const;
/** /**
* Called by format() to format a single field. * Called by format() to format a single field.
* *
* @param appendTo Output parameter to receive result. * @param appendTo Output parameter to receive result.
* Result is appended to existing contents. * Result is appended to existing contents.
* @param ch The format character we encountered in the pattern. * @param ch The format character we encountered in the pattern.
* @param count Number of characters in the current pattern symbol (e.g., * @param count Number of characters in the current pattern symbol (e.g.,
* "yyyy" in the pattern would result in a call to thi s function * "yyyy" in the pattern would result in a call to thi s function
* with ch equal to 'y' and count equal to 4) * with ch equal to 'y' and count equal to 4)
* @param capitalizationContext Capitalization context for this date fo rmat. * @param capitalizationContext Capitalization context for this date fo rmat.
* @param fieldNum Zero-based numbering of current field within the ov erall format. * @param fieldNum Zero-based numbering of current field within the ov erall format.
* @param handler Records information about field positions. * @param handler Records information about field positions.
* @param cal Calendar to use * @param cal Calendar to use
* @param status Receives a status code, which will be U_ZERO_ERROR if the operation * @param status Receives a status code, which will be U_ZERO_ERROR if the operation
* succeeds. * succeeds.
*/ */
void subFormat(UnicodeString &appendTo, void subFormat(UnicodeString &appendTo,
UChar ch, UChar ch,
int32_t count, int32_t count,
UDateFormatContextValue capitalizationContext, UDisplayContext capitalizationContext,
int32_t fieldNum, int32_t fieldNum,
FieldPositionHandler& handler, FieldPositionHandler& handler,
Calendar& cal, Calendar& cal,
UErrorCode& status) const; // in case of illegal argumen t UErrorCode& status) const; // in case of illegal argumen t
/** /**
* Used by subFormat() to format a numeric value. * Used by subFormat() to format a numeric value.
* Appends to toAppendTo a string representation of "value" * Appends to toAppendTo a string representation of "value"
* having a number of digits between "minDigits" and * having a number of digits between "minDigits" and
* "maxDigits". Uses the DateFormat's NumberFormat. * "maxDigits". Uses the DateFormat's NumberFormat.
skipping to change at line 1253 skipping to change at line 1218
int32_t hash; int32_t hash;
NSOverride *next; NSOverride *next;
} NSOverride; } NSOverride;
NumberFormat **fNumberFormatters; NumberFormat **fNumberFormatters;
NSOverride *fOverrideList; NSOverride *fOverrideList;
UBool fHaveDefaultCentury; UBool fHaveDefaultCentury;
UDateFormatContextValue fDefaultCapitalizationContext; UDisplayContext fCapitalizationContext;
}; };
inline UDate inline UDate
SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const
{ {
return fDefaultCenturyStart; return fDefaultCenturyStart;
} }
inline UnicodeString& inline UnicodeString&
SimpleDateFormat::format(const Formattable& obj, SimpleDateFormat::format(const Formattable& obj,
 End of changes. 17 change blocks. 
69 lines changed or deleted 21 lines changed or added


 sortkey.h   sortkey.h 
/* /*
************************************************************************** *** ************************************************************************** ***
* Copyright (C) 1996-2011, International Business Machines Corporation and others. * Copyright (C) 1996-2012, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
************************************************************************** *** ************************************************************************** ***
* *
* 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 95 skipping to change at line 95
* CollationKeys for the same set of strings. Locales have specific * CollationKeys for the same set of strings. Locales have specific
* collation rules, and the way in which secondary and tertiary differences * collation rules, and the way in which secondary and tertiary differences
* are taken into account, for example, will result in different CollationK eys * are taken into account, for example, will result in different CollationK eys
* for same strings. * for same strings.
* <p> * <p>
* @see Collator * @see Collator
* @see RuleBasedCollator * @see RuleBasedCollator
* @version 1.3 12/18/96 * @version 1.3 12/18/96
* @author Helena Shih * @author Helena Shih
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
class U_I18N_API CollationKey : public UObject { class U_I18N_API CollationKey : public UObject {
public: public:
/** /**
* This creates an empty collation key based on the null string. An emp ty * This creates an empty collation key based on the null string. An emp ty
* collation key contains no sorting information. When comparing two em pty * collation key contains no sorting information. When comparing two em pty
* collation keys, the result is Collator::EQUAL. Comparing empty colla tion key * collation keys, the result is Collator::EQUAL. Comparing empty colla tion key
* with non-empty collation key is always Collator::LESS. * with non-empty collation key is always Collator::LESS.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
CollationKey(); CollationKey();
/** /**
* Creates a collation key based on the collation key values. * Creates a collation key based on the collation key values.
* @param values the collation key values * @param values the collation key values
* @param count number of collation key values, including trailing nulls . * @param count number of collation key values, including trailing nulls .
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
CollationKey(const uint8_t* values, CollationKey(const uint8_t* values,
int32_t count); int32_t count);
/** /**
* Copy constructor. * Copy constructor.
* @param other the object to be copied. * @param other the object to be copied.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
CollationKey(const CollationKey& other); CollationKey(const CollationKey& other);
/** /**
* Sort key destructor. * Sort key destructor.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
virtual ~CollationKey(); virtual ~CollationKey();
/** /**
* Assignment operator * Assignment operator
* @param other the object to be copied. * @param other the object to be copied.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
const CollationKey& operator=(const CollationKey& other); const CollationKey& operator=(const CollationKey& other);
/** /**
* Compare if two collation keys are the same. * Compare if two collation keys are the same.
* @param source the collation key to compare to. * @param source the collation key to compare to.
* @return Returns true if two collation keys are equal, false otherwise . * @return Returns true if two collation keys are equal, false otherwise .
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
UBool operator==(const CollationKey& source) const; UBool operator==(const CollationKey& source) const;
/** /**
* Compare if two collation keys are not the same. * Compare if two collation keys are not the same.
* @param source the collation key to compare to. * @param source the collation key to compare to.
* @return Returns TRUE if two collation keys are different, FALSE other wise. * @return Returns TRUE if two collation keys are different, FALSE other wise.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
UBool operator!=(const CollationKey& source) const; UBool operator!=(const CollationKey& source) const;
/** /**
* Test to see if the key is in an invalid state. The key will be in an * Test to see if the key is in an invalid state. The key will be in an
* invalid state if it couldn't allocate memory for some operation. * invalid state if it couldn't allocate memory for some operation.
* @return Returns TRUE if the key is in an invalid, FALSE otherwise. * @return Returns TRUE if the key is in an invalid, FALSE otherwise.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
UBool isBogus(void) const; UBool isBogus(void) const;
/** /**
* Returns a pointer to the collation key values. The storage is owned * Returns a pointer to the collation key values. The storage is owned
* by the collation key and the pointer will become invalid if the key * by the collation key and the pointer will become invalid if the key
* is deleted. * is deleted.
* @param count the output parameter of number of collation key values, * @param count the output parameter of number of collation key values,
* including any trailing nulls. * including any trailing nulls.
* @return a pointer to the collation key values. * @return a pointer to the collation key values.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
const uint8_t* getByteArray(int32_t& count) const; const uint8_t* getByteArray(int32_t& count) const;
#ifdef U_USE_COLLATION_KEY_DEPRECATES #ifdef U_USE_COLLATION_KEY_DEPRECATES
/** /**
* Extracts the collation key values into a new array. The caller owns * Extracts the collation key values into a new array. The caller owns
* this storage and should free it. * this storage and should free it.
* @param count the output parameter of number of collation key values, * @param count the output parameter of number of collation key values,
* including any trailing nulls. * including any trailing nulls.
* @obsolete ICU 2.6. Use getByteArray instead since this API will be re moved in that release. * @obsolete ICU 2.6. Use getByteArray instead since this API will be re moved in that release.
skipping to change at line 202 skipping to change at line 202
Collator::EComparisonResult compareTo(const CollationKey& target) const ; Collator::EComparisonResult compareTo(const CollationKey& target) const ;
/** /**
* Convenience method which does a string(bit-wise) comparison of the * Convenience method which does a string(bit-wise) comparison of the
* two collation keys. * two collation keys.
* @param target target collation key to be compared with * @param target target collation key to be compared with
* @param status error code * @param status error code
* @return Returns UCOL_LESS if sourceKey &lt; targetKey, * @return Returns UCOL_LESS if sourceKey &lt; targetKey,
* UCOL_GREATER if sourceKey > targetKey and UCOL_EQUAL * UCOL_GREATER if sourceKey > targetKey and UCOL_EQUAL
* otherwise. * otherwise.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.6
*/ */
UCollationResult compareTo(const CollationKey& target, UErrorCode &stat us) const; UCollationResult compareTo(const CollationKey& target, UErrorCode &stat us) const;
/** /**
* Creates an integer that is unique to the collation key. NOTE: this * Creates an integer that is unique to the collation key. NOTE: this
* is not the same as String.hashCode. * is not the same as String.hashCode.
* <p>Example of use: * <p>Example of use:
* <pre> * <pre>
* . UErrorCode status = U_ZERO_ERROR; * . UErrorCode status = U_ZERO_ERROR;
* . Collator *myCollation = Collator::createInstance(Locale::US, sta tus); * . Collator *myCollation = Collator::createInstance(Locale::US, sta tus);
skipping to change at line 224 skipping to change at line 224
* . CollationKey key1, key2; * . CollationKey key1, key2;
* . UErrorCode status1 = U_ZERO_ERROR, status2 = U_ZERO_ERROR; * . UErrorCode status1 = U_ZERO_ERROR, status2 = U_ZERO_ERROR;
* . myCollation->getCollationKey("abc", key1, status1); * . myCollation->getCollationKey("abc", key1, status1);
* . if (U_FAILURE(status1)) { delete myCollation; return; } * . if (U_FAILURE(status1)) { delete myCollation; return; }
* . myCollation->getCollationKey("ABC", key2, status2); * . myCollation->getCollationKey("ABC", key2, status2);
* . if (U_FAILURE(status2)) { delete myCollation; return; } * . if (U_FAILURE(status2)) { delete myCollation; return; }
* . // key1.hashCode() != key2.hashCode() * . // key1.hashCode() != key2.hashCode()
* </pre> * </pre>
* @return the hash value based on the string's collation order. * @return the hash value based on the string's collation order.
* @see UnicodeString#hashCode * @see UnicodeString#hashCode
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.0
*/ */
int32_t hashCode(void) const; int32_t hashCode(void) const;
/** /**
* ICU "poor man's RTTI", returns a UClassID for the actual class. * ICU "poor man's RTTI", returns a UClassID for the actual class.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.2
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
/** /**
* ICU "poor man's RTTI", returns a UClassID for this class. * ICU "poor man's RTTI", returns a UClassID for this class.
* @deprecated ICU 2.8 Use Collator::getSortKey(...) instead * @stable ICU 2.2
*/ */
static UClassID U_EXPORT2 getStaticClassID(); static UClassID U_EXPORT2 getStaticClassID();
private: private:
/** /**
* Returns an array of the collation key values as 16-bit integers. * Replaces the current bytes buffer with a new one of newCapacity
* The caller owns the storage and must delete it. * and copies length bytes from the old buffer to the new one.
* @param values Output param of the collation key values. * @return the new buffer, or NULL if the allocation failed
* @param capacity Size of the values array. */
* @param count output parameter of the number of collation key values uint8_t *reallocate(int32_t newCapacity, int32_t length);
* @return a pointer to an array of 16-bit collation key values.
*/
void adopt(uint8_t *values, int32_t capacity, int32_t count);
/** /**
* Set a new length for a new sort key in the existing fBytes. * Set a new length for a new sort key in the existing fBytes.
*/ */
void setLength(int32_t newLength); void setLength(int32_t newLength);
/* uint8_t *getBytes() {
* Creates a collation key with a string. return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields
*/ .fBytes;
}
const uint8_t *getBytes() const {
return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields
.fBytes;
}
int32_t getCapacity() const {
return (fFlagAndLength >= 0) ? (int32_t)sizeof(fUnion) : fUnion.fFi
elds.fCapacity;
}
int32_t getLength() const { return fFlagAndLength & 0x7fffffff; }
/** /**
* If this CollationKey has capacity less than newSize,
* its internal capacity will be increased to newSize.
* @param newSize minimum size this CollationKey has to have
* @return this CollationKey
*/
CollationKey& ensureCapacity(int32_t newSize);
/**
* Set the CollationKey to a "bogus" or invalid state * Set the CollationKey to a "bogus" or invalid state
* @return this CollationKey * @return this CollationKey
*/ */
CollationKey& setToBogus(void); CollationKey& setToBogus(void);
/** /**
* Resets this CollationKey to an empty state * Resets this CollationKey to an empty state
* @return this CollationKey * @return this CollationKey
*/ */
CollationKey& reset(void); CollationKey& reset(void);
/** /**
* Allow private access to RuleBasedCollator * Allow private access to RuleBasedCollator
*/ */
friend class RuleBasedCollator; friend class RuleBasedCollator;
friend class CollationKeyByteSink;
// Class fields. sizeof(CollationKey) is intended to be 48 bytes
// on a machine with 64-bit pointers.
// We use a union to maximize the size of the internal buffer,
// similar to UnicodeString but not as tight and complex.
// (implicit) *vtable;
/**
* Sort key length and flag.
* Bit 31 is set if the buffer is heap-allocated.
* Bits 30..0 contain the sort key length.
*/
int32_t fFlagAndLength;
/** /**
* Bogus status * Unique hash value of this CollationKey.
*/ * Special value 2 if the key is bogus.
UBool fBogus;
/**
* Size of fBytes used to store the sortkey. i.e. up till the
* null-termination.
*/
int32_t fCount;
/**
* Full size of the fBytes
*/
int32_t fCapacity;
/**
* Unique hash value of this CollationKey
*/ */
int32_t fHashCode; mutable int32_t fHashCode;
/** /**
* Array to store the sortkey * fUnion provides 32 bytes for the internal buffer or for
*/ * pointer+capacity.
uint8_t* fBytes; */
union StackBufferOrFields {
/** fStackBuffer is used iff fFlagAndLength>=0, else fFields is use
d */
uint8_t fStackBuffer[32];
struct {
uint8_t *fBytes;
int32_t fCapacity;
} fFields;
} fUnion;
}; };
inline UBool inline UBool
CollationKey::operator!=(const CollationKey& other) const CollationKey::operator!=(const CollationKey& other) const
{ {
return !(*this == other); return !(*this == other);
} }
inline UBool inline UBool
CollationKey::isBogus() const CollationKey::isBogus() const
{ {
return fBogus; return fHashCode == 2; // kBogusHashCode
} }
inline const uint8_t* inline const uint8_t*
CollationKey::getByteArray(int32_t &count) const CollationKey::getByteArray(int32_t &count) const
{ {
count = fCount; count = getLength();
return fBytes; return getBytes();
} }
U_NAMESPACE_END U_NAMESPACE_END
#endif /* U_HIDE_DEPRECATED_API */ #endif /* U_HIDE_DEPRECATED_API */
#endif /* #if !UCONFIG_NO_COLLATION */ #endif /* #if !UCONFIG_NO_COLLATION */
#endif #endif
 End of changes. 24 change blocks. 
55 lines changed or deleted 65 lines changed or added


 strenum.h   strenum.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2002-2007, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef STRENUM_H #ifndef STRENUM_H
#define STRENUM_H #define STRENUM_H
#include "unicode/uobject.h" #include "unicode/uobject.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
skipping to change at line 121 skipping to change at line 121
* to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p> * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p>
* *
* <p>If the native service string is a UChar* string, it is * <p>If the native service string is a UChar* string, it is
* converted to char* with the invariant converter. If the * converted to char* with the invariant converter. If the
* conversion fails (because a character cannot be converted) then * conversion fails (because a character cannot be converted) then
* status is set to U_INVARIANT_CONVERSION_ERROR and the return * status is set to U_INVARIANT_CONVERSION_ERROR and the return
* value is undefined (though not NULL).</p> * value is undefined (though not NULL).</p>
* *
* Starting with ICU 2.8, the default implementation calls snext() * Starting with ICU 2.8, the default implementation calls snext()
* and handles the conversion. * and handles the conversion.
* Either next() or snext() must be implemented differently by a subcla ss.
* *
* @param status the error code. * @param status the error code.
* @param resultLength a pointer to receive the length, can be NULL. * @param resultLength a pointer to receive the length, can be NULL.
* @return a pointer to the string, or NULL. * @return a pointer to the string, or NULL.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
virtual const char* next(int32_t *resultLength, UErrorCode& status); virtual const char* next(int32_t *resultLength, UErrorCode& status);
/** /**
skipping to change at line 166 skipping to change at line 167
* <p>Returns the next element a UnicodeString*. If there are no * <p>Returns the next element a UnicodeString*. If there are no
* more elements, returns NULL.</p> * more elements, returns NULL.</p>
* *
* <p>The returned pointer is owned by this iterator and must not be * <p>The returned pointer is owned by this iterator and must not be
* deleted by the caller. The pointer is valid until the next call * deleted by the caller. The pointer is valid until the next call
* to next, unext, snext, reset, or the enumerator's destructor.</p> * to next, unext, snext, reset, or the enumerator's destructor.</p>
* *
* <p>If the iterator is out of sync with its service, status is set * <p>If the iterator is out of sync with its service, status is set
* to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p> * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p>
* *
* Starting with ICU 2.8, the default implementation calls next()
* and handles the conversion.
* Either next() or snext() must be implemented differently by a subcla
ss.
*
* @param status the error code. * @param status the error code.
* @return a pointer to the string, or NULL. * @return a pointer to the string, or NULL.
* *
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
virtual const UnicodeString* snext(UErrorCode& status) = 0; virtual const UnicodeString* snext(UErrorCode& status);
/** /**
* <p>Resets the iterator. This re-establishes sync with the * <p>Resets the iterator. This re-establishes sync with the
* service and rewinds the iterator to start at the first * service and rewinds the iterator to start at the first
* element.</p> * element.</p>
* *
* <p>Previous pointers returned by next, unext, or snext become * <p>Previous pointers returned by next, unext, or snext become
* invalid, and the value returned by count might change.</p> * invalid, and the value returned by count might change.</p>
* *
* @param status the error code. * @param status the error code.
 End of changes. 4 change blocks. 
2 lines changed or deleted 8 lines changed or added


 stringtriebuilder.h   stringtriebuilder.h 
skipping to change at line 21 skipping to change at line 21
* created on: 2010dec24 * created on: 2010dec24
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
#ifndef __STRINGTRIEBUILDER_H__ #ifndef __STRINGTRIEBUILDER_H__
#define __STRINGTRIEBUILDER_H__ #define __STRINGTRIEBUILDER_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uobject.h" #include "unicode/uobject.h"
/**
* \file
* \brief C++ API: Builder API for trie builders
*/
// Forward declaration. // Forward declaration.
struct UHashtable; struct UHashtable;
typedef struct UHashtable UHashtable; typedef struct UHashtable UHashtable;
/** /**
* Build options for BytesTrieBuilder and CharsTrieBuilder. * Build options for BytesTrieBuilder and CharsTrieBuilder.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
enum UStringTrieBuildOption { enum UStringTrieBuildOption {
/** /**
skipping to change at line 258 skipping to change at line 263
/** @internal */ /** @internal */
class FinalValueNode : public Node { class FinalValueNode : public Node {
public: public:
FinalValueNode(int32_t v) : Node(0x111111*37+v), value(v) {} FinalValueNode(int32_t v) : Node(0x111111*37+v), value(v) {}
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
virtual void write(StringTrieBuilder &builder); virtual void write(StringTrieBuilder &builder);
protected: protected:
int32_t value; int32_t value;
}; };
/** @internal */ /**
* @internal
*/
class ValueNode : public Node { class ValueNode : public Node {
public: public:
ValueNode(int32_t initialHash) : Node(initialHash), hasValue(FALSE) , value(0) {} ValueNode(int32_t initialHash) : Node(initialHash), hasValue(FALSE) , value(0) {}
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
void setValue(int32_t v) { void setValue(int32_t v) {
hasValue=TRUE; hasValue=TRUE;
value=v; value=v;
hash=hash*37+v; hash=hash*37+v;
} }
protected: protected:
UBool hasValue; UBool hasValue;
int32_t value; int32_t value;
}; };
/** @internal */ /**
* @internal
*/
class IntermediateValueNode : public ValueNode { class IntermediateValueNode : public ValueNode {
public: public:
IntermediateValueNode(int32_t v, Node *nextNode) IntermediateValueNode(int32_t v, Node *nextNode)
: ValueNode(0x222222*37+hashCode(nextNode)), next(nextNode) { setValue(v); } : ValueNode(0x222222*37+hashCode(nextNode)), next(nextNode) { setValue(v); }
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber); virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
virtual void write(StringTrieBuilder &builder); virtual void write(StringTrieBuilder &builder);
protected: protected:
Node *next; Node *next;
}; };
/** @internal */ /**
* @internal
*/
class LinearMatchNode : public ValueNode { class LinearMatchNode : public ValueNode {
public: public:
LinearMatchNode(int32_t len, Node *nextNode) LinearMatchNode(int32_t len, Node *nextNode)
: ValueNode((0x333333*37+len)*37+hashCode(nextNode)), : ValueNode((0x333333*37+len)*37+hashCode(nextNode)),
length(len), next(nextNode) {} length(len), next(nextNode) {}
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber); virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
protected: protected:
int32_t length; int32_t length;
Node *next; Node *next;
}; };
/** @internal */ /**
* @internal
*/
class BranchNode : public Node { class BranchNode : public Node {
public: public:
BranchNode(int32_t initialHash) : Node(initialHash) {} BranchNode(int32_t initialHash) : Node(initialHash) {}
protected: protected:
int32_t firstEdgeNumber; int32_t firstEdgeNumber;
}; };
/** @internal */ /**
* @internal
*/
class ListBranchNode : public BranchNode { class ListBranchNode : public BranchNode {
public: public:
ListBranchNode() : BranchNode(0x444444), length(0) {} ListBranchNode() : BranchNode(0x444444), length(0) {}
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber); virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
virtual void write(StringTrieBuilder &builder); virtual void write(StringTrieBuilder &builder);
// Adds a unit with a final value. // Adds a unit with a final value.
void add(int32_t c, int32_t value) { void add(int32_t c, int32_t value) {
units[length]=(UChar)c; units[length]=(UChar)c;
equal[length]=NULL; equal[length]=NULL;
skipping to change at line 336 skipping to change at line 351
++length; ++length;
hash=(hash*37+c)*37+hashCode(node); hash=(hash*37+c)*37+hashCode(node);
} }
protected: protected:
Node *equal[kMaxBranchLinearSubNodeLength]; // NULL means "has fin al value". Node *equal[kMaxBranchLinearSubNodeLength]; // NULL means "has fin al value".
int32_t length; int32_t length;
int32_t values[kMaxBranchLinearSubNodeLength]; int32_t values[kMaxBranchLinearSubNodeLength];
UChar units[kMaxBranchLinearSubNodeLength]; UChar units[kMaxBranchLinearSubNodeLength];
}; };
/** @internal */ /**
* @internal
*/
class SplitBranchNode : public BranchNode { class SplitBranchNode : public BranchNode {
public: public:
SplitBranchNode(UChar middleUnit, Node *lessThanNode, Node *greater OrEqualNode) SplitBranchNode(UChar middleUnit, Node *lessThanNode, Node *greater OrEqualNode)
: BranchNode(((0x555555*37+middleUnit)*37+ : BranchNode(((0x555555*37+middleUnit)*37+
hashCode(lessThanNode))*37+hashCode(greaterOr EqualNode)), hashCode(lessThanNode))*37+hashCode(greaterOr EqualNode)),
unit(middleUnit), lessThan(lessThanNode), greaterOrEqual( greaterOrEqualNode) {} unit(middleUnit), lessThan(lessThanNode), greaterOrEqual( greaterOrEqualNode) {}
virtual UBool operator==(const Node &other) const; virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber); virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
virtual void write(StringTrieBuilder &builder); virtual void write(StringTrieBuilder &builder);
protected: protected:
 End of changes. 7 change blocks. 
6 lines changed or deleted 23 lines changed or added


 tblcoll.h   tblcoll.h 
skipping to change at line 225 skipping to change at line 225
/** /**
* Returns true if argument is the same as this object. * Returns true if argument is the same as this object.
* @param other Collator object to be compared. * @param other Collator object to be compared.
* @return true if arguments is the same as this object. * @return true if arguments is the same as this object.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual UBool operator==(const Collator& other) const; virtual UBool operator==(const Collator& other) const;
/** /**
* Returns true if argument is not the same as this object. * Makes a copy of this object.
* @param other Collator object to be compared * @return a copy of this object, owned by the caller
* @return returns true if argument is not the same as this object.
* @stable ICU 2.0
*/
virtual UBool operator!=(const Collator& other) const;
/**
* Makes a deep copy of the object.
* The caller owns the returned object.
* @return the cloned object.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual Collator* clone(void) const; virtual Collator* clone(void) const;
/** /**
* Creates a collation element iterator for the source string. The call er of * Creates a collation element iterator for the source string. The call er of
* this method is responsible for the memory management of the return * this method is responsible for the memory management of the return
* pointer. * pointer.
* @param source the string over which the CollationElementIterator wil l * @param source the string over which the CollationElementIterator wil l
* iterate. * iterate.
skipping to change at line 265 skipping to change at line 256
* method is responsible for the memory management of the returned poin ter. * method is responsible for the memory management of the returned poin ter.
* @param source the CharacterIterator which produces the characters ov er * @param source the CharacterIterator which produces the characters ov er
* which the CollationElementItgerator will iterate. * which the CollationElementItgerator will iterate.
* @return the collation element iterator of the source using this as t he * @return the collation element iterator of the source using this as t he
* based Collator. * based Collator.
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual CollationElementIterator* createCollationElementIterator( virtual CollationElementIterator* createCollationElementIterator(
const CharacterIterator& source) c onst; const CharacterIterator& source) c onst;
/** // Make deprecated versions of Collator::compare() visible.
* Compares a range of character data stored in two different strings b using Collator::compare;
ased
* on the collation rules. Returns information about whether a string i
s
* less than, greater than or equal to another string in a language.
* This can be overriden in a subclass.
* @param source the source string.
* @param target the target string to be compared with the source strin
g.
* @return the comparison result. GREATER if the source string is great
er
* than the target string, LESS if the source is less than the
* target. Otherwise, returns EQUAL.
* @deprecated ICU 2.6 Use overload with UErrorCode&
*/
virtual EComparisonResult compare(const UnicodeString& source,
const UnicodeString& target) const;
/** /**
* The comparison function compares the character data stored in two * The comparison function compares the character data stored in two
* different strings. Returns information about whether a string is less * different strings. Returns information about whether a string is less
* than, greater than or equal to another string. * than, greater than or equal to another string.
* @param source the source string to be compared with. * @param source the source string to be compared with.
* @param target the string that is to be compared with the source strin g. * @param target the string that is to be compared with the source strin g.
* @param status possible error code * @param status possible error code
* @return Returns an enum value. UCOL_GREATER if source is greater * @return Returns an enum value. UCOL_GREATER if source is greater
* than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if so urce is less * than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if so urce is less
* than target * than target
* @stable ICU 2.6 * @stable ICU 2.6
**/ **/
virtual UCollationResult compare(const UnicodeString& source, virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target, const UnicodeString& target,
UErrorCode &status) const; UErrorCode &status) const;
/** /**
* Compares a range of character data stored in two different strings b
ased
* on the collation rules up to the specified length. Returns informati
on
* about whether a string is less than, greater than or equal to anothe
r
* string in a language. This can be overriden in a subclass.
* @param source the source string.
* @param target the target string to be compared with the source strin
g.
* @param length compares up to the specified length
* @return the comparison result. GREATER if the source string is great
er
* than the target string, LESS if the source is less than the
* target. Otherwise, returns EQUAL.
* @deprecated ICU 2.6 Use overload with UErrorCode&
*/
virtual EComparisonResult compare(const UnicodeString& source,
const UnicodeString& target,
int32_t length) const;
/**
* Does the same thing as compare but limits the comparison to a specifi ed * Does the same thing as compare but limits the comparison to a specifi ed
* length * length
* @param source the source string to be compared with. * @param source the source string to be compared with.
* @param target the string that is to be compared with the source strin g. * @param target the string that is to be compared with the source strin g.
* @param length the length the comparison is limited to * @param length the length the comparison is limited to
* @param status possible error code * @param status possible error code
* @return Returns an enum value. UCOL_GREATER if source (up to the spec ified * @return Returns an enum value. UCOL_GREATER if source (up to the spec ified
* length) is greater than target; UCOL_EQUAL if source (up to s pecified * length) is greater than target; UCOL_EQUAL if source (up to s pecified
* length) is equal to target; UCOL_LESS if source (up to the sp ecified * length) is equal to target; UCOL_LESS if source (up to the sp ecified
* length) is less than target. * length) is less than target.
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
virtual UCollationResult compare(const UnicodeString& source, virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target, const UnicodeString& target,
int32_t length, int32_t length,
UErrorCode &status) const; UErrorCode &status) const;
/** /**
* The comparison function compares the character data stored in two
* different string arrays. Returns information about whether a string
array
* is less than, greater than or equal to another string array.
* <p>Example of use:
* <pre>
* . UChar ABC[] = {0x41, 0x42, 0x43, 0}; // = "ABC"
* . UChar abc[] = {0x61, 0x62, 0x63, 0}; // = "abc"
* . UErrorCode status = U_ZERO_ERROR;
* . Collator *myCollation =
* . Collator::createInstance(Locale::US, statu
s);
* . if (U_FAILURE(status)) return;
* . myCollation->setStrength(Collator::PRIMARY);
* . // result would be Collator::EQUAL ("abc" == "ABC")
* . // (no primary difference between "abc" and "ABC")
* . Collator::EComparisonResult result =
* . myCollation->compare(abc, 3, ABC, 3);
* . myCollation->setStrength(Collator::TERTIARY);
* . // result would be Collator::LESS ("abc" &lt;&lt;&lt; "ABC")
* . // (with tertiary difference between "abc" and "ABC")
* . result = myCollation->compare(abc, 3, ABC, 3);
* </pre>
* @param source the source string array to be compared with.
* @param sourceLength the length of the source string array. If this v
alue
* is equal to -1, the string array is null-terminated.
* @param target the string that is to be compared with the source stri
ng.
* @param targetLength the length of the target string array. If this v
alue
* is equal to -1, the string array is null-terminated.
* @return Returns a byte value. GREATER if source is greater than targ
et;
* EQUAL if source is equal to target; LESS if source is less t
han
* target
* @deprecated ICU 2.6 Use overload with UErrorCode&
*/
virtual EComparisonResult compare(const UChar* source, int32_t sourceLe
ngth,
const UChar* target, int32_t targetLe
ngth)
const;
/**
* The comparison function compares the character data stored in two * The comparison function compares the character data stored in two
* different string arrays. Returns information about whether a string a rray * different string arrays. Returns information about whether a string a rray
* is less than, greater than or equal to another string array. * is less than, greater than or equal to another string array.
* @param source the source string array to be compared with. * @param source the source string array to be compared with.
* @param sourceLength the length of the source string array. If this v alue * @param sourceLength the length of the source string array. If this v alue
* is equal to -1, the string array is null-terminated. * is equal to -1, the string array is null-terminated.
* @param target the string that is to be compared with the source strin g. * @param target the string that is to be compared with the source strin g.
* @param targetLength the length of the target string array. If this v alue * @param targetLength the length of the target string array. If this v alue
* is equal to -1, the string array is null-terminated. * is equal to -1, the string array is null-terminated.
* @param status possible error code * @param status possible error code
skipping to change at line 413 skipping to change at line 338
/** /**
* Transforms a specified region of the string into a series of characte rs * Transforms a specified region of the string into a series of characte rs
* that can be compared with CollationKey.compare. Use a CollationKey wh en * that can be compared with CollationKey.compare. Use a CollationKey wh en
* you need to do repeated comparisions on the same string. For a single * you need to do repeated comparisions on the same string. For a single
* comparison the compare method will be faster. * comparison the compare method will be faster.
* @param source the source string. * @param source the source string.
* @param key the transformed key of the source string. * @param key the transformed key of the source string.
* @param status the error code status. * @param status the error code status.
* @return the transformed key. * @return the transformed key.
* @see CollationKey * @see CollationKey
* @deprecated ICU 2.8 Use getSortKey(...) instead * @stable ICU 2.0
*/ */
virtual CollationKey& getCollationKey(const UnicodeString& source, virtual CollationKey& getCollationKey(const UnicodeString& source,
CollationKey& key, CollationKey& key,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Transforms a specified region of the string into a series of characte rs * Transforms a specified region of the string into a series of characte rs
* that can be compared with CollationKey.compare. Use a CollationKey wh en * that can be compared with CollationKey.compare. Use a CollationKey wh en
* you need to do repeated comparisions on the same string. For a single * you need to do repeated comparisions on the same string. For a single
* comparison the compare method will be faster. * comparison the compare method will be faster.
* @param source the source string. * @param source the source string.
* @param sourceLength the length of the source string. * @param sourceLength the length of the source string.
* @param key the transformed key of the source string. * @param key the transformed key of the source string.
* @param status the error code status. * @param status the error code status.
* @return the transformed key. * @return the transformed key.
* @see CollationKey * @see CollationKey
* @deprecated ICU 2.8 Use getSortKey(...) instead * @stable ICU 2.0
*/ */
virtual CollationKey& getCollationKey(const UChar *source, virtual CollationKey& getCollationKey(const UChar *source,
int32_t sourceLength, int32_t sourceLength,
CollationKey& key, CollationKey& key,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Generates the hash code for the rule-based collation object. * Generates the hash code for the rule-based collation object.
* @return the hash code. * @return the hash code.
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 454 skipping to change at line 379
/** /**
* Gets the locale of the Collator * Gets the locale of the Collator
* @param type can be either requested, valid or actual locale. For more * @param type can be either requested, valid or actual locale. For more
* information see the definition of ULocDataLocaleType in * information see the definition of ULocDataLocaleType in
* uloc.h * uloc.h
* @param status the error code status. * @param status the error code status.
* @return locale where the collation data lives. If the collator * @return locale where the collation data lives. If the collator
* was instantiated from rules, locale is empty. * was instantiated from rules, locale is empty.
* @deprecated ICU 2.8 likely to change in ICU 3.0, based on feedback * @deprecated ICU 2.8 likely to change in ICU 3.0, based on feedback
*/ */
virtual const Locale getLocale(ULocDataLocaleType type, UErrorCode& sta tus) const; virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) c onst;
/** /**
* Gets the table-based rules for the collation object. * Gets the tailoring rules for this collator.
* @return returns the collation rules that the table collation object * @return the collation tailoring from which this collator was created
was
* created from.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
const UnicodeString& getRules(void) const; const UnicodeString& getRules(void) const;
/** /**
* Gets the version information for a Collator. * Gets the version information for a Collator.
* @param info the version # information, the result will be filled in * @param info the version # information, the result will be filled in
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void getVersion(UVersionInfo info) const; virtual void getVersion(UVersionInfo info) const;
skipping to change at line 533 skipping to change at line 457
* @param status for catching errors * @param status for catching errors
* @return size of the image * @return size of the image
* @see ucol_openBinary * @see ucol_openBinary
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
int32_t cloneBinary(uint8_t *buffer, int32_t capacity, UErrorCode &stat us); int32_t cloneBinary(uint8_t *buffer, int32_t capacity, UErrorCode &stat us);
/** /**
* Returns current rules. Delta defines whether full rules are returned or * Returns current rules. Delta defines whether full rules are returned or
* just the tailoring. * just the tailoring.
*
* getRules(void) should normally be used instead.
* See http://userguide.icu-project.org/collation/customization#TOC-Bui
lding-on-Existing-Locales
* @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES.
* @param buffer UnicodeString to store the result rules * @param buffer UnicodeString to store the result rules
* @stable ICU 2.2 * @stable ICU 2.2
* @see UCOL_FULL_RULES
*/ */
void getRules(UColRuleOption delta, UnicodeString &buffer); void getRules(UColRuleOption delta, UnicodeString &buffer);
/** /**
* Universal attribute setter * Universal attribute setter
* @param attr attribute type * @param attr attribute type
* @param value attribute value * @param value attribute value
* @param status to indicate whether the operation went on smoothly or there were errors * @param status to indicate whether the operation went on smoothly or there were errors
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
skipping to change at line 557 skipping to change at line 485
UErrorCode &status); UErrorCode &status);
/** /**
* Universal attribute getter. * Universal attribute getter.
* @param attr attribute type * @param attr attribute type
* @param status to indicate whether the operation went on smoothly or there were errors * @param status to indicate whether the operation went on smoothly or there were errors
* @return attribute value * @return attribute value
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual UColAttributeValue getAttribute(UColAttribute attr, virtual UColAttributeValue getAttribute(UColAttribute attr,
UErrorCode &status); UErrorCode &status) const;
/** /**
* Sets the variable top to a collation element value of a string suppl ied. * Sets the variable top to a collation element value of a string suppl ied.
* @param varTop one or more (if contraction) UChars to which the varia ble top should be set * @param varTop one or more (if contraction) UChars to which the varia ble top should be set
* @param len length of variable top string. If -1 it is considered to be zero terminated. * @param len length of variable top string. If -1 it is considered to be zero terminated.
* @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br> * @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br>
* U_CE_NOT_FOUND_ERROR if more than one character was passed and th ere is no such a contraction<br> * U_CE_NOT_FOUND_ERROR if more than one character was passed and th ere is no such a contraction<br>
* U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes
* @return a 32 bit value containing the value of the variable top in u pper 16 bits. Lower 16 bits are undefined * @return a 32 bit value containing the value of the variable top in u pper 16 bits. Lower 16 bits are undefined
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 580 skipping to change at line 508
/** /**
* Sets the variable top to a collation element value of a string suppl ied. * Sets the variable top to a collation element value of a string suppl ied.
* @param varTop an UnicodeString size 1 or more (if contraction) of UC hars to which the variable top should be set * @param varTop an UnicodeString size 1 or more (if contraction) of UC hars to which the variable top should be set
* @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br> * @param status error code. If error code is set, the return value is undefined. Errors set by this function are: <br>
* U_CE_NOT_FOUND_ERROR if more than one character was passed and th ere is no such a contraction<br> * U_CE_NOT_FOUND_ERROR if more than one character was passed and th ere is no such a contraction<br>
* U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes * U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes
* @return a 32 bit value containing the value of the variable top in u pper 16 bits. Lower 16 bits are undefined * @return a 32 bit value containing the value of the variable top in u pper 16 bits. Lower 16 bits are undefined
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual uint32_t setVariableTop(const UnicodeString varTop, UErrorCode &status); virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode &status);
/** /**
* Sets the variable top to a collation element value supplied. Variabl e top is set to the upper 16 bits. * Sets the variable top to a collation element value supplied. Variabl e top is set to the upper 16 bits.
* Lower 16 bits are ignored. * Lower 16 bits are ignored.
* @param varTop CE value, as returned by setVariableTop or ucol)getVar iableTop * @param varTop CE value, as returned by setVariableTop or ucol)getVar iableTop
* @param status error code (not changed by function) * @param status error code (not changed by function)
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void setVariableTop(const uint32_t varTop, UErrorCode &status); virtual void setVariableTop(uint32_t varTop, UErrorCode &status);
/** /**
* Gets the variable top value of a Collator. * Gets the variable top value of a Collator.
* Lower 16 bits are undefined and should be ignored. * Lower 16 bits are undefined and should be ignored.
* @param status error code (not changed by function). If error code is set, the return value is undefined. * @param status error code (not changed by function). If error code is set, the return value is undefined.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual uint32_t getVariableTop(UErrorCode &status) const; virtual uint32_t getVariableTop(UErrorCode &status) const;
/** /**
skipping to change at line 611 skipping to change at line 539
* this collator. * this collator.
* @param status error code of the operation * @param status error code of the operation
* @return a pointer to a UnicodeSet object containing all the * @return a pointer to a UnicodeSet object containing all the
* code points and sequences that may sort differently than * code points and sequences that may sort differently than
* in the UCA. The object must be disposed of by using delete * in the UCA. The object must be disposed of by using delete
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
virtual UnicodeSet *getTailoredSet(UErrorCode &status) const; virtual UnicodeSet *getTailoredSet(UErrorCode &status) const;
/** /**
* Thread safe cloning operation.
* @return pointer to the new clone, user should remove it.
* @stable ICU 2.2
*/
virtual Collator* safeClone(void);
/**
* Get the sort key as an array of bytes from an UnicodeString. * Get the sort key as an array of bytes from an UnicodeString.
* @param source string to be processed. * @param source string to be processed.
* @param result buffer to store result in. If NULL, number of bytes ne eded * @param result buffer to store result in. If NULL, number of bytes ne eded
* will be returned. * will be returned.
* @param resultLength length of the result buffer. If if not enough th e * @param resultLength length of the result buffer. If if not enough th e
* buffer will be filled to capacity. * buffer will be filled to capacity.
* @return Number of bytes needed for storing the sort key * @return Number of bytes needed for storing the sort key
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual int32_t getSortKey(const UnicodeString& source, uint8_t *result , virtual int32_t getSortKey(const UnicodeString& source, uint8_t *result ,
skipping to change at line 646 skipping to change at line 567
* will be returned. * will be returned.
* @param resultLength length of the result buffer. If if not enough th e * @param resultLength length of the result buffer. If if not enough th e
* buffer will be filled to capacity. * buffer will be filled to capacity.
* @return Number of bytes needed for storing the sort key * @return Number of bytes needed for storing the sort key
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
virtual int32_t getSortKey(const UChar *source, int32_t sourceLength, virtual int32_t getSortKey(const UChar *source, int32_t sourceLength,
uint8_t *result, int32_t resultLength) const ; uint8_t *result, int32_t resultLength) const ;
/** /**
* Determines the minimum strength that will be use in comparison or
* transformation.
* <p>E.g. with strength == SECONDARY, the tertiary difference is ignore
d
* <p>E.g. with strength == PRIMARY, the secondary and tertiary differen
ce
* are ignored.
* @return the current comparison level.
* @see RuleBasedCollator#setStrength
* @deprecated ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead
*/
virtual ECollationStrength getStrength(void) const;
/**
* Sets the minimum strength to be used in comparison or transformation.
* @see RuleBasedCollator#getStrength
* @param newStrength the new comparison level.
* @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead
*/
virtual void setStrength(ECollationStrength newStrength);
/**
* Retrieves the reordering codes for this collator. * Retrieves the reordering codes for this collator.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
* will only return the length of the result without writing any of th e result string (pre-flighting). * will only return the length of the result without writing any of th e result string (pre-flighting).
* @param status A reference to an error code value, which must not ind icate * @param status A reference to an error code value, which must not ind icate
* a failure before the function call. * a failure before the function call.
* @return The length of the script ordering array. * @return The length of the script ordering array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see Collator#getEquivalentReorderCodes * @see Collator#getEquivalentReorderCodes
* @see Collator#setReorderCodes * @see Collator#setReorderCodes
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
virtual int32_t U_EXPORT2 getReorderCodes(int32_t *dest, virtual int32_t getReorderCodes(int32_t *dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Sets the ordering of scripts for this collator. * Sets the ordering of scripts for this collator.
* @param reorderCodes An array of script codes in the new order. This can be NULL if the * @param reorderCodes An array of script codes in the new order. This can be NULL if the
* length is also set to 0. An empty array will clear any reordering co des on the collator. * length is also set to 0. An empty array will clear any reordering co des on the collator.
* @param reorderCodesLength The length of reorderCodes. * @param reorderCodesLength The length of reorderCodes.
* @param status error code * @param status error code
* @see Collator#getReorderCodes * @see Collator#getReorderCodes
* @see Collator#getEquivalentReorderCodes * @see Collator#getEquivalentReorderCodes
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
virtual void U_EXPORT2 setReorderCodes(const int32_t* reorderCodes, virtual void setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength, int32_t reorderCodesLength,
UErrorCode& status) ; UErrorCode& status) ;
/** /**
* Retrieves the reorder codes that are grouped with the given reorder code. Some reorder * Retrieves the reorder codes that are grouped with the given reorder code. Some reorder
* codes will be grouped and must reorder together. * codes will be grouped and must reorder together.
* @param reorderCode The reorder code to determine equivalence for. * @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script equivalene reordering codes. * @param dest The array to fill with the script equivalene reordering codes.
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the
* function will only return the length of the result without writing a ny of the result * function will only return the length of the result without writing a ny of the result
* string (pre-flighting). * string (pre-flighting).
* @param status A reference to an error code value, which must not ind icate * @param status A reference to an error code value, which must not ind icate
skipping to change at line 877 skipping to change at line 778
/** /**
* Used internally by registraton to define the requested and valid loca les. * Used internally by registraton to define the requested and valid loca les.
* @param requestedLocale the requsted locale * @param requestedLocale the requsted locale
* @param validLocale the valid locale * @param validLocale the valid locale
* @param actualLocale the actual locale * @param actualLocale the actual locale
* @internal * @internal
*/ */
virtual void setLocales(const Locale& requestedLocale, const Locale& va lidLocale, const Locale& actualLocale); virtual void setLocales(const Locale& requestedLocale, const Locale& va lidLocale, const Locale& actualLocale);
private: private:
// if not owned and not a write through alias, copy the ucollator // if not owned and not a write through alias, copy the ucollator
void checkOwned(void); void checkOwned(void);
// utility to init rule string used by checkOwned and construct // utility to init rule string used by checkOwned and construct
void setRuleStringFromCollator(); void setRuleStringFromCollator();
/** public:
* Converts C's UCollationResult to EComparisonResult
* @param result member of the enum UComparisonResult
* @return EComparisonResult equivalent of UCollationResult
* @deprecated ICU 2.6. We will not need it.
*/
Collator::EComparisonResult getEComparisonResult(
const UCollationResult &result)
const;
/**
* Converts C's UCollationStrength to ECollationStrength
* @param strength member of the enum UCollationStrength
* @return ECollationStrength equivalent of UCollationStrength
*/
Collator::ECollationStrength getECollationStrength(
const UCollationStrength &strength)
const;
/**
* Converts C++'s ECollationStrength to UCollationStrength
* @param strength member of the enum ECollationStrength
* @return UCollationStrength equivalent of ECollationStrength
*/
UCollationStrength getUCollationStrength(
const Collator::ECollationStrength &strength) const;
public:
/** Get the short definition string for a collator. This internal API h arvests the collator's /** Get the short definition string for a collator. This internal API h arvests the collator's
* locale and the attribute set and produces a string that can be used for opening * locale and the attribute set and produces a string that can be used for opening
* a collator with the same properties using the ucol_openFromShortStr ing API. * a collator with the same properties using the ucol_openFromShortStr ing API.
* This string will be normalized. * This string will be normalized.
* The structure and the syntax of the string is defined in the "Namin g collators" * The structure and the syntax of the string is defined in the "Namin g collators"
* section of the users guide: * section of the users guide:
* http://icu-project.org/userguide/Collate_Concepts.html#Naming_Colla tors * http://icu-project.org/userguide/Collate_Concepts.html#Naming_Colla tors
* This function supports preflighting. * This function supports preflighting.
* *
* This is internal, and intended to be used with delegate converters. * This is internal, and intended to be used with delegate converters.
skipping to change at line 965 skipping to change at line 841
setRuleStringFromCollator(); setRuleStringFromCollator();
} }
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
inline const UCollator * RuleBasedCollator::getUCollator() inline const UCollator * RuleBasedCollator::getUCollator()
{ {
return ucollator; return ucollator;
} }
#endif #endif
inline Collator::EComparisonResult RuleBasedCollator::getEComparisonResult(
const UCollationResult &result)
const
{
switch (result)
{
case UCOL_LESS :
return Collator::LESS;
case UCOL_EQUAL :
return Collator::EQUAL;
default :
return Collator::GREATER;
}
}
inline Collator::ECollationStrength RuleBasedCollator::getECollationStrengt
h(
const UCollationStrength &strength)
const
{
switch (strength)
{
case UCOL_PRIMARY :
return Collator::PRIMARY;
case UCOL_SECONDARY :
return Collator::SECONDARY;
case UCOL_TERTIARY :
return Collator::TERTIARY;
case UCOL_QUATERNARY :
return Collator::QUATERNARY;
default :
return Collator::IDENTICAL;
}
}
inline UCollationStrength RuleBasedCollator::getUCollationStrength(
const Collator::ECollationStrength &strength)
const
{
switch (strength)
{
case Collator::PRIMARY :
return UCOL_PRIMARY;
case Collator::SECONDARY :
return UCOL_SECONDARY;
case Collator::TERTIARY :
return UCOL_TERTIARY;
case Collator::QUATERNARY :
return UCOL_QUATERNARY;
default :
return UCOL_IDENTICAL;
}
}
U_NAMESPACE_END U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_COLLATION */ #endif /* #if !UCONFIG_NO_COLLATION */
#endif #endif
 End of changes. 20 change blocks. 
224 lines changed or deleted 24 lines changed or added


 tmutfmt.h   tmutfmt.h 
skipping to change at line 47 skipping to change at line 47
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
UTMUTFMT_ABBREVIATED_STYLE, UTMUTFMT_ABBREVIATED_STYLE,
/** @stable ICU 4.8 */ /** @stable ICU 4.8 */
UTMUTFMT_FORMAT_STYLE_COUNT UTMUTFMT_FORMAT_STYLE_COUNT
}; };
typedef enum UTimeUnitFormatStyle UTimeUnitFormatStyle; /**< @stable ICU 4. 8 */ typedef enum UTimeUnitFormatStyle UTimeUnitFormatStyle; /**< @stable ICU 4. 8 */
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class Hashtable; class Hashtable;
class UVector;
/** /**
* 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>
* // create time unit amount instance - a combination of Number and time unit * // create time unit amount instance - a combination of Number and time unit
* UErrorCode status = U_ZERO_ERROR; * UErrorCode status = U_ZERO_ERROR;
* TimeUnitAmount* source = new TimeUnitAmount(2, TimeUnit::UTIMEUNIT_YEA R, status); * TimeUnitAmount* source = new TimeUnitAmount(2, TimeUnit::UTIMEUNIT_YEA R, status);
skipping to change at line 227 skipping to change at line 228
void create(const Locale& locale, UTimeUnitFormatStyle style, UErrorCod e& 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(UTimeUnitFormatStyle style, const char* key, void readFromCurrentLocale(UTimeUnitFormatStyle style, const char* key,
UErrorCode& status); const UVector& pluralCounts,
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(UTimeUnitFormatStyle style, const char* key, UErr orCode& 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(UTimeUnitFormatStyle style, const char* key, c onst char* localeName, void searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, c onst char* localeName,
TimeUnit::UTimeUnitFields field, const Unicode String&, TimeUnit::UTimeUnitFields field, const Unicode String&,
const char*, Hashtable*, UErrorCode&); const char*, Hashtable*, UErrorCode&);
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added


 translit.h   translit.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1999-2011, International Business Machines * Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* 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 500 skipping to change at line 500
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Transliterates the portion of the text buffer that can be * Transliterates the portion of the text buffer that can be
* transliterated unambiguosly. This is a convenience method; see * transliterated unambiguosly. This is a convenience method; see
* {@link * {@link
* #transliterate(Replaceable&, UTransPosition&, const UnicodeString&, UErrorCode&) const } * #transliterate(Replaceable&, UTransPosition&, const UnicodeString&, UErrorCode&) const }
* for details. * for details.
* @param text the buffer holding transliterated and * @param text the buffer holding transliterated and
* untransliterated text * untransliterated text
* @param index an array of three integers. See {@link * @param index an array of three integers. See {@link #transliterate(
* #transliterate(Replaceable&, UTransPosition&, const UnicodeString&, Replaceable&, UTransPosition&, const UnicodeString*, UErrorCode&) const }.
UErrorCode&) const }.
* @param status Output param to filled in with a success or an erro r. * @param status Output param to filled in with a success or an erro r.
* @see #transliterate(Replaceable, int[], String) * @see #transliterate(Replaceable, int[], String)
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
virtual void transliterate(Replaceable& text, UTransPosition& index, virtual void transliterate(Replaceable& text, UTransPosition& index,
UErrorCode& status) const; UErrorCode& status) const;
/** /**
* Finishes any pending transliterations that were waiting for * Finishes any pending transliterations that were waiting for
* more characters. Clients should call this method as the last * more characters. Clients should call this method as the last
 End of changes. 2 change blocks. 
4 lines changed or deleted 3 lines changed or added


 tzfmt.h   tzfmt.h 
skipping to change at line 28 skipping to change at line 28
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
#include "unicode/format.h" #include "unicode/format.h"
#include "unicode/timezone.h" #include "unicode/timezone.h"
#include "unicode/tznames.h" #include "unicode/tznames.h"
U_CDECL_BEGIN U_CDECL_BEGIN
/** /**
* Constants for time zone display format style used by format/parse APIs * Constants for time zone display format style used by format/parse APIs
* in TimeZoneFormat. * in TimeZoneFormat.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
typedef enum UTimeZoneFormatStyle { typedef enum UTimeZoneFormatStyle {
/** /**
* Generic location format, such as "United States Time (New York)", "I taly Time" * Generic location format, such as "United States Time (New York)", "I taly Time"
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_STYLE_GENERIC_LOCATION, UTZFMT_STYLE_GENERIC_LOCATION,
/** /**
* Generic long non-location format, such as "Eastern Time". * Generic long non-location format, such as "Eastern Time".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_STYLE_GENERIC_LONG, UTZFMT_STYLE_GENERIC_LONG,
/** /**
* Generic short non-location format, such as "ET". * Generic short non-location format, such as "ET".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_STYLE_GENERIC_SHORT, UTZFMT_STYLE_GENERIC_SHORT,
/** /**
* Specific long format, such as "Eastern Standard Time". * Specific long format, such as "Eastern Standard Time".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_STYLE_SPECIFIC_LONG, UTZFMT_STYLE_SPECIFIC_LONG,
/** /**
* Specific short format, such as "EST", "PDT". * Specific short format, such as "EST", "PDT".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_STYLE_SPECIFIC_SHORT, UTZFMT_STYLE_SPECIFIC_SHORT,
/** /**
* RFC822 format, such as "-0500" * RFC822 format, such as "-0500"
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_STYLE_RFC822, UTZFMT_STYLE_RFC822,
/** /**
* Localized GMT offset format, such as "GMT-05:00", "UTC+0100" * Localized GMT offset format, such as "GMT-05:00", "UTC+0100"
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_STYLE_LOCALIZED_GMT, UTZFMT_STYLE_LOCALIZED_GMT,
/** /**
* ISO 8601 format (extended), such as "-05:00", "Z"(UTC) * ISO 8601 format (extended), such as "-05:00", "Z"(UTC)
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_STYLE_ISO8601 UTZFMT_STYLE_ISO8601
} UTimeZoneFormatStyle; } UTimeZoneFormatStyle;
/** /**
* Constants for GMT offset pattern types. * Constants for GMT offset pattern types.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
typedef enum UTimeZoneFormatGMTOffsetPatternType { typedef enum UTimeZoneFormatGMTOffsetPatternType {
/** /**
* Positive offset with hour and minute fields * Positive offset with hour and minute fields
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_PAT_POSITIVE_HM, UTZFMT_PAT_POSITIVE_HM,
/** /**
* Positive offset with hour, minute and second fields * Positive offset with hour, minute and second fields
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_PAT_POSITIVE_HMS, UTZFMT_PAT_POSITIVE_HMS,
/** /**
* Negative offset with hour and minute fields * Negative offset with hour and minute fields
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_PAT_NEGATIVE_HM, UTZFMT_PAT_NEGATIVE_HM,
/** /**
* Negative offset with hour, minute and second fields * Negative offset with hour, minute and second fields
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_PAT_NEGATIVE_HMS UTZFMT_PAT_NEGATIVE_HMS
} UTimeZoneFormatGMTOffsetPatternType; } UTimeZoneFormatGMTOffsetPatternType;
/** /**
* Constants for time types used by TimeZoneFormat APIs for * Constants for time types used by TimeZoneFormat APIs for
* receiving time type (standard time, daylight time or unknown). * receiving time type (standard time, daylight time or unknown).
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
typedef enum UTimeZoneFormatTimeType { typedef enum UTimeZoneFormatTimeType {
/** /**
* Unknown * Unknown
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_TIME_TYPE_UNKNOWN, UTZFMT_TIME_TYPE_UNKNOWN,
/** /**
* Standard time * Standard time
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_TIME_TYPE_STANDARD, UTZFMT_TIME_TYPE_STANDARD,
/** /**
* Daylight saving time * Daylight saving time
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_TIME_TYPE_DAYLIGHT UTZFMT_TIME_TYPE_DAYLIGHT
} UTimeZoneFormatTimeType; } UTimeZoneFormatTimeType;
/** /**
* Constants for parse option flags, used for specifying optional parse beh avior. * Constants for parse option flags, used for specifying optional parse beh avior.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
typedef enum UTimeZoneFormatParseOption { typedef enum UTimeZoneFormatParseOption {
/** /**
* No option. * No option.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_PARSE_OPTION_NONE = 0x00, UTZFMT_PARSE_OPTION_NONE = 0x00,
/** /**
* When a time zone display name is not found within a set of display n ames * When a time zone display name is not found within a set of display n ames
* used for the specified style, look for the name from display names u sed * used for the specified style, look for the name from display names u sed
* by other styles. * by other styles.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01 UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01
} UTimeZoneFormatParseOption; } UTimeZoneFormatParseOption;
U_CDECL_END U_CDECL_END
typedef void *UMTX;
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class TimeZoneGenericNames; class TimeZoneGenericNames;
class UVector; class UVector;
/** /**
* <code>TimeZoneFormat</code> supports time zone display name formatting a nd parsing. * <code>TimeZoneFormat</code> supports time zone display name formatting a nd parsing.
* An instance of TimeZoneFormat works as a subformatter of {@link SimpleDa teFormat}, * An instance of TimeZoneFormat works as a subformatter of {@link SimpleDa teFormat},
* but you can also directly get a new instance of <code>TimeZoneFormat</co de> and * but you can also directly get a new instance of <code>TimeZoneFormat</co de> and
* formatting/parsing time zone display names. * formatting/parsing time zone display names.
* <p> * <p>
* ICU implements the time zone display names defined by <a href="http://ww w.unicode.org/reports/tr35/">UTS#35 * ICU implements the time zone display names defined by <a href="http://ww w.unicode.org/reports/tr35/">UTS#35
* Unicode Locale Data Markup Language (LDML)</a>. {@link TimeZoneNames} re presents the * Unicode Locale Data Markup Language (LDML)</a>. {@link TimeZoneNames} re presents the
* time zone display name data model and this class implements the algorith m for actual * time zone display name data model and this class implements the algorith m for actual
* formatting and parsing. * formatting and parsing.
* *
* @see SimpleDateFormat * @see SimpleDateFormat
* @see TimeZoneNames * @see TimeZoneNames
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
class U_I18N_API TimeZoneFormat : public Format { class U_I18N_API TimeZoneFormat : public Format {
public: public:
/** /**
* Copy constructor. * Copy constructor.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
TimeZoneFormat(const TimeZoneFormat& other); TimeZoneFormat(const TimeZoneFormat& other);
/** /**
* Destructor. * Destructor.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual ~TimeZoneFormat(); virtual ~TimeZoneFormat();
/** /**
* Assignment operator. * Assignment operator.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
TimeZoneFormat& operator=(const TimeZoneFormat& other); TimeZoneFormat& operator=(const TimeZoneFormat& other);
/** /**
* Return true if the given Format objects are semantically equal. * Return 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 Return TRUE if the given Format objects are semantically equ al. * @return Return TRUE if the given Format objects are semantically equ al.
* Objects of different subclasses are considered unequa l. * Objects of different subclasses are considered unequa l.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UBool operator==(const Format& other) const; virtual UBool operator==(const Format& other) const;
/** /**
* Clone this object polymorphically. The caller is responsible * Clone this object polymorphically. The caller is responsible
* for deleting the result when done. * for deleting the result when done.
* @return A copy of the object * @return A copy of the object
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual Format* clone() const; virtual Format* clone() const;
/** /**
* Creates an instance of <code>TimeZoneFormat</code> for the given loc ale. * Creates an instance of <code>TimeZoneFormat</code> for the given loc ale.
* @param locale The locale. * @param locale The locale.
* @param status Recevies the status. * @param status Recevies the status.
* @return An instance of <code>TimeZoneFormat</code> for the given loc ale, * @return An instance of <code>TimeZoneFormat</code> for the given loc ale,
* owned by the caller. * owned by the caller.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, U ErrorCode& status); static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, U ErrorCode& status);
/** /**
* Returns the time zone display name data used by this instance. * Returns the time zone display name data used by this instance.
* @return The time zone display name data. * @return The time zone display name data.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
const TimeZoneNames* getTimeZoneNames() const; const TimeZoneNames* getTimeZoneNames() const;
/** /**
* Sets the time zone display name data to this format instnace. * Sets the time zone display name data to this format instnace.
* The caller should not delete the TimeZoenNames object after it is ad opted * The caller should not delete the TimeZoenNames object after it is ad opted
* by this call. * by this call.
* @param tznames TimeZoneNames object to be adopted. * @param tznames TimeZoneNames object to be adopted.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
void adoptTimeZoneNames(TimeZoneNames *tznames); void adoptTimeZoneNames(TimeZoneNames *tznames);
/** /**
* Sets the time zone display name data to this format instnace. * Sets the time zone display name data to this format instnace.
* @param tznames TimeZoneNames object to be set. * @param tznames TimeZoneNames object to be set.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
void setTimeZoneNames(const TimeZoneNames &tznames); void setTimeZoneNames(const TimeZoneNames &tznames);
/** /**
* Returns the localized GMT format pattern. * Returns the localized GMT format pattern.
* @param pattern Receives the localized GMT format pattern. * @param pattern Receives the localized GMT format pattern.
* @return A reference to the result pattern. * @return A reference to the result pattern.
* @see #setGMTPattern * @see #setGMTPattern
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UnicodeString& getGMTPattern(UnicodeString& pattern) const; UnicodeString& getGMTPattern(UnicodeString& pattern) const;
/** /**
* Sets the localized GMT format pattern. The pattern must contain * Sets the localized GMT format pattern. The pattern must contain
* a single argument {0}, for example "GMT {0}". * a single argument {0}, for example "GMT {0}".
* @param pattern The localized GMT format pattern to be used by this o bject. * @param pattern The localized GMT format pattern to be used by this o bject.
* @param status Recieves the status. * @param status Recieves the status.
* @see #getGMTPattern * @see #getGMTPattern
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
void setGMTPattern(const UnicodeString& pattern, UErrorCode& status); void setGMTPattern(const UnicodeString& pattern, UErrorCode& status);
/** /**
* Returns the offset pattern used for localized GMT format. * Returns the offset pattern used for localized GMT format.
* @param type The offset pattern type enum. * @param type The offset pattern type enum.
* @param pattern Receives the offset pattern. * @param pattern Receives the offset pattern.
* @return A reference to the result pattern. * @return A reference to the result pattern.
* @see #setGMTOffsetPattern * @see #setGMTOffsetPattern
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, UnicodeString& pattern) const; UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, UnicodeString& pattern) const;
/** /**
* Sets the offset pattern for the given offset type. * Sets the offset pattern for the given offset type.
* @param type The offset pattern type enum. * @param type The offset pattern type enum.
* @param pattern The offset pattern used for localized GMT format for the type. * @param pattern The offset pattern used for localized GMT format for the type.
* @param status Receives the status. * @param status Receives the status.
* @see #getGMTOffsetPattern * @see #getGMTOffsetPattern
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, cons t UnicodeString& pattern, UErrorCode& status); void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, cons t UnicodeString& pattern, UErrorCode& status);
/** /**
* Returns the decimal digit characters used for localized GMT format i * Returns the decimal digit characters used for localized GMT format.
n a single string * The return string contains exactly 10 code points (may include Unico
* containing from 0 to 9 in the ascending order. de
* supplementary character) representing digit 0 to digit 9 in the asce
nding
* order.
* @param digits Receives the decimal digits used for localized GMT for mat. * @param digits Receives the decimal digits used for localized GMT for mat.
* @see #setGMTOffsetDigits * @see #setGMTOffsetDigits
* @draft ICU 50
*/ */
UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const; UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const;
/** /**
* Sets the decimal digit characters used for localized GMT format. * Sets the decimal digit characters used for localized GMT format.
* The input <code>digits</code> must contain exactly 10 code points
* (Unicode supplementary characters are also allowed) representing
* digit 0 to digit 9 in the ascending order. When the input <code>digi
ts</code>
* does not satisfy the condition, <code>U_ILLEGAL_ARGUMENT_ERROR</code
>
* will be set to the return status.
* @param digits The decimal digits used for localized GMT format. * @param digits The decimal digits used for localized GMT format.
* @param status Receives the status. * @param status Receives the status.
* @see #getGMTOffsetDigits * @see #getGMTOffsetDigits
* @draft ICU 50
*/ */
void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status ); void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status );
/** /**
* Returns the localized GMT format string for GMT(UTC) itself (GMT off set is 0). * Returns the localized GMT format string for GMT(UTC) itself (GMT off set is 0).
* @param gmtZeroFormat Receives the localized GMT string string for GM T(UTC) itself. * @param gmtZeroFormat Receives the localized GMT string string for GM T(UTC) itself.
* @return A reference to the result GMT string. * @return A reference to the result GMT string.
* @see #setGMTZeroFormat * @see #setGMTZeroFormat
* @draft ICU 50
*/ */
UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const; UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const;
/** /**
* Sets the localized GMT format string for GMT(UTC) itself (GMT offset is 0). * Sets the localized GMT format string for GMT(UTC) itself (GMT offset is 0).
* @param gmtZeroFormat The localized GMT format string for GMT(UTC). * @param gmtZeroFormat The localized GMT format string for GMT(UTC).
* @param status Receives the status. * @param status Receives the status.
* @see #getGMTZeroFormat * @see #getGMTZeroFormat
* @draft ICU 50
*/ */
void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& s tatus); void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& s tatus);
/** /**
* Returns the bitwise flags of UTimeZoneFormatParseOption representing the default parse * Returns the bitwise flags of UTimeZoneFormatParseOption representing the default parse
* options used by this object. * options used by this object.
* @return the default parse options. * @return the default parse options.
* @see ParseOption * @see ParseOption
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
int32_t getDefaultParseOptions(void) const; uint32_t getDefaultParseOptions(void) const;
/** /**
* Sets the default parse options. * Sets the default parse options.
* <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</cod e> * <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</cod e>
* created by {@link #createInstance} has no parse options set (UTZFMT_ PARSE_OPTION_NONE). * created by {@link #createInstance} has no parse options set (UTZFMT_ PARSE_OPTION_NONE).
* To specify multipe options, use bitwise flags of UTimeZoneFormatPars eOption. * To specify multipe options, use bitwise flags of UTimeZoneFormatPars eOption.
* @see #UTimeZoneFormatParseOption * @see #UTimeZoneFormatParseOption
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
void setDefaultParseOptions(int32_t flags); void setDefaultParseOptions(uint32_t flags);
/** /**
* Returns the RFC822 style time zone string for the given offset. * Returns the RFC822 style time zone string for the given offset.
* For example, "-0800". * For example, "-0800".
* @param offset The offset from GMT(UTC) in milliseconds. * @param offset The offset from GMT(UTC) in milliseconds.
* @param result Recevies the RFC822 style GMT(UTC) offset format. * @param result Recevies the RFC822 style GMT(UTC) offset format.
* @return A reference to the result. * @return A reference to the result.
* @param status Receives the status
* @see #parseOffsetRFC822 * @see #parseOffsetRFC822
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UnicodeString& formatOffsetRFC822(int32_t offset, UnicodeString& result , UErrorCode& status) const; UnicodeString& formatOffsetRFC822(int32_t offset, UnicodeString& result , UErrorCode& status) const;
/** /**
* Returns the ISO 8601 style time zone string for the given offset. * Returns the ISO 8601 style time zone string for the given offset.
* For example, "-08:00" and "Z". * For example, "-08:00" and "Z".
* @param offset The offset from GMT(UTC) in milliseconds. * @param offset The offset from GMT(UTC) in milliseconds.
* @param result Recevies the ISO 8601 style GMT(UTC) offset format. * @param result Receives the ISO 8601 style GMT(UTC) offset format.
* @param status Receives the status
* @return A reference to the result. * @return A reference to the result.
* @see #parseOffsetISO8601 * @see #parseOffsetISO8601
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UnicodeString& formatOffsetISO8601(int32_t offset, UnicodeString& resul t, UErrorCode& status) const; UnicodeString& formatOffsetISO8601(int32_t offset, UnicodeString& resul t, UErrorCode& status) const;
/** /**
* Returns the localized GMT(UTC) offset format for the given offset. * Returns the localized GMT(UTC) offset format for the given offset.
* The localized GMT offset is defined by; * The localized GMT offset is defined by;
* <ul> * <ul>
* <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern}) * <li>GMT format pattern (e.g. "GMT {0}" - see {@link #getGMTPattern})
* <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPat tern}) * <li>Offset time pattern (e.g. "+HH:mm" - see {@link #getGMTOffsetPat tern})
* <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigit s}) * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigit s})
* <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat}) * <li>GMT zero format (e.g. "GMT" - see {@link #getGMTZeroFormat})
* </ul> * </ul>
* @param offset the offset from GMT(UTC) in milliseconds. * @param offset the offset from GMT(UTC) in milliseconds.
* @param status Receives the status
* @param result Receives the localized GMT format string. * @param result Receives the localized GMT format string.
* @return A reference to the result. * @return A reference to the result.
* @see #parseOffsetLocalizedGMT * @see #parseOffsetLocalizedGMT
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const; UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
using Format::format;
/** /**
* Returns the display name of the time zone at the given date for the style. * Returns the display name of the time zone at the given date for the style.
* @param style The style (e.g. <code>UTZFMT_STYLE_GENERIC_LONG</code>, <code>UTZFMT_STYLE_LOCALIZED_GMT</code>...) * @param style The style (e.g. <code>UTZFMT_STYLE_GENERIC_LONG</code>, <code>UTZFMT_STYLE_LOCALIZED_GMT</code>...)
* @param tz The time zone. * @param tz The time zone.
* @param date The date. * @param date The date.
* @param name Receives the display name. * @param name Receives the display name.
* @param timeType the output argument for receiving the time type (sta ndard/daylight/unknown) * @param timeType the output argument for receiving the time type (sta ndard/daylight/unknown)
* used for the display name, or NULL if the information is not necessa ry. * used for the display name, or NULL if the information is not necessa ry.
* @return A reference to the result * @return A reference to the result
* @see #UTimeZoneFormatStyle * @see #UTimeZoneFormatStyle
* @see #UTimeZoneFormatTimeType * @see #UTimeZoneFormatTimeType
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZon e& tz, UDate date, virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZon e& tz, UDate date,
UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) cons t; UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) cons t;
/** /**
* Returns offset from GMT(UTC) in milliseconds for the given RFC822 * Returns offset from GMT(UTC) in milliseconds for the given RFC822
* style time zone string. When the given string is not an RFC822 time zone * style time zone string. When the given string is not an RFC822 time zone
* string, this method sets the current position as the error index * string, this method sets the current position as the error index
* to <code>ParsePosition pos</code> and returns 0. * to <code>ParsePosition pos</code> and returns 0.
* @param text The text contains RFC822 style time zone string (e.g. "- 0800") * @param text The text contains RFC822 style time zone string (e.g. "- 0800")
* at the position. * at the position.
* @param pos The ParsePosition object. * @param pos The ParsePosition object.
* @return The offset from GMT(UTC) in milliseconds for the given RFC82 2 style * @return The offset from GMT(UTC) in milliseconds for the given RFC82 2 style
* time zone string. * time zone string.
* @see #formatOffsetRFC822 * @see #formatOffsetRFC822
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
int32_t parseOffsetRFC822(const UnicodeString& text, ParsePosition& pos ) const; int32_t parseOffsetRFC822(const UnicodeString& text, ParsePosition& pos ) const;
/** /**
* Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 * Returns offset from GMT(UTC) in milliseconds for the given ISO 8601
* style time zone string. When the given string is not an ISO 8601 tim e zone * style time zone string. When the given string is not an ISO 8601 tim e zone
* string, this method sets the current position as the error index * string, this method sets the current position as the error index
* to <code>ParsePosition pos</code> and returns 0. * to <code>ParsePosition pos</code> and returns 0.
* @param text The text contains RFC822 style time zone string (e.g. "- 08:00", "Z") * @param text The text contains ISO8601 style time zone string (e.g. " -08:00", "Z")
* at the position. * at the position.
* @param pos The ParsePosition object. * @param pos The ParsePosition object.
* @return The offset from GMT(UTC) in milliseconds for the given ISO 8 601 style * @return The offset from GMT(UTC) in milliseconds for the given ISO 8 601 style
* time zone string. * time zone string.
* @see #formatOffsetISO8601 * @see #formatOffsetISO8601
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& po s) const; int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& po s) const;
/** /**
* Returns offset from GMT(UTC) in milliseconds for the given localized GMT * Returns offset from GMT(UTC) in milliseconds for the given localized GMT
* offset format string. When the given string cannot be parsed, this m ethod * offset format string. When the given string cannot be parsed, this m ethod
* sets the current position as the error index to <code>ParsePosition pos</code> * sets the current position as the error index to <code>ParsePosition pos</code>
* and returns 0. * and returns 0.
* @param text The text contains a localized GMT offset string at the p osition. * @param text The text contains a localized GMT offset string at the p osition.
* @param pos The ParsePosition object. * @param pos The ParsePosition object.
* @return The offset from GMT(UTC) in milliseconds for the given local ized GMT * @return The offset from GMT(UTC) in milliseconds for the given local ized GMT
* offset format string. * offset format string.
* @see #formatOffsetLocalizedGMT * @see #formatOffsetLocalizedGMT
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePositio n& pos) const; int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePositio n& pos) const;
/** /**
* Returns a <code>TimeZone</code> by parsing the time zone string acco rding to * Returns a <code>TimeZone</code> by parsing the time zone string acco rding to
* the given parse position, the specified format style and parse optio ns. * the given parse position, the specified format style and parse optio ns.
* *
* @param text The text contains a time zone string at the position. * @param text The text contains a time zone string at the position.
* @param style The format style * @param style The format style
* @param pos The position. * @param pos The position.
* @param parseOptions The parse options repesented by bitwise flags of UTimeZoneFormatParseOption. * @param parseOptions The parse options repesented by bitwise flags of UTimeZoneFormatParseOption.
* @param timeType The output argument for receiving the time type (sta ndard/daylight/unknown), * @param timeType The output argument for receiving the time type (sta ndard/daylight/unknown),
* or NULL if the information is not necessary. * or NULL if the information is not necessary.
* @return A <code>TimeZone</code>, or null if the input could not be p arsed. * @return A <code>TimeZone</code>, or null if the input could not be p arsed.
* @see UTimeZoneFormatStyle * @see UTimeZoneFormatStyle
* @see UTimeZoneFormatParseOption * @see UTimeZoneFormatParseOption
* @see UTimeZoneFormatTimeType * @see UTimeZoneFormatTimeType
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString & text, ParsePosition& pos, virtual TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString & text, ParsePosition& pos,
int32_t parseOptions, UTimeZoneFormatTimeType* timeType = NULL) con st; int32_t parseOptions, UTimeZoneFormatTimeType* timeType = NULL) con st;
/** /**
* Returns a <code>TimeZone</code> by parsing the time zone string acco rding to * Returns a <code>TimeZone</code> by parsing the time zone string acco rding to
* the given parse position, the specified format style and the default parse options. * the given parse position, the specified format style and the default parse options.
* *
* @param text The text contains a time zone string at the position. * @param text The text contains a time zone string at the position.
* @param style The format style * @param style The format style
* @param pos The position. * @param pos The position.
* @param timeType The output argument for receiving the time type (sta ndard/daylight/unknown), * @param timeType The output argument for receiving the time type (sta ndard/daylight/unknown),
* or NULL if the information is not necessary. * or NULL if the information is not necessary.
* @return A <code>TimeZone</code>, or null if the input could not be p arsed. * @return A <code>TimeZone</code>, or null if the input could not be p arsed.
* @see UTimeZoneFormatStyle * @see UTimeZoneFormatStyle
* @see UTimeZoneFormatParseOption * @see UTimeZoneFormatParseOption
* @see UTimeZoneFormatTimeType * @see UTimeZoneFormatTimeType
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos, TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos,
UTimeZoneFormatTimeType* timeType = NULL) const; UTimeZoneFormatTimeType* timeType = NULL) const;
/* ---------------------------------------------- /* ----------------------------------------------
* Format APIs * Format APIs
* ---------------------------------------------- */ * ---------------------------------------------- */
/** /**
* Format an object to produce a time zone display string using localiz ed GMT offset format. * Format an object to produce a time zone display string using localiz ed GMT offset format.
* This method handles Formattable objects with a <code>TimeZone</code> . If a the Formattable * This method handles Formattable objects with a <code>TimeZone</code> . If a the Formattable
* object type is not a <code>TimeZone</code>, then it returns a failin g UErrorCode. * object type is not a <code>TimeZone</code>, then it returns a failin g UErrorCode.
* @param obj The object to format. Must be a <code>TimeZone</code>. * @param obj The object to format. Must be a <code>TimeZone</code>.
* @param appendTo Output parameter to receive result. Result is append ed to existing contents. * @param appendTo Output parameter to receive result. Result is append ed to existing contents.
* @param pos On input: an alignment field, if desired. On output: the offsets of the alignment field. * @param pos On input: an alignment field, if desired. On output: the offsets of the alignment field.
* @param status Output param filled with success/failure status. * @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter. * @return Reference to 'appendTo' parameter.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UnicodeString& format(const Formattable& obj, UnicodeString& ap pendTo, virtual UnicodeString& format(const Formattable& obj, UnicodeString& ap pendTo,
FieldPosition& pos, UErrorCode& status) const; FieldPosition& pos, UErrorCode& status) const;
/** /**
* Parse a string to produce an object. This methods handles parsing of * Parse a string to produce an object. This methods handles parsing of
* time zone display strings into Formattable objects with <code>TimeZo ne</code>. * time zone display strings into Formattable objects with <code>TimeZo ne</code>.
* @param source The string to be parsed into an object. * @param source The string to be parsed into an object.
* @param result Formattable to be set to the parse result. If parse fa ils, return contents are undefined. * @param result Formattable to be set to the parse result. If parse fa ils, return contents are undefined.
* @param parse_pos The position to start parsing at. Upon return this param is set to the position after the * @param parse_pos The position to start parsing at. Upon return this param is set to the position after the
* last character successfully parsed. If the source i s not parsed successfully, this param * last character successfully parsed. If the source i s not parsed successfully, this param
* will remain unchanged. * will remain unchanged.
* @return A newly created Formattable* object, or NULL on failure. Th e caller owns this and should * @return A newly created Formattable* object, or NULL on failure. Th e caller owns this and should
* delete it when done. * delete it when done.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual void parseObject(const UnicodeString& source, Formattable& resu lt, ParsePosition& parse_pos) const; virtual void parseObject(const UnicodeString& source, Formattable& resu lt, ParsePosition& parse_pos) const;
/** /**
* ICU "poor man's RTTI", returns a UClassID for this class. * ICU "poor man's RTTI", returns a UClassID for this class.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
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.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
protected: protected:
/** /**
* Constructs a TimeZoneFormat object for the specified locale. * Constructs a TimeZoneFormat object for the specified locale.
* @param locale the locale * @param locale the locale
* @param status receives the status. * @param status receives the status.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
TimeZoneFormat(const Locale& locale, UErrorCode& status); TimeZoneFormat(const Locale& locale, UErrorCode& status);
private: private:
/* mutex */
UMTX fLock;
/* Locale of this object */ /* Locale of this object */
Locale fLocale; Locale fLocale;
/* Stores the region (could be implicit default) */ /* Stores the region (could be implicit default) */
char fTargetRegion[ULOC_COUNTRY_CAPACITY]; char fTargetRegion[ULOC_COUNTRY_CAPACITY];
/* TimeZoneNames object used by this formatter */ /* TimeZoneNames object used by this formatter */
TimeZoneNames* fTimeZoneNames; TimeZoneNames* fTimeZoneNames;
/* TimeZoneGenericNames object used by this formatter - lazily instanti ated */ /* TimeZoneGenericNames object used by this formatter - lazily instanti ated */
skipping to change at line 545 skipping to change at line 556
/* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm " */ /* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm " */
UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS + 1]; UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS + 1];
/* Localized decimal digits used by Localized GMT format */ /* Localized decimal digits used by Localized GMT format */
UChar32 fGMTOffsetDigits[10]; UChar32 fGMTOffsetDigits[10];
/* Localized GMT zero format - e.g. "GMT" */ /* Localized GMT zero format - e.g. "GMT" */
UnicodeString fGMTZeroFormat; UnicodeString fGMTZeroFormat;
/* Bit flags representing parse options */ /* Bit flags representing parse options */
int32_t fDefParseOptionFlags; uint32_t fDefParseOptionFlags;
/* Constant parts of GMT format pattern, populated from localized GMT f ormat pattern*/ /* Constant parts of GMT format pattern, populated from localized GMT f ormat pattern*/
UnicodeString fGMTPatternPrefix; /* Substring before {0} */ UnicodeString fGMTPatternPrefix; /* Substring before {0} */
UnicodeString fGMTPatternSuffix; /* Substring after {0} */ UnicodeString fGMTPatternSuffix; /* Substring after {0} */
/* Compiled offset patterns generated from fGMTOffsetPatterns[] */ /* Compiled offset patterns generated from fGMTOffsetPatterns[] */
UVector* fGMTOffsetPatternItems[UTZFMT_PAT_NEGATIVE_HMS + 1]; UVector* fGMTOffsetPatternItems[UTZFMT_PAT_NEGATIVE_HMS + 1];
/** /**
* Returns the time zone's specific format string. * Returns the time zone's specific format string.
 End of changes. 67 change blocks. 
64 lines changed or deleted 78 lines changed or added


 tznames.h   tznames.h 
skipping to change at line 26 skipping to change at line 26
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
U_CDECL_BEGIN U_CDECL_BEGIN
/** /**
* Constants for time zone display name types. * Constants for time zone display name types.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
typedef enum UTimeZoneNameType { typedef enum UTimeZoneNameType {
/** /**
* Unknown display name type. * Unknown display name type.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZNM_UNKNOWN = 0x00, UTZNM_UNKNOWN = 0x00,
/** /**
* Long display name, such as "Eastern Time". * Long display name, such as "Eastern Time".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZNM_LONG_GENERIC = 0x01, UTZNM_LONG_GENERIC = 0x01,
/** /**
* Long display name for standard time, such as "Eastern Standard Time" . * Long display name for standard time, such as "Eastern Standard Time" .
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZNM_LONG_STANDARD = 0x02, UTZNM_LONG_STANDARD = 0x02,
/** /**
* Long display name for daylight saving time, such as "Eastern Dayligh t Time". * Long display name for daylight saving time, such as "Eastern Dayligh t Time".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZNM_LONG_DAYLIGHT = 0x04, UTZNM_LONG_DAYLIGHT = 0x04,
/** /**
* Short display name, such as "ET". * Short display name, such as "ET".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZNM_SHORT_GENERIC = 0x08, UTZNM_SHORT_GENERIC = 0x08,
/** /**
* Short display name for standard time, such as "EST". * Short display name for standard time, such as "EST".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZNM_SHORT_STANDARD = 0x10, UTZNM_SHORT_STANDARD = 0x10,
/** /**
* Short display name for daylight saving time, such as "EDT". * Short display name for daylight saving time, such as "EDT".
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UTZNM_SHORT_DAYLIGHT = 0x20 UTZNM_SHORT_DAYLIGHT = 0x20
} UTimeZoneNameType; } UTimeZoneNameType;
U_CDECL_END U_CDECL_END
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class UVector; class UVector;
struct MatchInfo; struct MatchInfo;
skipping to change at line 114 skipping to change at line 114
* For example, time zone "Europe/London" has English long name for standar d time "Greenwich Mean Time", which is also * For example, time zone "Europe/London" has English long name for standar d time "Greenwich Mean Time", which is also
* shared with other time zones. However, the long name for daylight saving time is "British Summer Time", which is only * shared with other time zones. However, the long name for daylight saving time is "British Summer Time", which is only
* used for "Europe/London". * used for "Europe/London".
* *
* <p> * <p>
* {@link #getTimeZoneDisplayName} is designed for accessing a name only us ed by a single time zone. * {@link #getTimeZoneDisplayName} is designed for accessing a name only us ed by a single time zone.
* But is not necessarily mean that a subclass implementation use the same model with CLDR. A subclass implementation * But is not necessarily mean that a subclass implementation use the same model with CLDR. A subclass implementation
* may provide time zone names only through {@link #getTimeZoneDisplayName} , or only through {@link #getMetaZoneDisplayName}, * may provide time zone names only through {@link #getTimeZoneDisplayName} , or only through {@link #getMetaZoneDisplayName},
* or both. * or both.
* *
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
class U_I18N_API TimeZoneNames : public UObject { class U_I18N_API TimeZoneNames : public UObject {
public: public:
/** /**
* Destructor. * Destructor.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual ~TimeZoneNames(); virtual ~TimeZoneNames();
/** /**
* Return true if the given TimeZoneNames objects are emantically equal . * Return true if the given TimeZoneNames objects are emantically equal .
* @param other the object to be compared with. * @param other the object to be compared with.
* @return Return TRUE if the given Format objects are semantically equ al. * @return Return TRUE if the given Format objects are semantically equ al.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UBool operator==(const TimeZoneNames& other) const = 0; virtual UBool operator==(const TimeZoneNames& other) const = 0;
/** /**
* Return true if the given TimeZoneNames objects are not semantically * Return true if the given TimeZoneNames objects are not semantically
* equal. * equal.
* @param other the object to be compared with. * @param other the object to be compared with.
* @return Return TRUE if the given Format objects are not semantically equal. * @return Return TRUE if the given Format objects are not semantically equal.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
UBool operator!=(const TimeZoneNames& other) const { return !operator== (other); } UBool operator!=(const TimeZoneNames& other) const { return !operator== (other); }
/** /**
* Clone this object polymorphically. The caller is responsible * Clone this object polymorphically. The caller is responsible
* for deleting the result when done. * for deleting the result when done.
* @return A copy of the object * @return A copy of the object
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual TimeZoneNames* clone() const = 0; virtual TimeZoneNames* clone() const = 0;
/** /**
* Returns an instance of <code>TimeZoneDisplayNames</code> for the spe cified locale. * Returns an instance of <code>TimeZoneDisplayNames</code> for the spe cified locale.
* *
* @param locale The locale. * @param locale The locale.
* @param status Recevies the status. * @param status Recevies the status.
* @return An instance of <code>TimeZoneDisplayNames</code> * @return An instance of <code>TimeZoneDisplayNames</code>
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UE rrorCode& status); static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UE rrorCode& status);
/** /**
* Returns an enumeration of all available meta zone IDs. * Returns an enumeration of all available meta zone IDs.
* @param status Recevies the status. * @param status Recevies the status.
* @return an enumeration object, owned by the caller. * @return an enumeration object, owned by the caller.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const = 0; virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const = 0;
/** /**
* Returns an enumeration of all available meta zone IDs used by the gi ven time zone. * Returns an enumeration of all available meta zone IDs used by the gi ven time zone.
* @param tzID The canoical tiem zone ID. * @param tzID The canoical tiem zone ID.
* @param status Recevies the status. * @param status Recevies the status.
* @return an enumeration object, owned by the caller. * @return an enumeration object, owned by the caller.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const = 0; virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const = 0;
/** /**
* Returns the meta zone ID for the given canonical time zone ID at the given date. * Returns the meta zone ID for the given canonical time zone ID at the given date.
* @param tzID The canonical time zone ID. * @param tzID The canonical time zone ID.
* @param date The date. * @param date The date.
* @param mzID Receives the meta zone ID for the given time zone ID at the given date. If the time zone does not have a * @param mzID Receives the meta zone ID for the given time zone ID at the given date. If the time zone does not have a
* corresponding meta zone at the given date or the implementa tion does not support meta zones, "bogus" state * corresponding meta zone at the given date or the implementa tion does not support meta zones, "bogus" state
* is set. * is set.
* @return A reference to the result. * @return A reference to the result.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate d ate, UnicodeString& mzID) const = 0; virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate d ate, UnicodeString& mzID) const = 0;
/** /**
* Returns the reference zone ID for the given meta zone ID for the reg ion. * Returns the reference zone ID for the given meta zone ID for the reg ion.
* @param mzID The meta zone ID. * @param mzID The meta zone ID.
* @param region The region. * @param region The region.
* @param tzID Receives the reference zone ID ("golden zone" in the LDM L specification) for the given time zone ID for the * @param tzID Receives the reference zone ID ("golden zone" in the LDM L specification) for the given time zone ID for the
* region. If the meta zone is unknown or the implementation d oes not support meta zones, "bogus" state * region. If the meta zone is unknown or the implementation d oes not support meta zones, "bogus" state
* is set. * is set.
* @return A reference to the result. * @return A reference to the result.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, co nst char* region, UnicodeString& tzID) const = 0; virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, co nst char* region, UnicodeString& tzID) const = 0;
/** /**
* Returns the display name of the meta zone. * Returns the display name of the meta zone.
* @param mzID The meta zone ID. * @param mzID The meta zone ID.
* @param type The display name type. See {@link #UTimeZoneNameType}. * @param type The display name type. See {@link #UTimeZoneNameType}.
* @param name Receives the display name of the meta zone. When this ob ject does not have a localized display name for the given * @param name Receives the display name of the meta zone. When this ob ject does not have a localized display name for the given
* meta zone with the specified type or the implementation does not provide any display names associated * meta zone with the specified type or the implementation does not provide any display names associated
* with meta zones, "bogus" state is set. * with meta zones, "bogus" state is set.
* @return A reference to the result. * @return A reference to the result.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UnicodeString& getMetaZoneDisplayName(const UnicodeString& mzID , UTimeZoneNameType type, UnicodeString& name) const = 0; virtual UnicodeString& getMetaZoneDisplayName(const UnicodeString& mzID , UTimeZoneNameType type, UnicodeString& name) const = 0;
/** /**
* Returns the display name of the time zone. Unlike {@link #getDisplay Name}, * Returns the display name of the time zone. Unlike {@link #getDisplay Name},
* this method does not get a name from a meta zone used by the time zo ne. * this method does not get a name from a meta zone used by the time zo ne.
* @param tzID The canonical time zone ID. * @param tzID The canonical time zone ID.
* @param type The display name type. See {@link #UTimeZoneNameType}. * @param type The display name type. See {@link #UTimeZoneNameType}.
* @param name Receives the display name for the time zone. When this o bject does not have a localized display name for the given * @param name Receives the display name for the time zone. When this o bject does not have a localized display name for the given
* time zone with the specified type, "bogus" state is set. * time zone with the specified type, "bogus" state is set.
* @return A reference to the result. * @return A reference to the result.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UnicodeString& getTimeZoneDisplayName(const UnicodeString& tzID , UTimeZoneNameType type, UnicodeString& name) const = 0; virtual UnicodeString& getTimeZoneDisplayName(const UnicodeString& tzID , UTimeZoneNameType type, UnicodeString& name) const = 0;
/** /**
* Returns the exemplar location name for the given time zone. When thi s object does not have a localized location * Returns the exemplar location name for the given time zone. When thi s object does not have a localized location
* name, the default implementation may still returns a programmaticall y generated name with the logic described * name, the default implementation may still returns a programmaticall y generated name with the logic described
* below. * below.
* <ol> * <ol>
* <li>Check if the ID contains "/". If not, return null. * <li>Check if the ID contains "/". If not, return null.
* <li>Check if the ID does not start with "Etc/" or "SystemV/". If it does, return null. * <li>Check if the ID does not start with "Etc/" or "SystemV/". If it does, return null.
* <li>Extract a substring after the last occurrence of "/". * <li>Extract a substring after the last occurrence of "/".
* <li>Replace "_" with " ". * <li>Replace "_" with " ".
* </ol> * </ol>
* For example, "New York" is returned for the time zone ID "America/Ne w_York" when this object does not have the * For example, "New York" is returned for the time zone ID "America/Ne w_York" when this object does not have the
* localized location name. * localized location name.
* *
* @param tzID The canonical time zone ID * @param tzID The canonical time zone ID
* @param name Receives the exemplar location name for the given time z one, or "bogus" state is set when a localized * @param name Receives the exemplar location name for the given time z one, or "bogus" state is set when a localized
* location name is not available and the fallback logic descr ibed above cannot extract location from the ID. * location name is not available and the fallback logic descr ibed above cannot extract location from the ID.
* @return A reference to the result. * @return A reference to the result.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UnicodeString& getExemplarLocationName(const UnicodeString& tzI D, UnicodeString& name) const; virtual UnicodeString& getExemplarLocationName(const UnicodeString& tzI D, UnicodeString& name) const;
/** /**
* Returns the display name of the time zone at the given date. * Returns the display name of the time zone at the given date.
* <p> * <p>
* <b>Note:</b> This method calls the subclass's {@link #getTimeZoneDis playName} first. When the * <b>Note:</b> This method calls the subclass's {@link #getTimeZoneDis playName} first. When the
* result is bogus, this method calls {@link #getMetaZoneID} to get the meta zone ID mapped from the * result is bogus, this method calls {@link #getMetaZoneID} to get the meta zone ID mapped from the
* time zone, then calls {@link #getMetaZoneDisplayName}. * time zone, then calls {@link #getMetaZoneDisplayName}.
* *
* @param tzID The canonical time zone ID. * @param tzID The canonical time zone ID.
* @param type The display name type. See {@link #UTimeZoneNameType}. * @param type The display name type. See {@link #UTimeZoneNameType}.
* @param date The date. * @param date The date.
* @param name Receives the display name for the time zone at the given date. When this object does not have a localized display * @param name Receives the display name for the time zone at the given date. When this object does not have a localized display
* name for the time zone with the specified type and date, "b ogus" state is set. * name for the time zone with the specified type and date, "b ogus" state is set.
* @return A reference to the result. * @return A reference to the result.
* @internal ICU 49 technology preview * @draft ICU 50
*/ */
virtual UnicodeString& getDisplayName(const UnicodeString& tzID, UTimeZ oneNameType type, UDate date, UnicodeString& name) const; virtual UnicodeString& getDisplayName(const UnicodeString& tzID, UTimeZ oneNameType type, UDate date, UnicodeString& name) const;
/** /**
* <code>MatchInfoCollection</code> represents a collection of time zon e name matches used by * <code>MatchInfoCollection</code> represents a collection of time zon e name matches used by
* {@link TimeZoneNames#find}. * {@link TimeZoneNames#find}.
* @internal ICU 49 technology preview * @internal
*/ */
class U_I18N_API MatchInfoCollection : public UMemory { class U_I18N_API MatchInfoCollection : public UMemory {
public: public:
/** /**
* Constructor. * Constructor.
* @internal ICU 49 technology preview * @internal
*/ */
MatchInfoCollection(); MatchInfoCollection();
/** /**
* Destructor. * Destructor.
* @internal ICU 49 technology preview * @internal
*/ */
virtual ~MatchInfoCollection(); virtual ~MatchInfoCollection();
/** /**
* Adds a zone match. * Adds a zone match.
* @param nameType The name type. * @param nameType The name type.
* @param matchLength The match length. * @param matchLength The match length.
* @param tzID The time zone ID. * @param tzID The time zone ID.
* @param status Receives the status * @param status Receives the status
* @internal ICU 49 technology preview * @internal
*/ */
void addZone(UTimeZoneNameType nameType, int32_t matchLength, void addZone(UTimeZoneNameType nameType, int32_t matchLength,
const UnicodeString& tzID, UErrorCode& status); const UnicodeString& tzID, UErrorCode& status);
/** /**
* Adds a meata zone match. * Adds a meata zone match.
* @param nameType The name type. * @param nameType The name type.
* @param matchLength The match length. * @param matchLength The match length.
* @param mzID The metazone ID. * @param mzID The metazone ID.
* @param status Receives the status * @param status Receives the status
* @internal ICU 49 technology preview * @internal
*/ */
void addMetaZone(UTimeZoneNameType nameType, int32_t matchLength, void addMetaZone(UTimeZoneNameType nameType, int32_t matchLength,
const UnicodeString& mzID, UErrorCode& status); const UnicodeString& mzID, UErrorCode& status);
/** /**
* Returns the number of entries available in this object. * Returns the number of entries available in this object.
* @return The number of entries. * @return The number of entries.
* @internal ICU 49 technology preview * @internal
*/ */
int32_t size() const; int32_t size() const;
/** /**
* Returns the time zone name type of a match at the specified inde x. * Returns the time zone name type of a match at the specified inde x.
* @param idx The index * @param idx The index
* @return The time zone name type. If the specified idx is out of range, * @return The time zone name type. If the specified idx is out of range,
* it returns UTZNM_UNKNOWN. * it returns UTZNM_UNKNOWN.
* @see UTimeZoneNameType * @see UTimeZoneNameType
* @internal ICU 49 technology preview * @internal
*/ */
UTimeZoneNameType getNameTypeAt(int32_t idx) const; UTimeZoneNameType getNameTypeAt(int32_t idx) const;
/** /**
* Returns the match length of a match at the specified index. * Returns the match length of a match at the specified index.
* @param idx The index * @param idx The index
* @param status Receives the status
* @return The match length. If the specified idx is out of range, * @return The match length. If the specified idx is out of range,
* it returns 0. * it returns 0.
* @internal ICU 49 technology preview * @internal
*/ */
int32_t getMatchLengthAt(int32_t idx) const; int32_t getMatchLengthAt(int32_t idx) const;
/** /**
* Gets the zone ID of a match at the specified index. * Gets the zone ID of a match at the specified index.
* @param idx The index * @param idx The index
* @param tzID Receives the zone ID. * @param tzID Receives the zone ID.
* @return TRUE if the zone ID was set to tzID. * @return TRUE if the zone ID was set to tzID.
* @internal ICU 49 technology preview * @internal
*/ */
UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const; UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const;
/** /**
* Gets the metazone ID of a match at the specified index. * Gets the metazone ID of a match at the specified index.
* @param idx The index * @param idx The index
* @param mzID Receives the metazone ID * @param mzID Receives the metazone ID
* @param status Receives the status.
* @return TRUE if the meta zone ID was set to mzID. * @return TRUE if the meta zone ID was set to mzID.
* @internal ICU 49 technology preview * @internal
*/ */
UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const; UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const;
private: private:
UVector* fMatches; // vector of MatchEntry UVector* fMatches; // vector of MatchEntry
UVector* matches(UErrorCode& status); UVector* matches(UErrorCode& status);
}; };
/** /**
* Finds time zone name prefix matches for the input text at the * Finds time zone name prefix matches for the input text at the
* given offset and returns a collection of the matches. * given offset and returns a collection of the matches.
* @param text The text. * @param text The text.
* @param start The starting offset within the text. * @param start The starting offset within the text.
* @param types The set of name types represented by bitwise flags of U TimeZoneNameType enums, * @param types The set of name types represented by bitwise flags of U TimeZoneNameType enums,
* or UTZNM_UNKNOWN for all name types. * or UTZNM_UNKNOWN for all name types.
* @param status Receives the status. * @param status Receives the status.
* @return A collection of matches (owned by the caller), or NULL if no matches are found. * @return A collection of matches (owned by the caller), or NULL if no matches are found.
* @see UTimeZoneNameType * @see UTimeZoneNameType
* @see MatchInfoCollection * @see MatchInfoCollection
* @internal ICU 49 technology preview * @internal
*/ */
virtual MatchInfoCollection* find(const UnicodeString& text, int32_t st art, uint32_t types, UErrorCode& status) const = 0; virtual MatchInfoCollection* find(const UnicodeString& text, int32_t st art, uint32_t types, UErrorCode& status) const = 0;
private: private:
// No ICU "poor man's RTTI" for this class nor its subclasses. // No ICU "poor man's RTTI" for this class nor its subclasses.
virtual UClassID getDynamicClassID() const; virtual UClassID getDynamicClassID() const;
}; };
U_NAMESPACE_END U_NAMESPACE_END
 End of changes. 35 change blocks. 
35 lines changed or deleted 33 lines changed or added


 ubidi.h   ubidi.h 
skipping to change at line 1131 skipping to change at line 1131
* @param epiLength is the length of the epilogue; if <code>epiLength==-1</ code> * @param epiLength is the length of the epilogue; if <code>epiLength==-1</ code>
* then the epilogue must be zero-terminated. * then the epilogue must be zero-terminated.
* Otherwise epiLength must be >= 0. If <code>epiLength==0</code>, i t means * Otherwise epiLength must be >= 0. If <code>epiLength==0</code>, i t means
* that there is no epilogue to consider. * that there is no epilogue to consider.
* *
* @param pErrorCode must be a valid pointer to an error code value. * @param pErrorCode must be a valid pointer to an error code value.
* *
* @see ubidi_setPara * @see ubidi_setPara
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
ubidi_setContext(UBiDi *pBiDi, ubidi_setContext(UBiDi *pBiDi,
const UChar *prologue, int32_t proLength, const UChar *prologue, int32_t proLength,
const UChar *epilogue, int32_t epiLength, const UChar *epilogue, int32_t epiLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Perform the Unicode Bidi algorithm. It is defined in the * Perform the Unicode Bidi algorithm. It is defined in the
* <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard A nned #9</a>, * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard A nned #9</a>,
* version 13, * version 13,
* also described in The Unicode Standard, Version 4.0 .<p> * also described in The Unicode Standard, Version 4.0 .<p>
skipping to change at line 1318 skipping to change at line 1318
* @param length is the length of the text; * @param length is the length of the text;
* if <code>length==-1</code> then the text * if <code>length==-1</code> then the text
* must be zero-terminated. * must be zero-terminated.
* *
* @return <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>, * @return <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>,
* <code>UBIDI_NEUTRAL</code> * <code>UBIDI_NEUTRAL</code>
* *
* @see UBiDiDirection * @see UBiDiDirection
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UBiDiDirection U_EXPORT2 U_STABLE UBiDiDirection U_EXPORT2
ubidi_getBaseDirection(const UChar *text, int32_t length ); ubidi_getBaseDirection(const UChar *text, int32_t length );
/** /**
* Get the pointer to the text. * Get the pointer to the text.
* *
* @param pBiDi is the paragraph or line <code>UBiDi</code> object. * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
* *
* @return The pointer to the text that the UBiDi object was created for. * @return The pointer to the text that the UBiDi object was created for.
* *
* @see ubidi_setPara * @see ubidi_setPara
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 ubrk.h   ubrk.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 1996-2011, International Business Machines Corporation and others. * Copyright (C) 1996-2012, International Business Machines Corporation and others.
* All Rights Reserved. * All Rights Reserved.
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef UBRK_H #ifndef UBRK_H
#define UBRK_H #define UBRK_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "unicode/utext.h" #include "unicode/utext.h"
skipping to change at line 338 skipping to change at line 338
* *
* @param bi The break iterator to use. * @param bi The break iterator to use.
* @return The character index most recently returned by \ref ubrk_next, \r ef ubrk_previous, * @return The character index most recently returned by \ref ubrk_next, \r ef ubrk_previous,
* \ref ubrk_first, or \ref ubrk_last. * \ref ubrk_first, or \ref ubrk_last.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ubrk_current(const UBreakIterator *bi); ubrk_current(const UBreakIterator *bi);
/** /**
* Determine the text boundary following the current text boundary. * Advance the iterator to the boundary following the current boundary.
* *
* @param bi The break iterator to use. * @param bi The break iterator to use.
* @return The character index of the next text boundary, or UBRK_DONE * @return The character index of the next text boundary, or UBRK_DONE
* if all text boundaries have been returned. * if all text boundaries have been returned.
* @see ubrk_previous * @see ubrk_previous
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ubrk_next(UBreakIterator *bi); ubrk_next(UBreakIterator *bi);
/** /**
* Determine the text boundary preceding the current text boundary. * Set the iterator position to the boundary preceding the current boundary .
* *
* @param bi The break iterator to use. * @param bi The break iterator to use.
* @return The character index of the preceding text boundary, or UBRK_DONE * @return The character index of the preceding text boundary, or UBRK_DONE
* if all text boundaries have been returned. * if all text boundaries have been returned.
* @see ubrk_next * @see ubrk_next
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ubrk_previous(UBreakIterator *bi); ubrk_previous(UBreakIterator *bi);
/** /**
* Determine the index of the first character in the text being scanned. * Set the iterator position to the index of the first character in the tex t being scanned.
* This is not always the same as index 0 of the text. * This is not always the same as index 0 of the text.
* @param bi The break iterator to use. * @param bi The break iterator to use.
* @return The character index of the first character in the text being sca nned. * @return The character index of the first character in the text being sca nned.
* @see ubrk_last * @see ubrk_last
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ubrk_first(UBreakIterator *bi); ubrk_first(UBreakIterator *bi);
/** /**
* Determine the index immediately <EM>beyond</EM> the last character in th * Set the iterator position to the index immediately <EM>beyond</EM> the l
e text being ast character in the text being scanned.
* scanned.
* This is not the same as the last character. * This is not the same as the last character.
* @param bi The break iterator to use. * @param bi The break iterator to use.
* @return The character offset immediately <EM>beyond</EM> the last charac ter in the * @return The character offset immediately <EM>beyond</EM> the last charac ter in the
* text being scanned. * text being scanned.
* @see ubrk_first * @see ubrk_first
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ubrk_last(UBreakIterator *bi); ubrk_last(UBreakIterator *bi);
/** /**
* Determine the text boundary preceding the specified offset. * Set the iterator position to the first boundary preceding the specified
* The value returned is always smaller than offset, or UBRK_DONE. offset.
* The new position is always smaller than offset, or UBRK_DONE.
* @param bi The break iterator to use. * @param bi The break iterator to use.
* @param offset The offset to begin scanning. * @param offset The offset to begin scanning.
* @return The text boundary preceding offset, or UBRK_DONE. * @return The text boundary preceding offset, or UBRK_DONE.
* @see ubrk_following * @see ubrk_following
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ubrk_preceding(UBreakIterator *bi, ubrk_preceding(UBreakIterator *bi,
int32_t offset); int32_t offset);
/** /**
* Determine the text boundary following the specified offset. * Advance the iterator to the first boundary following the specified offse t.
* The value returned is always greater than offset, or UBRK_DONE. * The value returned is always greater than offset, or UBRK_DONE.
* @param bi The break iterator to use. * @param bi The break iterator to use.
* @param offset The offset to begin scanning. * @param offset The offset to begin scanning.
* @return The text boundary following offset, or UBRK_DONE. * @return The text boundary following offset, or UBRK_DONE.
* @see ubrk_preceding * @see ubrk_preceding
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ubrk_following(UBreakIterator *bi, ubrk_following(UBreakIterator *bi,
int32_t offset); int32_t offset);
 End of changes. 7 change blocks. 
10 lines changed or deleted 10 lines changed or added


 ucal.h   ucal.h 
skipping to change at line 125 skipping to change at line 125
* 23:59 on Dec 31, 1969 &lt; 24:00 on Jan 1, 1970 &lt; 24:01:00 o n Jan 1, 1970 * 23:59 on Dec 31, 1969 &lt; 24:00 on Jan 1, 1970 &lt; 24:01:00 o n Jan 1, 1970
* *
* <li> Although historically not precise, midnight also belongs to "am ", * <li> Although historically not precise, midnight also belongs to "am ",
* and noon belongs to "pm", so on the same day, * and noon belongs to "pm", so on the same day,
* 12:00 am (midnight) &lt; 12:01 am, and 12:00 pm (noon) &lt; 12: 01 pm * 12:00 am (midnight) &lt; 12:01 am, and 12:00 pm (noon) &lt; 12: 01 pm
* </ol> * </ol>
* *
* <p> * <p>
* The date or time format strings are not part of the definition of a * The date or time format strings are not part of the definition of a
* calendar, as those must be modifiable or overridable by the user at * calendar, as those must be modifiable or overridable by the user at
* runtime. Use {@link DateFormat} * runtime. Use {@link icu::DateFormat}
* to format dates. * to format dates.
* *
* <p> * <p>
* <code>Calendar</code> provides an API for field "rolling", where fields * <code>Calendar</code> provides an API for field "rolling", where fields
* can be incremented or decremented, but wrap around. For example, rolling the * can be incremented or decremented, but wrap around. For example, rolling the
* month up in the date <code>December 12, <b>1996</b></code> results in * month up in the date <code>December 12, <b>1996</b></code> results in
* <code>January 12, <b>1996</b></code>. * <code>January 12, <b>1996</b></code>.
* *
* <p> * <p>
* <code>Calendar</code> also provides a date arithmetic function for * <code>Calendar</code> also provides a date arithmetic function for
skipping to change at line 567 skipping to change at line 567
* done by region. * done by region.
* @param rawOffset An offset from GMT in milliseconds, ignoring the * @param rawOffset An offset from GMT in milliseconds, ignoring the
* effect of daylight savings time, if any. When NULL, * effect of daylight savings time, if any. When NULL,
* no filtering done by zone offset. * no filtering done by zone offset.
* @param ec A pointer to an UErrorCode to receive any errors * @param ec A pointer to an UErrorCode to receive any errors
* @return an enumeration object that the caller must dispose of * @return an enumeration object that the caller must dispose of
* using enum_close(), or NULL upon failure. In case of failure, * using enum_close(), or NULL upon failure. In case of failure,
* *ec will indicate the error. * *ec will indicate the error.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UEnumeration* U_EXPORT2 U_STABLE UEnumeration* U_EXPORT2
ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* re gion, ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* re gion,
const int32_t* rawOffset, UErrorCode* ec); const int32_t* rawOffset, UErrorCode* ec);
/** /**
* Create an enumeration over all time zones. * Create an enumeration over all time zones.
* *
* @param ec input/output error code * @param ec input/output error code
* *
* @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
skipping to change at line 1067 skipping to change at line 1067
* @return TRUE if cal1 and cal2 are equivalent, FALSE otherwise. * @return TRUE if cal1 and cal2 are equivalent, FALSE otherwise.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
ucal_equivalentTo(const UCalendar* cal1, ucal_equivalentTo(const UCalendar* cal1,
const UCalendar* cal2); const UCalendar* cal2);
/** /**
* Add a specified signed amount to a particular field in a UCalendar. * Add a specified signed amount to a particular field in a UCalendar.
* This can modify more significant fields in the calendar. * This can modify more significant fields in the calendar.
* Adding a positive value always means moving forward in time, so for the
Gregorian calendar,
* starting with 100 BC and adding +1 to year results in 99 BC (even though
this actually reduces
* the numeric value of the field itself).
* @param cal The UCalendar to which to add. * @param cal The UCalendar to which to add.
* @param field The field to which to add the signed value; one of UCAL_ERA , UCAL_YEAR, UCAL_MONTH, * @param field The field to which to add the signed value; one of UCAL_ERA , UCAL_YEAR, UCAL_MONTH,
* UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL _DAY_OF_WEEK, * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL _DAY_OF_WEEK,
* UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL _MINUTE, UCAL_SECOND, * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL _MINUTE, UCAL_SECOND,
* UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET.
* @param amount The signed amount to add to field. If the amount causes th e value * @param amount The signed amount to add to field. If the amount causes th e value
* to exceed to maximum or minimum values for that field, other fields are modified * to exceed to maximum or minimum values for that field, other fields are modified
* to preserve the magnitude of the change. * to preserve the magnitude of the change.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @see ucal_roll * @see ucal_roll
skipping to change at line 1088 skipping to change at line 1091
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
ucal_add(UCalendar* cal, ucal_add(UCalendar* cal,
UCalendarDateFields field, UCalendarDateFields field,
int32_t amount, int32_t amount,
UErrorCode* status); UErrorCode* status);
/** /**
* Add a specified signed amount to a particular field in a UCalendar. * Add a specified signed amount to a particular field in a UCalendar.
* This will not modify more significant fields in the calendar. * This will not modify more significant fields in the calendar.
* Rolling by a positive value always means moving forward in time (unless
the limit of the
* field is reached, in which case it may pin or wrap), so for Gregorian ca
lendar,
* starting with 100 BC and rolling the year by +1 results in 99 BC.
* When eras have a definite beginning and end (as in the Chinese calendar,
or as in most eras in the
* Japanese calendar) then rolling the year past either limit of the era wi
ll cause the year to wrap around.
* When eras only have a limit at one end, then attempting to roll the year
past that limit will result in
* pinning the year at that limit. Note that for most calendars in which er
a 0 years move forward in time
* (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll t
o result in negative years for
* era 0 (that is the only way to represent years before the calendar epoch
).
* @param cal The UCalendar to which to add. * @param cal The UCalendar to which to add.
* @param field The field to which to add the signed value; one of UCAL_ERA , UCAL_YEAR, UCAL_MONTH, * @param field The field to which to add the signed value; one of UCAL_ERA , UCAL_YEAR, UCAL_MONTH,
* UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL _DAY_OF_WEEK, * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL _DAY_OF_WEEK,
* UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL _MINUTE, UCAL_SECOND, * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL _MINUTE, UCAL_SECOND,
* UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET.
* @param amount The signed amount to add to field. If the amount causes th e value * @param amount The signed amount to add to field. If the amount causes th e value
* to exceed to maximum or minimum values for that field, the field is pinn ed to a permissible * to exceed to maximum or minimum values for that field, the field is pinn ed to a permissible
* value. * value.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @see ucal_add * @see ucal_add
skipping to change at line 1416 skipping to change at line 1428
* @param cal The UCalendar to compare and update. * @param cal The UCalendar to compare and update.
* @param target The target date to compare to the current calendar setting . * @param target The target date to compare to the current calendar setting .
* @param field The field to compare; one of UCAL_ERA, UCAL_YEAR, UCAL_MONT H, * @param field The field to compare; one of UCAL_ERA, UCAL_YEAR, UCAL_MONT H,
* UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL _DAY_OF_WEEK, * UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL _DAY_OF_WEEK,
* UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL _MINUTE, UCAL_SECOND, * UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL _MINUTE, UCAL_SECOND,
* UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET. * UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @return The date difference for the specified field. * @return The date difference for the specified field.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucal_getFieldDifference(UCalendar* cal, ucal_getFieldDifference(UCalendar* cal,
UDate target, UDate target,
UCalendarDateFields field, UCalendarDateFields field,
UErrorCode* status); UErrorCode* status);
#ifndef U_HIDE_DRAFT_API
/**
* Time zone transition types for ucal_getTimeZoneTransitionDate
* @draft ICU 50
*/
enum UTimeZoneTransitionType {
/**
* Get the next transition after the current date,
* i.e. excludes the current date
* @draft ICU 50
*/
UCAL_TZ_TRANSITION_NEXT,
/**
* Get the next transition on or after the current date,
* i.e. may include the current date
* @draft ICU 50
*/
UCAL_TZ_TRANSITION_NEXT_INCLUSIVE,
/**
* Get the previous transition before the current date,
* i.e. excludes the current date
* @draft ICU 50
*/
UCAL_TZ_TRANSITION_PREVIOUS,
/**
* Get the previous transition on or before the current date,
* i.e. may include the current date
* @draft ICU 50
*/
UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE
};
/** @draft ICU 50 */
typedef enum UTimeZoneTransitionType UTimeZoneTransitionType;
/**
* Get the UDate for the next/previous time zone transition relative to
* the calendar's current date, in the time zone to which the calendar
* is currently set. If there is no known time zone transition of the
* requested type relative to the calendar's date, the function returns
* FALSE.
* @param cal The UCalendar to query.
* @param type The type of transition desired.
* @param transition A pointer to a UDate to be set to the transition time.
* If the function returns FALSE, the value set is unspecified.
* @param status A pointer to a UErrorCode to receive any errors.
* @return TRUE if a valid transition time is set in *transition, FALSE
* otherwise.
* @draft ICU 50
*/
U_DRAFT UBool U_EXPORT2
ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionTyp
e type,
UDate* transition, UErrorCode* status);
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 6 change blocks. 
3 lines changed or deleted 82 lines changed or added


 ucasemap.h   ucasemap.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2005-2010, International Business Machines * Copyright (C) 2005-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: ucasemap.h * file name: ucasemap.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2005may06 * created on: 2005may06
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 388 skipping to change at line 388
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucasemap_utf8ToTitle(UCaseMap *csm, ucasemap_utf8ToTitle(UCaseMap *csm,
char *dest, int32_t destCapacity, char *dest, int32_t destCapacity,
const char *src, int32_t srcLength, const char *src, int32_t srcLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
#endif #endif
/** /**
* Case-fold the characters in a UTF-8 string. * Case-folds the characters in a UTF-8 string.
*
* Case-folding is locale-independent and not context-sensitive, * Case-folding is locale-independent and not context-sensitive,
* but there is an option for whether to include or exclude mappings for do tted I * but there is an option for whether to include or exclude mappings for do tted I
* and dotless i that are marked with 'I' in CaseFolding.txt. * and dotless i that are marked with 'T' in CaseFolding.txt.
*
* The result may be longer or shorter than the original. * The result may be longer or shorter than the original.
* The source string and the destination buffer must not overlap. * The source string and the destination buffer must not overlap.
* *
* @param csm UCaseMap service object. * @param csm UCaseMap service object.
* @param dest A buffer for the result string. The result will be NUL- terminated if * @param dest A buffer for the result string. The result will be NUL- terminated if
* the buffer is large enough. * the buffer is large enough.
* The contents is undefined in case of failure. * The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of bytes). If it is 0 , then * @param destCapacity The size of the buffer (number of bytes). If it is 0 , then
* dest may be NULL and the function will only return the length of the result * dest may be NULL and the function will only return the length of the result
* without writing any of the result string. * without writing any of the result string.
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added


 uchar.h   uchar.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File UCHAR.H * File UCHAR.H
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/02/97 aliu Creation. * 04/02/97 aliu Creation.
* 03/29/99 helena Updated for C APIs. * 03/29/99 helena Updated for C APIs.
skipping to change at line 42 skipping to change at line 42
/*========================================================================= =*/ /*========================================================================= =*/
/** /**
* Unicode version number, default for the current ICU version. * Unicode version number, default for the current ICU version.
* The actual Unicode Character Database (UCD) data is stored in uprops.dat * The actual Unicode Character Database (UCD) data is stored in uprops.dat
* and may be generated from UCD files from a different Unicode version. * and may be generated from UCD files from a different Unicode version.
* Call u_getUnicodeVersion to get the actual Unicode version of the data. * Call u_getUnicodeVersion to get the actual Unicode version of the data.
* *
* @see u_getUnicodeVersion * @see u_getUnicodeVersion
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#define U_UNICODE_VERSION "6.1" #define U_UNICODE_VERSION "6.2"
/** /**
* \file * \file
* \brief C API: Unicode Properties * \brief C API: Unicode Properties
* *
* This C API provides low-level access to the Unicode Character Database. * This C API provides low-level access to the Unicode Character Database.
* In addition to raw property values, some convenience functions calculate * In addition to raw property values, some convenience functions calculate
* derived properties, for example for Java-style programming. * derived properties, for example for Java-style programming.
* *
* Unicode assigns each code point (not just assigned character) values for * Unicode assigns each code point (not just assigned character) values for
skipping to change at line 553 skipping to change at line 553
/** String property Unicode_1_Name. /** String property Unicode_1_Name.
This property is of little practical value. This property is of little practical value.
Beginning with ICU 49, ICU APIs return an empty string for this pro perty. Beginning with ICU 49, ICU APIs return an empty string for this pro perty.
Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU 49 */ Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU 49 */
UCHAR_UNICODE_1_NAME=0x400B, UCHAR_UNICODE_1_NAME=0x400B,
/** String property Uppercase_Mapping. /** String property Uppercase_Mapping.
Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */
UCHAR_UPPERCASE_MAPPING=0x400C, UCHAR_UPPERCASE_MAPPING=0x400C,
/** One more than the last constant for string Unicode properties. @sta ble ICU 2.4 */ /** One more than the last constant for string Unicode properties. @sta ble ICU 2.4 */
UCHAR_STRING_LIMIT=0x400D, UCHAR_STRING_LIMIT=0x400D,
#ifndef U_HIDE_DRAFT_API
/** Provisional property Script_Extensions (new in Unicode 6.0). /** Provisional property Script_Extensions (new in Unicode 6.0).
As a provisional property, it may be modified or removed As a provisional property, it may be modified or removed
in future versions of the Unicode Standard, and thus in ICU. in future versions of the Unicode Standard, and thus in ICU.
Some characters are commonly used in multiple scripts. Some characters are commonly used in multiple scripts.
For more information, see UAX #24: http://www.unicode.org/reports/t r24/. For more information, see UAX #24: http://www.unicode.org/reports/t r24/.
Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h. Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h.
@draft ICU 4.6 */ @stable ICU 4.6 */
UCHAR_SCRIPT_EXTENSIONS=0x7000, UCHAR_SCRIPT_EXTENSIONS=0x7000,
/** First constant for Unicode properties with unusual value types. @dr aft ICU 4.6 */ /** First constant for Unicode properties with unusual value types. @st able ICU 4.6 */
UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS,
/** One more than the last constant for Unicode properties with unusual value types. /** One more than the last constant for Unicode properties with unusual value types.
* @draft ICU 4.6 */ * @stable ICU 4.6 */
UCHAR_OTHER_PROPERTY_LIMIT=0x7001, UCHAR_OTHER_PROPERTY_LIMIT=0x7001,
#endif /* U_HIDE_DRAFT_API */
/** Represents a nonexistent or invalid property or property value. @st able ICU 2.4 */ /** Represents a nonexistent or invalid property or property value. @st able ICU 2.4 */
UCHAR_INVALID_CODE = -1 UCHAR_INVALID_CODE = -1
} UProperty; } UProperty;
/** /**
* Data for enumerated Unicode general category types. * Data for enumerated Unicode general category types.
* See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html .
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum UCharCategory typedef enum UCharCategory
skipping to change at line 1652 skipping to change at line 1648
U_GCB_CR = 2, /*[CR]*/ U_GCB_CR = 2, /*[CR]*/
U_GCB_EXTEND = 3, /*[EX]*/ U_GCB_EXTEND = 3, /*[EX]*/
U_GCB_L = 4, /*[L]*/ U_GCB_L = 4, /*[L]*/
U_GCB_LF = 5, /*[LF]*/ U_GCB_LF = 5, /*[LF]*/
U_GCB_LV = 6, /*[LV]*/ U_GCB_LV = 6, /*[LV]*/
U_GCB_LVT = 7, /*[LVT]*/ U_GCB_LVT = 7, /*[LVT]*/
U_GCB_T = 8, /*[T]*/ U_GCB_T = 8, /*[T]*/
U_GCB_V = 9, /*[V]*/ U_GCB_V = 9, /*[V]*/
U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5. 1/ICU 4.0 */ U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5. 1/ICU 4.0 */
U_GCB_PREPEND = 11, /*[PP]*/ U_GCB_PREPEND = 11, /*[PP]*/
U_GCB_COUNT = 12 U_GCB_REGIONAL_INDICATOR = 12, /*[RI]*/ /* new in Unicode 6.2/ICU 50 *
/
U_GCB_COUNT = 13
} UGraphemeClusterBreak; } UGraphemeClusterBreak;
/** /**
* Word Break constants. * Word Break constants.
* (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.) * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.)
* *
* @see UCHAR_WORD_BREAK * @see UCHAR_WORD_BREAK
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum UWordBreakValues { typedef enum UWordBreakValues {
skipping to change at line 1682 skipping to change at line 1679
U_WB_KATAKANA = 3, /*[KA]*/ U_WB_KATAKANA = 3, /*[KA]*/
U_WB_MIDLETTER = 4, /*[ML]*/ U_WB_MIDLETTER = 4, /*[ML]*/
U_WB_MIDNUM = 5, /*[MN]*/ U_WB_MIDNUM = 5, /*[MN]*/
U_WB_NUMERIC = 6, /*[NU]*/ U_WB_NUMERIC = 6, /*[NU]*/
U_WB_EXTENDNUMLET = 7, /*[EX]*/ U_WB_EXTENDNUMLET = 7, /*[EX]*/
U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5. 1/ICU 4.0 */ U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5. 1/ICU 4.0 */
U_WB_EXTEND = 9, /*[Extend]*/ U_WB_EXTEND = 9, /*[Extend]*/
U_WB_LF = 10, /*[LF]*/ U_WB_LF = 10, /*[LF]*/
U_WB_MIDNUMLET =11, /*[MB]*/ U_WB_MIDNUMLET =11, /*[MB]*/
U_WB_NEWLINE =12, /*[NL]*/ U_WB_NEWLINE =12, /*[NL]*/
U_WB_COUNT = 13 U_WB_REGIONAL_INDICATOR = 13, /*[RI]*/ /* new in Unicode 6.2/ICU 50 *
/
U_WB_COUNT = 14
} UWordBreakValues; } UWordBreakValues;
/** /**
* Sentence Break constants. * Sentence Break constants.
* *
* @see UCHAR_SENTENCE_BREAK * @see UCHAR_SENTENCE_BREAK
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum USentenceBreak { typedef enum USentenceBreak {
/* /*
skipping to change at line 1770 skipping to change at line 1768
U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4 /ICU 2.6 */ U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4 /ICU 2.6 */
U_LB_WORD_JOINER = 30, /*[WJ]*/ U_LB_WORD_JOINER = 30, /*[WJ]*/
U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4 .1/ICU 3.4 */ U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4 .1/ICU 3.4 */
U_LB_H3 = 32, /*[H3]*/ U_LB_H3 = 32, /*[H3]*/
U_LB_JL = 33, /*[JL]*/ U_LB_JL = 33, /*[JL]*/
U_LB_JT = 34, /*[JT]*/ U_LB_JT = 34, /*[JT]*/
U_LB_JV = 35, /*[JV]*/ U_LB_JV = 35, /*[JV]*/
U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */
U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/I CU 49 */ U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/I CU 49 */
U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */ U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */
U_LB_COUNT = 39 U_LB_REGIONAL_INDICATOR = 39,/*[RI]*/ /* new in Unicode 6.2/ICU 50 */
U_LB_COUNT = 40
} ULineBreak; } ULineBreak;
/** /**
* Numeric Type constants. * Numeric Type constants.
* *
* @see UCHAR_NUMERIC_TYPE * @see UCHAR_NUMERIC_TYPE
* @stable ICU 2.2 * @stable ICU 2.2
*/ */
typedef enum UNumericType { typedef enum UNumericType {
/* /*
 End of changes. 10 change blocks. 
12 lines changed or deleted 13 lines changed or added


 ucharstriebuilder.h   ucharstriebuilder.h 
skipping to change at line 23 skipping to change at line 23
*/ */
#ifndef __UCHARSTRIEBUILDER_H__ #ifndef __UCHARSTRIEBUILDER_H__
#define __UCHARSTRIEBUILDER_H__ #define __UCHARSTRIEBUILDER_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/stringtriebuilder.h" #include "unicode/stringtriebuilder.h"
#include "unicode/ucharstrie.h" #include "unicode/ucharstrie.h"
#include "unicode/unistr.h" #include "unicode/unistr.h"
/**
* \file
* \brief C++ API: Builder for icu::UCharsTrie
*/
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
class UCharsTrieElement; class UCharsTrieElement;
/** /**
* Builder class for UCharsTrie. * Builder class for UCharsTrie.
* *
* This class is not intended for public subclassing. * This class is not intended for public subclassing.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 uclean.h   uclean.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* Copyright (C) 2001-2011, International Business Machines * Copyright (C) 2001-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** *** *************************************************************************** ***
* file name: uclean.h * file name: uclean.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2001July05 * created on: 2001July05
* created by: George Rhoten * created by: George Rhoten
*/ */
skipping to change at line 146 skipping to change at line 146
* @system * @system
*/ */
typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex); typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex);
/** /**
* Set the functions that ICU will use for mutex operations * Set the functions that ICU will use for mutex operations
* Use of this function is optional; by default (without this function), ICU will * Use of this function is optional; by default (without this function), ICU will
* directly access system functions for mutex operations * directly access system functions for mutex operations
* This function can only be used when ICU is in an initial, unused state , before * This function can only be used when ICU is in an initial, unused state , before
* u_init() has been called. * u_init() has been called.
* This function may be used even when ICU has been built without multi-t
hreaded
* support (see ICU_USE_THREADS pre-processor variable, umutex.h)
* @param context This pointer value will be saved, and then (later) pass ed as * @param context This pointer value will be saved, and then (later) pass ed as
* a parameter to the user-supplied mutex functions each t ime they * a parameter to the user-supplied mutex functions each t ime they
* are called. * are called.
* @param init Pointer to a mutex initialization function. Must be no n-null. * @param init Pointer to a mutex initialization function. Must be no n-null.
* @param destroy Pointer to the mutex destroy function. Must be non-nul l. * @param destroy Pointer to the mutex destroy function. Must be non-nul l.
* @param lock pointer to the mutex lock function. Must be non-null. * @param lock pointer to the mutex lock function. Must be non-null.
* @param unlock Pointer to the mutex unlock function. Must be non-null . * @param unlock Pointer to the mutex unlock function. Must be non-null .
* @param status Receives error values. * @param status Receives error values.
* @stable ICU 2.8 * @stable ICU 2.8
* @system * @system
 End of changes. 2 change blocks. 
4 lines changed or deleted 1 lines changed or added


 ucnv.h   ucnv.h 
skipping to change at line 162 skipping to change at line 162
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UCNV_BOCU1, UCNV_BOCU1,
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UCNV_UTF16, UCNV_UTF16,
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UCNV_UTF32, UCNV_UTF32,
/** @stable ICU 2.2 */ /** @stable ICU 2.2 */
UCNV_CESU8, UCNV_CESU8,
/** @stable ICU 2.4 */ /** @stable ICU 2.4 */
UCNV_IMAP_MAILBOX, UCNV_IMAP_MAILBOX,
/** @draft ICU 4.8 */ /** @stable ICU 4.8 */
UCNV_COMPOUND_TEXT, 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().
* *
skipping to change at line 2018 skipping to change at line 2018
* A Unicode code point may be represented by more than one UTF-8 or UTF-16 code unit * A Unicode code point may be represented by more than one UTF-8 or UTF-16 code unit
* but a UTF-32 converter encodes each code point with 4 bytes. * but a UTF-32 converter encodes each code point with 4 bytes.
* Note: This method is not intended to be used to determine whether the ch arset has a * Note: This method is not intended to be used to determine whether the ch arset has a
* fixed ratio of bytes to Unicode codes <i>units</i> for any particular Un icode encoding form. * fixed ratio of bytes to Unicode codes <i>units</i> for any particular Un icode encoding form.
* FALSE is returned with the UErrorCode if error occurs or cnv is NULL. * FALSE is returned with the UErrorCode if error occurs or cnv is NULL.
* @param cnv The converter to be tested * @param cnv The converter to be tested
* @param status ICU error code in/out paramter * @param status ICU error code in/out paramter
* @return TRUE if the converter is fixed-width * @return TRUE if the converter is fixed-width
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status); ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status);
#endif #endif
#endif #endif
/*_UCNV*/ /*_UCNV*/
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 ucol.h   ucol.h 
skipping to change at line 239 skipping to change at line 239
* These values can be now found in the UColAttributeValue enum. * These values can be now found in the UColAttributeValue enum.
* @stable ICU 2.0 * @stable ICU 2.0
**/ **/
typedef UColAttributeValue UCollationStrength; typedef UColAttributeValue UCollationStrength;
/** Attributes that collation service understands. All the attributes can t ake UCOL_DEFAULT /** Attributes that collation service understands. All the attributes can t ake UCOL_DEFAULT
* value, as well as the values specific to each one. * value, as well as the values specific to each one.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum { typedef enum {
/** Attribute for direction of secondary weights - used in French. /** Attribute for direction of secondary weights - used in Canadian Fr ench.
* Acceptable values are UCOL_ON, which results in secondary weights * Acceptable values are UCOL_ON, which results in secondary weights
* being considered backwards and UCOL_OFF which treats secondary * being considered backwards and UCOL_OFF which treats secondary
* weights in the order they appear.*/ * weights in the order they appear.
* @stable ICU 2.0
*/
UCOL_FRENCH_COLLATION, UCOL_FRENCH_COLLATION,
/** Attribute for handling variable elements. /** Attribute for handling variable elements.
* Acceptable values are UCOL_NON_IGNORABLE (default) * Acceptable values are UCOL_NON_IGNORABLE (default)
* which treats all the codepoints with non-ignorable * which treats all the codepoints with non-ignorable
* primary weights in the same way, * primary weights in the same way,
* and UCOL_SHIFTED which causes codepoints with primary * and UCOL_SHIFTED which causes codepoints with primary
* weights that are equal or below the variable top value * weights that are equal or below the variable top value
* to be ignored on primary level and moved to the quaternary * to be ignored on primary level and moved to the quaternary
* level.*/ * level.
* @stable ICU 2.0
*/
UCOL_ALTERNATE_HANDLING, UCOL_ALTERNATE_HANDLING,
/** Controls the ordering of upper and lower case letters. /** Controls the ordering of upper and lower case letters.
* Acceptable values are UCOL_OFF (default), which orders * Acceptable values are UCOL_OFF (default), which orders
* upper and lower case letters in accordance to their tertiary * upper and lower case letters in accordance to their tertiary
* weights, UCOL_UPPER_FIRST which forces upper case letters to * weights, UCOL_UPPER_FIRST which forces upper case letters to
* sort before lower case letters, and UCOL_LOWER_FIRST which does * sort before lower case letters, and UCOL_LOWER_FIRST which does
* the opposite. */ * the opposite.
* @stable ICU 2.0
*/
UCOL_CASE_FIRST, UCOL_CASE_FIRST,
/** Controls whether an extra case level (positioned before the third /** Controls whether an extra case level (positioned before the third
* level) is generated or not. Acceptable values are UCOL_OFF (default ), * level) is generated or not. Acceptable values are UCOL_OFF (default ),
* when case level is not generated, and UCOL_ON which causes the case * when case level is not generated, and UCOL_ON which causes the case
* level to be generated. Contents of the case level are affected by * level to be generated. Contents of the case level are affected by
* the value of UCOL_CASE_FIRST attribute. A simple way to ignore * the value of UCOL_CASE_FIRST attribute. A simple way to ignore
* accent differences in a string is to set the strength to UCOL_PRIMA RY * accent differences in a string is to set the strength to UCOL_PRIMA RY
* and enable case level. */ * and enable case level.
* @stable ICU 2.0
*/
UCOL_CASE_LEVEL, UCOL_CASE_LEVEL,
/** Controls whether the normalization check and necessary normalizati ons /** Controls whether the normalization check and necessary normalizati ons
* are performed. When set to UCOL_OFF (default) no normalization chec k * are performed. When set to UCOL_OFF (default) no normalization chec k
* is performed. The correctness of the result is guaranteed only if t he * is performed. The correctness of the result is guaranteed only if t he
* input data is in so-called FCD form (see users manual for more info ). * input data is in so-called FCD form (see users manual for more info ).
* When set to UCOL_ON, an incremental check is performed to see wheth er * When set to UCOL_ON, an incremental check is performed to see wheth er
* the input data is in the FCD form. If the data is not in the FCD fo rm, * the input data is in the FCD form. If the data is not in the FCD fo rm,
* incremental NFD normalization is performed. */ * incremental NFD normalization is performed.
* @stable ICU 2.0
*/
UCOL_NORMALIZATION_MODE, UCOL_NORMALIZATION_MODE,
/** An alias for UCOL_NORMALIZATION_MODE attribute */ /** An alias for UCOL_NORMALIZATION_MODE attribute.
* @stable ICU 2.0
*/
UCOL_DECOMPOSITION_MODE = UCOL_NORMALIZATION_MODE, UCOL_DECOMPOSITION_MODE = UCOL_NORMALIZATION_MODE,
/** The strength attribute. Can be either UCOL_PRIMARY, UCOL_SECONDARY , /** The strength attribute. Can be either UCOL_PRIMARY, UCOL_SECONDARY ,
* UCOL_TERTIARY, UCOL_QUATERNARY or UCOL_IDENTICAL. The usual strengt h * UCOL_TERTIARY, UCOL_QUATERNARY or UCOL_IDENTICAL. The usual strengt h
* for most locales (except Japanese) is tertiary. Quaternary strength * for most locales (except Japanese) is tertiary. Quaternary strength
* is useful when combined with shifted setting for alternate handling * is useful when combined with shifted setting for alternate handling
* attribute and for JIS x 4061 collation, when it is used to distingu ish * attribute and for JIS x 4061 collation, when it is used to distingu ish
* between Katakana and Hiragana (this is achieved by setting the * between Katakana and Hiragana (this is achieved by setting the
* UCOL_HIRAGANA_QUATERNARY mode to on. Otherwise, quaternary level * UCOL_HIRAGANA_QUATERNARY mode to on. Otherwise, quaternary level
* is affected only by the number of non ignorable code points in * is affected only by the number of non ignorable code points in
* the string. Identical strength is rarely useful, as it amounts * the string. Identical strength is rarely useful, as it amounts
* to codepoints of the NFD form of the string. */ * to codepoints of the NFD form of the string.
* @stable ICU 2.0
*/
UCOL_STRENGTH, UCOL_STRENGTH,
/** When turned on, this attribute positions Hiragana before all /** When turned on, this attribute positions Hiragana before all
* non-ignorables on quaternary level This is a sneaky way to produce JIS * non-ignorables on quaternary level This is a sneaky way to produce JIS
* sort order */ * sort order.
*
* This attribute is an implementation detail of the CLDR Japanese tai
loring.
* The implementation might change to use a different mechanism
* to achieve the same Japanese sort order.
* Since ICU 50, this attribute is not settable any more via API funct
ions.
* @deprecated ICU 50 Implementation detail, cannot be set via API, mi
ght be removed from implementation.
*/
UCOL_HIRAGANA_QUATERNARY_MODE, UCOL_HIRAGANA_QUATERNARY_MODE,
/** When turned on, this attribute generates a collation key /** When turned on, this attribute generates a collation key
* for the numeric value of substrings of digits. * for the numeric value of substrings of digits.
* This is a way to get '100' to sort AFTER '2'. Note that the longest * This is a way to get '100' to sort AFTER '2'. Note that the longest
* digit substring that can be treated as a single collation element i s * digit substring that can be treated as a single collation element i s
* 254 digits (not counting leading zeros). If a digit substring is * 254 digits (not counting leading zeros). If a digit substring is
* longer than that, the digits beyond the limit will be treated as a * longer than that, the digits beyond the limit will be treated as a
* separate digit substring associated with a separate collation eleme * separate digit substring associated with a separate collation eleme
nt. */ nt.
* @stable ICU 2.8
*/
UCOL_NUMERIC_COLLATION, UCOL_NUMERIC_COLLATION,
/**
* The number of UColAttribute constants.
* @stable ICU 2.0
*/
UCOL_ATTRIBUTE_COUNT UCOL_ATTRIBUTE_COUNT
} UColAttribute; } UColAttribute;
/** Options for retrieving the rule string /** Options for retrieving the rule string
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
typedef enum { typedef enum {
/** Retrieve tailoring only */ /**
* Retrieves the tailoring rules only.
* Same as calling the version of getRules() without UColRuleOption.
* @stable ICU 2.0
*/
UCOL_TAILORING_ONLY, UCOL_TAILORING_ONLY,
/** Retrieve UCA rules and tailoring */ /**
* Retrieves the "UCA rules" concatenated with the tailoring rules.
* The "UCA rules" are an <i>approximation</i> of the root collator's sor
t order.
* They are almost never used or useful at runtime and can be removed fro
m the data.
* See http://userguide.icu-project.org/collation/customization#TOC-Build
ing-on-Existing-Locales
* @stable ICU 2.0
*/
UCOL_FULL_RULES UCOL_FULL_RULES
} UColRuleOption ; } UColRuleOption ;
/** /**
* Open a UCollator for comparing strings. * Open a UCollator for comparing strings.
* The UCollator pointer is used in all the calls to the Collation * The UCollator pointer is used in all the calls to the Collation
* service. After finished, collator must be disposed of by calling * service. After finished, collator must be disposed of by calling
* {@link #ucol_close }. * {@link #ucol_close }.
* @param loc The locale containing the required collation rules. * @param loc The locale containing the required collation rules.
* Special values for locales can be passed in - * Special values for locales can be passed in -
skipping to change at line 498 skipping to change at line 535
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UCollationResult U_EXPORT2 U_STABLE UCollationResult U_EXPORT2
ucol_strcoll( const UCollator *coll, ucol_strcoll( const UCollator *coll,
const UChar *source, const UChar *source,
int32_t sourceLength, int32_t sourceLength,
const UChar *target, const UChar *target,
int32_t targetLength); int32_t targetLength);
/** /**
* Compare two strings in UTF-8.
* The strings will be compared using the options already specified.
* Note: When input string contains malformed a UTF-8 byte sequence,
* this function treats these bytes as REPLACEMENT CHARACTER (U+FFFD).
* @param coll The UCollator containing the comparison rules.
* @param source The source UTF-8 string.
* @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target UTF-8 string.
* @param targetLength The length of target, or -1 if null-terminated.
* @param status A pointer to an UErrorCode to receive any errors
* @return The result of comparing the strings; one of UCOL_EQUAL,
* UCOL_GREATER, UCOL_LESS
* @see ucol_greater
* @see ucol_greaterOrEqual
* @see ucol_equal
* @draft ICU 50
*/
U_DRAFT UCollationResult U_EXPORT2
ucol_strcollUTF8(
const UCollator *coll,
const char *source,
int32_t sourceLength,
const char *target,
int32_t targetLength,
UErrorCode *status);
/**
* Determine if one string is greater than another. * Determine if one string is greater than another.
* This function is equivalent to {@link #ucol_strcoll } == UCOL_GREATER * This function is equivalent to {@link #ucol_strcoll } == UCOL_GREATER
* @param coll The UCollator containing the comparison rules. * @param coll The UCollator containing the comparison rules.
* @param source The source string. * @param source The source string.
* @param sourceLength The length of source, or -1 if null-terminated. * @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target string. * @param target The target string.
* @param targetLength The length of target, or -1 if null-terminated. * @param targetLength The length of target, or -1 if null-terminated.
* @return TRUE if source is greater than target, FALSE otherwise. * @return TRUE if source is greater than target, FALSE otherwise.
* @see ucol_strcoll * @see ucol_strcoll
* @see ucol_greaterOrEqual * @see ucol_greaterOrEqual
skipping to change at line 613 skipping to change at line 677
* will only return the length of the result without writing any of the res ult string (pre-flighting). * will only return the length of the result without writing any of the res ult string (pre-flighting).
* @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a
* failure before the function call. * failure before the function call.
* @return The number of reordering codes written to the dest array. * @return The number of reordering codes written to the dest array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see ucol_getEquivalentReorderCodes * @see ucol_getEquivalentReorderCodes
* @see UScriptCode * @see UScriptCode
* @see UColReorderCode * @see UColReorderCode
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucol_getReorderCodes(const UCollator* coll, ucol_getReorderCodes(const UCollator* coll,
int32_t* dest, int32_t* dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Sets the reordering codes for this collator. * Sets the reordering codes for this collator.
* Collation reordering allows scripts and some other defined blocks of cha racters * Collation reordering allows scripts and some other defined blocks of cha racters
* to be moved relative to each other as a block. This reordering is done o n top of * to be moved relative to each other as a block. This reordering is done o n top of
* the DUCET/CLDR standard collation order. Reordering can specify groups t o be placed * the DUCET/CLDR standard collation order. Reordering can specify groups t o be placed
* at the start and/or the end of the collation order. These groups are spe cified using * at the start and/or the end of the collation order. These groups are spe cified using
skipping to change at line 653 skipping to change at line 717
* length is also set to 0. An empty array will clear any reordering codes on the collator. * length is also set to 0. An empty array will clear any reordering codes on the collator.
* @param reorderCodesLength The length of reorderCodes. * @param reorderCodesLength The length of reorderCodes.
* @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a
* failure before the function call. * failure before the function call.
* @see ucol_getReorderCodes * @see ucol_getReorderCodes
* @see ucol_getEquivalentReorderCodes * @see ucol_getEquivalentReorderCodes
* @see UScriptCode * @see UScriptCode
* @see UColReorderCode * @see UColReorderCode
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
ucol_setReorderCodes(UCollator* coll, ucol_setReorderCodes(UCollator* coll,
const int32_t* reorderCodes, const int32_t* reorderCodes,
int32_t reorderCodesLength, int32_t reorderCodesLength,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Retrieves the reorder codes that are grouped with the given reorder code . Some reorder * Retrieves the reorder codes that are grouped with the given reorder code . Some reorder
* codes will be grouped and must reorder together. * codes will be grouped and must reorder together.
* @param reorderCode The reorder code to determine equivalence for. * @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script ordering. * @param dest The array to fill with the script ordering.
skipping to change at line 675 skipping to change at line 739
* will only return the length of the result without writing any of the res ult string (pre-flighting). * will only return the length of the result without writing any of the res ult string (pre-flighting).
* @param pErrorCode Must be a valid pointer to an error code value, which must not indicate * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate
* a failure before the function call. * a failure before the function call.
* @return The number of reordering codes written to the dest array. * @return The number of reordering codes written to the dest array.
* @see ucol_setReorderCodes * @see ucol_setReorderCodes
* @see ucol_getReorderCodes * @see ucol_getReorderCodes
* @see UScriptCode * @see UScriptCode
* @see UColReorderCode * @see UColReorderCode
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucol_getEquivalentReorderCodes(int32_t reorderCode, ucol_getEquivalentReorderCodes(int32_t reorderCode,
int32_t* dest, int32_t* dest,
int32_t destCapacity, int32_t destCapacity,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Get the display name for a UCollator. * Get the display name for a UCollator.
* The display name is suitable for presentation to a user. * The display name is suitable for presentation to a user.
* @param objLoc The locale of the collator in question. * @param objLoc The locale of the collator in question.
* @param dispLoc The locale for display. * @param dispLoc The locale for display.
skipping to change at line 820 skipping to change at line 884
* than resultCapacity, the returned full name will be truncated and * than resultCapacity, the returned full name will be truncated and
* an error code will be returned. * an error code will be returned.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity, ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
const char* keyword, const char* locale, const char* keyword, const char* locale,
UBool* isAvailable, UErrorCode* status); UBool* isAvailable, UErrorCode* status);
/** /**
* Get the collation rules from a UCollator. * Get the collation tailoring rules from a UCollator.
* The rules will follow the rule syntax. * The rules will follow the rule syntax.
* @param coll The UCollator to query. * @param coll The UCollator to query.
* @param length * @param length
* @return The collation rules. * @return The collation tailoring rules.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE const UChar* U_EXPORT2 U_STABLE const UChar* U_EXPORT2
ucol_getRules( const UCollator *coll, ucol_getRules( const UCollator *coll,
int32_t *length); int32_t *length);
/** Get the short definition string for a collator. This API harvests the c ollator's /** Get the short definition string for a collator. This API harvests the c ollator's
* locale and the attribute set and produces a string that can be used for opening * locale and the attribute set and produces a string that can be used for opening
* a collator with the same properties using the ucol_openFromShortString API. * a collator with the same properties using the ucol_openFromShortString API.
* This string will be normalized. * This string will be normalized.
skipping to change at line 915 skipping to change at line 979
ucol_getSortKey(const UCollator *coll, ucol_getSortKey(const UCollator *coll,
const UChar *source, const UChar *source,
int32_t sourceLength, int32_t sourceLength,
uint8_t *result, uint8_t *result,
int32_t resultLength); int32_t resultLength);
/** Gets the next count bytes of a sort key. Caller needs /** Gets the next count bytes of a sort key. Caller needs
* to preserve state array between calls and to provide * to preserve state array between calls and to provide
* the same type of UCharIterator set with the same string. * the same type of UCharIterator set with the same string.
* The destination buffer provided must be big enough to store * The destination buffer provided must be big enough to store
* the number of requested bytes. Generated sortkey is not * the number of requested bytes.
* compatible with sortkeys generated using ucol_getSortKey *
* API, since we don't do any compression. If uncompressed * The generated sort key may or may not be compatible with
* sortkeys are required, this API can be used. * sort keys generated using ucol_getSortKey().
* @param coll The UCollator containing the collation rules. * @param coll The UCollator containing the collation rules.
* @param iter UCharIterator containing the string we need * @param iter UCharIterator containing the string we need
* the sort key to be calculated for. * the sort key to be calculated for.
* @param state Opaque state of sortkey iteration. * @param state Opaque state of sortkey iteration.
* @param dest Buffer to hold the resulting sortkey part * @param dest Buffer to hold the resulting sortkey part
* @param count number of sort key bytes required. * @param count number of sort key bytes required.
* @param status error code indicator. * @param status error code indicator.
* @return the actual number of bytes of a sortkey. It can be * @return the actual number of bytes of a sortkey. It can be
* smaller than count if we have reached the end of * smaller than count if we have reached the end of
* the sort key. * the sort key.
skipping to change at line 1165 skipping to change at line 1229
/** default memory size for the new clone. It needs to be this large for os /400 large pointers /** default memory size for the new clone. It needs to be this large for os /400 large pointers
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
#define U_COL_SAFECLONE_BUFFERSIZE 528 #define U_COL_SAFECLONE_BUFFERSIZE 528
/** /**
* Returns current rules. Delta defines whether full rules are returned or just the tailoring. * Returns current rules. Delta defines whether full rules are returned or just the tailoring.
* Returns number of UChars needed to store rules. If buffer is NULL or buf ferLen is not enough * Returns number of UChars needed to store rules. If buffer is NULL or buf ferLen is not enough
* to store rules, will store up to available space. * to store rules, will store up to available space.
*
* ucol_getRules() should normally be used instead.
* See http://userguide.icu-project.org/collation/customization#TOC-Buildin
g-on-Existing-Locales
* @param coll collator to get the rules from * @param coll collator to get the rules from
* @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES.
* @param buffer buffer to store the result in. If NULL, you'll get no rule s. * @param buffer buffer to store the result in. If NULL, you'll get no rule s.
* @param bufferLen lenght of buffer to store rules in. If less then needed you'll get only the part that fits in. * @param bufferLen length of buffer to store rules in. If less than needed you'll get only the part that fits in.
* @return current rules * @return current rules
* @stable ICU 2.0 * @stable ICU 2.0
* @see UCOL_FULL_RULES
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen); ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen);
#ifndef U_HIDE_DEPRECATED_API #ifndef U_HIDE_DEPRECATED_API
/** /**
* gets the locale name of the collator. If the collator * gets the locale name of the collator. If the collator
* is instantiated from the rules, then this function returns * is instantiated from the rules, then this function returns
* NULL. * NULL.
* @param coll The UCollator for which the locale is needed * @param coll The UCollator for which the locale is needed
 End of changes. 23 change blocks. 
23 lines changed or deleted 98 lines changed or added


 uconfig.h   uconfig.h 
skipping to change at line 84 skipping to change at line 84
/** /**
* Determines wheter to enable auto cleanup of libraries. * Determines 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
/** /**
* \def ICU_USE_THREADS
*
* Allows thread support (use of mutexes) to be compiled out of ICU.
* Default: use threads.
*
* Even with thread support compiled out, applications may override the
* (empty) mutex implementation with the u_setMutexFunctions() functions.
* @internal
*/
#ifdef ICU_USE_THREADS
/* Use the predefined value. */
#elif defined(APP_NO_THREADS)
/* APP_NO_THREADS is an old symbol. We'll honour it if present. */
# define ICU_USE_THREADS 0
#else
# define ICU_USE_THREADS 1
#endif
/**
* \def U_DISABLE_RENAMING * \def U_DISABLE_RENAMING
* Determines whether to disable renaming or not. * Determines whether to disable renaming or not.
* @internal * @internal
*/ */
#ifndef U_DISABLE_RENAMING #ifndef U_DISABLE_RENAMING
#define U_DISABLE_RENAMING 0 #define U_DISABLE_RENAMING 0
#endif #endif
/** /**
* \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS * \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS
skipping to change at line 312 skipping to change at line 293
* This switch turns off normalization. * This switch turns off normalization.
* It implies turning off several other services as well, for example * It implies turning off several other services as well, for example
* collation and IDNA. * collation and IDNA.
* *
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#ifndef UCONFIG_NO_NORMALIZATION #ifndef UCONFIG_NO_NORMALIZATION
# define UCONFIG_NO_NORMALIZATION 0 # define UCONFIG_NO_NORMALIZATION 0
#elif UCONFIG_NO_NORMALIZATION #elif UCONFIG_NO_NORMALIZATION
/* common library */ /* common library */
/* ICU 50 CJK dictionary BreakIterator uses normalization */
# define UCONFIG_NO_BREAK_ITERATION 1
/* IDNA (UTS #46) is implemented via normalization */
# define UCONFIG_NO_IDNA 1 # define UCONFIG_NO_IDNA 1
/* i18n library */ /* i18n library */
# if UCONFIG_ONLY_COLLATION # if UCONFIG_ONLY_COLLATION
# error Contradictory collation switches in uconfig.h. # error Contradictory collation switches in uconfig.h.
# endif # endif
# define UCONFIG_NO_COLLATION 1 # define UCONFIG_NO_COLLATION 1
# define UCONFIG_NO_TRANSLITERATION 1 # define UCONFIG_NO_TRANSLITERATION 1
#endif #endif
skipping to change at line 406 skipping to change at line 390
* \def UCONFIG_NO_SERVICE * \def UCONFIG_NO_SERVICE
* This switch turns off service registration. * This switch turns off service registration.
* *
* @stable ICU 3.2 * @stable ICU 3.2
*/ */
#ifndef UCONFIG_NO_SERVICE #ifndef UCONFIG_NO_SERVICE
# define UCONFIG_NO_SERVICE 0 # define UCONFIG_NO_SERVICE 0
#endif #endif
/** /**
* \def UCONFIG_INTERNAL_DIGITLIST
* This switch turns on the fast but binary-incompatible Formattable class
with an internal DigitList
*
* @internal
*/
#ifndef UCONFIG_INTERNAL_DIGITLIST
# define UCONFIG_INTERNAL_DIGITLIST 0
#endif
/**
* \def UCONFIG_HAVE_PARSEALLINPUT * \def UCONFIG_HAVE_PARSEALLINPUT
* This switch turns on the "parse all input" attribute. Binary incompatibl e. * This switch turns on the "parse all input" attribute. Binary incompatibl e.
* *
* @internal * @internal
*/ */
#ifndef UCONFIG_HAVE_PARSEALLINPUT #ifndef UCONFIG_HAVE_PARSEALLINPUT
# define UCONFIG_HAVE_PARSEALLINPUT 0 # define UCONFIG_HAVE_PARSEALLINPUT 1
#endif #endif
/** /**
* \def UCONFIG_HAVE_PARSEALLINPUT * \def UCONFIG_FORMAT_FASTPATHS_49
* This switch turns on other formatting fastpaths. Binary incompatible in object DecimalFormat and DecimalFormatSymbols * This switch turns on other formatting fastpaths. Binary incompatible in object DecimalFormat and DecimalFormatSymbols
* *
* @internal * @internal
*/ */
#ifndef UCONFIG_FORMAT_FASTPATHS_49 #ifndef UCONFIG_FORMAT_FASTPATHS_49
# define UCONFIG_FORMAT_FASTPATHS_49 0 # define UCONFIG_FORMAT_FASTPATHS_49 1
#endif #endif
#endif #endif
 End of changes. 6 change blocks. 
33 lines changed or deleted 6 lines changed or added


 ucurr.h   ucurr.h 
skipping to change at line 272 skipping to change at line 272
* The upper bound of the date range, inclusive. When 'to' is U _DATE_MAX, check the availability of * The upper bound of the date range, inclusive. When 'to' is U _DATE_MAX, check the availability of
* the currency any date after 'from' * the currency any date after 'from'
* *
* @param errorCode * @param errorCode
* ICU error code * ICU error code
* *
* @return TRUE if the given ISO 4217 3-letter code is supported on the sp ecified date range. * @return TRUE if the given ISO 4217 3-letter code is supported on the sp ecified date range.
* *
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
ucurr_isAvailable(const UChar* isoCode, ucurr_isAvailable(const UChar* isoCode,
UDate from, UDate from,
UDate to, UDate to,
UErrorCode* errorCode); UErrorCode* errorCode);
/** /**
* Finds the number of valid currency codes for the * Finds the number of valid currency codes for the
* given locale and date. * given locale and date.
* @param locale the locale for which to retrieve the * @param locale the locale for which to retrieve the
* currency count. * currency count.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 udat.h   udat.h 
skipping to change at line 18 skipping to change at line 18
#ifndef UDAT_H #ifndef UDAT_H
#define UDAT_H #define UDAT_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING #if !UCONFIG_NO_FORMATTING
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
#include "unicode/ucal.h" #include "unicode/ucal.h"
#include "unicode/unum.h" #include "unicode/unum.h"
#include "unicode/udisplaycontext.h"
/** /**
* \file * \file
* \brief C API: DateFormat * \brief C API: DateFormat
* *
* <h2> Date Format C API</h2> * <h2> Date Format C API</h2>
* *
* Date Format C API consists of functions that convert dates and * Date Format C API consists of functions that convert dates and
* times from their internal representations to textual form and back again in a * times from their internal representations to textual form and back again in a
* language-independent manner. Converting from the internal representation (milliseconds * language-independent manner. Converting from the internal representation (milliseconds
* since midnight, January 1, 1970) to text is known as "formatting," and c onverting * since midnight, January 1, 1970) to text is known as "formatting," and c onverting
skipping to change at line 169 skipping to change at line 170
UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE, UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE,
UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE, UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE,
UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE, UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE,
UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE, UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE,
/** No style */ /** No style */
UDAT_NONE = -1, UDAT_NONE = -1,
/** for internal API use only */
UDAT_IGNORE = -2
} UDateFormatStyle;
/* Cannot use #ifndef U_HIDE_DRAFT_API for UDateFormatContextType and UDate
FormatContextValue
* since a SimpleDateFormat virtual method & data member depends on them */
/** Date format context types
* @draft ICU 49
*/
typedef enum UDateFormatContextType {
/** /**
* Type (key) for specifying the capitalization context for which a dat * Use the pattern given in the parameter to udat_open
e * @see udat_open
* is to be formatted (possible values are in UDateFormatContextValue). * @draft ICU 50
* @draft ICU 49
*/ */
UDAT_CAPITALIZATION = 1 UDAT_PATTERN = -2,
} UDateFormatContextType;
/** Values for date format context types /** @internal alias to UDAT_PATTERN */
* @draft ICU 49 UDAT_IGNORE = UDAT_PATTERN
*/ } UDateFormatStyle;
typedef enum UDateFormatContextValue {
/** Values for any UDateFormatContextType (key) */ // Skeletons for dates.
/**
* Value for any UDateFormatContextType (such as UDAT_CAPITALIZATION) i
f the
* relevant context to be used in formatting a date is unknown (this is
the
* default value for any UDateFormatContextType when no value has been
* explicitly specified for that UDateFormatContextType).
* @draft ICU 49
*/
UDAT_CONTEXT_UNKNOWN = 0,
#if !UCONFIG_NO_BREAK_ITERATION
/** Values for type (key) UDAT_CAPITALIZATION */
/**
* UDAT_CAPITALIZATION value if a date (or date symbol) is to be format
ted
* with capitalization appropriate for the middle of a sentence.
* @draft ICU 49
*/
UDAT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = 1,
/**
* UDAT_CAPITALIZATION value if a date (or date symbol) is to be format
ted
* with capitalization appropriate for the beginning of a sentence.
* @draft ICU 49
*/
UDAT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = 2,
/**
* UDAT_CAPITALIZATION value if a date (or date symbol) is to be format
ted
* with capitalization appropriate for a user-interface list or menu it
em.
* @draft ICU 49
*/
UDAT_CAPITALIZATION_FOR_UI_LIST_OR_MENU = 3,
/**
* UDAT_CAPITALIZATION value if a date (or date symbol) is to be format
ted
* with capitalization appropriate for stand-alone usage such as an
* isolated name on a calendar page.
* @draft ICU 49
*/
UDAT_CAPITALIZATION_FOR_STANDALONE = 4
#endif
} UDateFormatContextValue;
/** /**
* @{ * Constant for date skeleton with year.
* Below are a set of pre-defined skeletons.
*
* <P>
* A skeleton
* <ol>
* <li>
* only keeps the field pattern letter and ignores all other parts
* in a pattern, such as space, punctuations, and string literals.
* </li>
* <li>
* hides the order of fields.
* </li>
* <li>
* might hide a field's pattern letter length.
*
* For those non-digit calendar fields, the pattern letter length is
* important, such as MMM, MMMM, and MMMMM; EEE and EEEE,
* and the field's pattern letter length is honored.
*
* For the digit calendar fields, such as M or MM, d or dd, yy or yyyy,
* the field pattern length is ignored and the best match, which is defi
ned
* in date time patterns, will be returned without honor the field patte
rn
* letter length in skeleton.
* </li>
* </ol>
*
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_YEAR "y"
#define UDAT_MINUTE_SECOND "ms"
#define UDAT_HOUR24_MINUTE "Hm"
#define UDAT_HOUR24_MINUTE_SECOND "Hms"
#define UDAT_HOUR_MINUTE_SECOND "hms"
#define UDAT_STANDALONE_MONTH "LLLL"
#define UDAT_ABBR_STANDALONE_MONTH "LLL"
#define UDAT_YEAR_QUARTER "yQQQ"
#define UDAT_YEAR_ABBR_QUARTER "yQ"
/** @} */
/** /**
* @{ * Constant for date skeleton with quarter.
* Below are a set of pre-defined skeletons that * @internal ICU 50 technology preview
* have pre-defined interval patterns in resource files. */
* Users are encouraged to use them in date interval format factory methods #define UDAT_QUARTER "QQQQ"
. /**
* * Constant for date skeleton with abbreviated quarter.
* @internal ICU 50 technology preview
*/
#define UDAT_ABBR_QUARTER "QQQ"
/**
* Constant for date skeleton with year and quarter.
* @stable ICU 4.0
*/
#define UDAT_YEAR_QUARTER "yQQQQ"
/**
* Constant for date skeleton with year and abbreviated quarter.
* @stable ICU 4.0
*/
#define UDAT_YEAR_ABBR_QUARTER "yQQQ"
/**
* Constant for date skeleton with month.
* @stable ICU 4.0
*/
#define UDAT_MONTH "MMMM"
/**
* Constant for date skeleton with abbreviated month.
* @stable ICU 4.0
*/
#define UDAT_ABBR_MONTH "MMM"
/**
* Constant for date skeleton with numeric month.
* @stable ICU 4.0
*/
#define UDAT_NUM_MONTH "M"
/**
* Constant for date skeleton with year and month.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#define UDAT_HOUR_MINUTE "hm"
#define UDAT_YEAR "y"
#define UDAT_DAY "d"
#define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd"
#define UDAT_YEAR_NUM_MONTH "yM"
#define UDAT_NUM_MONTH_DAY "Md"
#define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd"
#define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd"
#define UDAT_YEAR_MONTH "yMMMM" #define UDAT_YEAR_MONTH "yMMMM"
/**
* Constant for date skeleton with year and abbreviated month.
* @stable ICU 4.0
*/
#define UDAT_YEAR_ABBR_MONTH "yMMM" #define UDAT_YEAR_ABBR_MONTH "yMMM"
#define UDAT_MONTH_DAY "MMMMd" /**
#define UDAT_ABBR_MONTH_DAY "MMMd" * Constant for date skeleton with year and numeric month.
#define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd" * @stable ICU 4.0
#define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd" */
#define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd" #define UDAT_YEAR_NUM_MONTH "yM"
/**
* Constant for date skeleton with day.
* @stable ICU 4.0
*/
#define UDAT_DAY "d"
/**
* Constant for date skeleton with year, month, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_YEAR_MONTH_DAY "yMMMMd" #define UDAT_YEAR_MONTH_DAY "yMMMMd"
/**
* Constant for date skeleton with year, abbreviated month, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd" #define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd"
/**
* Constant for date skeleton with year, numeric month, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_YEAR_NUM_MONTH_DAY "yMd" #define UDAT_YEAR_NUM_MONTH_DAY "yMd"
#define UDAT_NUM_MONTH "M" /**
#define UDAT_ABBR_MONTH "MMM" * Constant for date skeleton with weekday.
#define UDAT_MONTH "MMMM" * @internal ICU 50 technology preview
#define UDAT_HOUR_MINUTE_GENERIC_TZ "hmv" */
#define UDAT_HOUR_MINUTE_TZ "hmz" #define UDAT_WEEKDAY "EEEE"
#define UDAT_HOUR "h" /**
#define UDAT_HOUR_GENERIC_TZ "hv" * Constant for date skeleton with abbreviated weekday.
#define UDAT_HOUR_TZ "hz" * @internal ICU 50 technology preview
*/
#define UDAT_ABBR_WEEKDAY "E"
/**
* Constant for date skeleton with year, month, weekday, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd"
/**
* Constant for date skeleton with year, abbreviated month, weekday, and da
y.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd"
/**
* Constant for date skeleton with year, numeric month, weekday, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd"
/**
* Constant for date skeleton with long month and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_MONTH_DAY "MMMMd"
/**
* Constant for date skeleton with abbreviated month and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_ABBR_MONTH_DAY "MMMd"
/**
* Constant for date skeleton with numeric month and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_NUM_MONTH_DAY "Md"
/**
* Constant for date skeleton with month, weekday, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd"
/**
* Constant for date skeleton with abbreviated month, weekday, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd"
/**
* Constant for date skeleton with numeric month, weekday, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd"
// Skeletons for times.
/**
* Constant for date skeleton with hour, with the locale's preferred hour f
ormat (12 or 24).
* @stable ICU 4.0
*/
#define UDAT_HOUR "j"
/**
* Constant for date skeleton with hour in 24-hour presentation.
* @internal ICU 50 technology preview
*/
#define UDAT_HOUR24 "H"
/**
* Constant for date skeleton with minute.
* @internal ICU 50 technology preview
*/
#define UDAT_MINUTE "m"
/**
* Constant for date skeleton with hour and minute, with the locale's prefe
rred hour format (12 or 24).
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_HOUR_MINUTE "jm"
/**
* Constant for date skeleton with hour and minute in 24-hour presentation.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_HOUR24_MINUTE "Hm"
/**
* Constant for date skeleton with second.
* @internal ICU 50 technology preview
*/
#define UDAT_SECOND "s"
/**
* Constant for date skeleton with hour, minute, and second,
* with the locale's preferred hour format (12 or 24).
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_HOUR_MINUTE_SECOND "jms"
/**
* Constant for date skeleton with hour, minute, and second in
* 24-hour presentation.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_HOUR24_MINUTE_SECOND "Hms"
/**
* Constant for date skeleton with minute and second.
* Used in combinations date + time, date + time + zone, or time + zone.
* @stable ICU 4.0
*/
#define UDAT_MINUTE_SECOND "ms"
/** @} */ // Skeletons for time zones.
/**
* Constant for <i>generic location format</i>, such as Los Angeles Time;
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM
L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML
Time Zone Fallback</a>
* @internal ICU 50 technology preview
*/
#define UDAT_LOCATION_TZ "VVVV"
/**
* Constant for <i>generic non-location format</i>, such as Pacific Time;
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM
L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML
Time Zone Fallback</a>
* @internal ICU 50 technology preview
*/
#define UDAT_GENERIC_TZ "vvvv"
/**
* Constant for <i>generic non-location format</i>, abbreviated if possible
, such as PT;
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM
L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML
Time Zone Fallback</a>
* @internal ICU 50 technology preview
*/
#define UDAT_ABBR_GENERIC_TZ "v"
/**
* Constant for <i>specific non-location format</i>, such as Pacific Daylig
ht Time;
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM
L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML
Time Zone Fallback</a>
* @internal ICU 50 technology preview
*/
#define UDAT_SPECIFIC_TZ "zzzz"
/**
* Constant for <i>specific non-location format</i>, abbreviated if possibl
e, such as PDT;
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM
L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML
Time Zone Fallback</a>
* @internal ICU 50 technology preview
*/
#define UDAT_ABBR_SPECIFIC_TZ "z"
/**
* Constant for <i>localized GMT/UTC format</i>, such as GMT+8:00 or HPG-8:
00;
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDM
L Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML
Time Zone Fallback</a>
* @internal ICU 50 technology preview
*/
#define UDAT_ABBR_UTC_TZ "ZZZZ"
// deprecated skeleton constants
/**
* Constant for date skeleton with standalone month.
* @deprecated ICU 50 Use UDAT_MONTH instead.
*/
#define UDAT_STANDALONE_MONTH "LLLL"
/**
* Constant for date skeleton with standalone abbreviated month.
* @deprecated ICU 50 Use UDAT_ABBR_MONTH instead.
*/
#define UDAT_ABBR_STANDALONE_MONTH "LLL"
/**
* Constant for date skeleton with hour, minute, and generic timezone.
* @deprecated ICU 50 Use instead UDAT_HOUR_MINUTE UDAT_ABBR_GENERIC_TZ or
some other timezone presentation.
*/
#define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv"
/**
* Constant for date skeleton with hour, minute, and timezone.
* @deprecated ICU 50 Use instead UDAT_HOUR_MINUTE UDAT_ABBR_SPECIFIC_TZ or
some other timezone presentation.
*/
#define UDAT_HOUR_MINUTE_TZ "jmz"
/**
* Constant for date skeleton with hour and generic timezone.
* @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_GENERIC_TZ or some ot
her timezone presentation.
*/
#define UDAT_HOUR_GENERIC_TZ "jv"
/**
* Constant for date skeleton with hour and timezone.
* @deprecated ICU 50 Use instead UDAT_HOUR UDAT_ABBR_SPECIFIC_TZ or some o
ther timezone presentation.
*/
#define UDAT_HOUR_TZ "jz"
/** /**
* FieldPosition and UFieldPosition selectors for format fields * FieldPosition and UFieldPosition selectors for format fields
* defined by DateFormat and UDateFormat. * defined by DateFormat and UDateFormat.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
typedef enum UDateFormatField { typedef enum UDateFormatField {
/** /**
* FieldPosition and UFieldPosition selector for 'G' field alignment, * FieldPosition and UFieldPosition selector for 'G' field alignment,
* corresponding to the UCAL_ERA field. * corresponding to the UCAL_ERA field.
skipping to change at line 379 skipping to change at line 536
/** /**
* FieldPosition and UFieldPosition selector for 's' field alignment, * FieldPosition and UFieldPosition selector for 's' field alignment,
* corresponding to the UCAL_SECOND field. * corresponding to the UCAL_SECOND field.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UDAT_SECOND_FIELD = 7, UDAT_SECOND_FIELD = 7,
/** /**
* FieldPosition and UFieldPosition selector for 'S' field alignment, * FieldPosition and UFieldPosition selector for 'S' field alignment,
* corresponding to the UCAL_MILLISECOND field. * corresponding to the UCAL_MILLISECOND field.
*
* Note: Time formats that use 'S' can display a maximum of three
* significant digits for fractional seconds, corresponding to millisec
ond
* resolution and a fractional seconds sub-pattern of SSS. If the
* sub-pattern is S or SS, the fractional seconds value will be truncat
ed
* (not rounded) to the number of display places specified. If the
* fractional seconds sub-pattern is longer than SSS, the additional
* display places will be filled with zeros.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UDAT_FRACTIONAL_SECOND_FIELD = 8, UDAT_FRACTIONAL_SECOND_FIELD = 8,
/** /**
* FieldPosition and UFieldPosition selector for 'E' field alignment, * FieldPosition and UFieldPosition selector for 'E' field alignment,
* corresponding to the UCAL_DAY_OF_WEEK field. * corresponding to the UCAL_DAY_OF_WEEK field.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UDAT_DAY_OF_WEEK_FIELD = 9, UDAT_DAY_OF_WEEK_FIELD = 9,
skipping to change at line 580 skipping to change at line 745
U_STABLE UCalendarDateFields U_EXPORT2 U_STABLE UCalendarDateFields U_EXPORT2
udat_toCalendarDateField(UDateFormatField field); udat_toCalendarDateField(UDateFormatField field);
/** /**
* Open a new UDateFormat for formatting and parsing dates and times. * Open a new UDateFormat for formatting and parsing dates and times.
* A UDateFormat may be used to format dates in calls to {@link #udat_forma t }, * A UDateFormat may be used to format dates in calls to {@link #udat_forma t },
* and to parse dates in calls to {@link #udat_parse }. * and to parse dates in calls to {@link #udat_parse }.
* @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_ LONG, * @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_ LONG,
* UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time style s * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time style s
* are not currently supported). * are not currently supported).
* When the pattern parameter is used, pass in UDAT_PATTERN for both timeSt yle and dateStyle.
* @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_ LONG, * @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_ LONG,
* UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_REL ATIVE, * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_REL ATIVE,
* UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE. As currently im * UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE.
plemented, * When the pattern parameter is used, pass in UDAT_PATTERN for both timeSt
yle and dateStyle.
* As currently implemented,
* relative date formatting only affects a limited range of calendar days b efore or * relative date formatting only affects a limited range of calendar days b efore or
* after the current date, based on the CLDR &lt;field type="day"&gt;/&lt;r elative&gt; data: For * after the current date, based on the CLDR &lt;field type="day"&gt;/&lt;r elative&gt; data: For
* example, in English, "Yesterday", "Today", and "Tomorrow". Outside of th is range, * example, in English, "Yesterday", "Today", and "Tomorrow". Outside of th is range,
* dates are formatted using the corresponding non-relative style. * dates are formatted using the corresponding non-relative style.
* @param locale The locale specifying the formatting conventions * @param locale The locale specifying the formatting conventions
* @param tzID A timezone ID specifying the timezone to use. If 0, use * @param tzID A timezone ID specifying the timezone to use. If 0, use
* the default timezone. * the default timezone.
* @param tzIDLength The length of tzID, or -1 if null-terminated. * @param tzIDLength The length of tzID, or -1 if null-terminated.
* @param pattern A pattern specifying the format to use. * @param pattern A pattern specifying the format to use.
* @param patternLength The number of characters in the pattern, or -1 if n ull-terminated. * @param patternLength The number of characters in the pattern, or -1 if n ull-terminated.
skipping to change at line 1024 skipping to change at line 1192
* @param type type of the locale we're looking for (valid or actual) * @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation * @param status error code for the operation
* @return the locale name * @return the locale name
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
U_STABLE const char* U_EXPORT2 U_STABLE const char* U_EXPORT2
udat_getLocaleByType(const UDateFormat *fmt, udat_getLocaleByType(const UDateFormat *fmt,
ULocDataLocaleType type, ULocDataLocaleType type,
UErrorCode* status); UErrorCode* status);
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_INTERNAL_API
/** /**
* Set the formatter's default value for a particular context type, * Set a particular UDisplayContext value in the formatter, such as
* such as UDAT_CAPITALIZATION. * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
* @param fmt The formatter for which to set a context type's default value * @param fmt The formatter for which to set a UDisplayContext value.
. * @param value The UDisplayContext value to set.
* @param type The context type for which the default value should be set.
* @param value The default value to set for the specified context type.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @draft ICU 49 * @internal ICU 50 technology preview
*/ */
U_DRAFT void U_EXPORT2 U_INTERNAL void U_EXPORT2
udat_setDefaultContext(UDateFormat* fmt, udat_setContext(UDateFormat* fmt, UDisplayContext value, UErrorCode* status
UDateFormatContextType type, UDateFormatContextValue );
value,
UErrorCode* status);
/** /**
* Get the formatter's default value for a particular context type, * Get the formatter's UDisplayContext value for the specified UDisplayCont
* such as UDAT_CAPITALIZATION. extType,
* @param fmt The formatter from which to get a context type's default valu * such as UDISPCTX_TYPE_CAPITALIZATION.
e. * @param fmt The formatter to query.
* @param type The context type for which the default value should be obtai * @param type The UDisplayContextType whose value to return
ned.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @return The current default value for the specified context type. * @return The UDisplayContextValue for the specified type.
* @draft ICU 49 * @internal ICU 50 technology preview
*/ */
U_DRAFT int32_t U_EXPORT2 U_INTERNAL UDisplayContext U_EXPORT2
udat_getDefaultContext(UDateFormat* fmt, udat_getContext(UDateFormat* fmt, UDisplayContextType type, UErrorCode* sta
UDateFormatContextType type, tus);
UErrorCode* status);
#endif /* U_HIDE_DRAFT_API */ #endif /* U_HIDE_INTERNAL_API */
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
/** /**
* Extract the date pattern from a UDateFormat set for relative date formatt ing. * Extract the date pattern from a UDateFormat set for relative date formatt ing.
* The pattern will follow the pattern syntax rules. * The pattern will follow the pattern syntax rules.
* @param fmt The formatter to query. * @param fmt The formatter to query.
* @param result A pointer to a buffer to receive the pattern. * @param result A pointer to a buffer to receive the pattern.
* @param resultLength The maximum size of result. * @param resultLength The maximum size of result.
* @param status A pointer to a UErrorCode to receive any errors * @param status A pointer to a UErrorCode to receive any errors
* @return The total buffer size needed; if greater than resultLength, the o utput was truncated. * @return The total buffer size needed; if greater than resultLength, the o utput was truncated.
 End of changes. 26 change blocks. 
163 lines changed or deleted 339 lines changed or added


 udata.h   udata.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1999-2010, International Business Machines * Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* file name: udata.h * file name: udata.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 1999oct25 * created on: 1999oct25
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 384 skipping to change at line 384
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
udata_setAppData(const char *packageName, const void *data, UErrorCode *err ); udata_setAppData(const char *packageName, const void *data, UErrorCode *err );
/** /**
* Possible settings for udata_setFileAccess() * Possible settings for udata_setFileAccess()
* @see udata_setFileAccess * @see udata_setFileAccess
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
typedef enum UDataFileAccess { typedef enum UDataFileAccess {
/** ICU looks for data in single files first, then in packages. (defaul t) */ /** ICU looks for data in single files first, then in packages. (defaul t) @stable ICU 3.4 */
UDATA_FILES_FIRST, UDATA_FILES_FIRST,
/** ICU only loads data from packages, not from single files. */ /** An alias for the default access mode. @stable ICU 3.4 */
UDATA_DEFAULT_ACCESS = UDATA_FILES_FIRST,
/** ICU only loads data from packages, not from single files. @stable I
CU 3.4 */
UDATA_ONLY_PACKAGES, UDATA_ONLY_PACKAGES,
/** ICU loads data from packages first, and only from single files /** ICU loads data from packages first, and only from single files
if the data cannot be found in a package. */ if the data cannot be found in a package. @stable ICU 3.4 */
UDATA_PACKAGES_FIRST, UDATA_PACKAGES_FIRST,
/** ICU does not access the file system for data loading. */ /** ICU does not access the file system for data loading. @stable ICU 3 .4 */
UDATA_NO_FILES, UDATA_NO_FILES,
/** An alias for the default access mode. */ /** Number of real UDataFileAccess values. @stable ICU 3.4 */
UDATA_DEFAULT_ACCESS = UDATA_FILES_FIRST,
UDATA_FILE_ACCESS_COUNT UDATA_FILE_ACCESS_COUNT
} UDataFileAccess; } UDataFileAccess;
/** /**
* This function may be called to control how ICU loads data. It must be ca lled * This function may be called to control how ICU loads data. It must be ca lled
* before any ICU data is loaded, including application data loaded with * before any ICU data is loaded, including application data loaded with
* ures/ResourceBundle or udata APIs. This function is not multithread safe . * ures/ResourceBundle or udata APIs. This function is not multithread safe .
* The results of calling it while other threads are loading data are undef ined. * The results of calling it while other threads are loading data are undef ined.
* @param access The type of file access to be used * @param access The type of file access to be used
* @param status Error code. * @param status Error code.
 End of changes. 6 change blocks. 
7 lines changed or deleted 9 lines changed or added


 udateintervalformat.h   udateintervalformat.h 
skipping to change at line 106 skipping to change at line 106
* @param tzIDLength * @param tzIDLength
* The length of tzID, or -1 if null-terminated. If 0, use the d efault * The length of tzID, or -1 if null-terminated. If 0, use the d efault
* timezone. * timezone.
* @param status * @param status
* A pointer to a UErrorCode to receive any errors. * A pointer to a UErrorCode to receive any errors.
* @return * @return
* A pointer to a UDateIntervalFormat object for the specified l ocale, * A pointer to a UDateIntervalFormat object for the specified l ocale,
* or NULL if an error occurred. * or NULL if an error occurred.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT UDateIntervalFormat* U_EXPORT2 U_STABLE UDateIntervalFormat* U_EXPORT2
udtitvfmt_open(const char* locale, udtitvfmt_open(const char* locale,
const UChar* skeleton, const UChar* skeleton,
int32_t skeletonLength, int32_t skeletonLength,
const UChar* tzID, const UChar* tzID,
int32_t tzIDLength, int32_t tzIDLength,
UErrorCode* status); UErrorCode* status);
/** /**
* Close a UDateIntervalFormat object. Once closed it may no longer be used . * Close a UDateIntervalFormat object. Once closed it may no longer be used .
* @param formatter * @param formatter
* The UDateIntervalFormat object to close. * The UDateIntervalFormat object to close.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
udtitvfmt_close(UDateIntervalFormat *formatter); udtitvfmt_close(UDateIntervalFormat *formatter);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* \class LocalUDateIntervalFormatPointer * \class LocalUDateIntervalFormatPointer
* "Smart pointer" class, closes a UDateIntervalFormat via udtitvfmt_close( ). * "Smart pointer" class, closes a UDateIntervalFormat via udtitvfmt_close( ).
* For most methods see the LocalPointerBase base class. * For most methods see the LocalPointerBase base class.
skipping to change at line 168 skipping to change at line 168
* the beginning and ending indices of field number position->fi eld, * the beginning and ending indices of field number position->fi eld,
* if such a field exists. This parameter may be NULL, in which case * if such a field exists. This parameter may be NULL, in which case
* no field position data is returned. * no field position data is returned.
* @param status * @param status
* A pointer to a UErrorCode to receive any errors. * A pointer to a UErrorCode to receive any errors.
* @return * @return
* The total buffer size needed; if greater than resultLength, t he * The total buffer size needed; if greater than resultLength, t he
* output was truncated. * output was truncated.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
udtitvfmt_format(const UDateIntervalFormat* formatter, udtitvfmt_format(const UDateIntervalFormat* formatter,
UDate fromDate, UDate fromDate,
UDate toDate, UDate toDate,
UChar* result, UChar* result,
int32_t resultCapacity, int32_t resultCapacity,
UFieldPosition* position, UFieldPosition* position,
UErrorCode* status); UErrorCode* status);
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 udatpg.h   udatpg.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2007-2011, International Business Machines * Copyright (C) 2007-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: udatpg.h * file name: udatpg.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2007jul30 * created on: 2007jul30
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 26 skipping to change at line 26
#ifndef __UDATPG_H__ #ifndef __UDATPG_H__
#define __UDATPG_H__ #define __UDATPG_H__
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/uenum.h" #include "unicode/uenum.h"
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
/** /**
* \file * \file
* \brief C API: Wrapper for DateTimePatternGenerator (unicode/dtptngen.h). * \brief C API: Wrapper for icu::DateTimePatternGenerator (unicode/dtptnge n.h).
* *
* UDateTimePatternGenerator provides flexible generation of date format pa tterns, * UDateTimePatternGenerator provides flexible generation of date format pa tterns,
* like "yy-MM-dd". The user can build up the generator by adding successiv e * like "yy-MM-dd". The user can build up the generator by adding successiv e
* patterns. Once that is done, a query can be made using a "skeleton", whi ch is * patterns. Once that is done, a query can be made using a "skeleton", whi ch is
* a pattern which just includes the desired fields and lengths. The genera tor * a pattern which just includes the desired fields and lengths. The genera tor
* will return the "best fit" pattern corresponding to that skeleton. * will return the "best fit" pattern corresponding to that skeleton.
* <p>The main method people will use is udatpg_getBestPattern, since norma lly * <p>The main method people will use is udatpg_getBestPattern, since norma lly
* UDateTimePatternGenerator is pre-built with data from a particular local e. * UDateTimePatternGenerator is pre-built with data from a particular local e.
* However, generators can be built directly from other data as well. * However, generators can be built directly from other data as well.
* <p><i>Issue: may be useful to also have a function that returns the list of * <p><i>Issue: may be useful to also have a function that returns the list of
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 uenum.h   uenum.h 
skipping to change at line 169 skipping to change at line 169
/** /**
* Given a StringEnumeration, wrap it in a UEnumeration. The * Given a StringEnumeration, wrap it in a UEnumeration. The
* StringEnumeration is adopted; after this call, the caller must not * StringEnumeration is adopted; after this call, the caller must not
* delete it (regardless of error status). * delete it (regardless of error status).
* @param adopted the C++ StringEnumeration to be wrapped in a UEnumeration . * @param adopted the C++ StringEnumeration to be wrapped in a UEnumeration .
* @param ec the error code. * @param ec the error code.
* @return a UEnumeration wrapping the adopted StringEnumeration. * @return a UEnumeration wrapping the adopted StringEnumeration.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_CAPI UEnumeration* U_EXPORT2 U_STABLE UEnumeration* U_EXPORT2
uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode * ec); uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode * ec);
#endif #endif
#ifndef U_HIDE_DRAFT_API
/**
* Given an array of const UChar* strings, return a UEnumeration. String p
ointers from 0..count-1 must not be null.
* Do not free or modify either the string array or the characters it point
s to until this object has been destroyed with uenum_close.
* \snippet test/cintltst/uenumtst.c uenum_openUCharStringsEnumeration
* @param strings array of const UChar* strings (each null terminated). All
storage is owned by the caller.
* @param count length of the array
* @param ec error code
* @return the new UEnumeration object. Caller is responsible for calling u
enum_close to free memory.
* @see uenum_close
* @draft ICU 50
*/
U_DRAFT UEnumeration* U_EXPORT2
uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t cou
nt,
UErrorCode* ec);
#endif
/* Note: next function is not hidden as draft, as it is used internally (i
t was formerly an internal function). */
/**
* Given an array of const char* strings (invariant chars only), return a U
Enumeration. String pointers from 0..count-1 must not be null.
* Do not free or modify either the string array or the characters it point
s to until this object has been destroyed with uenum_close.
* \snippet test/cintltst/uenumtst.c uenum_openCharStringsEnumeration
* @param strings array of char* strings (each null terminated). All stora
ge is owned by the caller.
* @param count length of the array
* @param ec error code
* @return the new UEnumeration object. Caller is responsible for calling u
enum_close to free memory
* @see uenum_close
* @draft ICU 50
*/
U_DRAFT UEnumeration* U_EXPORT2
uenum_openCharStringsEnumeration(const char* const strings[], int32_t count
,
UErrorCode* ec);
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 46 lines changed or added


 uidna.h   uidna.h 
skipping to change at line 137 skipping to change at line 137
* *
* @param options Bit set to modify the processing and error checking. * @param options Bit set to modify the processing and error checking.
* See option bit set values in uidna.h. * See option bit set values in uidna.h.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the UTS #46 UIDNA instance, if successful * @return the UTS #46 UIDNA instance, if successful
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UIDNA * U_EXPORT2 U_STABLE UIDNA * U_EXPORT2
uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode); uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode);
/** /**
* Closes a UIDNA instance. * Closes a UIDNA instance.
* @param idna UIDNA instance to be closed * @param idna UIDNA instance to be closed
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
uidna_close(UIDNA *idna); uidna_close(UIDNA *idna);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* \class LocalUIDNAPointer * \class LocalUIDNAPointer
* "Smart pointer" class, closes a UIDNA via uidna_close(). * "Smart pointer" class, closes a UIDNA via uidna_close().
* For most methods see the LocalPointerBase base class. * For most methods see the LocalPointerBase base class.
skipping to change at line 177 skipping to change at line 177
/** /**
* Output container for IDNA processing errors. * Output container for IDNA processing errors.
* Initialize with UIDNA_INFO_INITIALIZER: * Initialize with UIDNA_INFO_INITIALIZER:
* \code * \code
* UIDNAInfo info = UIDNA_INFO_INITIALIZER; * UIDNAInfo info = UIDNA_INFO_INITIALIZER;
* int32_t length = uidna_nameToASCII(..., &info, &errorCode); * int32_t length = uidna_nameToASCII(..., &info, &errorCode);
* if(U_SUCCESS(errorCode) && info.errors!=0) { ... } * if(U_SUCCESS(errorCode) && info.errors!=0) { ... }
* \endcode * \endcode
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
struct UIDNAInfo { typedef struct UIDNAInfo {
/** sizeof(UIDNAInfo) @stable ICU 4.6 */ /** sizeof(UIDNAInfo) @stable ICU 4.6 */
int16_t size; int16_t size;
/** /**
* Set to TRUE if transitional and nontransitional processing produce d ifferent results. * Set to TRUE if transitional and nontransitional processing produce d ifferent results.
* For details see C++ IDNAInfo::isTransitionalDifferent(). * For details see C++ IDNAInfo::isTransitionalDifferent().
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
UBool isTransitionalDifferent; UBool isTransitionalDifferent;
UBool reservedB3; /**< Reserved field, do not use. @internal */ UBool reservedB3; /**< Reserved field, do not use. @internal */
/** /**
* Bit set indicating IDNA processing errors. 0 if no errors. * Bit set indicating IDNA processing errors. 0 if no errors.
* See UIDNA_ERROR_... constants. * See UIDNA_ERROR_... constants.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
uint32_t errors; uint32_t errors;
int32_t reservedI2; /**< Reserved field, do not use. @internal */ int32_t reservedI2; /**< Reserved field, do not use. @internal */
int32_t reservedI3; /**< Reserved field, do not use. @internal */ int32_t reservedI3; /**< Reserved field, do not use. @internal */
}; } UIDNAInfo;
typedef struct UIDNAInfo UIDNAInfo;
/** /**
* Static initializer for a UIDNAInfo struct. * Static initializer for a UIDNAInfo struct.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
#define UIDNA_INFO_INITIALIZER { \ #define UIDNA_INFO_INITIALIZER { \
(int16_t)sizeof(UIDNAInfo), \ (int16_t)sizeof(UIDNAInfo), \
FALSE, FALSE, \ FALSE, FALSE, \
0, 0, 0 } 0, 0, 0 }
skipping to change at line 230 skipping to change at line 229
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uidna_labelToASCII(const UIDNA *idna, uidna_labelToASCII(const UIDNA *idna,
const UChar *label, int32_t length, const UChar *label, int32_t length,
UChar *dest, int32_t capacity, UChar *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a single domain name label into its Unicode form for human-read able display. * Converts a single domain name label into its Unicode form for human-read able display.
* If any processing step fails, then pInfo->errors will be non-zero. * If any processing step fails, then pInfo->errors will be non-zero.
* The label might be modified according to the types of errors. * The label might be modified according to the types of errors.
* *
skipping to change at line 257 skipping to change at line 256
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uidna_labelToUnicode(const UIDNA *idna, uidna_labelToUnicode(const UIDNA *idna,
const UChar *label, int32_t length, const UChar *label, int32_t length,
UChar *dest, int32_t capacity, UChar *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a whole domain name into its ASCII form for DNS lookup. * Converts a whole domain name into its ASCII form for DNS lookup.
* If any processing step fails, then pInfo->errors will be non-zero and * If any processing step fails, then pInfo->errors will be non-zero and
* the result might not be an ASCII string. * the result might not be an ASCII string.
* The domain name might be modified according to the types of errors. * The domain name might be modified according to the types of errors.
skipping to change at line 286 skipping to change at line 285
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uidna_nameToASCII(const UIDNA *idna, uidna_nameToASCII(const UIDNA *idna,
const UChar *name, int32_t length, const UChar *name, int32_t length,
UChar *dest, int32_t capacity, UChar *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a whole domain name into its Unicode form for human-readable di splay. * Converts a whole domain name into its Unicode form for human-readable di splay.
* If any processing step fails, then pInfo->errors will be non-zero. * If any processing step fails, then pInfo->errors will be non-zero.
* The domain name might be modified according to the types of errors. * The domain name might be modified according to the types of errors.
* *
skipping to change at line 313 skipping to change at line 312
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uidna_nameToUnicode(const UIDNA *idna, uidna_nameToUnicode(const UIDNA *idna,
const UChar *name, int32_t length, const UChar *name, int32_t length,
UChar *dest, int32_t capacity, UChar *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/* UTF-8 versions of the processing methods ------------------------------- -- */ /* UTF-8 versions of the processing methods ------------------------------- -- */
/** /**
* Converts a single domain name label into its ASCII form for DNS lookup. * Converts a single domain name label into its ASCII form for DNS lookup.
* UTF-8 version of uidna_labelToASCII(), same behavior. * UTF-8 version of uidna_labelToASCII(), same behavior.
skipping to change at line 338 skipping to change at line 337
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uidna_labelToASCII_UTF8(const UIDNA *idna, uidna_labelToASCII_UTF8(const UIDNA *idna,
const char *label, int32_t length, const char *label, int32_t length,
char *dest, int32_t capacity, char *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a single domain name label into its Unicode form for human-read able display. * Converts a single domain name label into its Unicode form for human-read able display.
* UTF-8 version of uidna_labelToUnicode(), same behavior. * UTF-8 version of uidna_labelToUnicode(), same behavior.
* *
* @param idna UIDNA instance * @param idna UIDNA instance
skipping to change at line 361 skipping to change at line 360
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uidna_labelToUnicodeUTF8(const UIDNA *idna, uidna_labelToUnicodeUTF8(const UIDNA *idna,
const char *label, int32_t length, const char *label, int32_t length,
char *dest, int32_t capacity, char *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a whole domain name into its ASCII form for DNS lookup. * Converts a whole domain name into its ASCII form for DNS lookup.
* UTF-8 version of uidna_nameToASCII(), same behavior. * UTF-8 version of uidna_nameToASCII(), same behavior.
* *
* @param idna UIDNA instance * @param idna UIDNA instance
skipping to change at line 384 skipping to change at line 383
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uidna_nameToASCII_UTF8(const UIDNA *idna, uidna_nameToASCII_UTF8(const UIDNA *idna,
const char *name, int32_t length, const char *name, int32_t length,
char *dest, int32_t capacity, char *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/** /**
* Converts a whole domain name into its Unicode form for human-readable di splay. * Converts a whole domain name into its Unicode form for human-readable di splay.
* UTF-8 version of uidna_nameToUnicode(), same behavior. * UTF-8 version of uidna_nameToUnicode(), same behavior.
* *
* @param idna UIDNA instance * @param idna UIDNA instance
skipping to change at line 407 skipping to change at line 406
* @param dest Destination string buffer * @param dest Destination string buffer
* @param capacity Destination buffer capacity * @param capacity Destination buffer capacity
* @param pInfo Output container of IDNA processing details. * @param pInfo Output container of IDNA processing details.
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return destination string length * @return destination string length
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uidna_nameToUnicodeUTF8(const UIDNA *idna, uidna_nameToUnicodeUTF8(const UIDNA *idna,
const char *name, int32_t length, const char *name, int32_t length,
char *dest, int32_t capacity, char *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode); UIDNAInfo *pInfo, UErrorCode *pErrorCode);
/* /*
* IDNA error bit set values. * IDNA error bit set values.
* When a domain name or label fails a processing step or does not meet the * When a domain name or label fails a processing step or does not meet the
* validity criteria, then one or more of these error bits are set. * validity criteria, then one or more of these error bits are set.
*/ */
 End of changes. 12 change blocks. 
13 lines changed or deleted 12 lines changed or added


 uldnames.h   uldnames.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2010, International Business Machines Corporation and * * Copyright (C) 2010-2012, International Business Machines Corporation an d *
* others. All Rights Reserved. * * others. All Rights Reserved. *
*************************************************************************** **** *************************************************************************** ****
*/ */
#ifndef __ULDNAMES_H__ #ifndef __ULDNAMES_H__
#define __ULDNAMES_H__ #define __ULDNAMES_H__
/** /**
* \file * \file
* \brief C++ API: Provides display names of Locale ids and their component s. * \brief C API: Provides display names of Locale ids and their components.
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/localpointer.h" #include "unicode/localpointer.h"
#include "unicode/uscript.h" #include "unicode/uscript.h"
#include "unicode/udisplaycontext.h"
/** /**
* Enum used in LocaleDisplayNames::createInstance. * Enum used in LocaleDisplayNames::createInstance.
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
typedef enum { typedef enum {
/** /**
* Use standard names when generating a locale name, * Use standard names when generating a locale name,
* e.g. en_GB displays as 'English (United Kingdom)'. * e.g. en_GB displays as 'English (United Kingdom)'.
* @stable ICU 4.4 * @stable ICU 4.4
skipping to change at line 268 skipping to change at line 269
* @stable ICU 4.4 * @stable ICU 4.4
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn, uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
const char *key, const char *key,
const char *value, const char *value,
UChar *result, UChar *result,
int32_t maxResultSize, int32_t maxResultSize,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
#ifndef U_HIDE_INTERNAL_API
/**
* Returns an instance of LocaleDisplayNames that returns names formatted
* for the provided locale, using the provided UDisplayContext settings.
*
* @param locale The display locale
* @param contexts List of one or more context settings (e.g. for dialect
* handling, capitalization, etc.
* @param length Number of items in the contexts list
* @param pErrorCode Pointer to UErrorCode input/output status. If at entry
this indicates
* a failure status, the function will do nothing; otherwise t
his will be
* updated with any new status from the function.
* @return a ULocaleDisplayNames instance
* @internal ICU 50 technology preview
*/
U_INTERNAL ULocaleDisplayNames * U_EXPORT2
uldn_openForContext(const char * locale, UDisplayContext *contexts,
int32_t length, UErrorCode *pErrorCode);
/**
* Returns the UDisplayContext value for the specified UDisplayContextType.
* @param ldn the ULocaleDisplayNames instance
* @param type the UDisplayContextType whose value to return
* @param pErrorCode Pointer to UErrorCode input/output status. If at entry
this indicates
* a failure status, the function will do nothing; otherwise t
his will be
* updated with any new status from the function.
* @return the UDisplayContextValue for the specified type.
* @internal ICU 50 technology preview
*/
U_INTERNAL UDisplayContext U_EXPORT2
uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type,
UErrorCode *pErrorCode);
#endif /* U_HIDE_INTERNAL_API */
#endif /* !UCONFIG_NO_FORMATTING */ #endif /* !UCONFIG_NO_FORMATTING */
#endif /* __ULDNAMES_H__ */ #endif /* __ULDNAMES_H__ */
 End of changes. 4 change blocks. 
2 lines changed or deleted 42 lines changed or added


 uloc.h   uloc.h 
skipping to change at line 1080 skipping to change at line 1080
* @param localeID the output buffer receiving a locale ID for the * @param localeID the output buffer receiving a locale ID for the
* specified BCP47 language tag. * specified BCP47 language tag.
* @param localeIDCapacity the size of the locale ID output buffer. * @param localeIDCapacity the size of the locale ID output buffer.
* @param parsedLength if not NULL, successfully parsed length * @param parsedLength if not NULL, successfully parsed length
* for the input language tag is set. * for the input language tag is set.
* @param err error information if receiving the locald ID * @param err error information if receiving the locald ID
* failed. * failed.
* @return the length of the locale ID. * @return the length of the locale ID.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uloc_forLanguageTag(const char* langtag, uloc_forLanguageTag(const char* langtag,
char* localeID, char* localeID,
int32_t localeIDCapacity, int32_t localeIDCapacity,
int32_t* parsedLength, int32_t* parsedLength,
UErrorCode* err); UErrorCode* err);
/** /**
* Returns a well-formed language tag for this locale ID. * Returns a well-formed language tag for this locale ID.
* <p> * <p>
* <b>Note</b>: When <code>strict</code> is FALSE, any locale * <b>Note</b>: When <code>strict</code> is FALSE, any locale
skipping to change at line 1108 skipping to change at line 1108
* tag for the locale ID. * tag for the locale ID.
* @param langtagCapacity the size of the BCP47 language tag * @param langtagCapacity the size of the BCP47 language tag
* output buffer. * output buffer.
* @param strict boolean value indicating if the function returns * @param strict boolean value indicating if the function returns
* an error for an ill-formed input locale ID. * an error for an ill-formed input locale ID.
* @param err error information if receiving the language * @param err error information if receiving the language
* tag failed. * tag failed.
* @return The length of the BCP47 language tag. * @return The length of the BCP47 language tag.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uloc_toLanguageTag(const char* localeID, uloc_toLanguageTag(const char* localeID,
char* langtag, char* langtag,
int32_t langtagCapacity, int32_t langtagCapacity,
UBool strict, UBool strict,
UErrorCode* err); UErrorCode* err);
#endif /*_ULOC*/ #endif /*_ULOC*/
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 umachine.h   umachine.h 
skipping to change at line 91 skipping to change at line 91
# define U_CDECL_BEGIN # define U_CDECL_BEGIN
# define U_CDECL_END # define U_CDECL_END
#endif #endif
#ifndef U_ATTRIBUTE_DEPRECATED #ifndef U_ATTRIBUTE_DEPRECATED
/** /**
* \def U_ATTRIBUTE_DEPRECATED * \def U_ATTRIBUTE_DEPRECATED
* This is used for GCC specific attributes * This is used for GCC specific attributes
* @internal * @internal
*/ */
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) #if U_GCC_MAJOR_MINOR >= 302
# define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated)) # define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
/** /**
* \def U_ATTRIBUTE_DEPRECATED * \def U_ATTRIBUTE_DEPRECATED
* This is used for Visual C++ specific attributes * This is used for Visual C++ specific attributes
* @internal * @internal
*/ */
#elif defined(_MSC_VER) && (_MSC_VER >= 1400) #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
# define U_ATTRIBUTE_DEPRECATED __declspec(deprecated) # define U_ATTRIBUTE_DEPRECATED __declspec(deprecated)
#else #else
# define U_ATTRIBUTE_DEPRECATED # define U_ATTRIBUTE_DEPRECATED
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 unistr.h   unistr.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1998-2011, International Business Machines * Copyright (C) 1998-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File unistr.h * File unistr.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 09/25/98 stephen Creation. * 09/25/98 stephen Creation.
* 11/11/98 stephen Changed per 11/9 code review. * 11/11/98 stephen Changed per 11/9 code review.
skipping to change at line 57 skipping to change at line 57
#endif #endif
#ifndef USTRING_H #ifndef USTRING_H
/** /**
* \ingroup ustring_ustrlen * \ingroup ustring_ustrlen
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_strlen(const UChar *s); u_strlen(const UChar *s);
#endif #endif
/**
* \def U_STRING_CASE_MAPPER_DEFINED
* @internal
*/
#ifndef U_STRING_CASE_MAPPER_DEFINED #ifndef U_STRING_CASE_MAPPER_DEFINED
#define U_STRING_CASE_MAPPER_DEFINED #define U_STRING_CASE_MAPPER_DEFINED
/** /**
* Internal string case mapping function type. * Internal string case mapping function type.
* @internal * @internal
*/ */
typedef int32_t U_CALLCONV typedef int32_t U_CALLCONV
UStringCaseMapper(const UCaseMap *csm, UStringCaseMapper(const UCaseMap *csm,
UChar *dest, int32_t destCapacity, UChar *dest, int32_t destCapacity,
skipping to change at line 1816 skipping to change at line 1821
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString &operator=(const UnicodeString &srcText); UnicodeString &operator=(const UnicodeString &srcText);
/** /**
* Almost the same as the assignment operator. * Almost the same as the assignment operator.
* Replace the characters in this UnicodeString * Replace the characters in this UnicodeString
* with the characters from <code>srcText</code>. * with the characters from <code>srcText</code>.
* *
* This function works the same for all strings except for ones that * This function works the same as the assignment operator
* are readonly aliases. * for all strings except for ones that are readonly aliases.
*
* Starting with ICU 2.4, the assignment operator and the copy constructo r * Starting with ICU 2.4, the assignment operator and the copy constructo r
* allocate a new buffer and copy the buffer contents even for readonly a liases. * allocate a new buffer and copy the buffer contents even for readonly a liases.
* This function implements the old, more efficient but less safe behavio r * This function implements the old, more efficient but less safe behavio r
* of making this string also a readonly alias to the same buffer. * of making this string also a readonly alias to the same buffer.
*
* The fastCopyFrom function must be used only if it is known that the li fetime of * The fastCopyFrom function must be used only if it is known that the li fetime of
* this UnicodeString is at least as long as the lifetime of the aliased buffer * this UnicodeString does not exceed the lifetime of the aliased buffer
* including its contents, for example for strings from resource bundles * including its contents, for example for strings from resource bundles
* or aliases to string contents. * or aliases to string constants.
* *
* @param src The text containing the characters to replace. * @param src The text containing the characters to replace.
* @return a reference to this * @return a reference to this
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
UnicodeString &fastCopyFrom(const UnicodeString &src); UnicodeString &fastCopyFrom(const UnicodeString &src);
/** /**
* Assignment operator. Replace the characters in this UnicodeString * Assignment operator. Replace the characters in this UnicodeString
* with the code unit <TT>ch</TT>. * with the code unit <TT>ch</TT>.
skipping to change at line 1931 skipping to change at line 1938
UnicodeString& setTo(UChar32 srcChar); UnicodeString& setTo(UChar32 srcChar);
/** /**
* Aliasing setTo() function, analogous to the readonly-aliasing UChar* c onstructor. * Aliasing setTo() function, analogous to the readonly-aliasing UChar* c onstructor.
* The text will be used for the UnicodeString object, but * The text will be used for the UnicodeString object, but
* it will not be released when the UnicodeString is destroyed. * it will not be released when the UnicodeString is destroyed.
* This has copy-on-write semantics: * This has copy-on-write semantics:
* When the string is modified, then the buffer is first copied into * When the string is modified, then the buffer is first copied into
* newly allocated memory. * newly allocated memory.
* The aliased buffer is never modified. * The aliased buffer is never modified.
* In an assignment to another UnicodeString, the text will be aliased ag *
ain, * In an assignment to another UnicodeString, when using the copy constru
ctor
* or the assignment operator, the text will be copied.
* When using fastCopyFrom(), the text will be aliased again,
* so that both strings then alias the same readonly-text. * so that both strings then alias the same readonly-text.
* *
* @param isTerminated specifies if <code>text</code> is <code>NUL</code> -terminated. * @param isTerminated specifies if <code>text</code> is <code>NUL</code> -terminated.
* This must be true if <code>textLength==-1</code>. * This must be true if <code>textLength==-1</code>.
* @param text The characters to alias for the UnicodeString. * @param text The characters to alias for the UnicodeString.
* @param textLength The number of Unicode characters in <code>text</code > to alias. * @param textLength The number of Unicode characters in <code>text</code > to alias.
* If -1, then this constructor will determine the leng th * If -1, then this constructor will determine the leng th
* by calling <code>u_strlen()</code>. * by calling <code>u_strlen()</code>.
* @return a reference to this * @return a reference to this
* @stable ICU 2.0 * @stable ICU 2.0
skipping to change at line 2678 skipping to change at line 2688
* @see U_TITLECASE_NO_LOWERCASE * @see U_TITLECASE_NO_LOWERCASE
* @see U_TITLECASE_NO_BREAK_ADJUSTMENT * @see U_TITLECASE_NO_BREAK_ADJUSTMENT
* @see ucasemap_open * @see ucasemap_open
* @stable ICU 3.8 * @stable ICU 3.8
*/ */
UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale, ui nt32_t options); UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale, ui nt32_t options);
#endif #endif
/** /**
* Case-fold the characters in this string. * Case-folds the characters in this string.
*
* Case-folding is locale-independent and not context-sensitive, * Case-folding is locale-independent and not context-sensitive,
* but there is an option for whether to include or exclude mappings for dotted I * but there is an option for whether to include or exclude mappings for dotted I
* and dotless i that are marked with 'I' in CaseFolding.txt. * and dotless i that are marked with 'T' in CaseFolding.txt.
*
* The result may be longer or shorter than the original. * The result may be longer or shorter than the original.
* *
* @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECI AL_I * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECI AL_I
* @return A reference to this. * @return A reference to this.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
UnicodeString &foldCase(uint32_t options=0 /*U_FOLD_CASE_DEFAULT*/); UnicodeString &foldCase(uint32_t options=0 /*U_FOLD_CASE_DEFAULT*/);
//======================================== //========================================
// Access to the internal buffer // Access to the internal buffer
skipping to change at line 2902 skipping to change at line 2914
int32_t textLength); int32_t textLength);
/** /**
* Readonly-aliasing UChar* constructor. * Readonly-aliasing UChar* constructor.
* The text will be used for the UnicodeString object, but * The text will be used for the UnicodeString object, but
* it will not be released when the UnicodeString is destroyed. * it will not be released when the UnicodeString is destroyed.
* This has copy-on-write semantics: * This has copy-on-write semantics:
* When the string is modified, then the buffer is first copied into * When the string is modified, then the buffer is first copied into
* newly allocated memory. * newly allocated memory.
* The aliased buffer is never modified. * The aliased buffer is never modified.
* In an assignment to another UnicodeString, the text will be aliased ag *
ain, * In an assignment to another UnicodeString, when using the copy constru
ctor
* or the assignment operator, the text will be copied.
* When using fastCopyFrom(), the text will be aliased again,
* so that both strings then alias the same readonly-text. * so that both strings then alias the same readonly-text.
* *
* @param isTerminated specifies if <code>text</code> is <code>NUL</code> -terminated. * @param isTerminated specifies if <code>text</code> is <code>NUL</code> -terminated.
* This must be true if <code>textLength==-1</code>. * This must be true if <code>textLength==-1</code>.
* @param text The characters to alias for the UnicodeString. * @param text The characters to alias for the UnicodeString.
* @param textLength The number of Unicode characters in <code>text</code > to alias. * @param textLength The number of Unicode characters in <code>text</code > to alias.
* If -1, then this constructor will determine the leng th * If -1, then this constructor will determine the leng th
* by calling <code>u_strlen()</code>. * by calling <code>u_strlen()</code>.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
skipping to change at line 3251 skipping to change at line 3266
UnicodeString &setToUTF8(const StringPiece &utf8); UnicodeString &setToUTF8(const StringPiece &utf8);
// For extract(char*). // For extract(char*).
// We could make a toUTF8(target, capacity, errorCode) public but not // We could make a toUTF8(target, capacity, errorCode) public but not
// this version: New API will be cleaner if we make callers create substr ings // this version: New API will be cleaner if we make callers create substr ings
// rather than having start+length on every method, // rather than having start+length on every method,
// and it should take a UErrorCode&. // and it should take a UErrorCode&.
int32_t int32_t
toUTF8(int32_t start, int32_t len, toUTF8(int32_t start, int32_t len,
char *target, int32_t capacity) const; char *target, int32_t capacity) const;
/**
* Internal string contents comparison, called by operator==.
* Requires: this & text not bogus and have same lengths.
*/
UBool doEquals(const UnicodeString &text, int32_t len) const;
inline int8_t inline int8_t
doCompare(int32_t start, doCompare(int32_t start,
int32_t length, int32_t length,
const UnicodeString& srcText, const UnicodeString& srcText,
int32_t srcStart, int32_t srcStart,
int32_t srcLength) const; int32_t srcLength) const;
int8_t doCompare(int32_t start, int8_t doCompare(int32_t start,
int32_t length, int32_t length,
const UChar *srcChars, const UChar *srcChars,
skipping to change at line 3643 skipping to change at line 3664
} }
} }
inline UBool inline UBool
UnicodeString::operator== (const UnicodeString& text) const UnicodeString::operator== (const UnicodeString& text) const
{ {
if(isBogus()) { if(isBogus()) {
return text.isBogus(); return text.isBogus();
} else { } else {
int32_t len = length(), textLength = text.length(); int32_t len = length(), textLength = text.length();
return return !text.isBogus() && len == textLength && doEquals(text, len);
!text.isBogus() &&
len == textLength &&
doCompare(0, len, text, 0, textLength) == 0;
} }
} }
inline UBool inline UBool
UnicodeString::operator!= (const UnicodeString& text) const UnicodeString::operator!= (const UnicodeString& text) const
{ return (! operator==(text)); } { return (! operator==(text)); }
inline UBool inline UBool
UnicodeString::operator> (const UnicodeString& text) const UnicodeString::operator> (const UnicodeString& text) const
{ return doCompare(0, length(), text, 0, text.length()) == 1; } { return doCompare(0, length(), text, 0, text.length()) == 1; }
 End of changes. 12 change blocks. 
15 lines changed or deleted 33 lines changed or added


 unorm2.h   unorm2.h 
skipping to change at line 126 skipping to change at line 126
struct UNormalizer2; struct UNormalizer2;
typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNorma lizer2. @stable ICU 4.4 */ typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNorma lizer2. @stable ICU 4.4 */
#if !UCONFIG_NO_NORMALIZATION #if !UCONFIG_NO_NORMALIZATION
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_DRAFT_API
/** /**
* Returns a UNormalizer2 instance for Unicode NFC normalization. * Returns a UNormalizer2 instance for Unicode NFC normalization.
* Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @draft ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFCInstance(UErrorCode *pErrorCode); unorm2_getNFCInstance(UErrorCode *pErrorCode);
/** /**
* Returns a UNormalizer2 instance for Unicode NFD normalization. * Returns a UNormalizer2 instance for Unicode NFD normalization.
* Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfc", UNORM2_DECOMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @draft ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFDInstance(UErrorCode *pErrorCode); unorm2_getNFDInstance(UErrorCode *pErrorCode);
/** /**
* Returns a UNormalizer2 instance for Unicode NFKC normalization. * Returns a UNormalizer2 instance for Unicode NFKC normalization.
* Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @draft ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFKCInstance(UErrorCode *pErrorCode); unorm2_getNFKCInstance(UErrorCode *pErrorCode);
/** /**
* Returns a UNormalizer2 instance for Unicode NFKD normalization. * Returns a UNormalizer2 instance for Unicode NFKD normalization.
* Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @draft ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFKDInstance(UErrorCode *pErrorCode); unorm2_getNFKDInstance(UErrorCode *pErrorCode);
/** /**
* Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization. * Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization.
* Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode). * Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode).
* Returns an unmodifiable singleton instance. Do not delete it. * Returns an unmodifiable singleton instance. Do not delete it.
* @param errorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns * pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use wit h * immediately. Check for U_FAILURE() on output or use wit h
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful * @return the requested Normalizer2, if successful
* @draft ICU 49 * @draft ICU 49
*/ */
U_DRAFT const UNormalizer2 * U_EXPORT2 U_DRAFT const UNormalizer2 * U_EXPORT2
unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode);
#endif /* U_HIDE_DRAFT_API */ #endif /* U_HIDE_DRAFT_API */
skipping to change at line 353 skipping to change at line 353
* @param decomposition String buffer which will be set to c's * @param decomposition String buffer which will be set to c's
* decomposition mapping, if there is one. * decomposition mapping, if there is one.
* @param capacity number of UChars that can be written to decomposition * @param capacity number of UChars that can be written to decomposition
* @param pErrorCode Standard ICU error code. Its input value must * @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function return s * pass the U_SUCCESS() test, or else the function return s
* immediately. Check for U_FAILURE() on output or use wi th * immediately. Check for U_FAILURE() on output or use wi th
* function chaining. (See User Guide for details.) * function chaining. (See User Guide for details.)
* @return the non-negative length of c's decomposition, if there is one; o therwise a negative value * @return the non-negative length of c's decomposition, if there is one; o therwise a negative value
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
unorm2_getDecomposition(const UNormalizer2 *norm2, unorm2_getDecomposition(const UNormalizer2 *norm2,
UChar32 c, UChar *decomposition, int32_t capacity, UChar32 c, UChar *decomposition, int32_t capacity,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
#ifndef U_HIDE_DRAFT_API #ifndef U_HIDE_DRAFT_API
/** /**
* Gets the raw decomposition mapping of c. * Gets the raw decomposition mapping of c.
* *
* This is similar to the unorm2_getDecomposition() function but returns th e * This is similar to the unorm2_getDecomposition() function but returns th e
* raw decomposition mapping as specified in UnicodeData.txt or * raw decomposition mapping as specified in UnicodeData.txt or
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added


 unum.h   unum.h 
skipping to change at line 110 skipping to change at line 110
* There are other static options available. Use UNUM_CURRENCY * There are other static options available. Use UNUM_CURRENCY
* to get the currency number format for that country. Use UNUM_PERCENT * to get the currency number format for that country. Use UNUM_PERCENT
* to get a format for displaying percentages. With this format, a * to get a format for displaying percentages. With this format, a
* fraction from 0.53 is displayed as 53%. * fraction from 0.53 is displayed as 53%.
* <P> * <P>
* Use a pattern to create either a DecimalFormat or a RuleBasedNumberForma t * Use a pattern to create either a DecimalFormat or a RuleBasedNumberForma t
* formatter. The pattern must conform to the syntax defined for those * formatter. The pattern must conform to the syntax defined for those
* formatters. * formatters.
* <P> * <P>
* You can also control the display of numbers with such function as * You can also control the display of numbers with such function as
* unum_getAttribues() and unum_setAtributes(), which let you set the * unum_getAttributes() and unum_setAttributes(), which let you set the
* miminum fraction digits, grouping, etc. * miminum fraction digits, grouping, etc.
* @see UNumberFormatAttributes for more details * @see UNumberFormatAttributes for more details
* <P> * <P>
* You can also use forms of the parse and format methods with * You can also use forms of the parse and format methods with
* ParsePosition and UFieldPosition to allow you to: * ParsePosition and UFieldPosition to allow you to:
* <ul type=round> * <ul type=round>
* <li>(a) progressively parse through pieces of a string. * <li>(a) progressively parse through pieces of a string.
* <li>(b) align the decimal point and other areas. * <li>(b) align the decimal point and other areas.
* </ul> * </ul>
* <p> * <p>
skipping to change at line 666 skipping to change at line 666
U_STABLE double U_EXPORT2 U_STABLE double U_EXPORT2
unum_parseDoubleCurrency(const UNumberFormat* fmt, unum_parseDoubleCurrency(const UNumberFormat* fmt,
const UChar* text, const UChar* text,
int32_t textLength, int32_t textLength,
int32_t* parsePos, /* 0 = start */ int32_t* parsePos, /* 0 = start */
UChar* currency, UChar* currency,
UErrorCode* status); UErrorCode* status);
/** /**
* Set the pattern used by a UNumberFormat. This can only be used * Set the pattern used by a UNumberFormat. This can only be used
* on a DecimalFormat, other formats return U_ILLEGAL_ARGUMENT_ERROR * on a DecimalFormat, other formats return U_UNSUPPORTED_ERROR
* in the status. * in the status.
* @param format The formatter to set. * @param format The formatter to set.
* @param localized TRUE if the pattern is localized, FALSE otherwise. * @param localized TRUE if the pattern is localized, FALSE otherwise.
* @param pattern The new pattern * @param pattern The new pattern
* @param patternLength The length of pattern, or -1 if null-terminated. * @param patternLength The length of pattern, or -1 if null-terminated.
* @param parseError A pointer to UParseError to recieve information * @param parseError A pointer to UParseError to recieve information
* about errors occurred during parsing, or NULL if no parse error * about errors occurred during parsing, or NULL if no parse error
* information is desired. * information is desired.
* @param status A pointer to an input-output UErrorCode. * @param status A pointer to an input-output UErrorCode.
* @see unum_toPattern * @see unum_toPattern
skipping to change at line 774 skipping to change at line 774
UNUM_SIGNIFICANT_DIGITS_USED, UNUM_SIGNIFICANT_DIGITS_USED,
/** Minimum significant digits /** Minimum significant digits
* @stable ICU 3.0 */ * @stable ICU 3.0 */
UNUM_MIN_SIGNIFICANT_DIGITS, UNUM_MIN_SIGNIFICANT_DIGITS,
/** Maximum significant digits /** Maximum significant digits
* @stable ICU 3.0 */ * @stable ICU 3.0 */
UNUM_MAX_SIGNIFICANT_DIGITS, UNUM_MAX_SIGNIFICANT_DIGITS,
/** Lenient parse mode used by rule-based formats. /** Lenient parse mode used by rule-based formats.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UNUM_LENIENT_PARSE UNUM_LENIENT_PARSE,
#if UCONFIG_HAVE_PARSEALLINPUT #if UCONFIG_HAVE_PARSEALLINPUT
/** Consume all input. (may use fastpath). Set to UNUM_YES (require fastp ath), UNUM_NO (skip fastpath), or UNUM_MAYBE (heuristic). /** Consume all input. (may use fastpath). Set to UNUM_YES (require fastp ath), UNUM_NO (skip fastpath), or UNUM_MAYBE (heuristic).
* This is an internal ICU API. Do not use.
* @internal * @internal
*/ */
,UNUM_PARSE_ALL_INPUT UNUM_PARSE_ALL_INPUT,
#endif #endif
/** Count of "regular" numeric attributes.
* @internal */
UNUM_NUMERIC_ATTRIBUTE_COUNT,
/** One below the first bitfield-boolean item.
* All items after this one are stored in boolean form.
* @internal */
UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF,
/** If 1, specifies that if setting the "max integer digits" attribute wo
uld truncate a value, set an error status rather than silently truncating.
* For example, formatting the value 1234 with 4 max int digits would su
cceed, but formatting 12345 would fail. There is no effect on parsing.
* Default: 0 (not set)
* @draft ICU 50
*/
UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS,
/**
* if this attribute is set to 1, specifies that, if the pattern doesn't
contain an exponent, the exponent will not be parsed. If the pattern does c
ontain an exponent, this attribute has no effect.
* Has no effect on formatting.
* Default: 0 (unset)
* @draft ICU 50
*/
UNUM_PARSE_NO_EXPONENT,
/** Limit of boolean attributes.
* @internal */
UNUM_LIMIT_BOOLEAN_ATTRIBUTE
} UNumberFormatAttribute; } UNumberFormatAttribute;
/** /**
* Get a numeric attribute associated with a UNumberFormat. * Get a numeric attribute associated with a UNumberFormat.
* An example of a numeric attribute is the number of integer digits a forma tter will produce. * An example of a numeric attribute is the number of integer digits a forma tter will produce.
* @param fmt The formatter to query. * @param fmt The formatter to query.
* @param attr The attribute to query; one of UNUM_PARSE_INT_ONLY, UNUM_GROU PING_USED, * @param attr The attribute to query; one of UNUM_PARSE_INT_ONLY, UNUM_GROU PING_USED,
* UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGI TS, UNUM_INTEGER_DIGITS, * UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGI TS, UNUM_INTEGER_DIGITS,
* UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER, * UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER,
* UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_P OSITION, UNUM_SECONDARY_GROUPING_SIZE. * UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_P OSITION, UNUM_SECONDARY_GROUPING_SIZE.
skipping to change at line 897 skipping to change at line 923
* This is a read-only attribute. The public rulesets are returned as a * This is a read-only attribute. The public rulesets are returned as a
* single string, with each ruleset name delimited by ';' (semicolon). * single string, with each ruleset name delimited by ';' (semicolon).
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
UNUM_PUBLIC_RULESETS UNUM_PUBLIC_RULESETS
} UNumberFormatTextAttribute; } UNumberFormatTextAttribute;
/** /**
* Get a text attribute associated with a UNumberFormat. * Get a text attribute associated with a UNumberFormat.
* An example of a text attribute is the suffix for positive numbers. If th e formatter * An example of a text attribute is the suffix for positive numbers. If th e formatter
* does not understand the attributre, U_UNSUPPORTED_ERROR is returned as th e status. * does not understand the attribute, U_UNSUPPORTED_ERROR is returned as the status.
* Rule-based formatters only understand UNUM_DEFAULT_RULESET and UNUM_PUBLI C_RULESETS. * Rule-based formatters only understand UNUM_DEFAULT_RULESET and UNUM_PUBLI C_RULESETS.
* @param fmt The formatter to query. * @param fmt The formatter to query.
* @param tag The attribute to query; one of UNUM_POSITIVE_PREFIX, UNUM_POSI TIVE_SUFFIX, * @param tag The attribute to query; one of UNUM_POSITIVE_PREFIX, UNUM_POSI TIVE_SUFFIX,
* UNUM_NEGATIVE_PREFIX, UNUM_NEGATIVE_SUFFIX, UNUM_PADDING_CHARACTER, UNUM_ CURRENCY_CODE, * UNUM_NEGATIVE_PREFIX, UNUM_NEGATIVE_SUFFIX, UNUM_PADDING_CHARACTER, UNUM_ CURRENCY_CODE,
* UNUM_DEFAULT_RULESET, or UNUM_PUBLIC_RULESETS. * UNUM_DEFAULT_RULESET, or UNUM_PUBLIC_RULESETS.
* @param result A pointer to a buffer to receive the attribute. * @param result A pointer to a buffer to receive the attribute.
* @param resultLength The maximum size of result. * @param resultLength The maximum size of result.
* @param status A pointer to an UErrorCode to receive any errors * @param status A pointer to an UErrorCode to receive any errors
* @return The total buffer size needed; if greater than resultLength, the o utput was truncated. * @return The total buffer size needed; if greater than resultLength, the o utput was truncated.
* @see unum_setTextAttribute * @see unum_setTextAttribute
 End of changes. 7 change blocks. 
6 lines changed or deleted 36 lines changed or added


 upluralrules.h   upluralrules.h 
skipping to change at line 41 skipping to change at line 41
* Keywords: ICU locale data has 6 predefined values - * Keywords: ICU locale data has 6 predefined values -
* 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check * 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check
* the value of keyword returned by the uplrules_select function. * the value of keyword returned by the uplrules_select function.
* *
* These are based on CLDR <i>Language Plural Rules</i>. For these * These are based on CLDR <i>Language Plural Rules</i>. For these
* predefined rules, see the CLDR page at * predefined rules, see the CLDR page at
* http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plura l_rules.html * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plura l_rules.html
*/ */
/** /**
* Type of plurals and PluralRules.
* @draft ICU 50
*/
enum UPluralType {
/**
* Plural rules for cardinal numbers: 1 file vs. 2 files.
* @draft ICU 50
*/
UPLURAL_TYPE_CARDINAL,
/**
* Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th
file, etc.
* @draft ICU 50
*/
UPLURAL_TYPE_ORDINAL,
/**
* Number of Plural rules types.
* @draft ICU 50
*/
UPLURAL_TYPE_COUNT
};
/**
* @draft ICU 50
*/
typedef enum UPluralType UPluralType;
/**
* Opaque UPluralRules object for use in C programs. * Opaque UPluralRules object for use in C programs.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
struct UPluralRules; struct UPluralRules;
typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPlura lRules. @stable ICU 4.8 */ typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPlura lRules. @stable ICU 4.8 */
/** /**
* Open a new UPluralRules object using the predefined plural rules for a * Opens a new UPluralRules object using the predefined cardinal-number plu ral rules for a
* given locale. * given locale.
* Same as uplrules_openForType(locale, UPLURAL_TYPE_CARDINAL, status).
* @param locale The locale for which the rules are desired. * @param locale The locale for which the rules are desired.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return A UPluralRules for the specified locale, or 0 if an error occurr ed. * @return A UPluralRules for the specified locale, or NULL if an error occ urred.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_STABLE UPluralRules* U_EXPORT2
uplrules_open(const char *locale, UErrorCode *status);
/**
* Opens a new UPluralRules object using the predefined plural rules for a
* given locale and the plural type.
* @param locale The locale for which the rules are desired.
* @param type The plural type (e.g., cardinal or ordinal).
* @param status A pointer to a UErrorCode to receive any errors.
* @return A UPluralRules for the specified locale, or NULL if an error occ
urred.
* @draft ICU 50
*/
U_DRAFT UPluralRules* U_EXPORT2 U_DRAFT UPluralRules* U_EXPORT2
uplrules_open(const char *locale, uplrules_openForType(const char *locale, UPluralType type, UErrorCode *stat
UErrorCode *status); us);
/** /**
* Close a UPluralRules object. Once closed it may no longer be used. * Closes a UPluralRules object. Once closed it may no longer be used.
* @param uplrules The UPluralRules object to close. * @param uplrules The UPluralRules object to close.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
uplrules_close(UPluralRules *uplrules); uplrules_close(UPluralRules *uplrules);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
/** /**
* \class LocalUPluralRulesPointer * \class LocalUPluralRulesPointer
* "Smart pointer" class, closes a UPluralRules via uplrules_close(). * "Smart pointer" class, closes a UPluralRules via uplrules_close().
* For most methods see the LocalPointerBase base class. * For most methods see the LocalPointerBase base class.
skipping to change at line 97 skipping to change at line 135
* Given a number, returns the keyword of the first rule that * Given a number, returns the keyword of the first rule that
* applies to the number, according to the supplied UPluralRules object. * applies to the number, according to the supplied UPluralRules object.
* @param uplrules The UPluralRules object specifying the rules. * @param uplrules The UPluralRules object specifying the rules.
* @param number The number for which the rule has to be determined. * @param number The number for which the rule has to be determined.
* @param keyword The keyword of the rule that applies to number. * @param keyword The keyword of the rule that applies to number.
* @param capacity The capacity of keyword. * @param capacity The capacity of keyword.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The length of keyword. * @return The length of keyword.
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uplrules_select(const UPluralRules *uplrules, uplrules_select(const UPluralRules *uplrules,
double number, double number,
UChar *keyword, int32_t capacity, UChar *keyword, int32_t capacity,
UErrorCode *status); UErrorCode *status);
#endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* #if !UCONFIG_NO_FORMATTING */
#endif #endif
 End of changes. 9 change blocks. 
7 lines changed or deleted 48 lines changed or added


 uregex.h   uregex.h 
skipping to change at line 161 skipping to change at line 161
* example. For default behavior, set this paramete r to zero. * example. For default behavior, set this paramete r to zero.
* See <code>enum URegexpFlag</code>. All desired f lags * See <code>enum URegexpFlag</code>. All desired f lags
* are bitwise-ORed together. * are bitwise-ORed together.
* @param pe Receives the position (line and column numbers) o f any syntax * @param pe Receives the position (line and column numbers) o f any syntax
* error within the source regular expression string . If this * error within the source regular expression string . If this
* information is not wanted, pass NULL for this par ameter. * information is not wanted, pass NULL for this par ameter.
* @param status Receives error detected by this function. * @param status Receives error detected by this function.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT URegularExpression * U_EXPORT2 U_STABLE 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
skipping to change at line 281 skipping to change at line 281
* Returns the source text of the pattern for this regular expression. * Returns the source text of the pattern for this regular expression.
* This function will work even if the pattern was originally specified as a UChar string. * This function will work even if the pattern was originally specified as a UChar string.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @return the pattern text. The storage for the text is owned by the regu lar expression * @return the pattern text. The storage for the text is owned by the regu lar expression
* object, and must not be altered or deleted. * object, and must not be altered or deleted.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
uregex_patternUText(const URegularExpression *regexp, uregex_patternUText(const URegularExpression *regexp,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the match mode flags that were specified when compiling this regula r expression. * Get the match mode flags that were specified when compiling this regula r expression.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @return The match mode flags * @return The match mode flags
* @see URegexpFlag * @see URegexpFlag
* @stable ICU 3.0 * @stable ICU 3.0
skipping to change at line 339 skipping to change at line 339
* string data; only a shallow clone is made. The subject string data mu st not be * string data; only a shallow clone is made. The subject string data mu st not be
* altered after calling this function until after all regular expression * altered after calling this function until after all regular expression
* operations involving this string data are completed. * operations involving this string data are completed.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param text The subject text string. * @param text The subject text string.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_setUText(URegularExpression *regexp, uregex_setUText(URegularExpression *regexp,
UText *text, UText *text,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the subject text that is currently associated with this * Get the subject text that is currently associated with this
* regular expression object. If the input was supplied using uregex_se tText(), * regular expression object. If the input was supplied using uregex_se tText(),
* that pointer will be returned. Otherwise, the characters in the inpu t will * that pointer will be returned. Otherwise, the characters in the inpu t will
* be extracted to a buffer and returned. In either case, ownership rem ains * be extracted to a buffer and returned. In either case, ownership rem ains
* with the regular expression object. * with the regular expression object.
skipping to change at line 385 skipping to change at line 385
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param dest A mutable UText in which to store the current input. * @param dest A mutable UText in which to store the current input.
* If NULL, a new UText will be created as an immutable shallow clone * If NULL, a new UText will be created as an immutable shallow clone
* of the actual input string. * of the actual input string.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @return The subject text currently associated with this regu lar expression. * @return The subject text currently associated with this regu lar expression.
* If a pre-allocated UText was provided, it will alway s be used and returned. * If a pre-allocated UText was provided, it will alway s be used and returned.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
uregex_getUText(URegularExpression *regexp, uregex_getUText(URegularExpression *regexp,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Set the subject text string upon which the regular expression is looki ng for matches * Set the subject text string upon which the regular expression is looki ng for matches
* without changing any other aspect of the matching state. * without changing any other aspect of the matching state.
* The new and previous text strings must have the same content. * The new and previous text strings must have the same content.
* *
* This function is intended for use in environments where ICU is operati ng on * This function is intended for use in environments where ICU is operati ng on
skipping to change at line 415 skipping to change at line 415
* Caution: this function is normally used only by very specialized * Caution: this function is normally used only by very specialized
* system-level code. One example use case is with garbage co llection * system-level code. One example use case is with garbage co llection
* that moves the text in memory. * that moves the text in memory.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param text The new (moved) text string. * @param text The new (moved) text string.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* *
* @stable ICU 4.8 * @stable ICU 4.8
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_refreshUText(URegularExpression *regexp, uregex_refreshUText(URegularExpression *regexp,
UText *text, UText *text,
UErrorCode *status); UErrorCode *status);
/** /**
* Attempts to match the input string against the pattern. * Attempts to match the input string against the pattern.
* To succeed, the match must extend to the end of the string, * To succeed, the match must extend to the end of the string,
* or cover the complete match region. * or cover the complete match region.
* *
* If startIndex >= zero the match operation starts at the specified * If startIndex >= zero the match operation starts at the specified
skipping to change at line 466 skipping to change at line 466
* input string if no region has been set. This directly corresponds to * input string if no region has been set. This directly corresponds to
* Matcher.matches() in Java * Matcher.matches() in Java
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param startIndex The input string (native) index at which to begi n matching, or -1 * @param startIndex The input string (native) index at which to begi n matching, or -1
* to match the input Region. * to match the input Region.
* @param status Receives errors detected by this function. * @param status Receives errors detected by this function.
* @return TRUE if there is a match * @return TRUE if there is a match
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
uregex_matches64(URegularExpression *regexp, uregex_matches64(URegularExpression *regexp,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Attempts to match the input string, starting from the specified index , against the pattern. * Attempts to match the input string, starting from the specified index , against the pattern.
* The match may be of any length, and is not required to extend to the end * The match may be of any length, and is not required to extend to the end
* of the input string. Contrast with uregex_matches(). * of the input string. Contrast with uregex_matches().
* *
* <p>If startIndex is >= 0 any input region that was set for this * <p>If startIndex is >= 0 any input region that was set for this
skipping to change at line 523 skipping to change at line 523
* <code>uregexp_start()</code>, <code>uregexp_end()</code>, * <code>uregexp_start()</code>, <code>uregexp_end()</code>,
* and <code>uregexp_group()</code> functions.</p> * and <code>uregexp_group()</code> functions.</p>
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param startIndex The input string (native) index at which to beg in matching, or * @param startIndex The input string (native) index at which to beg in matching, or
* -1 to match the Input Region * -1 to match the Input Region
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @return TRUE if there is a match. * @return TRUE if there is a match.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_STABLE 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
* Matcher.find(startIndex) in Java. * Matcher.find(startIndex) in Java.
* *
skipping to change at line 572 skipping to change at line 572
* If a match is found, <code>uregex_start(), uregex_end()</code>, and * If a match is found, <code>uregex_start(), uregex_end()</code>, and
* <code>uregex_group()</code> will provide more information regarding t he match. * <code>uregex_group()</code> will provide more information regarding t he match.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param startIndex The position (native) in the input string to beg in the search, or * @param startIndex The position (native) in the input string to beg in the search, or
* -1 to search within the Input Region. * -1 to search within the Input Region.
* @param status A reference to a UErrorCode to receive any error s. * @param status A reference to a UErrorCode to receive any error s.
* @return TRUE if a match is found. * @return TRUE if a match is found.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UBool U_EXPORT2 U_STABLE UBool U_EXPORT2
uregex_find64(URegularExpression *regexp, uregex_find64(URegularExpression *regexp,
int64_t startIndex, int64_t startIndex,
UErrorCode *status); UErrorCode *status);
/** /**
* Find the next pattern match in the input string. Begin searching * Find the next pattern match in the input string. Begin searching
* the input at the location following the end of he previous match, * the input at the location following the end of he previous match,
* or at the start of the string (or region) if there is no * or at the start of the string (or region) if there is no
* previous match. If a match is found, <code>uregex_start(), uregex_end ()</code>, and * previous match. If a match is found, <code>uregex_start(), uregex_end ()</code>, and
* <code>uregex_group()</code> will provide more information regarding th e match. * <code>uregex_group()</code> will provide more information regarding th e match.
skipping to change at line 650 skipping to change at line 650
* If NULL, a new UText will be created as an immu table shallow clone * If NULL, a new UText will be created as an immu table shallow clone
* of the entire input string. * of the entire input string.
* @param groupLength The group length of the desired capture group. * @param groupLength The group length of the desired capture group.
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @return The subject text currently associated with this regular expression. * @return The subject text currently associated with this regular expression.
* If a pre-allocated UText was provided, it will always be used and returned. * If a pre-allocated UText was provided, it will always be used and returned.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
uregex_groupUText(URegularExpression *regexp, uregex_groupUText(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UText *dest, UText *dest,
int64_t *groupLength, int64_t *groupLength,
UErrorCode *status); UErrorCode *status);
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
/** Extract the string for the specified matching expression or subexpressi on. /** Extract the string for the specified matching expression or subexpressi on.
* Group #0 is the complete string of matched text. * Group #0 is the complete string of matched text.
* Group #1 is the text matched by the first set of capturing parentheses. * Group #1 is the text matched by the first set of capturing parentheses.
skipping to change at line 716 skipping to change at line 716
* Group #0 refers to the complete range of matched text. * Group #0 refers to the complete range of matched text.
* Group #1 refers to the text matched by the first set of capturing par entheses. * Group #1 refers to the text matched by the first set of capturing par entheses.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param groupNum The capture group number * @param groupNum The capture group number
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @return the starting (native) position in the input of the text matched * @return the starting (native) position in the input of the text matched
* by the specified group. * by the specified group.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_STABLE int64_t U_EXPORT2
uregex_start64(URegularExpression *regexp, uregex_start64(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UErrorCode *status); UErrorCode *status);
/** /**
* Returns the index in the input string of the position following the e nd * Returns the index in the input string of the position following the e nd
* of the text matched by the specified capture group. * of the text matched by the specified capture group.
* Return -1 if the capture group was not part of the last match. * Return -1 if the capture group was not part of the last match.
* Group #0 refers to the complete range of matched text. * Group #0 refers to the complete range of matched text.
* Group #1 refers to the text matched by the first set of capturing par entheses. * Group #1 refers to the text matched by the first set of capturing par entheses.
skipping to change at line 753 skipping to change at line 753
* Return -1 if the capture group was not part of the last match. * Return -1 if the capture group was not part of the last match.
* Group #0 refers to the complete range of matched text. * Group #0 refers to the complete range of matched text.
* Group #1 refers to the text matched by the first set of capturing par entheses. * Group #1 refers to the text matched by the first set of capturing par entheses.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param groupNum The capture group number * @param groupNum The capture group number
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @return the (native) index of the position following th e last matched character. * @return the (native) index of the position following th e last matched character.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_STABLE int64_t U_EXPORT2
uregex_end64(URegularExpression *regexp, uregex_end64(URegularExpression *regexp,
int32_t groupNum, int32_t groupNum,
UErrorCode *status); UErrorCode *status);
/** /**
* Reset any saved state from the previous match. Has the effect of * Reset any saved state from the previous match. Has the effect of
* causing uregex_findNext to begin at the specified index, and causing * causing uregex_findNext to begin at the specified index, and causing
* uregex_start(), uregex_end() and uregex_group() to return an error * uregex_start(), uregex_end() and uregex_group() to return an error
* indicating that there is no match information available. Clears any * indicating that there is no match information available. Clears any
* match region that may have been set. * match region that may have been set.
skipping to change at line 790 skipping to change at line 790
* uregex_start(), uregex_end() and uregex_group() to return an error * uregex_start(), uregex_end() and uregex_group() to return an error
* indicating that there is no match information available. Clears any * indicating that there is no match information available. Clears any
* match region that may have been set. * match region that may have been set.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param index The position (native) in the text at which a * @param index The position (native) in the text at which a
* uregex_findNext() should begin searching. * uregex_findNext() should begin searching.
* @param status A reference to a UErrorCode to receive any erro rs. * @param status A reference to a UErrorCode to receive any erro rs.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_STABLE 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.
skipping to change at line 842 skipping to change at line 842
* *
* The function will fail if start is greater than limit, or if either ind ex * The function will fail if start is greater than limit, or if either ind ex
* is less than zero or greater than the length of the string being match ed. * is less than zero or greater than the length of the string being match ed.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param regionStart The (native) index to begin searches at. * @param regionStart The (native) index to begin searches at.
* @param regionLimit The (native) index to end searches at (exclusive). * @param regionLimit The (native) index to end searches at (exclusive).
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_setRegion64(URegularExpression *regexp, uregex_setRegion64(URegularExpression *regexp,
int64_t regionStart, int64_t regionStart,
int64_t regionLimit, int64_t regionLimit,
UErrorCode *status); UErrorCode *status);
/** /**
* Set the matching region and the starting index for subsequent matches * Set the matching region and the starting index for subsequent matches
* in a single operation. * in a single operation.
* This is useful because the usual function for setting the starting * This is useful because the usual function for setting the starting
* index, urgex_reset(), also resets any region limits. * index, urgex_reset(), also resets any region limits.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param regionStart The (native) index to begin searches at. * @param regionStart The (native) index to begin searches at.
* @param regionLimit The (native) index to end searches at (exclusive). * @param regionLimit The (native) index to end searches at (exclusive).
* @param startIndex The index in the input text at which the next * @param startIndex The index in the input text at which the next
* match operation should begin. * match operation should begin.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_STABLE 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
* to the region bounded by regionStart (inclusive) and regionEnd (exclusi ve). * to the region bounded by regionStart (inclusive) and regionEnd (exclusi ve).
* *
skipping to change at line 892 skipping to change at line 892
/** /**
* 64bit version of uregex_regionStart. * 64bit version of uregex_regionStart.
* Reports the start index of the matching region. Any matches found are l imited to * Reports the start index of the matching region. Any matches found are l imited to
* to the region bounded by regionStart (inclusive) and regionEnd (exclusi ve). * to the region bounded by regionStart (inclusive) and regionEnd (exclusi ve).
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The starting (native) index of this matcher's region. * @return The starting (native) index of this matcher's region.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_STABLE 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.
skipping to change at line 921 skipping to change at line 921
* 64bit version of uregex_regionEnd. * 64bit version of uregex_regionEnd.
* Reports the end index (exclusive) of the matching region for this URegu larExpression. * Reports the end index (exclusive) of the matching region for this URegu larExpression.
* Any matches found are limited to to the region bounded by regionStart ( inclusive) * Any matches found are limited to to the region bounded by regionStart ( inclusive)
* and regionEnd (exclusive). * and regionEnd (exclusive).
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors. * @param status A pointer to a UErrorCode to receive any errors.
* @return The ending point (native) of this matcher's region. * @return The ending point (native) of this matcher's region.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int64_t U_EXPORT2 U_STABLE 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.
* *
* @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.
skipping to change at line 1076 skipping to change at line 1076
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param replacement A string containing the replacement text. * @param replacement A string containing the replacement text.
* @param dest A mutable UText that will receive the result . * @param dest A mutable UText that will receive the result .
* If NULL, a new UText will be created (which may not be mutable). * If NULL, a new UText will be created (which may not be mutable).
* @param status A reference to a UErrorCode to receive any e rrors. * @param status A reference to a UErrorCode to receive any e rrors.
* @return A UText containing the results of the find a nd replace. * @return A UText containing the results of the find a nd replace.
* If a pre-allocated UText was provided, it w ill always be used and returned. * If a pre-allocated UText was provided, it w ill always be used and returned.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
uregex_replaceAllUText(URegularExpression *regexp, uregex_replaceAllUText(URegularExpression *regexp,
UText *replacement, UText *replacement,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Replaces the first substring of the input that matches the pattern * Replaces the first substring of the input that matches the pattern
* with the given replacement string. This is a convenience function t hat * with the given replacement string. This is a convenience function t hat
* provides a complete find-and-replace operation. * provides a complete find-and-replace operation.
* *
skipping to change at line 1135 skipping to change at line 1135
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param replacement A string containing the replacement text. * @param replacement A string containing the replacement text.
* @param dest A mutable UText that will receive the result . * @param dest A mutable UText that will receive the result .
* If NULL, a new UText will be created (which may not be mutable). * If NULL, a new UText will be created (which may not be mutable).
* @param status A reference to a UErrorCode to receive any e rrors. * @param status A reference to a UErrorCode to receive any e rrors.
* @return A UText containing the results of the find a nd replace. * @return A UText containing the results of the find a nd replace.
* If a pre-allocated UText was provided, it w ill always be used and returned. * If a pre-allocated UText was provided, it w ill always be used and returned.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
uregex_replaceFirstUText(URegularExpression *regexp, uregex_replaceFirstUText(URegularExpression *regexp,
UText *replacement, UText *replacement,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* Implements a replace operation intended to be used as part of an * Implements a replace operation intended to be used as part of an
* incremental find-and-replace. * incremental find-and-replace.
* *
* <p>The input string, starting from the end of the previous match and ending at * <p>The input string, starting from the end of the previous match and ending at
skipping to change at line 1217 skipping to change at line 1217
* @param regexp The regular expression object. * @param regexp The regular expression object.
* @param replacementText The string that will replace the matched por tion of the * @param replacementText The string that will replace the matched por tion of the
* input string as it is copied to the destination buffer. * input string as it is copied to the destination buffer.
* The replacement text may contain references ($1, for * The replacement text may contain references ($1, for
* example) to capture groups from the match. * example) to capture groups from the match.
* @param dest A mutable UText that will receive the result. Mu st not be NULL. * @param dest A mutable UText that will receive the result. Mu st not be NULL.
* @param status A reference to a UErrorCode to receive any error s. * @param status A reference to a UErrorCode to receive any error s.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_appendReplacementUText(URegularExpression *regexp, uregex_appendReplacementUText(URegularExpression *regexp,
UText *replacementText, UText *replacementText,
UText *dest, UText *dest,
UErrorCode *status); UErrorCode *status);
/** /**
* As the final step in a find-and-replace operation, append the remainder * As the final step in a find-and-replace operation, append the remainder
* of the input string, starting at the position following the last match, * of the input string, starting at the position following the last match,
* to the destination string. <code>uregex_appendTail()</code> is intended * to the destination string. <code>uregex_appendTail()</code> is intended
* to be invoked after one or more invocations of the * to be invoked after one or more invocations of the
skipping to change at line 1271 skipping to change at line 1271
* obtain the input string and with the position * obtain the input string and with the position
* of the last match within it. * of the last match within it.
* @param dest A mutable UText that will receive the result. Mu st not be NULL. * @param dest A mutable UText that will receive the result. Mu st not be NULL.
* *
* @param status Error code * @param status Error code
* *
* @return The destination UText. * @return The destination UText.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT UText * U_EXPORT2 U_STABLE 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.
* *
skipping to change at line 1362 skipping to change at line 1362
* If the number of destination strings is less than the n umber * If the number of destination strings is less than the n umber
* of fields, the trailing part of the input string, inclu ding any * of fields, the trailing part of the input string, inclu ding any
* field delimiters, is placed in the last destination str ing. * field delimiters, is placed in the last destination str ing.
* This behavior mimics that of Perl. It is not an error condition, and no * This behavior mimics that of Perl. It is not an error condition, and no
* error status is returned when all destField positions a re used. * error status is returned when all destField positions a re used.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @return The number of fields into which the input string was sp lit. * @return The number of fields into which the input string was sp lit.
* *
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
uregex_splitUText(URegularExpression *regexp, uregex_splitUText(URegularExpression *regexp,
UText *destFields[], UText *destFields[],
int32_t destFieldsCapacity, int32_t destFieldsCapacity,
UErrorCode *status); UErrorCode *status);
/** /**
* Set a processing time limit for match operations with this URegularExpre ssion. * Set a processing time limit for match operations with this URegularExpre ssion.
* *
* Some patterns, when matching certain strings, can run in exponential tim e. * Some patterns, when matching certain strings, can run in exponential tim e.
* For practical purposes, the match operation may appear to be in an * For practical purposes, the match operation may appear to be in an
skipping to change at line 1552 skipping to change at line 1552
* Set the find progress callback function for this URegularExpression. * Set the find progress callback function for this URegularExpression.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param callback A pointer to the user-supplied callback function. * @param callback A pointer to the user-supplied callback function.
* @param context User context pointer. The value supplied at the * @param context User context pointer. The value supplied at the
* time the callback function is set will be saved * time the callback function is set will be saved
* and passed to the callback each time that it is cal led. * and passed to the callback each time that it is cal led.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_setFindProgressCallback(URegularExpression *regexp, uregex_setFindProgressCallback(URegularExpression *regexp,
URegexFindProgressCallback *callback, URegexFindProgressCallback *callback,
const void *context, const void *context,
UErrorCode *status); UErrorCode *status);
/** /**
* Get the find progress callback function for this URegularExpression. * Get the find progress callback function for this URegularExpression.
* *
* @param regexp The compiled regular expression. * @param regexp The compiled regular expression.
* @param callback Out parameter, receives a pointer to the user-suppl ied * @param callback Out parameter, receives a pointer to the user-suppl ied
* callback function. * callback function.
* @param context Out parameter, receives the user context pointer th at * @param context Out parameter, receives the user context pointer th at
* was set when uregex_setFindProgressCallback() was c alled. * was set when uregex_setFindProgressCallback() was c alled.
* @param status A reference to a UErrorCode to receive any errors. * @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.6 * @stable ICU 4.6
*/ */
U_DRAFT void U_EXPORT2 U_STABLE void U_EXPORT2
uregex_getFindProgressCallback(const URegularExpression *regexp, uregex_getFindProgressCallback(const URegularExpression *regexp,
URegexFindProgressCallback **callbac k, URegexFindProgressCallback **callbac k,
const void **context , const void **context ,
UErrorCode *status); UErrorCode *status);
#endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */
#endif /* UREGEX_H */ #endif /* UREGEX_H */
 End of changes. 23 change blocks. 
23 lines changed or deleted 23 lines changed or added


 urename.h   urename.h 
skipping to change at line 12 skipping to change at line 12
*************************************************************************** **** *************************************************************************** ****
* Copyright (C) 2002-2012, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
*************************************************************************** **** *************************************************************************** ****
* *
* file name: urename.h * file name: urename.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: Perl script written by Vladimir Weinstein * Created by: Perl script tools/genren.pl written by Vladimir Weinstein
* *
* Contains data for renaming ICU exports. * Contains data for renaming ICU exports.
* Gets included by umachine.h * Gets included by umachine.h
* *
* 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 URENAME_H #ifndef URENAME_H
#define URENAME_H #define URENAME_H
/* Uncomment the following line to disable renaming on platforms /* U_DISABLE_RENAMING can be defined in the following ways:
that do not use Autoconf. */ * - when running configure, e.g.
/* #define U_DISABLE_RENAMING 1 */ * runConfigureICU Linux --disable-renaming
* - by changing the default setting of U_DISABLE_RENAMING in uconfig.h
*/
#include "unicode/uconfig.h"
#if !U_DISABLE_RENAMING #if !U_DISABLE_RENAMING
/* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one i n unicode/uvernum.h we can use, but we will give /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one i n unicode/uvernum.h we can use, but we will give
the platform a chance to define it first. the platform a chance to define it first.
Normally (if utypes.h or umachine.h was included first) this will not be necessary as it will already be defined. Normally (if utypes.h or umachine.h was included first) this will not be necessary as it will already be defined.
*/ */
#ifndef U_ICU_ENTRY_POINT_RENAME
#include "unicode/uconfig.h"
#endif
#ifndef U_ICU_ENTRY_POINT_RENAME #ifndef U_ICU_ENTRY_POINT_RENAME
#include "unicode/umachine.h" #include "unicode/umachine.h"
#endif #endif
/* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */ /* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */
#ifndef U_ICU_ENTRY_POINT_RENAME #ifndef U_ICU_ENTRY_POINT_RENAME
#include "unicode/uvernum.h" #include "unicode/uvernum.h"
#endif #endif
/* Error out before the following defines cause very strange and unexpected code breakage */ /* Error out before the following defines cause very strange and unexpected code breakage */
#ifndef U_ICU_ENTRY_POINT_RENAME #ifndef U_ICU_ENTRY_POINT_RENAME
#error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider defining U_DISABLE_RENAMING if renaming should not be used. #error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider defining U_DISABLE_RENAMING if renaming should not be used.
#endif #endif
/* C exports renaming data */ /* C exports renaming data */
#define DECPOWERS U_ICU_ENTRY_POINT_RENAME(DECPOWERS)
#define DECSTICKYTAB U_ICU_ENTRY_POINT_RENAME(DECSTICKYTAB)
#define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToS tring) #define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToS tring)
#define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_intege rToString) #define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_intege rToString)
#define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_string ToInteger) #define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_string ToInteger)
#define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCas e) #define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCas e)
#define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCas e) #define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCas e)
#define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CA LLBACK_ESCAPE) #define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CA LLBACK_ESCAPE)
#define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL BACK_SKIP) #define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL BACK_SKIP)
#define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL BACK_STOP) #define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL BACK_STOP)
#define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_ U_CALLBACK_SUBSTITUTE) #define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_ U_CALLBACK_SUBSTITUTE)
#define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBA CK_ESCAPE) #define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBA CK_ESCAPE)
skipping to change at line 114 skipping to change at line 113
#define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data)
#define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data)
#define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close) #define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close)
#define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty) #define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty)
#define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData) #define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData)
#define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open) #define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open)
#define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search) #define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search)
#define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString) #define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString)
#define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup)
#define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse) #define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse)
#define d2utable U_ICU_ENTRY_POINT_RENAME(d2utable)
#define deleteCEList U_ICU_ENTRY_POINT_RENAME(deleteCEList)
#define deleteChars U_ICU_ENTRY_POINT_RENAME(deleteChars)
#define deleteCollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(deleteCollDataCac
heEntry)
#define deleteStringList U_ICU_ENTRY_POINT_RENAME(deleteStringList)
#define deleteUnicodeStringKey U_ICU_ENTRY_POINT_RENAME(deleteUnicodeString
Key)
#define gICUInitMutex U_ICU_ENTRY_POINT_RENAME(gICUInitMutex)
#define gICUInitialized U_ICU_ENTRY_POINT_RENAME(gICUInitialized)
#define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone) #define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone)
#define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close) #define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close)
#define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals) #define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals)
#define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings) #define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings)
#define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamic ClassID) #define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamic ClassID)
#define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart) #define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart)
#define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart) #define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart)
#define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName) #define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName)
#define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart) #define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart)
#define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPrevious Start) #define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPrevious Start)
skipping to change at line 217 skipping to change at line 208
#define res_getBinary U_ICU_ENTRY_POINT_RENAME(res_getBinary) #define res_getBinary U_ICU_ENTRY_POINT_RENAME(res_getBinary)
#define res_getIntVector U_ICU_ENTRY_POINT_RENAME(res_getIntVector) #define res_getIntVector U_ICU_ENTRY_POINT_RENAME(res_getIntVector)
#define res_getPublicType U_ICU_ENTRY_POINT_RENAME(res_getPublicType) #define res_getPublicType U_ICU_ENTRY_POINT_RENAME(res_getPublicType)
#define res_getResource U_ICU_ENTRY_POINT_RENAME(res_getResource) #define res_getResource U_ICU_ENTRY_POINT_RENAME(res_getResource)
#define res_getString U_ICU_ENTRY_POINT_RENAME(res_getString) #define res_getString U_ICU_ENTRY_POINT_RENAME(res_getString)
#define res_getTableItemByIndex U_ICU_ENTRY_POINT_RENAME(res_getTableItemBy Index) #define res_getTableItemByIndex U_ICU_ENTRY_POINT_RENAME(res_getTableItemBy Index)
#define res_getTableItemByKey U_ICU_ENTRY_POINT_RENAME(res_getTableItemByKe y) #define res_getTableItemByKey U_ICU_ENTRY_POINT_RENAME(res_getTableItemByKe y)
#define res_load U_ICU_ENTRY_POINT_RENAME(res_load) #define res_load U_ICU_ENTRY_POINT_RENAME(res_load)
#define res_read U_ICU_ENTRY_POINT_RENAME(res_read) #define res_read U_ICU_ENTRY_POINT_RENAME(res_read)
#define res_unload U_ICU_ENTRY_POINT_RENAME(res_unload) #define res_unload U_ICU_ENTRY_POINT_RENAME(res_unload)
#define triedict_swap U_ICU_ENTRY_POINT_RENAME(triedict_swap)
#define u_UCharsToChars U_ICU_ENTRY_POINT_RENAME(u_UCharsToChars) #define u_UCharsToChars U_ICU_ENTRY_POINT_RENAME(u_UCharsToChars)
#define u_austrcpy U_ICU_ENTRY_POINT_RENAME(u_austrcpy) #define u_austrcpy U_ICU_ENTRY_POINT_RENAME(u_austrcpy)
#define u_austrncpy U_ICU_ENTRY_POINT_RENAME(u_austrncpy) #define u_austrncpy U_ICU_ENTRY_POINT_RENAME(u_austrncpy)
#define u_catclose U_ICU_ENTRY_POINT_RENAME(u_catclose) #define u_catclose U_ICU_ENTRY_POINT_RENAME(u_catclose)
#define u_catgets U_ICU_ENTRY_POINT_RENAME(u_catgets) #define u_catgets U_ICU_ENTRY_POINT_RENAME(u_catgets)
#define u_catopen U_ICU_ENTRY_POINT_RENAME(u_catopen) #define u_catopen U_ICU_ENTRY_POINT_RENAME(u_catopen)
#define u_charAge U_ICU_ENTRY_POINT_RENAME(u_charAge) #define u_charAge U_ICU_ENTRY_POINT_RENAME(u_charAge)
#define u_charDigitValue U_ICU_ENTRY_POINT_RENAME(u_charDigitValue) #define u_charDigitValue U_ICU_ENTRY_POINT_RENAME(u_charDigitValue)
#define u_charDirection U_ICU_ENTRY_POINT_RENAME(u_charDirection) #define u_charDirection U_ICU_ENTRY_POINT_RENAME(u_charDirection)
#define u_charFromName U_ICU_ENTRY_POINT_RENAME(u_charFromName) #define u_charFromName U_ICU_ENTRY_POINT_RENAME(u_charFromName)
skipping to change at line 530 skipping to change at line 520
#define ucal_getDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getDefaultTim eZone) #define ucal_getDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getDefaultTim eZone)
#define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDiffe rence) #define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDiffe rence)
#define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianC hange) #define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianC hange)
#define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKey wordValuesForLocale) #define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKey wordValuesForLocale)
#define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit) #define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit)
#define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType) #define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType)
#define ucal_getMillis U_ICU_ENTRY_POINT_RENAME(ucal_getMillis) #define ucal_getMillis U_ICU_ENTRY_POINT_RENAME(ucal_getMillis)
#define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow) #define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow)
#define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersio n) #define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersio n)
#define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZo neDisplayName) #define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZo neDisplayName)
#define ucal_getTimeZoneTransitionDate U_ICU_ENTRY_POINT_RENAME(ucal_getTim eZoneTransitionDate)
#define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType) #define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType)
#define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendT ransition) #define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendT ransition)
#define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime) #define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime)
#define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet) #define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet)
#define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend) #define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend)
#define ucal_open U_ICU_ENTRY_POINT_RENAME(ucal_open) #define ucal_open U_ICU_ENTRY_POINT_RENAME(ucal_open)
#define ucal_openCountryTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openCountry TimeZones) #define ucal_openCountryTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openCountry TimeZones)
#define ucal_openTimeZoneIDEnumeration U_ICU_ENTRY_POINT_RENAME(ucal_openTi meZoneIDEnumeration) #define ucal_openTimeZoneIDEnumeration U_ICU_ENTRY_POINT_RENAME(ucal_openTi meZoneIDEnumeration)
#define ucal_openTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZones) #define ucal_openTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZones)
#define ucal_roll U_ICU_ENTRY_POINT_RENAME(ucal_roll) #define ucal_roll U_ICU_ENTRY_POINT_RENAME(ucal_roll)
skipping to change at line 593 skipping to change at line 584
#define ucd_freeCache U_ICU_ENTRY_POINT_RENAME(ucd_freeCache) #define ucd_freeCache U_ICU_ENTRY_POINT_RENAME(ucd_freeCache)
#define ucd_getCollator U_ICU_ENTRY_POINT_RENAME(ucd_getCollator) #define ucd_getCollator U_ICU_ENTRY_POINT_RENAME(ucd_getCollator)
#define ucd_open U_ICU_ENTRY_POINT_RENAME(ucd_open) #define ucd_open U_ICU_ENTRY_POINT_RENAME(ucd_open)
#define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyS tarts) #define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyS tarts)
#define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames) #define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames)
#define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne) #define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne)
#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_re gisterCleanup) #define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_re gisterCleanup)
#define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_regist erCleanup) #define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_regist erCleanup)
#define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCl eanup) #define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCl eanup)
#define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup) #define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup)
#define ucln_mutexedInit U_ICU_ENTRY_POINT_RENAME(ucln_mutexedInit)
#define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup) #define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup)
#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32) #define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32)
#define ucnv_MBCSFromUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSF romUnicodeWithOffsets) #define ucnv_MBCSFromUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSF romUnicodeWithOffsets)
#define ucnv_MBCSGetFilteredUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(u cnv_MBCSGetFilteredUnicodeSetForUnicode) #define ucnv_MBCSGetFilteredUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(u cnv_MBCSGetFilteredUnicodeSetForUnicode)
#define ucnv_MBCSGetType U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetType) #define ucnv_MBCSGetType U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetType)
#define ucnv_MBCSGetUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_MBCS GetUnicodeSetForUnicode) #define ucnv_MBCSGetUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_MBCS GetUnicodeSetForUnicode)
#define ucnv_MBCSIsLeadByte U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSIsLeadByte) #define ucnv_MBCSIsLeadByte U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSIsLeadByte)
#define ucnv_MBCSSimpleGetNextUChar U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSSimpl eGetNextUChar) #define ucnv_MBCSSimpleGetNextUChar U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSSimpl eGetNextUChar)
#define ucnv_MBCSToUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSToU nicodeWithOffsets) #define ucnv_MBCSToUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSToU nicodeWithOffsets)
#define ucnv_bld_countAvailableConverters U_ICU_ENTRY_POINT_RENAME(ucnv_bld _countAvailableConverters) #define ucnv_bld_countAvailableConverters U_ICU_ENTRY_POINT_RENAME(ucnv_bld _countAvailableConverters)
skipping to change at line 727 skipping to change at line 719
#define ucol_equals U_ICU_ENTRY_POINT_RENAME(ucol_equals) #define ucol_equals U_ICU_ENTRY_POINT_RENAME(ucol_equals)
#define ucol_findReorderingEntry U_ICU_ENTRY_POINT_RENAME(ucol_findReorderi ngEntry) #define ucol_findReorderingEntry U_ICU_ENTRY_POINT_RENAME(ucol_findReorderi ngEntry)
#define ucol_forceHanImplicit U_ICU_ENTRY_POINT_RENAME(ucol_forceHanImplici t) #define ucol_forceHanImplicit U_ICU_ENTRY_POINT_RENAME(ucol_forceHanImplici t)
#define ucol_forgetUCA U_ICU_ENTRY_POINT_RENAME(ucol_forgetUCA) #define ucol_forgetUCA U_ICU_ENTRY_POINT_RENAME(ucol_forgetUCA)
#define ucol_freeOffsetBuffer U_ICU_ENTRY_POINT_RENAME(ucol_freeOffsetBuffe r) #define ucol_freeOffsetBuffer U_ICU_ENTRY_POINT_RENAME(ucol_freeOffsetBuffe r)
#define ucol_getAttribute U_ICU_ENTRY_POINT_RENAME(ucol_getAttribute) #define ucol_getAttribute U_ICU_ENTRY_POINT_RENAME(ucol_getAttribute)
#define ucol_getAttributeOrDefault U_ICU_ENTRY_POINT_RENAME(ucol_getAttribu teOrDefault) #define ucol_getAttributeOrDefault U_ICU_ENTRY_POINT_RENAME(ucol_getAttribu teOrDefault)
#define ucol_getAvailable U_ICU_ENTRY_POINT_RENAME(ucol_getAvailable) #define ucol_getAvailable U_ICU_ENTRY_POINT_RENAME(ucol_getAvailable)
#define ucol_getBound U_ICU_ENTRY_POINT_RENAME(ucol_getBound) #define ucol_getBound U_ICU_ENTRY_POINT_RENAME(ucol_getBound)
#define ucol_getCEStrengthDifference U_ICU_ENTRY_POINT_RENAME(ucol_getCEStr engthDifference) #define ucol_getCEStrengthDifference U_ICU_ENTRY_POINT_RENAME(ucol_getCEStr engthDifference)
#define ucol_getCollationKey U_ICU_ENTRY_POINT_RENAME(ucol_getCollationKey)
#define ucol_getContractions U_ICU_ENTRY_POINT_RENAME(ucol_getContractions) #define ucol_getContractions U_ICU_ENTRY_POINT_RENAME(ucol_getContractions)
#define ucol_getContractionsAndExpansions U_ICU_ENTRY_POINT_RENAME(ucol_get ContractionsAndExpansions) #define ucol_getContractionsAndExpansions U_ICU_ENTRY_POINT_RENAME(ucol_get ContractionsAndExpansions)
#define ucol_getDisplayName U_ICU_ENTRY_POINT_RENAME(ucol_getDisplayName) #define ucol_getDisplayName U_ICU_ENTRY_POINT_RENAME(ucol_getDisplayName)
#define ucol_getEquivalentReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getEqu ivalentReorderCodes) #define ucol_getEquivalentReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getEqu ivalentReorderCodes)
#define ucol_getFirstCE U_ICU_ENTRY_POINT_RENAME(ucol_getFirstCE) #define ucol_getFirstCE U_ICU_ENTRY_POINT_RENAME(ucol_getFirstCE)
#define ucol_getFunctionalEquivalent U_ICU_ENTRY_POINT_RENAME(ucol_getFunct ionalEquivalent) #define ucol_getFunctionalEquivalent U_ICU_ENTRY_POINT_RENAME(ucol_getFunct ionalEquivalent)
#define ucol_getKeywordValues U_ICU_ENTRY_POINT_RENAME(ucol_getKeywordValue s) #define ucol_getKeywordValues U_ICU_ENTRY_POINT_RENAME(ucol_getKeywordValue s)
#define ucol_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucol_getKey wordValuesForLocale) #define ucol_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucol_getKey wordValuesForLocale)
#define ucol_getKeywords U_ICU_ENTRY_POINT_RENAME(ucol_getKeywords) #define ucol_getKeywords U_ICU_ENTRY_POINT_RENAME(ucol_getKeywords)
#define ucol_getLeadBytesForReorderCode U_ICU_ENTRY_POINT_RENAME(ucol_getLe adBytesForReorderCode) #define ucol_getLeadBytesForReorderCode U_ICU_ENTRY_POINT_RENAME(ucol_getLe adBytesForReorderCode)
skipping to change at line 749 skipping to change at line 742
#define ucol_getMaxExpansion U_ICU_ENTRY_POINT_RENAME(ucol_getMaxExpansion) #define ucol_getMaxExpansion U_ICU_ENTRY_POINT_RENAME(ucol_getMaxExpansion)
#define ucol_getNextCE U_ICU_ENTRY_POINT_RENAME(ucol_getNextCE) #define ucol_getNextCE U_ICU_ENTRY_POINT_RENAME(ucol_getNextCE)
#define ucol_getOffset U_ICU_ENTRY_POINT_RENAME(ucol_getOffset) #define ucol_getOffset U_ICU_ENTRY_POINT_RENAME(ucol_getOffset)
#define ucol_getPrevCE U_ICU_ENTRY_POINT_RENAME(ucol_getPrevCE) #define ucol_getPrevCE U_ICU_ENTRY_POINT_RENAME(ucol_getPrevCE)
#define ucol_getReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getReorderCodes) #define ucol_getReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getReorderCodes)
#define ucol_getReorderCodesForLeadByte U_ICU_ENTRY_POINT_RENAME(ucol_getRe orderCodesForLeadByte) #define ucol_getReorderCodesForLeadByte U_ICU_ENTRY_POINT_RENAME(ucol_getRe orderCodesForLeadByte)
#define ucol_getRules U_ICU_ENTRY_POINT_RENAME(ucol_getRules) #define ucol_getRules U_ICU_ENTRY_POINT_RENAME(ucol_getRules)
#define ucol_getRulesEx U_ICU_ENTRY_POINT_RENAME(ucol_getRulesEx) #define ucol_getRulesEx U_ICU_ENTRY_POINT_RENAME(ucol_getRulesEx)
#define ucol_getShortDefinitionString U_ICU_ENTRY_POINT_RENAME(ucol_getShor tDefinitionString) #define ucol_getShortDefinitionString U_ICU_ENTRY_POINT_RENAME(ucol_getShor tDefinitionString)
#define ucol_getSortKey U_ICU_ENTRY_POINT_RENAME(ucol_getSortKey) #define ucol_getSortKey U_ICU_ENTRY_POINT_RENAME(ucol_getSortKey)
#define ucol_getSortKeyWithAllocation U_ICU_ENTRY_POINT_RENAME(ucol_getSort KeyWithAllocation)
#define ucol_getStrength U_ICU_ENTRY_POINT_RENAME(ucol_getStrength) #define ucol_getStrength U_ICU_ENTRY_POINT_RENAME(ucol_getStrength)
#define ucol_getTailoredSet U_ICU_ENTRY_POINT_RENAME(ucol_getTailoredSet) #define ucol_getTailoredSet U_ICU_ENTRY_POINT_RENAME(ucol_getTailoredSet)
#define ucol_getUCAVersion U_ICU_ENTRY_POINT_RENAME(ucol_getUCAVersion) #define ucol_getUCAVersion U_ICU_ENTRY_POINT_RENAME(ucol_getUCAVersion)
#define ucol_getUnsafeSet U_ICU_ENTRY_POINT_RENAME(ucol_getUnsafeSet) #define ucol_getUnsafeSet U_ICU_ENTRY_POINT_RENAME(ucol_getUnsafeSet)
#define ucol_getVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_getVariableTop) #define ucol_getVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_getVariableTop)
#define ucol_getVersion U_ICU_ENTRY_POINT_RENAME(ucol_getVersion) #define ucol_getVersion U_ICU_ENTRY_POINT_RENAME(ucol_getVersion)
#define ucol_greater U_ICU_ENTRY_POINT_RENAME(ucol_greater) #define ucol_greater U_ICU_ENTRY_POINT_RENAME(ucol_greater)
#define ucol_greaterOrEqual U_ICU_ENTRY_POINT_RENAME(ucol_greaterOrEqual) #define ucol_greaterOrEqual U_ICU_ENTRY_POINT_RENAME(ucol_greaterOrEqual)
#define ucol_initBuffers U_ICU_ENTRY_POINT_RENAME(ucol_initBuffers) #define ucol_initBuffers U_ICU_ENTRY_POINT_RENAME(ucol_initBuffers)
#define ucol_initCollator U_ICU_ENTRY_POINT_RENAME(ucol_initCollator) #define ucol_initCollator U_ICU_ENTRY_POINT_RENAME(ucol_initCollator)
skipping to change at line 801 skipping to change at line 793
#define ucol_setAttribute U_ICU_ENTRY_POINT_RENAME(ucol_setAttribute) #define ucol_setAttribute U_ICU_ENTRY_POINT_RENAME(ucol_setAttribute)
#define ucol_setOffset U_ICU_ENTRY_POINT_RENAME(ucol_setOffset) #define ucol_setOffset U_ICU_ENTRY_POINT_RENAME(ucol_setOffset)
#define ucol_setOptionsFromHeader U_ICU_ENTRY_POINT_RENAME(ucol_setOptionsF romHeader) #define ucol_setOptionsFromHeader U_ICU_ENTRY_POINT_RENAME(ucol_setOptionsF romHeader)
#define ucol_setReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_setReorderCodes) #define ucol_setReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_setReorderCodes)
#define ucol_setReqValidLocales U_ICU_ENTRY_POINT_RENAME(ucol_setReqValidLo cales) #define ucol_setReqValidLocales U_ICU_ENTRY_POINT_RENAME(ucol_setReqValidLo cales)
#define ucol_setStrength U_ICU_ENTRY_POINT_RENAME(ucol_setStrength) #define ucol_setStrength U_ICU_ENTRY_POINT_RENAME(ucol_setStrength)
#define ucol_setText U_ICU_ENTRY_POINT_RENAME(ucol_setText) #define ucol_setText U_ICU_ENTRY_POINT_RENAME(ucol_setText)
#define ucol_setVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_setVariableTop) #define ucol_setVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_setVariableTop)
#define ucol_strcoll U_ICU_ENTRY_POINT_RENAME(ucol_strcoll) #define ucol_strcoll U_ICU_ENTRY_POINT_RENAME(ucol_strcoll)
#define ucol_strcollIter U_ICU_ENTRY_POINT_RENAME(ucol_strcollIter) #define ucol_strcollIter U_ICU_ENTRY_POINT_RENAME(ucol_strcollIter)
#define ucol_strcollUTF8 U_ICU_ENTRY_POINT_RENAME(ucol_strcollUTF8)
#define ucol_swap U_ICU_ENTRY_POINT_RENAME(ucol_swap) #define ucol_swap U_ICU_ENTRY_POINT_RENAME(ucol_swap)
#define ucol_swapBinary U_ICU_ENTRY_POINT_RENAME(ucol_swapBinary) #define ucol_swapBinary U_ICU_ENTRY_POINT_RENAME(ucol_swapBinary)
#define ucol_swapInverseUCA U_ICU_ENTRY_POINT_RENAME(ucol_swapInverseUCA) #define ucol_swapInverseUCA U_ICU_ENTRY_POINT_RENAME(ucol_swapInverseUCA)
#define ucol_tertiaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_tertiaryOrder) #define ucol_tertiaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_tertiaryOrder)
#define ucol_tok_assembleTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_assemb leTokenList) #define ucol_tok_assembleTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_assemb leTokenList)
#define ucol_tok_closeTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_closeToke nList) #define ucol_tok_closeTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_closeToke nList)
#define ucol_tok_getNextArgument U_ICU_ENTRY_POINT_RENAME(ucol_tok_getNextA rgument) #define ucol_tok_getNextArgument U_ICU_ENTRY_POINT_RENAME(ucol_tok_getNextA rgument)
#define ucol_tok_getRulesFromBundle U_ICU_ENTRY_POINT_RENAME(ucol_tok_getRu lesFromBundle) #define ucol_tok_getRulesFromBundle U_ICU_ENTRY_POINT_RENAME(ucol_tok_getRu lesFromBundle)
#define ucol_tok_initTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_initTokenL ist) #define ucol_tok_initTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_initTokenL ist)
#define ucol_tok_parseNextToken U_ICU_ENTRY_POINT_RENAME(ucol_tok_parseNext Token) #define ucol_tok_parseNextToken U_ICU_ENTRY_POINT_RENAME(ucol_tok_parseNext Token)
skipping to change at line 848 skipping to change at line 841
#define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern) #define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern)
#define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatter nRelative) #define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatter nRelative)
#define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone) #define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone)
#define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close) #define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close)
#define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable) #define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable)
#define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols) #define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols)
#define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format) #define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format)
#define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYear Start) #define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYear Start)
#define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable) #define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable)
#define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar) #define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar)
#define udat_getDefaultContext U_ICU_ENTRY_POINT_RENAME(udat_getDefaultCont ext) #define udat_getContext U_ICU_ENTRY_POINT_RENAME(udat_getContext)
#define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType) #define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType)
#define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat) #define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat)
#define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols) #define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols)
#define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient) #define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient)
#define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open) #define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open)
#define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse) #define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse)
#define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar) #define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar)
#define udat_registerOpener U_ICU_ENTRY_POINT_RENAME(udat_registerOpener) #define udat_registerOpener U_ICU_ENTRY_POINT_RENAME(udat_registerOpener)
#define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYear Start) #define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYear Start)
#define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar) #define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar)
#define udat_setDefaultContext U_ICU_ENTRY_POINT_RENAME(udat_setDefaultCont ext) #define udat_setContext U_ICU_ENTRY_POINT_RENAME(udat_setContext)
#define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient) #define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient)
#define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat) #define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat)
#define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols) #define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols)
#define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDa teField) #define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDa teField)
#define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern) #define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern)
#define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternR elativeDate) #define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternR elativeDate)
#define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternR elativeTime) #define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternR elativeTime)
#define udat_unregisterOpener U_ICU_ENTRY_POINT_RENAME(udat_unregisterOpene r) #define udat_unregisterOpener U_ICU_ENTRY_POINT_RENAME(udat_unregisterOpene r)
#define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonDat a) #define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonDat a)
#define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close) #define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close)
skipping to change at line 911 skipping to change at line 904
#define udatpg_open U_ICU_ENTRY_POINT_RENAME(udatpg_open) #define udatpg_open U_ICU_ENTRY_POINT_RENAME(udatpg_open)
#define udatpg_openBaseSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openBaseSk eletons) #define udatpg_openBaseSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openBaseSk eletons)
#define udatpg_openEmpty U_ICU_ENTRY_POINT_RENAME(udatpg_openEmpty) #define udatpg_openEmpty U_ICU_ENTRY_POINT_RENAME(udatpg_openEmpty)
#define udatpg_openSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openSkeletons) #define udatpg_openSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openSkeletons)
#define udatpg_replaceFieldTypes U_ICU_ENTRY_POINT_RENAME(udatpg_replaceFie ldTypes) #define udatpg_replaceFieldTypes U_ICU_ENTRY_POINT_RENAME(udatpg_replaceFie ldTypes)
#define udatpg_replaceFieldTypesWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg _replaceFieldTypesWithOptions) #define udatpg_replaceFieldTypesWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg _replaceFieldTypesWithOptions)
#define udatpg_setAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setAppen dItemFormat) #define udatpg_setAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setAppen dItemFormat)
#define udatpg_setAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendI temName) #define udatpg_setAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendI temName)
#define udatpg_setDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTim eFormat) #define udatpg_setDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTim eFormat)
#define udatpg_setDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_setDecimal) #define udatpg_setDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_setDecimal)
#define udict_swap U_ICU_ENTRY_POINT_RENAME(udict_swap)
#define udtitvfmt_close U_ICU_ENTRY_POINT_RENAME(udtitvfmt_close) #define udtitvfmt_close U_ICU_ENTRY_POINT_RENAME(udtitvfmt_close)
#define udtitvfmt_format U_ICU_ENTRY_POINT_RENAME(udtitvfmt_format) #define udtitvfmt_format U_ICU_ENTRY_POINT_RENAME(udtitvfmt_format)
#define udtitvfmt_open U_ICU_ENTRY_POINT_RENAME(udtitvfmt_open) #define udtitvfmt_open U_ICU_ENTRY_POINT_RENAME(udtitvfmt_open)
#define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close) #define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close)
#define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count) #define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count)
#define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next) #define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next)
#define uenum_nextDefault U_ICU_ENTRY_POINT_RENAME(uenum_nextDefault) #define uenum_nextDefault U_ICU_ENTRY_POINT_RENAME(uenum_nextDefault)
#define uenum_openCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_ope nCharStringsEnumeration) #define uenum_openCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_ope nCharStringsEnumeration)
#define uenum_openFromStringEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_open FromStringEnumeration) #define uenum_openFromStringEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_open FromStringEnumeration)
#define uenum_openUCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_op enUCharStringsEnumeration)
#define uenum_reset U_ICU_ENTRY_POINT_RENAME(uenum_reset) #define uenum_reset U_ICU_ENTRY_POINT_RENAME(uenum_reset)
#define uenum_unext U_ICU_ENTRY_POINT_RENAME(uenum_unext) #define uenum_unext U_ICU_ENTRY_POINT_RENAME(uenum_unext)
#define uenum_unextDefault U_ICU_ENTRY_POINT_RENAME(uenum_unextDefault) #define uenum_unextDefault U_ICU_ENTRY_POINT_RENAME(uenum_unextDefault)
#define ufile_close_translit U_ICU_ENTRY_POINT_RENAME(ufile_close_translit) #define ufile_close_translit U_ICU_ENTRY_POINT_RENAME(ufile_close_translit)
#define ufile_fill_uchar_buffer U_ICU_ENTRY_POINT_RENAME(ufile_fill_uchar_b uffer) #define ufile_fill_uchar_buffer U_ICU_ENTRY_POINT_RENAME(ufile_fill_uchar_b uffer)
#define ufile_flush_io U_ICU_ENTRY_POINT_RENAME(ufile_flush_io) #define ufile_flush_io U_ICU_ENTRY_POINT_RENAME(ufile_flush_io)
#define ufile_flush_translit U_ICU_ENTRY_POINT_RENAME(ufile_flush_translit) #define ufile_flush_translit U_ICU_ENTRY_POINT_RENAME(ufile_flush_translit)
#define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch) #define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch)
#define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32) #define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32)
#define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou) #define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou)
#define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUn icode) #define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUn icode)
#define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue) #define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue)
#define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit) #define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit)
#define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou) #define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou)
#define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64) #define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64)
#define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) #define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop)
#define ugender_getInstance U_ICU_ENTRY_POINT_RENAME(ugender_getInstance)
#define ugender_getListGender U_ICU_ENTRY_POINT_RENAME(ugender_getListGende
r)
#define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close) #define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close)
#define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_c ompareCaselessUnicodeString) #define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_c ompareCaselessUnicodeString)
#define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) #define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars)
#define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) #define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars)
#define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) #define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong)
#define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) #define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars)
#define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUn icodeString) #define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUn icodeString)
#define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count) #define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count)
#define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtabl e) #define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtabl e)
#define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) #define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals)
skipping to change at line 1003 skipping to change at line 1000
#define uiter_getState U_ICU_ENTRY_POINT_RENAME(uiter_getState) #define uiter_getState U_ICU_ENTRY_POINT_RENAME(uiter_getState)
#define uiter_next32 U_ICU_ENTRY_POINT_RENAME(uiter_next32) #define uiter_next32 U_ICU_ENTRY_POINT_RENAME(uiter_next32)
#define uiter_previous32 U_ICU_ENTRY_POINT_RENAME(uiter_previous32) #define uiter_previous32 U_ICU_ENTRY_POINT_RENAME(uiter_previous32)
#define uiter_setCharacterIterator U_ICU_ENTRY_POINT_RENAME(uiter_setCharac terIterator) #define uiter_setCharacterIterator U_ICU_ENTRY_POINT_RENAME(uiter_setCharac terIterator)
#define uiter_setReplaceable U_ICU_ENTRY_POINT_RENAME(uiter_setReplaceable) #define uiter_setReplaceable U_ICU_ENTRY_POINT_RENAME(uiter_setReplaceable)
#define uiter_setState U_ICU_ENTRY_POINT_RENAME(uiter_setState) #define uiter_setState U_ICU_ENTRY_POINT_RENAME(uiter_setState)
#define uiter_setString U_ICU_ENTRY_POINT_RENAME(uiter_setString) #define uiter_setString U_ICU_ENTRY_POINT_RENAME(uiter_setString)
#define uiter_setUTF16BE U_ICU_ENTRY_POINT_RENAME(uiter_setUTF16BE) #define uiter_setUTF16BE U_ICU_ENTRY_POINT_RENAME(uiter_setUTF16BE)
#define uiter_setUTF8 U_ICU_ENTRY_POINT_RENAME(uiter_setUTF8) #define uiter_setUTF8 U_ICU_ENTRY_POINT_RENAME(uiter_setUTF8)
#define uldn_close U_ICU_ENTRY_POINT_RENAME(uldn_close) #define uldn_close U_ICU_ENTRY_POINT_RENAME(uldn_close)
#define uldn_getContext U_ICU_ENTRY_POINT_RENAME(uldn_getContext)
#define uldn_getDialectHandling U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHan dling) #define uldn_getDialectHandling U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHan dling)
#define uldn_getLocale U_ICU_ENTRY_POINT_RENAME(uldn_getLocale) #define uldn_getLocale U_ICU_ENTRY_POINT_RENAME(uldn_getLocale)
#define uldn_keyDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName) #define uldn_keyDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName)
#define uldn_keyValueDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisp layName) #define uldn_keyValueDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisp layName)
#define uldn_languageDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_languageDisp layName) #define uldn_languageDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_languageDisp layName)
#define uldn_localeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayN ame) #define uldn_localeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayN ame)
#define uldn_open U_ICU_ENTRY_POINT_RENAME(uldn_open) #define uldn_open U_ICU_ENTRY_POINT_RENAME(uldn_open)
#define uldn_openForContext U_ICU_ENTRY_POINT_RENAME(uldn_openForContext)
#define uldn_regionDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayN ame) #define uldn_regionDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayN ame)
#define uldn_scriptCodeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptCode DisplayName) #define uldn_scriptCodeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptCode DisplayName)
#define uldn_scriptDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayN ame) #define uldn_scriptDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayN ame)
#define uldn_variantDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_variantDispla yName) #define uldn_variantDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_variantDispla yName)
#define ulist_addItemBeginList U_ICU_ENTRY_POINT_RENAME(ulist_addItemBeginL ist) #define ulist_addItemBeginList U_ICU_ENTRY_POINT_RENAME(ulist_addItemBeginL ist)
#define ulist_addItemEndList U_ICU_ENTRY_POINT_RENAME(ulist_addItemEndList) #define ulist_addItemEndList U_ICU_ENTRY_POINT_RENAME(ulist_addItemEndList)
#define ulist_close_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_ close_keyword_values_iterator) #define ulist_close_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_ close_keyword_values_iterator)
#define ulist_containsString U_ICU_ENTRY_POINT_RENAME(ulist_containsString) #define ulist_containsString U_ICU_ENTRY_POINT_RENAME(ulist_containsString)
#define ulist_count_keyword_values U_ICU_ENTRY_POINT_RENAME(ulist_count_key word_values) #define ulist_count_keyword_values U_ICU_ENTRY_POINT_RENAME(ulist_count_key word_values)
#define ulist_createEmptyList U_ICU_ENTRY_POINT_RENAME(ulist_createEmptyLis t) #define ulist_createEmptyList U_ICU_ENTRY_POINT_RENAME(ulist_createEmptyLis t)
skipping to change at line 1097 skipping to change at line 1096
#define umsg_getLocale U_ICU_ENTRY_POINT_RENAME(umsg_getLocale) #define umsg_getLocale U_ICU_ENTRY_POINT_RENAME(umsg_getLocale)
#define umsg_open U_ICU_ENTRY_POINT_RENAME(umsg_open) #define umsg_open U_ICU_ENTRY_POINT_RENAME(umsg_open)
#define umsg_parse U_ICU_ENTRY_POINT_RENAME(umsg_parse) #define umsg_parse U_ICU_ENTRY_POINT_RENAME(umsg_parse)
#define umsg_setLocale U_ICU_ENTRY_POINT_RENAME(umsg_setLocale) #define umsg_setLocale U_ICU_ENTRY_POINT_RENAME(umsg_setLocale)
#define umsg_toPattern U_ICU_ENTRY_POINT_RENAME(umsg_toPattern) #define umsg_toPattern U_ICU_ENTRY_POINT_RENAME(umsg_toPattern)
#define umsg_vformat U_ICU_ENTRY_POINT_RENAME(umsg_vformat) #define umsg_vformat U_ICU_ENTRY_POINT_RENAME(umsg_vformat)
#define umsg_vparse U_ICU_ENTRY_POINT_RENAME(umsg_vparse) #define umsg_vparse U_ICU_ENTRY_POINT_RENAME(umsg_vparse)
#define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec) #define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec)
#define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc) #define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc)
#define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup) #define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup)
#define umtx_destroy U_ICU_ENTRY_POINT_RENAME(umtx_destroy)
#define umtx_init U_ICU_ENTRY_POINT_RENAME(umtx_init)
#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) #define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) #define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
#define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnic ode32Instance) #define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnic ode32Instance)
#define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) #define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append)
#define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) #define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close)
#define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair) #define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair)
#define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombini ngClass) #define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombini ngClass)
#define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecompos ition) #define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecompos ition)
#define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance) #define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance)
#define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstanc e) #define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstanc e)
skipping to change at line 1166 skipping to change at line 1163
#define unum_parseDouble U_ICU_ENTRY_POINT_RENAME(unum_parseDouble) #define unum_parseDouble U_ICU_ENTRY_POINT_RENAME(unum_parseDouble)
#define unum_parseDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_parseDoubleC urrency) #define unum_parseDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_parseDoubleC urrency)
#define unum_parseInt64 U_ICU_ENTRY_POINT_RENAME(unum_parseInt64) #define unum_parseInt64 U_ICU_ENTRY_POINT_RENAME(unum_parseInt64)
#define unum_setAttribute U_ICU_ENTRY_POINT_RENAME(unum_setAttribute) #define unum_setAttribute U_ICU_ENTRY_POINT_RENAME(unum_setAttribute)
#define unum_setDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_setDoubleAttr ibute) #define unum_setDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_setDoubleAttr ibute)
#define unum_setSymbol U_ICU_ENTRY_POINT_RENAME(unum_setSymbol) #define unum_setSymbol U_ICU_ENTRY_POINT_RENAME(unum_setSymbol)
#define unum_setTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_setTextAttribut e) #define unum_setTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_setTextAttribut e)
#define unum_toPattern U_ICU_ENTRY_POINT_RENAME(unum_toPattern) #define unum_toPattern U_ICU_ENTRY_POINT_RENAME(unum_toPattern)
#define uplrules_close U_ICU_ENTRY_POINT_RENAME(uplrules_close) #define uplrules_close U_ICU_ENTRY_POINT_RENAME(uplrules_close)
#define uplrules_open U_ICU_ENTRY_POINT_RENAME(uplrules_open) #define uplrules_open U_ICU_ENTRY_POINT_RENAME(uplrules_open)
#define uplrules_openForType U_ICU_ENTRY_POINT_RENAME(uplrules_openForType)
#define uplrules_select U_ICU_ENTRY_POINT_RENAME(uplrules_select) #define uplrules_select U_ICU_ENTRY_POINT_RENAME(uplrules_select)
#define uplug_closeLibrary U_ICU_ENTRY_POINT_RENAME(uplug_closeLibrary) #define uplug_closeLibrary U_ICU_ENTRY_POINT_RENAME(uplug_closeLibrary)
#define uplug_findLibrary U_ICU_ENTRY_POINT_RENAME(uplug_findLibrary) #define uplug_findLibrary U_ICU_ENTRY_POINT_RENAME(uplug_findLibrary)
#define uplug_getConfiguration U_ICU_ENTRY_POINT_RENAME(uplug_getConfigurat ion) #define uplug_getConfiguration U_ICU_ENTRY_POINT_RENAME(uplug_getConfigurat ion)
#define uplug_getContext U_ICU_ENTRY_POINT_RENAME(uplug_getContext) #define uplug_getContext U_ICU_ENTRY_POINT_RENAME(uplug_getContext)
#define uplug_getCurrentLevel U_ICU_ENTRY_POINT_RENAME(uplug_getCurrentLeve l) #define uplug_getCurrentLevel U_ICU_ENTRY_POINT_RENAME(uplug_getCurrentLeve l)
#define uplug_getLibrary U_ICU_ENTRY_POINT_RENAME(uplug_getLibrary) #define uplug_getLibrary U_ICU_ENTRY_POINT_RENAME(uplug_getLibrary)
#define uplug_getLibraryName U_ICU_ENTRY_POINT_RENAME(uplug_getLibraryName) #define uplug_getLibraryName U_ICU_ENTRY_POINT_RENAME(uplug_getLibraryName)
#define uplug_getPlugInternal U_ICU_ENTRY_POINT_RENAME(uplug_getPlugInterna l) #define uplug_getPlugInternal U_ICU_ENTRY_POINT_RENAME(uplug_getPlugInterna l)
#define uplug_getPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_getPlugLevel) #define uplug_getPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_getPlugLevel)
 End of changes. 20 change blocks. 
25 lines changed or deleted 22 lines changed or added


 ures.h   ures.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1997-2011, International Business Machines * Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File URES.H (formerly CRESBUND.H) * File URES.H (formerly CRESBUND.H)
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 04/01/97 aliu Creation. * 04/01/97 aliu Creation.
* 02/22/99 damiba overhaul. * 02/22/99 damiba overhaul.
skipping to change at line 832 skipping to change at line 832
{ {
int32_t len = 0; int32_t len = 0;
const UChar* r = ures_getNextString(resB, &len, key, status); const UChar* r = ures_getNextString(resB, &len, key, status);
return UnicodeString(TRUE, r, len); return UnicodeString(TRUE, r, len);
} }
/** /**
* Returns the string in a given resource at the specified index. * Returns the string in a given resource at the specified index.
* *
* @param resB a resource * @param resB a resource
* @param index an index to the wanted string. * @param indexS an index to the wanted string.
* @param status fills in the outgoing error code * @param status fills in the outgoing error code
* @return an UnicodeString object. If there is an error, string is bogus * @return an UnicodeString object. If there is an error, string is bogus
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
inline UnicodeString inline UnicodeString
ures_getUnicodeStringByIndex(const UResourceBundle *resB, ures_getUnicodeStringByIndex(const UResourceBundle *resB,
int32_t indexS, int32_t indexS,
UErrorCode* status) UErrorCode* status)
{ {
int32_t len = 0; int32_t len = 0;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 uset.h   uset.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2002-2011, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: uset.h * file name: uset.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2002mar07 * created on: 2002mar07
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 253 skipping to change at line 253
*********************************************************************/ *********************************************************************/
/** /**
* Create an empty USet object. * Create an empty USet object.
* Equivalent to uset_open(1, 0). * Equivalent to uset_open(1, 0).
* @return a newly created USet. The caller must call uset_close() on * @return a newly created USet. The caller must call uset_close() on
* it when done. * it when done.
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE USet* U_EXPORT2 U_STABLE USet* U_EXPORT2
uset_openEmpty(); uset_openEmpty(void);
/** /**
* Creates a USet object that contains the range of characters * Creates a USet object that contains the range of characters
* start..end, inclusive. If <code>start > end</code> * start..end, inclusive. If <code>start > end</code>
* then an empty set is created (same as using uset_openEmpty()). * then an empty set is created (same as using uset_openEmpty()).
* @param start first character of the range, inclusive * @param start first character of the range, inclusive
* @param end last character of the range, inclusive * @param end last character of the range, inclusive
* @return a newly created USet. The caller must call uset_close() on * @return a newly created USet. The caller must call uset_close() on
* it when done. * it when done.
* @stable ICU 2.4 * @stable ICU 2.4
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 uspoof.h   uspoof.h 
skipping to change at line 589 skipping to change at line 589
UErrorCode *status); UErrorCode *status);
#if U_SHOW_CPLUSPLUS_API #if U_SHOW_CPLUSPLUS_API
/** /**
* Check the specified string for possible security issues. * Check the specified string for possible security issues.
* The text to be checked will typically be an identifier of some sort. * The text to be checked will typically be an identifier of some sort.
* The set of checks to be performed is specified with uspoof_setChecks(). * The set of checks to be performed is specified with uspoof_setChecks().
* *
* @param sc The USpoofChecker * @param sc The USpoofChecker
* @param text A UnicodeString to be checked for possible security issue s. * @param text A UnicodeString to be checked for possible security issue s.
* @position An out parameter that receives the index of the * @param position An out parameter that receives the index of the
* first string position that fails the allowed character * first string position that fails the allowed character
* limitation checks. * limitation checks.
* This parameter may be null if the position information * This parameter may be null if the position information
* is not needed. * is not needed.
* If the string passes the requested checks the * If the string passes the requested checks the
* parameter value will not be set. * parameter value will not be set.
* @param status The error code, set if an error occurred while attempting to * @param status The error code, set if an error occurred while attempting to
* perform the check. * perform the check.
* Spoofing or security issues detected with the input strin g are * Spoofing or security issues detected with the input strin g are
* not reported here, but through the function's return valu e. * not reported here, but through the function's return valu e.
skipping to change at line 821 skipping to change at line 821
* searchable collection of the skeletons. * searchable collection of the skeletons.
* *
* @param sc The USpoofChecker. * @param sc The USpoofChecker.
* @param type The type of skeleton, corresponding to which * @param type The type of skeleton, corresponding to which
* of the Unicode confusable data tables to use. * of the Unicode confusable data tables to use.
* The default is Mixed-Script, Lowercase. * The default is Mixed-Script, Lowercase.
* Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and * Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and
* USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed. * USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed.
* @param s The input string whose skeleton will be computed. * @param s The input string whose skeleton will be computed.
* @param dest The output string, to receive the skeleton string. * @param dest The output string, to receive the skeleton string.
* @param destCapacity The length of the output buffer, in bytes.
* The destCapacity may be zero, in which case the function
will
* return the actual length of the skeleton.
* @param status The error code, set if an error occurred while attemptin g to * @param status The error code, set if an error occurred while attemptin g to
* perform the check. * perform the check.
* @return A reference to the destination (skeleton) string. * @return A reference to the destination (skeleton) string.
* *
* @stable ICU 4.2 * @stable ICU 4.2
*/ */
U_STABLE icu::UnicodeString & U_EXPORT2 U_I18N_API icu::UnicodeString & U_EXPORT2
uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
uint32_t type, uint32_t type,
const icu::UnicodeString &s, const icu::UnicodeString &s,
icu::UnicodeString &dest, icu::UnicodeString &dest,
UErrorCode *status); UErrorCode *status);
#endif /* U_SHOW_CPLUSPLUS_API */ #endif /* U_SHOW_CPLUSPLUS_API */
/** /**
* Serialize the data for a spoof detector into a chunk of memory. * Serialize the data for a spoof detector into a chunk of memory.
* The flattened spoof detection tables can later be used to efficiently * The flattened spoof detection tables can later be used to efficiently
 End of changes. 3 change blocks. 
6 lines changed or deleted 2 lines changed or added


 ustdio.h   ustdio.h 
/* /*
*************************************************************************** *** *************************************************************************** ***
* *
* Copyright (C) 1998-2011, International Business Machines * Copyright (C) 1998-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** *** *************************************************************************** ***
* *
* File ustdio.h * File ustdio.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 10/16/98 stephen Creation. * 10/16/98 stephen Creation.
skipping to change at line 500 skipping to change at line 500
U_DRAFT int32_t U_EXPORT2 U_DRAFT int32_t U_EXPORT2
u_printf_u(const UChar *patternSpecification, u_printf_u(const UChar *patternSpecification,
... ); ... );
/** /**
* Get a UFILE for <TT>stdout</TT>. * Get a UFILE for <TT>stdout</TT>.
* @return UFILE that writes to <TT>stdout</TT> * @return UFILE that writes to <TT>stdout</TT>
* @draft ICU 49 * @draft ICU 49
*/ */
U_DRAFT UFILE * U_EXPORT2 U_DRAFT UFILE * U_EXPORT2
u_get_stdout(); u_get_stdout(void);
/** /**
* Write formatted data to a UFILE. * Write formatted data to a UFILE.
* @param f The UFILE to which to write. * @param f The UFILE to which to write.
* @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will * @param patternSpecification A pattern specifying how <TT>u_fprintf</TT> will
* interpret the variable arguments received and format the data. * interpret the variable arguments received and format the data.
* @return The number of Unicode characters written to <TT>f</TT>. * @return The number of Unicode characters written to <TT>f</TT>.
* @stable ICU 3.0 * @stable ICU 3.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 ustring.h   ustring.h 
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1998-2010, International Business Machines * Copyright (C) 1998-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
********************************************************************** **********************************************************************
* *
* File ustring.h * File ustring.h
* *
* Modification History: * Modification History:
* *
* Date Name Description * Date Name Description
* 12/07/98 bertrand Creation. * 12/07/98 bertrand Creation.
*************************************************************************** *** *************************************************************************** ***
*/ */
#ifndef USTRING_H #ifndef USTRING_H
#define USTRING_H #define USTRING_H
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/putil.h" #include "unicode/putil.h"
#include "unicode/uiter.h" #include "unicode/uiter.h"
/** Simple declaration for u_strToTitle() to avoid including unicode/ubrk.h /**
. @stable ICU 2.1*/ * \def UBRK_TYPEDEF_UBREAK_ITERATOR
* @internal
*/
#ifndef UBRK_TYPEDEF_UBREAK_ITERATOR #ifndef UBRK_TYPEDEF_UBREAK_ITERATOR
# define UBRK_TYPEDEF_UBREAK_ITERATOR # define UBRK_TYPEDEF_UBREAK_ITERATOR
/** Simple declaration for u_strToTitle() to avoid including unicode/ubrk.h . @stable ICU 2.1*/
typedef struct UBreakIterator UBreakIterator; typedef struct UBreakIterator UBreakIterator;
#endif #endif
/** /**
* \file * \file
* \brief C API: Unicode string handling functions * \brief C API: Unicode string handling functions
* *
* These C API functions provide general Unicode string handling. * These C API functions provide general Unicode string handling.
* *
* Some functions are equivalent in name, signature, and behavior to the AN SI C <string.h> * Some functions are equivalent in name, signature, and behavior to the AN SI C <string.h>
skipping to change at line 149 skipping to change at line 154
/** /**
* Concatenate two ustrings. * Concatenate two ustrings.
* Appends at most <code>n</code> characters from <code>src</code> to <code >dst</code>. * Appends at most <code>n</code> characters from <code>src</code> to <code >dst</code>.
* Adds a terminating NUL. * Adds a terminating NUL.
* If src is too long, then only <code>n-1</code> characters will be copied * If src is too long, then only <code>n-1</code> characters will be copied
* before the terminating NUL. * before the terminating NUL.
* If <code>n&lt;=0</code> then dst is not modified. * If <code>n&lt;=0</code> then dst is not modified.
* *
* @param dst The destination string. * @param dst The destination string.
* @param src The source string. * @param src The source string (can be NULL/invalid if n<=0).
* @param n The maximum number of characters to append. * @param n The maximum number of characters to append; no-op if <=0.
* @return A pointer to <code>dst</code>. * @return A pointer to <code>dst</code>.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UChar* U_EXPORT2 U_STABLE UChar* U_EXPORT2
u_strncat(UChar *dst, u_strncat(UChar *dst,
const UChar *src, const UChar *src,
int32_t n); int32_t n);
/** /**
* Find the first occurrence of a substring in a string. * Find the first occurrence of a substring in a string.
skipping to change at line 553 skipping to change at line 558
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_strCaseCompare(const UChar *s1, int32_t length1, u_strCaseCompare(const UChar *s1, int32_t length1,
const UChar *s2, int32_t length2, const UChar *s2, int32_t length2,
uint32_t options, uint32_t options,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
/** /**
* Compare two ustrings for bitwise equality. * Compare two ustrings for bitwise equality.
* Compares at most <code>n</code> characters. * Compares at most <code>n</code> characters.
* *
* @param ucs1 A string to compare. * @param ucs1 A string to compare (can be NULL/invalid if n<=0).
* @param ucs2 A string to compare. * @param ucs2 A string to compare (can be NULL/invalid if n<=0).
* @param n The maximum number of characters to compare. * @param n The maximum number of characters to compare; always returns 0 i
f n<=0.
* @return 0 if <code>s1</code> and <code>s2</code> are bitwise equal; a ne gative * @return 0 if <code>s1</code> and <code>s2</code> are bitwise equal; a ne gative
* value if <code>s1</code> is bitwise less than <code>s2</code>; a positiv e * value if <code>s1</code> is bitwise less than <code>s2</code>; a positiv e
* value if <code>s1</code> is bitwise greater than <code>s2</code>. * value if <code>s1</code> is bitwise greater than <code>s2</code>.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_strncmp(const UChar *ucs1, u_strncmp(const UChar *ucs1,
const UChar *ucs2, const UChar *ucs2,
int32_t n); int32_t n);
skipping to change at line 670 skipping to change at line 675
U_STABLE UChar* U_EXPORT2 U_STABLE UChar* U_EXPORT2
u_strcpy(UChar *dst, u_strcpy(UChar *dst,
const UChar *src); const UChar *src);
/** /**
* Copy a ustring. * Copy a ustring.
* Copies at most <code>n</code> characters. The result will be null termi nated * Copies at most <code>n</code> characters. The result will be null termi nated
* if the length of <code>src</code> is less than <code>n</code>. * if the length of <code>src</code> is less than <code>n</code>.
* *
* @param dst The destination string. * @param dst The destination string.
* @param src The source string. * @param src The source string (can be NULL/invalid if n<=0).
* @param n The maximum number of characters to copy. * @param n The maximum number of characters to copy; no-op if <=0.
* @return A pointer to <code>dst</code>. * @return A pointer to <code>dst</code>.
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UChar* U_EXPORT2 U_STABLE UChar* U_EXPORT2
u_strncpy(UChar *dst, u_strncpy(UChar *dst,
const UChar *src, const UChar *src,
int32_t n); int32_t n);
#if !UCONFIG_NO_CONVERSION #if !UCONFIG_NO_CONVERSION
skipping to change at line 745 skipping to change at line 750
*/ */
U_STABLE char* U_EXPORT2 u_austrncpy(char *dst, U_STABLE char* U_EXPORT2 u_austrncpy(char *dst,
const UChar *src, const UChar *src,
int32_t n ); int32_t n );
#endif #endif
/** /**
* Synonym for memcpy(), but with UChars only. * Synonym for memcpy(), but with UChars only.
* @param dest The destination string * @param dest The destination string
* @param src The source string * @param src The source string (can be NULL/invalid if count<=0)
* @param count The number of characters to copy * @param count The number of characters to copy; no-op if <=0
* @return A pointer to <code>dest</code> * @return A pointer to <code>dest</code>
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UChar* U_EXPORT2 U_STABLE UChar* U_EXPORT2
u_memcpy(UChar *dest, const UChar *src, int32_t count); u_memcpy(UChar *dest, const UChar *src, int32_t count);
/** /**
* Synonym for memmove(), but with UChars only. * Synonym for memmove(), but with UChars only.
* @param dest The destination string * @param dest The destination string
* @param src The source string * @param src The source string (can be NULL/invalid if count<=0)
* @param count The number of characters to move * @param count The number of characters to move; no-op if <=0
* @return A pointer to <code>dest</code> * @return A pointer to <code>dest</code>
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
U_STABLE UChar* U_EXPORT2 U_STABLE UChar* U_EXPORT2
u_memmove(UChar *dest, const UChar *src, int32_t count); u_memmove(UChar *dest, const UChar *src, int32_t count);
/** /**
* Initialize <code>count</code> characters of <code>dest</code> to <code>c </code>. * Initialize <code>count</code> characters of <code>dest</code> to <code>c </code>.
* *
* @param dest The destination string. * @param dest The destination string.
skipping to change at line 921 skipping to change at line 926
* int32_t function() { * int32_t function() {
* if(!didInit) { * if(!didInit) {
* U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11); * U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11);
* U_STRING_INIT(ustringVar2, "jumps 5%", 8); * U_STRING_INIT(ustringVar2, "jumps 5%", 8);
* didInit=TRUE; * didInit=TRUE;
* } * }
* return u_strcmp(ustringVar1, ustringVar2); * return u_strcmp(ustringVar1, ustringVar2);
* } * }
* </pre> * </pre>
* *
* Note that the macros will NOT consistently work if their argument is ano ther #define. * Note that the macros will NOT consistently work if their argument is ano ther <code>#define</code>.
* The following will not work on all platforms, don't use it. * The following will not work on all platforms, don't use it.
* *
* <pre> * <pre>
* #define GLUCK "Mr. Gluck" * #define GLUCK "Mr. Gluck"
* U_STRING_DECL(var, GLUCK, 9) * U_STRING_DECL(var, GLUCK, 9)
* U_STRING_INIT(var, GLUCK, 9) * U_STRING_INIT(var, GLUCK, 9)
* </pre> * </pre>
* *
* Instead, use the string literal "Mr. Gluck" as the argument to both mac ro * Instead, use the string literal "Mr. Gluck" as the argument to both mac ro
* calls. * calls.
skipping to change at line 1157 skipping to change at line 1162
U_STABLE int32_t U_EXPORT2 U_STABLE int32_t U_EXPORT2
u_strToTitle(UChar *dest, int32_t destCapacity, u_strToTitle(UChar *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength, const UChar *src, int32_t srcLength,
UBreakIterator *titleIter, UBreakIterator *titleIter,
const char *locale, const char *locale,
UErrorCode *pErrorCode); UErrorCode *pErrorCode);
#endif #endif
/** /**
* Case-fold the characters in a string. * Case-folds the characters in a string.
*
* Case-folding is locale-independent and not context-sensitive, * Case-folding is locale-independent and not context-sensitive,
* but there is an option for whether to include or exclude mappings for do tted I * but there is an option for whether to include or exclude mappings for do tted I
* and dotless i that are marked with 'I' in CaseFolding.txt. * and dotless i that are marked with 'T' in CaseFolding.txt.
*
* The result may be longer or shorter than the original. * The result may be longer or shorter than the original.
* The source string and the destination buffer are allowed to overlap. * The source string and the destination buffer are allowed to overlap.
* *
* @param dest A buffer for the result string. The result will be zero -terminated if * @param dest A buffer for the result string. The result will be zero -terminated if
* the buffer is large enough. * the buffer is large enough.
* @param destCapacity The size of the buffer (number of UChars). If it is 0, then * @param destCapacity The size of the buffer (number of UChars). If it is 0, then
* dest may be NULL and the function will only return the length of the result * dest may be NULL and the function will only return the length of the result
* without writing any of the result string. * without writing any of the result string.
* @param src The original string * @param src The original string
* @param srcLength The length of the original string. If -1, then src must be zero-terminated. * @param srcLength The length of the original string. If -1, then src must be zero-terminated.
 End of changes. 11 change blocks. 
17 lines changed or deleted 24 lines changed or added


 utext.h   utext.h 
skipping to change at line 298 skipping to change at line 298
* If non-NULL, must refer to an already existing UText, whic h will then * If non-NULL, must refer to an already existing UText, whic h will then
* be reset to reference the specified replaceable text. * be reset to reference the specified replaceable text.
* @param ci A Character Iterator. * @param ci A Character Iterator.
* @param status Errors are returned here. * @param status Errors are returned here.
* @return Pointer to the UText. If a UText was supplied as input, t his * @return Pointer to the UText. If a UText was supplied as input, t his
* will always be used and returned. * will always be used and returned.
* @see Replaceable * @see Replaceable
* @stable ICU 3.4 * @stable ICU 3.4
*/ */
U_STABLE UText * U_EXPORT2 U_STABLE UText * U_EXPORT2
utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ic, UErrorCo de *status); utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCo de *status);
#endif #endif
/** /**
* Clone a UText. This is much like opening a UText where the source tex t is itself * Clone a UText. This is much like opening a UText where the source tex t is itself
* another UText. * another UText.
* *
* A deep clone will copy both the UText data structures and the underlyi ng text. * A deep clone will copy both the UText data structures and the underlyi ng text.
* The original and cloned UText will operate completely independently; m odifications * The original and cloned UText will operate completely independently; m odifications
* made to the text in one will not affect the other. Text providers are not * made to the text in one will not affect the other. Text providers are not
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 utf8.h   utf8.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 1999-2011, International Business Machines * Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: utf8.h * file name: utf8.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 1999sep13 * created on: 1999sep13
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 63 skipping to change at line 63
#ifdef U_UTF8_IMPL #ifdef U_UTF8_IMPL
U_EXPORT const uint8_t U_EXPORT const uint8_t
#elif defined(U_STATIC_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) #elif defined(U_STATIC_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION)
U_CFUNC const uint8_t U_CFUNC const uint8_t
#else #else
U_CFUNC U_IMPORT const uint8_t /* U_IMPORT2? */ /*U_IMPORT*/ U_CFUNC U_IMPORT const uint8_t /* U_IMPORT2? */ /*U_IMPORT*/
#endif #endif
utf8_countTrailBytes[256]; utf8_countTrailBytes[256];
/** /**
* Count the trail bytes for a UTF-8 lead byte. * Counts the trail bytes for a UTF-8 lead byte.
* Returns 0 for 0..0xbf as well as for 0xfe and 0xff.
* *
* This is internal since it is not meant to be called directly by external clients; * This is internal since it is not meant to be called directly by external clients;
* however it is called by public macros in this file and thus must remain stable. * however it is called by public macros in this file and thus must remain stable.
*
* Note: Beginning with ICU 50, the implementation uses a multi-condition e
xpression
* which was shown in 2012 (on x86-64) to compile to fast, branch-free code
.
* leadByte is evaluated multiple times.
*
* The pre-ICU 50 implementation used the exported array utf8_countTrailByt
es:
* #define U8_COUNT_TRAIL_BYTES(leadByte) (utf8_countTrailBytes[leadByte])
* leadByte was evaluated exactly once.
*
* @param leadByte The first byte of a UTF-8 sequence. Must be 0..0xff.
* @internal
*/
#define U8_COUNT_TRAIL_BYTES(leadByte) \
((leadByte)<0xf0 ? \
((leadByte)>=0xc0)+((leadByte)>=0xe0) : \
(leadByte)<0xfe ? 3+((leadByte)>=0xf8)+((leadByte)>=0xfc) : 0)
/**
* Counts the trail bytes for a UTF-8 lead byte of a valid UTF-8 sequence.
* The maximum supported lead byte is 0xf4 corresponding to U+10FFFF.
* leadByte might be evaluated multiple times.
*
* This is internal since it is not meant to be called directly by external
clients;
* however it is called by public macros in this file and thus must remain
stable.
*
* @param leadByte The first byte of a UTF-8 sequence. Must be 0..0xff.
* @internal * @internal
*/ */
#define U8_COUNT_TRAIL_BYTES(leadByte) (utf8_countTrailBytes[(uint8_t)leadB #define U8_COUNT_TRAIL_BYTES_UNSAFE(leadByte) \
yte]) (((leadByte)>=0xc0)+((leadByte)>=0xe0)+((leadByte)>=0xf0))
/** /**
* Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point value. * Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point value.
* *
* This is internal since it is not meant to be called directly by external clients; * This is internal since it is not meant to be called directly by external clients;
* however it is called by public macros in this file and thus must remain stable. * however it is called by public macros in this file and thus must remain stable.
* @internal * @internal
*/ */
#define U8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(c ountTrailBytes)))-1) #define U8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(c ountTrailBytes)))-1)
skipping to change at line 246 skipping to change at line 274
* or an illegal UTF-8 sequence. * or an illegal UTF-8 sequence.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param i string offset * @param i string offset
* @param c output UChar32 variable * @param c output UChar32 variable
* @see U8_NEXT * @see U8_NEXT
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_NEXT_UNSAFE(s, i, c) { \ #define U8_NEXT_UNSAFE(s, i, c) { \
(c)=(uint8_t)(s)[(i)++]; \ (c)=(uint8_t)(s)[(i)++]; \
if((uint8_t)((c)-0xc0)<0x35) { \ if((c)>=0x80) { \
uint8_t __count=U8_COUNT_TRAIL_BYTES(c); \ if((c)<0xe0) { \
U8_MASK_LEAD_BYTE(c, __count); \ (c)=(((c)&0x1f)<<6)|((s)[(i)++]&0x3f); \
switch(__count) { \ } else if((c)<0xf0) { \
/* each following branch falls through to the next one */ \ /* no need for (c&0xf) because the upper bits are truncated aft
case 3: \ er <<12 in the cast to (UChar) */ \
(c)=((c)<<6)|((s)[(i)++]&0x3f); \ (c)=(UChar)(((c)<<12)|(((s)[i]&0x3f)<<6)|((s)[(i)+1]&0x3f)); \
case 2: \ (i)+=2; \
(c)=((c)<<6)|((s)[(i)++]&0x3f); \ } else { \
case 1: \ (c)=(((c)&7)<<18)|(((s)[i]&0x3f)<<12)|(((s)[(i)+1]&0x3f)<<6)|((
(c)=((c)<<6)|((s)[(i)++]&0x3f); \ s)[(i)+2]&0x3f); \
/* no other branches to optimize switch() */ \ (i)+=3; \
break; \
} \ } \
} \ } \
} }
/** /**
* Get a code point from a string at a code point boundary offset, * Get a code point from a string at a code point boundary offset,
* and advance the offset to the next code point boundary. * and advance the offset to the next code point boundary.
* (Post-incrementing forward iteration.) * (Post-incrementing forward iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
skipping to change at line 385 skipping to change at line 410
* Advance the string offset from one code point boundary to the next. * Advance the string offset from one code point boundary to the next.
* (Post-incrementing iteration.) * (Post-incrementing iteration.)
* "Unsafe" macro, assumes well-formed UTF-8. * "Unsafe" macro, assumes well-formed UTF-8.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param i string offset * @param i string offset
* @see U8_FWD_1 * @see U8_FWD_1
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U8_FWD_1_UNSAFE(s, i) { \ #define U8_FWD_1_UNSAFE(s, i) { \
(i)+=1+U8_COUNT_TRAIL_BYTES((s)[i]); \ (i)+=1+U8_COUNT_TRAIL_BYTES_UNSAFE((uint8_t)(s)[i]); \
} }
/** /**
* Advance the string offset from one code point boundary to the next. * Advance the string offset from one code point boundary to the next.
* (Post-incrementing iteration.) * (Post-incrementing iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries. * "Safe" macro, checks for illegal sequences and for string boundaries.
* *
* @param s const uint8_t * string * @param s const uint8_t * string
* @param i string offset, must be i<length * @param i string offset, must be i<length
* @param length string length * @param length string length
 End of changes. 6 change blocks. 
18 lines changed or deleted 49 lines changed or added


 utf_old.h   utf_old.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2002-2011, International Business Machines * Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: utf.h * file name: utf_old.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2002sep21 * created on: 2002sep21
* created by: Markus W. Scherer * created by: Markus W. Scherer
*/ */
/** /**
* \file * \file
skipping to change at line 301 skipping to change at line 301
* Given the lead character, how many bytes are taken by this code point. * Given the lead character, how many bytes are taken by this code point.
* ICU does not deal with code points >0x10ffff * ICU does not deal with code points >0x10ffff
* unless necessary for advancing in the byte stream. * unless necessary for advancing in the byte stream.
* *
* These length macros take into account that for values >0x10ffff * These length macros take into account that for values >0x10ffff
* the UTF8_APPEND_CHAR_SAFE macros would write the error code point 0xffff * the UTF8_APPEND_CHAR_SAFE macros would write the error code point 0xffff
* with 3 bytes. * with 3 bytes.
* Code point comparisons need to be in uint32_t because UChar32 * Code point comparisons need to be in uint32_t because UChar32
* may be a signed type, and negative values must be recognized. * may be a signed type, and negative values must be recognized.
* *
* @deprecated ICU 2.4. Use U8_LENGTH instead, see utf_old.h. * @deprecated ICU 2.4. Use U8_LENGTH instead, see utf.h.
*/ */
#if 1 #if 1
# define UTF8_CHAR_LENGTH(c) \ # define UTF8_CHAR_LENGTH(c) \
((uint32_t)(c)<=0x7f ? 1 : \ ((uint32_t)(c)<=0x7f ? 1 : \
((uint32_t)(c)<=0x7ff ? 2 : \ ((uint32_t)(c)<=0x7ff ? 2 : \
((uint32_t)((c)-0x10000)>0xfffff ? 3 : 4) \ ((uint32_t)((c)-0x10000)>0xfffff ? 3 : 4) \
) \ ) \
) )
#else #else
# define UTF8_CHAR_LENGTH(c) \ # define UTF8_CHAR_LENGTH(c) \
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 utrace.h   utrace.h 
/* /*
*************************************************************************** **** *************************************************************************** ****
* *
* Copyright (C) 2003-2006, International Business Machines * Copyright (C) 2003-2012, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
*************************************************************************** **** *************************************************************************** ****
* file name: utrace.h * file name: utrace.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* created on: 2003aug06 * created on: 2003aug06
* created by: Markus W. Scherer * created by: Markus W. Scherer
skipping to change at line 89 skipping to change at line 89
UTRACE_COLLATION_START=0x2000, UTRACE_COLLATION_START=0x2000,
UTRACE_UCOL_OPEN=UTRACE_COLLATION_START, UTRACE_UCOL_OPEN=UTRACE_COLLATION_START,
UTRACE_UCOL_CLOSE, UTRACE_UCOL_CLOSE,
UTRACE_UCOL_STRCOLL, UTRACE_UCOL_STRCOLL,
UTRACE_UCOL_GET_SORTKEY, UTRACE_UCOL_GET_SORTKEY,
UTRACE_UCOL_GETLOCALE, UTRACE_UCOL_GETLOCALE,
UTRACE_UCOL_NEXTSORTKEYPART, UTRACE_UCOL_NEXTSORTKEYPART,
UTRACE_UCOL_STRCOLLITER, UTRACE_UCOL_STRCOLLITER,
UTRACE_UCOL_OPEN_FROM_SHORT_STRING, UTRACE_UCOL_OPEN_FROM_SHORT_STRING,
UTRACE_UCOL_STRCOLLUTF8, /**< @draft ICU 50 */
UTRACE_COLLATION_LIMIT UTRACE_COLLATION_LIMIT
} UTraceFunctionNumber; } UTraceFunctionNumber;
/** /**
* Setter for the trace level. * Setter for the trace level.
* @param traceLevel A UTraceLevel value. * @param traceLevel A UTraceLevel value.
* @stable ICU 2.8 * @stable ICU 2.8
*/ */
U_STABLE void U_EXPORT2 U_STABLE void U_EXPORT2
utrace_setLevel(int32_t traceLevel); utrace_setLevel(int32_t traceLevel);
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 uvernum.h   uvernum.h 
skipping to change at line 15 skipping to change at line 15
*************************************************************************** **** *************************************************************************** ****
* *
* file name: uvernum.h * file name: uvernum.h
* encoding: US-ASCII * encoding: US-ASCII
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
* Created by: Vladimir Weinstein * Created by: Vladimir Weinstein
* Updated by: Steven R. Loomis * Updated by: Steven R. Loomis
* *
* Gets included by uversion.h and other files.
*
* IMPORTANT: When updating version, the following things need to be done:
* source/common/unicode/uvernum.h - this file: update major, minor,
* patchlevel, suffix, version, short version constants, namespace,
* renaming macro, and copyright
*
* The following files need to be updated as well, which can be done
* by running the UNIX makefile target 'update-windows-makefiles' in icu/so
urce.
*
*
* source/common/common.vcproj - update 'Output file name' on the link tab s
o
* that it contains the new major/minor combination
* source/i18n/i18n.vcproj - same as for the common.vcproj
* source/layout/layout.vcproj - same as for the common.vcproj
* source/layoutex/layoutex.vcproj - same
* source/stubdata/stubdata.vcproj - same as for the common.vcproj
* source/io/io.vcproj - same as for the common.vcproj
* source/data/makedata.mak - change U_ICUDATA_NAME so that it contains
* the new major/minor combination and the Unicod
e version.
*/ */
/**
* \file
* \brief C API: definitions of ICU version numbers
*
* This file is included by uversion.h and other files. This file contains
only
* macros and definitions. The actual version numbers are defined here.
*/
/*
* IMPORTANT: When updating version, the following things need to be done:
* source/common/unicode/uvernum.h - this file: update major, minor,
* patchlevel, suffix, version, short version constants, namespace,
* renaming macro, and copyright
*
* The following files need to be updated as well, which can be done
* by running the UNIX makefile target 'update-windows-makefiles' in icu/
source.
*
*
* source/common/common.vcproj - update 'Output file name' on the link tab
so
* that it contains the new major/minor combination
* source/i18n/i18n.vcproj - same as for the common.vcproj
* source/layout/layout.vcproj - same as for the common.vcproj
* source/layoutex/layoutex.vcproj - same
* source/stubdata/stubdata.vcproj - same as for the common.vcproj
* source/io/io.vcproj - same as for the common.vcproj
* source/data/makedata.mak - change U_ICUDATA_NAME so that it contains
* the new major/minor combination and the Unic
ode version.
*/
#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) 2012, International Business Machines Corporation and oth ers. All Rights Reserved. " " Copyright (C) 2012, International Business Machines Corporation and oth ers. All Rights Reserved. "
/** The current ICU major version as an integer. /** The current ICU major version as an integer.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION_MAJOR_NUM 49 #define U_ICU_VERSION_MAJOR_NUM 50
/** The current ICU minor version as an integer. /** The current ICU minor version as an integer.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#define U_ICU_VERSION_MINOR_NUM 1 #define U_ICU_VERSION_MINOR_NUM 1
/** The current ICU patchlevel version as an integer. /** The current ICU patchlevel version as an integer.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION_PATCHLEVEL_NUM 2 #define U_ICU_VERSION_PATCHLEVEL_NUM 0
/** The current ICU build level version as an integer. /** The current ICU build level version as an integer.
* This value is for use by ICU clients. It defaults to 0. * This value is for use by ICU clients. It defaults to 0.
* @stable ICU 4.0 * @stable ICU 4.0
*/ */
#ifndef U_ICU_VERSION_BUILDLEVEL_NUM #ifndef U_ICU_VERSION_BUILDLEVEL_NUM
#define U_ICU_VERSION_BUILDLEVEL_NUM 0 #define U_ICU_VERSION_BUILDLEVEL_NUM 0
#endif #endif
/** Glued version suffix for renamers /** Glued version suffix for renamers
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#define U_ICU_VERSION_SUFFIX _49 #define U_ICU_VERSION_SUFFIX _50
/** /**
* \def U_DEF2_ICU_ENTRY_POINT_RENAME * \def U_DEF2_ICU_ENTRY_POINT_RENAME
* @internal * @internal
*/ */
/** /**
* \def U_DEF_ICU_ENTRY_POINT_RENAME * \def U_DEF_ICU_ENTRY_POINT_RENAME
* @internal * @internal
*/ */
/** Glued version suffix function for renamers /** Glued version suffix function for renamers
skipping to change at line 112 skipping to change at line 121
#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y ) #define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y )
#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_IC U_VERSION_SUFFIX) #define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_IC U_VERSION_SUFFIX)
#endif #endif
#endif #endif
/** The current ICU library version as a dotted-decimal string. The patchle vel /** The current ICU library version as a dotted-decimal string. The patchle vel
* only appears in this string if it non-zero. * only appears in this string if it non-zero.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.4 * @stable ICU 2.4
*/ */
#define U_ICU_VERSION "49.1.2" #define U_ICU_VERSION "50.1"
/** The current ICU library major/minor version as a string without dots, f or library name suffixes. /** The current ICU library major/minor version as a string without dots, f or library name suffixes.
* This value will change in the subsequent releases of ICU * This value will change in the subsequent releases of ICU
* @stable ICU 2.6 * @stable ICU 2.6
*/ */
#define U_ICU_VERSION_SHORT "49" #define U_ICU_VERSION_SHORT "50"
#ifndef U_HIDE_INTERNAL_API #ifndef U_HIDE_INTERNAL_API
/** Data version in ICU4C. /** Data version in ICU4C.
* @internal ICU 4.4 Internal Use Only * @internal ICU 4.4 Internal Use Only
**/ **/
#define U_ICU_DATA_VERSION "49.1.2" #define U_ICU_DATA_VERSION "50.1"
#endif /* U_HIDE_INTERNAL_API */ #endif /* U_HIDE_INTERNAL_API */
/*========================================================================= == /*========================================================================= ==
* ICU collation framework version information * ICU collation framework version information
* Version info that can be obtained from a collator is affected by these * Version info that can be obtained from a collator is affected by these
* numbers in a secret and magic way. Please use collator version as whole * numbers in a secret and magic way. Please use collator version as whole
*========================================================================= == *========================================================================= ==
*/ */
/** /**
 End of changes. 8 change blocks. 
29 lines changed or deleted 39 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/