aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/locale/none.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Remove ancient SCCS tags.Warner Losh2023-11-271-3/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* libc: Purge unneeded cdefs.hWarner Losh2023-11-011-1/+0
| | | | | | | | | These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* libc: drop "All rights reserved" from Foundation copyrightsEd Maste2022-08-041-1/+1
| | | | | | | | | This has already been done for most files that have the Foundation as the only listed copyright holder. Do it now for files that list multiple copyright holders, but have the Foundation copyright in its own section. Sponsored by: The FreeBSD Foundation
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* For EILSEQ case in mbsnrtowcs() and wcsnrtombs() update src to point toAndrey A. Chernov2016-05-311-0/+1
| | | | | | | | | | | the character after the one this conversion stopped at. PR: 209907 Submitted by: Roel Standaert <roel@abittechnical.com> (partially) MFC after: 3 days Notes: svn path=/head/; revision=301069
* Revamp CTYPE support (from Illumos & Dragonfly)Baptiste Daroussin2015-08-081-10/+2
| | | | | | | Obtained from: Dragonfly Notes: svn path=/projects/collation/; revision=286459
* __xlocale_C_ctype should not be const. It contains a reference count that ↵David Chisnall2015-04-241-1/+1
| | | | | | | | | is modified by newlocale / duplocale / freelocale. MFC after: 1 week Notes: svn path=/head/; revision=281927
* Implement xlocale APIs from Darwin, mainly for use by libc++. This adds aDavid Chisnall2011-11-201-9/+37
| | | | | | | | | | | | | | | load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit locale parameter. Also adds support for per-thread locales. This work was funded by the FreeBSD Foundation. Please test any code you have that uses the C standard locale functions! Reviewed by: das (gdtoa changes) Approved by: dim (mentor) Notes: svn path=/head/; revision=227753
* The problem is: currently our single byte ctype(3) functions are brokenAndrey A. Chernov2007-10-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for wide characters locales in the argument range >= 0x80 - they may return false positives. Example 1: for UTF-8 locale we currently have: iswspace(0xA0)==1 and isspace(0xA0)==1 (because iswspace() and isspace() are the same code) but must have iswspace(0xA0)==1 and isspace(0xA0)==0 (because there is no such character and all others in the range 0x80..0xff for the UTF-8 locale, it keeps ASCII only in the single byte range because our internal wchar_t representation for UTF-8 is UCS-4). Example 2: for all wide character locales isalpha(arg) when arg > 0xFF may return false positives (must be 0). (because iswalpha() and isalpha() are the same code) This change address this issue separating single byte and wide ctype and also fix iswascii() (currently iswascii() is broken for arguments > 0xFF). This change is 100% binary compatible with old binaries. Reviewied by: i18n@ Notes: svn path=/head/; revision=172619
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* . Static'ize functions exported via function reference variables only.Alexey Zelkin2005-02-271-15/+29
| | | | | | | | | | | | | | | . Replace inclusion of sys/param.h to sys/cdefs.h and sys/types.h where appropriate. . move _*_init() prototypes to mblocal.h, and remove these prototypes from .c files . use _none_init() in __setrunelocale() instead of duplicating code . move __mb* variables from table.c to none.c allowing us to not to export _none_*() externs, and appropriately remove them from mblocal.h Ok'ed by: tjr Notes: svn path=/head/; revision=142654
* Implement the GNU extensions of mbsnrtowcs() and wcsnrtombs(). These areTim J. Robbins2004-07-211-15/+18
| | | | | | | | | | convenient when the source string isn't null-terminated. Implement the other conversion functions (mbstowcs(), mbsrtowcs(), wcstombs(), wcsrtombs()) in terms of these new functions. Notes: svn path=/head/; revision=132497
* Scan the source string for invalid wide characters in wcsrtombs()Tim J. Robbins2004-05-251-2/+9
| | | | | | | in the dst == NULL case. Notes: svn path=/head/; revision=129707
* Allow encoding modules to override the default implementations ofTim J. Robbins2004-05-131-0/+57
| | | | | | | | mbsrtowcs() and wcsrtombs(). Provide a fast implementation for the trivial "NONE" encoding. Notes: svn path=/head/; revision=129179
* Move prototypes of various encoding-related functions into a new headerTim J. Robbins2004-05-121-5/+1
| | | | | | | file to avoid extern'ing them all over the place. Notes: svn path=/head/; revision=129153
* Allow partial multibyte characters to accumulate in conversion stateTim J. Robbins2004-04-071-1/+15
| | | | | | | | objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required by C99. Notes: svn path=/head/; revision=128004
* Allow mbrtowc() and wcrtomb() to be implemented directly, instead ofTim J. Robbins2003-11-011-39/+42
| | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=121845
* Avoid truncating invalid wide characters that are outside the range ofTim J. Robbins2002-10-161-1/+8
| | | | | | | 'unsigned char'; signal an error instead. Notes: svn path=/head/; revision=105233
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-2/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Remove __P() usage.David E. O'Brien2002-03-211-2/+2
| | | | Notes: svn path=/head/; revision=92905
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch Notes: svn path=/head/; revision=71579
* As above.Poul-Henning Kamp1995-10-221-2/+0
| | | | | | | Oh I also put in a couple of compile-time warnings for the crypt stuff. Notes: svn path=/head/; revision=11660
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+93
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573