mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibC: Add support for isblank()
This commit is contained in:
parent
097901818e
commit
3df7f868e8
2 changed files with 13 additions and 0 deletions
|
@ -119,6 +119,12 @@ int isascii(int c)
|
|||
return ((unsigned)c <= 127);
|
||||
}
|
||||
|
||||
#undef isblank
|
||||
int isblank(int c)
|
||||
{
|
||||
return __inline_isblank(c);
|
||||
}
|
||||
|
||||
#undef toascii
|
||||
int toascii(int c)
|
||||
{
|
||||
|
|
|
@ -102,6 +102,11 @@ static inline int __inline_isupper(int c)
|
|||
return _ctype_[(unsigned char)(c)] & (_U);
|
||||
}
|
||||
|
||||
static inline int __inline_isblank(int c)
|
||||
{
|
||||
return _ctype_[(unsigned char)(c)] & (_B) || (c == '\t');
|
||||
}
|
||||
|
||||
static inline int __inline_toascii(int c)
|
||||
{
|
||||
return c & 127;
|
||||
|
@ -137,6 +142,7 @@ int isprint(int c);
|
|||
int isgraph(int c);
|
||||
int islower(int c);
|
||||
int isupper(int c);
|
||||
int isblank(int c);
|
||||
int toascii(int c);
|
||||
int tolower(int c);
|
||||
int toupper(int c);
|
||||
|
@ -156,6 +162,7 @@ int toupper(int c);
|
|||
#define isgraph __inline_isgraph
|
||||
#define islower __inline_islower
|
||||
#define isupper __inline_isupper
|
||||
#define isblank __inline_isblank
|
||||
#define toascii __inline_toascii
|
||||
#define tolower __inline_tolower
|
||||
#define toupper __inline_toupper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue