cvs commit: src/lib/libc/locale Makefile.inc mbrtowc.c none.c
setrunelocale.c srune.c table.c wcrtomb.c
Tim J. Robbins
tjr at FreeBSD.org
Fri Oct 31 21:13:15 PST 2003
tjr 2003/10/31 21:13:14 PST
FreeBSD src repository
Modified files:
lib/libc/locale Makefile.inc mbrtowc.c none.c
setrunelocale.c table.c wcrtomb.c
Added files:
lib/libc/locale srune.c
Log:
Allow mbrtowc() and wcrtomb() to be implemented directly, instead of
as wrappers around the deprecated 4.4BSD rune functions. This paves the
way for state-dependent encodings, which the rune API does not support.
- Add __emulated_sgetrune() and __emulated_sputrune(), which are
implementations of sgetrune() and sputrune() in terms of
mbrtowc() and wcrtomb().
- Rename the old rune-wrapper mbrtowc() and wcrtomb() functions to
__emulated_mbrtowc() and __emulated_wcrtomb().
- Add __mbrtowc and __wcrtomb function pointers, which point to the
current locale's conversion functions, or the __emulated versions.
- Implement mbrtowc() and wcrtomb() as calls to these function pointers.
- Make the "NONE" encoding implement mbrtowc() and wcrtomb() directly.
All of this emulation mess will be removed, together with rune support,
in FreeBSD 6.
Revision Changes Path
1.48 +2 -1 src/lib/libc/locale/Makefile.inc
1.4 +18 -3 src/lib/libc/locale/mbrtowc.c
1.7 +42 -39 src/lib/libc/locale/none.c
1.32 +15 -0 src/lib/libc/locale/setrunelocale.c
1.1 +94 -0 src/lib/libc/locale/srune.c (new)
1.19 +17 -5 src/lib/libc/locale/table.c
1.5 +16 -2 src/lib/libc/locale/wcrtomb.c
More information about the cvs-src
mailing list