Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / ctype / isblank.c
blob0ebc2192c5c9bc6ce7e25b989bdbac8db4e2ea25
1 /*
2 FUNCTION
3 <<isblank>>, <<isblank_l>>---blank character predicate
5 INDEX
6 isblank
8 INDEX
9 isblank_l
11 SYNOPSIS
12 #include <ctype.h>
13 int isblank(int <[c]>);
15 #include <ctype.h>
16 int isblank_l(int <[c]>, locale_t <[locale]>);
18 DESCRIPTION
19 <<isblank>> is a function which classifies singlebyte charset values by table
20 lookup. It is a predicate returning non-zero for blank characters, and 0
21 for other characters. It is defined only if <[c]> is representable as an
22 unsigned char or if <[c]> is EOF.
24 <<isblank_l>> is like <<isblank>> but performs the check based on the
25 locale specified by the locale object locale. If <[locale]> is
26 LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined.
28 RETURNS
29 <<isblank>>, <<isblank_l>> return non-zero if <[c]> is a blank character.
31 PORTABILITY
32 <<isblank>> is C99.
33 <<isblank_l>> is POSIX-1.2008.
35 No supporting OS subroutines are required.
38 #include <_ansi.h>
39 #include <ctype.h>
43 #undef isblank
44 int
45 isblank (int c)
47 return ((__CTYPE_PTR[c+1] & _B) || (c == '\t'));