register union reptr
*ipc
;
if ((f
= open(file
, 0)) < 0) {
fprintf(stderr
, "Can't open %s\n", file
);
if((execp
= gline(linebuf
)) == badp
) {
for(ipc
= ptrspace
; ipc
->command
; ) {
} else if(*p2
== CLNUM
) {
} else if(match(p2
, 0)) {
} else if(*p1
== CLNUM
) {
} else if(match(p1
, 0)) {
if((ipc
= ipc
->lb1
) == 0) {
for(p1
= linebuf
; p1
< spend
; p1
++)
register char *p1
, *p2
, c
;
if(*p2
== CCHR
&& p2
[1] != *p1
)
/* fast check for first character */
register char *lp
, *ep
, *curlp
;
/*fprintf(stderr, "*lp = %c, %o\n*ep = %c, %o\n", *lp, *lp, *ep, *ep); /*DEBUG*/
for (;;) switch (*ep
++) {
if(ep
[c
>>3] & bittab
[c
& 07]) {
ct
= braelist
[*ep
++] - bbeg
;
ct
= braelist
[*ep
++] - bbeg
;
while(ecmp(bbeg
, lp
, ct
))
if(advance(lp
, ep
)) return(1);
} while(ep
[c
>>3] & bittab
[c
& 07]);
fprintf(stderr
, "RE botch, %o\n", *--ep
);
if(match(ipc
->re1
, 0) == 0) return(0);
if(match(ipc
->re1
, 1) == 0) break;
register char *lp
, *sp
, *rp
;
sp
= place(sp
, loc1
, loc2
);
} else if (c
&0200 && (c
&= 0177) >= '1' && c
< NBRA
+'1') {
sp
= place(sp
, braslist
[c
-'1'], braelist
[c
-'1']);
if (sp
>= &genbuf
[LBSIZE
])
fprintf(stderr
, "output line too long.\n");
loc2
= sp
- genbuf
+ linebuf
;
if (sp
>= &genbuf
[LBSIZE
]) {
fprintf(stderr
, "Output line too long.\n");
char *place(asp
, al1
, al2
)
register char *sp
, *l1
, *l2
;
if (sp
>= &genbuf
[LBSIZE
])
fprintf(stderr
, "Output line too long.\n");
if(aptr
>= &abuf
[ABUFSIZE
]) {
fprintf(stderr
, "Too many appends after line %ld\n",
if(!ipc
->inar
|| dolflag
) {
for(p1
= ipc
->re1
; *p1
; )
fprintf(stdout
, "%ld\n", lnum
);
for(p1
= ipc
->re1
; *p1
; )
for(p1
= linebuf
; p1
< spend
; p1
++)
if((execp
= gline(linebuf
)) == badp
) {
if((execp
= gline(spend
)) == badp
) {
for(p1
= linebuf
; p1
< spend
; p1
++)
for(p1
= linebuf
; *p1
!= '\n' && *p1
!= '\0'; )
for(p1
= linebuf
; p1
< spend
; p1
++)
if(aptr
>= &abuf
[ABUFSIZE
])
fprintf(stderr
, "Too many reads after line%ld\n",
if(ipc
->pfl
&& nflag
&& i
)
for(p1
= linebuf
; p1
< spend
; p1
++)
fprintf(ipc
->fcode
, "%s\n", linebuf
);
while(*p1
= p2
[*p1
]) p1
++;
if ((c
= read(f
, ibuf
, 512)) <= 0) {
if ((c
= *p2
++) == '\n') {
if((c
= read(f
, ibuf
, 512)) <= 0) {
if(*a
++ != *b
++) return(0);
if((*aptr
)->command
== ACOM
) {
for(p1
= (*aptr
)->re1
; *p1
; )
if((fi
= fopen((*aptr
)->re1
, "r")) == NULL
)
while((t
= getc(fi
)) != EOF
) {