[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Please consider these 2 changesets
From: |
John W. Eaton |
Subject: |
Please consider these 2 changesets |
Date: |
Wed, 23 Apr 2008 11:18:36 -0400 |
On 23-Apr-2008, Michael Goffioul wrote:
| Please consider the following changesets for inclusion into
| main octave archive. One of them fixes the CRLF problem
| I reported earlier (basically, the problem is that MSVC messes
| up things with ftell/fseek for files opened in text-mode, hence
| with CRLF translation).
That change is:
| diff -r 5d199a0677d4 -r a54a89d2608e src/ChangeLog
| --- a/src/ChangeLog Wed Apr 23 16:58:10 2008 +0200
| +++ b/src/ChangeLog Wed Apr 23 16:58:48 2008 +0200
| @@ -1,3 +1,8 @@ 2008-04-20 John W. Eaton <address@hidden
| +2008-04-23 Michael Goffioul <address@hidden>
| +
| + * input.cc (get_input_from_file): Open file in binary mode (overwrite
| + default mode under MSVC).
| +
| 2008-04-20 John W. Eaton <address@hidden>
|
| * oct-stream.cc (octave_stream::read): Allow single data type
| diff -r 5d199a0677d4 -r a54a89d2608e src/input.cc
| --- a/src/input.cc Wed Apr 23 16:58:10 2008 +0200
| +++ b/src/input.cc Wed Apr 23 16:58:48 2008 +0200
| @@ -398,7 +398,7 @@ get_input_from_file (const std::string&
| FILE *instream = 0;
|
| if (name.length () > 0)
| - instream = fopen (name.c_str (), "r");
| + instream = fopen (name.c_str (), "rb");
|
| if (! instream && warn)
| warning ("%s: no such file or directory", name.c_str ());
What affect does this have for OS X, where text files by default use
'\r' for line termination? I'm not sure that Octave's lexer can
handle those files properly if they are opened in binary mode.
jwe