* libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Mark TAB as blank character.
* libc/ctype/isblank.c: Replace hardcoded test with test for having _B marker in ctype array. * libc/include/ctype.h (isblank): Add macro.
This commit is contained in:
parent
3ed024dcb2
commit
7ca98b4901
|
@ -1,3 +1,10 @@
|
|||
2009-03-26 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Mark TAB as blank character.
|
||||
* libc/ctype/isblank.c: Replace hardcoded test with test for having _B
|
||||
marker in ctype array.
|
||||
* libc/include/ctype.h (isblank): Add macro.
|
||||
|
||||
2009-03-25 Craig Howland <howland@LGSInnovations.com>
|
||||
|
||||
* libc/include/math.h: (llround, llroundf): Declare.
|
||||
|
|
|
@ -39,7 +39,7 @@ static char sccsid[] = "@(#)ctype_.c 5.6 (Berkeley) 6/1/90";
|
|||
|
||||
#define _CTYPE_DATA_0_127 \
|
||||
_C, _C, _C, _C, _C, _C, _C, _C, \
|
||||
_C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, \
|
||||
_C, _B|_C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, \
|
||||
_C, _C, _C, _C, _C, _C, _C, _C, \
|
||||
_C, _C, _C, _C, _C, _C, _C, _C, \
|
||||
_S|_B, _P, _P, _P, _P, _P, _P, _P, \
|
||||
|
|
|
@ -37,5 +37,5 @@ No supporting OS subroutines are required.
|
|||
int
|
||||
_DEFUN(isblank,(c),int c)
|
||||
{
|
||||
return (c == ' ' || c == '\t');
|
||||
return(__ctype_ptr__[c+1] & _B);
|
||||
}
|
||||
|
|
|
@ -54,6 +54,10 @@ extern __IMPORT _CONST char *__ctype_ptr__;
|
|||
#define isgraph(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&(_P|_U|_L|_N))
|
||||
#define iscntrl(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&_C)
|
||||
|
||||
#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901L
|
||||
#define isblank(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&_B)
|
||||
#endif
|
||||
|
||||
|
||||
/* Non-gcc versions will get the library versions, and will be
|
||||
slightly slower */
|
||||
|
|
Loading…
Reference in New Issue