1*33075Sbostic /* sed.h 4.3 87/12/21 */ 218582Sralph 318582Sralph /* 418582Sralph * sed -- stream editor 518582Sralph */ 618582Sralph 718582Sralph #define CBRA 1 818582Sralph #define CCHR 2 918582Sralph #define CDOT 4 1018582Sralph #define CCL 6 1118582Sralph #define CNL 8 1218582Sralph #define CDOL 10 1318582Sralph #define CEOF 11 1418582Sralph #define CKET 12 1518582Sralph #define CNULL 13 1618582Sralph #define CLNUM 14 1718582Sralph #define CEND 16 1818582Sralph #define CDONT 17 1918582Sralph #define CBACK 18 2018582Sralph 2118582Sralph #define STAR 01 2218582Sralph 2318582Sralph #define NLINES 256 2418582Sralph #define DEPTH 20 2518582Sralph #define PTRSIZE 200 2618582Sralph #define RESIZE 10000 2718582Sralph #define ABUFSIZE 20 2818582Sralph #define LBSIZE 4000 2918582Sralph #define ESIZE 256 3018582Sralph #define LABSIZE 50 3118582Sralph #define NBRA 9 3218582Sralph 3318582Sralph FILE *fin; 34*33075Sbostic struct reptr *abuf[ABUFSIZE]; 35*33075Sbostic struct reptr **aptr; 3618582Sralph char *lastre; 3718582Sralph char ibuf[BUFSIZ]; 3818582Sralph char *cbp; 3918582Sralph char *ebp; 4018582Sralph char genbuf[LBSIZE]; 4118582Sralph char *loc1; 4218582Sralph char *loc2; 4318582Sralph char *locs; 4418582Sralph char seof; 4518582Sralph char *reend; 4618582Sralph char *lbend; 4718582Sralph char *hend; 4818582Sralph char *lcomend; 49*33075Sbostic struct reptr *ptrend; 5018582Sralph int eflag; 5118582Sralph int dolflag; 5218582Sralph int sflag; 5318582Sralph int jflag; 5418582Sralph int numbra; 5518582Sralph int delflag; 5618582Sralph long lnum; 5718582Sralph char linebuf[LBSIZE+1]; 5818582Sralph char holdsp[LBSIZE+1]; 5918582Sralph char *spend; 6018582Sralph char *hspend; 6118582Sralph int nflag; 6218582Sralph int gflag; 6318582Sralph char *braelist[NBRA]; 6418582Sralph char *braslist[NBRA]; 6518582Sralph long tlno[NLINES]; 6618582Sralph int nlno; 6732203Sbostic char *fname[12]; 6818582Sralph FILE *fcode[12]; 6918582Sralph int nfiles; 7018582Sralph 7118582Sralph #define ACOM 01 7218582Sralph #define BCOM 020 7318582Sralph #define CCOM 02 7418582Sralph #define CDCOM 025 7518582Sralph #define CNCOM 022 7618582Sralph #define COCOM 017 7718582Sralph #define CPCOM 023 7818582Sralph #define DCOM 03 7918582Sralph #define ECOM 015 8018582Sralph #define EQCOM 013 8118582Sralph #define FCOM 016 8218582Sralph #define GCOM 027 8318582Sralph #define CGCOM 030 8418582Sralph #define HCOM 031 8518582Sralph #define CHCOM 032 8618582Sralph #define ICOM 04 8718582Sralph #define LCOM 05 8818582Sralph #define NCOM 012 8918582Sralph #define PCOM 010 9018582Sralph #define QCOM 011 9118582Sralph #define RCOM 06 9218582Sralph #define SCOM 07 9318582Sralph #define TCOM 021 9418582Sralph #define WCOM 014 9518582Sralph #define CWCOM 024 9618582Sralph #define YCOM 026 9718582Sralph #define XCOM 033 9818582Sralph 9918582Sralph char *cp; 10018582Sralph char *reend; 10118582Sralph char *lbend; 10218582Sralph 103*33075Sbostic struct reptr { 104*33075Sbostic char *ad1; 105*33075Sbostic char *ad2; 106*33075Sbostic union { 107*33075Sbostic char *real_re1; 108*33075Sbostic struct reptr *real_lb1; 109*33075Sbostic } re_lb; 110*33075Sbostic #define re1 re_lb.real_re1 111*33075Sbostic #define lb1 re_lb.real_lb1 112*33075Sbostic char *rhs; 113*33075Sbostic FILE *fcode; 114*33075Sbostic char command; 115*33075Sbostic char gfl; 116*33075Sbostic char pfl; 117*33075Sbostic char inar; 118*33075Sbostic char negfl; 11918582Sralph } ptrspace[PTRSIZE], *rep; 12018582Sralph 12118582Sralph 12218582Sralph char respace[RESIZE]; 12318582Sralph 12418582Sralph struct label { 12518582Sralph char asc[9]; 126*33075Sbostic struct reptr *chain; 127*33075Sbostic struct reptr *address; 12818582Sralph } ltab[LABSIZE]; 12918582Sralph 13018582Sralph struct label *lab; 13118582Sralph struct label *labend; 13218582Sralph 13318582Sralph int f; 13418582Sralph int depth; 13518582Sralph 13618582Sralph int eargc; 13718582Sralph char **eargv; 13818582Sralph 13918582Sralph extern char bittab[]; 14018582Sralph 141*33075Sbostic struct reptr **cmpend[DEPTH]; 14218582Sralph int depth; 143*33075Sbostic struct reptr *pending; 14418582Sralph char *badp; 14518582Sralph char bad; 14618582Sralph char *compile(); 14718582Sralph char *ycomp(); 14818582Sralph char *address(); 14918582Sralph char *text(); 15018582Sralph char *compsub(); 15118582Sralph struct label *search(); 15218582Sralph char *gline(); 15318582Sralph char *place(); 15418582Sralph char compfl; 155