OSDN Git Service

2008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.org
[pf3gnuchains/gcc-fork.git] / libgfortran / io / list_read.c
index 47f4786..bcde3e1 100644 (file)
@@ -324,8 +324,7 @@ eat_separator (st_parameter_dt *dtp)
   switch (c)
     {
     case ',':
-      if ((dtp->common.flags & IOPARM_DT_HAS_F2003)
-         && dtp->u.p.decimal_status == DECIMAL_COMMA)
+      if (dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
        {
          unget_char (dtp, c);
          break;
@@ -935,8 +934,8 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
     default:
       if (dtp->u.p.namelist_mode)
        {
-         if (dtp->u.p.delim_status == DELIM_APOSTROPHE
-             || dtp->u.p.delim_status == DELIM_QUOTE
+         if (dtp->u.p.current_unit->delim_status == DELIM_APOSTROPHE
+             || dtp->u.p.current_unit->delim_status == DELIM_QUOTE
              || c == '&' || c == '$' || c == '/')
            {
              unget_char (dtp, c);
@@ -1117,8 +1116,7 @@ parse_real (st_parameter_dt *dtp, void *buffer, int length)
       c = next_char (dtp);
     }
 
-  if ((dtp->common.flags & IOPARM_DT_HAS_F2003)
-      && c == ',' && dtp->u.p.decimal_status == DECIMAL_COMMA)
+  if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
     c = '.';
   
   if (!isdigit (c) && c != '.')
@@ -1136,8 +1134,7 @@ parse_real (st_parameter_dt *dtp, void *buffer, int length)
   for (;;)
     {
       c = next_char (dtp);
-      if ((dtp->common.flags & IOPARM_DT_HAS_F2003)
-         && c == ',' && dtp->u.p.decimal_status == DECIMAL_COMMA)
+      if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
        c = '.';
       switch (c)
        {
@@ -1308,17 +1305,9 @@ eol_1:
   else
     unget_char (dtp, c);
 
-  if (dtp->common.flags & IOPARM_DT_HAS_F2003)
-    {
-      if (next_char (dtp)
-         !=  (dtp->u.p.decimal_status == DECIMAL_POINT ? ',' : ';'))
-       goto bad_complex;
-    }
-  else
-    {
-      if (next_char (dtp) != ',')
-       goto bad_complex;
-    }
+  if (next_char (dtp)
+      !=  (dtp->u.p.current_unit->decimal_status == DECIMAL_POINT ? ',' : ';'))
+    goto bad_complex;
 
 eol_2:
   eat_spaces (dtp);
@@ -1371,8 +1360,7 @@ read_real (st_parameter_dt *dtp, int length)
   seen_dp = 0;
 
   c = next_char (dtp);
-  if ((dtp->common.flags & IOPARM_DT_HAS_F2003)
-      && c == ',' && dtp->u.p.decimal_status == DECIMAL_COMMA)
+  if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
     c = '.';
   switch (c)
     {
@@ -1409,8 +1397,7 @@ read_real (st_parameter_dt *dtp, int length)
   for (;;)
     {
       c = next_char (dtp);
-      if ((dtp->common.flags & IOPARM_DT_HAS_F2003)
-         && c == ',' && dtp->u.p.decimal_status == DECIMAL_COMMA)
+      if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
        c = '.';
       switch (c)
        {
@@ -1476,8 +1463,7 @@ read_real (st_parameter_dt *dtp, int length)
       c = next_char (dtp);
     }
 
-  if ((dtp->common.flags & IOPARM_DT_HAS_F2003)
-      && c == ',' && dtp->u.p.decimal_status == DECIMAL_COMMA)
+  if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
     c = '.';
 
   if (!isdigit (c) && c != '.')
@@ -1502,8 +1488,7 @@ read_real (st_parameter_dt *dtp, int length)
   for (;;)
     {
       c = next_char (dtp);
-      if ((dtp->common.flags & IOPARM_DT_HAS_F2003)
-         && c == ',' && dtp->u.p.decimal_status == DECIMAL_COMMA)
+      if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
        c = '.';
       switch (c)
        {