summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorBrandon Scott <xeons@users.noreply.github.com>2019-11-16 02:26:18 -0600
committerAndreas Kling <awesomekling@gmail.com>2019-11-16 12:50:50 +0100
commit57eb37160c64e4b955e31a98ae05f70390c40717 (patch)
treefc94e757906106e8212e8e5186b5de925bfa0cee /Libraries
parentd1c984da82ff7ffd0685de29c358b530a4830737 (diff)
downloadserenity-57eb37160c64e4b955e31a98ae05f70390c40717.zip
LibC: Added additional fields to lconv struct
Added some additional fields to the lconv structure that were missing and set all their defaults.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibC/locale.cpp24
-rw-r--r--Libraries/LibC/locale.h21
2 files changed, 45 insertions, 0 deletions
diff --git a/Libraries/LibC/locale.cpp b/Libraries/LibC/locale.cpp
index 9d6f4d65a8..d015cf7a86 100644
--- a/Libraries/LibC/locale.cpp
+++ b/Libraries/LibC/locale.cpp
@@ -8,10 +8,34 @@ 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)
diff --git a/Libraries/LibC/locale.h b/Libraries/LibC/locale.h
index 26b5367434..6e0208aa60 100644
--- a/Libraries/LibC/locale.h
+++ b/Libraries/LibC/locale.h
@@ -17,6 +17,27 @@ struct lconv {
char* decimal_point;
char* thousands_sep;
char* grouping;
+ char* int_curr_symbol;
+ char* currency_symbol;
+ char* mon_decimal_point;
+ char* mon_thousands_sep;
+ char* mon_grouping;
+ char* positive_sign;
+ char* negative_sign;
+ char int_frac_digits;
+ char frac_digits;
+ char p_cs_precedes;
+ char p_sep_by_space;
+ char n_cs_precedes;
+ char n_sep_by_space;
+ char p_sign_posn;
+ char n_sign_posn;
+ char int_p_cs_precedes;
+ char int_p_sep_by_space;
+ char int_n_cs_precedes;
+ char int_n_sep_by_space;
+ char int_p_sign_posn;
+ char int_n_sign_posn;
};
struct lconv* localeconv();