From 174d73a3bad55f7359c49c82474e9991871d0e2f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Aug 2002 21:04:06 +0000 Subject: 2002-08-02 Roland McGrath * locale/localeinfo.h (_NL_CURRENT_DATA): New macro. * wcsmbs/wcsmbsload.h (update_conversion_ptrs): Use it. * locale/lc-ctype.c (_nl_postload_ctype): Likewise. * wctype/wctrans.c (wctrans): Likewise. * wctype/wctype.c (__wctype): Likewise. * intl/loadmsgcat.c (_nl_init_domain_conv): Use _NL_CURRENT. --- locale/localeinfo.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'locale/localeinfo.h') diff --git a/locale/localeinfo.h b/locale/localeinfo.h index 2074569..3a43469 100644 --- a/locale/localeinfo.h +++ b/locale/localeinfo.h @@ -158,13 +158,17 @@ extern const char _nl_POSIX_name[] attribute_hidden; /* The standard codeset. */ extern const char _nl_C_codeset[] attribute_hidden; +/* Return a pointer to the current `struct locale_data' for CATEGORY. */ +#define _NL_CURRENT_DATA(category) \ + ((const struct locale_data *) _nl_current_##category) + /* Extract the current CATEGORY locale's string for ITEM. */ #define _NL_CURRENT(category, item) \ (_nl_current_##category->values[_NL_ITEM_INDEX (item)].string) /* Extract the current CATEGORY locale's string for ITEM. */ #define _NL_CURRENT_WSTR(category, item) \ - ((wchar_t *) (_nl_current_##category->values[_NL_ITEM_INDEX (item)].wstr)) + ((wchar_t *) _nl_current_##category->values[_NL_ITEM_INDEX (item)].wstr) /* Extract the current CATEGORY locale's word for ITEM. */ #define _NL_CURRENT_WORD(category, item) \ -- cgit v1.1