4.3BSD beta release manual page
[unix-history] / usr / src / old / sed / sed.h
CommitLineData
00a89a8a
RC
1/* sed.h 4.1 85/04/05 */
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;
34union reptr *abuf[ABUFSIZE];
35union reptr **aptr;
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;
49union reptr *ptrend;
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;
67char fname[12][40];
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
103union reptr {
104 struct reptr1 {
105 char *ad1;
106 char *ad2;
107 char *re1;
108 char *rhs;
109 FILE *fcode;
110 char command;
111 char gfl;
112 char pfl;
113 char inar;
114 char negfl;
115 } A;
116 struct reptr2 {
117 char *ad1;
118 char *ad2;
119 union reptr *lb1;
120 char *rhs;
121 FILE *fcode;
122 char command;
123 char gfl;
124 char pfl;
125 char inar;
126 char negfl;
127 } B;
128} ptrspace[PTRSIZE], *rep;
129
130
131char respace[RESIZE];
132
133struct label {
134 char asc[9];
135 union reptr *chain;
136 union reptr *address;
137} ltab[LABSIZE];
138
139struct label *lab;
140struct label *labend;
141
142int f;
143int depth;
144
145int eargc;
146char **eargv;
147
148extern char bittab[];
149
150union reptr **cmpend[DEPTH];
151int depth;
152union reptr *pending;
153char *badp;
154char bad;
155char *compile();
156char *ycomp();
157char *address();
158char *text();
159char *compsub();
160struct label *search();
161char *gline();
162char *place();
163char compfl;