summaryrefslogtreecommitdiff
path: root/lib/libc/locale
AgeCommit message (Collapse)Author
2012-06-07Document mbsnrtowcs() and wcsnrtombs().Matthew Dempsky
ok jmc
2012-06-06Add support for mbsnrtowcs() and wcsnrtombs() to libc.Matthew Dempsky
Bulk build test by naddy.
2011-11-16Fix mbstowcs return value documentation. New text based on mbsrtowcs page.Stefan Sperling
ok jmc
2011-10-09d_t_fmt: fix the format for the day of the month to use %e (singleAntoine Jacoutot
digits are preceded by a blank instead of a 0) and not %d (POSIX). ok jasper@ guenther@
2011-04-29Add BUGS section explaining that these functions do not cover the entireStefan Sperling
Unicode character set in a UTF-8 locale and can therefore return wrong answers.
2011-04-15wcwidth() must return -1 if the character is not printable.Stefan Sperling
Diff from Alexander Polakov. OK phessler@
2011-04-03Don't fill the ctype tab with Latin-1 information in UTF-8 locales.Stefan Sperling
Single byte sequences other than ASCII are not valid UTF-8, so they should test false in single-byte ctype functions like isprint(). Remove some dead #ifdef'd code while here. ok phessler nicm mikeb
2011-04-03Add wcwidth(3) man page. ok nicmStefan Sperling
2011-03-16nl_types.h doesn't need to be #included to use nl_langinfo(). PointedPhilip Guenthe
out by Andres Perera (andres.p at zoho.com)
2011-03-15Remove evaluation of PATH_LOCALE environment variable because it can beStefan Sperling
abused to cause an integer overflow and serves no real purpose. Found by Alexander Schrijver. ok millert deraadt
2011-03-13Sync ctype definitions for the UTF-8 locale to FreeBSD, fixing width ofStefan Sperling
various zero-width characters (e.g. diacritical marks). Also fix runetype mask definitions so that mklocale interprets zero width properly. Diff from Alexander Polakov. Character definition changes checked against Unicode 5.2 by me. ok matthew nicm
2011-03-09Stilistic improvement: use clean mdoc(7) .Qq enclosures rather thanIngo Schwarze
(correct, but ugly) low-level roff(7) quoting of quote characters. As a side effect, this avoids ugly formatting caused by a nasty mandoc(1) bug with roff(7) quoting in mdoc(7) documents. Of course, that bug will ultimately get fixed as well, but that can't be done quickly. Reported by Tim van der Molen <tbvdm at xs4all dot nl> ok jmc@
2010-12-05Rewrite the mbrtowc(3) man page so we can make sense of this function.Stefan Sperling
tweaks from jmc, help from uwe, "We are going to have to trust you :-)" deraadt
2010-11-20Add CAVEATS section documenting error handling caveats.Stefan Sperling
tweak and ok jmc, tedu
2010-09-10observe the following spelling:Jason McIntyre
- wide character (noun) - wide-character (adjective) this is the "fix of least resistance", and appears to be in line with posix style; a tiny fix still needed for curses, but i'll mail that upstream;
2010-07-27Replace the single-byte placeholders for the multi-byte/wide-characterStefan Sperling
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
2010-03-26dispense with some wacky escape sequences;Jason McIntyre
2010-02-03Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentMiod Vallat
files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
2009-11-09mbrlen returns size_t not int.Nicholas Marriott
ok espie
2009-01-13Man page for wcstof(3), wcstod(3) and wcstold(3).Mark Kettenis
2009-01-13Add wcstof(3) and wcstold(3).Mark Kettenis
ok miod@
2009-01-13Add wcstoimax(3) and wcstoumax(3).Mark Kettenis
ok miod@
2008-12-20Add man page for wcstol and friends.Mark Kettenis
ok jmc@
2008-10-05Fix conversion of numbers without an exponent.Mark Kettenis
ok martynas@
2008-08-23make mbstowcs(NULL, string, 0) correctly return the length of theDamien Miller
wchar_t string needed to represent "string", which in our case is just strlen(string); feedback & "looks right" deraadt@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2007-11-28remove unused functionCharles Longeau
ok otto@
2007-10-08attribute packed -> __packedGilles Chehade
OK millert
2007-09-17Check snprintf(3) return value for error or truncation.Moritz Jodeit
Mostly path construction, where truncation could be bad. ok and input from deraadt@ millert@ ray@
2007-09-06_xpg4_setrunelocale() returns an errno(2) value in the failureMoritz Jodeit
case and 0 if the locale was found. So checking against -1 makes no sense. ok millert@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-02-09grammar;Jason McIntyre
2006-07-04fix prototype of wcstombs; from TAKAHASHI TamotsuOtto Moerbeek
2006-04-02malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaksDamien Miller
suggested by kjell@; ok otto@ pat@ millert@ jaredy@
2005-12-10because lint says so; ok espieTheo de Raadt
2005-11-27Add a cast for (size_t)-1 because we know what we're doing, the ISO std.Chad Loder
says this is what we're supposed to return. Makes lint happy. OK deraadt, espie
2005-11-16CODESET support. okay millert@, otto@Marc Espie
(not really useful for now, it mostly helps some programs which want to use it, it will become useful when we have full 16 bits locale).
2005-10-20A library should not return EFAULT. Just segfault if a bogus orOtto Moerbeek
NULL pointer is passed in. ok espie@
2005-10-10fix a few warnings, keep the crypt stuff for later.Marc Espie
okay otto@
2005-08-12- add SEE ALSO section w/ xref for mklocale(1): from xsa@Jason McIntyre
- whilst here, uncomment entries for other SEE ALSO pages
2005-08-11fix conversion to match iswctype.Marc Espie
`why didn't you just commit' deraadt@ okay millert@, otto@...
2005-08-08zap remaining rcsid.Marc Espie
Kill old files that are no longer compiled. okay theo
2005-08-08activate LC_CTYPE for 8 bits locale.Marc Espie
Make sure tolower/toupper use the whole 8 bits. okay deraadt@ thanks to everyone who tested
2005-08-07commit LC_CTYPE files from NetBSD/citrus, not yet linked in.Marc Espie
okay deraadt@
2005-07-24split off mbrtowc functions, so that vfprintf won't pull the wholeMarc Espie
multibyte_sb.c contents. okay millert@
2005-07-01Add a few missing functions so that wctype.h/wchar.h are more or lessMarc Espie
uptodate, namely, wcsto(u)l(l) family, wcstod, stubs from wctrans/towctrans crank minor. okay millert@, jmc@.
2005-06-17next citrus step.Marc Espie
reviewed by millert, otto, kevlo, naddy, kettenis... libc+libstdc++ bump
2005-05-12remove unsupported LIBRARY section;Jason McIntyre
2005-05-11major abi changes:Marc Espie
* introduce the mbstate_t typedef. impacts gnu libiconv, which has already been taken care of. * Prepare for mb stuff to really exist, replace macro MB_CUR_MAX with an external variable __mb_cur_max (impacts libX11 and various ports). * use mbstate in all the mb <-> wchar functions with state. * add a stub iswctype function allowing some ports to compile. bash and gdiff are missing wcscoll, and need to be told there's no i18n until this is fixed. Discussed and matthieu, otto, millert, kettenis, deraadt. Major libc bump
2005-04-30fix a broken .St;Jason McIntyre