/*
 * $Header: /smsa/bsd:include/ctype.h:bsd  1.12  $
 * $Source: /smsa/bsd:include/ctype.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 */
/*	ctype.h	4.2	85/09/04	*/

#ifndef __ctype_h
#define __ctype_h

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

extern const unsigned char *__ctype;
extern const unsigned char *__cshift;

extern int (isalpha)(int);
#define	isalpha(c)	(__ctype[c]&(_U|_L))
extern int (isupper)(int);
#define	isupper(c)	(__ctype[c]&_U)
extern int (islower)(int);
#define	islower(c)	(__ctype[c]&_L)
extern int (isdigit)(int);
#define	isdigit(c)	(__ctype[c]&_N)
extern int (isxdigit)(int);
#define	isxdigit(c)	(__ctype[c]&(_N|_X))
extern int (isspace)(int);
#define	isspace(c)	(__ctype[c]&_S)
extern int (ispunct)(int);
#define ispunct(c)	(__ctype[c]&_P)
extern int (isalnum)(int);
#define isalnum(c)	(__ctype[c]&(_U|_L|_N))
extern int (isprint)(int);
#define isprint(c)	(__ctype[c]&(_P|_U|_L|_N|_B))
extern int (isgraph)(int);
#define isgraph(c)	(__ctype[c]&(_P|_U|_L|_N))
extern int (iscntrl)(int);
#define iscntrl(c)	(__ctype[c]&_C)


#define _tolower(c)	(__cshift[c])
#define _toupper(c)	(__cshift[c])

extern int tolower (int /*c*/);
extern int toupper (int /*c*/);

#if defined(_XOPEN_C) || defined(_BSD_C)
extern int (isascii)(int);
#define isascii(c)	((unsigned)(c)<=0177)
extern int (toascii)(int);
#define toascii(c)	((c)&0177)
#endif

#endif/*__ctype_h*/

/* EOF ctype.h */
