date and time created 88/10/18 22:21:08 by bostic
[unix-history] / usr / src / old / sed / sed.h
CommitLineData
eb1efbca 1/* sed.h 4.3 87/12/21 */
00a89a8a
RC
2
3/*
4 * sed -- stream editor
5 */
6
7#define CBRA 1
8#define CCHR 2
9#define CDOT 4
10#define CCL 6
11#define CNL 8
12#define CDOL 10
13#define CEOF 11
14#define CKET 12
15#define CNULL 13
16#define CLNUM 14
17#define CEND 16
18#define CDONT 17
19#define CBACK 18
20
21#define STAR 01
22
23#define NLINES 256
24#define DEPTH 20
25#define PTRSIZE 200
26#define RESIZE 10000
27#define ABUFSIZE 20
28#define LBSIZE 4000
29#define ESIZE 256
30#define LABSIZE 50
31#define NBRA 9
32
33FILE *fin;
eb1efbca
KB
34struct reptr *abuf[ABUFSIZE];
35struct reptr **aptr;
00a89a8a
RC
36char *lastre;
37char ibuf[BUFSIZ];
38char *cbp;
39char *ebp;
40char genbuf[LBSIZE];
41char *loc1;
42char *loc2;
43char *locs;
44char seof;
45char *reend;
46char *lbend;
47char *hend;
48char *lcomend;
eb1efbca 49struct reptr *ptrend;
00a89a8a
RC
50int eflag;
51int dolflag;
52int sflag;
53int jflag;
54int numbra;
55int delflag;
56long lnum;
57char linebuf[LBSIZE+1];
58char holdsp[LBSIZE+1];
59char *spend;
60char *hspend;
61int nflag;
62int gflag;
63char *braelist[NBRA];
64char *braslist[NBRA];
65long tlno[NLINES];
66int nlno;
3f7465eb 67char *fname[12];
00a89a8a
RC
68FILE *fcode[12];
69int nfiles;
70
71#define ACOM 01
72#define BCOM 020
73#define CCOM 02
74#define CDCOM 025
75#define CNCOM 022
76#define COCOM 017
77#define CPCOM 023
78#define DCOM 03
79#define ECOM 015
80#define EQCOM 013
81#define FCOM 016
82#define GCOM 027
83#define CGCOM 030
84#define HCOM 031
85#define CHCOM 032
86#define ICOM 04
87#define LCOM 05
88#define NCOM 012
89#define PCOM 010
90#define QCOM 011
91#define RCOM 06
92#define SCOM 07
93#define TCOM 021
94#define WCOM 014
95#define CWCOM 024
96#define YCOM 026
97#define XCOM 033
98
99char *cp;
100char *reend;
101char *lbend;
102
eb1efbca
KB
103struct reptr {
104 char *ad1;
105 char *ad2;
106 union {
107 char *real_re1;
108 struct reptr *real_lb1;
109 } re_lb;
110#define re1 re_lb.real_re1
111#define lb1 re_lb.real_lb1
112 char *rhs;
113 FILE *fcode;
114 char command;
115 char gfl;
116 char pfl;
117 char inar;
118 char negfl;
00a89a8a
RC
119} ptrspace[PTRSIZE], *rep;
120
121
122char respace[RESIZE];
123
124struct label {
125 char asc[9];
eb1efbca
KB
126 struct reptr *chain;
127 struct reptr *address;
00a89a8a
RC
128} ltab[LABSIZE];
129
130struct label *lab;
131struct label *labend;
132
133int f;
134int depth;
135
136int eargc;
137char **eargv;
138
139extern char bittab[];
140
eb1efbca 141struct reptr **cmpend[DEPTH];
00a89a8a 142int depth;
eb1efbca 143struct reptr *pending;
00a89a8a
RC
144char *badp;
145char bad;
146char *compile();
147char *ycomp();
148char *address();
149char *text();
150char *compsub();
151struct label *search();
152char *gline();
153char *place();
154char compfl;