-/* $Id$ */
-
/* tolower( int )
This file is part of the Public Domain C Library (PDCLib).
#ifndef REGTEST
+#include <locale.h>
+
int tolower( int c )
{
- if ( ( c >= 'A' ) && ( c <= 'Z' ) )
- {
- c += ( 'a' - 'A' );
- }
- return c;
+ return _PDCLIB_lconv.ctype[c].lower;
}
#endif
#ifdef TEST
-#include <_PDCLIB_test.h>
+
+#include "_PDCLIB_test.h"
int main( void )
{
TESTCASE( tolower( '[' ) == '[' );
return TEST_RESULTS;
}
+
#endif