inquire.c (f_inqu): Avoid ambiguous else clauses.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sun, 2 Jun 2002 12:57:28 +0000 (12:57 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 2 Jun 2002 12:57:28 +0000 (12:57 +0000)
* 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.

From-SVN: r54167

libf2c/ChangeLog
libf2c/libI77/inquire.c
libf2c/libI77/lread.c
libf2c/libI77/open.c
libf2c/libI77/rsne.c
libf2c/libI77/wref.c

index cca6118c5c2f1e24404ad4f0c01ea634589235e4..cab86be281b31afc72c4c92cdbc1108a3f84bc0b 100644 (file)
@@ -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.
index ac13b36bd3827a3e12c2ba5bccb08c3b2c0ef8c7..5b2df3e699cf518aac4bf4317ff7174c3304bf79 100644 (file)
@@ -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);
 }
index 3dd40216211b995828fd2e0a4030d916a3d67b5b..b19c2d5e1a79d6f9f225ef8bdc857972b2830707 100644 (file)
@@ -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;
index 2faf6fceef49c4d29e688e7ed11b99f35b5dff6b..8a2b1630f44e9d79f781f6ced6951a3b4952efd8 100644 (file)
@@ -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);
 }
 
index 9dea2792bf10d153acf9ce45f81db126c2b2a903..9838f215250c4fee0a3725ac4a2c309c612462e6 100644 (file)
@@ -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;
index c2600a1cccba33bcab7f5b4d98f6a37552c3977b..4f350887d695317cba7b297a51b3fe8f52355a03 100644 (file)
@@ -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);