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