{
REG POS rbytes = round(nbytes+BYTESPERWORD,BYTESPERWORD);
- LOOP INT c=0;
+ for (;;) { INT c=0;
REG BLKPTR p = blokp;
REG BLKPTR q;
REP IF !busy(p)
q = p; p = BLK(Rcheat(p->word)&~BUSY);
PER p>q || (c++)==0 DONE
addblok(rbytes);
- POOL
+ }
}
void addblok(reqd)
REG BLKPTR q;
INT us=0, un=0;
- LOOP
+ for (;;) {
q = Rcheat(p->word)&~BUSY;
IF p==ptr THEN exf++ FI
IF q<end || q>bloktop THEN abort(3) FI
FI
IF p>=q THEN abort(4) FI
p=q;
- POOL
+ }
IF exf==0 THEN abort(1) FI
prn(un); prc(SP); prn(us); prc(NL);
}
REG INT b;
r = term(flg);
- WHILE r && ((b=(wdval==ANDFSYM)) || wdval==||SYM)
- DO r = makelist((b ? TAND : T||), r, term(NLFLG));
+ WHILE r && ((b=(wdval==ANDFSYM)) || wdval==ORFSYM)
+ DO r = makelist((b ? TAND : TORF), r, term(NLFLG));
OD
return(r);
}
THEN return(0);
ELSE REG REGPTR r=(REGPTR)getstak(REGTYPE);
r->regptr=0;
- LOOP wdarg->argnxt=r->regptr;
+ for(;;) {
+ wdarg->argnxt=r->regptr;
r->regptr=wdarg;
IF wdval || ( word()!=')' && wdval!='|' )
THEN synbad();
THEN word();
ELSE break;
FI
- POOL
+ }
r->regcom=cmd(0,NLFLG|MTFLG);
IF wdval==ECSYM
THEN r->regnxt=syncase(esym);
OD
END
- LOOP IF cs==s
+ for(;;) { IF cs==s
THEN s=nullstr;
break;
ELIF *--cs == '/'
IF s==cs THEN s="/" FI
break;
FI
- POOL
+ }
IF stat(s,&statb)>=0
&& (statb.st_mode&S_IFMT)==S_IFDIR
&& (dirf=open(s,0))>0
iop->iolst=iotemp; iotemp=iop;
cline=locstak();
- LOOP clinep=cline; chkpr(NL);
+ for (;;) {
+ clinep=cline; chkpr(NL);
WHILE (c = (nosubst ? readc() : nextc(*ends)), !eolchar(c)) DO *clinep++ = c OD
*clinep=0;
IF eof || eq(cline,ends) THEN break FI
*clinep++=NL;
write(fd,cline,clinep-cline);
- POOL
+ }
close(fd);
FI
}
*
*/
-#define PROC extern
#define TYPE typedef
#define STRUCT TYPE struct
#define UNION TYPE union
#define REP do{
#define PER }while(
#define DONE );
-#define LOOP for(;;){
-#define POOL }
#define TRUE (-1)
#define FALSE 0
FI
IF v
THEN IF c!='+'
- THEN LOOP WHILE c = *v++
+ THEN for (;;) {
+ WHILE c = *v++
DO pushstak(c|quote); OD
IF dolg==0 || (++dolg>dolc)
THEN break;
ELSE v=dolv[dolg]; pushstak(SP|(*id=='*' ? quote : 0));
FI
- POOL
+ }
FI
ELIF argp
THEN IF c=='?'
IF input>=0 THEN initf(input) FI
/* command loop */
- LOOP tdystak(0);
+ for(;;) {
+ tdystak(0);
stakchk(); /* may reduce sbrk */
exitset();
IF (flags&prompt) && standin->fstak==0 && !eof
alarm(0); flags &= ~waiting;
execute(cmd(NL,MTFLG),0);
eof |= (flags&oneflg);
- POOL
+ }
}
chkpr(eor)
THEN f->fsiz=1;
FI
- LOOP c=nextc(0);
+ for(;;) {
+ c=nextc(0);
IF (*names && any(c, ifsnod.namval)) || eolchar(c)
THEN zerostak();
assign(n,absstak(rel)); setstak(rel);
FI
ELSE pushstak(c);
FI
- POOL
+ }
WHILE n
DO assign(n, nullstr);
IF *names THEN n=lookup(*names++); ELSE n=0; FI
REG INT c;
INT count=0;
- LOOP sigchk(); argp=locstak()+BYTESPERWORD;
+ for(;;) {
+ sigchk(); argp=locstak()+BYTESPERWORD;
WHILE (c = *s++, !any(c,ifsnod.namval) && c)
DO *argp++ = c OD
IF argp==staktop+BYTESPERWORD
makearg(argp); count++;
FI
Lcheat(gchain) |= ARGMK;
- POOL
+ }
}
FI
break;
- case T||:
+ case TORF:
IF execute(((LSTPTR)t)->lstlef,0)!=0
THEN execute(((LSTPTR)t)->lstrit,execflg);
FI