OSDN Git Service

Add printf wchar support for %lc (%C) and %ls (%S).
authorManuel Novoa III <mjn3@codepoet.org>
Mon, 4 Nov 2002 21:27:46 +0000 (21:27 -0000)
committerManuel Novoa III <mjn3@codepoet.org>
Mon, 4 Nov 2002 21:27:46 +0000 (21:27 -0000)
commita854cf512abbcf96e0950ff776f11a0ce3829840
treed3c2c43d8e590aeb542a2f4e96f952d3e80034ac
parent44835a918f93196eb994d3c0d92bfa4aa2d4aef6
Add printf wchar support for %lc (%C) and %ls (%S).
Require printf format strings to be valid multibyte strings beginning and
  ending in their initial shift state, as per the stds.

Fixed a bug in _wchar_wcsntoutf8s().  Don't store wcs position if dst is NULL.
Also, introduce an awful hack into _wchar_wcsntoutf8s() and wcsrtombs() in
  order to support %ls in printf.  See comments below for details.
Change behaviour of wc<->mb functions when in the C locale.  Now they do
  a 1-1 map for the range 0x80-UCHAR_MAX.  This is for backwards compatibility
  and consistency with the stds requirements that a printf format string by
  a valid multibyte string beginning and ending in it's initial shift state.
libc/misc/wchar/wchar.c
libc/stdio/printf.c