]> pd.if.org Git - pdclib/blob - functions/ctype/isblank.c
Whitespace cleanups.
[pdclib] / functions / ctype / isblank.c
1 /* isblank( int )
2
3    This file is part of the Public Domain C Library (PDCLib).
4    Permission is granted to use, modify, and / or redistribute at will.
5 */
6
7 #include <ctype.h>
8
9 #ifndef REGTEST
10
11 #include <locale.h>
12
13 int isblank( int c )
14 {
15     return ( _PDCLIB_lconv.ctype[c].flags & _PDCLIB_CTYPE_BLANK );
16 }
17
18 #endif
19
20 #ifdef TEST
21
22 #include "_PDCLIB_test.h"
23
24 int main( void )
25 {
26     TESTCASE( isblank( ' ' ) );
27     TESTCASE( isblank( '\t' ) );
28     TESTCASE( ! isblank( '\v' ) );
29     TESTCASE( ! isblank( '\r' ) );
30     TESTCASE( ! isblank( 'x' ) );
31     TESTCASE( ! isblank( '@' ) );
32     return TEST_RESULTS;
33 }
34
35 #endif