#pragma prototyped
#include "lclib.h"
#undef localeconv
static char null[] = "";
static struct lconv debug_lconv =
{
",",
".",
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
};
static struct lconv default_lconv =
{
".",
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
&null[0],
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
CHAR_MAX,
};
#if !_lib_localeconv
struct lconv*
localeconv(void)
{
return &default_lconv;
}
#endif
struct lconv*
_ast_localeconv(void)
{
if ((locales[AST_LC_MONETARY]->flags | locales[AST_LC_NUMERIC]->flags) & LC_debug)
return &debug_lconv;
if ((locales[AST_LC_NUMERIC]->flags & (LC_default|LC_local)) == LC_local)
return locales[AST_LC_NUMERIC]->territory == &lc_territories[0] ? &default_lconv : &debug_lconv;
return localeconv();
}