This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch proposal for PR 19679


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]