/*
 * need this it seems
 */
#include <ctype.h>

#if (defined(sun) && defined(__svr4__)) || defined(_SGI_SOURCE)
# define _ctype_ __ctype
#endif

#undef isdigit
isdigit(c)
	int c;
{
	return ((_ctype_ + 1)[c] & _N);
}

#undef islower
islower(c)
	int c;
{
	return ((_ctype_ + 1)[c] & _L);
}
	
#undef isspace
isspace(c)
	int c;
{
	return ((_ctype_ + 1)[c] & _S);
}

#undef ispunct
ispunct(c)
	int c;
{
	return ((_ctype_ + 1)[c] & _P);
}

#undef isupper
isupper(c)
	int c;
{
	return ((_ctype_ + 1)[c] & _U);
}

#undef isalpha
isalpha(c)
	int c;
{
	return ((_ctype_ + 1)[c] & (_U|_L));
}

#undef isxdigit
isxdigit(c)
	int c;
{
	return ((_ctype_ + 1)[c] & (_N|_X));
}

#undef isalnum
isalnum(c)
	int c;
{
	return ((_ctype_ + 1)[c] & (_U|_L|_N));
}

#undef isprint
isprint(c)
	int c;
{
	return ((_ctype_ + 1)[c] & (_P|_U|_L|_N|_B));
}

#undef isgraph
isgraph(c)
	int c;
{
	return ((_ctype_ + 1)[c] & (_P|_U|_L|_N));
}

#undef iscntrl
iscntrl(c)
	int c;
{
	return ((_ctype_ + 1)[c] & _C);
}

#if 0
#undef tolower
tolower(c)
	int c;
{
	return ((_tolower_tab_ + 1)[c]);
}

#undef toupper
toupper(c)
	int c;
{
	return ((_toupper_tab_ + 1)[c]);
}
#endif

#undef isblank
isblank(c)
	int c;
{
	return ((_ctype_ + 1)[c] & _B);
}

#undef isascii
isascii(c)
	int c;
{
	return ((unsigned)(c) <= 0177);
}

#undef toascii
toascii(c)
	int c;
{
	return ((c) & 0177);
}

#if 0
#undef _tolower
_tolower(c)
	int c;
{
	return ((c) - 'A' + 'a');
}

#undef _toupper
_toupper(c)
	int c;
{
	return ((c) - 'a' + 'A');
}
#endif
