summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu-xetex/i18n/unicode/unum.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/icu-xetex/i18n/unicode/unum.h')
-rw-r--r--Build/source/libs/icu-xetex/i18n/unicode/unum.h123
1 files changed, 65 insertions, 58 deletions
diff --git a/Build/source/libs/icu-xetex/i18n/unicode/unum.h b/Build/source/libs/icu-xetex/i18n/unicode/unum.h
index e699adb3d41..c3bbc1e7705 100644
--- a/Build/source/libs/icu-xetex/i18n/unicode/unum.h
+++ b/Build/source/libs/icu-xetex/i18n/unicode/unum.h
@@ -1,6 +1,7 @@
/*
*******************************************************************************
-* Copyright (C) 1997-2005, International Business Machines Corporation and others. All Rights Reserved.
+* Copyright (C) 1997-2006, International Business Machines Corporation and others.
+* All Rights Reserved.
* Modification History:
*
* Date Name Description
@@ -133,7 +134,7 @@ typedef void* UNumberFormat;
typedef enum UNumberFormatStyle {
/**
* Decimal format defined by pattern
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
UNUM_PATTERN_DECIMAL=0,
/** Decimal format */
@@ -148,17 +149,17 @@ typedef enum UNumberFormatStyle {
UNUM_SPELLOUT,
/**
* Ordinal rule-based format
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
UNUM_ORDINAL,
/**
* Duration rule-based format
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
UNUM_DURATION,
/**
* Rule-based format defined by pattern
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
UNUM_PATTERN_RULEBASED,
/** Default format */
@@ -221,7 +222,7 @@ typedef enum UNumberFormatPadPosition {
* @see DecimalFormat
* @stable ICU 2.0
*/
-U_CAPI UNumberFormat* U_EXPORT2
+U_STABLE UNumberFormat* U_EXPORT2
unum_open( UNumberFormatStyle style,
const UChar* pattern,
int32_t patternLength,
@@ -236,7 +237,7 @@ unum_open( UNumberFormatStyle style,
* @param fmt The formatter to close.
* @stable ICU 2.0
*/
-U_CAPI void U_EXPORT2
+U_STABLE void U_EXPORT2
unum_close(UNumberFormat* fmt);
/**
@@ -247,7 +248,7 @@ unum_close(UNumberFormat* fmt);
* @return A pointer to a UNumberFormat identical to fmt.
* @stable ICU 2.0
*/
-U_CAPI UNumberFormat* U_EXPORT2
+U_STABLE UNumberFormat* U_EXPORT2
unum_clone(const UNumberFormat *fmt,
UErrorCode *status);
@@ -272,7 +273,7 @@ unum_clone(const UNumberFormat *fmt,
* @see UFieldPosition
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_format( const UNumberFormat* fmt,
int32_t number,
UChar* result,
@@ -301,7 +302,7 @@ unum_format( const UNumberFormat* fmt,
* @see UFieldPosition
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_formatInt64(const UNumberFormat *fmt,
int64_t number,
UChar* result,
@@ -330,7 +331,7 @@ unum_formatInt64(const UNumberFormat *fmt,
* @see UFieldPosition
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_formatDouble( const UNumberFormat* fmt,
double number,
UChar* result,
@@ -357,9 +358,9 @@ unum_formatDouble( const UNumberFormat* fmt,
* @see unum_formatDouble
* @see unum_parseDoubleCurrency
* @see UFieldPosition
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
-U_DRAFT int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_formatDoubleCurrency(const UNumberFormat* fmt,
double number,
UChar* currency,
@@ -385,7 +386,7 @@ unum_formatDoubleCurrency(const UNumberFormat* fmt,
* @see unum_formatDouble
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_parse( const UNumberFormat* fmt,
const UChar* text,
int32_t textLength,
@@ -433,7 +434,7 @@ unum_parseInt64(const UNumberFormat* fmt,
* @see unum_formatDouble
* @stable ICU 2.0
*/
-U_CAPI double U_EXPORT2
+U_STABLE double U_EXPORT2
unum_parseDouble( const UNumberFormat* fmt,
const UChar* text,
int32_t textLength,
@@ -457,9 +458,9 @@ unum_parseDouble( const UNumberFormat* fmt,
* @return the parsed double
* @see unum_parseDouble
* @see unum_formatDoubleCurrency
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
-U_DRAFT double U_EXPORT2
+U_STABLE double U_EXPORT2
unum_parseDoubleCurrency(const UNumberFormat* fmt,
const UChar* text,
int32_t textLength,
@@ -483,7 +484,7 @@ unum_parseDoubleCurrency(const UNumberFormat* fmt,
* @see DecimalFormat
* @stable ICU 2.0
*/
-U_CAPI void U_EXPORT2
+U_STABLE void U_EXPORT2
unum_applyPattern( UNumberFormat *format,
UBool localized,
const UChar *pattern,
@@ -502,7 +503,7 @@ unum_applyPattern( UNumberFormat *format,
* @see unum_countAvailable
* @stable ICU 2.0
*/
-U_CAPI const char* U_EXPORT2
+U_STABLE const char* U_EXPORT2
unum_getAvailable(int32_t index);
/**
@@ -514,7 +515,7 @@ unum_getAvailable(int32_t index);
* @see unum_getAvailable
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_countAvailable(void);
/** The possible UNumberFormat numeric attributes @stable ICU 2.0 */
@@ -552,16 +553,16 @@ typedef enum UNumberFormatAttribute {
/** Secondary grouping size */
UNUM_SECONDARY_GROUPING_SIZE,
/** Use significant digits
- * @draft ICU 3.0 */
+ * @stable ICU 3.0 */
UNUM_SIGNIFICANT_DIGITS_USED,
/** Minimum significant digits
- * @draft ICU 3.0 */
+ * @stable ICU 3.0 */
UNUM_MIN_SIGNIFICANT_DIGITS,
/** Maximum significant digits
- * @draft ICU 3.0 */
+ * @stable ICU 3.0 */
UNUM_MAX_SIGNIFICANT_DIGITS,
/** Lenient parse mode used by rule-based formats.
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
UNUM_LENIENT_PARSE
} UNumberFormatAttribute;
@@ -582,7 +583,7 @@ typedef enum UNumberFormatAttribute {
* @see unum_setTextAttribute
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_getAttribute(const UNumberFormat* fmt,
UNumberFormatAttribute attr);
@@ -605,7 +606,7 @@ unum_getAttribute(const UNumberFormat* fmt,
* @see unum_setTextAttribute
* @stable ICU 2.0
*/
-U_CAPI void U_EXPORT2
+U_STABLE void U_EXPORT2
unum_setAttribute( UNumberFormat* fmt,
UNumberFormatAttribute attr,
int32_t newValue);
@@ -625,7 +626,7 @@ unum_setAttribute( UNumberFormat* fmt,
* @see unum_setTextAttribute
* @stable ICU 2.0
*/
-U_CAPI double U_EXPORT2
+U_STABLE double U_EXPORT2
unum_getDoubleAttribute(const UNumberFormat* fmt,
UNumberFormatAttribute attr);
@@ -643,7 +644,7 @@ unum_getDoubleAttribute(const UNumberFormat* fmt,
* @see unum_setTextAttribute
* @stable ICU 2.0
*/
-U_CAPI void U_EXPORT2
+U_STABLE void U_EXPORT2
unum_setDoubleAttribute( UNumberFormat* fmt,
UNumberFormatAttribute attr,
double newValue);
@@ -664,14 +665,14 @@ typedef enum UNumberFormatTextAttribute {
UNUM_CURRENCY_CODE,
/**
* The default rule set. This is only available with rule-based formatters.
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
UNUM_DEFAULT_RULESET,
/**
* The public rule sets. This is only available with rule-based formatters.
* This is a read-only attribute. The public rulesets are returned as a
* single string, with each ruleset name delimited by ';' (semicolon).
- * @draft ICU 3.0
+ * @stable ICU 3.0
*/
UNUM_PUBLIC_RULESETS
} UNumberFormatTextAttribute;
@@ -694,7 +695,7 @@ typedef enum UNumberFormatTextAttribute {
* @see unum_setAttribute
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_getTextAttribute( const UNumberFormat* fmt,
UNumberFormatTextAttribute tag,
UChar* result,
@@ -717,7 +718,7 @@ unum_getTextAttribute( const UNumberFormat* fmt,
* @see unum_setAttribute
* @stable ICU 2.0
*/
-U_CAPI void U_EXPORT2
+U_STABLE void U_EXPORT2
unum_setTextAttribute( UNumberFormat* fmt,
UNumberFormatTextAttribute tag,
const UChar* newValue,
@@ -740,15 +741,13 @@ unum_setTextAttribute( UNumberFormat* fmt,
* @see DecimalFormat
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_toPattern( const UNumberFormat* fmt,
UBool isPatternLocalized,
UChar* result,
int32_t resultLength,
UErrorCode* status);
-/** The maximum size for a textual number format symbol. @internal*/
-#define UNFSYMBOLSMAXSIZE 10
/**
* Constants for specifying a number format symbol.
@@ -756,42 +755,50 @@ unum_toPattern( const UNumberFormat* fmt,
*/
typedef enum UNumberFormatSymbol {
/** The decimal separator */
- UNUM_DECIMAL_SEPARATOR_SYMBOL,
+ UNUM_DECIMAL_SEPARATOR_SYMBOL = 0,
/** The grouping separator */
- UNUM_GROUPING_SEPARATOR_SYMBOL,
+ UNUM_GROUPING_SEPARATOR_SYMBOL = 1,
/** The pattern separator */
- UNUM_PATTERN_SEPARATOR_SYMBOL,
+ UNUM_PATTERN_SEPARATOR_SYMBOL = 2,
/** The percent sign */
- UNUM_PERCENT_SYMBOL,
+ UNUM_PERCENT_SYMBOL = 3,
/** Zero*/
- UNUM_ZERO_DIGIT_SYMBOL,
+ UNUM_ZERO_DIGIT_SYMBOL = 4,
/** Character representing a digit in the pattern */
- UNUM_DIGIT_SYMBOL,
+ UNUM_DIGIT_SYMBOL = 5,
/** The minus sign */
- UNUM_MINUS_SIGN_SYMBOL,
+ UNUM_MINUS_SIGN_SYMBOL = 6,
/** The plus sign */
- UNUM_PLUS_SIGN_SYMBOL,
+ UNUM_PLUS_SIGN_SYMBOL = 7,
/** The currency symbol */
- UNUM_CURRENCY_SYMBOL,
+ UNUM_CURRENCY_SYMBOL = 8,
/** The international currency symbol */
- UNUM_INTL_CURRENCY_SYMBOL,
+ UNUM_INTL_CURRENCY_SYMBOL = 9,
/** The monetary separator */
- UNUM_MONETARY_SEPARATOR_SYMBOL,
+ UNUM_MONETARY_SEPARATOR_SYMBOL = 10,
/** The exponential symbol */
- UNUM_EXPONENTIAL_SYMBOL,
+ UNUM_EXPONENTIAL_SYMBOL = 11,
/** Per mill symbol */
- UNUM_PERMILL_SYMBOL,
+ UNUM_PERMILL_SYMBOL = 12,
/** Escape padding character */
- UNUM_PAD_ESCAPE_SYMBOL,
+ UNUM_PAD_ESCAPE_SYMBOL = 13,
/** Infinity symbol */
- UNUM_INFINITY_SYMBOL,
+ UNUM_INFINITY_SYMBOL = 14,
/** Nan symbol */
- UNUM_NAN_SYMBOL,
+ UNUM_NAN_SYMBOL = 15,
/** Significant digit symbol
- * @draft ICU 3.0 */
- UNUM_SIGNIFICANT_DIGIT_SYMBOL,
+ * @stable ICU 3.0 */
+ UNUM_SIGNIFICANT_DIGIT_SYMBOL = 16,
+
+#ifndef U_HIDE_DRAFT_API
+ /** The monetary grouping separator
+ * @draft ICU 3.6
+ */
+ UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL = 17,
+#endif /*U_HIDE_DRAFT_API*/
+
/** count symbol constants */
- UNUM_FORMAT_SYMBOL_COUNT
+ UNUM_FORMAT_SYMBOL_COUNT = 18
} UNumberFormatSymbol;
/**
@@ -810,7 +817,7 @@ typedef enum UNumberFormatSymbol {
* @see unum_setSymbol
* @stable ICU 2.0
*/
-U_CAPI int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unum_getSymbol(const UNumberFormat *fmt,
UNumberFormatSymbol symbol,
UChar *buffer,
@@ -830,7 +837,7 @@ unum_getSymbol(const UNumberFormat *fmt,
* @see unum_getSymbol
* @stable ICU 2.0
*/
-U_CAPI void U_EXPORT2
+U_STABLE void U_EXPORT2
unum_setSymbol(UNumberFormat *fmt,
UNumberFormatSymbol symbol,
const UChar *value,
@@ -845,9 +852,9 @@ unum_setSymbol(UNumberFormat *fmt,
* @param type type of the locale we're looking for (valid or actual)
* @param status error code for the operation
* @return the locale name
- * @draft ICU 2.8 likely to change after ICU 3.0, based on feedback
+ * @stable ICU 2.8
*/
-U_CAPI const char* U_EXPORT2
+U_STABLE const char* U_EXPORT2
unum_getLocaleByType(const UNumberFormat *fmt,
ULocDataLocaleType type,
UErrorCode* status);