diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-02-10 08:02:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-02-10 08:02:07 +0000 |
commit | 43e56b0efc8f5b1bfa96d6f1c629339f779eabc1 (patch) | |
tree | 4a62623cbf2dcd326152e30424e5320c03f84ea0 /stdio-common/_i18n_number.h | |
parent | 408d46a538a59b2f090fab214998b53c34f1a29f (diff) | |
download | glibc-43e56b0efc8f5b1bfa96d6f1c629339f779eabc1.tar glibc-43e56b0efc8f5b1bfa96d6f1c629339f779eabc1.tar.gz glibc-43e56b0efc8f5b1bfa96d6f1c629339f779eabc1.tar.bz2 glibc-43e56b0efc8f5b1bfa96d6f1c629339f779eabc1.zip |
Update.
2004-02-10 Ulrich Drepper <drepper@redhat.com>
* stdio-common/_i18n_number.h: Finish last patch.
Diffstat (limited to 'stdio-common/_i18n_number.h')
-rw-r--r-- | stdio-common/_i18n_number.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/stdio-common/_i18n_number.h b/stdio-common/_i18n_number.h index 0043b04470..f3404c5a0a 100644 --- a/stdio-common/_i18n_number.h +++ b/stdio-common/_i18n_number.h @@ -32,8 +32,8 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr) # define decimal NULL # define thousands NULL #else -# define wdecimal L'\0' -# define wthousands L'\0' + wint_t wdecimal = L'\0'; + wint_t wthousands = L'\0'; char decimal[MB_LEN_MAX]; char thousands[MB_LEN_MAX]; #endif @@ -44,6 +44,10 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr) wctrans_t map = __wctrans ("to_outpunct"); if (map != NULL) { + wdecimal = __towctrans (L'.', map); + wthousands = __towctrans (L',', map); + +#ifndef COMPILE_WPRINTF mbstate_t state; memset (&state, '\0', sizeof (state)); @@ -54,6 +58,7 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr) if (__wcrtomb (thousands, wthousands, &state) == (size_t) -1) memcpy (thousands, ",", 2); +#endif } /* Copy existing string so that nothing gets overwritten. */ |