This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch proposal for PR 19679
- From: FranÃois-Xavier Coudert <Francois-Xavier dot Coudert at lcp dot u-psud dot fr>
- To: gfortran <fortran at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 24 Feb 2005 17:14:43 +0100
- Subject: Patch proposal for PR 19679
- Organization: Laboratoire de Chimie Physique
- References: <421DD9EF.70904@lcp.u-psud.fr>
Here comes a patch for PR 19679 (DOS files don't work for formatted input if
line length is exceeded). This is not in good form,
2005-02-24 FranÃois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/19679
* list_read.c (read_sf): Add a '\r' in a test to support DOS
line-endings when line length is exceeded.
Index: gcc/gcc/libgfortran/io/transfer.c
===================================================================
RCS file: /cvsroot/gcc/gcc/libgfortran/io/transfer.c,v
retrieving revision 1.31
diff -u -p -r1.31 transfer.c
--- io/transfer.c 29 Jan 2005 15:45:17 -0000 1.31
+++ io/transfer.c 24 Feb 2005 16:08:43 -0000
@@ -177,7 +177,7 @@ read_sf (int *length)
return NULL;
}
- if (readlen < 1 || *q == '\n')
+ if (readlen < 1 || *q == '\n' || *q == '\r')
{
/* ??? What is this for? */
if (current_unit->unit_number == options.stdin_unit)