summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Let nl_langinfo(CODESET) return "US-ASCII" as the name of thenaddy2015-04-121-1/+1
| | | | | | | | | | character codeset for the POSIX/C default locale. This is the preferred IANA name and also used by FreeBSD. The previous value "646" was an obscure reference to ISO 646 (= ASCII) and was not recognized by GNU iconv out of the box. ok millert@, stsp@
* Resolve a mandoc -Tlint warning about trailing whitespace.stsp2015-03-221-2/+2
|
* More wide character string function man page improvements based on feedbackstsp2015-03-223-24/+15
| | | | by Kaspars Bankovskis. ok jmc@
* better wording, from andre smagin; ok stspjmc2015-03-193-12/+12
|
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-051-2/+2
|
* Fix previous:schwarze2014-12-111-5/+6
| | | | | | As pointed out by stsp@, LC_CTYPE *does* affect the ctype.h functions. Use a wording similar to a suggestion by deraadt@. Feedback and OK jmc@, OK stsp@.
* LC_CTYPE has no effect on ctype(3), but on wctype(3); ok jmc@schwarze2014-12-091-3/+3
|
* mandoc -Tlint fixes from <kaspars at bankovskis dot net>schwarze2014-11-301-3/+2
|
* Nuke some obvious #include duplications.krw2014-11-181-1/+0
| | | | ok espie@ deraadt@ millert@ tedu@
* When fopen()ing internal to libc (the API doesn't support the useguenther2014-09-151-2/+2
| | | | | | | of the resulting FILE *), then pass fopen() the 'e' mode letter to mark it close-on-exec. ok miod@
* international currency locale rules as per POSIX.1-2008pelikan2014-07-143-5/+49
| | | | | | required for libc++ ok guenther afresh1
* use calloc, from Benjamin Baiertedu2014-05-251-3/+2
|
* Add some missing names to the NAME sections.schwarze2014-04-071-3/+4
| | | | | | For inet(3), go the other way, remove some bogus symlinks. Found while testing the new makewhatis(8). ok jmc@
* lint is dead (long live the lint!), so stop using it as a cpp conditionalguenther2014-03-161-5/+1
| | | | | | (namespace pollution!) or talking about its opinion on code. ok krw@
* obvious .Pa fixes; found with mandocdb(8)schwarze2014-01-211-3/+3
|
* ANSI prototypederaadt2013-11-121-2/+2
|
* Allow setlocale(LC_MESSAGES, ...); to succeed. This always returned anstsp2013-08-282-2/+37
| | | | | | | | | error, but that makes some ports (e.g. GNOME) freak out. We can allow any message language to be used as long as the encoding specified as part of the locale name is supported (i.e. listed in locale -m output). The primary users of LC_MESSAGES are catopen(3) and gettext(3), which already worked without this change. ok ajacoutot, naddy, matthew
* oops, we forgot to remove the .El in previous; sorry stefan (though youjmc2013-08-281-2/+1
| | | | should have run this through mandoc -Tlint ;)
* Cosmetic tweaks of wcrtomb(3) RETURN VALUES section. ok jmcstsp2013-08-281-11/+9
|
* no longer any need to quote macro lines with >9 args;jmc2013-08-141-3/+3
| | | | From: Jan Stary
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-0517-51/+51
|
* Fix wcsto{f,d,ld}() C99 compliance to now correctlymatthew2013-06-021-20/+45
| | | | | | | | | | | | | | 1. handle "inf", "infinity", "nan", and "nan(whatever)", 2. reject bare minus and plus signs, 3. handle multi-byte characters, and 4. set *endptr = nptr for all failure cases. Fixes libc++'s test cases for std::sto{f,d,ld}(). ok stsp
* Change the naming scheme used for directories in /usr/share/locale tostsp2013-06-012-12/+14
| | | | | | | | | | | | eliminate redundant copies of LC_CTYPE files. Instead of names using "language_territory.codeset" permutations, use just the codeset component to name directories storing LC_CTYPE files. Suggested by bluhm@ while discussing the idea of using symlinks in /usr/share/locale like FreeBSD does. Future locale features which store language and/or territory specific data can name directories after language or territory names.
* Sort includes. From Vladimir Tamara Patino <vtamara@pasosdeJesus.org>stsp2013-05-301-5/+6
|
* Fix resetting MB_CUR_MAX when switching locales away from a UTF-8 locale.stsp2013-05-031-1/+2
| | | | | Patch by Vladimir Támara Patiño <vtamara@pasosdeJesus.org> ok mpi millert
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-0519-52/+19
| | | | ok guenther millert kettenis
* 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@