summaryrefslogtreecommitdiffstats
path: root/lib/libI77/rsne.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libI77/rsne.c')
-rw-r--r--lib/libI77/rsne.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/libI77/rsne.c b/lib/libI77/rsne.c
index ad7ad26..9378717 100644
--- a/lib/libI77/rsne.c
+++ b/lib/libI77/rsne.c
@@ -78,7 +78,7 @@ hash(hashtab *ht, register char *s)
register hashentry *h;
char *s0 = s;
- for(x = 0; c = *s++; x = x & 0x4000 ? ((x << 1) & 0x7fff) + 1 : x << 1)
+ for(x = 0; (c = *s++); x = x & 0x4000 ? ((x << 1) & 0x7fff) + 1 : x << 1)
x += c;
for(h = *(zot = ht->tab + x % ht->htsize); h; h = h->next)
if (!strcmp(s0, h->name))
@@ -99,7 +99,7 @@ mk_hashtab(Namelist *nl)
hashentry *he;
hashtab **x, **x0, *y;
- for(x = &nl_cache; y = *x; x0 = x, x = &y->next)
+ for(x = &nl_cache; (y = *x); x0 = x, x = &y->next)
if (nl == y->nl)
return y;
if (n_nlcache >= MAX_NL_CACHE) {
@@ -151,13 +151,13 @@ nl_init(Void) {
if(!f__init)
f_init();
- for(s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; c = *s++; )
+ for(s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; (c = *s++); )
Alpha[c]
= Alphanum[c]
= Alpha[c + 'a' - 'A']
= Alphanum[c + 'a' - 'A']
= c;
- for(s = "0123456789_"; c = *s++; )
+ for(s = "0123456789_"; (c = *s++); )
Alphanum[c] = c;
}
@@ -180,7 +180,7 @@ getname(register char *s, int slen)
ch = 115;
errfl(f__elist->cierr, ch, "namelist read");
}
- while(*s = Alphanum[GETC(ch) & 0xff])
+ while( (*s = Alphanum[GETC(ch) & 0xff]) )
if (s < se)
s++;
if (ch == EOF)
@@ -235,15 +235,15 @@ getdimen(int *chp, dimen *d, ftnlen delta, ftnlen extent, ftnlen *x1)
register int k;
ftnlen x2, x3;
- if (k = getnum(chp, x1))
+ if ( (k = getnum(chp, x1)) )
return k;
x3 = 1;
if (*chp == ':') {
- if (k = getnum(chp, &x2))
+ if ( (k = getnum(chp, &x2)) )
return k;
x2 -= *x1;
if (*chp == ':') {
- if (k = getnum(chp, &x3))
+ if ( (k = getnum(chp, &x3)) )
return k;
if (!x3)
return 123;
@@ -291,9 +291,9 @@ print_ne(cilist *a)
static char where0[] = "namelist read start ";
#ifdef KR_headers
-x_rsne(a) cilist *a;
+int x_rsne(a) cilist *a;
#else
-x_rsne(cilist *a)
+int x_rsne(cilist *a)
#endif
{
int ch, got1, k, n, nd, quote, readall;
@@ -340,7 +340,7 @@ x_rsne(cilist *a)
#endif
}
have_amp:
- if (ch = getname(buf,sizeof(buf)))
+ if ( (ch = getname(buf,sizeof(buf))) )
return ch;
nl = (Namelist *)a->cifmt;
if (strcmp(buf, nl->name))
@@ -392,10 +392,10 @@ x_rsne(cilist *a)
case '&':
return 0;
default:
- if (ch <= ' ' && ch >= 0 || ch == ',')
+ if ((ch <= ' ' && ch >= 0) || (ch == ','))
continue;
Ungetc(ch,f__cf);
- if (ch = getname(buf,sizeof(buf)))
+ if ( (ch = getname(buf,sizeof(buf))) )
return ch;
goto havename;
}
@@ -419,8 +419,8 @@ x_rsne(cilist *a)
if (!(dims = v->dims)) {
if (type != TYCHAR)
errfl(a->cierr, 122, where);
- if (k = getdimen(&ch, dn, (ftnlen)size,
- (ftnlen)size, &b))
+ if ( (k = getdimen(&ch, dn, (ftnlen)size,
+ (ftnlen)size, &b)) )
errfl(a->cierr, k, where);
if (ch != ')')
errfl(a->cierr, 115, where);
@@ -436,7 +436,7 @@ x_rsne(cilist *a)
nomax = span = dims[1];
ivae = iva + size*nomax;
colonseen = 0;
- if (k = getdimen(&ch, dn, size, nomax, &b))
+ if ( (k = getdimen(&ch, dn, size, nomax, &b)) )
errfl(a->cierr, k, where);
no = dn->extent;
b0 = dims[2];
@@ -447,8 +447,8 @@ x_rsne(cilist *a)
errfl(a->cierr, 115, where);
dn1 = dn + 1;
span /= *dims;
- if (k = getdimen(&ch, dn1, dn->delta**dims,
- span, &b1))
+ if ( (k = getdimen(&ch, dn1, dn->delta**dims,
+ span, &b1)) )
errfl(a->cierr, k, where);
ex *= *dims;
b += b1*ex;
@@ -467,7 +467,7 @@ x_rsne(cilist *a)
no1 = 1;
dn0 = dimens;
if (type == TYCHAR && ch == '(' /*)*/) {
- if (k = getdimen(&ch, &substr, size, size, &b))
+ if ( (k = getdimen(&ch, &substr, size, size, &b)) )
errfl(a->cierr, k, where);
if (ch != ')')
errfl(a->cierr, 115, where);
@@ -502,7 +502,7 @@ x_rsne(cilist *a)
dn1->delta -= ex;
}
}
- else if (dims = v->dims) {
+ else if ( (dims = v->dims) ) {
no = no1 = dims[1];
ivae = iva + no*size;
}
@@ -522,7 +522,7 @@ x_rsne(cilist *a)
else if (iva + no1*size > ivae)
no1 = (ivae - iva)/size;
f__lquit = 0;
- if (k = l_read(&no1, vaddr + iva, size, type))
+ if ( (k = l_read(&no1, vaddr + iva, size, type)) )
return k;
if (f__lquit == 1)
return 0;
@@ -533,8 +533,8 @@ x_rsne(cilist *a)
if (no1 > f__lcount)
no1 = f__lcount;
iva += no1 * dn0->delta;
- if (k = l_read(&no1, vaddr + iva,
- size, type))
+ if ( (k = l_read(&no1, vaddr + iva,
+ size, type)) )
return k;
}
}
@@ -594,7 +594,7 @@ s_rsne(cilist *a)
f__external=1;
l_eof = 0;
- if(n = c_le(a))
+ if( (n = c_le(a)) )
return n;
if(f__curunit->uwrt && f__nowreading(f__curunit))
err(a->cierr,errno,where0);
OpenPOWER on IntegriCloud