summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove unused variablechl2012-08-141-2/+1
| | | | ok matthew@
* Document mbsnrtowcs() and wcsnrtombs().matthew2012-06-073-117/+150
| | | | ok jmc
* Add support for mbsnrtowcs() and wcsnrtombs() to libc.matthew2012-06-061-5/+31
| | | | Bulk build test by naddy.
* Fix mbstowcs return value documentation. New text based on mbsrtowcs page.stsp2011-11-161-16/+19
| | | | ok jmc
* d_t_fmt: fix the format for the day of the month to use %e (singleajacoutot2011-10-091-2/+2
| | | | | | digits are preceded by a blank instead of a 0) and not %d (POSIX). ok jasper@ guenther@
* Add BUGS section explaining that these functions do not cover the entirestsp2011-04-291-2/+5
| | | | Unicode character set in a UTF-8 locale and can therefore return wrong answers.
* wcwidth() must return -1 if the character is not printable.stsp2011-04-151-2/+4
| | | | | Diff from Alexander Polakov. OK phessler@
* Don't fill the ctype tab with Latin-1 information in UTF-8 locales.stsp2011-04-031-11/+20
| | | | | | | 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
* Add wcwidth(3) man page. ok nicmstsp2011-04-032-2/+63
|
* nl_types.h doesn't need to be #included to use nl_langinfo(). Pointedguenther2011-03-161-3/+2
| | | | out by Andres Perera (andres.p at zoho.com)
* Remove evaluation of PATH_LOCALE environment variable because it can bestsp2011-03-154-13/+6
| | | | | | abused to cause an integer overflow and serves no real purpose. Found by Alexander Schrijver. ok millert deraadt
* Sync ctype definitions for the UTF-8 locale to FreeBSD, fixing width ofstsp2011-03-131-3/+3
| | | | | | | | 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
* Stilistic improvement: use clean mdoc(7) .Qq enclosures rather thanschwarze2011-03-091-8/+8
| | | | | | | | | | | (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@
* Rewrite the mbrtowc(3) man page so we can make sense of this function.stsp2010-12-051-93/+187
| | | | tweaks from jmc, help from uwe, "We are going to have to trust you :-)" deraadt
* Add CAVEATS section documenting error handling caveats.stsp2010-11-201-2/+9
| | | | tweak and ok jmc, tedu
* observe the following spelling:jmc2010-09-108-33/+33
| | | | | | | | | - 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;
* Replace the single-byte placeholders for the multi-byte/wide-characterstsp2010-07-2716-251/+595
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* dispense with some wacky escape sequences;jmc2010-03-261-3/+3
|
* Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentmiod2010-02-031-2/+2
| | | | | | | 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@
* mbrlen returns size_t not int.nicm2009-11-091-3/+3
| | | | ok espie
* Man page for wcstof(3), wcstod(3) and wcstold(3).kettenis2009-01-132-3/+80
|
* Add wcstof(3) and wcstold(3).kettenis2009-01-135-120/+162
| | | | ok miod@
* Add wcstoimax(3) and wcstoumax(3).kettenis2009-01-133-3/+40
| | | | ok miod@
* Add man page for wcstol and friends.kettenis2008-12-202-4/+97
| | | | ok jmc@
* Fix conversion of numbers without an exponent.kettenis2008-10-051-4/+4
| | | | ok martynas@
* make mbstowcs(NULL, string, 0) correctly return the length of thedjm2008-08-231-2/+3
| | | | | wchar_t string needed to represent "string", which in our case is just strlen(string); feedback & "looks right" deraadt@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | 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@
* remove unused functionchl2007-11-281-10/+1
| | | | ok otto@
* attribute packed -> __packedgilles2007-10-081-4/+4
| | | | OK millert
* Check snprintf(3) return value for error or truncation.moritz2007-09-172-5/+11
| | | | | | Mostly path construction, where truncation could be bad. ok and input from deraadt@ millert@ ray@
* _xpg4_setrunelocale() returns an errno(2) value in the failuremoritz2007-09-061-2/+2
| | | | | | | case and 0 if the locale was found. So checking against -1 makes no sense. ok millert@
* convert to new .Dd format;jmc2007-05-3121-42/+42
|
* grammar;jmc2007-02-091-3/+3
|
* fix prototype of wcstombs; from TAKAHASHI Tamotsuotto2006-07-041-2/+2
|
* malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaksdjm2006-04-021-3/+2
| | | | suggested by kjell@; ok otto@ pat@ millert@ jaredy@
* because lint says so; ok espiederaadt2005-12-101-2/+2
|
* Add a cast for (size_t)-1 because we know what we're doing, the ISO std.cloder2005-11-271-2/+2
| | | | | says this is what we're supposed to return. Makes lint happy. OK deraadt, espie
* CODESET support. okay millert@, otto@espie2005-11-161-1/+8
| | | | | (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).
* A library should not return EFAULT. Just segfault if a bogus orotto2005-10-201-5/+3
| | | | | NULL pointer is passed in. ok espie@
* fix a few warnings, keep the crypt stuff for later.espie2005-10-101-1/+4
| | | | okay otto@
* - add SEE ALSO section w/ xref for mklocale(1): from xsa@jmc2005-08-121-4/+5
| | | | - whilst here, uncomment entries for other SEE ALSO pages
* fix conversion to match iswctype.espie2005-08-112-4/+4
| | | | | `why didn't you just commit' deraadt@ okay millert@, otto@...
* zap remaining rcsid.espie2005-08-0815-293/+14
| | | | | | Kill old files that are no longer compiled. okay theo
* activate LC_CTYPE for 8 bits locale.espie2005-08-083-40/+253
| | | | | | | Make sure tolower/toupper use the whole 8 bits. okay deraadt@ thanks to everyone who tested
* commit LC_CTYPE files from NetBSD/citrus, not yet linked in.espie2005-08-0710-0/+1653
| | | | okay deraadt@
* split off mbrtowc functions, so that vfprintf won't pull the wholeespie2005-07-243-32/+73
| | | | | | multibyte_sb.c contents. okay millert@
* Add a few missing functions so that wctype.h/wchar.h are more or lessespie2005-07-0113-6/+767
| | | | | | | | uptodate, namely, wcsto(u)l(l) family, wcstod, stubs from wctrans/towctrans crank minor. okay millert@, jmc@.
* next citrus step.espie2005-06-171-2/+19
| | | | | reviewed by millert, otto, kevlo, naddy, kettenis... libc+libstdc++ bump
* remove unsupported LIBRARY section;jmc2005-05-121-4/+1
|
* major abi changes:espie2005-05-1120-6/+2465
| | | | | | | | | | | | | | | | | | * 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