mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-01 07:35:02 +03:00
LibC: Implement isblank()
This commit is contained in:
parent
c600280dde
commit
4e79a60b78
Notes:
sideshowbarker
2024-07-19 09:41:06 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/4e79a60b78d Pull-request: https://github.com/SerenityOS/serenity/pull/1171
@ -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…
Reference in New Issue
Block a user