summaryrefslogtreecommitdiffstats
path: root/include/wctype.h
Commit message (Collapse)AuthorAgeFilesLines
* Reapply 227753 (xlocale cleanup), plus some fixes so that it passes buildtheraven2012-03-041-0/+5
| | | | | | universe with gcc. Approved by: dim (mentor)
* Revert r231673 and r231682 for now, until we can run a full makedim2012-02-141-5/+0
| | | | | | universe with them. Sorry for the breakage. Pointy hat to: me and brooks
* Cleanup of xlocale:theraven2012-02-141-0/+5
| | | | | | | | | | | | | | | | - Address performance regressions encountered by das@ by caching per-thread data in TLS where available. - Add a __NO_TLS flag to cdefs.h to indicate where not available. - Reorganise the xlocale.h definitions into xlocale/*.h so that they can be included from multiple places. - Export the POSIX2008 subset of xlocale when POSIX2008 says it should be exported, independently of whether xlocale.h is included. - Fix the bug where programs using ctype functions always assumed ASCII unless recompiled. - Fix some style(9) violations. Reviewed by: brooks (mentor) Approved by: dim (mentor)
* Don't expose the wctype.h macros in C++ mode. They cause problems whentheraven2011-11-121-1/+3
| | | | | | | people try to invoke the namespaced versions of the functions of the same names. Approved by: dim (mentor)
* Back out iswascii change from prev. commit, iswascii was right,ache2007-10-141-1/+1
| | | | some overlook from me.
* The problem is: currently our single byte ctype(3) functions are brokenache2007-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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@
* Include _ctype.h instead of ctype.h to avoid namespace pollution.tjr2004-08-121-1/+1
|
* Add a function to iterate over all characters in a particular charactertjr2004-07-081-0/+1
| | | | | | class. This is necessary in order to implement tr(1) efficiently in multibyte locales, since the brute force method of finding all characters in a class is infeasible with a 32-bit (or wider) wchar_t.
* Use __isctype() instead of __istype() for iswdigit() and iswxdigit() fortjr2004-05-311-2/+2
| | | | consistency with <ctype.h>.
* o Merge <machine/ansi.h> and <machine/types.h> into a new headermike2002-08-211-4/+4
| | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
* Whitespace formatting changes: line up macro bodies, function names,tjr2002-08-061-33/+35
| | | | | | place tabs after #define and typedef. Sort typedefs by name. Requested by: mike
* Implement the missing <wctype.h> functions: isw*() (iswalnum() etc.),tjr2002-08-051-6/+37
| | | | | | | | towlower() and towupper() required by ISO C90 Amd. 1. iswascii(), iswhexnumber(), iswideogram(), iswnumber(), iswphonogram(), iswrune() and iswspecial() have also been implemented for consistency with the BSD extensions in <ctype.h>.
* Change wctype_t to an unsigned type to avoid warnings.tjr2002-08-041-1/+1
|
* Add the ISO C90 Amd. 1 wctrans(3) and towctrans(3) functions.tjr2002-08-041-0/+7
|
* Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions.tjr2002-08-031-3/+14
|
* Breath deep and take __P out of the system include files.imp2002-03-231-14/+14
| | | | | | # This appears to not break X11, but I'm having problems compiling the # glide part of the server with or without this patch, so I can't tell # for sure.
* VCS ID fixupobrien2001-07-101-3/+1
|
* adapt to FreeBSD.tshiozak2001-05-151-0/+3
| | | | | | | | | | | | - add #define NULL 0 instead of sys/null.h. - enable locale-insensitive functions: wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcspbrk.c wcsrchr.c wcsspn.c wcsstr.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c - disable some locale-sensitive functions defined in wchar.h temporarily: mbrlen mbrtowc mbsinit mbsrtowcs wcrtomb wcsrtombs wcwidth wcswidth - disable all functions defined in wctype.h temporarily: is* tow*
* initial import of wchar.h and wctype.htshiozak2001-05-151-0/+65
Obtained from: NetBSD and Citrus XPG4DL
OpenPOWER on IntegriCloud