aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/include/unicode/upluralrules.h
diff options
context:
space:
mode:
authorneksard <neksard@yandex-team.ru>2022-02-10 16:45:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:23 +0300
commit8f7cf138264e0caa318144bf8a2c950e0b0a8593 (patch)
tree83bf5c8c8047c42d8475e6095df90ccdc3d1b57f /contrib/libs/icu/include/unicode/upluralrules.h
parentd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (diff)
downloadydb-8f7cf138264e0caa318144bf8a2c950e0b0a8593.tar.gz
Restoring authorship annotation for <neksard@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/icu/include/unicode/upluralrules.h')
-rw-r--r--contrib/libs/icu/include/unicode/upluralrules.h278
1 files changed, 139 insertions, 139 deletions
diff --git a/contrib/libs/icu/include/unicode/upluralrules.h b/contrib/libs/icu/include/unicode/upluralrules.h
index 9c09dfab8b..a97c528956 100644
--- a/contrib/libs/icu/include/unicode/upluralrules.h
+++ b/contrib/libs/icu/include/unicode/upluralrules.h
@@ -1,157 +1,157 @@
// © 2016 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html
-/*
-*****************************************************************************************
-* Copyright (C) 2010-2013, International Business Machines
-* Corporation and others. All Rights Reserved.
-*****************************************************************************************
-*/
-
-#ifndef UPLURALRULES_H
-#define UPLURALRULES_H
-
-#include "unicode/utypes.h"
-
-#if !UCONFIG_NO_FORMATTING
-
-#include "unicode/localpointer.h"
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+*****************************************************************************************
+* Copyright (C) 2010-2013, International Business Machines
+* Corporation and others. All Rights Reserved.
+*****************************************************************************************
+*/
+
+#ifndef UPLURALRULES_H
+#define UPLURALRULES_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/localpointer.h"
#include "unicode/uenum.h"
#ifndef U_HIDE_INTERNAL_API
#include "unicode/unum.h"
#endif /* U_HIDE_INTERNAL_API */
-
+
// Forward-declaration
struct UFormattedNumber;
-/**
- * \file
- * \brief C API: Plural rules, select plural keywords for numeric values.
- *
- * A UPluralRules object defines rules for mapping non-negative numeric
- * values onto a small set of keywords. Rules are constructed from a text
- * description, consisting of a series of keywords and conditions.
- * The uplrules_select function examines each condition in order and
- * returns the keyword for the first condition that matches the number.
- * If none match, the default rule(other) is returned.
- *
- * For more information, see the LDML spec, C.11 Language Plural Rules:
- * http://www.unicode.org/reports/tr35/#Language_Plural_Rules
- *
- * Keywords: ICU locale data has 6 predefined values -
- * 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check
- * the value of keyword returned by the uplrules_select function.
- *
- * These are based on CLDR <i>Language Plural Rules</i>. For these
- * predefined rules, see the CLDR page at
- * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
- */
-
-/**
- * Type of plurals and PluralRules.
- * @stable ICU 50
- */
-enum UPluralType {
- /**
- * Plural rules for cardinal numbers: 1 file vs. 2 files.
- * @stable ICU 50
- */
- UPLURAL_TYPE_CARDINAL,
- /**
- * Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc.
- * @stable ICU 50
- */
- UPLURAL_TYPE_ORDINAL,
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * One more than the highest normal UPluralType value.
- * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
- */
- UPLURAL_TYPE_COUNT
+/**
+ * \file
+ * \brief C API: Plural rules, select plural keywords for numeric values.
+ *
+ * A UPluralRules object defines rules for mapping non-negative numeric
+ * values onto a small set of keywords. Rules are constructed from a text
+ * description, consisting of a series of keywords and conditions.
+ * The uplrules_select function examines each condition in order and
+ * returns the keyword for the first condition that matches the number.
+ * If none match, the default rule(other) is returned.
+ *
+ * For more information, see the LDML spec, C.11 Language Plural Rules:
+ * http://www.unicode.org/reports/tr35/#Language_Plural_Rules
+ *
+ * Keywords: ICU locale data has 6 predefined values -
+ * 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check
+ * the value of keyword returned by the uplrules_select function.
+ *
+ * These are based on CLDR <i>Language Plural Rules</i>. For these
+ * predefined rules, see the CLDR page at
+ * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
+ */
+
+/**
+ * Type of plurals and PluralRules.
+ * @stable ICU 50
+ */
+enum UPluralType {
+ /**
+ * Plural rules for cardinal numbers: 1 file vs. 2 files.
+ * @stable ICU 50
+ */
+ UPLURAL_TYPE_CARDINAL,
+ /**
+ * Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc.
+ * @stable ICU 50
+ */
+ UPLURAL_TYPE_ORDINAL,
+#ifndef U_HIDE_DEPRECATED_API
+ /**
+ * One more than the highest normal UPluralType value.
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
+ */
+ UPLURAL_TYPE_COUNT
#endif /* U_HIDE_DEPRECATED_API */
-};
-/**
- * @stable ICU 50
- */
-typedef enum UPluralType UPluralType;
-
-/**
- * Opaque UPluralRules object for use in C programs.
- * @stable ICU 4.8
- */
-struct UPluralRules;
-typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPluralRules. @stable ICU 4.8 */
-
-/**
- * Opens a new UPluralRules object using the predefined cardinal-number plural rules for a
- * given locale.
- * Same as uplrules_openForType(locale, UPLURAL_TYPE_CARDINAL, status).
- * @param locale The locale for which the rules are desired.
- * @param status A pointer to a UErrorCode to receive any errors.
- * @return A UPluralRules for the specified locale, or NULL if an error occurred.
- * @stable ICU 4.8
- */
+};
+/**
+ * @stable ICU 50
+ */
+typedef enum UPluralType UPluralType;
+
+/**
+ * Opaque UPluralRules object for use in C programs.
+ * @stable ICU 4.8
+ */
+struct UPluralRules;
+typedef struct UPluralRules UPluralRules; /**< C typedef for struct UPluralRules. @stable ICU 4.8 */
+
+/**
+ * Opens a new UPluralRules object using the predefined cardinal-number plural rules for a
+ * given locale.
+ * Same as uplrules_openForType(locale, UPLURAL_TYPE_CARDINAL, status).
+ * @param locale The locale for which the rules are desired.
+ * @param status A pointer to a UErrorCode to receive any errors.
+ * @return A UPluralRules for the specified locale, or NULL if an error occurred.
+ * @stable ICU 4.8
+ */
U_CAPI 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 occurred.
- * @stable ICU 50
- */
+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 occurred.
+ * @stable ICU 50
+ */
U_CAPI UPluralRules* U_EXPORT2
-uplrules_openForType(const char *locale, UPluralType type, UErrorCode *status);
-
-/**
- * Closes a UPluralRules object. Once closed it may no longer be used.
- * @param uplrules The UPluralRules object to close.
- * @stable ICU 4.8
- */
+uplrules_openForType(const char *locale, UPluralType type, UErrorCode *status);
+
+/**
+ * Closes a UPluralRules object. Once closed it may no longer be used.
+ * @param uplrules The UPluralRules object to close.
+ * @stable ICU 4.8
+ */
U_CAPI void U_EXPORT2
-uplrules_close(UPluralRules *uplrules);
-
-
-#if U_SHOW_CPLUSPLUS_API
-
-U_NAMESPACE_BEGIN
-
-/**
- * \class LocalUPluralRulesPointer
- * "Smart pointer" class, closes a UPluralRules via uplrules_close().
- * For most methods see the LocalPointerBase base class.
- *
- * @see LocalPointerBase
- * @see LocalPointer
- * @stable ICU 4.8
- */
-U_DEFINE_LOCAL_OPEN_POINTER(LocalUPluralRulesPointer, UPluralRules, uplrules_close);
-
-U_NAMESPACE_END
-
-#endif
-
-
-/**
+uplrules_close(UPluralRules *uplrules);
+
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUPluralRulesPointer
+ * "Smart pointer" class, closes a UPluralRules via uplrules_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 4.8
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUPluralRulesPointer, UPluralRules, uplrules_close);
+
+U_NAMESPACE_END
+
+#endif
+
+
+/**
* Given a floating-point number, returns the keyword of the first rule that
- * applies to the number, according to the supplied UPluralRules object.
- * @param uplrules The UPluralRules object specifying the rules.
- * @param number The number for which the rule has to be determined.
+ * applies to the number, according to the supplied UPluralRules object.
+ * @param uplrules The UPluralRules object specifying the rules.
+ * @param number The number for which the rule has to be determined.
* @param keyword An output buffer to write the keyword of the rule that
* applies to number.
* @param capacity The capacity of the keyword buffer.
- * @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 the keyword.
- * @stable ICU 4.8
- */
+ * @stable ICU 4.8
+ */
U_CAPI int32_t U_EXPORT2
-uplrules_select(const UPluralRules *uplrules,
- double number,
- UChar *keyword, int32_t capacity,
- UErrorCode *status);
-
+uplrules_select(const UPluralRules *uplrules,
+ double number,
+ UChar *keyword, int32_t capacity,
+ UErrorCode *status);
+
/**
* Given a formatted number, returns the keyword of the first rule
* that applies to the number, according to the supplied UPluralRules object.
@@ -217,6 +217,6 @@ U_STABLE UEnumeration* U_EXPORT2
uplrules_getKeywords(const UPluralRules *uplrules,
UErrorCode *status);
-#endif /* #if !UCONFIG_NO_FORMATTING */
-
-#endif
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif