ack/lang/cem/libcc.ansi/core/locale/localeconv.c
David Given d1cdb07719 Realise that the libc core can safely call other libc core functions, even if
they're not defined in the core: so putw() can call stdio stuff, for example.
So the earlier concept of pureness isn't necessary. Rename accordingly.
2018-06-21 23:24:23 +02:00

37 lines
764 B
C

/*
* localeconv - set components of a struct according to current locale
*/
/* $Id$ */
#include <limits.h>
#include <locale.h>
extern struct lconv _lc;
struct lconv*
localeconv(void)
{
register struct lconv* lcp = &_lc;
lcp->decimal_point = ".";
lcp->thousands_sep = "";
lcp->grouping = "";
lcp->int_curr_symbol = "";
lcp->currency_symbol = "";
lcp->mon_decimal_point = "";
lcp->mon_thousands_sep = "";
lcp->mon_grouping = "";
lcp->positive_sign = "";
lcp->negative_sign = "";
lcp->int_frac_digits = CHAR_MAX;
lcp->frac_digits = CHAR_MAX;
lcp->p_cs_precedes = CHAR_MAX;
lcp->p_sep_by_space = CHAR_MAX;
lcp->n_cs_precedes = CHAR_MAX;
lcp->n_sep_by_space = CHAR_MAX;
lcp->p_sign_posn = CHAR_MAX;
lcp->n_sign_posn = CHAR_MAX;
return lcp;
}