mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibC: Implement isblank()
This commit is contained in:
parent
c600280dde
commit
4e79a60b78
2 changed files with 3 additions and 1 deletions
|
@ -31,7 +31,7 @@ extern "C" {
|
|||
|
||||
const char _ctype_[256] = {
|
||||
_C, _C, _C, _C, _C, _C, _C, _C,
|
||||
_C, _C | _S, _C | _S, _C | _S, _C | _S, _C | _S, _C, _C,
|
||||
_C, (char)(_C | _S | _B), _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,
|
||||
(char)(_S | _B), _P, _P, _P, _P, _P, _P, _P,
|
||||
|
|
|
@ -56,6 +56,7 @@ int isprint(int);
|
|||
int isgraph(int);
|
||||
int islower(int);
|
||||
int isupper(int);
|
||||
int isblank(int);
|
||||
|
||||
#define isalnum(c) (_ctype_[(int)(c)] & (_U | _L | _N))
|
||||
#define isalpha(c) (_ctype_[(int)(c)] & (_U | _L))
|
||||
|
@ -68,6 +69,7 @@ int isupper(int);
|
|||
#define isgraph(c) (_ctype_[(int)(c)] & (_P | _U | _L | _N))
|
||||
#define islower(c) ((_ctype_[(int)(c)] & (_U | _L)) == _L)
|
||||
#define isupper(c) ((_ctype_[(int)(c)] & (_U | _L)) == _U)
|
||||
#define isblank(c) ((_ctype_[(int)(c)] & (_B)))
|
||||
|
||||
#define isascii(c) ((unsigned)c <= 127)
|
||||
#define toascii(c) ((c)&127)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue