/* isalnum function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for alphanumeric character
*/
#undef isalnum
int isalnum(int c)
{
return (_Ctype[c] & (_DI|_LO|_UP|_XA));
}
__________________________________________
/* isalpha function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for alphabetic character
*/
#undef isalpha
int isalpha(int c)
{
return (_Ctype[c} & (_LO|_UP|_XA));
}
__________________________________________
/* iscntrl function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for control character
*/
#undef iscntrl
int iscntrl(int c)
{
return (_Ctype[c] & (_BB|_CN));
}
__________________________________________
/* isdigit function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for digit
*/
#undef isdigit
int isdigit(int c)
{
return (_Ctype[c] & _DI);
}
__________________________________________
/* isgraph function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for graphic character
*/
#undef isgraph
int isgraph(int c)
{
return (_Ctype[c] & (_DI| _LO|_PU|_UP|_XA));
}
_____________________________________________
/* islower function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for lowercase character
*/
#undef islower
int islower(int c)
{
return (_Ctype[c] & _LO);
}
__________________________________________
/* isprint function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for printable character
*/
#undef isprint
int isprint(int c)
{
return (_Ctype[c] & (_DI|_LO|_PU|_SP|_UP|_XA));
}
_____________________________________________
/* ispunct function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for punctuation character
*/
#undef ispunct
int ispunct(int c)
{
return (_Ctype[c] & _PU);
}
________________________________________
/* isspace function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for spacing character
*/
#undef isspace
int isspace(int c)
{
return (_Ctype[c] & (_CN|_SP|_XS));
}
___________________________________________
/* isupper function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for uppercase character
*/
#undef isupper
int isupper(int c)
{
return (_Ctype[c] & _UP);
}
__________________________________________
/* isxdigit function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for hexadecimal digit
*/
#undef isxdigit
int isxdigit(int c)
{
return (_Ctype[c] & _XD);
}
__________________________________________
/* tolower function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* convert to lowercase character
*/
#undef tolower
int tolower(int c)
{
return (_Tolower[c]);
}
__________________________________________
/* toupper function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* convert to uppercase character
*/
#undef toupper
int toupper(int c)
{
return (_Toupper[c]);
}