diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-02 12:57:28 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-02 12:57:28 +0000 |
commit | d7cc352ae37e59f5d051a169242888ee5b507397 (patch) | |
tree | db36fe5f88ba393f4c2f1e68fe6777b33043db92 /libf2c | |
parent | a6c9f19ce3af4035319f47d855ee1d20c1bc9368 (diff) | |
download | gcc-d7cc352ae37e59f5d051a169242888ee5b507397.tar.gz |
* libI77/inquire.c (f_inqu): Avoid ambiguous else clauses.
* libI77/lread.c (l_C, l_L): Likewise.
* libI77/open.c (f_open): Likewise.
* libI77/rsne.c (x_rsne): Likewise.
* libI77/wref.c (wrt_F): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54167 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c')
-rw-r--r-- | libf2c/ChangeLog | 8 | ||||
-rw-r--r-- | libf2c/libI77/inquire.c | 114 | ||||
-rw-r--r-- | libf2c/libI77/lread.c | 20 | ||||
-rw-r--r-- | libf2c/libI77/open.c | 12 | ||||
-rw-r--r-- | libf2c/libI77/rsne.c | 32 | ||||
-rw-r--r-- | libf2c/libI77/wref.c | 18 |
6 files changed, 122 insertions, 82 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index cca6118c5c2..cab86be281b 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,11 @@ +Sun Jun 2 08:55:20 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * libI77/inquire.c (f_inqu): Avoid ambiguous else clauses. + * libI77/lread.c (l_C, l_L): Likewise. + * libI77/open.c (f_open): Likewise. + * libI77/rsne.c (x_rsne): Likewise. + * libI77/wref.c (wrt_F): Likewise. + Sun Jun 2 08:53:15 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * libF77/getenv_.c (G77_getenv_0): Avoid signed/unsigned warning. diff --git a/libf2c/libI77/inquire.c b/libf2c/libI77/inquire.c index ac13b36bd38..5b2df3e699c 100644 --- a/libf2c/libI77/inquire.c +++ b/libf2c/libI77/inquire.c @@ -55,67 +55,89 @@ f_inqu (inlist * a) } } if (a->inex != NULL) - if (byfile && x != -1 || !byfile && p != NULL) - *a->inex = 1; - else - *a->inex = 0; + { + if (byfile && x != -1 || !byfile && p != NULL) + *a->inex = 1; + else + *a->inex = 0; + } if (a->inopen != NULL) - if (byfile) - *a->inopen = (p != NULL); - else - *a->inopen = (p != NULL && p->ufd != NULL); + { + if (byfile) + *a->inopen = (p != NULL); + else + *a->inopen = (p != NULL && p->ufd != NULL); + } if (a->innum != NULL) *a->innum = p - f__units; if (a->innamed != NULL) - if (byfile || p != NULL && p->ufnm != NULL) - *a->innamed = 1; - else - *a->innamed = 0; + { + if (byfile || p != NULL && p->ufnm != NULL) + *a->innamed = 1; + else + *a->innamed = 0; + } if (a->inname != NULL) - if (byfile) - b_char (buf, a->inname, a->innamlen); - else if (p != NULL && p->ufnm != NULL) - b_char (p->ufnm, a->inname, a->innamlen); + { + if (byfile) + b_char (buf, a->inname, a->innamlen); + else if (p != NULL && p->ufnm != NULL) + b_char (p->ufnm, a->inname, a->innamlen); + } if (a->inacc != NULL && p != NULL && p->ufd != NULL) - if (p->url) - b_char ("DIRECT", a->inacc, a->inacclen); - else - b_char ("SEQUENTIAL", a->inacc, a->inacclen); + { + if (p->url) + b_char ("DIRECT", a->inacc, a->inacclen); + else + b_char ("SEQUENTIAL", a->inacc, a->inacclen); + } if (a->inseq != NULL) - if (p != NULL && p->url) - b_char ("NO", a->inseq, a->inseqlen); - else - b_char ("YES", a->inseq, a->inseqlen); + { + if (p != NULL && p->url) + b_char ("NO", a->inseq, a->inseqlen); + else + b_char ("YES", a->inseq, a->inseqlen); + } if (a->indir != NULL) - if (p == NULL || p->url) - b_char ("YES", a->indir, a->indirlen); - else - b_char ("NO", a->indir, a->indirlen); + { + if (p == NULL || p->url) + b_char ("YES", a->indir, a->indirlen); + else + b_char ("NO", a->indir, a->indirlen); + } if (a->infmt != NULL) - if (p != NULL && p->ufmt == 0) - b_char ("UNFORMATTED", a->infmt, a->infmtlen); - else - b_char ("FORMATTED", a->infmt, a->infmtlen); + { + if (p != NULL && p->ufmt == 0) + b_char ("UNFORMATTED", a->infmt, a->infmtlen); + else + b_char ("FORMATTED", a->infmt, a->infmtlen); + } if (a->inform != NULL) - if (p != NULL && p->ufmt == 0) - b_char ("NO", a->inform, a->informlen); - else - b_char ("YES", a->inform, a->informlen); + { + if (p != NULL && p->ufmt == 0) + b_char ("NO", a->inform, a->informlen); + else + b_char ("YES", a->inform, a->informlen); + } if (a->inunf) - if (p != NULL && p->ufmt == 0) - b_char ("YES", a->inunf, a->inunflen); - else if (p != NULL) - b_char ("NO", a->inunf, a->inunflen); - else - b_char ("UNKNOWN", a->inunf, a->inunflen); + { + if (p != NULL && p->ufmt == 0) + b_char ("YES", a->inunf, a->inunflen); + else if (p != NULL) + b_char ("NO", a->inunf, a->inunflen); + else + b_char ("UNKNOWN", a->inunf, a->inunflen); + } if (a->inrecl != NULL && p != NULL) *a->inrecl = p->url; if (a->innrec != NULL && p != NULL && p->url > 0) *a->innrec = FTELL (p->ufd) / p->url + 1; if (a->inblank && p != NULL && p->ufmt) - if (p->ublnk) - b_char ("ZERO", a->inblank, a->inblanklen); - else - b_char ("NULL", a->inblank, a->inblanklen); + { + if (p->ublnk) + b_char ("ZERO", a->inblank, a->inblanklen); + else + b_char ("NULL", a->inblank, a->inblanklen); + } return (0); } diff --git a/libf2c/libI77/lread.c b/libf2c/libI77/lread.c index 3dd40216211..b19c2d5e1a7 100644 --- a/libf2c/libI77/lread.c +++ b/libf2c/libI77/lread.c @@ -304,10 +304,12 @@ l_C (void) return 0; } if (rd_count (ch)) - if (!f__cf || !feof (f__cf)) - errfl (f__elist->cierr, 112, "complex format"); - else - err (f__elist->cierr, (EOF), "lread"); + { + if (!f__cf || !feof (f__cf)) + errfl (f__elist->cierr, 112, "complex format"); + else + err (f__elist->cierr, (EOF), "lread"); + } if (GETC (ch) != '*') { if (!f__cf || !feof (f__cf)) @@ -441,10 +443,12 @@ l_L (void) { rd_count (ch); if (GETC (ch) != '*') - if (!f__cf || !feof (f__cf)) - errfl (f__elist->cierr, 112, "no star"); - else - err (f__elist->cierr, (EOF), "lread"); + { + if (!f__cf || !feof (f__cf)) + errfl (f__elist->cierr, 112, "no star"); + else + err (f__elist->cierr, (EOF), "lread"); + } GETC (ch); } sawdot = 0; diff --git a/libf2c/libI77/open.c b/libf2c/libI77/open.c index 2faf6fceef4..8a2b1630f44 100644 --- a/libf2c/libI77/open.c +++ b/libf2c/libI77/open.c @@ -267,11 +267,13 @@ f_open (olist * a) opnerr (a->oerr, 108, "open"); #endif if (b->useek) - if (a->orl) - FSEEK (b->ufd, 0, SEEK_SET); - else if ((s = a->oacc) && (*s == 'a' || *s == 'A') - && FSEEK (b->ufd, 0, SEEK_END)) - opnerr (a->oerr, 129, "open"); + { + if (a->orl) + FSEEK (b->ufd, 0, SEEK_SET); + else if ((s = a->oacc) && (*s == 'a' || *s == 'A') + && FSEEK (b->ufd, 0, SEEK_END)) + opnerr (a->oerr, 129, "open"); + } return (0); } diff --git a/libf2c/libI77/rsne.c b/libf2c/libI77/rsne.c index 9dea2792bf1..9838f215250 100644 --- a/libf2c/libI77/rsne.c +++ b/libf2c/libI77/rsne.c @@ -525,21 +525,23 @@ have_amp: mustend: GETC (ch); if (readall) - if (iva >= ivae) - readall = 0; - else - for (;;) - { - switch (ch) - { - case ' ': - case '\t': - case '\n': - GETC (ch); - continue; - } - break; - } + { + if (iva >= ivae) + readall = 0; + else + for (;;) + { + switch (ch) + { + case ' ': + case '\t': + case '\n': + GETC (ch); + continue; + } + break; + } + } if (ch == '/' || ch == '$' || ch == '&') { f__lquit = 1; diff --git a/libf2c/libI77/wref.c b/libf2c/libI77/wref.c index c2600a1cccb..4f350887d69 100644 --- a/libf2c/libI77/wref.c +++ b/libf2c/libI77/wref.c @@ -232,14 +232,16 @@ wrt_F (ufloat * p, int w, int d, ftnlen len) } if (n = f__scale) - if (n > 0) - do - x *= 10.; - while (--n > 0); - else - do - x *= 0.1; - while (++n < 0); + { + if (n > 0) + do + x *= 10.; + while (--n > 0); + else + do + x *= 0.1; + while (++n < 0); + } #ifdef USE_STRLEN sprintf (b = buf, "%#.*f", d, x); |