Mercurial > octave-nkf
diff src/ov-str-mat.cc @ 11944:278afaecddd4 release-3-0-x
fix leaving stray '\r' in stream when reading from CRLF data file
* * *
fix CRLF issues with text-mode reading in windows when loading ascii data
author | Benjamin Lindner <lindnerb@users.sourceforge.net> |
---|---|
date | Wed, 18 Mar 2009 15:23:14 +0100 |
parents | a1dbe9d80eee |
children |
line wrap: on
line diff
--- a/src/ov-str-mat.cc Thu Mar 26 07:29:25 2009 +0100 +++ b/src/ov-str-mat.cc Wed Mar 18 15:23:14 2009 +0100 @@ -48,6 +48,7 @@ #include "pr-output.h" #include "pt-mat.h" #include "utils.h" +#include "ls-ascii-helper.h" DEFINE_OCTAVE_ALLOCATOR (octave_char_matrix_str); DEFINE_OCTAVE_ALLOCATOR (octave_char_matrix_sq_str); @@ -344,8 +345,7 @@ char *ftmp = tmp.fortran_vec (); // Skip the return line - if (! is.read (ftmp, 1)) - return false; + skip_preceeding_newline (is); if (! is.read (ftmp, dv.numel ()) || !is) {