summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/big5.c
Commit message (Collapse)AuthorAgeFilesLines
* The problem is: currently our single byte ctype(3) functions are brokenache2007-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@
* . Static'ize functions exported via function reference variables only.phantom2005-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
* Use a simpler and faster buffering scheme for partial multibyte characters.tjr2004-05-171-26/+40
|
* Fix braino in previous: check that the second byte in the charactertjr2004-05-131-1/+1
| | | | | buffer is non-null when the character is two bytes long, not when the buffer is two bytes long.
* Move prototypes of various encoding-related functions into a new headertjr2004-05-121-5/+1
| | | | file to avoid extern'ing them all over the place.
* In the absence of proper validation, at least check that null bytestjr2004-05-111-0/+4
| | | | do not appear as anything but the first byte of a multibyte character.
* Perform some basic validation of multibyte conversion state objects.tjr2004-04-121-2/+15
|
* Don't cast away const qualifiers.tjr2004-04-101-1/+1
| | | | Spotted by: bde
* Allow partial multibyte characters to accumulate in conversion statetjr2004-04-071-9/+39
| | | | | objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required by C99.
* Remove unused #includes.tjr2003-11-081-2/+0
|
* Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implementtjr2003-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.
* Fix the style of the SCM ID's.obrien2002-03-221-2/+2
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove __P() usage.obrien2002-03-211-2/+2
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-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
* Megre XPG4 code into libcache2000-06-031-2/+2
|
* PR: 10918foxfair1999-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.
* Add missing #include of <sys.types.h>phk1998-08-151-0/+1
|
* I have added the support for BIG5 encoding into libc/libxpg4/mklocale.phk1998-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>
OpenPOWER on IntegriCloud