diff options
author | Sergey Uzhakov <uzhastik@gmail.com> | 2022-06-22 21:23:19 +0300 |
---|---|---|
committer | Sergey Uzhakov <uzhastik@gmail.com> | 2022-06-22 21:23:19 +0300 |
commit | b86c509aaa5b19d5659a4548395a47c9e87826e9 (patch) | |
tree | 98025d7bd574b788f6679b24f91711ea86bf07ae /contrib/libs/icu/io/locbund.h | |
parent | f55ada30d924b55d15fad9001944df1323a9598a (diff) | |
download | ydb-b86c509aaa5b19d5659a4548395a47c9e87826e9.tar.gz |
YQ-1154: allow pg translator in OSS
ref:bc7b8dcc7b45e5f527a87a1bed622dff6f06d41a
Diffstat (limited to 'contrib/libs/icu/io/locbund.h')
-rw-r--r-- | contrib/libs/icu/io/locbund.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/contrib/libs/icu/io/locbund.h b/contrib/libs/icu/io/locbund.h new file mode 100644 index 0000000000..5879e28f01 --- /dev/null +++ b/contrib/libs/icu/io/locbund.h @@ -0,0 +1,82 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 1998-2011, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* +* File locbund.h +* +* Modification History: +* +* Date Name Description +* 10/16/98 stephen Creation. +* 02/25/99 stephen Modified for new C API. +******************************************************************************* +*/ + +#ifndef LOCBUND_H +#define LOCBUND_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/unum.h" + +#define ULOCALEBUNDLE_NUMBERFORMAT_COUNT ((int32_t)UNUM_SPELLOUT) + +typedef struct ULocaleBundle { + char *fLocale; + + UNumberFormat *fNumberFormat[ULOCALEBUNDLE_NUMBERFORMAT_COUNT]; + UBool isInvariantLocale; +} ULocaleBundle; + + +/** + * Initialize a ULocaleBundle, initializing all formatters to 0. + * @param result A ULocaleBundle to initialize. + * @param loc The locale of the ULocaleBundle. + * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid. + */ +U_CAPI ULocaleBundle * +u_locbund_init(ULocaleBundle *result, const char *loc); + +/** + * Create a new ULocaleBundle, initializing all formatters to 0. + * @param loc The locale of the ULocaleBundle. + * @return A pointer to a ULocaleBundle, or 0 if <TT>loc</TT> was invalid. + */ +/*U_CAPI ULocaleBundle * +u_locbund_new(const char *loc);*/ + +/** + * Create a deep copy of this ULocaleBundle; + * @param bundle The ULocaleBundle to clone. + * @return A new ULocaleBundle. + */ +/*U_CAPI ULocaleBundle * +u_locbund_clone(const ULocaleBundle *bundle);*/ + +/** + * Delete the specified ULocaleBundle, freeing all associated memory. + * @param bundle The ULocaleBundle to delete + */ +U_CAPI void +u_locbund_close(ULocaleBundle *bundle); + +/** + * Get the NumberFormat used to format and parse numbers in a ULocaleBundle. + * @param bundle The ULocaleBundle to use + * @return A pointer to the NumberFormat used for number formatting and parsing. + */ +U_CAPI UNumberFormat * +u_locbund_getNumberFormat(ULocaleBundle *bundle, UNumberFormatStyle style); + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif |