7 #include "pthread_impl.h"
9 #define LOCALE_NAME_MAX 15
14 char name[LOCALE_NAME_MAX+1];
15 const struct __locale_map *next;
18 extern const struct __locale_map __c_dot_utf8;
19 extern const struct __locale_struct __c_locale;
20 extern const struct __locale_struct __c_dot_utf8_locale;
22 const struct __locale_map *__get_locale(int, const char *);
23 const char *__mo_lookup(const void *, size_t, const char *);
24 const char *__lctrans(const char *, const struct __locale_map *);
25 const char *__lctrans_cur(const char *);
27 #define LCTRANS(msg, lc, loc) __lctrans(msg, (loc)->cat[(lc)])
28 #define LCTRANS_CUR(msg) __lctrans_cur(msg)
30 #define C_LOCALE ((locale_t)&__c_locale)
31 #define UTF8_LOCALE ((locale_t)&__c_dot_utf8_locale)
33 #define CURRENT_LOCALE (__pthread_self()->locale)
35 #define CURRENT_UTF8 (!!__pthread_self()->locale->cat[LC_CTYPE])
38 #define MB_CUR_MAX (CURRENT_UTF8 ? 4 : 1)