diff src/parse.y @ 7728:13820b9f5fd9

more consistent handling of CR/CRLF/LF line endings in lexer and parser
author John W. Eaton <jwe@octave.org>
date Wed, 23 Apr 2008 16:03:34 -0400
parents 74f5e0c7de9e
children a059b5679fbb
line wrap: on
line diff
--- a/src/parse.y	Mon Apr 21 11:51:34 2008 -0400
+++ b/src/parse.y	Wed Apr 23 16:03:34 2008 -0400
@@ -2839,7 +2839,7 @@
 {
   int c = getc (f);
 
-  // Convert CRLF into just LF.
+  // Convert CRLF into just LF and single CR into LF.
 
   if (c == '\r')
     {
@@ -2850,7 +2850,7 @@
       else
 	{
 	  ungetc (c, f);
-	  c = '\r';
+	  c = '\n';
 	}
     }
   else if (c == '\n')