Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-03-26 12:45:11 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-03-26 12:45:11 +0300
commit7ca98b490133315b2b999c56eff604b655f062c0 (patch)
tree4c237266eab6b38c6ca655f9e1e4656fe411536b /newlib/libc/ctype
parent3ed024dcb2f874e9a6a1eac6142a0864eac33460 (diff)
* 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.
Diffstat (limited to 'newlib/libc/ctype')
-rw-r--r--newlib/libc/ctype/ctype_.c2
-rw-r--r--newlib/libc/ctype/isblank.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/ctype/ctype_.c b/newlib/libc/ctype/ctype_.c
index 6fa30b207..71756431b 100644
--- a/newlib/libc/ctype/ctype_.c
+++ b/newlib/libc/ctype/ctype_.c
@@ -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, \
diff --git a/newlib/libc/ctype/isblank.c b/newlib/libc/ctype/isblank.c
index 3e124d8f7..0567b40b9 100644
--- a/newlib/libc/ctype/isblank.c
+++ b/newlib/libc/ctype/isblank.c
@@ -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);
}