diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-09-29 22:37:10 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-09-29 22:37:10 +0100 |
commit | a2396edde4f9746cfeb416ece9e20916de3216a4 (patch) | |
tree | 40a35e448d014e3ab4a4f36bd7a41749145ea0d7 /frontends/riscos/wimp.c | |
parent | 0dcfc2fc5dbc7b65cb0234dfbf340a22bd625638 (diff) | |
download | netsurf-a2396edde4f9746cfeb416ece9e20916de3216a4.tar.gz netsurf-a2396edde4f9746cfeb416ece9e20916de3216a4.tar.bz2 |
complete transition to locale independant core operation
The netsurf core no longer uses any locale dependant operations
excepting the mall number or cases where such operations are
explicitly wanted.
the netsurf_init now calls setlocale with the empty string and lets
the c library setup as per its specific implementation.
any core functionality that specificaly processes ascii text must use
the utils/ascii.h header to do so.
Diffstat (limited to 'frontends/riscos/wimp.c')
-rw-r--r-- | frontends/riscos/wimp.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/frontends/riscos/wimp.c b/frontends/riscos/wimp.c index 2579c672e..abf099a55 100644 --- a/frontends/riscos/wimp.c +++ b/frontends/riscos/wimp.c @@ -360,12 +360,8 @@ void ro_gui_set_icon_integer(wimp_w w, wimp_i i, int value) { char buffer[20]; // Big enough for 64-bit int - setlocale(LC_NUMERIC, ""); - sprintf(buffer, "%d", value); - setlocale(LC_NUMERIC, "C"); - ro_gui_set_icon_string(w, i, buffer, true); } @@ -382,8 +378,6 @@ void ro_gui_set_icon_decimal(wimp_w w, wimp_i i, int value, int decimal_places) { char buffer[20]; // Big enough for 64-bit int - setlocale(LC_NUMERIC, ""); - switch (decimal_places) { case 0: sprintf(buffer, "%d", value); @@ -399,8 +393,6 @@ void ro_gui_set_icon_decimal(wimp_w w, wimp_i i, int value, int decimal_places) break; } - setlocale(LC_NUMERIC, "C"); - ro_gui_set_icon_string(w, i, buffer, true); } @@ -421,12 +413,8 @@ int ro_gui_get_icon_decimal(wimp_w w, wimp_i i, int decimal_places) for (; decimal_places > 0; decimal_places--) multiple *= 10; - setlocale(LC_NUMERIC, ""); - value = atof(ro_gui_get_icon_string(w, i)) * multiple; - setlocale(LC_NUMERIC, "C"); - return (int)value; } |