ladybird/Libraries/LibC/locale.cpp
Brandon Scott 57eb37160c LibC: Added additional fields to lconv struct
Added some additional fields to the lconv structure that were missing
and set all their defaults.
2019-11-16 12:50:50 +01:00

52 lines
1.1 KiB
C++

#include <assert.h>
#include <locale.h>
#include <stdio.h>
extern "C" {
static char default_decimal_point[] = ".";
static char default_thousands_sep[] = ",";
static char default_grouping[] = "\x03\x03";
static char default_empty_string[] = "";
static char default_empty_value = 127;
static struct lconv default_locale = {
default_decimal_point,
default_thousands_sep,
default_grouping,
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
};
char* setlocale(int category, const char* locale)
{
dbgprintf("FIXME(LibC): setlocale(%d, %s)\n", category, locale);
return nullptr;
}
struct lconv* localeconv()
{
return &default_locale;
}
}