]> pd.if.org Git - pdclib/blob - functions/ctype/islower.c
Comment cleanups.
[pdclib] / functions / ctype / islower.c
1 /* islower( 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 islower( int c )
14 {
15     return ( _PDCLIB_lconv.ctype[c].flags & _PDCLIB_CTYPE_LOWER );
16 }
17
18 #endif
19
20 #ifdef TEST
21 #include <_PDCLIB_test.h>
22
23 int main( void )
24 {
25     TESTCASE( islower( 'a' ) );
26     TESTCASE( islower( 'z' ) );
27     TESTCASE( ! islower( 'A' ) );
28     TESTCASE( ! islower( 'Z' ) );
29     TESTCASE( ! islower( ' ' ) );
30     TESTCASE( ! islower( '@' ) );
31     return TEST_RESULTS;
32 }
33
34 #endif