mirror of
https://github.com/ps5-payload-dev/sdk.git
synced 2026-10-19 01:51:19 -05:00
locale: use freebsd struct for localeconv
This commit is contained in:
1 parent
03f75ba291
commit
c096b8c5fd
1 file changed
+35
@@ -15,6 +15,7 @@ along with this program; see the file COPYING. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
@@ -229,6 +230,40 @@ const _RuneLocale _DefaultRuneLocale = {
|
||||
};
|
||||
|
||||
|
||||
static const struct lconv posix_lconv = {
|
||||
.decimal_point = ".",
|
||||
.thousands_sep = "",
|
||||
.grouping = "",
|
||||
.int_curr_symbol = "",
|
||||
.currency_symbol = "",
|
||||
.mon_decimal_point = "",
|
||||
.mon_thousands_sep = "",
|
||||
.mon_grouping = "",
|
||||
.positive_sign = "",
|
||||
.negative_sign = "",
|
||||
.int_frac_digits = CHAR_MAX,
|
||||
.frac_digits = CHAR_MAX,
|
||||
.p_cs_precedes = CHAR_MAX,
|
||||
.p_sep_by_space = CHAR_MAX,
|
||||
.n_cs_precedes = CHAR_MAX,
|
||||
.n_sep_by_space = CHAR_MAX,
|
||||
.p_sign_posn = CHAR_MAX,
|
||||
.n_sign_posn = CHAR_MAX,
|
||||
.int_p_cs_precedes = CHAR_MAX,
|
||||
.int_p_sep_by_space = CHAR_MAX,
|
||||
.int_n_cs_precedes = CHAR_MAX,
|
||||
.int_n_sep_by_space = CHAR_MAX,
|
||||
.int_p_sign_posn = CHAR_MAX,
|
||||
.int_n_sign_posn = CHAR_MAX,
|
||||
};
|
||||
|
||||
|
||||
struct lconv*
|
||||
localeconv(void) {
|
||||
return (void*)&posix_lconv;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
asprintf_l(char **strp, locale_t loc, const char *fmt, ...) {
|
||||
va_list args;
|
||||
|
||||
Reference in new issue
Block a user