#define	_U	01
#define	_L	02
#define	_N	04
#define	_S	010
#define	_P	020
#define	_C	040
#define	_B	0100
#define	_X	0200

extern unsigned char	_pm_ctype[];

#define	pm_isalpha(c)	(_pm_ctype[(unsigned char)(c)]&(_U|_L))
#define	pm_isupper(c)	(_pm_ctype[(unsigned char)(c)]&_U)
#define	pm_islower(c)	(_pm_ctype[(unsigned char)(c)]&_L)
#define	pm_isdigit(c)	(_pm_ctype[(unsigned char)(c)]&_N)
#define	pm_isxdigit(c)	(_pm_ctype[(unsigned char)(c)]&_X)
#define	pm_isspace(c)	(_pm_ctype[(unsigned char)(c)]&_S)
#define	pm_ispunct(c)	(_pm_ctype[(unsigned char)(c)]&_P)
#define	pm_isalnum(c)	(_pm_ctype[(unsigned char)(c)]&(_U|_L|_N))
#define	pm_isprint(c)	(_pm_ctype[(unsigned char)(c)]&(_P|_U|_L|_N|_B))
#define	pm_isgraph(c)	(_pm_ctype[(unsigned char)(c)]&(_P|_U|_L|_N))
#define	pm_iscntrl(c)	(_pm_ctype[(unsigned char)(c)]&_C)
#define	pm_isascii(c)	((unsigned char)(c)<=0177)
#define	_pm_toupper(c)	((c)-'a'+'A')
#define	_pm_tolower(c)	((c)-'A'+'a')
#define	pm_toascii(c)	((c)&0177)

#ifndef NODEFINE
#undef  isalpha
#define isalpha              pm_isalpha
#undef  isupper
#define isupper              pm_isupper
#undef  islower
#define islower              pm_islower
#undef  isdigit
#define isdigit              pm_isdigit
#undef  isxdigit
#define isxdigit             pm_isxdigit
#undef  isspace
#define isspace              pm_isspace
#undef  ispunct
#define ispunct              pm_ispunct
#undef  isalnum
#define isalnum              pm_isalnum
#undef  isprint
#define isprint              pm_isprint
#undef  isgraph
#define isgraph              pm_isgraph
#undef  iscntrl
#define iscntrl              pm_iscntrl
#undef  isascii
#define isascii              pm_isascii
#undef  _toupper
#define _toupper             _pm_toupper
#undef  _tolower
#define _tolower             _pm_tolower
#undef  toascii
#define toascii              pm_toascii
#endif
