1: /*	ctype.h	4.1	82/05/07	*/
   2: 
   3: #
   4: /*
   5:  *	UNIX shell
   6:  *
   7:  *	S. R. Bourne
   8:  *	Bell Telephone Laboratories
   9:  *
  10:  */
  11: 
  12: 
  13: /* table 1 */
  14: #define T_SUB   01
  15: #define T_MET   02
  16: #define T_SPC   04
  17: #define T_DIP   010
  18: #define T_EOF   020
  19: #define T_EOR   040
  20: #define T_QOT   0100
  21: #define T_ESC   0200
  22: 
  23: /* table 2 */
  24: #define T_BRC   01
  25: #define T_DEF   02
  26: #define T_AST   04
  27: #define T_DIG   010
  28: #define T_FNG   020
  29: #define T_SHN   040
  30: #define T_IDC   0100
  31: #define T_SET   0200
  32: 
  33: /* for single chars */
  34: #define _TAB    (T_SPC)
  35: #define _SPC    (T_SPC)
  36: #define _UPC    (T_IDC)
  37: #define _LPC    (T_IDC)
  38: #define _DIG    (T_DIG)
  39: #define _EOF    (T_EOF)
  40: #define _EOR    (T_EOR)
  41: #define _BAR    (T_DIP)
  42: #define _HAT    (T_MET)
  43: #define _BRA    (T_MET)
  44: #define _KET    (T_MET)
  45: #define _SQB    (T_FNG)
  46: #define _AMP    (T_DIP)
  47: #define _SEM    (T_DIP)
  48: #define _LT (T_DIP)
  49: #define _GT (T_DIP)
  50: #define _LQU    (T_QOT|T_ESC)
  51: #define _BSL    (T_ESC)
  52: #define _DQU    (T_QOT)
  53: #define _DOL1   (T_SUB|T_ESC)
  54: 
  55: #define _CBR    T_BRC
  56: #define _CKT    T_DEF
  57: #define _AST    (T_AST|T_FNG)
  58: #define _EQ (T_DEF)
  59: #define _MIN    (T_DEF|T_SHN)
  60: #define _PCS    (T_SHN)
  61: #define _NUM    (T_SHN)
  62: #define _DOL2   (T_SHN)
  63: #define _PLS    (T_DEF|T_SET)
  64: #define _AT (T_AST)
  65: #define _QU (T_DEF|T_FNG|T_SHN)
  66: 
  67: /* abbreviations for tests */
  68: #define _IDCH   (T_IDC|T_DIG)
  69: #define _META   (T_SPC|T_DIP|T_MET|T_EOR)
  70: 
  71: char    _ctype1[];
  72: 
  73: /* nb these args are not call by value !!!! */
  74: #define space(c)    (((c)&QUOTE)==0 ANDF _ctype1[c]&(T_SPC))
  75: #define eofmeta(c)  (((c)&QUOTE)==0 ANDF _ctype1[c]&(_META|T_EOF))
  76: #define qotchar(c)  (((c)&QUOTE)==0 ANDF _ctype1[c]&(T_QOT))
  77: #define eolchar(c)  (((c)&QUOTE)==0 ANDF _ctype1[c]&(T_EOR|T_EOF))
  78: #define dipchar(c)  (((c)&QUOTE)==0 ANDF _ctype1[c]&(T_DIP))
  79: #define subchar(c)  (((c)&QUOTE)==0 ANDF _ctype1[c]&(T_SUB|T_QOT))
  80: #define escchar(c)  (((c)&QUOTE)==0 ANDF _ctype1[c]&(T_ESC))
  81: 
  82: char    _ctype2[];
  83: 
  84: #define digit(c)    (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_DIG))
  85: #define fngchar(c)  (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_FNG))
  86: #define dolchar(c)  (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_AST|T_BRC|T_DIG|T_IDC|T_SHN))
  87: #define defchar(c)  (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_DEF))
  88: #define setchar(c)  (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_SET))
  89: #define digchar(c)  (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_AST|T_DIG))
  90: #define letter(c)   (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_IDC))
  91: #define alphanum(c) (((c)&QUOTE)==0 ANDF _ctype2[c]&(_IDCH))
  92: #define astchar(c)  (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_AST))

Defined variables

_ctype1 defined in line 71; used 7 times
_ctype2 defined in line 82; used 9 times

Defined macros

T_AST defined in line 26; used 5 times
T_BRC defined in line 24; used 2 times
T_DEF defined in line 25; used 6 times
T_DIG defined in line 27; used 5 times
T_DIP defined in line 17; used 7 times
T_EOF defined in line 18; used 3 times
T_EOR defined in line 19; used 3 times
T_ESC defined in line 21; used 4 times
T_FNG defined in line 28; used 4 times
T_IDC defined in line 30; used 5 times
T_MET defined in line 15; used 4 times
T_QOT defined in line 20; used 4 times
T_SET defined in line 31; used 2 times
T_SHN defined in line 29; used 6 times
T_SPC defined in line 16; used 4 times
T_SUB defined in line 14; used 2 times
_AMP defined in line 46; used 1 times
_AST defined in line 57; used 1 times
_AT defined in line 64; used 1 times
_BAR defined in line 41; used 1 times
_BRA defined in line 43; used 1 times
_BSL defined in line 51; used 1 times
_CBR defined in line 55; used 1 times
_CKT defined in line 56; used 1 times
_DIG defined in line 38; used 10 times
_DOL1 defined in line 53; used 1 times
_DOL2 defined in line 62; used 1 times
_DQU defined in line 52; used 1 times
_EOF defined in line 39; used 1 times
_EOR defined in line 40; used 1 times
_EQ defined in line 58; used 1 times
_GT defined in line 49; used 1 times
_HAT defined in line 42; used 1 times
_IDCH defined in line 68; used 1 times
  • in line 91
_KET defined in line 44; used 1 times
_LPC defined in line 37; used 26 times
_LQU defined in line 50; used 1 times
_LT defined in line 48; used 1 times
_META defined in line 69; used 1 times
  • in line 75
_MIN defined in line 59; used 1 times
_NUM defined in line 61; used 1 times
_PCS defined in line 60; used 1 times
_PLS defined in line 63; used 1 times
_QU defined in line 65; used 1 times
_SEM defined in line 47; used 1 times
_SPC defined in line 35; used 1 times
_SQB defined in line 45; used 1 times
_TAB defined in line 34; used 1 times
_UPC defined in line 36; used 27 times
alphanum defined in line 91; used 4 times
astchar defined in line 92; used 1 times
defchar defined in line 87; used 1 times
digchar defined in line 89; used 1 times
digit defined in line 84; used 3 times
dipchar defined in line 78; used 1 times
dolchar defined in line 86; used 1 times
eofmeta defined in line 75; used 2 times
eolchar defined in line 77; used 4 times
escchar defined in line 80; used 1 times
fngchar defined in line 85; used 1 times
letter defined in line 90; used 4 times
qotchar defined in line 76; used 1 times
setchar defined in line 88; used 1 times
space defined in line 74; used 1 times
subchar defined in line 79; used 1 times

Usage of this include

ctype.h used 1 times
Last modified: 1982-06-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2986
Valid CSS Valid XHTML 1.0 Strict