# 2.11BSD#431 - /usr/src/bin/csh/sh.char.h

##### Macros

    _DIG              X
    _DOL              X
    _ESC              X
    _GLOB             X
    _LET              X
    _META             X
    _NL               X
    _Q                X
    _Q1               X
    _SP               X
    alnum             X
    cmap              X
    digit             X
    isglob            X
    ismeta            X
    isspace           X
    isspnl            X
    letter            X

       1: /*
       2:  * Copyright (c) 1980 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley Software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)sh.char.h	5.3 (Berkeley) 3/29/86
       7:  */
       8:
       9: /*
      10:  * Table for spotting special characters quickly
      11:  *
      12:  * Makes for very obscure but efficient coding.
      13:  */
      14:
      15: extern unsigned short _cmap[];
      16:
      17: #define _Q  0x01        /* '" */
      18: #define _Q1 0x02        /* ` */
      19: #define _SP 0x04        /* space and tab */
      20: #define _NL 0x08        /* \n */
      21: #define _META   0x10        /* lex meta characters, sp #'`";&<>()|\t\n */
      22: #define _GLOB   0x20        /* glob characters, *?{[` */
      23: #define _ESC    0x40        /* \ */
      24: #define _DOL    0x80        /* $ */
      25: #define _DIG   0x100        /* 0-9 */
      26: #define _LET   0x200        /* a-z, A-Z, _ */
      27:
      28: #define cmap(c, bits)   (_cmap[(unsigned char)(c)] & (bits))
      29:
      30: #define isglob(c)   cmap(c, _GLOB)
      31: #define isspace(c)  cmap(c, _SP)
      32: #define isspnl(c)   cmap(c, _SP|_NL)
      33: #define ismeta(c)   cmap(c, _META)
      34: #define digit(c)    cmap(c, _DIG)
      35: #define letter(c)   cmap(c, _LET)
      36: #define alnum(c)    (digit(c) || letter(c))

#### Defined macros

_DIG defined in line 25; used 11 times

- in line 34
- in /usr/src/bin/csh/sh.char.c line 51-57(10)

_DOL defined in line 24; used 2 times

- in /usr/src/bin/csh/sh.char.c line 42
- in /usr/src/bin/csh/sh.dol.c line 62

_ESC defined in line 23; used 4 times

- in /usr/src/bin/csh/sh.char.c line 84
- in /usr/src/bin/csh/sh.dol.c line 33
- in /usr/src/bin/csh/sh.lex.c line 167, 238

_GLOB defined in line 22; used 6 times

- in line 30
- in /usr/src/bin/csh/sh.char.c line 45, 60, 81, 87, 105

_LET defined in line 26; used 54 times

- in line 35
- in /usr/src/bin/csh/sh.char.c line 63-105(53)

_META defined in line 21; used 15 times

- in line 33
- in /usr/src/bin/csh/sh.char.c line 21(2), 39-45(5), 57-60(3), 108
- in /usr/src/bin/csh/sh.lex.c line 167, 238, 285

_NL defined in line 20; used 3 times

- in line 32
- in /usr/src/bin/csh/sh.char.c line 21
- in /usr/src/bin/csh/sh.dol.c line 217

_Q defined in line 17; used 7 times

- in /usr/src/bin/csh/sh.char.c line 39-42(2)
- in /usr/src/bin/csh/sh.dol.c line 33, 217
- in /usr/src/bin/csh/sh.lex.c line 238, 249, 285

_Q1 defined in line 18; used 6 times

- in /usr/src/bin/csh/sh.char.c line 87
- in /usr/src/bin/csh/sh.dol.c line 33, 217
- in /usr/src/bin/csh/sh.lex.c line 238, 249, 285

_SP defined in line 19; used 5 times

- in line 31-32(2)
- in /usr/src/bin/csh/sh.char.c line 21, 39
- in /usr/src/bin/csh/sh.dol.c line 217

alnum defined in line 36; used 4 times

- in /usr/src/bin/csh/sh.dol.c line 381-386(2)
- in /usr/src/bin/csh/sh.set.c line 34, 154

cmap defined in line 28; used 15 times

- in line 30-35(6)
- in /usr/src/bin/csh/sh.dol.c line 62, 217-219(2), 256, 555
- in /usr/src/bin/csh/sh.lex.c line 167, 238, 249, 285

digit defined in line 34; used 28 times

- in line 36
- in /usr/src/bin/csh/sh.dir.c line 261
- in /usr/src/bin/csh/sh.dol.c line 351, 358, 428-431(2), 450-452(2)
- in /usr/src/bin/csh/sh.exp.c line 568
- in /usr/src/bin/csh/sh.func.c line 863, 944
- in /usr/src/bin/csh/sh.glob.c line 136
- in /usr/src/bin/csh/sh.hist.c line 32
- in /usr/src/bin/csh/sh.lex.c line 364, 370, 570, 854-856(2), 932, 978
- in /usr/src/bin/csh/sh.misc.c line 324-327(2)
- in /usr/src/bin/csh/sh.proc.c line 794, 854, 936
- in /usr/src/bin/csh/sh.set.c line 105, 311-315(2)

isglob defined in line 30; used 2 times

- in /usr/src/bin/csh/sh.glob.c line 149, 511

ismeta defined in line 33; never used
isspace defined in line 31; never used
isspnl defined in line 32; never used
letter defined in line 35; used 9 times

- in line 36
- in /usr/src/bin/csh/sh.func.c line 349
- in /usr/src/bin/csh/sh.glob.c line 136
- in /usr/src/bin/csh/sh.lex.c line 374-375(2), 485, 570
- in /usr/src/bin/csh/sh.set.c line 36, 156

#### Usage of this include

sh.char.h used 2 times

- in /usr/src/bin/csh/sh.char.c line 11
- in /usr/src/bin/csh/sh.h line 17

Last modified: 1987-02-08 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1034 |