diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-01-14 12:48:58 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-01-14 12:48:58 +0000 |
commit | 0b82c17d579ed23fedea73dc6b9d1f52ac48ea48 (patch) | |
tree | bf879647de6d3f39459ea3b7328dd97e676fde82 /newlib | |
parent | 811de4bff30b41fdddb99be25cd3d41d039e2919 (diff) | |
download | cygnal-0b82c17d579ed23fedea73dc6b9d1f52ac48ea48.tar.gz cygnal-0b82c17d579ed23fedea73dc6b9d1f52ac48ea48.tar.bz2 cygnal-0b82c17d579ed23fedea73dc6b9d1f52ac48ea48.zip |
* libc/stdio/vfprintf.c (_VFPRINTF_R): Just wave bytes invalid in
the current charset through.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 15 | ||||
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 9 |
2 files changed, 22 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 1afbaf69f..d4f0c5d30 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,18 @@ +2010-01-14 Corinna Vinschen <corinna@vinschen.de> + + * libc/stdio/vfprintf.c (_VFPRINTF_R): Just wave bytes invalid in + the current charset through. + +2010-01-13 Corinna Vinschen <corinna@vinschen.de> + + * libc/locale/locale.c (lc_ctype_charset): Disable defaulting to + "UTF-8" on Cygwin. + (lc_message_charset): Ditto. + (loadlocale): Disable setting charset of the "C" locale to "UTF-8" on + Cygwin. + * libc/stdlib/mbtowc_r.c (__mbtowc): Add Cygwin-specific comment. + * libc/stdlib/wctomb_r.c (__wctomb): Ditto. + 2010-01-11 Sebastian Huber <sebastian.huber@embedded-brains.de> * libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory. diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 773485885..fc33c3027 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -724,8 +724,13 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), cp = fmt; #ifdef _MB_CAPABLE while ((n = __mbtowc (data, &wc, fmt, MB_CUR_MAX, - __locale_charset (), &state)) > 0) { - if (wc == '%') + __locale_charset (), &state)) != 0) { + if (n < 0) { + /* Wave invalid chars through. */ + memset (&state, 0, sizeof state); + n = 1; + } + else if (wc == '%') break; fmt += n; } |