1: /***************************************************************************
2: * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne. JOVE *
3: * is provided to you without charge, and with no warranty. You may give *
4: * away copies of JOVE, including sources, provided that this notice is *
5: * included in all the files. *
6: ***************************************************************************/
7:
8: /* The code in this file was snarfed from ctype.h and modified for JOVE. */
9:
10: #define _U 01
11: #define _L 02
12: #define _N 04
13: #define _P 010
14: #define _C 020
15: #define _W 040
16: #define _Op 0100
17: #define _Cl 0200
18:
19: extern int SyntaxTable;
20: #define iswhite(c) (isspace(c))
21: #define isword(c) ((CharTable[SyntaxTable])[c]&(_W))
22: #define isalpha(c) ((CharTable[SyntaxTable])[c]&(_U|_L))
23: #define isupper(c) ((CharTable[SyntaxTable])[c]&_U)
24: #define islower(c) ((CharTable[SyntaxTable])[c]&_L)
25: #define isdigit(c) ((CharTable[SyntaxTable])[c]&_N)
26: #define isspace(c) (c == ' ' || c == '\t')
27: #define ispunct(c) ((CharTable[SyntaxTable])[c]&_P)
28:
29:
30: #define toascii(c) ((c)&CHARMASK)
31: #define isctrl(c) ((CharTable[0][c&CHARMASK])&_C)
32: #define isopenp(c) ((CharTable[0][c&CHARMASK])&_Op)
33: #define isclosep(c) ((CharTable[0][c&CHARMASK])&_Cl)
34: #define has_syntax(c,s) ((CharTable[SyntaxTable][c&CHARMASK])&s)
35:
36: #ifdef ASCII
37: #define toupper(c) ((c)&~040)
38: #define tolower(c) ((c)|040)
39: #else /* IBMPC or MAC */
40: #define toupper(c) (CaseEquiv[c])
41: /* #define tolower(c) ((c)|040) */
42: #endif /* IBMPC */
43:
44: #define WITH_TABLE(x) \
45: { \
46: int push = SyntaxTable; \
47: SyntaxTable = x;
48:
49: #define END_TABLE() \
50: SyntaxTable = push; \
51: }
Defined macros
_C
defined in line
14; used 133 times
_Cl
defined in line
17; used 15 times
_L
defined in line
11; used 170 times
_N
defined in line
12; used 41 times
_Op
defined in line
16; used 14 times
_P
defined in line
13; used 212 times
_U
defined in line
10; used 152 times
_W
defined in line
15; used 384 times
isctrl
defined in line
31; used 11 times
Usage of this include