diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-01-21 02:52:59 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-01-21 02:52:59 +0000 |
commit | 3f1adc3da04a7809171c3990770d72f28c5d80e4 (patch) | |
tree | 0953b7f1ad2a4a72a3843ab34cc6b292e6d74ea5 /libc/stdio/_scanf.c | |
parent | 71486075e0ab506b80609416a3126a666b88e415 (diff) |
*: remove __UCLIBC_CURLOCALE_DATA, __UCLIBC_CURLOCALE_DATA.x
is always equivalent to __UCLIBC_CURLOCALE->x.
remove typedef __uclibc_locale_t, it used only in a few places,
it is lees confusing to use struct __uclibc_locale_struct
everywhere.
xlocale.h: hide __global_locale back under _LIBC,
bug 53 is wrong in claiming it should be exported.
Also hide under _LIBC:
extern __locale_t __curlocale_var;
extern __locale_t __curlocale(void);
extern __locale_t __curlocale_set(__locale_t newloc);
# define __UCLIBC_CURLOCALE
# define __XL_NPP(N)
# define __LOCALE_PARAM
# define __LOCALE_ARG
# define __LOCALE_PTR
Diffstat (limited to 'libc/stdio/_scanf.c')
-rw-r--r-- | libc/stdio/_scanf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c index 1fa6208d4..9189a52e1 100644 --- a/libc/stdio/_scanf.c +++ b/libc/stdio/_scanf.c @@ -717,26 +717,26 @@ void attribute_hidden __init_scan_cookie(register struct scan_cookie *sc, #endif /* __UCLIBC_HAS_WCHAR__ */ #ifdef __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__ - if (*(sc->grouping = __UCLIBC_CURLOCALE_DATA.grouping)) { - sc->thousands_sep = (const unsigned char *) __UCLIBC_CURLOCALE_DATA.thousands_sep; - sc->tslen = __UCLIBC_CURLOCALE_DATA.thousands_sep_len; + if (*(sc->grouping = __UCLIBC_CURLOCALE->grouping)) { + sc->thousands_sep = (const unsigned char *) __UCLIBC_CURLOCALE->thousands_sep; + sc->tslen = __UCLIBC_CURLOCALE->thousands_sep_len; #ifdef __UCLIBC_HAS_WCHAR__ - sc->thousands_sep_wc = __UCLIBC_CURLOCALE_DATA.thousands_sep_wc; + sc->thousands_sep_wc = __UCLIBC_CURLOCALE->thousands_sep_wc; #endif /* __UCLIBC_HAS_WCHAR__ */ } #endif /* __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__ */ #ifdef __UCLIBC_HAS_FLOATS__ #ifdef __UCLIBC_HAS_LOCALE__ - sc->decpt = (const unsigned char *) __UCLIBC_CURLOCALE_DATA.decimal_point; - sc->decpt_len = __UCLIBC_CURLOCALE_DATA.decimal_point_len; + sc->decpt = (const unsigned char *) __UCLIBC_CURLOCALE->decimal_point; + sc->decpt_len = __UCLIBC_CURLOCALE->decimal_point_len; #else /* __UCLIBC_HAS_LOCALE__ */ sc->fake_decpt = sc->decpt = (unsigned char *) decpt_str; sc->decpt_len = 1; #endif /* __UCLIBC_HAS_LOCALE__ */ #ifdef __UCLIBC_HAS_WCHAR__ #ifdef __UCLIBC_HAS_LOCALE__ - sc->decpt_wc = __UCLIBC_CURLOCALE_DATA.decimal_point_wc; + sc->decpt_wc = __UCLIBC_CURLOCALE->decimal_point_wc; #else sc->decpt_wc = '.'; #endif @@ -1193,7 +1193,7 @@ int VFSCANF (FILE *__restrict fp, const Wchar *__restrict format, va_list arg) #if defined(__UCLIBC_HAS_LOCALE__) && !defined(L_vfwscanf) /* ANSI/ISO C99 requires format string to be a valid multibyte string * beginning and ending in its initial shift state. */ - if (((__UCLIBC_CURLOCALE_DATA).encoding) != __ctype_encoding_7_bit) { + if (__UCLIBC_CURLOCALE->encoding != __ctype_encoding_7_bit) { const char *p = format; mbstate.__mask = 0; /* Initialize the mbstate. */ if (mbsrtowcs(NULL, &p, SIZE_MAX, &mbstate) == ((size_t)(-1))) { |