summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/multibyte_citrus.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* New POSIX xlocale implementation written from scratch.schwarze2017-09-051-6/+6
| | | | | | | | | | | | Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8. With important help from kettenis@, guenther@, and jca@. Repeated testing in ports bulk builds by naddy@. Additional testing by jca@, sebastia@, dcoppa@, and others. OK kettenis@ dcoppa@, and guenther@ on an earlier version. Riding guenther@'s libc/librthread major bump.
* Delete some abstraction that we don't and won't need.schwarze2016-09-051-28/+16
| | | | | | | | | | | | | | | | Declare functions rather than generating declarations with macros. Just call functions rather than mainting function pointer tables. Purge unused arguments. Simplify mbstate_t casting. Garbage collect one empty and one unused function. As a bonus, make mbsinit(3) work at all, it returned garbage in the past due to a missing cast when passing mbstate_t. Apart from that, no functional change. No libc bump needed; only private functions are removed and change prototype and only private structs change size. OK stsp@ mpi@; deraadt@ likes the general direction.
* Wrap <inttypes.h> and finish wrapping of <wchar.h> so that calls go directguenther2015-09-121-1/+8
| | | | and the symbols not in the C standard are weak
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-051-2/+2
|
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-051-2/+1
| | | | ok guenther millert kettenis
* remove unused variablechl2012-08-141-2/+1
| | | | ok matthew@
* Add support for mbsnrtowcs() and wcsnrtombs() to libc.matthew2012-06-061-5/+31
| | | | Bulk build test by naddy.
* Replace the single-byte placeholders for the multi-byte/wide-characterstsp2010-07-271-0/+101
conversion interfaces of libc (mbrtowc(3) and friends) with new implementations that internally call an API based on NetBSD's citrus. This allows us to support locales with multi-byte character encodings. Provide two implementations of the citrus-based API: one based on the old single-byte placeholders for use with our existing single-byte character locales (C, ISO8859-*, KOI8, CP1251, etc.), and one that provides support for UTF-8 encoded characters (code based on FreeBSD's implementation). Install the en_US.UTF-8 ctype locale support file, and allow the UTF-8 ctype locale to be enabled via setlocale(3) (export LC_CTYPE='en_US.UTF-8'). A lot of programs, especially from ports, will now start using UTF-8 if the UTF-8 locale is enabled. Use at your own risk, and please report any breakage. Note that ncurses-based programs cannot display UTF-8 right now, this is being worked on. To prevent install media growth, add vfprintf(3) and mbrtowc(3) to libstubs. The mbrtowc stub was copied unchanged from its old single-byte placeholder. vfprintf.c doesn't need to be copied, just put in .PATH (hint by fgsch@). Testing by myself, naddy, sthen, nicm, espie, armani, Dmitrij D. Czarkoff. ok matthieu espie millert sthen nicm deraadt