aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/locale/big5.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
* Revamp CTYPE support (from Illumos & Dragonfly)Baptiste Daroussin2015-08-081-6/+26
| | | | | | | Obtained from: Dragonfly Notes: svn path=/projects/collation/; revision=286459
* Implement xlocale APIs from Darwin, mainly for use by libc++. This adds aDavid Chisnall2011-11-201-7/+12
| | | | | | | | | | | | | | | 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-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* . Static'ize functions exported via function reference variables only.Alexey Zelkin2005-02-271-9/+10
| | | | | | | | | | | | | | | . 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
* Use a simpler and faster buffering scheme for partial multibyte characters.Tim J. Robbins2004-05-171-26/+40
| | | | Notes: svn path=/head/; revision=129334
* Fix braino in previous: check that the second byte in the characterTim J. Robbins2004-05-131-1/+1
| | | | | | | | buffer is non-null when the character is two bytes long, not when the buffer is two bytes long. Notes: svn path=/head/; revision=129166
* 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
* In the absence of proper validation, at least check that null bytesTim J. Robbins2004-05-111-0/+4
| | | | | | | do not appear as anything but the first byte of a multibyte character. Notes: svn path=/head/; revision=129117
* Perform some basic validation of multibyte conversion state objects.Tim J. Robbins2004-04-121-2/+15
| | | | Notes: svn path=/head/; revision=128155
* Don't cast away const qualifiers.Tim J. Robbins2004-04-101-1/+1
| | | | | | | Spotted by: bde Notes: svn path=/head/; revision=128081
* Allow partial multibyte characters to accumulate in conversion stateTim J. Robbins2004-04-071-9/+39
| | | | | | | | objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required by C99. Notes: svn path=/head/; revision=128004
* Remove unused #includes.Tim J. Robbins2003-11-081-2/+0
| | | | Notes: svn path=/head/; revision=122283
* Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implementTim J. Robbins2003-11-021-53/+50
| | | | | | | | | mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left unconverted; GB18030 will be done eventually, but GBK and UTF2 may just be removed, as they are subsets of GB18030 and UTF-8 respectively. Notes: svn path=/head/; revision=121893
* 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/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Megre XPG4 code into libcAndrey A. Chernov2000-06-031-2/+2
| | | | Notes: svn path=/head/; revision=61218
* PR: 10918Foxfair Hu1999-05-071-2/+2
| | | | | | | | | Submitted by: Yung-Jen Hung <winard@u3717a.dorm.ccu.edu.tw> Reviewed by: bearscorp.bbs@bbs.life.nthu.edu.tw _BIG5_sgetrune() in libc doesn't work well, this commit will fix it. Notes: svn path=/head/; revision=46641
* Add missing #include of <sys.types.h>Poul-Henning Kamp1998-08-151-0/+1
| | | | Notes: svn path=/head/; revision=38340
* I have added the support for BIG5 encoding into libc/libxpg4/mklocale.Poul-Henning Kamp1998-08-151-0/+119
the diff is attached below. This is done on the 3.0 source-tree. I have test this on 2.2-stable before, but I don't have a 3.0 machine right now. This patch is mainly to make libc support BIG5 encoding, thus add zh_TW.BIG5 locale to 3.0. Submitted by: Chen Hsiung Chan <frankch@waru.life.nthu.edu.tw> Notes: svn path=/head/; revision=38333