aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2008-05-11 15:02:41 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2008-05-11 15:02:41 +0000
commit36afed5a7995639c343a16c03563f809a6f233da (patch)
treee2c1fd002e3ee4b1b305af00524e85b18ff06e12 /libgfortran
parent68b28852e7a7dea3e9c4ec641e947521054188e2 (diff)
downloadgcc-36afed5a7995639c343a16c03563f809a6f233da.zip
gcc-36afed5a7995639c343a16c03563f809a6f233da.tar.gz
gcc-36afed5a7995639c343a16c03563f809a6f233da.tar.bz2
re PR libfortran/36202 ([mingw] Namelist read fails with CRLF)
2008-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/36202 * io/list_read (eat_separator): Handle the CR-LF case correctly. From-SVN: r135177
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/io/list_read.c16
2 files changed, 9 insertions, 12 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 62b00bc..5be3cae 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -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.
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 802bf9e..d3e932e 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -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)