diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-04-04 15:18:13 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-04-04 15:18:13 +0200 |
commit | 985fc132f23dbb83de76c5af9e783ef1b5900148 (patch) | |
tree | f41ba85592ceae633f11c973f81971da23653f15 /locale | |
parent | 5cd7af016d8587ff53b20ba259746f97edbddbf7 (diff) | |
download | glibc-985fc132f23dbb83de76c5af9e783ef1b5900148.tar glibc-985fc132f23dbb83de76c5af9e783ef1b5900148.tar.gz glibc-985fc132f23dbb83de76c5af9e783ef1b5900148.tar.bz2 glibc-985fc132f23dbb83de76c5af9e783ef1b5900148.zip |
strfmon_l: Use specified locale for number formatting [BZ #19633]
Diffstat (limited to 'locale')
-rw-r--r-- | locale/localeinfo.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/locale/localeinfo.h b/locale/localeinfo.h index 5c4e6ef424..94627f37e4 100644 --- a/locale/localeinfo.h +++ b/locale/localeinfo.h @@ -299,6 +299,27 @@ extern __thread struct __locale_data *const *_nl_current_##category \ #endif +/* Extract CATEGORY locale's string for ITEM. */ +static inline const char * +_nl_lookup (locale_t l, int category, int item) +{ + return l->__locales[category]->values[_NL_ITEM_INDEX (item)].string; +} + +/* Extract CATEGORY locale's wide string for ITEM. */ +static inline const wchar_t * +_nl_lookup_wstr (locale_t l, int category, int item) +{ + return (wchar_t *) l->__locales[category] + ->values[_NL_ITEM_INDEX (item)].wstr; +} + +/* Extract the CATEGORY locale's word for ITEM. */ +static inline uint32_t +_nl_lookup_word (locale_t l, int category, int item) +{ + return l->__locales[category]->values[_NL_ITEM_INDEX (item)].word; +} /* Default search path if no LOCPATH environment variable. */ extern const char _nl_default_locale_path[] attribute_hidden; |