aboutsummaryrefslogtreecommitdiff
path: root/include/wctype.h
Commit message (Collapse)AuthorAgeFilesLines
* Back out iswascii change from prev. commit, iswascii was right,Andrey A. Chernov2007-10-141-1/+1
| | | | | | | some overlook from me. Notes: svn path=/head/; revision=172630
* The problem is: currently our single byte ctype(3) functions are brokenAndrey A. Chernov2007-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@ Notes: svn path=/head/; revision=172619
* Include _ctype.h instead of ctype.h to avoid namespace pollution.Tim J. Robbins2004-08-121-1/+1
| | | | Notes: svn path=/head/; revision=133560
* Add a function to iterate over all characters in a particular characterTim J. Robbins2004-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. Notes: svn path=/head/; revision=131787
* Use __isctype() instead of __istype() for iswdigit() and iswxdigit() forTim J. Robbins2004-05-311-2/+2
| | | | | | | consistency with <ctype.h>. Notes: svn path=/head/; revision=129892
* o Merge <machine/ansi.h> and <machine/types.h> into a new headerMike Barcroft2002-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 Notes: svn path=/head/; revision=102227
* Whitespace formatting changes: line up macro bodies, function names,Tim J. Robbins2002-08-061-33/+35
| | | | | | | | | place tabs after #define and typedef. Sort typedefs by name. Requested by: mike Notes: svn path=/head/; revision=101409
* Implement the missing <wctype.h> functions: isw*() (iswalnum() etc.),Tim J. Robbins2002-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>. Notes: svn path=/head/; revision=101369
* Change wctype_t to an unsigned type to avoid warnings.Tim J. Robbins2002-08-041-1/+1
| | | | Notes: svn path=/head/; revision=101314
* Add the ISO C90 Amd. 1 wctrans(3) and towctrans(3) functions.Tim J. Robbins2002-08-041-0/+7
| | | | Notes: svn path=/head/; revision=101313
* Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions.Tim J. Robbins2002-08-031-3/+14
| | | | Notes: svn path=/head/; revision=101253
* Breath deep and take __P out of the system include files.Warner Losh2002-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. Notes: svn path=/head/; revision=93032
* VCS ID fixupDavid E. O'Brien2001-07-101-3/+1
| | | | Notes: svn path=/head/; revision=79555
* adapt to FreeBSD.Takuya SHIOZAKI2001-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* Notes: svn path=/head/; revision=76636
* initial import of wchar.h and wctype.hTakuya SHIOZAKI2001-05-151-0/+65
Obtained from: NetBSD and Citrus XPG4DL Notes: svn path=/head/; revision=76633