1: #
2: /*
3: * UNIX shell
4: *
5: * S. R. Bourne
6: * Bell Telephone Laboratories
7: *
8: */
9:
10: #define LOCAL static
11: #define PROC extern
12: #define TYPE typedef
13: #define STRUCT TYPE struct
14: #define UNION TYPE union
15: #define REG register
16:
17: #define IF if(
18: #define THEN ){
19: #define ELSE } else {
20: #define ELIF } else if (
21: #define FI ;}
22:
23: #define BEGIN {
24: #define END }
25: #define SWITCH switch(
26: #define IN ){
27: #define ENDSW }
28: #define FOR for(
29: #define WHILE while(
30: #define DO ){
31: #define OD ;}
32: #define REP do{
33: #define PER }while(
34: #define DONE );
35: #define LOOP for(;;){
36: #define POOL }
37:
38:
39: #define SKIP ;
40: #define DIV /
41: #define REM %
42: #define NEQ ^
43: #define ANDF &&
44: #define ORF ||
45:
46: #define TRUE (-1)
47: #define FALSE 0
48: #define LOBYTE 0377
49: #define STRIP 0177
50: #define QUOTE 0200
51:
52: #define EOF 0
53: #define NL '\n'
54: #define SP ' '
55: #define LQ '`'
56: #define RQ '\''
57: #define MINUS '-'
58: #define COLON ':'
59:
60: #define MAX(a,b) ((a)>(b)?(a):(b))
Defined macros
ANDF
defined in line
43;
never used
BEGIN
defined in line
23;
never used
COLON
defined in line
58; used 2 times
DIV
defined in line
40;
never used
DO
defined in line
30;
never used
DONE
defined in line
34;
never used
ELIF
defined in line
20;
never used
ELSE
defined in line
19;
never used
END
defined in line
24;
never used
ENDSW
defined in line
27; used 8 times
EOF
defined in line
52; used 4 times
FALSE
defined in line
47; used 10 times
FI
defined in line
21;
never used
FOR
defined in line
28;
never used
IF
defined in line
17;
never used
IN
defined in line
26; used 8 times
LOCAL
defined in line
10; used 38 times
- in /usr/src/cmd/sh/args.c line
13,
101
- in /usr/src/cmd/sh/cmd.c line
42,
116,
134,
150,
189,
308,
314,
358,
365,
373,
391
- in /usr/src/cmd/sh/expand.c line
159
- in /usr/src/cmd/sh/macro.c line
13-18(3),
29,
49,
168,
228
- in /usr/src/cmd/sh/main.c line
19,
93
- in /usr/src/cmd/sh/name.c line
201,
217,
225,
248,
292,
300
- in /usr/src/cmd/sh/service.c line
109-110(2),
127,
170-171(2),
297,
340
- in /usr/src/cmd/sh/word.c line
116
- in /usr/src/cmd/sh/xec.c line
13
LOOP
defined in line
35;
never used
LQ
defined in line
55; used 1 times
MAX
defined in line
60;
never used
MINUS
defined in line
57; used 1 times
NEQ
defined in line
42; used 1 times
NL
defined in line
53; used 18 times
OD
defined in line
31;
never used
ORF
defined in line
44;
never used
PER
defined in line
33;
never used
POOL
defined in line
36;
never used
PROC
defined in line
11; used 16 times
QUOTE
defined in line
50; used 5 times
REG
defined in line
15; used 175 times
- in /usr/src/cmd/sh/args.c line
31-33(3),
72-73(2),
86-88(3),
104-106(3)
- in /usr/src/cmd/sh/blok.c line
30-34(3),
56-57(2),
71,
80,
92-93(2)
- in /usr/src/cmd/sh/cmd.c line
35,
46,
66-69(2),
118-119(2),
136,
151-156(2),
192-193(2),
215,
261,
276-278(3),
317-319(3),
367,
376
- in /usr/src/cmd/sh/error.c line
67
- in /usr/src/cmd/sh/expand.c line
36,
47,
75,
92,
106,
115-117(2),
162-163(2),
185
- in /usr/src/cmd/sh/fault.c line
20-22(2),
49,
59,
68-69(2),
95-96(2)
- in /usr/src/cmd/sh/io.c line
19,
27-29(2),
40,
49,
70,
79,
91,
112-114(2)
- in /usr/src/cmd/sh/macro.c line
19-21(2),
30-33(2),
52,
60-65(2),
154-155(2),
172-173(2),
180-185(2),
212-214(2)
- in /usr/src/cmd/sh/main.c line
34,
96-97(2),
170
- in /usr/src/cmd/sh/name.c line
32-34(3),
49-53(2),
67-68(2),
88,
117-119(3),
163,
174-177(3),
204,
226,
238,
249-251(2),
260,
271,
286,
312
- in /usr/src/cmd/sh/print.c line
35,
53,
73(2),
86-88(3)
- in /usr/src/cmd/sh/service.c line
34-35(2),
71,
84-86(2),
94-98(2),
115-116(2),
129-131(2),
175,
185,
206-211(3),
255-257(3),
269,
277-278(2),
301,
311,
326-328(3),
341-344(3)
- in /usr/src/cmd/sh/setbrk.c line
14
- in /usr/src/cmd/sh/stak.c line
21-22(2),
50-52(2),
59
- in /usr/src/cmd/sh/string.c line
17,
24-27(2),
38,
51
- in /usr/src/cmd/sh/word.c line
19-20(2),
73,
87-89(3),
118-119(2)
- in /usr/src/cmd/sh/xec.c line
27,
33-35(2),
70,
382-387(2)
REM
defined in line
41;
never used
REP
defined in line
32;
never used
RQ
defined in line
56; used 1 times
SKIP
defined in line
39;
never used
SP
defined in line
54; used 4 times
STRIP
defined in line
49; used 8 times
THEN
defined in line
18;
never used
TRUE
defined in line
46; used 4 times
TYPE
defined in line
12; used 2 times
UNION
defined in line
14;
never used
WHILE
defined in line
29;
never used
Usage of this include