From 84e10936b8551a240d8a5982e013c32da1f4c7db Mon Sep 17 00:00:00 2001 From: shatty Date: Sat, 16 Aug 2003 07:14:04 +0000 Subject: [PATCH] fixed implementation to match new posix/beos compatible prototype for tolower/toupper, also added isblank implementation git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4286 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/posix/locale/ctype.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kernel/libroot/posix/locale/ctype.c b/src/kernel/libroot/posix/locale/ctype.c index 23048744fa..8bc547feb7 100644 --- a/src/kernel/libroot/posix/locale/ctype.c +++ b/src/kernel/libroot/posix/locale/ctype.c @@ -41,14 +41,14 @@ _U,_U,_U,_U,_U,_U,_U,_P,_U,_U,_U,_U,_U,_U,_U,_L, /* 208-223 */ _L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L, /* 224-239 */ _L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */ -unsigned char tolower(unsigned char c) +int tolower(int c) { if(isupper(c)) c -= 'A'-'a'; return c; } -unsigned char toupper(unsigned char c) +int toupper(int c) { if(islower(c)) c -= 'a'-'A'; @@ -120,3 +120,7 @@ int toascii(int c) return ((unsigned char)c & 0x7f); } +int isblank(int c) +{ + return (((unsigned char)c == ' ') || ((unsigned char)c == '\t')); +}