OSDN Git Service

2008-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 May 2008 15:02:41 +0000 (15:02 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 May 2008 15:02:41 +0000 (15:02 +0000)
PR libfortran/36202
* io/list_read (eat_separator): Handle the CR-LF case correctly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135177 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/list_read.c

index 62b00bc..5be3cae 100644 (file)
@@ -1,3 +1,8 @@
+2008-05-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/36202
+       * io/list_read (eat_separator): Handle the CR-LF case correctly.
+
 2008-05-09  Julian Brown  <julian@codesourcery.com>
 
        * Makefile.am (LTLDFLAGS): New.
index 802bf9e..d3e932e 100644 (file)
@@ -347,20 +347,12 @@ eat_separator (st_parameter_dt *dtp)
     case '\r':
       dtp->u.p.at_eol = 1;
       n = next_char(dtp);
-      if (n == '\n')
+      if (n != '\n')
        {
-         if (dtp->u.p.namelist_mode)
-           {
-             do
-               c = next_char (dtp);
-             while (c == '\n' || c == '\r' || c == ' ');
-             unget_char (dtp, c);
-           }
+         unget_char (dtp, n);
+         break;
        }
-      else
-       unget_char (dtp, n);
-      break;
-
+    /* Fall through.  */
     case '\n':
       dtp->u.p.at_eol = 1;
       if (dtp->u.p.namelist_mode)