#ifndef _Ctypes_h
# define _Ctypes_h
/* Character Classification Macros etc */
# define WHITES 0000001
# define UALPHA 0000002
# define LALPHA 0000004
# define DIGITS 0000020
# define XCHARS 0000040
# define SCHARS 0000200
# define PCHARS 0000400
# define SHUNCH 0001000
# define xPATH  (UALPHA | LALPHA | DIGITS | XCHARS | SCHARS | PCHARS)

# define ISPATH(_c)   (CharTable[(unsigned char)(_c)] & xPATH)
# define ISWHITE(_c)  (CharTable[(unsigned char)(_c)] & WHITES)
# define ISUPPER(_c)  (CharTable[(unsigned char)(_c)] & UALPHA)
# define ISLOWER(_c)  (CharTable[(unsigned char)(_c)] & LALPHA)
# define ISALPHA(_c)  (CharTable[(unsigned char)(_c)] & (UALPHA | LALPHA))
# define ISNUM(_c)    (CharTable[(unsigned char)(_c)] & DIGITS)
# define ISALNUM(_c)  (CharTable[(unsigned char)(_c)] & (UALPHA | LALPHA | DIGITS))

/* WARNING: Machine MUST BE NATIVE Latin1 or these do not work! */
# define ISASCII(_c) ((unsigned)(_c) < 0x80 )
# define ISCNTRL(_c) ((unsigned)(_c) < 0x20 )
# define TOUPPER(_c) (ISLOWER(_c) ? (_c) - 'a'+'A' : (_c))
# define TOISO(_c)   (_c) /* Convert local to ISO 8859 Latin-1 */
# define FROMISO(_c) (_c) /* Convert from ISO 8859 Latin-1 to local */

extern short CharTable[];
extern void  InitCharTable(void);

#endif		/* _Ctypes_h */
