add prototype for getsubopt(3)
[unix-history] / usr / src / include / ctype.h
CommitLineData
7a00777e
KB
1/*
2 * Copyright (c) 1989 The Regents of the University of California.
3 * All rights reserved.
4 *
863005e5 5 * %sccs.include.redist.c%
7a00777e 6 *
863005e5 7 * @(#)ctype.h 5.2 (Berkeley) %G%
7a00777e 8 */
a5c4c76d 9
7a00777e
KB
10#define _U 0x01
11#define _L 0x02
12#define _N 0x04
13#define _S 0x08
14#define _P 0x10
15#define _C 0x20
16#define _X 0x40
17#define _B 0x80
a5c4c76d 18
7a00777e 19extern char _ctype_[];
a5c4c76d 20
7a00777e
KB
21#define isdigit(c) ((_ctype_ + 1)[c] & _N)
22#define islower(c) ((_ctype_ + 1)[c] & _L)
23#define isspace(c) ((_ctype_ + 1)[c] & _S)
24#define ispunct(c) ((_ctype_ + 1)[c] & _P)
25#define isupper(c) ((_ctype_ + 1)[c] & _U)
26#define isalpha(c) ((_ctype_ + 1)[c] & (_U|_L))
27#define isxdigit(c) ((_ctype_ + 1)[c] & (_N|_X))
28#define isalnum(c) ((_ctype_ + 1)[c] & (_U|_L|_N))
29#define isprint(c) ((_ctype_ + 1)[c] & (_P|_U|_L|_N|_B))
30#define isgraph(c) ((_ctype_ + 1)[c] & (_P|_U|_L|_N))
31#define iscntrl(c) ((_ctype_ + 1)[c] & _C)
32#define isascii(c) ((unsigned)(c) <= 0177)
33#define toupper(c) ((c) - 'a' + 'A')
34#define tolower(c) ((c) - 'A' + 'a')
35#define toascii(c) ((c) & 0177)