1: /*************************************************************************
2: * This program is copyright (C) 1985, 1986 by Jonathan Payne. It is *
3: * provided to you without charge for use only on a licensed Unix *
4: * system. You may copy JOVE provided that this notice is included with *
5: * the copy. You may not sell copies of this program or versions *
6: * modified for use on microcomputer systems, unless the copies are *
7: * included with a Unix system distribution and the source is provided. *
8: *************************************************************************/
9:
10: /* The code in this file was snarfed from ctype.h and modified for JOVE. */
11:
12: #define _U 01
13: #define _L 02
14: #define _N 04
15: #define _P 010
16: #define _C 020
17: #define _W 040
18: #define _Op 0100
19: #define _Cl 0200
20:
21: extern int SyntaxTable;
22: #define iswhite(c) (isspace(c))
23: #define isword(c) ((CharTable[SyntaxTable])[c]&(_W))
24: #define isalpha(c) ((CharTable[SyntaxTable])[c]&(_U|_L))
25: #define isupper(c) ((CharTable[SyntaxTable])[c]&_U)
26: #define islower(c) ((CharTable[SyntaxTable])[c]&_L)
27: #define isdigit(c) ((CharTable[SyntaxTable])[c]&_N)
28: #define isspace(c) (c == ' ' || c == '\t')
29: #define ispunct(c) ((CharTable[SyntaxTable])[c]&_P)
30: #define toupper(c) ((c)&~040)
31: #define tolower(c) ((c)|040)
32: #define toascii(c) ((c)&0177)
33: #define isctrl(c) ((CharTable[0][c&0177])&_C)
34: #define isopenp(c) ((CharTable[0][c&0177])&_Op)
35: #define isclosep(c) ((CharTable[0][c&0177])&_Cl)
36: #define has_syntax(c,s) ((CharTable[SyntaxTable][c&0177])&s)
37: #define WITH_TABLE(x) \
38: { \
39: int push = SyntaxTable; \
40: SyntaxTable = x;
41:
42: #define END_TABLE() \
43: SyntaxTable = push; \
44: }
Defined macros
_C
defined in line
16; used 133 times
_Cl
defined in line
19; used 14 times
_L
defined in line
13; used 106 times
_N
defined in line
14; used 41 times
_Op
defined in line
18; used 14 times
_P
defined in line
15; used 133 times
_U
defined in line
12; used 106 times
_W
defined in line
17; used 273 times
Usage of this include