register DOLPTR argr = 0;
register DOLPTR argblk;
- if (argblk = blk) {
+ if ( (argblk = blk) ) {
argr = argblk->dolnxt;
if ((--argblk->doluse) == 0) {
for (argp = (char **) argblk->dolarg;
void clearup(void)
{
/* force `for' $* lists to go away */
- while (argfor = freeargs(argfor));
+ while ( (argfor = freeargs(argfor)) );
/* clean up io files */
while (pop());
synbad();
case ';':
- if (e = cmd(sym, flg | MTFLG))
+ if ( (e = cmd(sym, flg | MTFLG)) )
i = makelist(TLST, i, e);
break;
}
reserv++;
word();
- if (io = inout(io)) {
+ if ( (io = inout(io)) ) {
t = makefork(0, t);
t->treio = io;
}
void done(void)
{
register STRING t;
- if (t = trapcom[0]
- ) {
+ if ( (t = trapcom[0]) ) {
trapcom[0] = 0; /*should free but not long */
execexp(t, 0);
;
{
register char c;
s = as;
- while (c = *s)
+ while ( (c = *s) )
*s++ = (c & STRIP ? c : '/');
}
return count;
register int scc;
char c;
- if (scc = *s++) {
+ if ( (scc = *s++) ) {
if ((scc &= STRIP) == 0) {
scc = 0200;
}
int lc;
ok = 0;
lc = 077777;
- while (c = *p++) {
+ while ( (c = *p++) ) {
if (c == ']') {
return (ok ? gmatch(s, p) : 0);
} else if (c == MINUS) {
s2 = locstak() + BYTESPERWORD;
s1 = as1;
- while (c = *s1++) {
+ while ( (c = *s1++) ) {
if ((c &= STRIP) == 0) {
*s2++ = '/';
break;
*s2++ = c;
}
s1 = as2;
- while (*s2 = *s1++) {
+ while ( (*s2 = *s1++) ) {
s2++;
}
- if (s1 = as3) {
+ if ( (s1 = as3) ) {
*s2++ = '/';
- while (*s2++ = *++s1);
+ while ( (*s2++ = *++s1) );
}
makearg(endstak(s2));
}
while (--i) {
if (trapflg[i] & TRAPSET) {
trapflg[i] &= ~TRAPSET;
- if (t = trapcom[i]) {
+ if ( (t = trapcom[i]) ) {
int savxit = exitval;
execexp(t, 0);
exitval = savxit;
int fd;
register IOPTR iop;
- if (iop = ioparg) {
+ if ( (iop = ioparg) ) {
copy(iop->iolst);
ends = mactrim(iop->ioname);
CHAR idb[2];
char *id = idb;
- if (bra = (c == BRACE))
+ if ( (bra = (c == BRACE)) )
c = readc();
if (letter(c)) {
if (v) {
if (c != '+') {
for (;;) {
- while (c = *v++)
+ while ( (c = *v++) )
pushstak(c | quote);
if (dolg == 0 || (++dolg > dolc))
tdystak(savptr);
staktop = movstr(savptr, stakbot);
- while (d = readc())
+ while ( (d = readc()) )
pushstak(d | quote);
await(0);
push(&fb);
initf(in);
/* DQUOTE used to stop it from quoting */
- while (c = (getch(DQUOTE) & STRIP)) {
+ while ( (c = (getch(DQUOTE) & STRIP)) ) {
pushstak(c);
if (--count == 0) {
flush(ot);
syscan = syswds;
first = *w;
- while (s = syscan->sysnam) {
+ while ( (s = syscan->sysnam) ) {
if (first == *s && eq(w, s))
return (syscan->sysval);
syscan++;
register const char *s;
sigchk();
- if (s = n->namval) {
+ if ( (s = n->namval) ) {
prs(n->namid);
prc('=');
prs(s);
{
register const char *s;
- if (s = as)
+ if ( (s = as) )
write(output, s, length(s) - 1);
}
sec = t % 60;
t /= 60;
min = t % 60;
- if (hr = t / 60) {
+ if ( (hr = t / 60) ) {
prn(hr);
prc('h');
}
path = getpath(*t);
namscan(exname);
xecenv = sh_setenv();
- while (path = execs(path, t));
+ while ( (path = execs(path, t)) );
failed(*t, xecmsg);
}
}
sigchk();
execve(p, (char**) &t[0], (char **)xecenv);
switch (errno) {
- case ENOEXEC:
+ case ENOEXEC: /* could be a shell script */
flags = 0;
comdiv = 0;
ioset = 0;
w_hi = (w >> 8) & LOBYTE;
- if (sig = w & 0177) {
+ if ( (sig = w & 0177) ) {
if (sig == 0177) { /* ptrace! return */
prs("ptrace: ");
sig = w_hi;
register char c;
register char q = 0;
- if (p = at) {
- while (c = *p) {
+ if ( (p = at) ) {
+ while ( (c = *p) ) {
*p++ = c & STRIP;
q |= c;
}
while (argp) {
*--comargn = argp->argval;
- if (argp = argp->argnxt)
+ if ( (argp = argp->argnxt) )
trim(*comargn);
if (argp == 0 || ((intptr_t)(argp)) & ARGMK) {
gsort(comargn, comargm);
register int count = 0;
register COMPTR c;
- if (c = ac) {
+ if ( (c = ac) ) {
argp = c->comarg;
while (argp) {
count += split(macro(argp->argval));
} else if (c == 0) {
s--;
}
- if (c = expand(((ARGPTR) (argp = endstak(argp)))->argval, 0)) {
+ if ( (c = expand(((ARGPTR) (argp = endstak(argp)))->argval, 0)) ) {
count += c;
} else { /* assign(&fngnod, argp->argval); */
makearg(argp);
char *movstr(register const char *a, register char *b)
{
- while (*b++ = *a++);
+ while ( (*b++ = *a++) );
return (--b);
}
{
register char d;
- while (d = *s++) {
+ while ( (d = *s++) ) {
if (d == c) {
return (TRUE);
;
{
register const char *s;
- if (s = as) {
+ if ( (s = as) ) {
while (*s++);;
}
return (s - as);