From 3f1adc3da04a7809171c3990770d72f28c5d80e4 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 21 Jan 2009 02:52:59 +0000 Subject: *: 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 --- libc/stdio/_uintmaxtostr.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'libc/stdio/_uintmaxtostr.c') diff --git a/libc/stdio/_uintmaxtostr.c b/libc/stdio/_uintmaxtostr.c index 0d25a0a9f..086f6abd1 100644 --- a/libc/stdio/_uintmaxtostr.c +++ b/libc/stdio/_uintmaxtostr.c @@ -50,7 +50,7 @@ char attribute_hidden *_uintmaxtostr(register char * __restrict bufend, uintmax_ alphacase ^= outdigit; if (alphacase == __UIM_GROUP) { assert(base == 10); - if (*(g = __UCLIBC_CURLOCALE_DATA.grouping)) { + if (*(g = __UCLIBC_CURLOCALE->grouping)) { grouping = *g; } } @@ -62,9 +62,9 @@ char attribute_hidden *_uintmaxtostr(register char * __restrict bufend, uintmax_ do { #ifndef __LOCALE_C_ONLY if (!grouping) { /* Finished a group. */ - bufend -= __UCLIBC_CURLOCALE_DATA.thousands_sep_len; - memcpy(bufend, __UCLIBC_CURLOCALE_DATA.thousands_sep, - __UCLIBC_CURLOCALE_DATA.thousands_sep_len); + bufend -= __UCLIBC_CURLOCALE->thousands_sep_len; + memcpy(bufend, __UCLIBC_CURLOCALE->thousands_sep, + __UCLIBC_CURLOCALE->thousands_sep_len); if (g[1] != 0) { /* g[1] == 0 means repeat last grouping. */ /* Note: g[1] == -1 means no further grouping. But since * we'll never wrap around, we can set grouping to -1 without @@ -80,10 +80,10 @@ char attribute_hidden *_uintmaxtostr(register char * __restrict bufend, uintmax_ #ifndef __LOCALE_C_ONLY if (unlikely(outdigit)) { - bufend -= __UCLIBC_CURLOCALE_DATA.outdigit_length[digit]; + bufend -= __UCLIBC_CURLOCALE->outdigit_length[digit]; memcpy(bufend, - (&__UCLIBC_CURLOCALE_DATA.outdigit0_mb)[digit], - __UCLIBC_CURLOCALE_DATA.outdigit_length[digit]); + (&__UCLIBC_CURLOCALE->outdigit0_mb)[digit], + __UCLIBC_CURLOCALE->outdigit_length[digit]); } else #endif { @@ -105,9 +105,9 @@ char attribute_hidden *_uintmaxtostr(register char * __restrict bufend, uintmax_ do { #ifndef __LOCALE_C_ONLY if (!grouping) { /* Finished a group. */ - bufend -= __UCLIBC_CURLOCALE_DATA.thousands_sep_len; - memcpy(bufend, __UCLIBC_CURLOCALE_DATA.thousands_sep, - __UCLIBC_CURLOCALE_DATA.thousands_sep_len); + bufend -= __UCLIBC_CURLOCALE->thousands_sep_len; + memcpy(bufend, __UCLIBC_CURLOCALE->thousands_sep, + __UCLIBC_CURLOCALE->thousands_sep_len); if (g[1] != 0) { /* g[1] == 0 means repeat last grouping. */ /* Note: g[1] == -1 means no further grouping. But since * we'll never wrap around, we can set grouping to -1 without @@ -132,10 +132,10 @@ char attribute_hidden *_uintmaxtostr(register char * __restrict bufend, uintmax_ #ifndef __LOCALE_C_ONLY if (unlikely(outdigit)) { - bufend -= __UCLIBC_CURLOCALE_DATA.outdigit_length[digit]; + bufend -= __UCLIBC_CURLOCALE->outdigit_length[digit]; memcpy(bufend, - (&__UCLIBC_CURLOCALE_DATA.outdigit0_mb)[digit], - __UCLIBC_CURLOCALE_DATA.outdigit_length[digit]); + (&__UCLIBC_CURLOCALE->outdigit0_mb)[digit], + __UCLIBC_CURLOCALE->outdigit_length[digit]); } else #endif { -- cgit v1.2.3