2019-02-08 02:38:21 +01:00
|
|
|
#include <assert.h>
|
2019-06-07 11:49:03 +02:00
|
|
|
#include <locale.h>
|
2019-02-08 02:38:21 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
2019-06-22 14:32:59 +02:00
|
|
|
static char default_decimal_point[] = ".";
|
|
|
|
static char default_thousands_sep[] = ",";
|
|
|
|
static char default_grouping[] = "\x03\x03";
|
|
|
|
|
2019-11-16 02:26:18 -06:00
|
|
|
static char default_empty_string[] = "";
|
|
|
|
static char default_empty_value = 127;
|
|
|
|
|
2019-04-22 13:00:59 +02:00
|
|
|
static struct lconv default_locale = {
|
2019-06-22 14:32:59 +02:00
|
|
|
default_decimal_point,
|
|
|
|
default_thousands_sep,
|
|
|
|
default_grouping,
|
2019-11-16 02:26:18 -06:00
|
|
|
default_empty_string,
|
|
|
|
default_empty_string,
|
|
|
|
default_empty_string,
|
|
|
|
default_empty_string,
|
|
|
|
default_empty_string,
|
|
|
|
default_empty_string,
|
|
|
|
default_empty_string,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value,
|
|
|
|
default_empty_value
|
2019-04-22 13:00:59 +02:00
|
|
|
};
|
|
|
|
|
2019-02-08 02:38:21 +01:00
|
|
|
char* setlocale(int category, const char* locale)
|
|
|
|
{
|
|
|
|
dbgprintf("FIXME(LibC): setlocale(%d, %s)\n", category, locale);
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2019-02-26 12:57:02 +01:00
|
|
|
struct lconv* localeconv()
|
|
|
|
{
|
2019-04-22 13:00:59 +02:00
|
|
|
return &default_locale;
|
2019-02-26 12:57:02 +01:00
|
|
|
}
|
2019-02-08 02:38:21 +01:00
|
|
|
}
|