X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=m4%2Flocale.m4;fp=m4%2Flocale.m4;h=e422a928a85908f4cb4247379bc0aaafc50a13d7;hp=0000000000000000000000000000000000000000;hb=63fa6c00c541b9462784337e15955d7c3027f2f3;hpb=81b71a515e2024cee739deb6e207eb3b0e7c5d64 diff --git a/m4/locale.m4 b/m4/locale.m4 new file mode 100644 index 0000000..e422a92 --- /dev/null +++ b/m4/locale.m4 @@ -0,0 +1,56 @@ +PSI_CHECK_LOCALE() { + AC_CHECK_HEADERS(locale.h xlocale.h) + + PSI_STRUCT(struct lconv, [ + char *currency_symbol, + char *decimal_point, + char frac_digits, + char *grouping, + char *int_curr_symbol, + char int_frac_digits, + char int_n_cs_precedes, + char int_n_sep_by_space, + char int_n_sign_posn, + char int_p_cs_precedes, + char int_p_sep_by_space, + char int_p_sign_posn, + char *mon_decimal_point, + char *mon_grouping, + char *mon_thousands_sep, + char *negative_sign, + char n_cs_precedes, + char n_sep_by_space, + char n_sign_posn, + char *positive_sign, + char p_cs_precedes, + char p_sep_by_space, + char p_sign_posn, + char *thousands_sep]) + + PSI_CONST(LC_ALL, int) + PSI_CONST(LC_COLLATE, int) + PSI_CONST(LC_CTYPE, int) + PSI_CONST(LC_MESSAGES, int) + PSI_CONST(LC_MONETARY, int) + PSI_CONST(LC_NUMERIC, int) + PSI_CONST(LC_TIME, int) + + PSI_CONST(LC_COLLATE_MASK, int) + PSI_CONST(LC_CTYPE_MASK, int) + PSI_CONST(LC_MESSAGES_MASK, int) + PSI_CONST(LC_MONETARY_MASK, int) + PSI_CONST(LC_NUMERIC_MASK, int) + PSI_CONST(LC_TIME_MASK, int) + PSI_CONST(LC_ALL_MASK, int) + + PSI_MACRO(locale_t LC_GLOBAL_LOCALE) + + PSI_OPAQUE_TYPE(locale_t) + + PSI_DECL(locale_t duplocale, [(locale_t loc)]) + PSI_DECL(void freelocale, [(locale_t loc)]) + PSI_DECL(struct lconv *localeconv, [(void)]) + PSI_DECL(locale_t newlocale, [(int mask, const char *locale, locale_t base)]) + PSI_DECL(char *setlocale, [(int category, const char *locale)]) + PSI_DECL(locale_t uselocale, [(locale_t loc)]) +}