#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
227753 |
|
20-Nov-2011 |
theraven |
Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 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)
|
#
172619 |
|
13-Oct-2007 |
ache |
The problem is: currently our single byte ctype(3) functions are broken 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@
|
#
142654 |
|
27-Feb-2005 |
phantom |
. Static'ize functions exported via function reference variables only. . 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
|
#
129334 |
|
17-May-2004 |
tjr |
Use a simpler and faster buffering scheme for partial multibyte characters.
|
#
129166 |
|
13-May-2004 |
tjr |
Fix braino in previous: check that the second byte in the character buffer is non-null when the character is two bytes long, not when the buffer is two bytes long.
|
#
129153 |
|
12-May-2004 |
tjr |
Move prototypes of various encoding-related functions into a new header file to avoid extern'ing them all over the place.
|
#
129117 |
|
11-May-2004 |
tjr |
In the absence of proper validation, at least check that null bytes do not appear as anything but the first byte of a multibyte character.
|
#
128155 |
|
12-Apr-2004 |
tjr |
Perform some basic validation of multibyte conversion state objects.
|
#
128081 |
|
09-Apr-2004 |
tjr |
Don't cast away const qualifiers.
Spotted by: bde
|
#
128004 |
|
07-Apr-2004 |
tjr |
Allow partial multibyte characters to accumulate in conversion state objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required by C99.
|
#
122283 |
|
08-Nov-2003 |
tjr |
Remove unused #includes.
|
#
121893 |
|
02-Nov-2003 |
tjr |
Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implement 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.
|
#
92986 |
|
22-Mar-2002 |
obrien |
Fix the style of the SCM ID's. I believe have made all of libc .c's as consistent as possible.
|
#
92905 |
|
21-Mar-2002 |
obrien |
Remove __P() usage.
|
#
71579 |
|
24-Jan-2001 |
deischen |
Remove _THREAD_SAFE and make libc thread-safe by default by 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
|
#
61218 |
|
03-Jun-2000 |
ache |
Megre XPG4 code into libc
|
#
46641 |
|
07-May-1999 |
foxfair |
PR: 10918 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.
|
#
38340 |
|
15-Aug-1998 |
phk |
Add missing #include of <sys.types.h>
|
#
38333 |
|
15-Aug-1998 |
phk |
I have added the support for BIG5 encoding into libc/libxpg4/mklocale. 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>
|