fxlibc/src/libc/locale/localeconv.c
Lephenixnoir fdf32aeb97
locale: add a stub that supports only the "C" locale (TEST)
This is enough to support the standard and likely the C++ library and
external programs to port, but also the most we can do without a proper
locale data storage and more target-specific developments that aren't a
priority right now.
2021-05-16 18:12:45 +02:00

35 lines
887 B
C

#include <locale.h>
#include <limits.h>
static struct lconv lconv_c = {
.decimal_point = ".",
.thousands_sep = "",
.grouping = "",
.mon_decimal_point = "",
.mon_thousands_sep = "",
.mon_grouping = "",
.positive_sign = "",
.negative_sign = "",
.currency_symbol = "",
.frac_digits = CHAR_MAX,
.p_cs_precedes = CHAR_MAX,
.n_cs_precedes = CHAR_MAX,
.p_sep_by_space = CHAR_MAX,
.n_sep_by_space = CHAR_MAX,
.p_sign_posn = CHAR_MAX,
.n_sign_posn = CHAR_MAX,
.int_curr_symbol = "",
.int_frac_digits = CHAR_MAX,
.int_p_cs_precedes = CHAR_MAX,
.int_n_cs_precedes = CHAR_MAX,
.int_p_sep_by_space = CHAR_MAX,
.int_n_sep_by_space = CHAR_MAX,
.int_p_sign_posn = CHAR_MAX,
.int_n_sign_posn = CHAR_MAX,
};
struct lconv *localeconv(void)
{
return &lconv_c;
}