blob: 09ca5a99f29b4116878c7f4390a4aee47414fa5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include <ctype.h>
#include <limits.h>
#include <locale.h>
#include "_ctype.h"
/** test whether a character is blank **/
int isblank(int c)
{
unsigned int *map = __get_locale()->lc_ctype.ctattr;
ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, "unsigned char", EOF);
return map[c] & CT_BLANK;
}
/***
tests whether a character is a of the character class CCLASS(blank) in the
current locale.
***/
/*
C_LOCALE(only space (CHAR( )) and tab (CHAR(\t)) are blank)
OTHER_LOCALES(true for space (CHAR( )), tab (CHAR(\t)), and characters for which FUNCTION(isspace) is true and are used to separate words)
RETURN(NONZERO, arg(c) is a blank character)
RETURN(ZERO, arg(c) is not a blank character)
LC_CTYPE
STDC(199901)
*/
|